diff --git a/vimrc b/vimrc index 8e4015a..e0825e8 100644 --- a/vimrc +++ b/vimrc @@ -70,6 +70,7 @@ if has("unix") || has("mac") Plugin 'Raimondi/delimitMate' Plugin 'tpope/vim-surround' Plugin 'captbaritone/better-indent-support-for-php-with-html' + Plugin 'luochen1990/indent-detector.vim' "[Solarized theme]" Plugin 'altercation/vim-colors-solarized' call vundle#end() @@ -289,7 +290,7 @@ language messages POSIX set title "[Hide/show the white-space and more invisible symbols]" set list -set listchars=tab:\|-,trail:- +set listchars=tab:\|\-,trail:- set nojoinspaces "[Folding settings]" set foldenable @@ -438,12 +439,12 @@ function! ShowModeInStatusLine() endif return g:showMode endfunction -"[Autodetect indent style of a file]" -function AutoDetectTabs() - if len(filter(getbufline(winbufnr(0), 1, "$"), 'v:val =~ "^\\t"')) > len(filter(getbufline(winbufnr(0), 1, "$"), 'v:val =~ "^ "')) - set noet ts=4 sw=4 - endif -endfunction -if has("autocmd") - autocmd BufReadPost * call AutoDetectTabs() -endif +""[Autodetect indent style of a file]" +"function AutoDetectTabs() +" if len(filter(getbufline(winbufnr(0), 1, "$"), 'v:val =~ "^\\t"')) > len(filter(getbufline(winbufnr(0), 1, "$"), 'v:val =~ "^ "')) +" set noet ts=4 sw=4 +" endif +"endfunction +"if has("autocmd") +" autocmd BufReadPost * call AutoDetectTabs() +"endif