Vim logo vim online Vim Book Ad

 Tip #241: "Hide" Folding Markers

 tip karma   Rating 1/3, Viewed by 678 

created:   May 2, 2002 19:34      complexity:   intermediate
author:   Edwin-      as of Vim:   6.0


I wanted to start using folding without having to get used to
seeing the (default) markers, a.k.a {{{ and }}}. So, here are
2 autocmd's that will make them fade to black....bg=black fg=black

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

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

They both accomplish the same thing, but with different methods, so
simply pick one and see those annoying (at least to me) markers fade away.
I just tried it out with vim files, but you can easily modify it for
any other filetypes.

Thanks to Colin's lead with ':help c-syntax'    for the 1st au.
Thanks to Benji's lead with ':help containedin' for the 2nd au.
Understanding most of the syntax.txt document file would also be helpful.

To figure out what highlighting group the Marker is in, I would suggest
using Chip's vimtip#99.

Happy Vimming!

 rate this tip  Life Changing Helpful Unfulfilling 

<<Hideall for Vim | The power of "\_" in reg-ex >>

Additional Notes

kgergely@mcl_remove.hu, May 23, 2002 6:29
Instead of using black color, consider using the Ignore highlighting group!
If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to [email protected] after searching the archive. Help Bram help Uganda.
SourceForge Logo