I'm writing a syntax file. To highlight strings, I'm defining a region just like it says in the help file:
syn region m2String start=/"/ skip=/\\"/ end=/"/
and later I have:
let b:current_syntax = "m2"
hi def link m2String String
However, this isn't behaving the way I want it to. After some experimenting, I figured out that vim is only highlighting strings if the character before the first quotation mark is a letter. Here's a screen shot:
Does anyone know why this is happening and how to fix it? If it helps, I'm using vim version 7.4.1689 in the terminal. My terminal is xterm-256color.
contained
and/orcontains
keywords in some:syntax
command, but without seeing the full syntax with you're trying to modify it's a bit hard to say where exactly.