Vim Tips Wiki
mNo edit summary
(Hide double brace (looks like template), clean, format)
Line 1: Line 1:
[[Category:Syntax|Hide Folding Markers]]
 
[[Category:Folding|Hide Folding Markers]]
 
 
{{Tip
 
{{Tip
 
|id=241
 
|id=241
 
|title="Hide" Folding Markers
 
|title="Hide" Folding Markers
|created=May 2, 2002 19:34
+
|created=May 2, 2002
 
|complexity=intermediate
 
|complexity=intermediate
|author=Edwin-
+
|author=Edwin
 
|version=6.0
 
|version=6.0
 
|rating=2/4
 
|rating=2/4
 
|text=
 
|text=
 
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
 
 
}}
 
}}
<!-- Has to be here otherwise the Tip template overrides: -->
 
[[Category:VimTip|Hide Folding Markers]]
 
   
 
I wanted to start using folding without having to get used to seeing the (default) markers, aka <tt><nowiki>{{{</nowiki></tt> and <tt><nowiki>}}}</nowiki></tt>. So, here are two autocmds that will make them fade to black (bg=black, fg=black). Alternatively, you could use the Ignore highlighting group.
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
 
   
  +
<pre>
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.
 
 
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 '"*{{{\|"*}}}'
I just tried it out with vim files, but you can easily modify it for any other filetypes.
 
 
\ containedin=vimLineComment contained |
 
\ hi fmrkr term=NONE guibg=black guifg=black
 
\ ctermbg=black ctermfg=black
  +
</pre>
   
 
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.
Happy Vimming!
 
   
 
I just tried it out with vim files, but you can easily modify it for any other filetypes.
   
 
==References==
 
==References==
*Thanks to Colin's lead with {{help|ft-c-syntax}} for the 1st au.
+
*{{help|ft-c-syntax}}
*Thanks to Benji's lead with {{help|:syn-containedin}} for the 2nd au.
+
*{{help|:syn-containedin}}
*Understanding most of the {{help|syntax.txt}} document file would also be helpful.
+
*Understanding most of {{help|syntax.txt}} would also be helpful.
*To figure out what highlighting group the Marker is in, I would suggest using Chip's [[VimTip99]].
+
*See [[VimTip99]] to determine what highlighting group the cursor is in.
 
   
 
== Comments ==
 
== Comments ==
  +
'''TODO''' Rename tip to remove quotes (a good idea, and then won't need to put sort field in categories).
Instead of using black color, consider using the Ignore highlighting group!
 
   
kgergely--AT--mcl_remove.hu
 
, May 23, 2002 6:29
 
 
----
 
----
 
[[Category:Syntax]]
<!-- parsed by vimtips.py in 0.581121 seconds-->
 

Revision as of 12:46, 22 September 2007

Previous TipNext Tip

Tip: #241 - Hide fold markers

Created: May 2, 2002 Complexity: intermediate Author: Edwin Version: 6.0 Karma: 2/4 Imported from: Tip#241

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.

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.

References

Comments

TODO Rename tip to remove quotes (a good idea, and then won't need to put sort field in categories).