Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make highlighting of markdownError optional #79

Closed
blueyed opened this issue Jul 26, 2015 · 3 comments
Closed

Make highlighting of markdownError optional #79

blueyed opened this issue Jul 26, 2015 · 3 comments

Comments

@blueyed
Copy link

blueyed commented Jul 26, 2015

I would like to disable highlighting of markdownError.

syn match markdownError "\w@<=_\w@="

Do you think an optional setting like markdown_no_error makes sense?
(or markdown_no_underscore_error in case this should be more specific)

My case at hand is including Markdown syntax for Lua comments. But also in other situations I've found that "foo_bar" would not trigger emphasizing after _.

I've only skimmed http://spec.commonmark.org/0.21/#emphasis-and-strong-emphasis (and know that there are other implementations), but it appears that most would handle foo_bar as just "foo_bar" and not foo<em>bar.

Therefore I think the default should maybe even be to not display this type of error - but others might be added in the future?!

@ptzz
Copy link

ptzz commented Nov 12, 2015

Try putting this in your .vimrc: autocmd FileType markdown syn clear markdownError

@blueyed
Copy link
Author

blueyed commented Nov 12, 2015

@ptzz
Thanks.

I've found that this would then start highlighting the _bar in foo_bar as italic instead.

I am now using this:

autocmd FileType markdown hi link markdownError NONE

@blueyed
Copy link
Author

blueyed commented Nov 12, 2015

I think it's not worth a config var.

Please let me know if there's an even better way though, of course.

@blueyed blueyed closed this as completed Nov 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants