0

enter image description here

The following content is extracted from gruvbox.vim. It indicates that green and yellow have been set for different levels of markdown header. However, I can not see the difference from the above picture.

hi! link markdownH1 GruvboxGreenBold
hi! link markdownH2 GruvboxGreenBold
hi! link markdownH3 GruvboxYellowBold
hi! link markdownH4 GruvboxYellowBold
hi! link markdownH5 GruvboxYellow
hi! link markdownH6 GruvboxYellow

EDIT: Thanks for the comments below! I have confirmed that vim-markdown caused this, what should I do next?

6
  • 2
    Are you using Vim or gvim ? Jan 29 '17 at 18:18
  • @Ashok I use mac and have tested this with both iterm2 and macvim.
    – Jimmy
    Jan 29 '17 at 23:05
  • 1
    This is what I get: i.stack.imgur.com/Edfq9.png You did do colorscheme gruvbox, right? And you don't have anything which defines a custom syntax highlighting for markdown? Maybe it names the headers differently or something. See vi.stackexchange.com/q/2003/205 and produce a verifiable example config, please.
    – muru
    Jan 30 '17 at 5:54
  • @muru Thanks for your comment. I found that I have installed several vim markdown plugins and If they are disabled, the result is expected. Then how can I change these settings from the markdown plugins?
    – Jimmy
    Jan 30 '17 at 6:41
  • @muru I'm a little confused now. Since the markdown plugin and colorscheme all have a syntax highlighting, how to know which one is valid eventually or last setted?
    – Jimmy
    Jan 30 '17 at 7:08
2

It looks like one of your plugins ships a modified markdown syntax file that defines different highlighting groups. Here is a snippet that shows you the highlighting group(s) that the word under the cursor falls under. Find out which highlighting group it is and overwrite that one.

I'm not sure, but the order also might be important. You might want to make sure you call the hi commands after your colorscheme.

" Show highlighting group for current word
nmap <leader>h :call <SID>SynStack()<CR>
function! <SID>SynStack()
    if !exists("*synstack")
        return
    endif
    echo map(synstack(line('.'), col('.')), 'synIDattr(v:val,"name")')
endfunc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.