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?

xlc
  • 150
  • 8
  • 2
    Are you using Vim or gvim ? – Ashok Arora Jan 29 '17 at 18:18
  • @Ashok I use mac and have tested this with both iterm2 and macvim. – xlc Jan 29 '17 at 23:05
  • 1
    This is what I get: https://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 http://vi.stackexchange.com/q/2003/205 and produce a verifiable example config, please. – muru Jan 30 '17 at 05: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? – xlc Jan 30 '17 at 06: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? – xlc Jan 30 '17 at 07:08
  • @Jimmy See :scriptnames (:h :scriptnames) for a list of the sourced sripts at startup and see the question linked by muru to debug your vimrc and find the plugin which introduces something you don't like. – statox Jan 30 '17 at 08:05

1 Answers1

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
fneu
  • 21
  • 1