diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..e62e683 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.png -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..07c4222 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*.orig +*.swp diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..de29a6b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "Wiki"] + path = Wiki + url = https://github.com/krischik/vim-rainbow.wiki.git diff --git a/Pictures/after.png b/Pictures/after.png new file mode 100644 index 0000000..3435d65 Binary files /dev/null and b/Pictures/after.png differ diff --git a/Pictures/autre.png b/Pictures/autre.png new file mode 100644 index 0000000..86e0cea Binary files /dev/null and b/Pictures/autre.png differ diff --git a/Pictures/before.png b/Pictures/before.png new file mode 100644 index 0000000..4d48b53 Binary files /dev/null and b/Pictures/before.png differ diff --git a/Pictures/charlietanksley.png b/Pictures/charlietanksley.png new file mode 100644 index 0000000..455f5b1 Binary files /dev/null and b/Pictures/charlietanksley.png differ diff --git a/Pictures/fixed.png b/Pictures/fixed.png new file mode 100644 index 0000000..f531546 Binary files /dev/null and b/Pictures/fixed.png differ diff --git a/Pictures/jwilkins.png b/Pictures/jwilkins.png new file mode 100644 index 0000000..2da8aaa Binary files /dev/null and b/Pictures/jwilkins.png differ diff --git a/Pictures/slve.png b/Pictures/slve.png new file mode 100644 index 0000000..4c4f58c Binary files /dev/null and b/Pictures/slve.png differ diff --git a/README b/README deleted file mode 100644 index 47f3b57..0000000 --- a/README +++ /dev/null @@ -1,6 +0,0 @@ -This is a mirror of http://www.vim.org/scripts/script.php?script_id=1561 - -Based on the original rainbow_parenthsis from john gilmore but enhanced for gui mode. - -Reports errors to: http://code.google.com/p/vim-scripts/issues/list -Discuss improvements on: http://groups.google.com/group/vim_scripts diff --git a/README.mediawiki b/README.mediawiki new file mode 100644 index 0000000..99bb251 --- /dev/null +++ b/README.mediawiki @@ -0,0 +1,92 @@ += Rainbow Parenthesis Bundle = + +This is a maintained mirror of http://www.vim.org/scripts/script.php?script_id=1561 + +== Description == + +This is a simple rainbow colour plug-in for those who want an simple light weight rainbow colour syntax plug-in that supports `(…)`, `[…]`, `{…}` and `<…>`. + +If you need something more powerful and configurable try [Rainbow Parentheses Improved](https://github.com/luochen1990). + +This is the original for http://www.vim.org/scripts/script.php?script_id=1561 + +Based on the original rainbow_parenthesis from john gilmore but enhanced for gui mode. + +== Installation == + +Install from https://github.com/krischik/vim-rainbow using dein (https://github.com/Shougo/dein.vim) or similar: + + call dein#begin('$HOME/vimfiles/bundles') + call dein#add('krischik/vim-rainbow') + call dein#end() + call dein#install() + +== References == + +{| +|+ Rainbow Parenthesis Bundle +|- +| Vim-Script || https://www.vim.org/scripts/script.php?script_id=1561 +|- +| Source || https://github.com/krischik/vim-rainbow +|- +| Wiki || https://github.com/krischik/vim-rainbow/wiki +|- +| Releases || https://github.com/krischik/vim-rainbow/releases +|- +| Issues || https://github.com/krischik/vim-rainbow/issues +|- +| Discussions || https://github.com/krischik/vim-rainbow/discussions +|} + +== Comments == + +=== slve improvements === + +My technique only worked up to 16 level. Which is isn't any good for languages +like lisp. slve fixed this with a recursive solution. Very need. + +==== before ==== + +[[File:Pictures/before.png|1060px]] + +==== after ==== + +===== dark ===== + +[[File:Pictures/after.png|1060px]] + +===== light ===== + +[[File::Pictures/slve.png|1060px]] + +=== autre improvements === + +This fork provides for a small fix to the plugin. It also customises the parenthesis colours for a dark background. + +[[File:Pictures/autre.png|1060px]] + +=== charlietanksley improvements === + +Fork of original. Forked primarily to remove the background colour on the syntax highlighting. + +[[File:Pictures/charlietanksley.png|1060px]] + +=== jwilkins improvements === + +Remove the background color in terminal mode. + +[[File:Pictures/jwilkins.png|1060px]] + +=== krischik improvements === + +* Fixed all the bugs and merged all the code. +* Vim got a little stricter on syntax highlights and some of slve tricks didn't work any more. I also added an option to choose between my colour set and those of the other contributors. +* Increased the levels before repeating back to 16. Slve repeated after 10. +* Switched the background colours around for better contrast between level 15 and level 0. + +[[File:Pictures/fixed.png|1060px]] + +/* vim: set textwidth=0 wrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab : */ +/* vim: set filetype=mediawiki fileencoding=utf8 fileformat=unix foldmethod=marker : */ +/* vim: set nospell spelllang=en_gb : */ diff --git a/Wiki b/Wiki new file mode 160000 index 0000000..f72e3a9 --- /dev/null +++ b/Wiki @@ -0,0 +1 @@ +Subproject commit f72e3a9f16bb04db006b4da231fe34e42f2ccf9a diff --git a/after/syntax/rainbow_parenthesis.vim b/after/syntax/rainbow_parenthesis.vim new file mode 100644 index 0000000..20dc92c --- /dev/null +++ b/after/syntax/rainbow_parenthesis.vim @@ -0,0 +1,23 @@ +"------------------------------------------------------------------------------ +" Description: Rainbow colours for parenthesis +" Copyright: Copyright (C) 2006 … 2022 Martin Krischik +" Maintainer: Martin Krischik +" John Gilmore +" Version: 5.4 +" History: 18.09.2022 MK add after syntax file +"------------------------------------------------------------------------------ +" This is a simple script. It extends the syntax highlighting to +" highlight each matching set of parenthesis in different colours, to make +" it visually obvious what matches which. +" +" Obviously, most useful when working with lisp or Ada. But it's also nice other +" times. +"------------------------------------------------------------------------------ + +autocmd Syntax * runtime plugin/RainbowParenthesis.vim + +"------------------------------------------------------------------------------ +" Vim is Charityware - see ":help license" or uganda.txt for licence details. +"------------------------------------------------------------------------------ +" vim: set nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab textwidth=0 : +" vim: set fileencoding=utf-8 filetype=vim foldmethod=marker spell spelllang=en_gb: diff --git a/autoload/rainbow_parenthesis.vim b/autoload/rainbow_parenthesis.vim new file mode 100644 index 0000000..f90eb13 --- /dev/null +++ b/autoload/rainbow_parenthesis.vim @@ -0,0 +1,298 @@ +"------------------------------------------------------------------------------ +" Description: Rainbow colours for parenthesis +" Copyright: Copyright (C) 2007 … 2022 Martin Krischik +" Maintainer: Martin Krischik (krischik@users.sourceforge.net) +" John Gilmore +" Luc Hermitte (hermitte@free.fr) +" slve (https://github.com/slve) +" Βασίλης (https://github.com/autre) +" Charlie Tanksley (charlie.tanksley@gmail.com) +" Jonathan Wilkins (https://github.com/jwilkins) +" Version: 5.4 +" History: 24.05.2006 MK Unified Headers +" 15.10.2006 MK Bram's suggestion for runtime integration +" 06.09.2007 LH Buffer friendly (can be used in different buffers), +" can be toggled +" 09.09.2007 MK Use on LH's suggestion but use autoload to +" impove memory consumtion and startup performance +" 09.10.2007 MK Now with round, square brackets, curly and angle +" brackets. +" 06.09.2022 SL Improve to handle more then 16 level aw well as +" reducing to 10 distinct level. +" 07.09.2022 MK Fix spelling mistake s/parenthsis/parenthesis/g +" 07.09.2022 MK Add support for multiple colour sets. +" 09.09.2022 MK Fixes for stricter VIM +" 10.09.2022 AU A dark colour scheme. +" 10.09.2022 AU simpler approach to the handling of +" rainbow_parenthesis#active +" 15.09.2022 CT colour scheme without background colour +" 17.09.2022 JW colour scheme without terminal background colour +" 18.09.2022 MK return to 16 highlight level as most colour +" schema are made for multiples of 4. +" Usage: copy to autoload directory. +"------------------------------------------------------------------------------ +" This is a simple script. It extends the syntax highlighting to +" highlight each matching set of parenthesis in different colours, to make +" it visually obvious what matches which. +" +" Obviously, most useful when working with lisp or Ada. But it's also nice other +" times. +"------------------------------------------------------------------------------ + +" Section: highlight {{{1 + +function rainbow_parenthesis#Activate () + if ! exists ('g:rainbow_parenthesis_color_set') + let g:rainbow_parenthesis_color_set="" + endif + + if g:rainbow_parenthesis_color_set == "slve" + if &bg == "dark" + highlight default hlLevel0 ctermfg=cyan guifg=greenyellow + highlight default hlLevel1 ctermfg=magenta guifg=green1 + highlight default hlLevel2 ctermfg=red guifg=springgreen1 + highlight default hlLevel3 ctermfg=yellow guifg=cyan1 + highlight default hlLevel4 ctermfg=green guifg=slateblue1 + highlight default hlLevel5 ctermfg=cyan guifg=magenta1 + highlight default hlLevel6 ctermfg=magenta guifg=purple1 + highlight default hlLevel7 ctermfg=red guifg=red1 + highlight default hlLevel8 ctermfg=yellow guifg=orange1 + highlight default hlLevel9 ctermfg=green guifg=yellow1 + highlight default hlLevel10 ctermfg=cyan guifg=greenyellow + highlight default hlLevel11 ctermfg=magenta guifg=green1 + highlight default hlLevel12 ctermfg=red guifg=springgreen1 + highlight default hlLevel13 ctermfg=yellow guifg=cyan1 + highlight default hlLevel14 ctermfg=green guifg=slateblue1 + highlight default hlLevel15 ctermfg=cyan guifg=magenta1 + else + highlight default hlLevel0 ctermfg=blue guifg=yellow3 + highlight default hlLevel1 ctermfg=darkmagenta guifg=olivedrab4 + highlight default hlLevel2 ctermfg=red guifg=green4 + highlight default hlLevel3 ctermfg=darkyellow guifg=paleturquoise3 + highlight default hlLevel4 ctermfg=darkgreen guifg=deepskyblue4 + highlight default hlLevel5 ctermfg=blue guifg=darkslateblue + highlight default hlLevel6 ctermfg=darkmagenta guifg=darkviolet + highlight default hlLevel7 ctermfg=red guifg=red3 + highlight default hlLevel8 ctermfg=darkyellow guifg=orangered3 + highlight default hlLevel9 ctermfg=darkgreen guifg=orange2 + highlight default hlLevel10 ctermfg=blue guifg=yellow3 + highlight default hlLevel11 ctermfg=darkmagenta guifg=olivedrab4 + highlight default hlLevel12 ctermfg=red guifg=green4 + highlight default hlLevel13 ctermfg=darkyellow guifg=paleturquoise3 + highlight default hlLevel14 ctermfg=darkgreen guifg=deepskyblue4 + highlight default hlLevel15 ctermfg=blue guifg=darkslateblue + endif + elseif g:rainbow_parenthesis_color_set == "autre" + highlight default hlLevel0 ctermfg=brown guifg=RoyalBlue3 + highlight default hlLevel1 ctermfg=Darkblue guifg=SeaGreen3 + highlight default hlLevel2 ctermfg=darkgray guifg=DarkOrchid3 + highlight default hlLevel3 ctermfg=darkgreen guifg=firebrick3 + highlight default hlLevel4 ctermfg=darkcyan guifg=RoyalBlue3 + highlight default hlLevel5 ctermfg=darkred guifg=SeaGreen3 + highlight default hlLevel6 ctermfg=darkmagenta guifg=DarkOrchid3 + highlight default hlLevel7 ctermfg=brown guifg=orange1 + highlight default hlLevel8 ctermfg=Darkblue guifg=yellow1 + highlight default hlLevel9 ctermfg=darkgray guifg=greenyellow + highlight default hlLevel10 ctermfg=darkgreen guifg=green1 + highlight default hlLevel11 ctermfg=darkcyan guifg=springgreen1 + highlight default hlLevel12 ctermfg=darkred guifg=cyan1 + highlight default hlLevel13 ctermfg=darkmagenta guifg=slateblue1 + highlight default hlLevel14 ctermfg=brown guifg=magenta1 + highlight default hlLevel15 ctermfg=gray guifg=purple1 + elseif g:rainbow_parenthesis_color_set == "charlietanksley" + highlight default hlLevel0 ctermfg=brown guifg=RoyalBlue3 + highlight default hlLevel1 ctermfg=Darkblue guifg=SeaGreen3 + highlight default hlLevel2 ctermfg=darkgray guifg=DarkOrchid3 + highlight default hlLevel3 ctermfg=darkgreen guifg=firebrick3 + highlight default hlLevel4 ctermfg=darkcyan guifg=RoyalBlue3 + highlight default hlLevel5 ctermfg=darkred guifg=SeaGreen3 + highlight default hlLevel6 ctermfg=darkmagenta guifg=DarkOrchid3 + highlight default hlLevel7 ctermfg=brown guifg=firebrick3 + highlight default hlLevel8 ctermfg=gray guifg=RoyalBlue3 + highlight default hlLevel9 ctermfg=black guifg=SeaGreen3 + highlight default hlLevel10 ctermfg=darkmagenta guifg=DarkOrchid3 + highlight default hlLevel11 ctermfg=Darkblue guifg=firebrick3 + highlight default hlLevel12 ctermfg=darkgreen guifg=RoyalBlue3 + highlight default hlLevel13 ctermfg=darkcyan guifg=SeaGreen3 + highlight default hlLevel14 ctermfg=darkred guifg=DarkOrchid3 + highlight default hlLevel15 ctermfg=red guifg=firebrick3 + elseif g:rainbow_parenthesis_color_set == "jwilkins" + highlight default hlLevel0 ctermfg=brown guibg=WhiteSmoke guifg=RoyalBlue3 + highlight default hlLevel1 ctermfg=Darkblue guibg=WhiteSmoke guifg=SeaGreen3 + highlight default hlLevel2 ctermfg=darkgray guibg=WhiteSmoke guifg=DarkOrchid3 + highlight default hlLevel3 ctermfg=darkgreen guibg=WhiteSmoke guifg=firebrick3 + highlight default hlLevel4 ctermfg=darkcyan guibg=AntiqueWhite guifg=RoyalBlue3 + highlight default hlLevel5 ctermfg=darkred guibg=AntiqueWhite guifg=SeaGreen3 + highlight default hlLevel6 ctermfg=darkmagenta guibg=AntiqueWhite guifg=DarkOrchid3 + highlight default hlLevel7 ctermfg=brown guibg=AntiqueWhite guifg=firebrick3 + highlight default hlLevel8 ctermfg=gray guibg=LemonChiffon guifg=RoyalBlue3 + highlight default hlLevel9 ctermfg=black guibg=LemonChiffon guifg=SeaGreen3 + highlight default hlLevel10 ctermfg=darkmagenta guibg=LemonChiffon guifg=DarkOrchid3 + highlight default hlLevel11 ctermfg=Darkblue guibg=LemonChiffon guifg=firebrick3 + highlight default hlLevel12 ctermfg=darkgreen guibg=AliceBlue guifg=RoyalBlue3 + highlight default hlLevel13 ctermfg=darkcyan guibg=AliceBlue guifg=SeaGreen3 + highlight default hlLevel14 ctermfg=darkred guibg=AliceBlue guifg=DarkOrchid3 + highlight default hlLevel15 ctermfg=red guibg=AliceBlue guifg=firebrick3 + else + highlight default hlLevel0 ctermbg=LightGray ctermfg=brown guibg=WhiteSmoke guifg=RoyalBlue3 + highlight default hlLevel1 ctermbg=LightGray ctermfg=Darkblue guibg=WhiteSmoke guifg=SeaGreen3 + highlight default hlLevel2 ctermbg=LightGray ctermfg=darkgray guibg=WhiteSmoke guifg=DarkOrchid3 + highlight default hlLevel3 ctermbg=LightGray ctermfg=darkgreen guibg=WhiteSmoke guifg=firebrick3 + highlight default hlLevel4 ctermbg=LightGray ctermfg=darkcyan guibg=AntiqueWhite guifg=RoyalBlue3 + highlight default hlLevel5 ctermbg=LightGray ctermfg=darkred guibg=AntiqueWhite guifg=SeaGreen3 + highlight default hlLevel6 ctermbg=LightGray ctermfg=darkmagenta guibg=AntiqueWhite guifg=DarkOrchid3 + highlight default hlLevel7 ctermbg=LightGray ctermfg=gray guibg=AntiqueWhite guifg=firebrick3 + highlight default hlLevel8 ctermbg=LightGray ctermfg=brown guibg=AliceBlue guifg=RoyalBlue3 + highlight default hlLevel9 ctermbg=LightGray ctermfg=Darkblue guibg=AliceBlue guifg=SeaGreen3 + highlight default hlLevel10 ctermbg=LightGray ctermfg=darkgray guibg=AliceBlue guifg=DarkOrchid3 + highlight default hlLevel11 ctermbg=LightGray ctermfg=darkgreen guibg=AliceBlue guifg=firebrick3 + highlight default hlLevel12 ctermbg=LightGray ctermfg=darkcyan guibg=LemonChiffon guifg=RoyalBlue3 + highlight default hlLevel13 ctermbg=LightGray ctermfg=darkred guibg=LemonChiffon guifg=SeaGreen3 + highlight default hlLevel14 ctermbg=LightGray ctermfg=darkmagenta guibg=LemonChiffon guifg=DarkOrchid3 + highlight default hlLevel15 ctermbg=LightGray ctermfg=gray guibg=LemonChiffon guifg=firebrick3 + endif + + syntax cluster rainbow_parenthesis contains=hlLevel0,hlLevel1,hlLevel2,hlLevel3,hlLevel4,hlLevel5,hlLevel6,hlLevel7,hlLevel8,hlLevel9 + + let rainbow_parenthesis#active = 1 +endfunction rainbow_parenthesis#Activate " }}} 1 + +function rainbow_parenthesis#Clear() + let i = 0 + while i != 16 + exe 'highlight clear hlLevel' . i + let i = i + 1 + endwhile + let rainbow_parenthesis#active = 0 +endfunction rainbow_parenthesis#Clear() + +function rainbow_parenthesis#Toggle () + if ! exists('rainbow_parenthesis#active') + call rainbow_parenthesis#LoadRound () + let rainbow_parenthesis#active = 0 + endif + if rainbow_parenthesis#active != 0 + call rainbow_parenthesis#Clear () + else + call rainbow_parenthesis#Activate () + endif +endfunction rainbow_parenthesis#Toggle + +function rainbow_parenthesis#All () + call rainbow_parenthesis#LoadRound () + call rainbow_parenthesis#LoadSquare () + call rainbow_parenthesis#LoadBraces () + call rainbow_parenthesis#LoadChevrons () + call rainbow_parenthesis#Activate () +endfunction rainbow_parenthesis#All + +" Section: syntax {{{1 +" +" Subsection: parentheses or round brackets: {{{2 +" +function rainbow_parenthesis#LoadRound () + syntax match ParenError display ')' + syntax region Paren0 transparent matchgroup=hlLevel0 start='(' end=')' contains=TOP containedin=TOP,Paren15 + syntax region Paren1 transparent matchgroup=hlLevel1 start='(' end=')' contains=TOP containedin=Paren0 contained + syntax region Paren2 transparent matchgroup=hlLevel2 start='(' end=')' contains=TOP containedin=Paren1 contained + syntax region Paren3 transparent matchgroup=hlLevel3 start='(' end=')' contains=TOP containedin=Paren2 contained + syntax region Paren4 transparent matchgroup=hlLevel4 start='(' end=')' contains=TOP containedin=Paren3 contained + syntax region Paren5 transparent matchgroup=hlLevel5 start='(' end=')' contains=TOP containedin=Paren4 contained + syntax region Paren6 transparent matchgroup=hlLevel6 start='(' end=')' contains=TOP containedin=Paren5 contained + syntax region Paren7 transparent matchgroup=hlLevel7 start='(' end=')' contains=TOP containedin=Paren6 contained + syntax region Paren8 transparent matchgroup=hlLevel8 start='(' end=')' contains=TOP containedin=Paren7 contained + syntax region Paren9 transparent matchgroup=hlLevel9 start='(' end=')' contains=TOP containedin=Paren8 contained + syntax region Paren10 transparent matchgroup=hlLevel10 start='(' end=')' contains=TOP containedin=Paren9 contained + syntax region Paren11 transparent matchgroup=hlLevel11 start='(' end=')' contains=TOP containedin=Paren10 contained + syntax region Paren12 transparent matchgroup=hlLevel12 start='(' end=')' contains=TOP containedin=Paren11 contained + syntax region Paren13 transparent matchgroup=hlLevel13 start='(' end=')' contains=TOP containedin=Paren12 contained + syntax region Paren14 transparent matchgroup=hlLevel14 start='(' end=')' contains=TOP containedin=Paren13 contained + syntax region Paren15 transparent matchgroup=hlLevel15 start='(' end=')' contains=TOP containedin=Paren14 contained + syntax cluster rainbow_parenthesis contains=hlLevel0,hlLevel1,hlLevel2,hlLevel3,hlLevel4,hlLevel5,hlLevel6,hlLevel7,hlLevel8,hlLevel9,hlLevel10,hlLevel11,hlLevel12,hlLevel13,hlLevel14,hlLevel15 + highlight link ParenError Error + let rainbow_parenthesis#active = 0 +endfunction rainbow_parenthesis#LoadRound " }}}2 + +" Subsection: box brackets or square brackets: {{{2 +" +function rainbow_parenthesis#LoadSquare () + syntax match ParenError display ']' + syntax region Paren0 transparent matchgroup=hlLevel0 start='\[' end=']' contains=TOP containedin=TOP,Paren15 + syntax region Paren1 transparent matchgroup=hlLevel1 start='\[' end=']' contains=TOP containedin=Paren0 contained + syntax region Paren2 transparent matchgroup=hlLevel2 start='\[' end=']' contains=TOP containedin=Paren1 contained + syntax region Paren3 transparent matchgroup=hlLevel3 start='\[' end=']' contains=TOP containedin=Paren2 contained + syntax region Paren4 transparent matchgroup=hlLevel4 start='\[' end=']' contains=TOP containedin=Paren3 contained + syntax region Paren5 transparent matchgroup=hlLevel5 start='\[' end=']' contains=TOP containedin=Paren4 contained + syntax region Paren6 transparent matchgroup=hlLevel6 start='\[' end=']' contains=TOP containedin=Paren5 contained + syntax region Paren7 transparent matchgroup=hlLevel7 start='\[' end=']' contains=TOP containedin=Paren6 contained + syntax region Paren8 transparent matchgroup=hlLevel8 start='\[' end=']' contains=TOP containedin=Paren7 contained + syntax region Paren9 transparent matchgroup=hlLevel9 start='\[' end=']' contains=TOP containedin=Paren8 contained + syntax region Paren10 transparent matchgroup=hlLevel10 start='\[' end=']' contains=TOP containedin=Paren9 contained + syntax region Paren11 transparent matchgroup=hlLevel11 start='\[' end=']' contains=TOP containedin=Paren10 contained + syntax region Paren12 transparent matchgroup=hlLevel12 start='\[' end=']' contains=TOP containedin=Paren11 contained + syntax region Paren13 transparent matchgroup=hlLevel13 start='\[' end=']' contains=TOP containedin=Paren12 contained + syntax region Paren14 transparent matchgroup=hlLevel14 start='\[' end=']' contains=TOP containedin=Paren13 contained + syntax region Paren15 transparent matchgroup=hlLevel15 start='\[' end=']' contains=TOP containedin=Paren14 contained + syntax cluster rainbow_parenthesis contains=hlLevel0,hlLevel1,hlLevel2,hlLevel3,hlLevel4,hlLevel5,hlLevel6,hlLevel7,hlLevel8,hlLevel9,hlLevel10,hlLevel11,hlLevel12,hlLevel13,hlLevel14,hlLevel15 + highlight link ParenError Error + let rainbow_parenthesis#active = 0 +endfunction rainbow_parenthesis#LoadSquare " }}}2 + +" Subsection: curly brackets or braces: {{{2 +" +function rainbow_parenthesis#LoadBraces () + syntax match ParenError display '}' + syntax region Paren0 transparent matchgroup=hlLevel0 start='{' end='}' contains=TOP containedin=TOP,Paren15 + syntax region Paren1 transparent matchgroup=hlLevel1 start='{' end='}' contains=TOP containedin=Paren0 contained + syntax region Paren2 transparent matchgroup=hlLevel2 start='{' end='}' contains=TOP containedin=Paren1 contained + syntax region Paren3 transparent matchgroup=hlLevel3 start='{' end='}' contains=TOP containedin=Paren2 contained + syntax region Paren4 transparent matchgroup=hlLevel4 start='{' end='}' contains=TOP containedin=Paren3 contained + syntax region Paren5 transparent matchgroup=hlLevel5 start='{' end='}' contains=TOP containedin=Paren4 contained + syntax region Paren6 transparent matchgroup=hlLevel6 start='{' end='}' contains=TOP containedin=Paren5 contained + syntax region Paren7 transparent matchgroup=hlLevel7 start='{' end='}' contains=TOP containedin=Paren6 contained + syntax region Paren8 transparent matchgroup=hlLevel8 start='{' end='}' contains=TOP containedin=Paren7 contained + syntax region Paren9 transparent matchgroup=hlLevel9 start='{' end='}' contains=TOP containedin=Paren8 contained + syntax region Paren10 transparent matchgroup=hlLevel10 start='{' end='}' contains=TOP containedin=Paren9 contained + syntax region Paren11 transparent matchgroup=hlLevel11 start='{' end='}' contains=TOP containedin=Paren10 contained + syntax region Paren12 transparent matchgroup=hlLevel12 start='{' end='}' contains=TOP containedin=Paren11 contained + syntax region Paren13 transparent matchgroup=hlLevel13 start='{' end='}' contains=TOP containedin=Paren12 contained + syntax region Paren14 transparent matchgroup=hlLevel14 start='{' end='}' contains=TOP containedin=Paren13 contained + syntax region Paren15 transparent matchgroup=hlLevel15 start='{' end='}' contains=TOP containedin=Paren14 contained + highlight link ParenError Error + syntax cluster rainbow_parenthesis contains=hlLevel0,hlLevel1,hlLevel2,hlLevel3,hlLevel4,hlLevel5,hlLevel6,hlLevel7,hlLevel8,hlLevel9,hlLevel10,hlLevel11,hlLevel12,hlLevel13,hlLevel14,hlLevel15 + let rainbow_parenthesis#active = 0 +endfunction rainbow_parenthesis#LoadBraces " }}}2 + +" Subsection: angle brackets or chevrons: {{{2 +" +function rainbow_parenthesis#LoadChevrons () + syntax match ParenError display '>' + syntax region Paren0 transparent matchgroup=hlLevel0 start='<' end='>' contains=TOP containedin=TOP,Paren15 + syntax region Paren1 transparent matchgroup=hlLevel1 start='<' end='>' contains=TOP containedin=Paren0 contained + syntax region Paren2 transparent matchgroup=hlLevel2 start='<' end='>' contains=TOP containedin=Paren1 contained + syntax region Paren3 transparent matchgroup=hlLevel3 start='<' end='>' contains=TOP containedin=Paren2 contained + syntax region Paren4 transparent matchgroup=hlLevel4 start='<' end='>' contains=TOP containedin=Paren3 contained + syntax region Paren5 transparent matchgroup=hlLevel5 start='<' end='>' contains=TOP containedin=Paren4 contained + syntax region Paren6 transparent matchgroup=hlLevel6 start='<' end='>' contains=TOP containedin=Paren5 contained + syntax region Paren7 transparent matchgroup=hlLevel7 start='<' end='>' contains=TOP containedin=Paren6 contained + syntax region Paren8 transparent matchgroup=hlLevel8 start='<' end='>' contains=TOP containedin=Paren7 contained + syntax region Paren9 transparent matchgroup=hlLevel9 start='<' end='>' contains=TOP containedin=Paren8 contained + syntax region Paren10 transparent matchgroup=hlLevel10 start='<' end='>' contains=TOP containedin=Paren9 contained + syntax region Paren11 transparent matchgroup=hlLevel11 start='<' end='>' contains=TOP containedin=Paren10 contained + syntax region Paren12 transparent matchgroup=hlLevel12 start='<' end='>' contains=TOP containedin=Paren11 contained + syntax region Paren13 transparent matchgroup=hlLevel13 start='<' end='>' contains=TOP containedin=Paren12 contained + syntax region Paren14 transparent matchgroup=hlLevel14 start='<' end='>' contains=TOP containedin=Paren13 contained + syntax region Paren15 transparent matchgroup=hlLevel15 start='<' end='>' contains=TOP containedin=Paren14 contained + syntax cluster rainbow_parenthesis contains=hlLevel0,hlLevel1,hlLevel2,hlLevel3,hlLevel4,hlLevel5,hlLevel6,hlLevel7,hlLevel8,hlLevel9 + highlight link ParenError Error + let rainbow_parenthesis#active = 0 +endfunction rainbow_parenthesis#LoadChevrons " }}}2 + +" }}}1 +finish + +"------------------------------------------------------------------------------ +" Vim is Charityware - see ":help license" or uganda.txt for licence details. +"------------------------------------------------------------------------------ +" vim: set nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab textwidth=0 : +" vim: set fileencoding=utf-8 filetype=vim foldmethod=marker spell spelllang=en_gb: diff --git a/autoload/rainbow_parenthsis.vim b/autoload/rainbow_parenthsis.vim deleted file mode 100644 index ffbd4fe..0000000 --- a/autoload/rainbow_parenthsis.vim +++ /dev/null @@ -1,172 +0,0 @@ -"------------------------------------------------------------------------------ -" Description: Rainbow colors for parenthsis -" $Id: rainbow_parenthsis.vim 50 2007-10-08 18:42:51Z krischik@users.sourceforge.net $ -" Copyright: Copyright (C) 2007 Martin Krischik -" Maintainer: Martin Krischik (krischik@users.sourceforge.net) -" John Gilmore -" Luc Hermitte (hermitte@free.fr) -" $Author: krischik@users.sourceforge.net $ -" $Date: 2007-10-08 20:42:51 +0200 (Mo, 08 Okt 2007) $ -" Version: 4.0 -" $Revision: 50 $ -" $HeadURL: https://vim-scripts.googlecode.com/svn/trunk/1561%20Rainbow%20Parenthsis%20Bundle/autoload/rainbow_parenthsis.vim $ -" History: 24.05.2006 MK Unified Headers -" 15.10.2006 MK Bram's suggestion for runtime integration -" 06.09.2007 LH Buffer friendly (can be used in different buffers), -" can be toggled -" 09.09.2007 MK Use on LH's suggestion but use autoload to -" impove memory consumtion and startup performance -" 09.10.2007 MK Now with round, square brackets, curly and angle -" brackets. -" Usage: copy to autoload directory. -"------------------------------------------------------------------------------ -" This is a simple script. It extends the syntax highlighting to -" highlight each matching set of parens in different colors, to make -" it visually obvious what matches which. -" -" Obviously, most useful when working with lisp or Ada. But it's also nice other -" times. -"------------------------------------------------------------------------------ - -" Section: highlight {{{1 - -function rainbow_parenthsis#Activate() - highlight default level1c ctermbg=LightGray ctermfg=brown guibg=WhiteSmoke guifg=RoyalBlue3 - highlight default level2c ctermbg=LightGray ctermfg=Darkblue guibg=WhiteSmoke guifg=SeaGreen3 - highlight default level3c ctermbg=LightGray ctermfg=darkgray guibg=WhiteSmoke guifg=DarkOrchid3 - highlight default level4c ctermbg=LightGray ctermfg=darkgreen guibg=WhiteSmoke guifg=firebrick3 - highlight default level5c ctermbg=LightGray ctermfg=darkcyan guibg=AntiqueWhite guifg=RoyalBlue3 - highlight default level6c ctermbg=LightGray ctermfg=darkred guibg=AntiqueWhite guifg=SeaGreen3 - highlight default level7c ctermbg=LightGray ctermfg=darkmagenta guibg=AntiqueWhite guifg=DarkOrchid3 - highlight default level8c ctermbg=LightGray ctermfg=brown guibg=AntiqueWhite guifg=firebrick3 - highlight default level9c ctermbg=LightGray ctermfg=gray guibg=LemonChiffon guifg=RoyalBlue3 - highlight default level10c ctermbg=LightGray ctermfg=black guibg=LemonChiffon guifg=SeaGreen3 - highlight default level11c ctermbg=LightGray ctermfg=darkmagenta guibg=LemonChiffon guifg=DarkOrchid3 - highlight default level12c ctermbg=LightGray ctermfg=Darkblue guibg=LemonChiffon guifg=firebrick3 - highlight default level13c ctermbg=LightGray ctermfg=darkgreen guibg=AliceBlue guifg=RoyalBlue3 - highlight default level14c ctermbg=LightGray ctermfg=darkcyan guibg=AliceBlue guifg=SeaGreen3 - highlight default level15c ctermbg=LightGray ctermfg=darkred guibg=AliceBlue guifg=DarkOrchid3 - highlight default level16c ctermbg=LightGray ctermfg=red guibg=AliceBlue guifg=firebrick3 - let rainbow_parenthesis#active = 1 -endfunction - -function rainbow_parenthsis#Clear() - let i = 0 - while i != 16 - let i = i + 1 - exe 'highlight clear level' . i . 'c' - endwhile - let rainbow_parenthesis#active = 0 -endfunction - -function rainbow_parenthsis#Toggle () - if ! exists('rainbow_parenthesis#active') - call rainbow_parenthsis#LoadRound () - endif - if rainbow_parenthesis#active != 0 - call rainbow_parenthsis#Clear () - else - call rainbow_parenthsis#Activate () - endif -endfunction - -" Section: syntax {{{1 -" -" Subsection: parentheses or round brackets: {{{2 -" -function rainbow_parenthsis#LoadRound () - syntax region level1 matchgroup=level1c start=/(/ end=/)/ contains=TOP,level1,level2,level3,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level2 matchgroup=level2c start=/(/ end=/)/ contains=TOP,level2,level3,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level3 matchgroup=level3c start=/(/ end=/)/ contains=TOP,level3,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level4 matchgroup=level4c start=/(/ end=/)/ contains=TOP,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level5 matchgroup=level5c start=/(/ end=/)/ contains=TOP,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level6 matchgroup=level6c start=/(/ end=/)/ contains=TOP,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level7 matchgroup=level7c start=/(/ end=/)/ contains=TOP,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level8 matchgroup=level8c start=/(/ end=/)/ contains=TOP,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level9 matchgroup=level9c start=/(/ end=/)/ contains=TOP,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level10 matchgroup=level10c start=/(/ end=/)/ contains=TOP,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level11 matchgroup=level11c start=/(/ end=/)/ contains=TOP,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level12 matchgroup=level12c start=/(/ end=/)/ contains=TOP,level12,level13,level14,level15, level16,NoInParens - syntax region level13 matchgroup=level13c start=/(/ end=/)/ contains=TOP,level13,level14,level15, level16,NoInParens - syntax region level14 matchgroup=level14c start=/(/ end=/)/ contains=TOP,level14,level15, level16,NoInParens - syntax region level15 matchgroup=level15c start=/(/ end=/)/ contains=TOP,level15, level16,NoInParens - syntax region level16 matchgroup=level16c start=/(/ end=/)/ contains=TOP,level16,NoInParens - let rainbow_parenthesis#active = 0 -endfunction - -" Subsection: box brackets or square brackets: {{{2 -" -function rainbow_parenthsis#LoadSquare () - syntax region level1 matchgroup=level1c start=/\[/ end=/\]/ contains=TOP,level1,level2,level3,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level2 matchgroup=level2c start=/\[/ end=/\]/ contains=TOP,level2,level3,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level3 matchgroup=level3c start=/\[/ end=/\]/ contains=TOP,level3,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level4 matchgroup=level4c start=/\[/ end=/\]/ contains=TOP,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level5 matchgroup=level5c start=/\[/ end=/\]/ contains=TOP,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level6 matchgroup=level6c start=/\[/ end=/\]/ contains=TOP,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level7 matchgroup=level7c start=/\[/ end=/\]/ contains=TOP,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level8 matchgroup=level8c start=/\[/ end=/\]/ contains=TOP,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level9 matchgroup=level9c start=/\[/ end=/\]/ contains=TOP,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level10 matchgroup=level10c start=/\[/ end=/\]/ contains=TOP,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level11 matchgroup=level11c start=/\[/ end=/\]/ contains=TOP,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level12 matchgroup=level12c start=/\[/ end=/\]/ contains=TOP,level12,level13,level14,level15, level16,NoInParens - syntax region level13 matchgroup=level13c start=/\[/ end=/\]/ contains=TOP,level13,level14,level15, level16,NoInParens - syntax region level14 matchgroup=level14c start=/\[/ end=/\]/ contains=TOP,level14,level15, level16,NoInParens - syntax region level15 matchgroup=level15c start=/\[/ end=/\]/ contains=TOP,level15, level16,NoInParens - syntax region level16 matchgroup=level16c start=/\[/ end=/\]/ contains=TOP,level16,NoInParens - let rainbow_parenthesis#active = 0 -endfunction - -" Subsection: curly brackets or braces: {{{2 -" -function rainbow_parenthsis#LoadBraces () - syntax region level1 matchgroup=level1c start=/{/ end=/}/ contains=TOP,level1,level2,level3,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level2 matchgroup=level2c start=/{/ end=/}/ contains=TOP,level2,level3,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level3 matchgroup=level3c start=/{/ end=/}/ contains=TOP,level3,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level4 matchgroup=level4c start=/{/ end=/}/ contains=TOP,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level5 matchgroup=level5c start=/{/ end=/}/ contains=TOP,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level6 matchgroup=level6c start=/{/ end=/}/ contains=TOP,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level7 matchgroup=level7c start=/{/ end=/}/ contains=TOP,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level8 matchgroup=level8c start=/{/ end=/}/ contains=TOP,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level9 matchgroup=level9c start=/{/ end=/}/ contains=TOP,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level10 matchgroup=level10c start=/{/ end=/}/ contains=TOP,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level11 matchgroup=level11c start=/{/ end=/}/ contains=TOP,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level12 matchgroup=level12c start=/{/ end=/}/ contains=TOP,level12,level13,level14,level15, level16,NoInParens - syntax region level13 matchgroup=level13c start=/{/ end=/}/ contains=TOP,level13,level14,level15, level16,NoInParens - syntax region level14 matchgroup=level14c start=/{/ end=/}/ contains=TOP,level14,level15, level16,NoInParens - syntax region level15 matchgroup=level15c start=/{/ end=/}/ contains=TOP,level15, level16,NoInParens - syntax region level16 matchgroup=level16c start=/{/ end=/}/ contains=TOP,level16,NoInParens - let rainbow_parenthesis#active = 0 -endfunction - -" Subsection: angle brackets or chevrons: {{{2 -" -function rainbow_parenthsis#LoadChevrons () - syntax region level1 matchgroup=level1c start=// contains=TOP,level1,level2,level3,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level2 matchgroup=level2c start=// contains=TOP,level2,level3,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level3 matchgroup=level3c start=// contains=TOP,level3,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level4 matchgroup=level4c start=// contains=TOP,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level5 matchgroup=level5c start=// contains=TOP,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level6 matchgroup=level6c start=// contains=TOP,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level7 matchgroup=level7c start=// contains=TOP,level7,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level8 matchgroup=level8c start=// contains=TOP,level8,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level9 matchgroup=level9c start=// contains=TOP,level9,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level10 matchgroup=level10c start=// contains=TOP,level10,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level11 matchgroup=level11c start=// contains=TOP,level11,level12,level13,level14,level15, level16,NoInParens - syntax region level12 matchgroup=level12c start=// contains=TOP,level12,level13,level14,level15, level16,NoInParens - syntax region level13 matchgroup=level13c start=// contains=TOP,level13,level14,level15, level16,NoInParens - syntax region level14 matchgroup=level14c start=// contains=TOP,level14,level15, level16,NoInParens - syntax region level15 matchgroup=level15c start=// contains=TOP,level15, level16,NoInParens - syntax region level16 matchgroup=level16c start=// contains=TOP,level16,NoInParens - let rainbow_parenthesis#active = 0 -endfunction - - " }}}1 -finish - -"------------------------------------------------------------------------------ -" Copyright (C) 2006 Martin Krischik -" -" Vim is Charityware - see ":help license" or uganda.txt for licence details. -"------------------------------------------------------------------------------ -" vim: textwidth=78 wrap tabstop=8 shiftwidth=4 softtabstop=4 expandtab -" vim: filetype=vim foldmethod=marker diff --git a/doc/rainbow_parenthesis.txt b/doc/rainbow_parenthesis.txt new file mode 100644 index 0000000..4b7b777 --- /dev/null +++ b/doc/rainbow_parenthesis.txt @@ -0,0 +1,107 @@ +*rainbow_parenthesis.txt* Colorize Parenthesis + +Author: Martin Krischik (krischik@users.sourceforge.net) + John Gilmore + Luc Hermitte (hermitte@free.fr) + slve (https://github.com/slve) + Βασίλης (https://github.com/autre) + Charlie Tanksley (charlie.tanksley@gmail.com) + Jonathan Wilkins (https://github.com/jwilkins) + +For Vim version 7.0 and above +Last change: 10 Sep, 2022 + +1. Overview |rainbow_parenthesis-about| +2. Commands |rainbow_parenthesis-commands| +2. Functions |rainbow_parenthesis-functions| +3. Configuration |rainbow_parenthesis-configure| + +============================================================================== + *rainbow_parenthesis-about* +1. Overview~ + +rainbow_parenthesis allows you to view the contents of a file in real time. +When a change in the file is detected, the window displaying the file is +updated and repositioned to the last line. + +The update is not exactly real time, but usually updates within a few seconds +of the file change. The update interval of the output is determined by the +|updatetime| parameter, along with continued usage of Vim. This means that if +you are not doing any editing or motion commands, the preview window will not +be updated. See |CursorHold| for more information. + +Because this window becomes the preview window, it will accept all related +commands. For more information, see |preview-window|. + +============================================================================== + *rainbow_parenthesis-commands* +2. Commands~ + +The rainbow_parenthesis plugin does not create any automatic mappings, but +provides the following commands: + + *:ToggleRainbowParenthesis* +|:ToggleRainbowParenthesis| + Manually start rainbow parenthesis.. If no bracket type has been loaded + yet then round brackets will be loaded by default. + +============================================================================== + *rainbow_parenthesis-functions* +2. Functions~ + +|rainbow_parenthesis#Activate()| *rainbow_parenthesis#Activate()* + Activate the loaded parenthesis + +|rainbow_parenthesis#Clear()| *rainbow_parenthesis#Clear()* + Deactivate rainbow parenthesis + +|rainbow_parenthesis#Toggle()| *rainbow_parenthesis#Toggle()* + Toggles rainbow parenthesis status. If no bracket type has been loaded + yet then round brackets will be loaded. + +|rainbow_parenthesis#LoadRound()| *rainbow_parenthesis#LoadRound()* + Load syntax for parenthesis or round brackets '(' ')' - This will be + loaded by default if nothing else has been loaded. + +|rainbow_parenthesis#LoadSquare()| *rainbow_parenthesis#LoadSquare()* + Load syntax for box brackets or square brackets '[' ']' + +|rainbow_parenthesis#LoadBraces()| *rainbow_parenthesis#LoadBraces()* + Load syntax for curly brackets or braces '{' '}' + +|rainbow_parenthesis#LoadChevrons()| *rainbow_parenthesis#LoadChevrons()* + Load syntax for angle brackets or chevrons '<' '>' + +============================================================================== +3. Options ~ + *rainbow-parenthesis-options* + + *g:rainbow_parenthesis_color_set* +g:rainbow_parenthesis_color_set enum ('krischik', 'slve' …) + + Used to change the colour sets. The sets are named after the git + handle of the respective maintainer. + + Available are: 'krischik', 'slve' + + The default set is 'krischik'. The 'slve' set has a dark and light + variant. + +============================================================================== + *rainbow_parenthesis-configure* +4. Configuration~ + +The best way to use rainbow_parenthesis is to add it to syntax plug-in of any +file type used: +> + >if exists("g:btm_rainbow_color") && g:btm_rainbow_color + > call rainbow_parenthesis#LoadSquare () + > call rainbow_parenthesis#LoadRound () + > call rainbow_parenthesis#Activate () + >endif + +This way you don't need to load all options available but only those which +are of importance to the actual file types. + +============================================================================== +vim:textwidth=78:tabstop=8:noexpandtab:filetype=help spell spelllang=en_gb diff --git a/doc/rainbow_parenthsis.txt b/doc/rainbow_parenthsis.txt deleted file mode 100644 index c8f15ec..0000000 --- a/doc/rainbow_parenthsis.txt +++ /dev/null @@ -1,88 +0,0 @@ -*rainbow_parenthsis.txt* Colorize Parenthsis - -Author: Martin Krischik (krischik@users.sourceforge.net) - John Gilmore - Luc Hermitte (hermitte@free.fr) - -For Vim version 7.0 and above -Last change: 09 Oct, 2007 - -1. Overview |rainbow_parenthsis-about| -2. Commands |rainbow_parenthsis-commands| -2. Functions |rainbow_parenthsis-functions| -3. Configuration |rainbow_parenthsis-configure| - -============================================================================== - *rainbow_parenthsis-about* -1. Overview~ - -rainbow_parenthsis allows you to view the contents of a file in real time. When a -change in the file is detected, the window displaying the file is updated and -repositioned to the last line. - -The update is not exactly real time, but usually updates within a few seconds -of the file change. The update interval of the output is determined by the -|updatetime| parameter, along with continued usage of Vim. This means that if -you are not doing any editing or motion commands, the preview window will not -be updated. See |CursorHold| for more information. - -Because this window becomes the preview window, it will accept all related -commands. For more information, see |preview-window|. - -============================================================================== - *rainbow_parenthsis-commands* -2. Commands~ - -The rainbow_parenthsis plugin does not create any automatic mappings, but provides the -following commands: - - *:ToggleRaibowParenthesis* -|:ToggleRaibowParenthesis| - Manualy start rainbow parenthesis.. If no bracket type has been loaded - yet then round brackets will be loaded by default. - -============================================================================== - *rainbow_parenthsis-functions* -2. Functions~ - -|rainbow_parenthsis#Activate()| *rainbow_parenthsis#Activate()* - Acticate the loaded parenthsis - -|rainbow_parenthsis#Clear()| *rainbow_parenthsis#Clear()* - Deactivate rainbow parenthesis - -|rainbow_parenthsis#Toggle()| *rainbow_parenthsis#Toggle()* - Toogles rainbow parenthesis status. If no bracket type has been loaded - yet then round brackets will be loaded. - -|rainbow_parenthsis#LoadRound()| *rainbow_parenthsis#LoadRound()* - Load syntax for parenthesis or round brackets '(' ')' - This will be - loaded by default if nothing else has been loaded. - -|rainbow_parenthsis#LoadSquare()| *rainbow_parenthsis#LoadSquare()* - Load syntax for box brackets or square brackets '[' ']' - -|rainbow_parenthsis#LoadBraces()| *rainbow_parenthsis#LoadBraces()* - Load syntax for curly brackets or braces '{' '}' - -|rainbow_parenthsis#LoadChevrons()| *rainbow_parenthsis#LoadChevrons()* - Load syntax for angle brackets or chevrons '<' '>' - -============================================================================== - *rainbow_parenthsis-configure* -3. Configuration~ - -The best way to use rainbow_parenthsis is to add it to sytax plugin of any -filetype used: -> - >if exists("g:btm_rainbow_color") && g:btm_rainbow_color - > call rainbow_parenthsis#LoadSquare () - > call rainbow_parenthsis#LoadRound () - > call rainbow_parenthsis#Activate () - >endif -> -This way you don't need to load all options available but only those which -are of importance to the actual filetype. - -============================================================================== -vim:textwidth=78:tabstop=8:noexpandtab:filetype=help diff --git a/plugin/rainbow_parenthesis.vim b/plugin/rainbow_parenthesis.vim new file mode 100644 index 0000000..dfd18f1 --- /dev/null +++ b/plugin/rainbow_parenthesis.vim @@ -0,0 +1,47 @@ +"------------------------------------------------------------------------------ +" Description: Rainbow colours for parenthesis +" Copyright: Copyright (C) 2006 … 2022 Martin Krischik +" Maintainer: Martin Krischik +" John Gilmore +" Version: 5.4 +" History: 24.05.2006 MK Unified Headers +" 15.10.2006 MK Bram's suggestion for runtime integration +" 06.09.2007 LH Buffer friendly (can be used in different buffers), +" can be toggled +" 09.09.2007 MK Use on LH's suggestion but use autoload to +" improve memory consumption and startup performance +" 09.10.2007 MK Now with round, square brackets, curly and angle +" brackets. +" 07.09.2022 MK Fix spelling mistake s/parenthsis/parenthesis/g +" 07.09.2022 MK Add commands for all functions +" 09.09.2022 MK Fixes for stricter VIM +" 18.09.2022 MK Option to add all commands +" Usage: copy to plugin directory. +"------------------------------------------------------------------------------ +" This is a simple script. It extends the syntax highlighting to +" highlight each matching set of parenthesis in different colours, to make +" it visually obvious what matches which. +" +" Obviously, most useful when working with lisp or Ada. But it's also nice other +" times. +"------------------------------------------------------------------------------ + +command! -nargs=0 ToggleRainbowParenthesis call rainbow_parenthesis#Toggle () + +if exists ('g:rainbow_parenthesis_commands') + command! -nargs=0 RainbowParenthesisActivate call rainbow_parenthesis#Activate () + command! -nargs=0 RainbowParenthesisAll call rainbow_parenthesis#All () + command! -nargs=0 RainbowParenthesisClear call rainbow_parenthesis#Clear () + command! -nargs=0 RainbowParenthesisLoadBraces call rainbow_parenthesis#LoadBraces () + command! -nargs=0 RainbowParenthesisLoadChevrons call rainbow_parenthesis#LoadChevrons () + command! -nargs=0 RainbowParenthesisLoadRound call rainbow_parenthesis#LoadRound () + command! -nargs=0 RainbowParenthesisLoadSquare call rainbow_parenthesis#LoadSquare () +endif + +finish + +"------------------------------------------------------------------------------ +" Vim is Charityware - see ":help license" or uganda.txt for licence details. +"------------------------------------------------------------------------------ +" vim: set nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab textwidth=0 : +" vim: set fileencoding=utf-8 filetype=vim foldmethod=marker spell spelllang=en_gb: diff --git a/plugin/rainbow_parenthsis.vim b/plugin/rainbow_parenthsis.vim deleted file mode 100644 index e5e3806..0000000 --- a/plugin/rainbow_parenthsis.vim +++ /dev/null @@ -1,40 +0,0 @@ -"------------------------------------------------------------------------------ -" Description: Rainbow colors for parenthsis -" $Id: rainbow_parenthsis.vim 29 2007-09-24 11:40:36Z krischik@users.sourceforge.net $ -" Copyright: Copyright (C) 2006 Martin Krischik -" Maintainer: Martin Krischik -" John Gilmore -" $Author: krischik@users.sourceforge.net $ -" $Date: 2007-09-24 13:40:36 +0200 (Mo, 24 Sep 2007) $ -" Version: 4.0 -" $Revision: 29 $ -" $HeadURL: https://vim-scripts.googlecode.com/svn/trunk/1561%20Rainbow%20Parenthsis%20Bundle/plugin/rainbow_parenthsis.vim $ -" History: 24.05.2006 MK Unified Headers -" 15.10.2006 MK Bram's suggestion for runtime integration -" 06.09.2007 LH Buffer friendly (can be used in different buffers), -" can be toggled -" 09.09.2007 MK Use on LH's suggestion but use autoload to -" impove memory consumtion and startup performance -" 09.10.2007 MK Now with round, square brackets, curly and angle -" brackets. -" Usage: copy to plugin directory. -"------------------------------------------------------------------------------ -" This is a simple script. It extends the syntax highlighting to -" highlight each matching set of parens in different colors, to make -" it visually obvious what matches which. -" -" Obviously, most useful when working with lisp or Ada. But it's also nice other -" times. -"------------------------------------------------------------------------------ - -command! -nargs=0 ToggleRaibowParenthesis call rainbow_parenthsis#Toggle() - -finish - -"------------------------------------------------------------------------------ -" Copyright (C) 2006 Martin Krischik -" -" Vim is Charityware - see ":help license" or uganda.txt for licence details. -"------------------------------------------------------------------------------ -" vim: textwidth=78 wrap tabstop=8 shiftwidth=4 softtabstop=4 expandtab -" vim: filetype=vim foldmethod=marker diff --git a/rainbow_parenthesis_options.vim b/rainbow_parenthesis_options.vim new file mode 100644 index 0000000..7538d5c --- /dev/null +++ b/rainbow_parenthesis_options.vim @@ -0,0 +1,64 @@ +"------------------------------------------------------------------------------ +" Description: Options settable by the rainbow_parenthesis plug-in +" Copyright: Copyright (C) 2006 … 2022 Martin Krischik +" Maintainer: Martin Krischik (krischik@users.sourceforge.net) +" Version: 5.4 +" History: 17.11.2006 MK rainbow_parenthesis_Options +" 01.01.2007 MK Bug fixing +" 09.10.2007 MK Now with round, square brackets, curly and angle +" brackets. +" 06.09.2022 MK Add colour sce +" 07.09.2022 MK Fix spelling mistake s/parenthesis/parenthesis/g +" 09.09.2022 MK Fixes for stricter VIM +" 18.09.2022 MK update quick installation +" Usage: copy content into your .vimrc and change options to your +" liking. +" Help Page: rainbow_parenthesis.txt +"------------------------------------------------------------------------------ + +echoerr 'It is suggested to copy the content of ada_options into .vimrc!' +finish " 1}}} + +" Section: rainbow_parenthesis options {{{1 + + let g:rainbow_parenthesis_color_set = "krischik" + let g:rainbow_parenthesis_commands = "1" +" }}}1 + +" Section: Vimball options {{{1 +:set noexpandtab fileformat=unix encoding=utf-8 +:31,34 MkVimball rainbow_parenthesis-4.0.vba + +autoload/rainbow_parenthesis.vim +doc/rainbow_parenthesis.txt +plugin/rainbow_parenthesis.vim +rainbow_parenthesis_options.vim + +" }}}1 + +" Section: Tar options {{{1 + +tar --create --bzip2 \ + --file="rainbow_parenthesis-4.0.tar.bz2" \ + rainbow_parenthesis_options.vim \ + doc/rainbow_parenthesis.txt \ + autoload/rainbow_parenthesis.vim \ + plugin/rainbow_parenthesis.vim ; + +" }}}1 + +" Section: Quick Installation {{{1 + +gcp --verbose --update after/syntax/rainbow_parenthesis.vim ~/vimfiles/bundles/.cache/.vimrc/.dein/after/syntax/rainbow_parenthesis.vim +gcp --verbose --update autoload/rainbow_parenthesis.vim ~/vimfiles/bundles/.cache/.vimrc/.dein/autoload/rainbow_parenthesis.vim +gcp --verbose --update doc/rainbow_parenthesis.txt ~/vimfiles/bundles/.cache/.vimrc/.dein/doc/rainbow_parenthesis.txt +gcp --verbose --update plugin/rainbow_parenthesis.vim ~/vimfiles/bundles/.cache/.vimrc/.dein/plugin/rainbow_parenthesis.vim +gcp --verbose --update rainbow_parenthesis_options.vim ~/vimfiles/bundles/.cache/.vimrc/.dein/rainbow_parenthesis_options.vim + +" }}}1 + +"------------------------------------------------------------------------------ +" Vim is Charityware - see ":help license" or uganda.txt for licence. +"------------------------------------------------------------------------------ +" vim: set nowrap tabstop=8 shiftwidth=4 softtabstop=4 noexpandtab textwidth=0 : +" vim: set fileencoding=utf-8 filetype=vim foldmethod=marker spell spelllang=en_gb: diff --git a/rainbow_parenthsis_options.vim b/rainbow_parenthsis_options.vim deleted file mode 100644 index a36a9ad..0000000 --- a/rainbow_parenthsis_options.vim +++ /dev/null @@ -1,55 +0,0 @@ -"------------------------------------------------------------------------------ -" Description: Options setable by the rainbow_parenthsis plugin -" $Id: rainbow_parenthsis_options.vim 29 2007-09-24 11:40:36Z krischik@users.sourceforge.net $ -" Copyright: Copyright (C) 2006 Martin Krischik -" Maintainer: Martin Krischik (krischik@users.sourceforge.net) -" $Author: krischik@users.sourceforge.net $ -" $Date: 2007-09-24 13:40:36 +0200 (Mo, 24 Sep 2007) $ -" Version: 4.0 -" $Revision: 29 $ -" $HeadURL: https://vim-scripts.googlecode.com/svn/trunk/1561%20Rainbow%20Parenthsis%20Bundle/rainbow_parenthsis_options.vim $ -" History: 17.11.2006 MK rainbow_parenthsis_Options -" 01.01.2007 MK Bug fixing -" 09.10.2007 MK Now with round, square brackets, curly and angle -" brackets. -" Usage: copy content into your .vimrc and change options to your -" likeing. -" Help Page: rainbow_parenthsis.txt -"------------------------------------------------------------------------------ - -echoerr 'It is suggested to copy the content of ada_options into .vimrc!' -finish " 1}}} - -" Section: rainbow_parenthsis options {{{1 - -" }}}1 - -" Section: Vimball options {{{1 -:set noexpandtab fileformat=unix encoding=utf-8 -:31,34 MkVimball rainbow_parenthsis-4.0.vba - -autoload/rainbow_parenthsis.vim -doc/rainbow_parenthsis.txt -plugin/rainbow_parenthsis.vim -rainbow_parenthsis_options.vim - -" }}}1 - -" Section: Tar options {{{1 - -tar --create --bzip2 \ - --file="rainbow_parenthsis-4.0.tar.bz2" \ - rainbow_parenthsis_options.vim \ - doc/rainbow_parenthsis.txt \ - autoload/rainbow_parenthsis.vim \ - plugin/rainbow_parenthsis.vim ; - -" }}}1 - -"------------------------------------------------------------------------------ -" Copyright (C) 2006 Martin Krischik -" -" Vim is Charityware - see ":help license" or uganda.txt for licence derainbow_parenthsiss. -"------------------------------------------------------------------------------ -" vim: textwidth=0 nowrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab -" vim: foldmethod=marker