syntastic - Disable automatic compilation of Java

人盡茶涼 提交于 2019-12-21 09:15:34

问题


How can I tell Syntastic to not compile my Java code on save? I have tried following in my .vimrc:

let g:syntastic_disabled_filetypes = ['java']

let g:syntastic_java_checker='checkstyle'

let g:syntastic_java_checker=''


回答1:


let g:syntastic_mode_map = { 'mode': 'active',
                           \ 'active_filetypes': ['foo', 'bar'],
                           \ 'passive_filetypes': ['java'] }

This should work.




回答2:


This is something of a hack, but you can trick Syntastic into not loading the javac checker by pretending it's already loaded, by placing this in your .vimrc:

let g:loaded_syntastic_java_javac_checker = 1

This option is superior to g:syntastic_mode_map since it doesn't require you to explicitly list all of the file types you want to be actively checked.



来源:https://stackoverflow.com/questions/15937042/syntastic-disable-automatic-compilation-of-java

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!