1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-06-25 16:57:12 -07:00

vim: PKGBUILD indenting

This commit is contained in:
Connor Olding 2014-03-13 10:15:09 -07:00
parent 52596fb80f
commit b4457763b6

View File

@ -85,11 +85,21 @@ fu! TabFour()
setlocal tabstop=8 expandtab shiftwidth=4 softtabstop=4
endf
fu! TabTwo()
setlocal tabstop=2 shiftwidth=2 expandtab
endf
if has('autocmd')
augroup tabs " 4 spaces as tabs for various languages
au!
au FileType bash,sh,zsh,awk,python,lua,vim call TabFour()
au BufRead,BufNewFile *.json call TabFour()
au BufRead,BufNewFile PKGBUILD call TabTwo()
augroup END
augroup reload " http://superuser.com/a/417997
au!
au BufWritePost .vimrc,_vimrc,vimrc so $MYVIMRC
augroup END
fu! ResCur() " attempt to preserve cursor position