Skip to content

Instantly share code, notes, and snippets.

@ironhouzi
Created September 4, 2015 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ironhouzi/7bb80c32383c2a1571df to your computer and use it in GitHub Desktop.
Save ironhouzi/7bb80c32383c2a1571df to your computer and use it in GitHub Desktop.
Set's javapath
" 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