0

I have the following settings in my vimrc

let python_highlight_all=1
augroup vimrc_autocmds
   autocmd!
    autocmd FileType python highlight Excess ctermbg=DarkGrey guibg=Black
    autocmd FileType python match Excess /\%80v.*/
    autocmd FileType python set nowrap
augroup END

but the problem is that the same settings are applied to files of type htmldjango which are template files of django .

i have set the following parameters also in my vimrc

set hidden
set number
set nowrap
set autochdir  
set splitbelow
set splitright
set nocompatible
set foldmethod=indent
set foldcolumn=3
set nofoldenable 
set tabstop     =4
set shiftwidth  =4
set softtabstop =4
set expandtab
set pastetoggle=<F5>
set laststatus=2
set encoding=utf-8
let s:vim_home ='/home/xxxxx/.vim'
set scrolloff=3
set autoindent
set smartindent
set confirm
set visualbell
set history=1000
set showmatch
set incsearch
set hlsearch
set ignorecase
set smartcase
set mouse=a
set showcmd
set ruler
set nobackup
set writebackup
execute('set backupdir='.s:vim_home.'/backup')
execute('set directory='.s:vim_home.'/temp')
set wildmenu
set wildmode=list:longest
set wildignore+=.DS_Store,Thumbs.db
set wildignore+=*.so,*.dll,*.exe,*.lib,*.pdb
set wildignore+=*.pyc,*.pyo
set wildignore+=*.swp"
set backspace=indent,eol,start
set whichwrap+=<,>,h,l
set listchars=eol:$,tab:>-,trail:-,extends:>,precedes:<,nbsp:%,conceal:.
set complete=.,w,b,u,t
set completeopt=longest,menuone,preview
filetype    plugin indent on
syntax      on
colo        molokai

what can i do to prevent it?
Thanks

Anoop Reghuvaran
  • 329
  • 2
  • 10

1 Answers1

0

You can tell autocmd to ignore html files manually.

let blacklist = ['html']
autocmd FileType python if index (blacklist, &ft) < 0 | highlight Excess ctermbg=DarkGrey guibg=Black
autocmd FileType python if index (blacklist, &ft) < 0 | match Excess /\%80v.*/
autocmd FileType python if index (blacklist, &ft) < 0 | set nowrap

Based on this answer.

Community
  • 1
  • 1
YPCrumble
  • 26,610
  • 23
  • 107
  • 172