I use jshint.vim and in the code like below I get an error "bad line breaking before ','"
var a = 5
, b = 10;
How can I fix this? I found this question, but I'm not sure how can I use it to fix the problem in Vim. Is there any config file (except .vimrc) where I can set laxbreak
or laxma
?
I use jshint.vim and in the code like below I get an error "bad line breaking before ','"
var a = 5
, b = 10;
How can I fix this? I found this question, but I'm not sure how can I use it to fix the problem in Vim. Is there any config file (except .vimrc) where I can set laxbreak
or laxma
?
- 1 Which jshint.vim file are you using? Does it e with documentation? – gen_Eric Commented Jan 15, 2013 at 17:06
- 1 I. Must. Resist. The. Urge. To. Downvote. Because. Of. That. Bloody. Leading. Comma. – romainl Commented Jan 15, 2013 at 18:07
2 Answers
Reset to default 6Yes. I often use a leading ma style, and set the following preferences inside ~/.jshintrc
:
{
//...other prefs
laxma : true,
laxbreak : true,
//... other prefs
}
If you don't already have a .jshintrc, those two settings enclosed in braces a la JSON will probably do the trick.
I'm not sure about global configurations for the vim implementation, you'd have to consult the docs for that implementation, but you can put
/*jshint laxma:true */
at the top of your source files to set this on a per-file basis
Update
Looks like for the vim implementation you can set the config file using a global variable:
https://github./walm/jshint.vim/pull/3
You can then just create a json file and set laxma:true
in it.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745355377a4624084.html
评论列表(0条)