Switch to a better indent detector plugin

This commit is contained in:
lhark 2017-03-20 14:24:16 -04:00
parent b249431a26
commit bded9cb24c

17
vimrc
View file

@ -12,6 +12,7 @@
"+------------------+-------------------------------------------------+"
"| AutoComplPop | https://github.com/vim-scripts/AutoComplPop |"
"| DelimitMate | https://github.com/Raimondi/delimitMate |"
"| DetectIndent | https://github.com/roryokane/detectindent |"
"| Multiple-Cursors | https://github.com/terryma/vim-multiple-cursors |"
"| Python-Mode | https://github.com/klen/python-mode |"
"| Surround | https://github.com/tpope/vim-surround |"
@ -70,7 +71,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'
Plugin 'roryokane/detectindent'
"[Solarized theme]"
Plugin 'altercation/vim-colors-solarized'
call vundle#end()
@ -440,11 +441,9 @@ function! ShowModeInStatusLine()
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
if has("autocmd")
augroup DetectIndent
autocmd!
autocmd BufReadPost * DetectIndent
augroup END autocmd BufReadPost * call AutoDetectTabs()
endif