summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2013-02-08 12:12:54 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2013-02-08 12:12:54 +0100
commitaebac4c095f79e6f96f4ab02e1cffbbc3e1bb6ee (patch)
treeeead72d9aac9f7e65c4aece3bcea360da20ca757
parent2e83040dc796115330f774f2ceb277cf4f6fe2ec (diff)
downloadvim-aebac4c095f79e6f96f4ab02e1cffbbc3e1bb6ee.zip
vim-aebac4c095f79e6f96f4ab02e1cffbbc3e1bb6ee.tar.gz
cleanup autocmd
-rw-r--r--vimrc23
1 files changed, 13 insertions, 10 deletions
diff --git a/vimrc b/vimrc
index 06bef91..4748327 100644
--- a/vimrc
+++ b/vimrc
@@ -37,8 +37,6 @@ let Tlist_Enable_Fold_Column = 0 " no fold column (only showing one file)
set ff=unix
set nofsync
:filetype on
-:au BufNewFile * :exe("0r! ~/.vim/skeletons.rb %:p " . &filetype)
-:au Filetype html,xml,xsl source ~/.vim/scripts/closetag.vim
" set list
" set cursorline
@@ -99,14 +97,17 @@ if has("autocmd")
\ exe "normal g`\"" |
\ endif
- autocmd FileType python set omnifunc=pythoncomplete#Complete
- autocmd FileType ruby set omnifunc=rubycomplete#Complete
- autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
- autocmd FileType html set omnifunc=htmlcomplete#CompleteTags
- autocmd FileType css set omnifunc=csscomplete#CompleteCSS
- autocmd FileType xml set omnifunc=xmlcomplete#CompleteTags
- autocmd FileType php set omnifunc=phpcomplete#CompletePHP
- autocmd FileType c set omnifunc=ccomplete#Completeset
+ autocmd FileType python setlocal omnifunc=pythoncomplete#Complete
+ autocmd FileType ruby setlocal omnifunc=rubycomplete#Complete
+ autocmd FileType javascript setlocal omnifunc=javascriptcomplete#CompleteJS
+ autocmd FileType html setlocal omnifunc=htmlcomplete#CompleteTags
+ autocmd FileType css setlocal omnifunc=csscomplete#CompleteCSS
+ autocmd FileType xml setlocal omnifunc=xmlcomplete#CompleteTags
+ autocmd FileType php setlocal omnifunc=phpcomplete#CompletePHP
+ autocmd FileType c setlocal omnifunc=ccomplete#Completeset
+ autocmd Filetype java setlocal complete=.,w,b,u,t,i
+ autocmd Filetype java setlocal omnifunc=javacomplete#Complete
+ autocmd Filetype java setlocal completefunc=javacomplete#CompleteParamsInfo
" Syntax of these languages is fussy over tabs Vs spaces
autocmd FileType make setlocal ts=8 sts=8 sw=8 noexpandtab
@@ -115,9 +116,11 @@ if has("autocmd")
" Customisations based on house-style (arbitrary)
autocmd FileType html setlocal ts=2 sts=2 sw=2 expandtab
autocmd FileType css setlocal ts=2 sts=2 sw=2 expandtab
+ autocmd Filetype html,xml,xsl source ~/.vim/scripts/closetag.vim
" Treat .rss files as XML
autocmd BufNewFile,BufRead *.rss setfiletype xml
+ autocmd BufNewFile * :exe("0r! ~/.vim/skeletons.rb %:p " . &filetype)
endif " has("autocmd")