Giter VIP home page Giter VIP logo

rainbow's Introduction

#Rainbow Parentheses Improved

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

I've applied some minor corrections and modifications to it:

  • 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 colors. Seems good to test with the mustang colorscheme.
  • Changed default highlighted operators (now most punctuation) and highlighted braces (added < and >).

Angle brackets are a hard case to deal with. To distinguish "less than" from "bracket for open template argument list" it's assumed that "less than" will always be surrounded by spaces, if not, it will be treated as an open template angle bracket. Although, even if < is surrounded by spaces, there's still some case elimination by checking for the template or operator keyword for example.

This fork is optimized for C++ highlighting in dark colorschemes by default.

Put this on your .vimrc:

let g:rainbow_operators = 2 
au FileType c,cpp,objc,objcpp call rainbow#activate()

I recommend VAM or Vundle for plugin management.

Here's a sample of one vim session.

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

rainbow's People

Contributors

xsyr avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.