mirror of
https://github.com/vim/vim.git
synced 2025-07-24 10:45:12 -04:00
runtime(java): Add a config variable for commonly used compiler options
The value of g:javac_makeprg_params, if set, is added to the value of 'makeprg' as an option string. closes: #14999 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
63901e8963
commit
0ddab582fa
@ -1,7 +1,7 @@
|
|||||||
" Vim compiler file
|
" Vim compiler file
|
||||||
" Compiler: Java Development Kit Compiler
|
" Compiler: Java Development Kit Compiler
|
||||||
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
" Maintainer: Doug Kearns <dougkearns@gmail.com>
|
||||||
" Last Change: 2024 Apr 03
|
" Last Change: 2024 Jun 14
|
||||||
|
|
||||||
if exists("current_compiler")
|
if exists("current_compiler")
|
||||||
finish
|
finish
|
||||||
@ -11,7 +11,12 @@ let current_compiler = "javac"
|
|||||||
let s:cpo_save = &cpo
|
let s:cpo_save = &cpo
|
||||||
set cpo&vim
|
set cpo&vim
|
||||||
|
|
||||||
CompilerSet makeprg=javac
|
if exists("g:javac_makeprg_params")
|
||||||
|
execute $'CompilerSet makeprg=javac\ {escape(g:javac_makeprg_params, ' \|"')}'
|
||||||
|
else
|
||||||
|
CompilerSet makeprg=javac
|
||||||
|
endif
|
||||||
|
|
||||||
CompilerSet errorformat=%E%f:%l:\ error:\ %m,
|
CompilerSet errorformat=%E%f:%l:\ error:\ %m,
|
||||||
\%W%f:%l:\ warning:\ %m,
|
\%W%f:%l:\ warning:\ %m,
|
||||||
\%-Z%p^,
|
\%-Z%p^,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
*quickfix.txt* For Vim version 9.1. Last change: 2024 Jun 09
|
*quickfix.txt* For Vim version 9.1. Last change: 2024 Jun 16
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@ -1303,6 +1303,14 @@ g:compiler_gcc_ignore_unmatched_lines
|
|||||||
positives.
|
positives.
|
||||||
|
|
||||||
|
|
||||||
|
JAVAC *compiler-javac*
|
||||||
|
|
||||||
|
Commonly used compiler options can be added to 'makeprg' by setting the
|
||||||
|
g:javac_makeprg_params variable. For example: >
|
||||||
|
|
||||||
|
let g:javac_makeprg_params = "-Xlint:all -encoding utf-8"
|
||||||
|
<
|
||||||
|
|
||||||
MANX AZTEC C *quickfix-manx* *compiler-manx*
|
MANX AZTEC C *quickfix-manx* *compiler-manx*
|
||||||
|
|
||||||
To use Vim with Manx's Aztec C compiler on the Amiga you should do the
|
To use Vim with Manx's Aztec C compiler on the Amiga you should do the
|
||||||
|
@ -6532,6 +6532,7 @@ compiler-dotnet quickfix.txt /*compiler-dotnet*
|
|||||||
compiler-gcc quickfix.txt /*compiler-gcc*
|
compiler-gcc quickfix.txt /*compiler-gcc*
|
||||||
compiler-gnat ft_ada.txt /*compiler-gnat*
|
compiler-gnat ft_ada.txt /*compiler-gnat*
|
||||||
compiler-hpada ft_ada.txt /*compiler-hpada*
|
compiler-hpada ft_ada.txt /*compiler-hpada*
|
||||||
|
compiler-javac quickfix.txt /*compiler-javac*
|
||||||
compiler-manx quickfix.txt /*compiler-manx*
|
compiler-manx quickfix.txt /*compiler-manx*
|
||||||
compiler-pandoc quickfix.txt /*compiler-pandoc*
|
compiler-pandoc quickfix.txt /*compiler-pandoc*
|
||||||
compiler-perl quickfix.txt /*compiler-perl*
|
compiler-perl quickfix.txt /*compiler-perl*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user