Skip to content

Instantly share code, notes, and snippets.

@marlun
Created March 29, 2011 18:44
Show Gist options
  • Save marlun/892975 to your computer and use it in GitHub Desktop.
Save marlun/892975 to your computer and use it in GitHub Desktop.
Vim's javascript syntax file fales to highlight regex strings
syn region javaScriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gi]\{0,2\}\s*$+ end=+/[gi]\{0,2\}\s*[;.,)\]}]+me=e-1 contains=@htmlPreproc oneline
data = data.replace(/(\r\n|\n|\r)/gm, "").replace(/'/g, "\\'");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment