Created
September 4, 2015 11:31
-
-
Save ironhouzi/7bb80c32383c2a1571df to your computer and use it in GitHub Desktop.
Set's javapath
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Recurse to given file name | |
function! SetJavaPath() | |
let target_file = "build.xml" | |
let regex = eval("$HOME") | |
let java_path_root_dir = findfile(target_file, ".;") | |
let java_path = substitute(java_path_root_dir, regex, "~", "") | |
let g:syntastic_java_javac_classpath = fnamemodify(java_path, ":h") | |
endfunction | |
command! -register SetJavaPath call SetJavaPath() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment