Hi, I was coding in javascript and noticed that in the following example:
0 | var str = "this is a \ 1 | long string"; line 1 is highlighted as normal code, when in javascript the '\' allows the interperter to ignore the end of line. I then searched for a patch to this problem and found the opposite. Back in 2012 there was one patch claming to do "Multi-line string syntax highlighting for Vim" when in fact it broke it. I reverted the change and it works. diff -r 1f42458bf2e7 runtime/syntax/javascript.vim --- a/runtime/syntax/javascript.vim Wed Mar 25 20:24:04 2015 +0100 +++ b/runtime/syntax/javascript.vim Fri Mar 27 15:45:41 2015 +0000 @@ -40,8 +40,8 @@ syn match javaScriptCommentSkip "^[ \t]*\*\($\|[ \t]\+\)" syn region javaScriptComment start="/\*" end="\*/" contains=@Spell,javaScriptCommentTodo syn match javaScriptSpecial "\\\d\d\d\|\\." -syn region javaScriptStringD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+ contains=javaScriptSpecial,@htmlPreproc -syn region javaScriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ contains=javaScriptSpecial,@htmlPreproc +syn region javaScriptStringD start=+"+ skip=+\\\\\|\\"\|\\\n+ end=+"\|$+ contains=javaScriptSpecial,@htmlPreproc +syn region javaScriptStringS start=+'+ skip=+\\\\\|\\'\|\\\n+ end=+'\|$+ contains=javaScriptSpecial,@htmlPreproc syn match javaScriptSpecialCharacter "'\\.'" syn match javaScriptNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
