Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

The YAML syntax highlighting in Vim 7.3 isn't great. Putting an apostrophe in a line of text triggers quote highlighting even when there's no quote. The same thing happens in other files sometimes too. I've posted a screenshot below. Is there any way to fix this behavior, or is there a different YAML syntax file I can use that won't trigger this behavior? This occurs in both MacVim and Vim in the Terminal. I'm running v7.3.

Thanks for your help, Kevin

attached a

share|improve this question

1 Answer 1

up vote 2 down vote accepted

look at your vim7.3 installation directory under syntax/yaml.vim, roughly line 32:

syn region  yamlString      matchgroup=yamlStringDelimiter
                            \ start=+'+ skip=+''+ end=+'+
                            \ contains=yamlSingleEscape

if you throw that out, vim wont try to guess that ' is not the start of a string. the only other way imho would be to change the code so a ' only count as the start of a string, if the preceding character is a whitespace... but if you dont use ' as string-quote anyway, just throw out what i mentioned.

share|improve this answer
    
Thanks - I was also using YAML incorrectly. –  Kevin Burke Apr 3 '11 at 22:10

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.