The is the original post in stackoverflow:
http://stackoverflow.com/questions/6411979/compiling-java-code-in-vim-more-efficiently
I added two lines to it:
F12 can jump out of quickfix mode
F8 can run the java program
vimrc:
autocmd Filetype java set makeprg=javac\ %
set errorformat=%A%f:%l:\ %m,%-Z%p^,%-C%.%#
map <F9> :make<Return>:copen<Return>
map <F10> :cprevious<Return>
map <F11> :cnext<Return>
map <F12> :ccl<Return>
map <F8> :!java %:r<Return>
No comments:
Post a Comment