sponsor Vim development Vim logo Vim Book Ad

BlockHL : highlighting different levels of {} in C

 script karma  Rating 37/30, Downloaded by 5878    Comments, bugs, improvements  Vim wiki

created by
Charles Campbell
script type
Blockhl.vim supports block-oriented highlighting of leading white space for C/C++.

For dark backgrounds, as one gets deeper into curly braces, the leading indentation will change to ever lighter colors (up to 7 such levels, then it cycles).

For light backgrounds, increasing curly brace depths will cause ever darker colors to be used (again, 7 levels).

You will need to source the <blockhl.vim> file in if you change colorschemes.

Required: gvim

(alpha/beta version available at http://www.drchip.org/astronaut/vim/index.html#BLOCKHL)
install details
1. In your <.vimrc> you'll need
   filetype plugin on

2. Put the <blockhl.vim> file into:
2. put the <blockhl.vim> file into
   and use vimscript#1023

vimscript#1023 also contains some help for non-Unix users


rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
blockhl.vim.bz2 4 2004-07-01 6.0 Charles Campbell optionally supports entire-line rather than just leading whitespace
uses cursorhold to restore highlighting after a colorscheme change
bugfix: an ALLBUT in cParen caused cCurly7 to do inside-() highlighting.
blockhl.vim.bz2 3 2004-06-30 6.0 Charles Campbell Blockhl now tailors its C block-highlighting based on the user's background setting (light versus dark).
ip used for rating:

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 the maillist. Help Bram help Uganda.
SourceForge.net Logo