Re:Actual drawbacks to omitting semi-colons?
by zmmmmm on Wednesday October 06, 2010 @12:31AM
(#1762717)
The one place where this really bites me is return statements. For example:
Every now and then I'll reformat a line by breaking it in two and it takes me 10 minutes to figure out why my code is not working.
[ Parent
| on HN ]
Re:Actual drawbacks to omitting semi-colons?
by VMG on Wednesday October 06, 2010 @01:01AM
(#1762796)
damn it I forgot that - does anyone know how to make vim highlight this?
Re:Actual drawbacks to omitting semi-colons?
by grayrest on Wednesday October 06, 2010 @01:32AM
(#1762848)
In your after/syntax/javascript.vim:
syntax match javascriptReturnError /return\s*\n\r\?\s*\w.*$/
...
highlight link javascriptReturnError Error
Obviously you can play around with the regex to tweak what matches.