Add the following to .vim
" Add the current file's directory to the path if not already present.
BufRead *
\ let s:tempPath=escape(escape(expand("%:p:h"), ' '), '\ ') |
\ exec "set path+=".s:tempPath
Ref: Set working directory to the current file
With previous make and javac binding, you can compile and execute Java code from vim with
:mak
:!java FILENAME
No comments:
Post a Comment