2016-12-15 9 views
0

私は自分のvimrcで以下の設定Vimのファイルタイプの設定も

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 

を持っているが、問題は、同じ設定がdjangoのテンプレートファイルであるタイプhtmldjangoのファイルに適用されるということです。

私はそれを防ぐために何ができる私の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 

を以下のパラメータを設定していますか?
ありがとう

答えて

0

htmlファイルを手動で無視するようにautocmdに指示できます。

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 

this answerに基づく。

関連する問題