[Assorted-commits] SF.net SVN: assorted: [438] configs/trunk/src/vim/plugin/_yang.vim
Brought to you by:
yangzhang
From: <yan...@us...> - 2008-02-15 02:43:14
|
Revision: 438 http://assorted.svn.sourceforge.net/assorted/?rev=438&view=rev Author: yangzhang Date: 2008-02-14 18:43:19 -0800 (Thu, 14 Feb 2008) Log Message: ----------- got rid of bufenter Modified Paths: -------------- configs/trunk/src/vim/plugin/_yang.vim Modified: configs/trunk/src/vim/plugin/_yang.vim =================================================================== --- configs/trunk/src/vim/plugin/_yang.vim 2008-02-15 02:42:03 UTC (rev 437) +++ configs/trunk/src/vim/plugin/_yang.vim 2008-02-15 02:43:19 UTC (rev 438) @@ -117,7 +117,7 @@ set ruler " TODO ??? set shiftwidth=2 set showmatch -set smartindent " TODO ??? +set nosmartindent " TODO ??? set switchbuf=useopen " TODO ??? set tabstop=2 set updatetime=500 @@ -137,6 +137,10 @@ filetype plugin indent on " AUTOCOMMANDS ---------------------------------------------------------------- + +" Don't use BufEnter since it is annoyingly aggressive and triggers whenever +" we (for instance) switch into this buffer + " binaries augroup Binary au! @@ -148,20 +152,19 @@ au BufWritePost *.bin if &bin | %!xxd au BufWritePost *.bin set nomod | endif augroup END -" TODO change all BufEnter to something more correct; BufEnter is annoyingly -" aggressive and triggers whenever we (for instance) switch into this buffer + " Java/Eclim -"au BufEnter *.java iunmap <tab> -"au BufEnter *.java setlocal cot+=longest | inoremap <buffer> . .<c-x><c-u> | inoremap <buffer> <c-j> <c-x><c-u> | nnoremap <silent> <buffer> <tab> :call eclim#util#FillTemplate("${", "}")<cr> | nnoremap <silent> <buffer> <leader>i :JavaImport<cr> | nnoremap <silent> <buffer> <leader>d :JavaDocSearch -x declarations<cr> | nnoremap <silent> <buffer> <cr> :JavaSearchContext<cr> +"au BufNewFile,BufRead *.java iunmap <tab> +"au BufNewFile,BufRead *.java setlocal cot+=longest | inoremap <buffer> . .<c-x><c-u> | inoremap <buffer> <c-j> <c-x><c-u> | nnoremap <silent> <buffer> <tab> :call eclim#util#FillTemplate("${", "}")<cr> | nnoremap <silent> <buffer> <leader>i :JavaImport<cr> | nnoremap <silent> <buffer> <leader>d :JavaDocSearch -x declarations<cr> | nnoremap <silent> <buffer> <cr> :JavaSearchContext<cr> " autocmd Mapserver map files au BufNewFile,BufRead *.map setf map " temporaries -autocmd BufEnter *.{c,cc,cpp,cxx,h} setlocal cindent expandtab softtabstop=4 shiftwidth=4 tabstop=8 -autocmd BufEnter *.java setlocal cindent noexpandtab softtabstop=4 shiftwidth=4 tabstop=4 +autocmd BufNewFile,BufRead *.{c,cc,cpp,cxx,h} setlocal cindent expandtab softtabstop=2 shiftwidth=2 tabstop=8 +autocmd BufNewFile,BufRead *.java setlocal cindent noexpandtab softtabstop=4 shiftwidth=4 tabstop=4 " autocmd GDB -au BufEnter *.gdb set ft=gdb +au BufNewFile,BufRead *.gdb set ft=gdb " autocmd hxx, cxx -"au BufEnter *.[ch]xx setlocal et +"au BufNewFile,BufRead *.[ch]xx setlocal et "au BufReadPost * " \ if line("'\"") > 0 && line("'\"") <= line("$") | " \ exe "normal g`\"" | This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |