Switch to a better indent detector plugin
This commit is contained in:
parent
b249431a26
commit
bded9cb24c
1 changed files with 8 additions and 9 deletions
17
vimrc
17
vimrc
|
@ -12,6 +12,7 @@
|
||||||
"+------------------+-------------------------------------------------+"
|
"+------------------+-------------------------------------------------+"
|
||||||
"| AutoComplPop | https://github.com/vim-scripts/AutoComplPop |"
|
"| AutoComplPop | https://github.com/vim-scripts/AutoComplPop |"
|
||||||
"| DelimitMate | https://github.com/Raimondi/delimitMate |"
|
"| DelimitMate | https://github.com/Raimondi/delimitMate |"
|
||||||
|
"| DetectIndent | https://github.com/roryokane/detectindent |"
|
||||||
"| Multiple-Cursors | https://github.com/terryma/vim-multiple-cursors |"
|
"| Multiple-Cursors | https://github.com/terryma/vim-multiple-cursors |"
|
||||||
"| Python-Mode | https://github.com/klen/python-mode |"
|
"| Python-Mode | https://github.com/klen/python-mode |"
|
||||||
"| Surround | https://github.com/tpope/vim-surround |"
|
"| Surround | https://github.com/tpope/vim-surround |"
|
||||||
|
@ -70,7 +71,7 @@ if has("unix") || has("mac")
|
||||||
Plugin 'Raimondi/delimitMate'
|
Plugin 'Raimondi/delimitMate'
|
||||||
Plugin 'tpope/vim-surround'
|
Plugin 'tpope/vim-surround'
|
||||||
Plugin 'captbaritone/better-indent-support-for-php-with-html'
|
Plugin 'captbaritone/better-indent-support-for-php-with-html'
|
||||||
Plugin 'luochen1990/indent-detector.vim'
|
Plugin 'roryokane/detectindent'
|
||||||
"[Solarized theme]"
|
"[Solarized theme]"
|
||||||
Plugin 'altercation/vim-colors-solarized'
|
Plugin 'altercation/vim-colors-solarized'
|
||||||
call vundle#end()
|
call vundle#end()
|
||||||
|
@ -440,11 +441,9 @@ function! ShowModeInStatusLine()
|
||||||
return g:showMode
|
return g:showMode
|
||||||
endfunction
|
endfunction
|
||||||
""[Autodetect indent style of a file]"
|
""[Autodetect indent style of a file]"
|
||||||
"function AutoDetectTabs()
|
if has("autocmd")
|
||||||
" if len(filter(getbufline(winbufnr(0), 1, "$"), 'v:val =~ "^\\t"')) > len(filter(getbufline(winbufnr(0), 1, "$"), 'v:val =~ "^ "'))
|
augroup DetectIndent
|
||||||
" set noet ts=4 sw=4
|
autocmd!
|
||||||
" endif
|
autocmd BufReadPost * DetectIndent
|
||||||
"endfunction
|
augroup END autocmd BufReadPost * call AutoDetectTabs()
|
||||||
"if has("autocmd")
|
endif
|
||||||
" autocmd BufReadPost * call AutoDetectTabs()
|
|
||||||
"endif
|
|
||||||
|
|
Loading…
Reference in a new issue