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

Add todo highlighting in the html comments #369

Open
dylan-chong opened this issue Mar 31, 2018 · 1 comment · May be fixed by #642
Open

Add todo highlighting in the html comments #369

dylan-chong opened this issue Mar 31, 2018 · 1 comment · May be fixed by #642

Comments

@dylan-chong
Copy link

If we have some markdown code with an html comment:

<!-- TODO my thing -->

highlight the word TODO

@Gidgidonihah
Copy link

I wanted this as well. I ended up setting up something in my vimrc across all files, but before that I attempted this patch:

diff --git i/syntax/markdown.vim w/syntax/markdown.vim
index d8d34ea..d962f6c 100644
--- i/syntax/markdown.vim
+++ w/syntax/markdown.vim
@@ -85,6 +85,9 @@ syn region mkdLinkTitle matchgroup=mkdDelimiter start=+"+     end=+"+  contained
 syn region mkdLinkTitle matchgroup=mkdDelimiter start=+'+     end=+'+  contained
 syn region mkdLinkTitle matchgroup=mkdDelimiter start=+(+     end=+)+  contained
 
+" Highlight TODO in markdown files
+syn keyword mkdTodo     contained TODO FIXME XXX TBD
+
 "HTML headings
 syn region htmlH1       matchgroup=mkdHeading     start="^\s*#"                   end="$" contains=mkdLink,mkdInlineURL,@Spell
 syn region htmlH2       matchgroup=mkdHeading     start="^\s*##"                  end="$" contains=mkdLink,mkdInlineURL,@Spell
@@ -177,6 +180,7 @@ HtmlHiLink mkdLinkDef       mkdID
 HtmlHiLink mkdLinkDefTarget mkdURL
 HtmlHiLink mkdLinkTitle     htmlString
 HtmlHiLink mkdDelimiter     Delimiter
+HtmlHiLink mkdTodo          Todo
 
 let b:current_syntax = "mkd"

Which did not work. I'd love to know or how to get it to work, though.

@lggruspe lggruspe linked a pull request Sep 20, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants
@Gidgidonihah @dylan-chong and others