vim-pandoc / vim-pandoc-legacy

[UNSUPPORTED/use vim-pandoc/vim-pandoc] vim bundle for pandoc users
143 stars 23 forks source link

don't highlight between underscores in words #98

Closed naught101 closed 10 years ago

naught101 commented 10 years ago

vim-pandoc currently incorrectly highlights between underscores inside words. This is annoying, because sometimes quoted variables or citation identifiers have underscores, and it can really through out the formatting. pandoc-vim should ignore underscores surrounded by word characters.

From http://johnmacfarlane.net/pandoc/README.html#emphasis

Extension: intraword_underscores

Because is sometimes used inside words and identifiers, pandoc does not interpret a surrounded by alphanumeric characters as an emphasis marker. If you want to emphasize just part of a word, use *:

feasible, not feasable.

fmoralesc commented 10 years ago

We fixed this in the vim-pandoc/vim-pandoc-syntaxrepo. The changes have been backported into vim-pandoc in the backport-pandoc-syntax branch.

naught101 commented 10 years ago

Thanks. I just tried that branch, and got the following error:

Error detected while processing /home/naught101/.vim/bundle/vim-pandoc/syntax/pandoc.vim:
line  291:
E484: Can't open file colors/yaml.vim

Does that branch have extra requirements, or is there a file missing?

fmoralesc commented 10 years ago

Oh, that's an oversight on our part. We enable yaml headers in pandoc files using https://github.com/vim-scripts/yaml.vim. We just forgot to make it fail gracefully if the file isn't found.

fmoralesc commented 10 years ago

I just pushed a fix to both vim-pandoc-syntax and the backports branch. Thanks for the report on this last error.