summaryrefslogtreecommitdiffstats
path: root/.vim/autoload
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2010-12-04 23:01:02 +0100
committerFlorian Pritz <bluewind@xssn.at>2010-12-04 23:01:02 +0100
commit70f0ef31d89e361cb7c37de9b1b73a829c41c9a4 (patch)
treece5b4a5c9c20732e28676c913bca97ef26669360 /.vim/autoload
parentaaeadcdc572d127939e239a93bec09fa1a7475a3 (diff)
downloaddotfiles-70f0ef31d89e361cb7c37de9b1b73a829c41c9a4.tar.gz
dotfiles-70f0ef31d89e361cb7c37de9b1b73a829c41c9a4.tar.xz
vim: add new plugins; add movement keymappings
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to '.vim/autoload')
-rw-r--r--.vim/autoload/rainbow_parenthsis.vim172
1 files changed, 172 insertions, 0 deletions
diff --git a/.vim/autoload/rainbow_parenthsis.vim b/.vim/autoload/rainbow_parenthsis.vim
new file mode 100644
index 0000000..ffbd4fe
--- /dev/null
+++ b/.vim/autoload/rainbow_parenthsis.vim
@@ -0,0 +1,172 @@
+"------------------------------------------------------------------------------
+" 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=/</ 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
+
+ " }}}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