All Projects → oblitum → Rainbow

oblitum / Rainbow

Rainbow Parentheses Improved

Labels

Projects that are alternatives of or similar to Rainbow

Vim Ruby Conque
Vim plugin to display ruby, rake, and rspec output colorized in ConqueTerm. Note: repeated runs of conqueterm may cause it to eat your shell ttys. I am no longer maintaining this.
Stars: ✭ 61 (-15.28%)
Mutual labels:  viml
Camelcasemotion
Motion through CamelCaseWords and underscore_notation.
Stars: ✭ 64 (-11.11%)
Mutual labels:  viml
Vimmate
Custom vim like Textmate for Ruby on Rails development
Stars: ✭ 70 (-2.78%)
Mutual labels:  viml
Showmarks
Visually shows the location of marks.
Stars: ✭ 61 (-15.28%)
Mutual labels:  viml
Vim Eighties
Automatically resizes your windows
Stars: ✭ 64 (-11.11%)
Mutual labels:  viml
Xvim
Powerfull vim configuration for C/C++/GO/JS coder(好用的vim插件集成包,支持C/C++/GO/JS)
Stars: ✭ 65 (-9.72%)
Mutual labels:  viml
Vim Blockle
Brace yourself, it's time to toggle your ruby blocks!
Stars: ✭ 60 (-16.67%)
Mutual labels:  viml
Vim Git Branch Info
A Vim script to return info about the Git branches.
Stars: ✭ 71 (-1.39%)
Mutual labels:  viml
Tcomment
An extensible & universal comment plugin that also handles embedded filetypes
Stars: ✭ 64 (-11.11%)
Mutual labels:  viml
Bringing Vim To The People
An lo, on the fourth day he did step down from the mountain, and with him VIM did follow . . . .
Stars: ✭ 69 (-4.17%)
Mutual labels:  viml
The Nerd Tree
A tree explorer plugin for navigating the filesystem
Stars: ✭ 62 (-13.89%)
Mutual labels:  viml
Vdbi Vim
Database client for Vim
Stars: ✭ 63 (-12.5%)
Mutual labels:  viml
Vim Scmdiff
Vim script to highlight lines changed from a base version in SCM
Stars: ✭ 65 (-9.72%)
Mutual labels:  viml
Bufkill.vim
Unload/delete/wipe a buffer, keep its window(s), display last accessed buffer(s)
Stars: ✭ 61 (-15.28%)
Mutual labels:  viml
Vim Spotifysearch
Search spotify in Vim and play songs.
Stars: ✭ 71 (-1.39%)
Mutual labels:  viml
Colorsbox
Stars: ✭ 61 (-15.28%)
Mutual labels:  viml
Vim Startuptime Benchmark
Stars: ✭ 65 (-9.72%)
Mutual labels:  viml
Underscore.vim
Vim script utility library 💓 The sky is the limit!
Stars: ✭ 72 (+0%)
Mutual labels:  viml
Javascript Indent
Javascript indenter (HTML indent is included)
Stars: ✭ 71 (-1.39%)
Mutual labels:  viml
Archidroid Legacy
Legacy ArchiDroid Repo / New -> https://github.com/ArchiDroid/ArchiDroid
Stars: ✭ 68 (-5.56%)
Mutual labels:  viml

#NOTICE Please try luochen's repository. I don't like rainbow highlighting anymore and he's using GitHub now. This repository is frozen for historical reasons now (specific c++ support, fixes to be backported, etc).

#Rainbow Parentheses Improved

This is a fork of Rainbow Parentheses Improved by luo chen.

I've applied some minor corrections and modifications:

  • Operators outside any braces get the last color of the rainbow. Previously, it was being ignored for highlighting.
  • Simplified/corrected logic to define highlighting precedence for braces as higher than for operators. So if you got a brace that's also an operator and you got to the situation that it can match both roles, it'll assume the brace role.
  • Changed default highlighted operators (now most punctuation) and highlighted braces (added < and > for C++, Rust, C# and Java).
  • Removed optional highlighting for operators. Now hard enabled.
  • Changed loading autocommand for the events "syntax" and "colorscheme" so that the rainbow gets loaded only when there's syntax being applied and aways after switching colorschemes.
  • Changed default colors. Default rainbow colors copied from gruvbox colorscheme (good for dark and light backgrounds).

Chevrons are a hard case to deal with. To distinguish "less than" from "bracket for open generics argument list" it's assumed that "less than" will always be surrounded by spaces. If not, it'll be treated as an open template's angle bracket (although, still some checking applies for the template or operator keyword, for C++ for example).

###Simple Configuration

Put this on your .vimrc for loading it for specific file types:

au FileType c,cpp,objc,objcpp call rainbow#load()

or just this to enable it globally:

let g:rainbow_active = 1

###Advanced Configuration An advanced configuration allows you to define what parentheses to use for each type of file. You can also determine the colors of your parentheses by this way (read file vim73/rgb.txt for all named colors).

e.g. this is an advanced config (add these sentences to your .vimrc):

let g:rainbow_active = 1

let g:rainbow_load_separately = [
    \ [ '*' , [['(', ')'], ['\[', '\]'], ['{', '}']] ],
    \ [ '*.tex' , [['(', ')'], ['\[', '\]']] ],
    \ [ '*.cpp' , [['(', ')'], ['\[', '\]'], ['{', '}']] ],
    \ [ '*.{html,htm}' , [['(', ')'], ['\[', '\]'], ['{', '}'], ['<\a[^>]*>', '</[^>]*>']] ],
    \ ]

let g:rainbow_guifgs = ['RoyalBlue3', 'DarkOrange3', 'DarkOrchid3', 'FireBrick']
let g:rainbow_ctermfgs = ['lightblue', 'lightgreen', 'yellow', 'red', 'magenta']

###User Command

:RainbowToggle  --you can use it to toggle this plugin.
:RainbowLoad    --you can use it to load/reload this plugin.

I recommend VAM or Vundle for plugin management.

Here's a sample of a dark gruvbox vim session:

Dark VIM Session

and here's a slightly lighter dark solarized session:

Lighter VIM Session

I thank Luo for being supportive and accepting the operator highlighting idea.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].