# HG changeset patch # User Steve Losh # Date 1280493898 14400 # Node ID c591465563dbbc426278930780b96fc45e07b660 # Parent 45b16bbe73c29ac1353e480608c0dbb780c06ab8 vim: lots diff -r 45b16bbe73c2 -r c591465563db vim/.vimrc --- a/vim/.vimrc Tue Jul 27 11:06:14 2010 -0400 +++ b/vim/.vimrc Fri Jul 30 08:44:58 2010 -0400 @@ -54,6 +54,8 @@ set gdefault map :let @/='' runtime macros/matchit.vim +nnoremap % +vnoremap % " Soft/hard wrapping set wrap @@ -125,8 +127,9 @@ au BufNewFile,BufRead *.less set filetype=less au BufNewFile,BufRead *.m*down set filetype=markdown -au BufNewFile,BufRead *.m*down map h1 yypVr= -au BufNewFile,BufRead *.m*down map h2 yypVr- +au BufNewFile,BufRead *.m*down nnoremap 1 yypVr= +au BufNewFile,BufRead *.m*down nnoremap 2 yypVr- +au BufNewFile,BufRead *.m*down nnoremap 3 I### " Sort CSS map S ?{jV/^\s*\}\=$k:sort:let @/='' @@ -193,7 +196,10 @@ inoremap " Scratch -nmap :Sscratchx:resize 15 +nmap :Sscratchx:resize 15 " Diff nmap d :!hg diff % + +" Rainbows! +nmap R :RainbowParenthesesToggle diff -r 45b16bbe73c2 -r c591465563db vim/after/syntax/python.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/after/syntax/python.vim Fri Jul 30 08:44:58 2010 -0400 @@ -0,0 +1,4 @@ +RainbowParenthesesLoadSquare +RainbowParenthesesLoadBraces +RainbowParenthesesLoadRound + diff -r 45b16bbe73c2 -r c591465563db vim/bundle/rainbow/autoload/rainbow_parentheses.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/bundle/rainbow/autoload/rainbow_parentheses.vim Fri Jul 30 08:44:58 2010 -0400 @@ -0,0 +1,169 @@ +"------------------------------------------------------------------------------ +" Description: Rainbow colors for parentheses +" Copyright: Copyright (C) 2007 Martin Krischik +" Maintainer: Martin Krischik (krischik@users.sourceforge.net) +" John Gilmore +" Luc Hermitte (hermitte@free.fr) +" Version: 4.0 +" 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_parentheses#Activate() + highlight default level1c guifg=ivory1 + highlight default level2c guifg=yellow " Yellow + highlight default level3c guifg=MediumOrchid1 " Purple + highlight default level4c guifg=SpringGreen1 " Green + highlight default level5c guifg=LightGoldenRod1 " Tan + highlight default level6c guifg=firebrick1 " Red + highlight default level7c guifg=turquoise1 " Cyan + highlight default level8c guifg=grey50 + highlight default level9c guifg=grey70 + highlight default level10c guifg=turquoise1 + highlight default level11c guifg=firebrick1 + highlight default level12c guifg=LightGoldenRod1 + highlight default level13c guifg=SpringGreen1 + highlight default level14c guifg=pink1 + highlight default level15c guifg=yellow + highlight default level16c guifg=ivory1 + let s:rainbow_parenthesis_active = 1 +endfunction + +function rainbow_parentheses#Clear() + let i = 0 + while i != 16 + let i = i + 1 + exe 'highlight clear level' . i . 'c' + endwhile + let s:rainbow_parenthesis_active = 0 +endfunction + +function rainbow_parentheses#Toggle () + if ! exists('rainbow_parenthesis_active') + call rainbow_parentheses#LoadRound () + endif + if s:rainbow_parenthesis_active != 0 + call rainbow_parentheses#Clear () + else + call rainbow_parentheses#Activate () + endif +endfunction + +" Section: syntax {{{1 +" +syntax cluster rainbow_parentheses contains=@TOP,level1,level2,level3,level4,level5,level6,level7,level8,level9,level10,level11,level12,level13,level14,level15,level16,NoInParens + +" Subsection: parentheses or round brackets: {{{2 +" +function rainbow_parentheses#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 s:rainbow_parenthesis_active = 0 +endfunction + +" Subsection: box brackets or square brackets: {{{2 +" +function rainbow_parentheses#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 s:rainbow_parenthesis_active = 0 +endfunction + +" Subsection: curly brackets or braces: {{{2 +" +function rainbow_parentheses#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 s:rainbow_parenthesis_active = 0 +endfunction + +" Subsection: angle brackets or chevrons: {{{2 +" +function rainbow_parentheses#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 s: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 -r 45b16bbe73c2 -r c591465563db vim/bundle/rainbow/doc/rainbow_parentheses.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/bundle/rainbow/doc/rainbow_parentheses.txt Fri Jul 30 08:44:58 2010 -0400 @@ -0,0 +1,88 @@ +*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 -r 45b16bbe73c2 -r c591465563db vim/bundle/rainbow/plugin/rainbow_parentheses.vim --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/vim/bundle/rainbow/plugin/rainbow_parentheses.vim Fri Jul 30 08:44:58 2010 -0400 @@ -0,0 +1,44 @@ +"------------------------------------------------------------------------------ +" Description: Rainbow colors for parenthsis +" $Id: rainbow_parenthsis.vim 51 2007-10-09 18:43:58Z krischik@users.sourceforge.net $ +" Copyright: Copyright (C) 2006 Martin Krischik +" Maintainer: Martin Krischik +" John Gilmore +" $Author: krischik@users.sourceforge.net $ +" $Date: 2007-10-09 14:43:58 -0400 (Tue, 09 Oct 2007) $ +" Version: 4.0 +" $Revision: 51 $ +" $HeadURL: http://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 RainbowParenthesesToggle call rainbow_parentheses#Toggle() +command! -nargs=0 RainbowParenthesesLoadSquare call rainbow_parentheses#LoadSquare() +command! -nargs=0 RainbowParenthesesLoadRound call rainbow_parentheses#LoadRound() +command! -nargs=0 RainbowParenthesesLoadBraces call rainbow_parentheses#LoadBraces() +command! -nargs=0 RainbowParenthesesLoadChevrons call rainbow_parentheses#Chevrons() + +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 -r 45b16bbe73c2 -r c591465563db zsh/misc.zsh --- a/zsh/misc.zsh Tue Jul 27 11:06:14 2010 -0400 +++ b/zsh/misc.zsh Fri Jul 30 08:44:58 2010 -0400 @@ -22,6 +22,7 @@ background-color: #f5f5f5; font: normal 16px Menlo; padding: 8px 10px; + overflow-x: scroll; }