sponsor Vim development Vim logo Vim Book Ad

rainbow_parentheses.vim : Better Rainbow Parentheses

 script karma  Rating 181/76, Downloaded by 4208  Comments, bugs, improvements  Vim wiki

created by
 
script type
utility
 
description
Rainbow colors for parentheses, based on rainbow_parenthsis.vim of which there are multiple versions by Martin Krischik, John Gilmore, Luc Hermitte, and Steve Losh.

This version uses significantly less code than the older ones (~80% less) and has new options to make it easier to change the colors and the parentheses depth.

Usage:
Run :RainbowParenthesesToggle to toggle it on/off.

Highlight different bracket types:
    :RainbowParenthesesLoadRound " for ( ), default when toggling
    :RainbowParenthesesLoadSquare " for [ ]
    :RainbowParenthesesLoadBraces " for { }
    :RainbowParenthesesLoadChevrons " for < >

Git repo: https://github.com/kien/rainbow_parentheses.vim

Note: may not work for some languages (when syntax's already enabled) because of the limitation the `:syntax region` command.
 
install details
Extract to ~/.vim or $HOME\vimfiles.
 

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
rainbow_parentheses.zip 1.0.4 2012-08-19 7.0 Add a command to toggle all bracket types except chevrons "<" and ">" (thanks to Patrick McFarland).
Add an option enable/disable toggling with the Load cmds (toggling was added in 1.0.3).
rainbow_parentheses.zip 1.0.3 2011-10-26 7.0 Add the ability to toggle each parentheses type using the Load cmds.
Add vimrc example to always enable rainbow_parentheses.
ip used for rating: 3.149.251.155

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.
   
Vim at Github