1. 一个很不错的vim中文文档网站
看了下里面的vim用户手册,翻译得很不错,以后不用再啃英文文档了 ^_^
2. 设置tab的格数
setlocal softtabstop=4
set shiftwidth=4
3. [zz]Java Complete
install details
1. Place javacomplete.vim in the autoload directory, e.g. $VIM/vimfiles/autoload
2. Place classes of Reflection into classpath.
set CLASSPATH=path_of_Reflection.class;%CLASSPATH%
or in linux/unix
export CLASSPATH=path_of_Reflection.class:$CLASSPATH
You can also recompile Reflection.java by yourself. Use jdk1.2 (and above)
3. Set 'omnifunc' option if necessary. e.g.
:set omnifunc=javacomplete#Complete
You can do it in a script like ftplugin/java_fc.vim.
Or, use autocmd:
" Only do this part when compiled with support for autocommands.
if has("autocmd")
autocmd Filetype java setlocal omnifunc=javacomplete#Complete
endif
4. Add more jars or class directories to classpath, if you like. e.g.
let g:java_classpath = '.;C:\java\lib\servlet.jar;C:\java\classes;C:\webapp\WEB-INF\lib\foo.jar;C:\webapp\WEB-INF\classes'
or in unix/linux
let g:java_classpath = '.:~/java/lib/servlet.jar:~/java/classes:~/java/webapp/WEB-INF/lib/foo.jar:~/java/webapp/WEB-INF/classes'
Besides g:java_classpath, you can set local b:classpath and it is preferred.