I am using mvim with plugin JavaScriptLint. It works great.
However sometimes I work on jQuery or other JavaScript libraries and every single time I save the file, I get tons of warning and cursor moves to the very first warning.
What I would like to have is some way to turn this fea开发者_如何学JAVAture On or off. Something like
:set enableJavaScriptLint
:set disableJavaSCriptLint
My vimrc file is here. And the plugin is here . Notce at line number 14 the plugin autodetects if jsl command is present then it gets enabled. I guess I need to write some function to enable or disable that call.
Any help is appreciated.
Not exactly what you have in mind, but you can remove the autocommand and call the function manually or replace it with a shortcutkey maybe like this:
map <F11> :call JavascriptLint()
you then have to remember to first save the file, and only call it on *.js files though...
Or, you could fix all warnings...it'll stop complaining too ;-)
精彩评论