javac.vim 659 B

1234567891011121314151617181920212223242526
  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. " 2025 Mar 11 (add comment for Dispatch)
  6. if exists("current_compiler")
  7. finish
  8. endif
  9. let current_compiler = "javac"
  10. let s:cpo_save = &cpo
  11. set cpo&vim
  12. " CompilerSet makeprg=javac
  13. execute $'CompilerSet makeprg=javac\ {escape(get(b:, 'javac_makeprg_params', get(g:, 'javac_makeprg_params', '')), ' \|"')}'
  14. CompilerSet errorformat=%E%f:%l:\ error:\ %m,
  15. \%W%f:%l:\ warning:\ %m,
  16. \%-Z%p^,
  17. \%-C%.%#,
  18. \%-G%.%#
  19. let &cpo = s:cpo_save
  20. unlet s:cpo_save