2013-02-28 47 views

回答

4

請參閱this question。在~/.vim/after/ftplugin/make.vim

set tabstop=2 
set softtabstop=2 
set expandtab 

這:對於你的情況,你會在你的.vimrc希望這個

setlocal noexpandtab 
2

您可以使用autocmd對於這一點,所以它幾乎變成了oneliner在.vimrc

autocmd Filetype jade setlocal ts=2 sw=2 expandtab 
autocmd Filetype yaml setlocal ts=2 sw=2 expandtab 

其他一切仍將使用全局默認值。