javac.vim 588 B

123456789101112131415161718192021222324
  1. " Vim compiler file
  2. " Compiler: Java Development Kit Compiler
  3. " Maintainer: Doug Kearns <dougkearns@gmail.com>
  4. " Last Change: 2024 Nov 19 (enable local javac_makeprg_params)
  5. if exists("current_compiler")
  6. finish
  7. endif
  8. let current_compiler = "javac"
  9. let s:cpo_save = &cpo
  10. set cpo&vim
  11. execute $'CompilerSet makeprg=javac\ {escape(get(b:, 'javac_makeprg_params', get(g:, 'javac_makeprg_params', '')), ' \|"')}'
  12. CompilerSet errorformat=%E%f:%l:\ error:\ %m,
  13. \%W%f:%l:\ warning:\ %m,
  14. \%-Z%p^,
  15. \%-C%.%#,
  16. \%-G%.%#
  17. let &cpo = s:cpo_save
  18. unlet s:cpo_save