vim - Cannot use gcc which is set by autocmd to compile java in MacVim -
i compile java program using gcc rather using javac because can give out more detail information compared javac.
in startup configuration. use "make" me compile program have set compiler "make" first
i use command set compiler gcc automatically when filetype java. autocmd filetype java compiler gcc
but when i tried compile program using "make" give out lot of message don't understand, , cannot compile program.
however, when first set compiler javac,then set gcc later. "make" works!!
- in startup config : autocmd filetype java compiler javac
- when editing file, :compiler gcc
then can compile java program using make gcc compiler
i don't know problem is. can automatically set compiler gcc instead of setting later when editing file ??
try autocmd filetype java set makeprg=gcc
in .vimrc.
Comments
Post a Comment