Tip 241 Printable Monobook Previous Next

created 2002 · complexity intermediate · author Edwin · version 6.0

I wanted to start using folding without having to get used to seeing the (default) markers, aka {{{ and }}}. So, here are two autocmds that will make them fade to black (bg=black, fg=black). Alternatively, you could use the Ignore highlighting group.

Method 1:

au BufRead,BufNewfile * syn match fmrkr '"*{{{\|"*}}}' |
  \ syn cluster vimCommentGroup contains=fmrkr |
  \ hi fmrkr term=NONE guibg=black guifg=black
  \ ctermbg=black ctermfg=black

Method 2:

au BufRead,BufNewfile * syn match fmrkr '"*{{{\|"*}}}'
  \ containedin=vimLineComment contained |
  \ hi fmrkr term=NONE guibg=black guifg=black
  \ ctermbg=black ctermfg=black

Both methods accomplish the same thing, but in a different way. Simply pick one and see those annoying markers fade away.

I just tried it out with Vim files, but you can easily modify it for any other filetypes.



It might be better to:

  • Use add= instead of contains= for the syn cluster
  • Use Syntax autocmd event instead of BufRead,BufNewfile for both methods
  • With the above, make it trigger only for the correct language (e.g. autocmd Syntax vim ...)
  • Would also like to see that the color selected was the current background color not just black (if I understand things)

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.