-
Notifications
You must be signed in to change notification settings - Fork 621
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
Underlined headers not recognized in Markdown syntax #209
Comments
#273 might solve this but would ned to be revamped. |
Adding the syntax support is easy enough but it is more complicated to handle some of the other commands. At a minimum the commands would need to recognize and link to this style of header. We would also need to consider another option to indicate how generated sections should be created. Should a mix of Setex style for H1, H2 be used and then ATX style for lower level headers? Or only support ATX style for generated commands? Commands to consider (others?): VimwikiTOC
VimwikiGenerateLinks
VimwikiGenerateTags
VimwikiDiaryGenerateLinks Syntax support can be done with something like this: syn match VimwikiSetexHeader /^.\+\n[=]\+$/
syn match VimwikiSetexHeader /^.\+\n[-]\+$/
hi def link VimwikiSetexHeader Title |
@ranebrown Sorry to bother you again. I find that vim default syntax highlighting can recognize
.md will be set to if I change that to
.md will be set to |
Vimwiki doesn't know about the regex pattern used to highlight the setex header so there is no way it can jump back to a header defined by another plugin or syntax file. |
For highligting From vim markdown.vim default syntax (Tim Pope) https://github.com/tpope/vim-markdown/blob/9ff8d52c78fb8a587224d7f4d877fc95c8e1bd5b/syntax/markdown.vim#L59-L62 syn match markdownH1 "^.\+\n=\+$" contained contains=@markdownInline,markdownHeadingRule,markdownAutomaticLink
syn match markdownH2 "^.\+\n-\+$" contained contains=@markdownInline,markdownHeadingRule,markdownAutomaticLink
syn match markdownHeadingRule "^[=-]\+$" contained For search: |
Like these ========== See: https://spec.commonmark.org/0.29/#setext-headings Note: work for follow_link and VimwikiTOC
Like these ========== See: https://spec.commonmark.org/0.29/#setext-headings Note: work for follow_link and VimwikiTOC
Like these ========== See: https://spec.commonmark.org/0.29/#setext-headings Note: work for follow_link and VimwikiTOC
Fixed: fc056cf PS (Only for devs): Some redundancy must be factorized but the non regression tests are made and green: Example of redundancy:
syntax/vimwiki_markdown.vim
|
Like these ========== See: https://spec.commonmark.org/0.29/#setext-headings Note: work for follow_link and VimwikiTOC
Like these ========== See: https://spec.commonmark.org/0.29/#setext-headings Note: work for follow_link and VimwikiTOC
As referred in #101, following syntaxes (Setext-style headers) of Markdown are not recognized.
I prefer to use these because they are more conspicuous. Could it be supported?
The text was updated successfully, but these errors were encountered: