vim plugin – rainbow

Copyright statement :This article refers to the [“rainbow official documentation”] . Commercial publication is strictly prohibited without the author’s permission, otherwise legal responsibility will be pursued. Please indicate the source when reprinting on the Internet, this is the minimum respect for the original creator! ! !

1 Introduction

2 Installation Tutorial

  • $vim ~/.vimrc
  • add between call vundle#begin()andcall vundle#end() 'luochen1990/rainbow'
  • :wq
  • $vim
  • :PluginInsttall

3 Use the tutorial

  • ~/.vimrcadd inlet g:rainbow_active = 1

4 options

  • let g:rainbow_active = 1
      Automatically enable the plugin, :RainbowToggleset to 0 if the plugin is enabled using the command

    • Configure the highlight color, the bracket pair to be highlighted
    • ‘guifgs’: Bracket color for GUI interface (will be cycled in order)
    • ‘ctermfgs’: Bracket color under terminal (same as above, plugin will choose based on environment)
    • ‘operators’: operators highlighted with sibling parentheses ( '_,\|+\|-_',, +, -)
    • ‘parentheses’: describe which patterns will be treated as parentheses, each set of parentheses is described by two vim regular expressions
    • ‘separately’: Make different configurations for file types (determined by &filettype), use the configuration under * for file types that are not individually set, and a value of 0 means that the plugin is only disabled for this type
    • Omit a field to use the default setting
    • Example:

let g:rainbow_conf = {
\   'guifgs': ['royalblue3', 'darkorange3', 'seagreen3', 'firebrick'],
\   'ctermfgs': ['lightblue', 'lightyellow', 'lightcyan', 'lightmagenta'],
\   'operators': '_,\|+\|-_',
\   'parentheses': ['start=/(/ end=/)/ fold', 'start=/\[/ end=/\]/ fold', 'start=/{/ end=/}/ fold'],
\   'separately': {
\       '*': {},
\       'tex': {
\           'parentheses': ['start=/(/ end=/)/', 'start=/\[/ end=/\]/'],
\       },
\       'css': 0,
\   }
\}

Copyright statement :This article refers to the [“rainbow official documentation”] . Commercial publication is strictly prohibited without the author’s permission, otherwise legal responsibility will be pursued. Please indicate the source when reprinting on the Internet, this is the minimum respect for the original creator! ! !

Leave a Comment

Your email address will not be published. Required fields are marked *