nowox
nowox

Reputation: 29166

Vim syntax (Markdown)

I'm currently exploring the prurigro/vim-markdown-concealed plugin with the conceal option.

The highlight I get for the *italic* and **bold** words is not very pretty. The problem can either come from my colorscheme or the plugin syntax. So I looked at the the mkdc.vim file first and I found the concerned lines:

syn region htmlItalic          matchgroup=mkdDelimiter start="\\\@<!\*\S\@="                          end="\S\@<=\\\@<!\*"                   keepend oneline concealends contains=mkdEscape
syn region htmlItalic          matchgroup=mkdDelimiter start="\(^\|\s\)\@<=_\|\\\@<!_\([^_]\+\s\)\@=" end="\S\@<=_\|_\S\@="                  keepend oneline concealends contains=mkdEscape
syn region htmlBold            matchgroup=mkdDelimiter start="\S\@<=\*\*\|\*\*\S\@="                  end="\S\@<=\*\*\|\*\*\S\@="            keepend oneline concealends contains=mkdEscape
syn region htmlBold            matchgroup=mkdDelimiter start="\S\@<=__\|__\S\@="                      end="\S\@<=__\|__\S\@="  

I noticed at the beginning of this file, there is a link to syntax/html.vim which define htmlBold like this:

if !exists("html_my_rendering")
  hi def htmlBold                term=bold cterm=bold gui=bold
  hi def htmlBoldUnderline       term=bold,underline cterm=bold,underline gui=bold,underline
  hi def htmlBoldItalic          term=bold,italic cterm=bold,italic gui=bold,italic
  hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline
  hi def htmlUnderline           term=underline cterm=underline gui=underline
  hi def htmlUnderlineItalic     term=italic,underline cterm=italic,underline gui=italic,underline
  hi def htmlItalic              term=italic cterm=italic gui=italic
endif  

How to manually redefine the highlight link for htmlItalic and htmlBold?

Upvotes: 2

Views: 1163

Answers (1)

nowox
nowox

Reputation: 29166

I simply solved it by adding this to my .vimrc:

hi link htmlBold Storage
hi link htmlItalic Identifier   

Upvotes: 1

Related Questions