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!!

  1. in startup config : autocmd filetype java compiler javac
  2. 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

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -