Home

Awesome

vim-rainbows

Vim runtime files for my own language, Rainbows.

The power of vim meets the power of the rainbow

Installation

Using vim-plug:

Plug 'google/vim-maktaba' " This is a dependency
Plug 'nfischer/vim-rainbows'

Using vundle:

Plugin 'google/vim-maktaba' " This is a dependency
Plugin 'nfischer/vim-rainbows'

How do I use it?

Rainbows is all about coding in color! Now you can do that, all from within vim!

To get started, visit the live demo and download the files (this should be a .rain and .raint file).

Next, open up the .rain file and start hacking away!

What does this do for me?

Here are the allowed commands, which should all be entered in normal mode on top of the token you want to paint

key mapcolor/type
grrred/string
grbblue/int
groorange/float
grwwhite/bool
grggreen/list
grppurple/dict
grDreset to default

But wait, there's more!

Want this to do type inference?

If you have Rainbows installed, you can specify the path to the type inferencer, and it'll run after every save:

" In .vimrc
let g:rainbows#inferencer_path = '/path/to/rainbows/bin/rain-infer.js'

Want the inferencer to run in the background?

Try out neovim

Don't like the default colors in terminal vim?

Customization

let g:rainbows#map_prefix = 'R'
let g:rainbows#default_key = 'C'
let g:rainbows#custom_map = {
  \   's': 'string',
  \   'i': 'int',
  \   'f': 'float',
  \   'b': 'bool',
  \   'l': 'list',
  \   'd': 'dict'
  \ }
let g:rainbows#inferencer_path = '/path/to/rainbows/bin/rain-infer.js'

Coming soon...

Want something more?

Let me know! Either post an issue, or send a PR my way. This is still super experimental, and very closely tied to the language itself, so anything is up for grabs.