Imported my .vim dir
authorTomas Zeman <tzeman@volny.cz>
Tue, 03 May 2011 08:57:01 +0200
changeset 10 ca6892f0a9e8
parent 9 ebfb86eb9718
child 11 65ed0da35633
Imported my .vim dir
config/.vim/.VimballRecord
config/.vim/autoload/DrawIt.vim
config/.vim/autoload/textformat.vim
config/.vim/doc/DrawIt.txt
config/.vim/doc/bufexplorer.txt
config/.vim/doc/project.txt
config/.vim/doc/tags
config/.vim/doc/textformat.txt
config/.vim/ftdetect/scala.vim
config/.vim/indent/scala.vim
config/.vim/plugin/31-create-scala.vim
config/.vim/plugin/DrawItPlugin.vim
config/.vim/plugin/bufexplorer.vim
config/.vim/plugin/cecutil.vim
config/.vim/plugin/project.vim
config/.vim/plugin/textformat.vim
config/.vim/syntax/scala.vim
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/.vim/.VimballRecord	Tue May 03 08:57:01 2011 +0200
@@ -0,0 +1,2 @@
+DrawIt.vba: call delete('/home/tomas/.vim/plugin/DrawItPlugin.vim')|call delete('/home/tomas/.vim/plugin/cecutil.vim')|call delete('/home/tomas/.vim/autoload/DrawIt.vim')|call delete('/home/tomas/.vim/doc/DrawIt.txt')
+textformat.vba: call delete('/home/tomas/.vim/autoload/textformat.vim')|call delete('/home/tomas/.vim/doc/textformat.txt')|call delete('/home/tomas/.vim/plugin/textformat.vim')
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/.vim/autoload/DrawIt.vim	Tue May 03 08:57:01 2011 +0200
@@ -0,0 +1,1659 @@
+" DrawIt.vim: a simple way to draw things in Vim -- just put this file in
+"
+" Maintainer:	Charles E. Campbell, Jr.  (Charles.E.Campbell.1@gsfc.nasa.gov)
+" Authors:	Charles E. Campbell, Jr. (NdrchipO@ScampbellPfamily.AbizM - NOSPAM)
+"   		Sylvain Viart (molo@multimania.com)
+" Version:	8
+" Date:		Jul 26, 2007
+"
+" Quick Setup: {{{1
+"              tar -oxvf DrawIt.tar
+"              Should put DrawItPlugin.vim in your .vim/plugin directory,
+"                     put DrawIt.vim       in your .vim/autoload directory
+"                     put DrawIt.txt       in your .vim/doc directory.
+"             Then, use \di to start DrawIt,
+"                       \ds to stop  Drawit, and
+"                       draw by simply moving about using the cursor keys.
+"
+"             You may also use visual-block mode to select endpoints and
+"             draw lines, arrows, and ellipses.
+"
+" Copyright:    Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
+"               Permission is hereby granted to use and distribute this code,
+"               with or without modifications, provided that this copyright
+"               notice is copied with it. Like anything else that's free,
+"               DrawIt.vim is provided *as is* and comes with no warranty
+"               of any kind, either expressed or implied. By using this
+"               plugin, you agree that in no event will the copyright
+"               holder be liable for any damages resulting from the use
+"               of this software.
+"
+" Required:		THIS SCRIPT REQUIRES VIM 7.0 (or later) {{{1
+" GetLatestVimScripts: 40 1 :AutoInstall: DrawIt.vim
+" GetLatestVimScripts: 1066 1 cecutil.vim
+"
+"  Woe to her who is rebellious and polluted, the oppressing {{{1
+"  city! She didn't obey the voice. She didn't receive correction.
+"  She didn't trust in Yahweh. She didn't draw near to her God. (Zeph 3:1,2 WEB)
+
+" ---------------------------------------------------------------------
+" Load Once: {{{1
+if &cp || exists("g:loaded_DrawIt")
+ finish
+endif
+let s:keepcpo= &cpo
+set cpo&vim
+
+" ---------------------------------------------------------------------
+"  Script Variables: {{{1
+if !exists("s:saveposn_count")
+ let s:saveposn_count= 0
+endif
+let g:loaded_DrawIt= "v8"
+"DechoTabOn
+
+" =====================================================================
+" DrawIt Functions: (by Charles E. Campbell, Jr.) {{{1
+" =====================================================================
+
+" ---------------------------------------------------------------------
+" DrawIt#StartDrawIt: this function maps the cursor keys, sets up default {{{2
+"              drawing characters, and makes some settings
+fun! DrawIt#StartDrawIt()
+"  call Dfunc("StartDrawIt()")
+
+  " StartDrawIt: report on [DrawIt] mode {{{3
+  if exists("b:dodrawit") && b:dodrawit == 1
+   " already in DrawIt mode
+    echo "[DrawIt] (already on, use ".((exists("mapleader") && mapleader != "")? mapleader : '\')."ds to stop)"
+"   call Dret("StartDrawIt")
+   return
+  endif
+  let b:dodrawit= 1
+
+  " indicate in DrawIt mode
+  echo "[DrawIt]"
+
+  " StartDrawIt: turn on mouse {{{3
+  if !exists("b:drawit_keep_mouse")
+   let b:drawit_keep_mouse= &mouse
+  endif
+  setlocal mouse=a
+
+  " StartDrawIt: set up DrawIt commands {{{3
+  com! -nargs=1 -range SetBrush <line1>,<line2>call DrawIt#SetBrush(<q-args>)
+  com! -count Canvas call s:Spacer(line("."),line(".") + <count> - 1,0)
+
+  " StartDrawIt: set up default drawing characters {{{3
+  if !exists("b:di_vert")
+   let b:di_vert= "|"
+  endif
+  if !exists("b:di_horiz")
+   let b:di_horiz= "-"
+  endif
+  if !exists("b:di_plus")
+   let b:di_plus= "+"
+  endif
+  if !exists("b:di_upright")  " also downleft
+   let b:di_upright= "/"
+  endif
+  if !exists("b:di_upleft")   " also downright
+   let b:di_upleft= "\\"
+  endif
+  if !exists("b:di_cross")
+   let b:di_cross= "X"
+  endif
+  if !exists("b:di_ellipse")
+   let b:di_ellipse= '*'
+  endif
+
+  " set up initial DrawIt behavior (as opposed to erase behavior)
+  let b:di_erase     = 0
+
+  " StartDrawIt: option recording {{{3
+  let b:di_aikeep    = &ai
+  let b:di_cinkeep   = &cin
+  let b:di_cpokeep   = &cpo
+  let b:di_etkeep    = &et
+  let b:di_fokeep    = &fo
+  let b:di_gdkeep    = &gd
+  let b:di_gokeep    = &go
+  let b:di_magickeep = &magic
+  let b:di_remapkeep = &remap
+  let b:di_repkeep   = &report
+  let b:di_sikeep    = &si
+  let b:di_stakeep   = &sta
+  let b:di_vekeep    = &ve
+  set cpo&vim
+  set nocin noai nosi nogd sta et ve=all report=10000
+  set go-=aA
+  set fo-=a
+  set remap magic
+
+  " StartDrawIt: save and unmap user maps {{{3
+  let b:lastdir    = 1
+  if exists("mapleader")
+   let usermaplead  = mapleader
+  else
+   let usermaplead  = "\\"
+  endif
+  call SaveUserMaps("n","","><^v","DrawIt")
+  call SaveUserMaps("v",usermaplead,"abeflsy","DrawIt")
+  call SaveUserMaps("n",usermaplead,"h><v^","DrawIt")
+  call SaveUserMaps("n","","<left>","DrawIt")
+  call SaveUserMaps("n","","<right>","DrawIt")
+  call SaveUserMaps("n","","<up>","DrawIt")
+  call SaveUserMaps("n","","<down>","DrawIt")
+  call SaveUserMaps("n","","<left>","DrawIt")
+  call SaveUserMaps("n","","<s-right>","DrawIt")
+  call SaveUserMaps("n","","<s-up>","DrawIt")
+  call SaveUserMaps("n","","<s-down>","DrawIt")
+  call SaveUserMaps("n","","<space>","DrawIt")
+  call SaveUserMaps("n","","<home>","DrawIt")
+  call SaveUserMaps("n","","<end>","DrawIt")
+  call SaveUserMaps("n","","<pageup>","DrawIt")
+  call SaveUserMaps("n","","<pagedown>","DrawIt")
+  call SaveUserMaps("n","","<leftmouse>","DrawIt")
+  call SaveUserMaps("n","","<middlemouse>","DrawIt")
+  call SaveUserMaps("n","","<rightmouse>","DrawIt")
+  call SaveUserMaps("n","","<leftdrag>","DrawIt")
+  call SaveUserMaps("n","","<s-leftmouse>","DrawIt")
+  call SaveUserMaps("n","","<s-leftdrag>","DrawIt")
+  call SaveUserMaps("n","","<s-leftrelease>","DrawIt")
+  call SaveUserMaps("n","","<c-leftmouse>","DrawIt")
+  call SaveUserMaps("n","","<c-leftdrag>","DrawIt")
+  call SaveUserMaps("n","","<c-leftrelease>","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pa","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pb","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pc","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pd","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pe","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pf","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pg","DrawIt")
+  call SaveUserMaps("n",usermaplead,":ph","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pi","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pj","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pk","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pl","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pm","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pn","DrawIt")
+  call SaveUserMaps("n",usermaplead,":po","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pp","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pq","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pr","DrawIt")
+  call SaveUserMaps("n",usermaplead,":ps","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pt","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pu","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pv","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pw","DrawIt")
+  call SaveUserMaps("n",usermaplead,":px","DrawIt")
+  call SaveUserMaps("n",usermaplead,":py","DrawIt")
+  call SaveUserMaps("n",usermaplead,":pz","DrawIt")
+  call SaveUserMaps("n",usermaplead,":ra","DrawIt")
+  call SaveUserMaps("n",usermaplead,":rb","DrawIt")
+  call SaveUserMaps("n",usermaplead,":rc","DrawIt")
+  call SaveUserMaps("n",usermaplead,":rd","DrawIt")
+  call SaveUserMaps("n",usermaplead,":re","DrawIt")
+  call SaveUserMaps("n",usermaplead,":rf","DrawIt")
+  call SaveUserMaps("n",usermaplead,":rg","DrawIt")
+  call SaveUserMaps("n",usermaplead,":rh","DrawIt")
+  call SaveUserMaps("n",usermaplead,":ri","DrawIt")
+  call SaveUserMaps("n",usermaplead,":rj","DrawIt")
+  call SaveUserMaps("n",usermaplead,":rk","DrawIt")
+  call SaveUserMaps("n",usermaplead,":rl","DrawIt")
+  call SaveUserMaps("n",usermaplead,":rm","DrawIt")
+  call SaveUserMaps("n",usermaplead,":rn","DrawIt")
+  call SaveUserMaps("n",usermaplead,":ro","DrawIt")
+  call SaveUserMaps("n",usermaplead,":rp","DrawIt")
+  call SaveUserMaps("n",usermaplead,":rq","DrawIt")
+  call SaveUserMaps("n",usermaplead,":rr","DrawIt")
+  call SaveUserMaps("n",usermaplead,":rs","DrawIt")
+  call SaveUserMaps("n",usermaplead,":rt","DrawIt")
+  call SaveUserMaps("n",usermaplead,":ru","DrawIt")
+  call SaveUserMaps("n",usermaplead,":rv","DrawIt")
+  call SaveUserMaps("n",usermaplead,":rw","DrawIt")
+  call SaveUserMaps("n",usermaplead,":rx","DrawIt")
+  call SaveUserMaps("n",usermaplead,":ry","DrawIt")
+  call SaveUserMaps("n",usermaplead,":rz","DrawIt")
+  if exists("g:drawit_insertmode") && g:drawit_insertmode
+   call SaveUserMaps("i","","<left>","DrawIt")
+   call SaveUserMaps("i","","<right>","DrawIt")
+   call SaveUserMaps("i","","<up>","DrawIt")
+   call SaveUserMaps("i","","<down>","DrawIt")
+   call SaveUserMaps("i","","<left>","DrawIt")
+   call SaveUserMaps("i","","<s-right>","DrawIt")
+   call SaveUserMaps("i","","<s-up>","DrawIt")
+   call SaveUserMaps("i","","<s-down>","DrawIt")
+   call SaveUserMaps("i","","<home>","DrawIt")
+   call SaveUserMaps("i","","<end>","DrawIt")
+   call SaveUserMaps("i","","<pageup>","DrawIt")
+   call SaveUserMaps("i","","<pagedown>","DrawIt")
+   call SaveUserMaps("i","","<leftmouse>","DrawIt")
+  endif
+  call SaveUserMaps("n","",":\<c-v>","DrawIt")
+
+  " StartDrawIt: DrawIt maps (Charles Campbell) {{{3
+  nmap <silent> <left>     :set lz<CR>:silent! call <SID>DrawLeft()<CR>:set nolz<CR>
+  nmap <silent> <right>    :set lz<CR>:silent! call <SID>DrawRight()<CR>:set nolz<CR>
+  nmap <silent> <up>       :set lz<CR>:silent! call <SID>DrawUp()<CR>:set nolz<CR>
+  nmap <silent> <down>     :set lz<CR>:silent! call <SID>DrawDown()<CR>:set nolz<CR>
+  nmap <silent> <s-left>   :set lz<CR>:silent! call <SID>MoveLeft()<CR>:set nolz<CR>
+  nmap <silent> <s-right>  :set lz<CR>:silent! call <SID>MoveRight()<CR>:set nolz<CR>
+  nmap <silent> <s-up>     :set lz<CR>:silent! call <SID>MoveUp()<CR>:set nolz<CR>
+  nmap <silent> <s-down>   :set lz<CR>:silent! call <SID>MoveDown()<CR>:set nolz<CR>
+  nmap <silent> <space>    :set lz<CR>:silent! call <SID>DrawErase()<CR>:set nolz<CR>
+  nmap <silent> >          :set lz<CR>:silent! call <SID>DrawSpace('>',1)<CR>:set nolz<CR>
+  nmap <silent> <          :set lz<CR>:silent! call <SID>DrawSpace('<',2)<CR>:set nolz<CR>
+  nmap <silent> ^          :set lz<CR>:silent! call <SID>DrawSpace('^',3)<CR>:set nolz<CR>
+  nmap <silent> v          :set lz<CR>:silent! call <SID>DrawSpace('v',4)<CR>:set nolz<CR>
+  nmap <silent> <home>     :set lz<CR>:silent! call <SID>DrawSlantUpLeft()<CR>:set nolz<CR>
+  nmap <silent> <end>      :set lz<CR>:silent! call <SID>DrawSlantDownLeft()<CR>:set nolz<CR>
+  nmap <silent> <pageup>   :set lz<CR>:silent! call <SID>DrawSlantUpRight()<CR>:set nolz<CR>
+  nmap <silent> <pagedown> :set lz<CR>:silent! call <SID>DrawSlantDownRight()<CR>:set nolz<CR>
+  nmap <silent> <Leader>>	:set lz<CR>:silent! call <SID>DrawFatRArrow()<CR>:set nolz<CR>
+  nmap <silent> <Leader><	:set lz<CR>:silent! call <SID>DrawFatLArrow()<CR>:set nolz<CR>
+  nmap <silent> <Leader>^	:set lz<CR>:silent! call <SID>DrawFatUArrow()<CR>:set nolz<CR>
+  nmap <silent> <Leader>v	:set lz<CR>:silent! call <SID>DrawFatDArrow()<CR>:set nolz<CR>
+  nmap <silent> <Leader>f  :call <SID>Flood()<cr>
+
+  " StartDrawIt: Set up insertmode maps {{{3
+  if exists("g:drawit_insertmode") && g:drawit_insertmode
+   imap <buffer> <silent> <left>     <Esc><left>a
+   imap <buffer> <silent> <right>    <Esc><right>a
+   imap <buffer> <silent> <up>       <Esc><up>a
+   imap <buffer> <silent> <down>     <Esc><down>a
+   imap <buffer> <silent> <left>   <Esc><left>a
+   imap <buffer> <silent> <s-right>  <Esc><s-right>a
+   imap <buffer> <silent> <s-up>     <Esc><s-up>a
+   imap <buffer> <silent> <s-down>   <Esc><s-down>a
+   imap <buffer> <silent> <home>     <Esc><home>a
+   imap <buffer> <silent> <end>      <Esc><end>a
+   imap <buffer> <silent> <pageup>   <Esc><pageup>a
+   imap <buffer> <silent> <pagedown> <Esc><pagedown>a
+  endif
+
+  " StartDrawIt: set up drawing mode mappings (Sylvain Viart) {{{3
+  nnoremap <buffer> <silent> <c-v>      :call <SID>LeftStart()<CR><c-v>
+  vmap     <buffer> <silent> <Leader>a  :<c-u>call <SID>CallBox('Arrow')<CR>
+  vmap     <buffer> <silent> <Leader>b  :<c-u>call <SID>CallBox('DrawBox')<cr>
+  nmap     <buffer>          <Leader>c  :call <SID>Canvas()<cr>
+  vmap     <buffer> <silent> <Leader>l  :<c-u>call <SID>CallBox('DrawPlainLine')<CR>
+  vmap     <buffer> <silent> <Leader>s  :<c-u>call <SID>Spacer(line("'<"), line("'>"),0)<cr>
+
+  " StartDrawIt: set up drawing mode mappings (Charles Campbell) {{{3
+  " \pa ... \pz : blanks are transparent
+  " \ra ... \rz : blanks copy over
+  vmap <buffer> <silent> <Leader>e   :<c-u>call <SID>CallBox('DrawEllipse')<CR>
+  
+  let allreg= "abcdefghijklmnopqrstuvwxyz"
+  while strlen(allreg) > 0
+   let ireg= strpart(allreg,0,1)
+   exe "nmap <buffer> <silent> <Leader>p".ireg.'  :<c-u>set lz<cr>:silent! call <SID>PutBlock("'.ireg.'",0)<cr>:set nolz<cr>'
+   exe "nmap <buffer> <silent> <Leader>r".ireg.'  :<c-u>set lz<cr>:silent! call <SID>PutBlock("'.ireg.'",1)<cr>:set nolz<cr>'
+   let allreg= strpart(allreg,1)
+  endwhile
+
+  " StartDrawIt: mouse maps  (Sylvain Viart) {{{3
+  " start visual-block with leftmouse
+  nnoremap <buffer> <silent> <leftmouse>    <leftmouse>:call <SID>LeftStart()<CR><c-v>
+  vnoremap <buffer> <silent> <rightmouse>   <leftmouse>:<c-u>call <SID>RightStart(1)<cr>
+  vnoremap <buffer> <silent> <middlemouse>  <leftmouse>:<c-u>call <SID>RightStart(0)<cr>
+  vnoremap <buffer> <silent> <c-leftmouse>  <leftmouse>:<c-u>call <SID>CLeftStart()<cr>
+
+  " StartDrawIt: mouse maps (Charles Campbell) {{{3
+  " Draw with current brush
+  nnoremap <buffer> <silent> <s-leftmouse>  <leftmouse>:call <SID>SLeftStart()<CR><c-v>
+  nnoremap <buffer> <silent> <c-leftmouse>  <leftmouse>:call <SID>CLeftStart()<CR><c-v>
+
+ " StartDrawIt: Menu support {{{3
+ if has("gui_running") && has("menu") && &go =~ 'm'
+  exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Stop\ \ DrawIt<tab>\\ds				<Leader>ds'
+  exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Toggle\ Erase\ Mode<tab><space>	<space>'
+  exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Draw\ Arrow<tab>\\a					<Leader>a'
+  exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Draw\ Box<tab>\\b						<Leader>b'
+  exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Make\ Blank\ Zone<tab>\\c			<Leader>c'
+  exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Draw\ Ellipse<tab>\\e					<Leader>e'
+  exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Draw\ Flood<tab>\\e					<Leader>f'
+  exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Draw\ Line<tab>\\l						<Leader>l'
+  exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Append\ Blanks<tab>\\s				<Leader>s'
+  exe 'silent! unmenu '.g:DrChipTopLvlMenu.'DrawIt.Start\ DrawIt'
+ endif
+" call Dret("StartDrawIt")
+endfun
+
+" ---------------------------------------------------------------------
+" DrawIt#StopDrawIt: this function unmaps the cursor keys and restores settings {{{2
+fun! DrawIt#StopDrawIt()
+"  call Dfunc("StopDrawIt()")
+ 
+  " StopDrawIt: report on [DrawIt off] mode {{{3
+  if !exists("b:dodrawit")
+   echo "[DrawIt off]"
+"   call Dret("StopDrawIt")
+   return
+  endif
+
+  " StopDrawIt: restore mouse {{{3
+  if exists("b:drawit_keep_mouse")
+   let &mouse= b:drawit_keep_mouse
+   unlet b:drawit_keep_mouse
+  endif
+  unlet b:dodrawit
+  echo "[DrawIt off]"
+
+  if exists("b:drawit_canvas_used")
+   " StopDrawIt: clean up trailing white space {{{3
+   call s:SavePosn()
+   silent! %s/\s\+$//e
+   unlet b:drawit_canvas_used
+   call s:RestorePosn()
+  endif
+
+  " StopDrawIt: remove drawit commands {{{3
+  delc SetBrush
+
+  " StopDrawIt: insure that erase mode is off {{{3
+  " (thanks go to Gary Johnson for this)
+  if b:di_erase == 1
+  	call s:DrawErase()
+  endif
+
+  " StopDrawIt: restore user map(s), if any {{{3
+  call RestoreUserMaps("DrawIt")
+
+  " StopDrawIt: restore user's options {{{3
+  let &ai     = b:di_aikeep
+  let &cin    = b:di_cinkeep
+  let &cpo    = b:di_cpokeep
+  let &et     = b:di_etkeep
+  let &fo     = b:di_fokeep
+  let &gd     = b:di_gdkeep
+  let &go     = b:di_gokeep
+  let &magic  = b:di_magickeep
+  let &remap  = b:di_remapkeep
+  let &report = b:di_repkeep
+  let &si     = b:di_sikeep
+  let &sta    = b:di_stakeep
+  let &ve     = b:di_vekeep
+  unlet b:di_aikeep  
+  unlet b:di_cinkeep 
+  unlet b:di_cpokeep 
+  unlet b:di_etkeep  
+  unlet b:di_fokeep  
+  unlet b:di_gdkeep  
+  unlet b:di_gokeep  
+  unlet b:di_magickeep
+  unlet b:di_remapkeep
+  unlet b:di_repkeep
+  unlet b:di_sikeep  
+  unlet b:di_stakeep 
+  unlet b:di_vekeep  
+
+ " StopDrawIt: DrChip menu support: {{{3
+ if has("gui_running") && has("menu") && &go =~ 'm'
+  exe 'menu   '.g:DrChipTopLvlMenu.'DrawIt.Start\ DrawIt<tab>\\di		<Leader>di'
+  exe 'unmenu '.g:DrChipTopLvlMenu.'DrawIt.Stop\ \ DrawIt'
+  exe 'unmenu '.g:DrChipTopLvlMenu.'DrawIt.Toggle\ Erase\ Mode'
+  exe 'unmenu '.g:DrChipTopLvlMenu.'DrawIt.Draw\ Arrow'
+  exe 'unmenu '.g:DrChipTopLvlMenu.'DrawIt.Draw\ Box'
+  exe 'unmenu '.g:DrChipTopLvlMenu.'DrawIt.Draw\ Ellipse'
+  exe 'unmenu '.g:DrChipTopLvlMenu.'DrawIt.Draw\ Flood'
+  exe 'unmenu '.g:DrChipTopLvlMenu.'DrawIt.Draw\ Line'
+  exe 'unmenu '.g:DrChipTopLvlMenu.'DrawIt.Make\ Blank\ Zone'
+  exe 'unmenu '.g:DrChipTopLvlMenu.'DrawIt.Append\ Blanks'
+ endif
+" call Dret("StopDrawIt")
+endfun
+
+" ---------------------------------------------------------------------
+" SetDrawIt: this function allows one to change the drawing characters {{{2
+fun! SetDrawIt(di_vert,di_horiz,di_plus,di_upleft,di_upright,di_cross,di_ellipse)
+"  call Dfunc("SetDrawIt(vert<".a:di_vert."> horiz<".a:di_horiz."> plus<".a:di_plus."> upleft<".a:di_upleft."> upright<".a:di_upright."> cross<".a:di_cross."> ellipse<".a:di_ellipse.">)")
+  let b:di_vert    = a:di_vert
+  let b:di_horiz   = a:di_horiz
+  let b:di_plus    = a:di_plus
+  let b:di_upleft  = a:di_upleft
+  let b:di_upright = a:di_upright
+  let b:di_cross   = a:di_cross
+  let b:di_ellipse = a:di_ellipse
+"  call Dret("SetDrawIt")
+endfun
+
+" =====================================================================
+" s:DrawLeft: {{{2
+fun! s:DrawLeft()
+"  call Dfunc("s:DrawLeft()")
+  let curline   = getline(".")
+  let curcol    = virtcol(".")
+  let b:lastdir = 2
+
+  if curcol > 0
+    let curchar= strpart(curline,curcol-1,1)
+
+    " replace
+   if curchar == b:di_vert || curchar == b:di_plus
+     exe "norm! r".b:di_plus
+   else
+     exe "norm! r".b:di_horiz
+   endif
+
+   " move and replace
+   if curcol >= 2
+    call s:MoveLeft()
+    let curchar= strpart(curline,curcol-2,1)
+    if curchar == b:di_vert || curchar == b:di_plus
+     exe "norm! r".b:di_plus
+    else
+     exe "norm! r".b:di_horiz
+    endif
+   endif
+  endif
+"  call Dret("s:DrawLeft")
+endfun
+
+" ---------------------------------------------------------------------
+" s:DrawRight: {{{2
+fun! s:DrawRight()
+"  call Dfunc("s:DrawRight()")
+  let curline   = getline(".")
+  let curcol    = virtcol(".")
+  let b:lastdir = 1
+
+  " replace
+  if curcol == virtcol("$")
+   exe "norm! a".b:di_horiz."\<Esc>"
+  else
+    let curchar= strpart(curline,curcol-1,1)
+    if curchar == b:di_vert || curchar == b:di_plus
+     exe "norm! r".b:di_plus
+    else
+     exe "norm! r".b:di_horiz
+    endif
+  endif
+
+  " move and replace
+  call s:MoveRight()
+  if curcol == virtcol("$")
+   exe "norm! i".b:di_horiz."\<Esc>"
+  else
+   let curchar= strpart(curline,curcol,1)
+   if curchar == b:di_vert || curchar == b:di_plus
+    exe "norm! r".b:di_plus
+   else
+    exe "norm! r".b:di_horiz
+   endif
+  endif
+"  call Dret("s:DrawRight")
+endfun
+
+" ---------------------------------------------------------------------
+" s:DrawUp: {{{2
+fun! s:DrawUp()
+"  call Dfunc("s:DrawUp()")
+  let curline   = getline(".")
+  let curcol    = virtcol(".")
+  let b:lastdir = 3
+
+  " replace
+  if curcol == 1 && virtcol("$") == 1
+   exe "norm! i".b:di_vert."\<Esc>"
+  else
+   let curchar= strpart(curline,curcol-1,1)
+   if curchar == b:di_horiz || curchar == b:di_plus
+    exe "norm! r".b:di_plus
+   else
+    exe "norm! r".b:di_vert
+   endif
+  endif
+
+  " move and replace/insert
+  call s:MoveUp()
+  let curline= getline(".")
+  let curchar= strpart(curline,curcol-1,1)
+
+  if     curcol == 1 && virtcol("$") == 1
+   exe "norm! i".b:di_vert."\<Esc>"
+  elseif curchar == b:di_horiz || curchar == b:di_plus
+   exe "norm! r".b:di_plus
+  else
+   exe "norm! r".b:di_vert
+   endif
+  endif
+"  call Dret("s:DrawUp")
+endfun
+
+" ---------------------------------------------------------------------
+" s:DrawDown: {{{2
+fun! s:DrawDown()
+"  call Dfunc("s:DrawDown()")
+  let curline   = getline(".")
+  let curcol    = virtcol(".")
+  let b:lastdir = 4
+
+  " replace
+  if curcol == 1 && virtcol("$") == 1
+   exe "norm! i".b:di_vert."\<Esc>"
+  else
+    let curchar= strpart(curline,curcol-1,1)
+    if curchar == b:di_horiz || curchar == b:di_plus
+     exe "norm! r".b:di_plus
+    else
+     exe "norm! r".b:di_vert
+    endif
+  endif
+
+  " move and replace/insert
+  call s:MoveDown()
+  let curline= getline(".")
+  let curchar= strpart(curline,curcol-1,1)
+  if     curcol == 1 && virtcol("$") == 1
+   exe "norm! i".b:di_vert."\<Esc>"
+  elseif curchar == b:di_horiz || curchar == b:di_plus
+   exe "norm! r".b:di_plus
+  else
+   exe "norm! r".b:di_vert
+  endif
+"  call Dret("s:DrawDown")
+endfun
+
+" ---------------------------------------------------------------------
+" s:DrawErase: toggle [DrawIt on] and [DrawIt erase] modes {{{2
+fun! s:DrawErase()
+"  call Dfunc("s:DrawErase() b:di_erase=".b:di_erase)
+  if b:di_erase == 0
+   let b:di_erase= 1
+   echo "[DrawIt erase]"
+   let b:di_vert_save    = b:di_vert
+   let b:di_horiz_save   = b:di_horiz
+   let b:di_plus_save    = b:di_plus
+   let b:di_upright_save = b:di_upright
+   let b:di_upleft_save  = b:di_upleft
+   let b:di_cross_save   = b:di_cross
+   call SetDrawIt(' ',' ',' ',' ',' ',' ')
+  else
+   let b:di_erase= 0
+   echo "[DrawIt]"
+   call SetDrawIt(b:di_vert_save,b:di_horiz_save,b:di_plus_save,b:di_upleft_save,b:di_upright_save,b:di_cross_save)
+  endif
+"  call Dret("s:DrawErase")
+endfun
+
+" ---------------------------------------------------------------------
+" s:DrawSpace: clear character and move right {{{2
+fun! s:DrawSpace(chr,dir)
+"  call Dfunc("s:DrawSpace(chr<".a:chr."> dir<".a:dir.">)")
+  let curcol= virtcol(".")
+
+  " replace current location with arrowhead/space
+  if curcol == virtcol("$")-1
+   exe "norm! r".a:chr
+  else
+   exe "norm! r".a:chr
+  endif
+
+  if a:dir == 0
+   let dir= b:lastdir
+  else
+   let dir= a:dir
+  endif
+
+  " perform specified move
+  if dir == 1
+   call s:MoveRight()
+  elseif dir == 2
+   call s:MoveLeft()
+  elseif dir == 3
+   call s:MoveUp()
+  else
+   call s:MoveDown()
+  endif
+"  call Dret("s:DrawSpace")
+endfun
+
+" ---------------------------------------------------------------------
+" s:DrawSlantDownLeft: / {{{2
+fun! s:DrawSlantDownLeft()
+"  call Dfunc("s:DrawSlantDownLeft()")
+  call s:ReplaceDownLeft()		" replace
+  call s:MoveDown()				" move
+  call s:MoveLeft()				" move
+  call s:ReplaceDownLeft()		" replace
+"  call Dret("s:DrawSlantDownLeft")
+endfun
+
+" ---------------------------------------------------------------------
+" s:DrawSlantDownRight: \ {{{2
+fun! s:DrawSlantDownRight()
+"  call Dfunc("s:DrawSlantDownRight()")
+  call s:ReplaceDownRight()	" replace
+  call s:MoveDown()			" move
+  call s:MoveRight()		" move
+  call s:ReplaceDownRight()	" replace
+"  call Dret("s:DrawSlantDownRight")
+endfun
+
+" ---------------------------------------------------------------------
+" s:DrawSlantUpLeft: \ {{{2
+fun! s:DrawSlantUpLeft()
+"  call Dfunc("s:DrawSlantUpLeft()")
+  call s:ReplaceDownRight()	" replace
+  call s:MoveUp()			" move
+  call s:MoveLeft()			" move
+  call s:ReplaceDownRight()	" replace
+"  call Dret("s:DrawSlantUpLeft")
+endfun
+
+" ---------------------------------------------------------------------
+" s:DrawSlantUpRight: / {{{2
+fun! s:DrawSlantUpRight()
+"  call Dfunc("s:DrawSlantUpRight()")
+  call s:ReplaceDownLeft()	" replace
+  call s:MoveUp()			" move
+  call s:MoveRight()		" replace
+  call s:ReplaceDownLeft()	" replace
+"  call Dret("s:DrawSlantUpRight")
+endfun
+
+" ---------------------------------------------------------------------
+" s:MoveLeft: {{{2
+fun! s:MoveLeft()
+"  call Dfunc("s:MoveLeft()")
+  norm! h
+  let b:lastdir= 2
+"  call Dret("s:MoveLeft : b:lastdir=".b:lastdir)
+endfun
+
+" ---------------------------------------------------------------------
+" s:MoveRight: {{{2
+fun! s:MoveRight()
+"  call Dfunc("s:MoveRight()")
+  if virtcol(".") >= virtcol("$") - 1
+   exe "norm! A \<Esc>"
+  else
+   norm! l
+  endif
+  let b:lastdir= 1
+"  call Dret("s:MoveRight : b:lastdir=".b:lastdir)
+endfun
+
+" ---------------------------------------------------------------------
+" s:MoveUp: {{{2
+fun! s:MoveUp()
+"  call Dfunc("s:MoveUp()")
+  if line(".") == 1
+   let curcol= virtcol(".") - 1
+   if curcol == 0 && virtcol("$") == 1
+     exe "norm! i \<Esc>"
+   elseif curcol == 0
+     exe "norm! YP:s/./ /ge\<CR>0r "
+   else
+     exe "norm! YP:s/./ /ge\<CR>0".curcol."lr "
+   endif
+  else
+   let curcol= virtcol(".")
+   norm! k
+   while virtcol("$") <= curcol
+     exe "norm! A \<Esc>"
+   endwhile
+  endif
+  let b:lastdir= 3
+"  call Dret("s:MoveUp : b:lastdir=".b:lastdir)
+endfun
+
+" ---------------------------------------------------------------------
+" s:MoveDown: {{{2
+fun! s:MoveDown()
+"  call Dfunc("s:MoveDown()")
+  if line(".") == line("$")
+   let curcol= virtcol(".") - 1
+   if curcol == 0 && virtcol("$") == 1
+    exe "norm! i \<Esc>"
+   elseif curcol == 0
+    exe "norm! Yp:s/./ /ge\<CR>0r "
+   else
+    exe "norm! Yp:s/./ /ge\<CR>0".curcol."lr "
+   endif
+  else
+   let curcol= virtcol(".")
+   norm! j
+   while virtcol("$") <= curcol
+    exe "norm! A \<Esc>"
+   endwhile
+  endif
+  let b:lastdir= 4
+"  call Dret("s:MoveDown : b:lastdir=".b:lastdir)
+endfun
+
+" ---------------------------------------------------------------------
+" s:ReplaceDownLeft: / X  (upright) {{{2
+fun! s:ReplaceDownLeft()
+"  call Dfunc("s:ReplaceDownLeft()")
+  let curcol = virtcol(".")
+  if curcol != virtcol("$")
+   let curchar= strpart(getline("."),curcol-1,1)
+   if curchar == "\\" || curchar == "X"
+    exe "norm! r".b:di_cross
+   else
+    exe "norm! r".b:di_upright
+   endif
+  else
+   exe "norm! i".b:di_upright."\<Esc>"
+  endif
+"  call Dret("s:ReplaceDownLeft")
+endfun
+
+" ---------------------------------------------------------------------
+" s:ReplaceDownRight: \ X  (upleft) {{{2
+fun! s:ReplaceDownRight()
+"  call Dfunc("s:ReplaceDownRight()")
+  let curcol = virtcol(".")
+  if curcol != virtcol("$")
+   let curchar= strpart(getline("."),curcol-1,1)
+   if curchar == "/" || curchar == "X"
+    exe "norm! r".b:di_cross
+   else
+    exe "norm! r".b:di_upleft
+   endif
+  else
+   exe "norm! i".b:di_upleft."\<Esc>"
+  endif
+"  call Dret("s:ReplaceDownRight")
+endfun
+
+" ---------------------------------------------------------------------
+" s:DrawFatRArrow: ----|> {{{2
+fun! s:DrawFatRArrow()
+"  call Dfunc("s:DrawFatRArrow()")
+  call s:MoveRight()
+  norm! r|
+  call s:MoveRight()
+  norm! r>
+"  call Dret("s:DrawFatRArrow")
+endfun
+
+" ---------------------------------------------------------------------
+" s:DrawFatLArrow: <|---- {{{2
+fun! s:DrawFatLArrow()
+"  call Dfunc("s:DrawFatLArrow()")
+  call s:MoveLeft()
+  norm! r|
+  call s:MoveLeft()
+  norm! r<
+"  call Dret("s:DrawFatLArrow")
+endfun
+
+" ---------------------------------------------------------------------
+"                 .
+" s:DrawFatUArrow: /_\ {{{2
+"                 |
+fun! s:DrawFatUArrow()
+"  call Dfunc("s:DrawFatUArrow()")
+  call s:MoveUp()
+  norm! r_
+  call s:MoveRight()
+  norm! r\
+  call s:MoveLeft()
+  call s:MoveLeft()
+  norm! r/
+  call s:MoveRight()
+  call s:MoveUp()
+  norm! r.
+"  call Dret("s:DrawFatUArrow")
+endfun
+
+" ---------------------------------------------------------------------
+" s:DrawFatDArrow: _|_ {{{2
+"                  \ /
+"                   '
+fun! s:DrawFatDArrow()
+"  call Dfunc("s:DrawFatDArrow()")
+  call s:MoveRight()
+  norm! r_
+  call s:MoveLeft()
+  call s:MoveLeft()
+  norm! r_
+  call s:MoveDown()
+  norm! r\
+  call s:MoveRight()
+  call s:MoveRight()
+  norm! r/
+  call s:MoveDown()
+  call s:MoveLeft()
+  norm! r'
+"  call Dret("s:DrawFatDArrow")
+endfun
+
+" ---------------------------------------------------------------------
+" s:DrawEllipse: Bresenham-like ellipse drawing algorithm {{{2
+"      2   2      can
+"     x   y       be             2 2   2 2   2 2
+"     - + - = 1   rewritten     b x + a y = a b
+"     a   b       as
+"
+"     Take step which has minimum error
+"     (x,y-1)  (x+1,y)  (x+1,y-1)
+"
+"             2 2   2 2   2 2
+"     Ei = | b x + a y - a b |
+"
+"     Algorithm only draws arc from (0,b) to (a,0) and uses
+"     DrawFour() to reflect points to other three quadrants
+fun! s:DrawEllipse(x0,y0,x1,y1)
+"  call Dfunc("s:DrawEllipse(x0=".a:x0." y0=".a:y0." x1=".a:x1." y1=".a:y1.")")
+  let x0   = a:x0
+  let y0   = a:y0
+  let x1   = a:x1
+  let y1   = a:y1
+  let xoff = (x0+x1)/2
+  let yoff = (y0+y1)/2
+  let a    = s:Abs(x1-x0)/2
+  let b    = s:Abs(y1-y0)/2
+  let a2   = a*a
+  let b2   = b*b
+  let twoa2= a2 + a2
+  let twob2= b2 + b2
+
+  let xi= 0
+  let yi= b
+  let ei= 0
+  call s:DrawFour(xi,yi,xoff,yoff,a,b)
+  while xi <= a && yi >= 0
+
+     let dy= a2 - twoa2*yi
+     let ca= ei + twob2*xi + b2
+     let cb= ca + dy
+     let cc= ei + dy
+
+     let aca= s:Abs(ca)
+     let acb= s:Abs(cb)
+     let acc= s:Abs(cc)
+
+     " pick case: (xi+1,yi) (xi,yi-1) (xi+1,yi-1)
+     if aca <= acb && aca <= acc
+        let xi= xi + 1
+        let ei= ca
+     elseif acb <= aca && acb <= acc
+        let ei= cb
+        let xi= xi + 1
+        let yi= yi - 1
+     else
+        let ei= cc
+        let yi= yi - 1
+     endif
+     if xi > a:x1
+        break
+     endif
+     call s:DrawFour(xi,yi,xoff,yoff,a,b)
+  endw
+"  call Dret("s:DrawEllipse")
+endf
+
+" ---------------------------------------------------------------------
+" s:DrawFour: reflect a point to four quadrants {{{2
+fun! s:DrawFour(x,y,xoff,yoff,a,b)
+"  call Dfunc("s:DrawFour(xy[".a:x.",".a:y."] off[".a:xoff.",".a:yoff."] a=".a:a." b=".a:b.")")
+  let x  = a:xoff + a:x
+  let y  = a:yoff + a:y
+  let lx = a:xoff - a:x
+  let by = a:yoff - a:y
+  call s:SetCharAt(b:di_ellipse,  x, y)
+  call s:SetCharAt(b:di_ellipse, lx, y)
+  call s:SetCharAt(b:di_ellipse, lx,by)
+  call s:SetCharAt(b:di_ellipse,  x,by)
+"  call Dret("s:DrawFour")
+endf
+
+" ---------------------------------------------------------------------
+" s:SavePosn: saves position of cursor on screen so NetWrite can restore it {{{2
+fun! s:SavePosn()
+"  call Dfunc("s:SavePosn() saveposn_count=".s:saveposn_count.' ['.line('.').','.virtcol('.').']')
+  let s:saveposn_count= s:saveposn_count + 1
+
+  " Save current line and column
+  let b:drawit_line_{s:saveposn_count} = line(".")
+  let b:drawit_col_{s:saveposn_count}  = virtcol(".") - 1
+
+  " Save top-of-screen line
+  norm! H
+  let b:drawit_hline_{s:saveposn_count}= line(".")
+
+  " restore position
+  exe "norm! ".b:drawit_hline_{s:saveposn_count}."G0z\<CR>"
+  if b:drawit_col_{s:saveposn_count} == 0
+   exe "norm! ".b:drawit_line_{s:saveposn_count}."G0"
+  else
+   exe "norm! ".b:drawit_line_{s:saveposn_count}."G0".b:drawit_col_{s:saveposn_count}."l"
+  endif
+"  call Dret("s:SavePosn : saveposn_count=".s:saveposn_count)
+endfun
+
+" ------------------------------------------------------------------------
+" s:RestorePosn: {{{2
+fun! s:RestorePosn()
+"  call Dfunc("s:RestorePosn() saveposn_count=".s:saveposn_count)
+  if s:saveposn_count <= 0
+"  	call Dret("s:RestorePosn : s:saveposn_count<=0")
+  	return
+  endif
+  " restore top-of-screen line
+  exe "norm! ".b:drawit_hline_{s:saveposn_count}."G0z\<CR>"
+
+  " restore position
+  if b:drawit_col_{s:saveposn_count} == 0
+   exe "norm! ".b:drawit_line_{s:saveposn_count}."G0"
+  else
+   exe "norm! ".b:drawit_line_{s:saveposn_count}."G0".b:drawit_col_{s:saveposn_count}."l"
+  endif
+  if s:saveposn_count > 0
+	unlet b:drawit_hline_{s:saveposn_count}
+	unlet b:drawit_line_{s:saveposn_count}
+	unlet b:drawit_col_{s:saveposn_count}
+   let s:saveposn_count= s:saveposn_count - 1
+  endif
+"  call Dret("s:RestorePosn : saveposn_count=".s:saveposn_count)
+endfun
+
+" ------------------------------------------------------------------------
+" s:Flood: this function begins a flood of a region {{{2
+"        based on b:di... characters as boundaries
+"        and starting at the current cursor location.
+fun! s:Flood()
+"  call Dfunc("s:Flood()")
+
+  let s:bndry  = b:di_vert.b:di_horiz.b:di_plus.b:di_upright.b:di_upleft.b:di_cross.b:di_ellipse
+  let row      = line(".")
+  let col      = virtcol(".")
+  let athold   = @0
+  let s:DIrows = line("$")
+  call s:SavePosn()
+
+  " get fill character from user
+  " Put entire fillchar string into the s:bndry (boundary characters),
+  " although only use the first such character for filling
+  call inputsave()
+  let s:fillchar= input("Enter fill character: ")
+  call inputrestore()
+  let s:bndry= "[".escape(s:bndry.s:fillchar,'\-]^')."]"
+  if strlen(s:fillchar) > 1
+   let s:fillchar= strpart(s:fillchar,0,1)
+  endif
+
+  " flood the region
+  call s:DI_Flood(row,col)
+
+  " restore
+  call s:RestorePosn()
+  let @0= athold
+  unlet s:DIrows s:bndry s:fillchar
+
+"  call Dret("s:Flood")
+endfun
+
+" ------------------------------------------------------------------------
+" s:DI_Flood: fill up to the boundaries all characters to the left and right. {{{2
+"           Then, based on the left/right column extents reached, check
+"           adjacent rows to see if any characters there need filling.
+fun! s:DI_Flood(frow,fcol)
+"  call Dfunc("s:DI_Flood(frow=".a:frow." fcol=".a:fcol.")")
+  if a:frow <= 0 || a:fcol <= 0 || s:SetPosn(a:frow,a:fcol) || s:IsBoundary(a:frow,a:fcol)
+"   call Dret("s:DI_Flood")
+   return
+  endif
+
+  " fill current line
+  let colL= s:DI_FillLeft(a:frow,a:fcol)
+  let colR= s:DI_FillRight(a:frow,a:fcol+1)
+
+  " do a filladjacent on the next line up
+  if a:frow > 1
+   call s:DI_FillAdjacent(a:frow-1,colL,colR)
+  endif
+
+  " do a filladjacent on the next line down
+  if a:frow < s:DIrows
+   call s:DI_FillAdjacent(a:frow+1,colL,colR)
+  endif
+
+"  call Dret("s:DI_Flood")
+endfun
+
+" ------------------------------------------------------------------------
+"  s:DI_FillLeft: Starting at (frow,fcol), non-boundary locations are {{{2
+"               filled with the fillchar.  The leftmost extent reached
+"               is returned.
+fun! s:DI_FillLeft(frow,fcol)
+"  call Dfunc("s:DI_FillLeft(frow=".a:frow." fcol=".a:fcol.")")
+  if s:SetPosn(a:frow,a:fcol)
+"   call Dret("s:DI_FillLeft ".a:fcol)
+   return a:fcol
+  endif
+
+  let Lcol= a:fcol
+  while Lcol >= 1
+   if !s:IsBoundary(a:frow,Lcol)
+    exe  "silent! norm! r".s:fillchar."h"
+   else
+    break
+   endif
+   let Lcol= Lcol - 1
+  endwhile
+
+ let Lcol= (Lcol < 1)? 1 : Lcol + 1
+
+" call Dret("s:DI_FillLeft ".Lcol)
+ return Lcol
+endfun
+
+" ---------------------------------------------------------------------
+"  s:DI_FillRight: Starting at (frow,fcol), non-boundary locations are {{{2
+"                filled with the fillchar.  The rightmost extent reached
+"                is returned.
+fun! s:DI_FillRight(frow,fcol)
+"  call Dfunc("s:DI_FillRight(frow=".a:frow." fcol=".a:fcol.")")
+  if s:SetPosn(a:frow,a:fcol)
+"   call Dret("s:DI_FillRight ".a:fcol)
+   return a:fcol
+  endif
+
+  let Rcol   = a:fcol
+  while Rcol <= virtcol("$")
+   if !s:IsBoundary(a:frow,Rcol)
+    exe "silent! norm! r".s:fillchar."l"
+   else
+    break
+   endif
+   let Rcol= Rcol + 1
+  endwhile
+
+  let DIcols = virtcol("$")
+  let Rcol   = (Rcol > DIcols)? DIcols : Rcol - 1
+
+"  call Dret("s:DI_FillRight ".Rcol)
+  return Rcol
+endfun
+
+" ---------------------------------------------------------------------
+"  s:DI_FillAdjacent: {{{2
+"     DI_Flood does FillLeft and FillRight, so the run from left to right
+"    (fcolL to fcolR) is known to have been filled.  FillAdjacent is called
+"    from (fcolL to fcolR) on the lines one row up and down; if any character
+"    on the run is not a boundary character, then a flood is needed on that
+"    location.
+fun! s:DI_FillAdjacent(frow,fcolL,fcolR)
+"  call Dfunc("s:DI_FillAdjacent(frow=".a:frow." fcolL=".a:fcolL." fcolR=".a:fcolR.")")
+
+  let icol  = a:fcolL
+  while icol <= a:fcolR
+	if !s:IsBoundary(a:frow,icol)
+	 call s:DI_Flood(a:frow,icol)
+	endif
+   let icol= icol + 1
+  endwhile
+
+"  call Dret("s:DI_FillAdjacent")
+endfun
+
+" ---------------------------------------------------------------------
+" s:SetPosn: set cursor to given position on screen {{{2
+"    srow,scol: -s-creen    row and column
+"   Returns  1 : failed sanity check
+"            0 : otherwise
+fun! s:SetPosn(row,col)
+"  call Dfunc("s:SetPosn(row=".a:row." col=".a:col.")")
+  " sanity checks
+  if a:row < 1
+"   call Dret("s:SetPosn 1")
+   return 1
+  endif
+  if a:col < 1
+"   call Dret("s:SetPosn 1")
+   return 1
+  endif
+
+  exe "norm! ".a:row."G".a:col."\<Bar>"
+
+"  call Dret("s:SetPosn 0")
+  return 0
+endfun
+
+" ---------------------------------------------------------------------
+" s:IsBoundary: returns 0 if not on boundary, 1 if on boundary {{{2
+"             The "boundary" also includes the fill character.
+fun! s:IsBoundary(row,col)
+"  call Dfunc("s:IsBoundary(row=".a:row." col=".a:col.")")
+
+  let orow= line(".")
+  let ocol= virtcol(".")
+  exe "norm! ".a:row."G".a:col."\<Bar>"
+  norm! vy
+  let ret= @0 =~ s:bndry
+  if a:row != orow || a:col != ocol
+   exe "norm! ".orow."G".ocol."\<Bar>"
+  endif
+
+"  call Dret("s:IsBoundary ".ret." : @0<".@0.">")
+  return ret
+endfun
+
+" ---------------------------------------------------------------------
+" s:PutBlock: puts a register's contents into the text at the current {{{2
+"           cursor location
+"              replace= 0: Blanks are transparent
+"                     = 1: Blanks copy over
+"                     = 2: Erase all drawing characters
+"
+fun! s:PutBlock(block,replace)
+"  call Dfunc("s:PutBlock(block<".a:block."> replace=".a:replace.")")
+  call s:SavePosn()
+  exe "let block  = @".a:block
+  let blocklen    = strlen(block)
+  let drawit_line = line('.')
+  let drawchars   = '['.escape(b:di_vert.b:di_horiz.b:di_plus.b:di_upright.b:di_upleft.b:di_cross,'\-').']'
+
+  " insure that putting a block will do so in a region containing spaces out to textwidth
+  exe "let blockrows= strlen(substitute(@".a:block.",'[^[:cntrl:]]','','g'))"
+  exe 'let blockcols= strlen(substitute(@'.a:block.",'^\\(.\\{-}\\)\\n\\_.*$','\\1',''))"
+  let curline= line('.')
+  let curcol = virtcol('.')
+"  call Decho("blockrows=".blockrows." blockcols=".blockcols." curline=".curline." curcol=".curcol)
+  call s:AutoCanvas(curline-1,curline + blockrows+1,curcol + blockcols)
+
+  let iblock      = 0
+  while iblock < blocklen
+  	let chr= strpart(block,iblock,1)
+
+	if char2nr(chr) == 10
+	 " handle newline
+	 let drawit_line= drawit_line + 1
+    if b:drawit_col_{s:saveposn_count} == 0
+     exe "norm! ".drawit_line."G0"
+    else
+     exe "norm! ".drawit_line."G0".b:drawit_col_{s:saveposn_count}."l"
+    endif
+
+	elseif a:replace == 2
+	 " replace all drawing characters with blanks
+	 if match(chr,drawchars) != -1
+	  norm! r l
+	 else
+	  norm! l
+	 endif
+
+	elseif chr == ' ' && a:replace == 0
+	 " allow blanks to be transparent
+	 norm! l
+
+	else
+	 " usual replace character
+	 exe "norm! r".chr."l"
+	endif
+  	let iblock = iblock + 1
+  endwhile
+  call s:RestorePosn()
+
+"  call Dret("s:PutBlock")
+endfun
+
+" ---------------------------------------------------------------------
+" s:AutoCanvas: automatic "Canvas" routine {{{2
+fun! s:AutoCanvas(linestart,linestop,cols)
+"  call Dfunc("s:AutoCanvas(linestart=".a:linestart." linestop=".a:linestop." cols=".a:cols.")  line($)=".line("$"))
+
+  " insure there's enough blank lines at end-of-file
+  if line("$") < a:linestop
+"   call Decho("append ".(a:linestop - line("$"))." empty lines")
+   call s:SavePosn()
+   exe "norm! G".(a:linestop - line("$"))."o\<esc>"
+   call s:RestorePosn()
+  endif
+
+  " insure that any tabs contained within the selected region are converted to blanks
+  let etkeep= &et
+  set et
+"  call Decho("exe ".a:linestart.",".a:linestop."retab")
+  exe a:linestart.",".a:linestop."retab"
+  let &et= etkeep
+
+  " insure that there's whitespace to textwidth/screenwidth/a:cols
+  if a:cols <= 0
+   let tw= &tw
+   if tw <= 0
+    let tw= &columns
+   endif
+  else
+   let tw= a:cols
+  endif
+"  Decho("tw=".tw)
+  if search('^$\|.\%<'.(tw+1).'v$',"cn",(a:linestop+1)) > 0
+"   call Decho("append trailing whitespace")
+   call s:Spacer(a:linestart,a:linestop,tw)
+  endif
+
+"  call Dret("s:AutoCanvas : tw=".tw)
+endfun
+
+" =====================================================================
+"  DrawIt Functions: (by Sylvain Viart) {{{1
+" =====================================================================
+
+" ---------------------------------------------------------------------
+" s:Canvas: {{{2
+fun! s:Canvas()
+"  call Dfunc("s:Canvas()")
+
+  let lines  = input("how many lines under the cursor? ")
+  let curline= line('.')
+  if curline < line('$')
+   exe "norm! ".lines."o\<esc>"
+  endif
+  call s:Spacer(curline+1,curline+lines,0)
+  let b:drawit_canvas_used= 1
+
+"  call Dret("s:Canvas")
+endf
+
+" ---------------------------------------------------------------------
+" s:Spacer: fill end of line with space {{{2
+"         if a:cols >0: to the virtual column specified by a:cols
+"                  <=0: to textwidth (if nonzero), otherwise
+"                       to display width (&columns)
+fun! s:Spacer(debut, fin, cols) range
+"  call Dfunc("s:Spacer(debut=".a:debut." fin=".a:fin." cols=".a:cols.")")
+  call s:SavePosn()
+
+  if a:cols <= 0
+   let width = &textwidth
+   if width <= 0
+    let width= &columns
+   endif
+  else
+   let width= a:cols
+  endif
+
+  let l= a:debut
+  while l <= a:fin
+   call setline(l,printf('%-'.width.'s',getline(l)))
+   let l = l + 1
+  endwhile
+
+  call s:RestorePosn()
+
+"  call Dret("s:Spacer")
+endf
+
+" ---------------------------------------------------------------------
+" s:CallBox: call the specified function using the current visual selection box {{{2
+fun! s:CallBox(func_name)
+"  call Dfunc("s:CallBox(func_name<".a:func_name.">)")
+
+  let xdep = b:xmouse_start
+  let ydep = b:ymouse_start
+  let col0   = virtcol("'<")
+  let row0   = line("'<")
+  let col1   = virtcol("'>")
+  let row1   = line("'>")
+"  call Decho("TL corner[".row0.",".col0."] original")
+"  call Decho("BR corner[".row1.",".col1."] original")
+"  call Decho("xydep     [".ydep.",".xdep."]")
+
+  if col1 == xdep && row1 == ydep
+     let col1 = col0
+     let row1 = row0
+     let col0 = xdep
+     let row0 = ydep
+  endif
+"  call Decho("TL corner[".row0.",".col0."]")
+"  call Decho("BR corner[".row1.",".col1."]")
+
+  " insure that the selected region has blanks to that specified by col1
+  call s:AutoCanvas((row0 < row1)? row0 : row1,(row1 > row0)? row1 : row0,(col1 > col0)? col1 : col0)
+
+"  call Decho("exe call s:".a:func_name."(".col0.','.row0.','.col1.','.row1.")")
+  exe "call s:".a:func_name."(".col0.','.row0.','.col1.','.row1.")"
+  let b:xmouse_start= 0
+  let b:ymouse_start= 0
+
+"  call Dret("s:CallBox")
+endf
+
+" ---------------------------------------------------------------------
+" s:DrawBox: {{{2
+fun! s:DrawBox(x0, y0, x1, y1)
+"  call Dfunc("s:DrawBox(xy0[".a:x0.",".a:y0." xy1[".a:x1.",".a:y1."])")
+   " loop each line
+   let l = a:y0
+   while l <= a:y1
+      let c = a:x0
+      while c <= a:x1
+         if l == a:y0 || l == a:y1
+            let remp = '-'
+            if c == a:x0 || c == a:x1
+               let remp = '+'
+            endif
+         else
+            let remp = '|'
+            if c != a:x0 && c != a:x1
+               let remp = '.'
+            endif
+         endif
+
+         if remp != '.'
+            call s:SetCharAt(remp, c, l)
+         endif
+         let c  = c + 1
+      endw
+      let l = l + 1
+   endw
+
+"  call Dret("s:DrawBox")
+endf
+
+" ---------------------------------------------------------------------
+" s:SetCharAt: set the character at the specified position (must exist) {{{2
+fun! s:SetCharAt(char, x, y)
+"  call Dfunc("s:SetCharAt(char<".a:char."> xy[".a:x.",".a:y."])")
+
+  let content = getline(a:y)
+  let long    = strlen(content)
+  let deb     = strpart(content, 0, a:x - 1)
+  let fin     = strpart(content, a:x, long)
+  call setline(a:y, deb.a:char.fin)
+
+"  call Dret("s:SetCharAt")
+endf
+
+" ---------------------------------------------------------------------
+" s:DrawLine: Bresenham line-drawing algorithm {{{2
+" taken from :
+" http://www.graphics.lcs.mit.edu/~mcmillan/comp136/Lecture6/Lines.html
+fun! s:DrawLine(x0, y0, x1, y1, horiz)
+"  call Dfunc("s:DrawLine(xy0[".a:x0.",".a:y0."] xy1[".a:x1.",".a:y1."] horiz=".a:horiz.")")
+
+  if ( a:x0 < a:x1 && a:y0 > a:y1 ) || ( a:x0 > a:x1 && a:y0 > a:y1 )
+    " swap direction
+    let x0   = a:x1
+    let y0   = a:y1
+    let x1   = a:x0
+    let y1   = a:y0
+  else
+    let x0 = a:x0
+    let y0 = a:y0
+    let x1 = a:x1
+    let y1 = a:y1
+  endif
+  let dy = y1 - y0
+  let dx = x1 - x0
+
+  if dy < 0
+     let dy    = -dy
+     let stepy = -1
+  else
+     let stepy = 1
+  endif
+
+  if dx < 0
+     let dx    = -dx
+     let stepx = -1
+  else
+     let stepx = 1
+  endif
+
+  let dy = 2*dy
+  let dx = 2*dx
+
+  if dx > dy
+     " move under x
+     let char = a:horiz
+     call s:SetCharAt(char, x0, y0)
+     let fraction = dy - (dx / 2)  " same as 2*dy - dx
+     while x0 != x1
+        let char = a:horiz
+        if fraction >= 0
+           if stepx > 0
+              let char = '\'
+           else
+              let char = '/'
+           endif
+           let y0 = y0 + stepy
+           let fraction = fraction - dx    " same as fraction -= 2*dx
+        endif
+        let x0 = x0 + stepx
+        let fraction = fraction + dy	" same as fraction = fraction - 2*dy
+        call s:SetCharAt(char, x0, y0)
+     endw
+  else
+     " move under y
+     let char = '|'
+     call s:SetCharAt(char, x0, y0)
+     let fraction = dx - (dy / 2)
+     while y0 != y1
+        let char = '|'
+        if fraction >= 0
+           if stepy > 0 || stepx < 0
+              let char = '\'
+           else
+              let char = '/'
+           endif
+           let x0 = x0 + stepx
+           let fraction = fraction - dy
+        endif
+        let y0 = y0 + stepy
+        let fraction = fraction + dx
+        call s:SetCharAt(char, x0, y0)
+     endw
+  endif
+
+"  call Dret("s:DrawLine")
+endf
+
+" ---------------------------------------------------------------------
+" s:Arrow: {{{2
+fun! s:Arrow(x0, y0, x1, y1)
+"  call Dfunc("s:Arrow(xy0[".a:x0.",".a:y0."] xy1[".a:x1.",".a:y1."])")
+
+  call s:DrawLine(a:x0, a:y0, a:x1, a:y1,'-')
+  let dy = a:y1 - a:y0
+  let dx = a:x1 - a:x0
+  if s:Abs(dx) > <SID>Abs(dy)
+     " move x
+     if dx > 0
+        call s:SetCharAt('>', a:x1, a:y1)
+     else
+        call s:SetCharAt('<', a:x1, a:y1)
+     endif
+  else
+     " move y
+     if dy > 0
+        call s:SetCharAt('v', a:x1, a:y1)
+     else
+        call s:SetCharAt('^', a:x1, a:y1)
+     endif
+  endif
+
+"  call Dret("s:Arrow")
+endf
+
+" ---------------------------------------------------------------------
+" s:Abs: return absolute value {{{2
+fun! s:Abs(val)
+  if a:val < 0
+   return - a:val
+  else
+   return a:val
+  endif
+endf
+
+" ---------------------------------------------------------------------
+" s:DrawPlainLine: {{{2
+fun! s:DrawPlainLine(x0,y0,x1,y1)
+"  call Dfunc("s:DrawPlainLine(xy0[".a:x0.",".a:y0."] xy1[".a:x1.",".a:y1."])")
+
+"   call Decho("exe call s:DrawLine(".a:x0.','.a:y0.','.a:x1.','.a:y1.',"_")')
+   exe "call s:DrawLine(".a:x0.','.a:y0.','.a:x1.','.a:y1.',"_")'
+
+"  call Dret("s:DrawPlainLine")
+endf
+
+" =====================================================================
+"  Mouse Functions: {{{1
+" =====================================================================
+
+" ---------------------------------------------------------------------
+" s:LeftStart: Read visual drag mapping {{{2
+" The visual start point is saved in b:xmouse_start and b:ymouse_start
+fun! s:LeftStart()
+"  call Dfunc("s:LeftStart()")
+  let b:xmouse_start = virtcol('.')
+  let b:ymouse_start = line('.')
+  vnoremap <silent> <leftrelease> <leftrelease>:<c-u>call <SID>LeftRelease()<cr>gv
+"  call Dret("s:LeftStart : [".b:ymouse_start.",".b:xmouse_start."]")
+endf!
+
+" ---------------------------------------------------------------------
+" s:LeftRelease: {{{2
+fun! s:LeftRelease()
+"  call Dfunc("s:LeftRelease()")
+  vunmap <leftrelease>
+"  call Dret("s:LeftRelease : [".line('.').','.virtcol('.').']')
+endf
+
+" ---------------------------------------------------------------------
+" s:SLeftStart: begin drawing with a brush {{{2
+fun! s:SLeftStart()
+  if !exists("b:drawit_brush")
+   let b:drawit_brush= "a"
+  endif
+"  call Dfunc("s:SLeftStart() brush=".b:drawit_brush.' ['.line('.').','.virtcol('.').']')
+  noremap <silent> <s-leftdrag>    <leftmouse>:<c-u>call <SID>SLeftDrag()<cr>
+  noremap <silent> <s-leftrelease> <leftmouse>:<c-u>call <SID>SLeftRelease()<cr>
+"  call Dret("s:SLeftStart")
+endfun
+
+" ---------------------------------------------------------------------
+" s:SLeftDrag: {{{2
+fun! s:SLeftDrag()
+"  call Dfunc("s:SLeftDrag() brush=".b:drawit_brush.' ['.line('.').','.virtcol('.').']')
+  call s:SavePosn()
+  call s:PutBlock(b:drawit_brush,0)
+  call s:RestorePosn()
+"  call Dret("s:SLeftDrag")
+endfun
+
+" ---------------------------------------------------------------------
+" s:SLeftRelease: {{{2
+fun! s:SLeftRelease()
+"  call Dfunc("s:SLeftRelease() brush=".b:drawit_brush.' ['.line('.').','.virtcol('.').']')
+  call s:SLeftDrag()
+  nunmap <s-leftdrag>
+  nunmap <s-leftrelease>
+"  call Dret("s:SLeftRelease")
+endfun
+
+" ---------------------------------------------------------------------
+" s:CLeftStart: begin moving a block of text {{{2
+fun! s:CLeftStart()
+  if !exists("b:drawit_brush")
+   let b:drawit_brush= "a"
+  endif
+"  call Dfunc("s:CLeftStart() brush=".b:drawit_brush)
+  if !line("'<") || !line("'>")
+   redraw!
+   echohl Error
+   echo "must visual-block select a region first"
+"   call Dret("s:CLeftStart : must visual-block select a region first")
+   return
+  endif
+  '<,'>call DrawIt#SetBrush(b:drawit_brush)
+  let s:cleft_width= virtcol("'>") - virtcol("'<")
+  if s:cleft_width < 0
+   let s:cleft_width= -s:cleft_width
+  endif
+  let s:cleft_height= line("'>") - line("'<")
+  if s:cleft_height < 0
+   let s:cleft_height= -s:cleft_height
+  endif
+"  call Decho("blocksize: ".s:cleft_height."x".s:cleft_width)
+  noremap <silent> <c-leftdrag>    :<c-u>call <SID>CLeftDrag()<cr>
+  noremap <silent> <c-leftrelease> <leftmouse>:<c-u>call <SID>CLeftRelease()<cr>
+"  call Dret("s:CLeftStart")
+endfun
+
+" ---------------------------------------------------------------------
+" s:CLeftDrag: {{{2
+fun! s:CLeftDrag()
+"  call Dfunc("s:CLeftDrag() cleft_width=".s:cleft_width." cleft_height=".s:cleft_height)
+  exe 'let keepbrush= @'.b:drawit_brush
+"  call Decho("keepbrush<".keepbrush.">")
+
+  " restore prior contents of block zone
+  if exists("s:cleft_oldblock")
+"   call Decho("draw prior contents: [".line(".").",".virtcol(".")."] line($)=".line("$"))
+"   call Decho("draw prior contents<".s:cleft_oldblock.">")
+   exe 'let @'.b:drawit_brush.'=s:cleft_oldblock'
+   call s:PutBlock(b:drawit_brush,1)
+  else
+   " first move; put blanks where text had been
+"   call Decho("first move, put blanks where text was")
+   norm! gvr 
+  endif
+
+  " move cursor to <leftmouse> position
+  exe "norm! \<leftmouse>"
+
+  " save new block zone contents
+"  call Decho("save contents: [".line(".").",".virtcol(".")."] - [".(line(".")+s:cleft_height).",".(virtcol(".")+s:cleft_width)."]")
+  let curline= line(".")
+  call s:AutoCanvas(curline,curline + s:cleft_height,virtcol(".")+s:cleft_width)
+  if s:cleft_width > 0 && s:cleft_height > 0
+   exe "silent! norm! \<c-v>".s:cleft_width."l".s:cleft_height.'j"'.b:drawit_brush.'y'
+  elseif s:cleft_width > 0
+   exe "silent! norm! \<c-v>".s:cleft_width.'l"'.b:drawit_brush.'y'
+  else
+   exe "silent! norm! \<c-v>".s:cleft_height.'j"'.b:drawit_brush.'y'
+  endif
+  exe "let s:cleft_oldblock= @".b:drawit_brush
+"  call Decho("cleft_height=".s:cleft_height." cleft_width=".s:cleft_width)
+"  call Decho("save contents<".s:cleft_oldblock.">")
+
+  " draw the brush
+"  call Decho("draw brush")
+"  call Decho("draw brush ".b:drawit_brush.": [".line(".").",".virtcol(".")."] line($)=".line("$"))
+  exe 'let @'.b:drawit_brush.'=keepbrush'
+  call s:PutBlock(b:drawit_brush,1)
+
+"  call Dret("s:CLeftDrag")
+endfun
+
+" ---------------------------------------------------------------------
+" s:CLeftRelease: {{{2
+fun! s:CLeftRelease()
+"  call Dfunc("s:CLeftRelease()")
+  call s:CLeftDrag()
+  nunmap <c-leftdrag>
+  nunmap <c-leftrelease>
+  unlet s:cleft_oldblock s:cleft_height s:cleft_width
+"  call Dret("s:CLeftRelease")
+endfun
+
+" ---------------------------------------------------------------------
+" DrawIt#SetBrush: {{{2
+fun! DrawIt#SetBrush(brush) range
+"  call Dfunc("DrawIt#SetBrush(brush<".a:brush.">)")
+  let b:drawit_brush= a:brush
+"  call Decho("visualmode<".visualmode()."> range[".a:firstline.",".a:lastline."] visrange[".line("'<").",".line("'>")."]")
+  if visualmode() == "\<c-v>" && ((a:firstline == line("'>") && a:lastline == line("'<")) || (a:firstline == line("'<") && a:lastline == line("'>")))
+   " last visual mode was visual block mode, and
+   " either [firstline,lastline] == ['<,'>] or ['>,'<]
+   " Assuming that SetBrush called from a visual-block selection!
+   " Yank visual block into selected register (brush)
+"   call Decho("yanking visual block into register ".b:drawit_brush)
+   exe 'norm! gv"'.b:drawit_brush.'y'
+  endif
+"  call Dret("DrawIt#SetBrush : b:drawit_brush=".b:drawit_brush)
+endfun
+
+" ------------------------------------------------------------------------
+" Modelines: {{{1
+" vim: fdm=marker
+let &cpo= s:keepcpo
+unlet s:keepcpo
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/.vim/autoload/textformat.vim	Tue May 03 08:57:01 2011 +0200
@@ -0,0 +1,610 @@
+" Text formatter plugin for Vim text editor
+"
+" Version:              2.1
+" Last Change:          2008-09-13
+" Maintainer:           Teemu Likonen <tlikonen@iki.fi>
+" License:              This file is placed in the public domain.
+" GetLatestVimScripts:  2324 1 :AutoInstall: TextFormat
+
+"{{{1 The beginning stuff
+if &compatible
+	finish
+endif
+let s:save_cpo = &cpo
+set cpo&vim
+
+" Constant variables(s) {{{1
+let s:default_width = 80
+
+function! s:Align_Range_Left(...) range "{{{1
+	" The optional parameter is the left indent. If it is not given we
+	" detect the indent used in the buffer.
+	if a:0 && a:1 >= 0
+		" The parameter was given so we just use that as the left
+		" indent.
+		let l:leading_ws = s:Retab_Indent(a:1)
+		for l:line in range(a:firstline,a:lastline)
+			let l:line_string = getline(l:line)
+			let l:line_replace = s:Align_String_Left(l:line_string)
+			if &formatoptions =~ 'w' && l:line_string =~ '\m\s$'
+				" Preserve trailing whitespace because fo=~w
+				let l:line_replace .= ' '
+			endif
+			if l:line_replace =~ '\m^\s*$'
+				call setline(l:line,'')
+			else
+				call setline(l:line,l:leading_ws.l:line_replace)
+			endif
+		endfor
+	else
+		" The parameter was not given so we detect each paragraph's
+		" indent.
+		let l:line = a:firstline
+		while l:line <= a:lastline
+			let l:line_string = getline(l:line)
+			if l:line_string =~ '\m^\s*$'
+				" The line is empty or contains only
+				" whitespaces so print empty line and
+				" continue.
+				call setline(l:line,'')
+				let l:line += 1
+				continue
+			endif
+
+			" Paragraph (or the whole line range) begins here so
+			" get the indent of the first line and print the line.
+			let l:leading_ws = s:Retab_Indent(indent(l:line))
+			let l:line_replace = s:Align_String_Left(l:line_string)
+			if &formatoptions =~ 'w' && l:line_string =~ '\m\s$'
+				let l:line_replace .= ' '
+			endif
+			call setline(l:line,l:leading_ws.l:line_replace)
+			let l:line += 1
+
+			" If fo=~w, does the paragraph end here? If yes,
+			" continue to next round and find a new first line.
+			if &formatoptions =~ 'w' && l:line_string =~ '\m\S$'
+				continue
+			endif
+
+			" If fo=~2 get the indent of the second line
+			if &formatoptions =~ '2'
+				let l:leading_ws = s:Retab_Indent(indent(l:line))
+			endif
+
+			" This loop will go through all the lines in the
+			" paragraph (or till the a:lastline) - starting from
+			" the second line.
+			while l:line <= a:lastline && getline(l:line) !~ '\m^\s*$'
+				let l:line_string = getline(l:line)
+				let l:line_replace = s:Align_String_Left(l:line_string)
+				if &formatoptions =~ 'w'
+					if l:line_string =~ '\m\s$'
+						call setline(l:line,l:leading_ws.l:line_replace.' ')
+						let l:line += 1
+						continue
+					else
+						call setline(l:line,l:leading_ws.l:line_replace)
+						let l:line += 1
+						" fo=~w and paragraph ends
+						" here so we break the loop.
+						" The next line is new first
+						" line.
+						break
+					endif
+				else
+					call setline(l:line,l:leading_ws.l:line_replace)
+					let l:line += 1
+				endif
+			endwhile
+		endwhile
+	endif
+endfunction
+
+function! s:Align_Range_Right(width) "{{{1
+	let l:line_replace = s:Align_String_Right(getline('.'),a:width)
+	if &formatoptions =~ 'w' && getline('.') =~ '\m\s$'
+		let l:line_replace .= ' '
+	endif
+	if l:line_replace =~ '\m^\s*$'
+		" If line would be full of spaces just print empty line.
+		call setline(line('.'),'')
+	else
+		" Retab leading whitespaces
+		let l:leading_ws = s:Retab_Indent(strlen(substitute(l:line_replace,'\v^( *).*$','\1','')))
+		" Get the rest of the line
+		let l:line_replace = substitute(l:line_replace,'^ *','','')
+		call setline(line('.'),l:leading_ws.l:line_replace)
+	endif
+endfunction
+
+function! s:Align_Range_Justify(width, ...) range "{{{1
+	" If the optional second argument is given (and is non-zero) each
+	" paragraph's last line and range's last line is left-aligned.
+	if a:0 && a:1
+		let l:paragraph = 1
+	else
+		let l:paragraph = 0
+	endif
+	let l:line = a:firstline
+	while l:line <= a:lastline
+		let l:line_string = getline(l:line)
+		if l:line_string =~ '\m^\s*$'
+			" The line is empty or contains only
+			" whitespaces so print empty line and
+			" continue.
+			call setline(l:line,'')
+			let l:line += 1
+			continue
+		endif
+
+		" Paragraph (or the whole line range) begins here so
+		" get the indent of the first line and print the line.
+		let l:indent = indent(l:line)
+		let l:width = a:width - l:indent
+		let l:leading_ws = s:Retab_Indent(l:indent)
+
+		if l:paragraph && (l:line == a:lastline || getline(l:line+1) =~ '\m^\s*$' || (&formatoptions =~ 'w' && l:line_string =~ '\m\S$'))
+			let l:line_replace = s:Align_String_Left(l:line_string)
+		else
+			let l:line_replace = s:Align_String_Justify(l:line_string,l:width)
+		endif
+		if &formatoptions =~ 'w' && l:line_string =~ '\m\s$'
+			let l:line_replace .= ' '
+		endif
+		call setline(l:line,l:leading_ws.l:line_replace)
+		let l:line += 1
+
+		" If fo=~w, does the paragraph end here? If yes,
+		" continue to next round and find a new first line.
+		if &formatoptions =~ 'w' && l:line_string =~ '\m\S$'
+			continue
+		endif
+
+		" If fo=~2 get the indent of the second line
+		if &formatoptions =~ '2'
+			let l:indent = indent(l:line)
+			let l:width = a:width - l:indent
+			let l:leading_ws = s:Retab_Indent(l:indent)
+		endif
+
+		" This loop will go through all the lines in the
+		" paragraph (or till the a:lastline) - starting from
+		" paragraph's second line.
+		while l:line <= a:lastline && getline(l:line) !~ '\m^\s*$'
+			let l:line_string = getline(l:line)
+			if l:paragraph && (l:line == a:lastline || getline(l:line+1) =~ '\m^\s*$' || (&formatoptions =~ 'w' && l:line_string =~ '\m\S$'))
+				let l:line_replace = s:Align_String_Left(l:line_string)
+			else
+				let l:line_replace = s:Align_String_Justify(l:line_string,l:width)
+			endif
+			if &formatoptions =~ 'w'
+				if l:line_string =~ '\m\s$'
+					call setline(l:line,l:leading_ws.l:line_replace.' ')
+					let l:line += 1
+					continue
+				else
+					call setline(l:line,l:leading_ws.l:line_replace)
+					let l:line += 1
+					" fo=~w and paragraph ends
+					" here so we break the loop.
+					" The next line is new first
+					" line.
+					break
+				endif
+			else
+				call setline(l:line,l:leading_ws.l:line_replace)
+				let l:line += 1
+			endif
+		endwhile
+	endwhile
+endfunction
+
+function! s:Align_Range_Center(width) "{{{1
+	let l:line_replace = s:Truncate_Spaces(getline('.'))
+	let l:line_replace = s:Add_Double_Spacing(l:line_replace)
+	if &formatoptions =~ 'w' && getline('.') =~ '\m\s$'
+		let l:line_replace .= ' '
+	endif
+	call setline(line('.'),l:line_replace)
+	execute '.center '.a:width
+endfunction
+
+function! s:Align_String_Left(string) "{{{1
+	let l:string_replace = s:Truncate_Spaces(a:string)
+	let l:string_replace = s:Add_Double_Spacing(l:string_replace)
+	return l:string_replace
+endfunction
+
+function! s:Align_String_Right(string, width) "{{{1
+	let l:string_replace = s:Truncate_Spaces(a:string)
+	let l:string_replace = s:Add_Double_Spacing(l:string_replace)
+	let l:string_width = s:String_Width(l:string_replace)
+	let l:more_spaces = a:width-l:string_width
+	return repeat(' ',l:more_spaces).l:string_replace
+endfunction
+
+function! s:Align_String_Justify(string, width) "{{{1
+	let l:string = s:Truncate_Spaces(a:string)
+	" If the parameter string is empty we can just return a line full of
+	" spaces. No need to go further.
+	if l:string =~ '\m^ *$'
+		return repeat(' ',a:width)
+	endif
+	if s:String_Width(s:Add_Double_Spacing(l:string)) >= a:width
+		" The original string is longer than width so we can just
+		" return the string. No need to go further.
+		return s:Add_Double_Spacing(l:string)
+	endif
+	let l:string_width = s:String_Width(l:string)
+
+	" This many extra spaces we need.
+	let l:more_spaces = a:width-l:string_width
+	" Convert the string to a list of words.
+	let l:word_list = split(l:string)
+	" This is the amount of spaces available in the original string (word
+	" count minus one).
+	let l:string_spaces = len(l:word_list)-1
+	" If there are no spaces there is only one word. We can just return
+	" the string with padded spaces. No need to go further.
+	if l:string_spaces == 0
+		return l:string.repeat(' ',l:more_spaces)
+	endif
+	" Ok, there are more than one word in the string so we get to do some
+	" real work...
+
+	" Make a list of which each item represent a space available in the
+	" string. The value means how many spaces there are. At the moment set
+	" every list item to one: [1, 1, 1, 1, ...]
+	let l:space_list = []
+	for l:item in range(l:string_spaces)
+		let l:space_list += [1]
+	endfor
+
+	" Repeat while there are no more need to add any spaces.
+	while l:more_spaces > 0
+		if l:more_spaces >= l:string_spaces
+			" More extra spaces are needed than there are spaces
+			" available in the string so we add one more space 
+			" after every word (add 1 to items of space list).
+			for l:i in range(l:string_spaces)
+				let l:space_list[l:i] += 1
+			endfor
+			let l:more_spaces -= l:string_spaces
+			" And then another round... and a check if more spaces
+			" are needed.
+		else " l:more_spaces < l:string_spaces
+			" This list tells where .?! characters are.
+			let l:space_sentence_full = []
+			" This list tells where ,:; characters are.
+			let l:space_sentence_semi = []
+			" And this is for the rest of spaces.
+			let l:space_other = []
+			" Now, find those things:
+			for l:i in range(l:string_spaces)
+				if l:word_list[l:i] =~ '\m\S[.?!]$'
+					let l:space_sentence_full += [l:i]
+				elseif l:word_list[l:i] =~ '\m\S[,:;]$'
+					let l:space_sentence_semi += [l:i]
+				else
+					let l:space_other += [l:i]
+				endif
+			endfor
+
+			" First distribute spaces after .?!
+			if l:more_spaces >= len(l:space_sentence_full)
+				" If we need more extra spaces than there are
+				" .?! spaces, just add one after every item.
+				for l:i in l:space_sentence_full
+					let l:space_list[l:i] += 1
+				endfor
+				let l:more_spaces -= len(l:space_sentence_full)
+				if l:more_spaces == 0 | break | endif
+			else
+				" Distribute the rest of spaces evenly and
+				" break the loop. All the spaces have been
+				" added.
+				for l:i in s:Distributed_Selection(l:space_sentence_full,l:more_spaces)
+					let l:space_list[l:i] +=1
+				endfor
+				break
+			endif
+
+			" Then distribute spaces after ,:;
+			if l:more_spaces >= len(l:space_sentence_semi)
+				" If we need more extra spaces than there are
+				" ,:; spaces available, just add one after
+				" every item.
+				for l:i in l:space_sentence_semi
+					let l:space_list[l:i] += 1
+				endfor
+				let l:more_spaces -= len(l:space_sentence_semi)
+				if l:more_spaces == 0 | break | endif
+			else
+				" Distribute the rest of spaces evenly and
+				" break the loop. All the spaces have been
+				" added.
+				for l:i in s:Distributed_Selection(l:space_sentence_semi,l:more_spaces)
+					let l:space_list[l:i] +=1
+				endfor
+				break
+			endif
+
+			" Finally distribute spaces to other available
+			" positions and exit the loop.
+			for l:i in s:Distributed_Selection(l:space_other,l:more_spaces)
+				let l:space_list[l:i] +=1
+			endfor
+			break
+		endif
+	endwhile
+
+	" Now we now where all the extra spaces will go. We have to construct
+	" the string again.
+	let l:string = ''
+	for l:item in range(l:string_spaces)
+		let l:string .= l:word_list[l:item].repeat(' ',l:space_list[l:item])
+	endfor
+	" Add the last word to the end and return the string.
+	return l:string.l:word_list[-1]
+endfunction
+
+function! s:Truncate_Spaces(string) "{{{1
+	let l:string = substitute(a:string,'\v\s+',' ','g')
+	let l:string = substitute(l:string,'\m^\s*','','')
+	let l:string = substitute(l:string,'\m\s*$','','')
+	return l:string
+endfunction
+
+function! s:String_Width(string) "{{{1
+	" This counts the string width in characters. Combining diacritical
+	" marks do not count so the base character with all the combined
+	" diacritics is just one character (which is good for our purposes).
+	" Double-wide characters will not get double width so unfortunately
+	" they don't work in our algorithm.
+	return strlen(substitute(a:string,'\m.','x','g'))
+endfunction
+
+function! s:Add_Double_Spacing(string) "{{{1
+	if &joinspaces
+		return substitute(a:string,'\m\S[.?!] ','& ','g')
+	else
+		return a:string
+	endif
+endfunction
+
+function! s:Distributed_Selection(list, pick) "{{{1
+	" 'list' is a list-type variable [ item1, item2, ... ]
+	" 'pick' is a number how many of the list's items we want to choose
+	"
+	" This function returns a list which has 'pick' number of items from
+	" the original list. Items are chosen in distributed manner. For
+	" example, if 'pick' is 1 then the algorithm chooses an item near the
+	" center of the 'list'. If 'pick' is 2 then the first one is about 1/3
+	" from the beginning and the another one about 2/3 from the beginning.
+
+	" l:pick_list is a list of 0's and 1's and its length will be the
+	" same as original list's. Number 1 means that this list item will be
+	" picked and 0 means that the item will be dropped. Finally
+	" l:pick_list could look like this: [0, 1, 0, 1, 0]
+	" (i.e., two items evenly picked from a list of five items)
+	let l:pick_list = []
+
+	" First pick items evenly from the beginning of the list. This also
+	" actually constructs the list.
+	let l:div1 = len(a:list) / a:pick
+	let l:mod1 = len(a:list) % a:pick
+	for l:i in range(len(a:list)-l:mod1)
+		if !eval(l:i%l:div1)
+			let l:pick_list += [1]
+		else
+			let l:pick_list += [0]
+		endif
+	endfor
+
+	if l:mod1 > 0
+		" The division wasn't even so we get the remaining items and
+		" distribute them evenly again to the list.
+		let l:div2 = len(l:pick_list) / l:mod1
+		let l:mod2 = len(l:pick_list) % l:mod1
+		for l:i in range(len(l:pick_list)-l:mod2)
+			if !eval(l:i%l:div2)
+				call insert(l:pick_list,0,l:i)
+			endif
+		endfor
+	endif
+
+	" There may be very different number of zeros in the beginning and the
+	" end of the list. We count them.
+	let l:zeros_begin = 0
+	for l:i in l:pick_list
+		if l:i == 0
+			let l:zeros_begin += 1
+		else
+			break
+		endif
+	endfor
+	let l:zeros_end = 0
+	for l:i in reverse(copy(l:pick_list))
+		if l:i == 0
+			let l:zeros_end += 1
+		else
+			break
+		endif
+	endfor
+
+	" Then we remove them.
+	if l:zeros_end
+		" Remove "0" items from the end. We need to remove them first
+		" from the end because list items' index number will change
+		" when items are removed from the beginning. Then it would be
+		" more difficult to remove trailing zeros.
+		call remove(l:pick_list,len(l:pick_list)-l:zeros_end,-1)
+	endif
+	if l:zeros_begin
+		" Remove zero items from the beginning.
+		call remove(l:pick_list,0,l:zeros_begin-1)
+	endif
+	let l:zeros_both = l:zeros_begin + l:zeros_end
+
+	" Put even amount of zeros to beginning and end
+	for l:i in range(l:zeros_both/2)
+		call insert(l:pick_list,0,0)
+	endfor
+	for l:i in range((l:zeros_both/2)+(l:zeros_both%2))
+		call add(l:pick_list,0)
+	endfor
+
+	" Finally construct and return a new list which has only the items we
+	" have chosen.
+	let l:new_list = []
+	for l:i in range(len(l:pick_list))
+		if l:pick_list[l:i] == 1
+			let l:new_list += [a:list[l:i]]
+		endif
+	endfor
+	return l:new_list
+endfunction
+
+function! s:Retab_Indent(column) "{{{1
+	" column = the left indent column starting from 0 Function returns
+	" a string of whitespaces, a mixture of tabs and spaces depending on
+	" the 'expandtab' and 'tabstop' options.
+	if &expandtab
+		" Only spaces
+		return repeat(' ',a:column)
+	else
+		" Tabs and spaces
+		let l:tabs = a:column / &tabstop
+		let l:spaces = a:column % &tabstop
+		return repeat("\<Tab>",l:tabs).repeat(' ',l:spaces)
+	endif
+endfunction
+
+function! s:Reformat_Range(...) range "{{{1
+	if a:0 == 2
+		let l:first = a:1
+		let l:last = a:2
+	else
+		let l:first = a:firstline
+		let l:last = a:lastline
+	endif
+	let l:autoindent = &autoindent
+	setlocal autoindent
+	execute l:first
+	normal! 0
+	execute 'normal! V'.l:last.'G$gw'
+	let &l:autoindent = l:autoindent
+	" The formatting may change the last line of the range so we return
+	" it.
+	return line("'>")
+endfunction
+
+function! textformat#Visual_Align_Left() range "{{{1
+	execute a:firstline.','.a:lastline.'call s:Align_Range_Left()'
+	call s:Reformat_Range(a:firstline,a:lastline)
+endfunction
+
+function! textformat#Visual_Align_Right() range "{{{1
+	let l:width = &textwidth
+	if l:width == 0 | let l:width = s:default_width | endif
+
+	execute a:firstline.','.a:lastline.'call s:Align_Range_Right('.l:width.')'
+	normal! '>$
+endfunction
+
+function! textformat#Visual_Align_Justify() range "{{{1
+	let l:width = &textwidth
+	if l:width == 0 | let l:width = s:default_width | endif
+
+	execute a:firstline.','.a:lastline.'call s:Align_Range_Left()'
+
+	let l:last = s:Reformat_Range(a:firstline,a:lastline)
+	let l:pos = getpos('.')
+	execute a:firstline.','.l:last.'call s:Align_Range_Justify('.l:width.',1)'
+	call setpos('.',l:pos)
+endfunction
+
+function! textformat#Visual_Align_Center() range "{{{1
+	let l:width = &textwidth
+	if l:width == 0 | let l:width = s:default_width | endif
+
+	execute a:firstline.','.a:lastline.'call s:Align_Range_Center('.l:width.')'
+	normal! '>$
+endfunction
+
+function! textformat#Quick_Align_Left() "{{{1
+	let l:autoindent = &autoindent
+	setlocal autoindent
+	let l:pos = getpos('.')
+	silent normal! vip:call s:Align_Range_Left()
+	call setpos('.',l:pos)
+	silent normal! gwip
+	let &l:autoindent = l:autoindent
+endfunction
+
+function! textformat#Quick_Align_Right() "{{{1
+	let l:width = &textwidth
+	if l:width == 0 | let l:width = s:default_width | endif
+	let l:pos = getpos('.')
+	silent normal! vip:call s:Align_Range_Right(l:width)
+	call setpos('.',l:pos)
+endfunction
+
+function! textformat#Quick_Align_Justify() "{{{1
+	let l:width = &textwidth
+	if l:width == 0 | let l:width = s:default_width  | endif
+	let l:autoindent = &autoindent
+	setlocal autoindent
+	let l:pos = getpos('.')
+	silent normal! vip:call s:Align_Range_Left()
+	call setpos('.',l:pos)
+	silent normal! gwip
+	let l:pos = getpos('.')
+	silent normal! vip:call s:Align_Range_Justify(l:width,1)
+	call setpos('.',l:pos)
+	let &l:autoindent = l:autoindent
+endfunction
+
+function! textformat#Quick_Align_Center() "{{{1
+	let l:width = &textwidth
+	if l:width == 0 | let l:width = s:default_width  | endif
+	let l:pos = getpos('.')
+	silent normal! vip:call s:Align_Range_Center(l:width)
+	call setpos('.',l:pos)
+endfunction
+
+function! textformat#Align_Command(align, ...) range "{{{1
+	" For left align the optional parameter a:1 is [indent]. For others
+	" it's [width].
+	let l:pos = getpos('.')
+	if a:align ==? 'left'
+		if a:0 && a:1 >= 0
+			execute a:firstline.','.a:lastline.'call s:Align_Range_Left('.a:1.')'
+		else
+			execute a:firstline.','.a:lastline.'call s:Align_Range_Left()'
+		endif
+	else
+		if a:0 && a:1 > 0
+			let l:width = a:1
+		elseif &textwidth
+			let l:width = &textwidth
+		else
+			let l:width = s:default_width
+		endif
+
+		if a:align ==? 'right'
+			execute a:firstline.','.a:lastline.'call s:Align_Range_Right('.l:width.')'
+		elseif a:align ==? 'justify'
+			execute a:firstline.','.a:lastline.'call s:Align_Range_Justify('.l:width.')'
+		elseif a:align ==? 'center'
+			execute a:firstline.','.a:lastline.'call s:Align_Range_Center('.l:width.')'
+		endif
+	endif
+	call setpos('.',l:pos)
+endfunction
+
+"{{{1 The ending stuff
+let &cpo = s:save_cpo
+
+" vim600: fdm=marker
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/.vim/doc/DrawIt.txt	Tue May 03 08:57:01 2011 +0200
@@ -0,0 +1,393 @@
+*drawit.txt*	The DrawIt Tool				Jul 26, 2007
+
+Authors:  Charles E. Campbell, Jr.  <NdrchipO@ScampbellPfamily.AbizM> {{{1
+          Sylvain Viart             <molo@multimania.com>
+	  (remove NOSPAM from Campbell's email first)
+Copyright:    Copyright (C) 2004-2007 Charles E. Campbell, Jr. {{{1
+              Permission is hereby granted to use and distribute this code,
+              with or without modifications, provided that this copyright
+              notice is copied with it. Like anything else that's free,
+              DrawIt.vim is provided *as is* and comes with no warranty
+              of any kind, either expressed or implied. By using this
+              plugin, you agree that in no event will the copyright
+              holder be liable for any damages resulting from the use
+              of this software.
+
+
+==============================================================================
+1. Contents						*drawit-contents* {{{1
+
+	1. Contents......................: |drawit-contents|
+	2. DrawIt Manual.................: |drawit|
+	3. DrawIt Usage..................: |drawit-usage|
+	     Starting....................: |drawit-start|
+	     Stopping....................: |drawit-stop|
+	     User Map Protection.........: |drawit-protect|
+	     Drawing.....................: |drawit-drawing|
+	     Changing Drawing Characters.: |drawit-setdrawit|
+	     Moving......................: |drawit-moving|
+	     Erasing.....................: |drawit-erase|
+	     Example.....................: |drawit-example|
+	     Visual Block Mode...........: |drawit-visblock|
+	     Brushes.....................: |drawit-brush|
+	     DrawIt Modes................: |drawit-modes|
+	4. DrawIt History................: |drawit-history|
+
+
+==============================================================================
+2. DrawIt Manual					*drawit* {{{1
+							*drawit-manual*
+ /===============+============================================================\
+ || Starting &   |                                                           ||
+ || Stopping     | Explanation                                               ||
+ ++--------------+-----------------------------------------------------------++
+ ||  \di         | start DrawIt  |drawit-start|                              ||
+ ||  \ds         | stop  DrawIt  |drawit-stop|                               ||
+ ||  :DIstart    | start DrawIt  |drawit-start|                              ||
+ ||  :DIstop     | stop  DrawIt  |drawit-stop|                               ||
+ ||              |                                                           ||
+ ++==============+===========================================================++
+ ||   Maps       | Explanation                                               ||
+ ++--------------+-----------------------------------------------------------++
+ ||              | The DrawIt routines use a replace, move, and              ||
+ ||              | replace/insert strategy.  The package also lets one insert||
+ ||              | spaces, draw arrows by using the following characters or  ||
+ ||              | keypad characters:                                        ||
+ ||              +-----------------------------------------------------------++
+ || <left>       | move and draw left                       |drawit-drawing| ||
+ || <right>      | move and draw right, inserting lines/space as needed      ||
+ || <up>         | move and draw up, inserting lines/space as needed         ||
+ || <down>       | move and draw down, inserting lines/space as needed       ||
+ || <s-left>     | move cursor left                            |drawit-move| ||
+ || <s-right>    | move cursor right, inserting lines/space as needed        ||
+ || <s-up>       | move cursor up, inserting lines/space as needed           ||
+ || <s-down>     | move cursor down, inserting lines/space as needed         ||
+ || <space>      | toggle into and out of erase mode                         ||
+ || >            | insert a > and move right    (draw -> arrow)              ||
+ || <            | insert a < and move left     (draw <- arrow)              ||
+ || ^            | insert a ^ and move up       (draw ^  arrow)              ||
+ || v            | insert a v and move down     (draw v  arrow)              ||
+ || <pgdn>       | replace with a \, move down and right, and insert a \     ||
+ || <end>        | replace with a /, move down and left,  and insert a /     ||
+ || <pgup>       | replace with a /, move up   and right, and insert a /     ||
+ || <home>       | replace with a \, move up   and left,  and insert a \     ||
+ || \>           | insert a fat > and move right    (draw -> arrow)          ||
+ || \<           | insert a fat < and move left     (draw <- arrow)          ||
+ || \^           | insert a fat ^ and move up       (draw ^  arrow)          ||
+ || \v           | insert a fat v and move down     (draw v  arrow)          ||
+ ||<s-leftmouse> | drag and draw with current brush          |drawit-brush|  ||
+ ||<c-leftmouse> | drag and move current brush               |drawit-brush|  ||
+ ||              |                                                           ||
+ ||==============+===========================================================++
+ ||Visual Cmds   | Explanation                                               ||
+ ||--------------+-----------------------------------------------------------++
+ ||              | The drawing mode routines use visual-block mode to        ||
+ ||              | select endpoints for lines, arrows, and ellipses. Bresen- ||
+ ||              | ham and Bresenham-like algorithms are used for this.      ||
+ ||              |                                                           ||
+ ||              | These routines need a block of spaces, and so the canvas  ||
+ ||              | routine must first be used to create such a block.  The   ||
+ ||              | canvas routine will query the user for the number of      ||
+ ||              | lines to hold |'textwidth'| spaces.                       ||
+ ||              +-----------------------------------------------------------++
+ || \a           | draw arrow from corners of visual-block selected region   ||
+ || \b           | draw box on visual-block selected region                  ||
+ || \c           | the canvas routine (will query user, see above)           ||
+ || \e           | draw an ellipse on visual-block selected region           ||
+ || \f           | flood figure with a character (you will be prompted)      ||
+ || \l           | draw line from corners of visual-block selected region    ||
+ || \s           | spacer: appends spaces up to the textwidth (default: 78)  ||
+ ||              |                                                           ||
+ ++==============+===========================================================++
+ || Function and Explanation                                                 ||
+ ++--------------+-----------------------------------------------------------++
+ ||  :call SetDrawIt('vertical','horizontal','crossing','\','/','X','*')     ||
+ ||            set drawing characters for motions for moving                 ||
+ ||            and for the ellipse drawing boundary                          ||
+ ||  default   motion                                                        ||
+ ||  |         up/down,                                                      ||
+ ||  -         left/right,                                                   ||
+ ||  +         -| crossing,                                                  ||
+ ||  \         downright,                                                    ||
+ ||  /         downleft, and                                                 ||
+ ||  X         \/ crossing                                                   ||
+ ++=======================+==================================================++
+ ||  Commands             | Explanation                                      ||
+ ++-----------------------+--------------------------------------------------++
+ ||  :SetBrush a-z        | sets brush (register) to given register          || 
+ ||  :'<,'>SetBrush a-z   | yanks visual block to brush (register)           ||
+ \============================================================================/
+
+
+==============================================================================
+3. DrawIt Usage						*drawit-usage* {{{1
+
+STARTING						*drawit-start* {{{2
+\di
+
+Typically one puts <drawit.vim> into the .vim/plugin directory
+(vimfiles\plugin for Windows) where it becomes always available.  It uses a
+minimal interface (\di: you can think of it as *D*raw*I*t or *D*rawIt
+*I*nitialize) to start it and (\ds: *D*rawIt *S*top) to stop it.  Instead of
+using "\" you may specify your own preference for a map leader (see
+|mapleader|).
+
+A message, "[DrawIt]", will appear on the message line.
+
+
+STOPPING						*drawit-stop* {{{2
+\ds
+
+When you are done with DrawIt, use \ds to stop DrawIt mode.  Stopping DrawIt
+will restore your usual options and remove the maps DrawIt set up.
+
+A message, "[DrawIt off]", will appear on the message line.
+
+
+USER MAP PROTECTION					*drawit-protect* {{{2
+
+Starting DrawIt causes it to set up a number of maps which facilitate drawing.
+DrawIt accomodates users with conflicting maps by saving both maps and user
+options and before setting them to what DrawIt needs.  When you stop DrawIt
+(|drawit-stop|), DrawIt will restore the user's maps and options as they were
+before DrawIt was started.
+
+
+OPTIONS                                               	*drawit-options* {{{2
+
+							*g:drawit_insertmode*
+g:drawit_insertmode : if this variable exists and is 1 then maps are
+	              made which make cursor-control drawing available
+		      while in insert mode, too.  Otherwise, DrawIt's
+		      maps only affect normal mode.
+
+DRAWING							*drawit-drawing* {{{2
+
+After DrawIt is started, use the number pad or arrow keys to move the cursor
+about.  As the cursor moves, DrawIt will then leave appropriate "line"
+characters behind as you move horizontally, vertically, or diagonally, and
+will transparently enlarge your file to accommodate your drawing as needed.
+The trail will consist of -, |, \, / characters (depending on which direction
+and SetDrawIt() changes), and + and X characters where line crossings occur.
+You may use h-j-k-l to move about your display and generally use editing
+commands as you wish even while in DrawIt mode.
+
+
+CHANGING DRAWING CHARACTERS				*drawit-setdrawit* {{{2
+
+The SetDrawIt() function is available for those who wish to change the
+characters that DrawIt uses. >
+
+    ex. :call SetDrawIt('*','*','*','*','*','*','*')
+    ex. :call SetDrawIt('-','|','-','\','/','/','*')
+<
+The first example shows how to change all the DrawIt drawing characters to
+asterisks, and the second shows how to give crossing priority to - and /.
+The default setting is equivalent to: >
+
+	:call SetDrawIt('|','-','+','\','/','X','*')
+<
+where SetDrawit()'s arguments refer, in order, to the >
+
+	vertical			drawing character
+    	horizontal			drawing character
+    	horizontal/vertical crossing	drawing character
+    	down right			drawing character
+    	down left			drawing character
+    	diagonal crossing		drawing character
+	ellipse boundary                drawing character
+<
+
+MOVING					*drawit-move* *drawit-moving* {{{2
+
+DrawIt supports shifting the arrow keys to cause motion of the cursor.  The
+motion of the cursor will not modify what's below the cursor.  The cursor
+will move and lines and/or spaces will be inserted to support the move as
+required.  Your terminal may not support shifted arrow keys, however, or Vim
+may not catch them as such.  For example, on the machine I use, shift-up
+(<s-up>) produced <Esc>[161q, but vim didn't know that sequence was a <s-up>.
+I merely made a nmap:
+
+	nmap <Esc>[161q	<s-up>
+
+and vim thereafter recognized the <s-up> command.
+
+
+ERASING							*drawit-erase* {{{2
+<space>
+
+The <space> key will toggle DrawIt's erase mode/DrawIt mode.  When in [DrawIt
+erase] mode, a message "[DrawIt erase]" will appear and the number pad will
+now cause spaces to be drawn instead of the usual drawing characters.  The
+drawing behavior will be restored when the <space> key toggles DrawIt back
+to regular DrawIt mode.
+
+
+EXAMPLES						*drawit-example* {{{2
+
+Needless to say, the square spirals which follow were done with DrawIt and
+a bit of block editing with Vim: >
+
+   +------------ -----------+ +------------ -----------+ +------------
+   |+----------+ +---------+| |+----------+ +---------+| |+----------+
+   ||+--------+| |+-------+|| ||+--------+| |+-------+|| ||+--------+|
+   |||-------+|| ||+------||| |||-------+|| ||+------||| |||-------+||
+   ||+-------+|| ||+------+|| ||+-------+|| ||+------+|| ||+-------+||
+   |+---------+| |+--------+| |+---------+| |+--------+| |+---------+|
+   +-----------+ +----------+ +-----------+ +----------+ +-----------+
+
+VISUAL BLOCK MODE FOR ARROWS LINES BOXES AND ELLIPSES	*drawit-visblock* {{{2
+
+\a : draw arrow from corners of visual-block selected region	*drawit-a*
+\b : draw box on visual-block selected region			*drawit-b*
+\c : the canvas routine (will query user, see above)		*drawit-c*
+\e : draw an ellipse on visual-block selected region		*drawit-e*
+\f : flood figure with a character (you will be prompted)	*drawit-f*
+\l : draw line from corners of visual-block selected region	*drawit-l*
+\s : spacer: appends spaces up to the textwidth (default: 78)	*drawit-s*
+
+The DrawIt package has been merged with Sylvain Viart's drawing package (by
+permission) which provides DrawIt with visual-block selection of
+starting/ending point drawing of arrows (\a), lines (\l), and boxes (\b).
+Additionally I wrote an ellipse drawing function using visual block
+specification (|drawit-e|).
+
+One may create a block of spaces for these maps to operate in; the "canvas"
+routine (\c) will help create such blocks.  First, the s:Canvas() routine will
+query the user for the number of lines s/he wishes to have, and will then fill
+those lines with spaces out to the |'textwidth'| if user has specified it;
+otherwise, the display width will be used.
+
+The Sylvain Viart functions and the ellipse drawing function depend
+upon using visual block mode.  As a typical use: >
+
+	Example: * \h
+                   DrawIt asks: how many lines under the cursor? 10
+                   DrawIt then appends 10 lines filled with blanks
+                   out to textwidth (if defined) or 78 columns.
+                 * ctrl-v (move) \b
+                   DrawIt then draws a box
+		 * ctrl-v (move) \e
+                   DrawIt then draws an ellipse
+<
+Select the first endpoint with ctrl-v and then move to the other endpoint.
+One may then select \a for arrows, \b for boxes, \e for ellipses, or \l for
+lines.  The internal s:AutoCanvas() will convert tabs to spaces and will
+extend with spaces as needed to support the visual block.  Note that when
+DrawIt is enabled, virtualedit is also enabled (to "all").
+>
+        Examples:
+
+        __                _         ***************           +-------+
+          \_            _/      ****               ****       |       |
+            \_        _/      **      --------->       **     |       |
+              \_    _/          ****               ****       |       |
+                \__/   <-------     ***************           +-------+
+
+		\l        \a           \e and \a                  \b
+<
+							*drawit-setbrush*
+BRUSHES							*drawit-brush* {{{2
+>
+ :SetBrush a-z
+<
+	Set the current brush to the given letter (actually, its
+	a named register).  Default brush: a >
+		ex.  :SetBrush b
+
+ :'<,'>SetBrush a-z
+<
+	Set the current brush to the given letter, and yank the visual
+	block to that named register).  Default brush: a
+>
+ <leftmouse>
+<
+	Select a visual-block region.  One may use "ay, for example,
+	to yank selected text to register a.
+>
+ <shift-leftmouse>
+<
+	One may drag and draw with the current brush (default brush: a)
+	by holding down the shift key and the leftmouse button and moving
+	the mouse.  Blanks in the brush are considered to be transparent.
+>
+ <ctrl-leftmouse>
+<
+	One may drag and move a selection with <ctrl-leftmouse>.  First,
+	select the region using the <leftmouse>.  Release the mouse button,
+	then press ctrl and the <leftmouse> button; while continuing to press
+	the button, move the mouse.  The selected block of text will then
+	move along with the cursor.
+>
+ \ra ... \rz
+<
+	Replace text with the given register's contents (ie. the brush).
+>
+ \pa ... \pz
+<
+	Like \ra ... \rz, except that blanks are considered to be transparent.
+
+	Example: Draw the following >
+			\ \
+			o o
+			 * 
+			---
+<		Then use ctrl-v, move, "ay to grab a copy into register a.
+		By default, the current brush uses register a (change brush
+		with :SetBrush [reg]).  Hold the <shift> and <leftbutton>
+		keys down and move the mouse; as you move, a copy of the
+		brush will be left behind.
+	    
+
+DRAWIT MODES						*drawit-modes* {{{2
+
+  -[DrawIt]       regular DrawIt mode                     (|drawit-start|)
+  -[DrawIt off]   DrawIt is off                           (|drawit-stop| )
+  -[DrawIt erase] DrawIt will erase using the number pad  (|drawit-erase|)
+
+  g:DrChipTopLvlMenu: by default its "DrChip"; you may set this to whatever
+                  you like in your <.vimrc>.  This variable controls where
+		  DrawIt's menu items are placed.
+
+
+==============================================================================
+4. History						*drawit-history* {{{1
+
+	8 Feb 12, 2007 * fixed a bug which prevented multi-character user
+	                 maps from being restored properly
+	  May 03, 2007 * Extended SetDrawIt() to handle b:di_ellipse, the
+	                 ellipse boundary drawing character
+		       * Changed "Holer" to "Canvas", and wrote AutoCanvas(),
+		         which allow one to use the visual-block drawing
+			 maps without creating a canvas first.
+		       * DrawIt now uses the ctrl-leftmouse to move a visual
+		         block selected region.
+		       * Floods can now be done inside an ellipse
+		       * DrawIt's maps are now all users of <buffer>
+	7 Feb 16, 2005 * now checks that "m" is in &go before attempting to
+	                 use menus
+	  Aug 17, 2005 * report option workaround
+	  Nov 01, 2005 * converted DrawIt to use autoload feature of vim 7.0
+	  Dec 28, 2005 * now uses cecutil to save/restore user maps
+	  Jan 18, 2006 * cecutil now updated to use keepjumps
+	  Jan 23, 2006 * :DIstart and :DIstop commands provided; thus users
+	                 using  "set noremap" can still use DrawIt.
+	  Jan 26, 2006 * DrawIt menu entry now keeps its place
+	  Apr 10, 2006 * Brushes were implemented
+	6 Feb 24, 2003 * The latest DrawIt now provides a fill function.
+			\f will ask for a character to fill the figure
+			surrounding the current cursor location.  Plus
+			I suggest reading :he drawit-tip for those whose
+			home/pageup/pagedown/end keys aren't all working
+			properly with DrawIt.
+	  08/18/03     : \p[a-z] and \r[a-z] implemented
+	  08/04/03     : b:..keep variables renamed to b:di_..keep variables
+	                 StopDrawIt() now insures that erase mode is off
+	  03/11/03     : included g:drawit_insertmode handling
+	  02/21/03     : included flood function
+	  12/11/02     : deletes trailing whitespace only if holer used
+	   8/27/02     : fat arrowheads included
+	               : shift-arrow keys move but don't modify
+
+ ---------------------------------------------------------------------
+vim:tw=78:ts=8:ft=help:fdm=marker
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/.vim/doc/bufexplorer.txt	Tue May 03 08:57:01 2011 +0200
@@ -0,0 +1,502 @@
+*bufexplorer.txt*              Buffer Explorer       Last Change: 16 Feb 2010
+
+Buffer Explorer                                *buffer-explorer* *bufexplorer*
+                                Version 7.2.7
+
+Plugin for easily exploring (or browsing) Vim |:buffers|.
+
+|bufexplorer-installation|   Installation
+|bufexplorer-usage|          Usage
+|bufexplorer-windowlayout|   Window Layout
+|bufexplorer-customization|  Customization
+|bufexplorer-changelog|      Change Log
+|bufexplorer-todo|           Todo
+|bufexplorer-credits|        Credits
+
+For Vim version 7.0 and above.
+This plugin is only available if 'compatible' is not set.
+
+{Vi does not have any of this}
+
+==============================================================================
+INSTALLATION                                        *bufexplorer-installation*
+
+To install:
+  - Download the bufexplorer.zip.
+  - Extract the zip archive into your runtime directory.
+    The archive contains plugin/bufexplorer.vim, and doc/bufexplorer.txt.
+  - Start Vim or goto an existing instance of Vim.
+  - Execute the following command:
+>
+      :helptag <your runtime directory>/doc
+<
+    This will generate all the help tags for any file located in the doc
+    directory.
+
+==============================================================================
+USAGE                                                      *bufexplorer-usage*
+
+To start exploring in the current window, use: >
+ \be   or   :BufExplorer
+To start exploring in a newly split horizontal window, use: >
+ \bs   or   :BufExplorerHorizontalSplit
+To start exploring in a newly split vertical window, use: >
+ \bv   or   :BufExplorerVerticalSplit
+
+If you would like to use something other than '\', you may simply change the
+leader (see |mapleader|).
+
+Note: If the current buffer is modified when bufexplorer started, the current
+      window is always split and the new bufexplorer is displayed in that new
+      window.
+
+Commands to use once exploring:
+
+ <F1>          Toggle help information.
+ <enter>       Opens the buffer that is under the cursor into the current
+               window.
+ <leftmouse>   Opens the buffer that is under the cursor into the current
+               window.
+ <shift-enter> Opens the buffer that is under the cursor in another tab.
+ d            |:delete|the buffer under the cursor from the list.  The
+               buffer's 'buflisted' is cleared. This allows for the buffer to
+               be displayed again using the 'show unlisted' command.
+ R             Toggles relative path/absolute path.
+ T             Toggles to show only buffers for this tab or not.
+ D            |:wipeout|the buffer under the cursor from the list.  When a
+               buffers is wiped, it will not be shown when unlisted buffer are
+               displayed.
+ f             Toggles whether you are taken to the active window when
+               selecting a buffer or not.
+ o             Opens the buffer that is under the cursor into the current
+               window.
+ p             Toggles the showing of a split filename/pathname.
+ q             Quit exploring.
+ r             Reverses the order the buffers are listed in.
+ s             Selects the order the buffers are listed in. Either by buffer
+               number, file name, file extension, most recently used (MRU), or
+               full path.
+ t             Opens the buffer that is under the cursor in another tab.
+ u             Toggles the showing of "unlisted" buffers.
+
+Once invoked, Buffer Explorer displays a sorted list (MRU is the default
+sort method) of all the buffers that are currently opened. You are then
+able to move the cursor to the line containing the buffer's name you are
+wanting to act upon. Once you have selected the buffer you would like,
+you can then either open it, close it(delete), resort the list, reverse
+the sort, quit exploring and so on...
+
+===============================================================================
+WINDOW LAYOUT                                       *bufexplorer-windowlayout*
+
+-------------------------------------------------------------------------------
+" Press <F1> for Help
+" Sorted by mru | Locate buffer | Absolute Split path
+"=
+ 01 %a    bufexplorer.txt      C:\Vim\vimfiles\doc       line 87
+ 02 #     bufexplorer.vim      c:\Vim\vimfiles\plugin    line 1
+-------------------------------------------------------------------------------
+  | |     |                    |                         |
+  | |     |                    |                         +-- Current Line #.
+  | |     |                    +-- Relative/Full Path
+  | |     +-- Buffer Name.
+  | +-- Buffer Attributes. See|:buffers|for more information.
+  +-- Buffer Number. See|:buffers|for more information.
+
+===============================================================================
+CUSTOMIZATION                                       *bufexplorer-customization*
+
+                                                     *g:bufExplorerDefaultHelp*
+To control whether the default help is displayed or not, use: >
+  let g:bufExplorerDefaultHelp=0       " Do not show default help.
+  let g:bufExplorerDefaultHelp=1       " Show default help.
+The default is to show the default help.
+
+                                                    *g:bufExplorerDetailedHelp*
+To control whether detailed help is display by, use: >
+  let g:bufExplorerDetailedHelp=0      " Do not show detailed help.
+  let g:bufExplorerDetailedHelp=1      " Show detailed help.
+The default is NOT to show detailed help.
+
+                                                      *g:bufExplorerFindActive*
+To control whether you are taken to the active window when selecting a buffer,
+use: >
+  let g:bufExplorerFindActive=0        " Do not go to active window.
+  let g:bufExplorerFindActive=1        " Go to active window.
+The default is to be taken to the active window.
+
+                                                     *g:bufExplorerReverseSort*
+To control whether to sort the buffer in reverse order or not, use: >
+  let g:bufExplorerReverseSort=0       " Do not sort in reverse order.
+  let g:bufExplorerReverseSort=1       " Sort in reverse order.
+The default is NOT to sort in reverse order.
+
+                                                 *g:bufExplorerShowDirectories*
+Directories usually show up in the list from using a command like ":e .".
+To control whether to show directories in the buffer list or not, use: >
+  let g:bufExplorerShowDirectories=1   " Show directories.
+  let g:bufExplorerShowDirectories=0   " Don't show directories.
+The default is to show directories.
+
+                                                *g:bufExplorerShowRelativePath*
+To control whether to show absolute paths or relative to the current
+directory, use: >
+  let g:bufExplorerShowRelativePath=0  " Show absolute paths.
+  let g:bufExplorerShowRelativePath=1  " Show relative paths.
+The default is to show absolute paths.
+
+                                                    *g:bufExplorerShowUnlisted*
+To control whether to show unlisted buffer or not, use: >
+  let g:bufExplorerShowUnlisted=0      " Do not show unlisted buffers.
+  let g:bufExplorerShowUnlisted=1      " Show unlisted buffers.
+The default is to NOT show unlisted buffers.
+
+                                                          *g:bufExplorerSortBy*
+To control what field the buffers are sorted by, use: >
+  let g:bufExplorerSortBy='extension'  " Sort by file extension.
+  let g:bufExplorerSortBy='fullpath'   " Sort by full file path name.
+  let g:bufExplorerSortBy='mru'        " Sort by most recently used.
+  let g:bufExplorerSortBy='name'       " Sort by the buffer's name.
+  let g:bufExplorerSortBy='number'     " Sort by the buffer's number.
+The default is to sort by mru.
+
+                                                      *g:bufExplorerSplitBelow*
+To control where the new split window will be placed above or below the
+current window, use: >
+  let g:bufExplorerSplitBelow=1        " Split new window below current.
+  let g:bufExplorerSplitBelow=0        " Split new window above current.
+The default is to use what ever is set by the global &splitbelow
+variable.
+
+                                                *g:bufExplorerSplitOutPathName*
+To control whether to split out the path and file name or not, use: >
+  let g:bufExplorerSplitOutPathName=1  " Split the path and file name.
+  let g:bufExplorerSplitOutPathName=0  " Don't split the path and file
+                                       " name.
+The default is to split the path and file name.
+
+                                                      *g:bufExplorerSplitRight*
+To control where the new vsplit window will be placed to the left or right of
+current window, use: >
+  let g:bufExplorerSplitRight=0        " Split left.
+  let g:bufExplorerSplitRight=1        " Split right.
+The default is to use the global &splitright.
+
+                                                   *g:bufExplorerShowTabBuffer*
+To control weither or not to show buffers on for the specific tab or not, use: >
+  let g:bufExplorerShowTabBuffer=0        " No.
+  let g:bufExplorerShowTabBuffer=1        " Yes.
+The default is not to show.
+
+===============================================================================
+CHANGE LOG                                              *bufexplorer-changelog*
+
+7.2.7  - Fix:
+         * My 1st attempt to fix the "cache" issue where buffers information
+           has changed but the cache/display does not reflect those changes.
+           More work still needs to be done.
+7.2.6  - Fix:
+         * Thanks to Michael Henry for pointing out that I totally forgot to
+           update the inline help to reflect the previous change to the 'd'
+           and 'D' keys. Opps!
+7.2.5  - Fix:
+         * Philip Morant suggested switching the command (bwipe) associated
+           with the 'd' key with the command (bdelete) associated with the 'D'
+           key. This made sense since the 'd' key is more likely to be used
+           compared to the 'D' key.
+7.2.4  - Fix:
+         * I did not implement the patch provided by Godefroid Chapelle
+           correctly. I missed one line which happened to be the most
+           important one :)
+7.2.3  - Enhancements:
+         * Thanks to David Fishburn for helping me out with a much needed
+           code overhaul as well as some awesome performance enhancements.
+           He also reworked the handling of tabs.
+         * Thanks to Vladimir Dobriakov for making the suggestions on
+           enhancing the documentation to include a better explaination of
+           what is contained in the main bufexplorer window.
+         * Thanks to Yuriy Ershov for added code that when the bufexplorer
+           window is opened, the cursor is now positioned at the line with the
+           active buffer (useful in non-MRU sort modes).
+         * Yuriy also added the abiltiy to cycle through the sort fields in
+           reverse order.
+         Fixes:
+         * Thanks to Michael Henry for supplying a patch that allows
+           bufexplorer to be opened even when there is one buffer or less.
+         * Thanks to Godefroid Chapelle for supplying a patch that fixed
+           MRU sort order after loading a session.
+7.2.2  - Fixes:
+         * Thanks to David L. Dight for spotting and fixing an issue when
+           using ctrl^. bufexplorer would incorrectly handle the previous
+           buffer so that when ctrl^ was pressed the incorrect file was opened.
+7.2.1  - Fixes:
+         * Thanks to Dimitar for spotting and fixing a feature that was
+           inadvertently left out of the previous version. The feature was
+           when bufexplorer was used together with WinManager, you could use
+           the tab key to open a buffer in a split window.
+7.2.0  - Enhancements:
+         * For all those missing the \bs and \bv commands, these have now
+           returned. Thanks to Phil O'Connell for asking for the return of
+           these missing features and helping test out this version.
+         Fixes:
+         * Fixed problem with the bufExplorerFindActive code not working
+           correctly.
+         * Fixed an incompatibility between bufexplorer and netrw that caused
+           buffers to be incorrectly removed from the MRU list.
+7.1.7  - Fixes:
+         * TaCahiroy fixed several issues related to opening a buffer in a
+           tab.
+7.1.6  - Fixes:
+         * Removed ff=unix from modeline in bufexplorer.txt. Found by Bill
+           McCarthy.
+7.1.5  - Fixes:
+         * Could not open unnamed buffers. Fixed by TaCahiroy.
+7.1.4  - Fixes:
+         * Sometimes when a file's path has 'white space' in it, extra buffers
+           would be created containing each piece of the path. i.e:
+           opening c:\document and settings\test.txt would create a buffer
+           named "and" and a buffer named "Documents". This was reported and
+           fixed by TaCa Yoss.
+7.1.3  - Fixes:
+         * Added code to allow only one instance of the plugin to run at a
+           time. Thanks Dennis Hostetler.
+7.1.2  - Fixes:
+         * Fixed a jumplist issue spotted by JiangJun. I overlooked the
+           'jumplist' and with a couple calls to 'keepjumps', everything is
+           fine again.
+         * Went back to just having a plugin file, no autoload file. By having
+           the autoload, WinManager was no longer working and without really
+           digging into the cause, it was easier to go back to using just a
+           plugin file.
+7.1.1  - Fixes:
+         * A problem spotted by Thomas Arendsen Hein.
+           When running Vim (7.1.94), error E493 was being thrown.
+         Enhancements:
+         * Added 'D' for 'delete' buffer as the 'd' command was a 'wipe'
+           buffer.
+7.1.0  - Another 'major' update, some by Dave Larson, some by me.
+         * Making use of 'autoload' now to make the plugin load quicker.
+         * Removed '\bs' and '\bv'. These are now controlled by the user. The
+           user can issue a ':sp' or ':vs' to create a horizontal or vertical
+           split window and then issue a '\be'
+         * Added handling of tabs.
+7.0.17 - Fixed issue with 'drop' command.
+         Various enhancements and improvements.
+7.0.16 - Fixed issue reported by Liu Jiaping on non Windows systems, which was
+         ...
+         Open file1, open file2, modify file1, open bufexplorer, you get the
+         following error:
+
+         --------8<--------
+         Error detected while processing function
+         <SNR>14_StartBufExplorer..<SNR>14_SplitOpen:
+         line    4:
+         E37: No write since last change (add ! to override)
+
+         But the worse thing is, when I want to save the current buffer and
+         type ':w', I get another error message:
+         E382: Cannot write, 'buftype' option is set 
+         --------8<--------
+
+7.0.15 - Thanks to Mark Smithfield for suggesting bufexplorer needed to handle
+         the ':args' command.
+7.0.14 - Thanks to Randall Hansen for removing the requirement of terminal
+         versions to be recompiled with 'gui' support so the 'drop' command
+         would work. The 'drop' command is really not needed in terminal
+         versions.
+7.0.13 - Fixed integration with WinManager.
+         Thanks to Dave Eggum for another update.
+           - Fix: The detailed help didn't display the mapping for toggling
+                  the split type, even though the split type is displayed.
+           - Fixed incorrect description in the detailed help for toggling
+             relative or full paths.
+           - Deprecated s:ExtractBufferNbr(). Vim's str2nr() does the same
+             thing.
+           - Created a s:Set() function that sets a variable only if it hasn't
+             already been defined. It's useful for initializing all those
+             default settings.
+           - Removed checks for repetitive command definitions. They were
+             unnecessary.
+           - Made the help highlighting a little more fancy.
+           - Minor reverse compatibility issue: Changed ambiguous setting
+             names to be more descriptive of what they do (also makes the code
+             easier to follow):
+               Changed bufExplorerSortDirection to bufExplorerReverseSort
+               Changed bufExplorerSplitType to bufExplorerSplitVertical
+               Changed bufExplorerOpenMode to bufExplorerUseCurrentWindow
+           - When the BufExplorer window closes, all the file-local marks are
+             now deleted. This may have the benefit of cleaning up some of the
+             jumplist.
+           - Changed the name of the parameter for StartBufExplorer from
+             "split" to "open". The parameter is a string which specifies how
+             the buffer will be open, not if it is split or not.
+           - Deprecated DoAnyMoreBuffersExist() - it is a one line function
+             only used in one spot.
+           - Created four functions (SplitOpen(), RebuildBufferList(),
+             UpdateHelpStatus() and ReSortListing()) all with one purpose - to
+             reduce repeated code.
+           - Changed the name of AddHeader() to CreateHelp() to be more
+             descriptive of what it does. It now returns an array instead of
+             updating the window directly. This has the benefit of making the
+             code more efficient since the text the function returns is used a
+             little differently in the two places the function is called.
+         - Other minor simplifications.
+7.0.12 - MAJOR Update.
+         This version will ONLY run with Vim version 7.0 or greater.
+         Dave Eggum has made some 'significant' updates to this latest
+         version:
+           - Added BufExplorerGetAltBuf() global function to be used in the
+             user’s rulerformat.
+           - Added g:bufExplorerSplitRight option.
+           - Added g:bufExplorerShowRelativePath option with mapping.
+           - Added current line highlighting.
+           - The split type can now be changed whether bufexplorer is opened
+             in split mode or not.
+           - Various major and minor bug fixes and speed improvements.
+           - Sort by extension.
+         Other improvements/changes:
+           - Changed the help key from '?' to <F1> to be more 'standard'.
+           - Fixed splitting of vertical bufexplorer window.
+         Hopefully I have not forgot something :)
+7.0.11 - Fixed a couple of highlighting bugs, reported by David Eggum. He also
+         changed passive voice to active on a couple of warning messages.
+7.0.10 - Fixed bug report by Xiangjiang Ma. If the 'ssl' option is set,
+         the slash character used when displaying the path was incorrect.
+7.0.9  - Martin Grenfell found and eliminated an annoying bug in the
+         bufexplorer/winmanager integration. The bug was were an
+         annoying message would be displayed when a window was split or
+         a new file was opened in a new window. Thanks Martin!
+7.0.8  - Thanks to Mike Li for catching a bug in the WinManager integration.
+         The bug was related to the incorrect displaying of the buffer
+         explorer's window title.
+7.0.7  - Thanks to Jeremy Cowgar for adding a new enhancement. This
+         enhancement allows the user to press 'S', that is capital S, which
+         will open the buffer under the cursor in a newly created split
+         window.
+7.0.6  - Thanks to Larry Zhang for finding a bug in the "split" buffer code.
+         If you force set g:bufExplorerSplitType='v' in your vimrc, and if you
+         tried to do a \bs to split the bufexplorer window, it would always
+         split horizontal, not vertical. He also found that I had a typeo in
+         that the variable g:bufExplorerSplitVertSize was all lower case in
+         the documentation which was incorrect.
+7.0.5  - Thanks to Mun Johl for pointing out a bug that if a buffer was
+         modified, the '+' was not showing up correctly.
+7.0.4  - Fixed a problem discovered first by Xiangjiang Ma. Well since I've
+         been using vim 7.0 and not 6.3, I started using a function (getftype)
+         that is not in 6.3. So for backward compatibility, I conditionaly use
+         this function now.  Thus, the g:bufExplorerShowDirectories feature is
+         only available when using vim 7.0 and above.
+7.0.3  - Thanks to Erwin Waterlander for finding a problem when the last
+         buffer was deleted. This issue got me to rewrite the buffer display
+         logic (which I've wanted to do for sometime now).
+         Also great thanks to Dave Eggum for coming up with idea for
+         g:bufExplorerShowDirectories. Read the above information about this
+         feature.
+7.0.2  - Thanks to Thomas Arendsen Hein for finding a problem when a user
+         has the default help turned off and then brought up the explorer. An
+         E493 would be displayed.
+7.0.1  - Thanks to Erwin Waterlander for finding a couple problems.
+         The first problem allowed a modified buffer to be deleted.  Opps! The
+         second problem occurred when several files were opened, BufExplorer
+         was started, the current buffer was deleted using the 'd' option, and
+         then BufExplorer was exited. The deleted buffer was still visible
+         while it is not in the buffers list. Opps again!
+7.0.0  - Thanks to Shankar R. for suggesting to add the ability to set
+         the fixed width (g:bufExplorerSplitVertSize) of a new window
+         when opening bufexplorer vertically and fixed height
+         (g:bufExplorerSplitHorzSize) of a new window when opening
+         bufexplorer horizontally. By default, the windows are normally
+         split to use half the existing width or height.
+6.3.0  - Added keepjumps so that the jumps list would not get cluttered with
+         bufexplorer related stuff.
+6.2.3  - Thanks to Jay Logan for finding a bug in the vertical split position
+         of the code. When selecting that the window was to be split
+         vertically by doing a '\bv', from then on, all splits, i.e. '\bs',
+         were split vertically, even though g:bufExplorerSplitType was not set
+         to 'v'.
+6.2.2  - Thanks to Patrik Modesto for adding a small improvement. For some
+         reason his bufexplorer window was always showing up folded. He added
+         'setlocal nofoldenable' and it was fixed.
+6.2.1  - Thanks goes out to Takashi Matsuo for added the 'fullPath' sorting
+         logic and option.
+6.2.0  - Thanks goes out to Simon Johann-Ganter for spotting and fixing a
+         problem in that the last search pattern is overridden by the search
+         pattern for blank lines.
+6.1.6  - Thanks to Artem Chuprina for finding a pesky bug that has been around
+         for sometime now. The <esc> key mapping was causing the buffer
+         explored to close prematurely when vim was run in an xterm. The <esc>
+         key mapping is now removed.
+6.1.5  - Thanks to Khorev Sergey. Added option to show default help or not.
+6.1.4  - Thanks goes out to Valery Kondakoff for suggesting the addition of
+         setlocal nonumber and foldcolumn=0. This allows for line numbering
+         and folding to be turned off temporarily while in the explorer.
+6.1.3  - Added folding. Did some code cleanup. Added the ability to force the
+         newly split window to be temporarily vertical, which was suggested by
+         Thomas Glanzmann.
+6.1.2  - Now pressing the <esc> key will quit, just like 'q'.
+         Added folds to hide winmanager configuration.
+         If anyone had the 'C' option in their cpoptions they would receive
+         a E10 error on startup of BufExplorer. cpo is now saved, updated and
+         restored. Thanks to Charles E Campbell, Jr.
+         Attempted to make sure there can only be one BufExplorer window open
+         at a time.
+6.1.1  - Thanks to Brian D. Goodwin for adding toupper to FileNameCmp. This
+         way buffers sorted by name will be in the correct order regardless of
+         case.
+6.0.16 - Thanks to Andre Pang for the original patch/idea to get bufexplorer
+         to work in insertmode/modeless mode (evim). Added Initialize
+         and Cleanup autocommands to handle commands that need to be
+         performed when starting or leaving bufexplorer.
+6.0.15 - Srinath Avadhanulax added a patch for winmanager.vim.
+6.0.14 - Fix a few more bug that I thought I already had fixed. Thanks
+         to Eric Bloodworth for adding 'Open Mode/Edit in Place'. Added
+         vertical splitting.
+6.0.13 - Thanks to Charles E Campbell, Jr. for pointing out some embarrassing
+         typos that I had in the documentation. I guess I need to run
+         the spell checker more :o)
+6.0.12 - Thanks to Madoka Machitani, for the tip on adding the augroup command
+         around the MRUList autocommands.
+6.0.11 - Fixed bug report by Xiangjiang Ma. '"=' was being added to the
+         search history which messed up hlsearch.
+6.0.10 - Added the necessary hooks so that the Srinath Avadhanula's
+         winmanager.vim script could more easily integrate with this script.
+         Tried to improve performance.
+6.0.9  - Added MRU (Most Recently Used) sort ordering.
+6.0.8  - Was not resetting the showcmd command correctly.
+         Added nifty help file.
+6.0.7  - Thanks to Brett Carlane for some great enhancements. Some are added,
+         some are not, yet. Added highlighting of current and alternate
+         filenames. Added splitting of path/filename toggle. Reworked
+         ShowBuffers().
+         Changed my email address.
+6.0.6  - Copyright notice added. Needed this so that it could be distributed
+         with Debian Linux. Fixed problem with the SortListing() function
+         failing when there was only one buffer to display.
+6.0.5  - Fixed problems reported by David Pascoe, in that you where unable to
+         hit 'd' on a buffer that belonged to a files that no longer existed
+         and that the 'yank' buffer was being overridden by the help text when
+         the bufexplorer was opened.
+6.0.4  - Thanks to Charles Campbell, Jr. for making this plugin more plugin
+         *compliant*, adding default keymappings of <Leader>be and <Leader>bs
+         as well as fixing the 'w:sortDirLabel not being defined' bug.
+6.0.3  - Added sorting capabilities. Sort taken from explorer.vim.
+6.0.2  - Can't remember. (2001-07-25)
+6.0.1  - Initial release.
+
+===============================================================================
+TODO                                                         *bufexplorer-todo*
+
+- Nothing as of now, buf if you have any suggestions, drop me an email.
+
+===============================================================================
+CREDITS                                                   *bufexplorer-credits*
+
+Author: Jeff Lanzarotta <delux256-vim at yahoo dot com>
+
+Credit must go out to Bram Moolenaar and all the Vim developers for
+making the world's best editor (IMHO). I also want to thank everyone who
+helped and gave me suggestions. I wouldn't want to leave anyone out so I
+won't list names.
+
+===============================================================================
+vim:tw=78:noet:wrap:ts=8:ft=help:norl:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/.vim/doc/project.txt	Tue May 03 08:57:01 2011 +0200
@@ -0,0 +1,710 @@
+*project.txt*	Plugin for managing multiple projects with multiple sources
+		For Vim version 6.x and Vim version 7.x.
+		Last Change: Fri 13 Oct 2006 10:20:13 AM EDT
+	
+
+				By Aric Blumer
+		      aricvim email-at-sign charter.net
+
+						    *project* *project-plugin*
+	Contents:
+
+		Commands...................|project-invoking|
+		Inheritance.............|project-inheritance|
+		Mappings...................|project-mappings|
+		Adding Mappings.....|project-adding-mappings|
+		Settings...................|project-settings|
+		Example File................|project-example|
+		Tips...........................|project-tips|
+
+
+You can use this plugin's basic functionality to set up a list of
+frequently-accessed files for easy navigation. The list of files will be
+displayed in a window on the left side of the Vim window, and you can press
+<Return> or double-click on filenames in the list to open the files. I find
+this easier to use than having to navigate a directory hierarchy with the
+|file-explorer|.
+
+You can also instruct the Plugin to change to a directory and to run Vim
+scripts when you select a file. These scripts can, for example, modify the
+environment to include compilers in $PATH. This makes it very easy to use
+quickfix with multiple projects that use different environments.
+
+Other features include:
+	o Loading/Unloading all the files in a Project (\l, \L, \w, and \W)
+	o Grepping all the files in a Project (\g and \G)
+	o Running a user-specified script on a file (can be used to launch an
+	  external program on the file) (\1 through \9)
+	o Running a user-specified script on all the files in a Project
+	  (\f1-\f9 and \F1-\F9)
+	o High degree of user-configurability
+	o Also works with |netrw| using the XXXX://... notation where XXXX is
+	  ftp, rcp, scp, or http.
+
+All of this is specified within a simple text file and a few global variables
+in your vimrc file.
+
+You must set 'nocompatible' in your |vimrc| file to use this plugin. You can
+stop the plugin from being loaded by setting the "loaded_project" variable: >
+	:let loaded_project = 1
+
+
+==============================================================================
+COMMANDS						    *project-invoking*
+
+You can use the plugin by placing it in your plugin directory (e.g.,
+~/.vim/plugin). See |add-global-plugin|. When you start vim the next time, you
+then enter the command >
+    :Project
+or >
+    :Project {file}
+
+If you do not specify the filename, $HOME/.vimprojects is used.
+
+To have Vim come up with the Project Window enabled automatically (say, from a
+GUI launcher), run Vim like this:  [g]vim +Project
+
+Note that you can invoke :Project on only one file at a time.  If you wish to
+change the Project File, do a :bwipe in the Project Buffer, then re-invoke the
+Plugin as described above.
+
+Several Projects can be kept and displayed in the same file, each in a fold
+delimited by { and } (see |fold.txt|).  There can be any number of nested
+folds to provide you with a Project hierarchy.  Any line without a { or a } in
+the file is considered to be a filename.  Blank lines are ignored, and any
+text after a # is ignored.
+
+Because the plugin uses standard Vim folds, you can use any of the
+|fold-commands|. You can double-click on the first line of a fold to open and
+close it. You can select a file to open by putting the cursor on its name and
+pressing <Return> or by double-clicking on it.  The plugin will create a new
+window to the right or use the |CTRL-W_p| equivalent if it exists.
+
+							      *project-syntax*
+Each Project Entry has this form:
+
+project_entry ::=
+    <Description>={projpath} [{options}] {
+	[ filename ]
+	[ project_entry ]
+    }
+
+{options} is one or more of the following (on the same line):
+    CD={path}
+    in={filename}
+    out={filename}
+    filter="{pat}"
+    flags={flag}
+
+Note that a project_entry can reside within a project_entry. This allows you
+to set up a hierarchy within your Project.
+
+The <Description> will be displayed in the foldtext and cannot contain "=".
+There can be no space character directly on either side of the =.
+
+The {projpath} is the path in which the files listed in the Project's fold
+will be found, and it may contain environment variables.  If the path is a
+relative path, then the plugin constructs the whole path from the Project's
+parent, grandparent, etc., all the way up the hierarchy. An outermost
+project_entry must have an absolute path.  See the |project-inheritance|
+example below.  {projpath} may contain spaces, but they must be escaped like
+normal Vim escapes. Here are two examples of the same directory:
+>
+	Example=/my/directory/with\ spaces {
+	}
+	Example="/my/directory/with spaces" {
+	}
+
+I recommend this for Windows®: >
+
+	Example="c:\My Documents" {
+	}
+
+But Vim is smart enough to do this, too: >
+
+	Example=c:\My\ Documents {
+	}
+
+CD= provides the directory that Vim will change to when you select a file in
+that fold (using |:cd|). This allows you, for example, to enter |:make| to use
+the local Makefile.  A CD=. means that Vim will make {projpath} or its
+inherited equivalent the current working directory.  When CD is omitted, the
+directory is not changed.  There can be no space on either side of the =.  The
+value of CD can also be a relative path from a parent's CD.  See the
+|project-inheritance| example below.  This directive is ignored for |netrw|
+projects. Spaces are allowed in the path as for {projpath}.
+
+in= and out= provide the means to run arbitrary Vim scripts whenever you enter
+or leave a file's buffer (see the |BufEnter| and |BufLeave| autocommand
+events).  The idea is to have a Vim script that sets up or tears down the
+environment for the Project like this:
+
+in.vim: >
+	let $PROJECT_HOME='~/my_project'
+	" Put the compiler in $PATH
+	if $PATH !~ '/path/to/my/compiler'
+		let $PATH=$PATH.':/path/to/my/compiler'
+	endif
+
+out.vim: >
+	" Remove compiler from $PATH
+	if $PATH =~ '/path/to/my/compiler'
+		let $PATH=substitute($PATH, ':/path/to/my/compiler', '', 'g')
+	endif
+
+Then you can use :make with the proper environment depending on what file you
+are currently editing.  If the path to the script is relative, then it is
+relative from {projpath}.  These directives are inherited by Subprojects
+unless the Subproject specifies its own. For use with |netrw| projects, the
+paths specified for in= and out= must be absolute and local.
+
+filter= specifies a |glob()| file pattern. It is used to regenerate the list
+of files in a Project fold when using the \r (<LocalLeader>r) map in the
+Project Window.  The filter value must be in quotes because it can contain
+multiple file patterns.  If filter is omitted, then the * pattern is used.
+There can be no space on either side of the =.  A Subproject will inherit the
+filter of its parent unless it specifies its own filter.
+
+flags= provides the means to enable/disable features for a particular fold.
+The general mnemonic scheme is for lower case to turn something off and upper
+case to turn something on.  {flag} can contain any of the following
+characters:
+
+      flag      Description ~
+
+	l	Turn off recursion for this fold for \L.  Subfolds are also
+	        blocked from the recursion.
+
+	r	Turn off refresh. When present, do not refresh this fold when
+		\r or \R is used.  This does not affect subfold recursion.
+
+	S	Turn on sorting for refresh and create.
+
+	s	Turn off sorting for refresh and create.
+
+	T	Turn on top gravity.  Forces folds to the top of the current
+		fold when refreshing. It has the same affect as the 'T' flag
+		in g:proj_flags, but controls the feature on a per-fold basis.
+
+	t	Turn off top gravity.  Forces folds to the bottom of the
+	        current fold when refreshing.
+
+	w	Turn off recursion for this fold for \W.  Subfolds are also
+	        blocked from the recursion.
+
+
+Flags are not inherited by Subprojects.
+
+Any text outside a fold is ignored.
+
+
+==============================================================================
+INHERITANCE						 *project-inheritance*
+
+It's best to show inheritance by comparing these two Project Files:
+>
+	Parent=~/my_project CD=. filter="Make* *.mk" flags=r {
+	 Child1=c_code {
+	 }
+	 Child2=include CD=. filter="*.h" {
+	 }
+	}
+
+Child1's path is "~/my_project/c_code" because ~/my_project is inherited.  It
+also inherits the CD from Parent.  Since Parent has CD=., the Parent's cwd is
+"~/my_project".  Child1 therefore inherits a CD of "~/my_project".  Finally,
+Child1 inherits the filter from Parent. The flags are not inherited.
+
+Child2 only inherits the "~/my_project" from Parent.
+
+Thus, the example above is exactly equivalent to this:
+>
+	Parent=~/my_project CD=. filter="Make* *.mk" flags=r {
+	 Child1=~/my_project/c_code CD=~/my_project filter="Make* *.mk" {
+	 }
+	 Child2=~/my_project/include CD=~/my_project/include filter="*.h" {
+	 }
+	}
+
+(For a real Project, Child1 would not want to inherit its parent's filter, but
+this example shows the concept.)  You can always enter \i to display what the
+cursor's project inherits.
+
+
+==============================================================================
+MAPPINGS						    *project-mappings*
+
+Map	Action ~
+
+\r	Refreshes the Project fold that the cursor is in by placing in the
+	fold all the files that match the filter. The Project is refreshed
+	using an indent of one space for every foldlevel in the hierarchy.
+
+	You may place a "# pragma keep" (without the quotes) at the end of a
+	line, and the file entry on that line will not be removed when you
+	refresh.  This is useful, for example, when you have . as an entry so
+	you can easily browse the directory.
+	
+	Note that this mapping is actually <LocalLeader>r, and the default of
+	|<LocalLeader>| is \.
+
+	This does not work for Projects using |netrw|.
+
+\R	Executes \r recursively in the current fold and all folds below.
+	This does not work for Projects using |netrw|.
+
+\c	Creates a Project fold entry.  It asks for the description, the path
+	to the files, the CD parameter, and the filename |glob()| pattern.
+	From this information, it will create the Project Entry below the
+	cursor.
+
+	This does not work for Projects using |netrw|.
+
+\C	Creates a Project fold entry like \c, but recursively includes all the
+	subdirectories.
+
+<Return>
+	Select a file to open in the |CTRL-W_p| window or in a new window.  If
+	the cursor is on a fold, open or close it.
+
+<S-Return>
+\s
+	Same as <Return> but horizontally split the target window.
+	<LocalLeader>s is provided for those terminals that don't recognize
+	<S-Return>.
+
+\S
+	Load all files in a project by doing horizontal splits.
+
+<C-Return>
+\o
+	Same as <Return> but ensure that the opened file is the only other
+	window. <LocalLeader>o is provided for those terminals that don't
+	recognize <C-Return>.
+
+<M-Return>
+\v
+	Same as <Return> but only display the file--the cursor stays in the
+	Project Window.
+
+<2-LeftMouse>
+	(Double-click) If on a closed fold, open it. If on an open fold
+	boundary, close it. If on a filename, open the file in the |CTRL-W_p|
+	window or in a new window.
+
+<S-2-LeftMouse>
+	Same as <S-Return>.
+
+<C-2-LeftMouse>
+	Same as <C-Return>.
+
+<RightMouse>
+	Increase the width of the Project Window by g:proj_window_increment or
+	toggle between a width of
+		g:proj_window_width + g:proj_window_increment
+	and
+		g:proj_window_width.
+
+	Whether you toggle or monotonically increase the width is determined
+	by the 't' flag of the g:proj_flags variable (see |project-flags|).
+
+	Note that a Right Mouse click will not automatically place the cursor
+	in the Project Window if it is in a different window.  The window will
+	go back to the g:proj_window_width width when you leave the window.
+
+<space> Same as <RightMouse>
+
+<CTRL-Up>
+\<Up>
+	Move the text or fold under the cursor up one row. This may not work
+	in a terminal because the terminal is unaware of this key combination.
+	<LocalLeader><Up> is provided for those terminals that don't recognize
+	<C-Up>.
+
+
+<CTRL-Down>
+\<Down>
+	Move the text or fold under the cursor down one row. This may not work
+	in a terminal because the terminal is unaware of this key combination.
+	<LocalLeader><Down> is provided for those terminals that don't
+	recognize <C-Down>.
+
+\i	Show in the status line the completely resolved and inherited
+	parameters for the fold the cursor is in.  This is intended for
+	debugging your relative path and inherited parameters for manually
+	entered Projects.
+
+\I	Show in the status line the completely resolved filename.  Uses the
+        Project_GetFname(line('.')) function.
+
+\1 - \9
+	Run the command specified in g:proj_run{x} where {x} is the number
+	of the key.  See the documentation of g:proj_run1 below.
+
+\f1-\f9
+	Run the command specified in g:proj_run_fold{x} where {x} is the
+	number of the key.  The command is run on the files at the current
+	Project level. See the |project-settings| below.
+
+\F1-\F9
+	Run the command specified in g:proj_run_fold{x} where {x} is the
+	number of the key.  The command is run on the files at the current
+	Project level and all Subprojects. See the |project-settings| below.
+
+\0	Display the commands that are defined for \1 through \9.
+
+\f0	Display the commands that are defined for \f1 through \f9 and \F1
+	through \F0.  Same as \F0.
+
+\l	Load all the files in the current Project level into Vim.  While files
+	are being loaded, you may press any key to stop.
+
+\L	Load all the files in the current Project and all Subprojects into
+	Vim.  Use this mapping with caution--I wouldn't suggest using \L to
+	load a Project with thousands of files. (BTW, my Project file has more
+	than 5,300 files in it!)  While files are being loaded, you may press
+	any key to stop.
+
+\w	Wipe all the files in the current Project level from Vim. (If files
+	are modified, they will be saved first.)  While files are being wiped,
+	you may press any key to stop.
+
+\W	Wipe all the files in the current Project and all Subprojects from
+	Vim. (If files are modified, they will be saved first.)  While files
+	are being wiped, you may press any key to stop.
+
+\g	Grep all the files in the current Project level.
+
+\G	Grep all the files in the current Project level and all Subprojects.
+
+\e	Set up the Environment for the Project File as though you had selected
+	it with <Return>.  This allows you to do a \e and a :make without
+	having to open any files in the project.
+
+\E	Explore (using |file-explorer|) the directory of the project the
+	cursor is in.  Does not work with netrw.
+
+<F12>	When the 'g' flag is present in g:proj_flags (see |project-flags|)
+	this key toggles the Project Window open and closed. You may remap
+	this toggle function by putting the following in your vimrc and
+	replacing <Leader>P with whatever key combination you wish:
+
+		nmap <silent> <Leader>P <Plug>ToggleProject
+
+Note that the Project Plugin remaps :help because the Help Window and the
+Project Window get into a fight over placement. The mapping avoids the
+problem.
+
+==============================================================================
+ADDING MAPPINGS 				     *project-adding-mappings*
+
+You can add your own mappings or change the mappings of the plugin by placing
+them in the file $HOME/.vimproject_mappings.  This file, if it exists, will be
+sourced when the plugin in loaded.  Here is an example that will count the
+number of entries in a project when you press \K (Kount, C is taken :-): >
+
+    function! s:Wc()
+        let b:loadcount=0
+        function! SpawnExec(infoline, fname, lineno, data)
+	    let b:loadcount = b:loadcount + 1
+	    if getchar(0) != 0 | let b:stop_everything=1 | endif
+        endfunction
+        call Project_ForEach(1, line('.'), "*SpawnExec", 0, '')
+        delfunction SpawnExec
+        echon b:loadcount." Files\r"
+        unlet b:loadcount
+        if exists("b:stop_everything")
+	    unlet b:stop_everything
+	    echon "Aborted.\r"
+	endif
+    endfunction
+
+    nnoremap <buffer> <silent> <LocalLeader>K :call <SID>Wc()<CR>
+
+Here's another example of how I integrated the use of perforce with the plugin
+in my $HOME/.vimproject_mappings:
+>
+	function! s:DoP4(cmd)
+	   let name=Project_GetFname(line('.'))
+	   let dir=substitute(name, '\(.*\)/.*', '\1', 'g')
+	   exec 'cd '.dir
+	   exec "!".a:cmd.' '.Project_GetFname(line('.'))
+	   cd -
+	endfunction
+
+	nmap <buffer> <silent> \pa :call <SID>DoP4("p4add")<CR>
+	nmap <buffer> <silent> \pe :call <SID>DoP4("p4edit")<CR>
+<
+(Note that I CD to the directory the file is in so I can pick of the $P4CONFIG
+file. See the perforce documentation.)
+
+This creates the mappings \pe to check out the file for edit and \pa to add
+the file to the depot.
+
+Here is another example where I remap the <Return> mapping to use an external
+program to launch a special kind of file (in this case, it launches ee to view
+a jpg file).  It is a bit contrived, but it works.
+>
+	let s:sid = substitute(maparg('<Return>', 'n'), '.*\(<SNR>.\{-}\)_.*', '\1', '')
+	function! s:LaunchOrWhat()
+	    let fname=Project_GetFname(line('.'))
+	    if fname =~ '\.jpg$'
+		exec 'silent! !ee "'.fname.'"&'
+	    else
+		call {s:sid}_DoFoldOrOpenEntry('', 'e')
+	    endif
+	endfunction
+	nnoremap <buffer> <silent> <Return>   \|:call <SID>LaunchOrWhat()<CR>
+<
+If the file ends in .jpg, the external program is launched, otherwise the
+original mapping of <Return> is run.
+
+==============================================================================
+SETTINGS						    *project-settings*
+
+You can set these variables in your vimrc file before the plugin is loaded to
+change its default behavior
+
+g:proj_window_width
+	The width of the Project Window that the plugin attempts to maintain.
+	Default: 24
+
+	The Project Plugin is not always successful in keeping the window
+	where I want it with the size specified here, but it does a decent
+	job.
+
+g:proj_window_increment
+	The increment by which to increase the width of the Project Window
+	when pressing <space> or clicking the <LeftMouse>. Default: 100
+	(See |project-mappings|.)
+
+							       *project-flags*
+g:proj_flags
+	Default: "imst"
+	Various flags to control the behavior of the Project Plugin.  This
+	variable can contain any of the following character flags.
+
+       flag	Description ~
+
+	b	When present, use the |browse()| when selecting directories
+		for \c and \C.  This is off by default for Windows, because
+		the windows browser does not allow you to select directories.
+
+	c	When present, the Project Window will automatically close when
+		you select a file.
+
+	F	Float the Project Window.  That is, turn off automatic
+		resizing and placement.  This allows placement between other
+		windows that wish to share similar placement at the side of
+		the screen.  It is also particularly helpful for external
+		window managers.
+
+	g	When present, the mapping for <F12> will be created to toggle
+		the Project Window open and closed.
+
+	i	When present, display the filename and the current working
+		directory in the command line when a file is selected for
+		opening.
+
+	l	When present, the Project Plugin will use the |:lcd| command
+		rather than |:cd| to change directories when you select a file
+		to open.  This flag is really obsolete and not of much use
+		because of L below.
+
+	L	Similar to l, but install a BufEnter/Leave |:autocommand| to
+		ensure that the current working directory is changed to the
+		one specified in the fold CD specification whenever that
+		buffer is active.  (|:lcd| only changes the CWD for a window,
+		not a buffer.)
+
+	m	Turn on mapping of the |CTRL-W_o| and |CTRL-W_CTRL_O| normal
+	        mode commands to make the current buffer the only visible
+		buffer, but keep the Project Window visible, too.
+
+	n	When present, numbers will be turned on for the project
+	        window.
+
+	s	When present, the Project Plugin will use syntax highlighting
+		in the Project Window.
+
+	S	Turn on sorting for refresh and create.
+
+	t	When present, toggle the size of the window rather than just
+		increase the size when pressing <space> or right-clicking.
+		See the entry for <RightMouse> in |project-mappings|.
+
+	T	When present, put Subproject folds at the top of the fold when
+		refreshing.
+
+	v	When present, use :vimgrep rather than :grep when using \G.
+
+g:proj_run1 ...  g:proj_run9
+		Contains a Vim command to execute on the file.  See the
+		mappings of \1 to \9 above.
+		
+		  %f is replaced with the full path and filename
+		  %F is replaced with the full path and filename with spaces
+		     quoted
+		  %n is replaced with the filename alone
+		  %N is replaced with the filename alone with spaces quoted
+		  %h is replaced with the home directory
+		  %H is replaced with the home directory with spaces quoted
+		  %r is replaced with the directory relative to the CD path
+		  %R is replaced with the directory relative to the CD path
+		     with spaces quoted
+		  %d is replaced with the CD directory.
+		  %D is replaced with the CD directory.with spaces quoted
+		  %% is replaced with a single % that is not used in
+		     expansion.
+
+		(Deprecated: %s is also replaced with the full path and
+		filename for backward compatibility.)
+
+		For example, gvim will be launched on the file under the
+		cursor when you enter \3 if the following is in your vimrc
+		file: >
+		 let g:proj_run3='silent !gvim %f'
+<		Here are a few other examples: >
+		 let g:proj_run1='!p4 edit %f'
+		 let g:proj_run2='!p4 add %f'
+		 let g:proj_run4="echo 'Viewing %f'|sil !xterm -e less %f &"
+<
+		On Windows systems you will want to put the %f, %h, and %d in
+		single quotes to avoid \ escaping.
+
+g:proj_run_fold1 ...  g:proj_run_fold9
+		Contains a Vim command to execute on the files in a fold.  See
+		the mappings of \f1 to \f9  and \F1 to \F9 above.
+		
+		%f is the filename, %h is replaced with the project home
+		directory, and %d is replaced with the CD directory.  Multiple
+		filenames can be handled in two ways:
+
+		The first (default) way is to have %f replaced with all the
+		absolute filenames, and the command is run once.  The second
+		is to have the command run for each of the non-absolute
+		filenames (%f is replaced with one filename at a time).  To
+		select the second behavior, put an '*' character at the
+		beginning of the g:proj_run_fold{x} variable.  (The '*' is
+		stripped before the command is run.)
+
+		For example, note the difference between the following: >
+		 let g:proj_run_fold3="*echo '%h/%f'"
+		 let g:proj_run_fold4="echo '%f'"
+<
+		Note that on Windows systems, you will want the %f, %h, and %c
+		within single quotes, or the \ in the paths will cause
+		problems.  The alternative is to put them in |escape()|.
+
+
+==============================================================================
+PROJECT EXAMPLE FILE					     *project-example*
+
+Here is an example ~/.vimprojects file: >
+
+  1	My Project=~/c/project CD=. in=in.vim out=out.vim flags=r {
+  2	 Makefile
+  3      in.vim
+  4      out.vim
+  5	 GUI Files=. filter="gui*.c gui*.h" {
+  6	  gui_window.c
+  7	  gui_dialog.c
+  8	  gui_list.c
+  9	  gui.h	       # Header file
+ 10	 }
+ 11	 Database Files=. filter="data*.c data*.h" {
+ 12	  data_read.c
+ 13	  data_write.c
+ 14	  data.h
+ 15	 }
+ 16	 OS-Specific Files {
+ 17	  Win32=. filter="os_win32*.c os_win32*.h" {
+ 18	   os_win32_gui.c
+ 19	   os_win32_io.c
+ 20	  }
+ 21	  Unix=. filter="os_unix*.c os_unix*.h" {
+ 22	   os_unix_gui.c
+ 23	   os_unix_io.c
+ 24	  }
+ 25	 }
+ 26	}
+
+(Don't type in the line numbers, of course.)
+
+
+==============================================================================
+TIPS ON USING PROJECT PLUGIN					*project-tips*
+
+1.  You can create a Project Entry by entering this: >
+
+	Label=~/wherever CD=. filter="*.c *.h" {
+	}
+<
+    Then you can put the cursor in the fold and press \r. The script will fill
+    in the files (C files in this case) from this directory for you.  This is
+    equivalent to \c without any dialogs.
+
+2.  You can edit the Project File at any time to add, remove, or reorder files
+    in the Project list.
+
+3.  If the Project Window ever gets closed, you can just enter >
+	:Project
+<   to bring it back again. (You don't need to give it the filename; the
+    plugin remembers.)
+
+    If you have the 'm' flag set in g:proj_flags, then you get the Project
+    Window to show up again by pressing |CTRL-W_o|. This, of course, will
+    close any other windows that may be open that the cursor is not in.
+
+4.  Adding files to a Project is very easy.  To add, for example, the 'more.c'
+    file to the Project, just insert the filename in the Project Entry then
+    hit <Return> on it.
+
+5.  When |quickfix| loads files, it is not equivalent to pressing <Return> on
+    a filename, so the directory will not be changed and the scripts will not
+    be run. (If I could make this otherwise, I would.)  The solution is to use
+    the \L key to load all of the files in the Project before running
+    quickfix.
+
+6.  If the Project window gets a bit cluttered with folds partially
+    open/closed, you can press |zM| to close everything and tidy it up.
+
+7.  For advanced users, I am exporting the function Project_GetAllFnames()
+    which returns all the filenames within a fold and optionally all its
+    Subprojects.  Also, I export Project_ForEach() for running a function for
+    each filename in the project. See the code for examples on how to use
+    these. Finally, I export Project_GetFname(line_number) so that you can
+    write your own mappings and get the filename for it.
+
+8.  Some people have asked how to do a global mapping to take the cursor to
+    the Project window. One of my goals for the plugin is for it to be as
+    self-contained as possible, so I'm not going to add it by default. But you
+    can put this in your vimrc:
+>
+    	nmap <silent> <Leader>P :Project<CR>
+
+<
+9.  You can put the . entry in a project, and it will launch the
+    |file-explorer| plugin on the directory.  To avoid removal when you
+    refresh, make the entry look like this:
+>
+ 	. # pragma keep
+<
+==============================================================================
+THANKS
+
+	The following people have sent me patches to help with the Project
+	Plugin development:
+
+		Tomas Zellerin
+		Lawrence Kesteloot
+		Dave Eggum
+		A Harrison
+		Thomas Link
+		Richard Bair
+		Eric Arnold
+		Peter Jones
+		Eric Van Dewoestine
+
+
+ vim:ts=8 sw=8 noexpandtab tw=78 ft=help:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/.vim/doc/tags	Tue May 03 08:57:01 2011 +0200
@@ -0,0 +1,72 @@
+:AlignCenter	textformat.txt	/*:AlignCenter*
+:AlignJustify	textformat.txt	/*:AlignJustify*
+:AlignLeft	textformat.txt	/*:AlignLeft*
+:AlignRight	textformat.txt	/*:AlignRight*
+bufexplorer	bufexplorer.txt	/*bufexplorer*
+bufexplorer-changelog	bufexplorer.txt	/*bufexplorer-changelog*
+bufexplorer-credits	bufexplorer.txt	/*bufexplorer-credits*
+bufexplorer-customization	bufexplorer.txt	/*bufexplorer-customization*
+bufexplorer-installation	bufexplorer.txt	/*bufexplorer-installation*
+bufexplorer-todo	bufexplorer.txt	/*bufexplorer-todo*
+bufexplorer-usage	bufexplorer.txt	/*bufexplorer-usage*
+bufexplorer-windowlayout	bufexplorer.txt	/*bufexplorer-windowlayout*
+bufexplorer.txt	bufexplorer.txt	/*bufexplorer.txt*
+buffer-explorer	bufexplorer.txt	/*buffer-explorer*
+drawit	DrawIt.txt	/*drawit*
+drawit-a	DrawIt.txt	/*drawit-a*
+drawit-b	DrawIt.txt	/*drawit-b*
+drawit-brush	DrawIt.txt	/*drawit-brush*
+drawit-c	DrawIt.txt	/*drawit-c*
+drawit-contents	DrawIt.txt	/*drawit-contents*
+drawit-drawing	DrawIt.txt	/*drawit-drawing*
+drawit-e	DrawIt.txt	/*drawit-e*
+drawit-erase	DrawIt.txt	/*drawit-erase*
+drawit-example	DrawIt.txt	/*drawit-example*
+drawit-f	DrawIt.txt	/*drawit-f*
+drawit-history	DrawIt.txt	/*drawit-history*
+drawit-l	DrawIt.txt	/*drawit-l*
+drawit-manual	DrawIt.txt	/*drawit-manual*
+drawit-modes	DrawIt.txt	/*drawit-modes*
+drawit-move	DrawIt.txt	/*drawit-move*
+drawit-moving	DrawIt.txt	/*drawit-moving*
+drawit-options	DrawIt.txt	/*drawit-options*
+drawit-protect	DrawIt.txt	/*drawit-protect*
+drawit-s	DrawIt.txt	/*drawit-s*
+drawit-setbrush	DrawIt.txt	/*drawit-setbrush*
+drawit-setdrawit	DrawIt.txt	/*drawit-setdrawit*
+drawit-start	DrawIt.txt	/*drawit-start*
+drawit-stop	DrawIt.txt	/*drawit-stop*
+drawit-usage	DrawIt.txt	/*drawit-usage*
+drawit-visblock	DrawIt.txt	/*drawit-visblock*
+drawit.txt	DrawIt.txt	/*drawit.txt*
+g:bufExplorerDefaultHelp	bufexplorer.txt	/*g:bufExplorerDefaultHelp*
+g:bufExplorerDetailedHelp	bufexplorer.txt	/*g:bufExplorerDetailedHelp*
+g:bufExplorerFindActive	bufexplorer.txt	/*g:bufExplorerFindActive*
+g:bufExplorerReverseSort	bufexplorer.txt	/*g:bufExplorerReverseSort*
+g:bufExplorerShowDirectories	bufexplorer.txt	/*g:bufExplorerShowDirectories*
+g:bufExplorerShowRelativePath	bufexplorer.txt	/*g:bufExplorerShowRelativePath*
+g:bufExplorerShowTabBuffer	bufexplorer.txt	/*g:bufExplorerShowTabBuffer*
+g:bufExplorerShowUnlisted	bufexplorer.txt	/*g:bufExplorerShowUnlisted*
+g:bufExplorerSortBy	bufexplorer.txt	/*g:bufExplorerSortBy*
+g:bufExplorerSplitBelow	bufexplorer.txt	/*g:bufExplorerSplitBelow*
+g:bufExplorerSplitOutPathName	bufexplorer.txt	/*g:bufExplorerSplitOutPathName*
+g:bufExplorerSplitRight	bufexplorer.txt	/*g:bufExplorerSplitRight*
+g:drawit_insertmode	DrawIt.txt	/*g:drawit_insertmode*
+project	project.txt	/*project*
+project-adding-mappings	project.txt	/*project-adding-mappings*
+project-example	project.txt	/*project-example*
+project-flags	project.txt	/*project-flags*
+project-inheritance	project.txt	/*project-inheritance*
+project-invoking	project.txt	/*project-invoking*
+project-mappings	project.txt	/*project-mappings*
+project-plugin	project.txt	/*project-plugin*
+project-settings	project.txt	/*project-settings*
+project-syntax	project.txt	/*project-syntax*
+project-tips	project.txt	/*project-tips*
+project.txt	project.txt	/*project.txt*
+textformat-commands	textformat.txt	/*textformat-commands*
+textformat-config	textformat.txt	/*textformat-config*
+textformat-history	textformat.txt	/*textformat-history*
+textformat-keymap	textformat.txt	/*textformat-keymap*
+textformat-start	textformat.txt	/*textformat-start*
+textformat.txt	textformat.txt	/*textformat.txt*
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/.vim/doc/textformat.txt	Tue May 03 08:57:01 2011 +0200
@@ -0,0 +1,301 @@
+*textformat.txt*        Vim Text Formatter  (version 2.1)           2008-09-13
+
+
+Description     This plugin provides commands and key mappings to quickly 
+                align and format text. Text can be easily reformatted and 
+                aligned to either left or right margin or justified to both 
+                margins or centered. The text formatting commands provided by 
+                this plugin are a bit more automatic and more intelligent than 
+                those integrated to Vim. Together they make more powerful 
+                command set for formatting text. 
+
+Author          Teemu Likonen <tlikonen@iki.fi>
+
+
+
+
+Contents
+
+        1. Quick start                          |textformat-start|
+        2. Commands                             |textformat-commands|
+        3. Default key mappings                 |textformat-keymap|
+        4. Configuration                        |textformat-config|
+        5. Version history                      |textformat-history|
+
+==============================================================================
+1. Quick start                                              *textformat-start*
+
+The impatient are always with us so below is a short info on (probably) the 
+most important tools provided by this plugin. See the following sections of 
+this manual for more detailed instructions.
+
+<Leader>al              Left-align and reformat
+<Leader>ar              Right-align
+<Leader>aj              Left-right justify and reformat
+<Leader>ac              Center lines
+
+In normal mode the commands operate on current paragraph; in visual mode they 
+operate on the selected lines. By default, <Leader> is the backslash key, so 
+the mappings are actually \al, \ar, \aj and \ac, by default. If you have 
+changed the g:mapleader variable in your .vimrc file <Leader> may be something 
+else.
+
+==============================================================================
+2. Commands                                              *textformat-commands*
+
+Let's start with the basic components of this plugin. These are the ex 
+commands. You probably don't need these very often but they can be handy if 
+you want to have text formatting and aligning as a part of a macro or function 
+or something. The "daily tools" are explained later.
+
+:[range]AlignLeft [indent]                                        *:AlignLeft*
+                        Align to left all the lines in [range] (default is 
+                        current line) and truncate all extra whitespace 
+                        characters. That is, if there are more than one space 
+                        between words they are reduced to just one. If 
+                        'joinspaces' is set then two spaces are added after 
+                        every sentence ending with character ".", "?" or "!".
+
+                        If optional numeric argument [indent] is given then 
+                        that is used as the left margin. If [indent] is not 
+                        given the indent of the first line in the [range] (and 
+                        the first line of each paragraph within the [range]) 
+                        is used to define indent for the rest of the lines in  
+                        the paragraph. There is one exception: if 
+                        'formatoptions' contains "2" then the second line 
+                        defines the indent for the rest of the lines in the 
+                        paragraph.
+
+                        Note: This is very similar to |:left| command except 
+                        that this also truncates whitespaces and that without 
+                        [indent] each paragraph's indent is detected and used.
+
+                        Note: There is a possible unexpected behaviour: If 
+                        command is run without [range] (i.e., it's just the 
+                        current line) and [indent] is not given then this 
+                        command just "aligns" to the current indent position 
+                        and truncates whitespaces. You might see nothing 
+                        happening if there weren't any extra whitespaces. Use 
+                        [indent] (or |:left| command) to align to desired 
+                        column.
+
+:[range]AlignRight [width]                                       *:AlignRight*
+                        Align to right all the lines in [range] (default is 
+                        current line) and truncate all extra whitespace 
+                        characters (honor 'joinspaces', as in :AlignLeft). 
+                        [width] is used as the right margin. If [width] is not 
+                        given the value of 'textwidth' option is used instead. 
+                        If 'textwidth' is zero then the value of 80 is used.
+
+                        Note: This is very similar to |:right| command except 
+                        that this also truncates whitespaces.
+
+:[range]AlignJustify [width]                                   *:AlignJustify*
+                        Left-right justify lines in [range] (default is 
+                        current line). This means adjusting spaces between 
+                        words so that the lines fit. If 'joinspaces' is set 
+                        then at least two spaces are printed after every 
+                        sentence ending with a ".", "?" or "!". The first line 
+                        in [range] (and the first line in each paragraph 
+                        within the [range]) defines the indent for the rest of 
+                        the lines in the paragraph, except if 'formatoptions' 
+                        contains "2" then it's the second line.
+
+                        Numeric argument [width] is used as the right margin. 
+                        If [width] is not given the value of 'textwidth' is 
+                        used instead. If 'textwidth' is zero then the value of 
+                        80 is used.
+
+                        Also see the Discussion below.
+
+:[range]AlignCenter [width]                                     *:AlignCenter*
+                        Center lines in [range] (default is current line) 
+                        between the first column and [width]. All extra 
+                        whitespace characters are truncated (but honor 
+                        'joinspaces', just like in :AlignLeft). If [width] is 
+                        not given the value of 'textwidth' option is used 
+                        instead. If 'textwidth' is zero the value of 80 is 
+                        used.
+
+                        Note: This is very similar to |:center| except that 
+                        this also truncates whitespaces.
+
+
+Discussion ~
+
+All the previous ex commands are rather "stupid" and operate on single lines 
+only. They do not wrap lines nor do other kind of formatting. If [width] (or 
+'textwidth') is too narrow for the line then some characters will go beyond 
+the right margin. This is similar to Vim's own |:left|, |:right| and |:center| 
+commands. More sophisticated formatting tools are provided as key mappings 
+(see below).
+
+Usually when paragraphs are justified the last line of each paragraph is 
+aligned to left. However, :AlignJustify command does not do this. The purpose 
+of this command is to do exactly what was asked for: left-right justify 
+a range of lines. More sophisticated justify tools is <Leader>aj which 
+reformats the paragraph (like |gw|), justifies lines and aligns each 
+paragraph's last line to left.
+
+All the commands truncate extra whitespaces which makes them work well 
+together. This is particularly because the left-right justify needs to add 
+extra spaces to make lines fill the text area. If you later want to reformat 
+such previously justified paragraph and align it to left, for example, it's 
+convenient that the tool automatically handles this and removes extra spaces. 
+If you want to align text without truncating whitespaces use Vim's own align 
+commands: |:left|, |:right| and |:center|.
+
+==============================================================================
+3. Default key mappings                                    *textformat-keymap*
+
+By default this plugin provides a couple of key mappings for convenient text 
+formatting. If the mappings have already been defined by user (or are taken by 
+other plugins) then some of the following mappings may not be automatically 
+available. See the next section of this manual for information on how to 
+change the default mappings.
+
+There are key mappings available for normal mode and visual mode. As usual, 
+<Leader> is the backslash key by default but it can be changed with 
+g:mapleader variable. Consult the Vim manual for more information on <Leader>.
+
+
+Normal mode (current paragraph) ~
+
+<Leader>al              Left-align the current "inner paragraph" (see |ip|) 
+                        and reformat it according to 'textwidth'.
+
+<Leader>ar              Right-align the current "inner paragraph" (see |ip|) 
+                        to margin at 'textwidth'. This does not reformat the 
+                        paragraph because with right-aligned text user usually 
+                        wants to decide exactly what goes to what line.
+
+<Leader>aj              Left-right justify the current "inner paragraph" (see 
+                        |ip|). Technically each line's whitespaces are first 
+                        truncated, then the text is reformatted according to 
+                        'textwidth' and finally lines are justified. The last 
+                        line (of each text paragraph) is aligned to left.
+
+<Leader>ac              Center lines of current "inner paragraph" (see |ip|) 
+                        between the first column and 'textwidth'. This does 
+                        not reformat the paragraph because with centered text 
+                        user usually wants to decide exactly what goes to what 
+                        line.
+
+
+Visual mode (range of lines) ~
+
+{Visual}<Leader>al      Left-align and reformat {Visual} lines so that they 
+                        fill 'textwidth'.
+
+{Visual}<Leader>ar      Right-align {Visual} lines.
+
+{Visual}<Leader>aj      Left-right justify {Visual} lines. First truncate all 
+                        extra whitespace characters, then reformat lines so 
+                        that they fill 'textwidth' and finally left-right 
+                        justify. The last line of each paragraph as well as 
+                        the last line in {Visual} range is aligned to left.
+
+{Visual}<Leader>ac      Center {Visual} lines.
+
+
+Both normal mode and visual mode commands truncate extra whitespace 
+characters. If 'joinspaces' is set then an extra space is added after every 
+sentence ending with a ".", "?" or "!". The first line in each paragraph 
+inside the range defines the indent for the rest of the lines in the 
+paragraph, except if 'formatoptions' contains "2" then it's the second line.
+
+
+Paragraph definitions ~
+
+The normal mode commands operate on the concept of "inner paragraph" (see 
+|ip|). The effect is almost the same as selecting current paragraph with Vim's 
+"vip" command and then executing the equivalent visual mode command. Such 
+inner paragraph may contain several text paragraphs if 'formatoptions' 
+contains "w". Each of them is reformatted separately with <Leader>al and 
+<Leader>aj commands.
+
+New paragraph always begins after a blank line. If 'formatoptions' contains 
+"w" then new paragraph also begins after a line which ends with 
+a non-whitespace character. That is, with "w" in 'formatoptions' every line 
+which ends with a non-whitespace also ends a paragraph. In left-right justify 
+(<Leader>aj) such line is aligned to left. You need to ensure that there is 
+a trailing whitespace in every consecutive line which belongs to same 
+paragraph (the whitespace is preserved after formatting). If 'formatoptions' 
+does not contain "w" then all consecutive non-blank lines belong to same 
+paragraph.
+
+==============================================================================
+4. Configuration                                           *textformat-config*
+
+The key mappings can be configured freely by user. This plugin uses the 
+default ones only if they are free and not used for other purposes. Here's an 
+example of lines you could put to your .vimrc file:
+>
+        nmap <F5> <Plug>Quick_Align_Paragraph_Left
+        nmap <F6> <Plug>Quick_Align_Paragraph_Right
+        nmap <F7> <Plug>Quick_Align_Paragraph_Justify
+        nmap <F8> <Plug>Quick_Align_Paragraph_Center
+
+        vmap <F5> <Plug>Align_Range_Left
+        vmap <F6> <Plug>Align_Range_Right
+        vmap <F7> <Plug>Align_Range_Justify
+        vmap <F8> <Plug>Align_Range_Center
+
+That is, |:nmap| command defines mappings for normal mode and |:vmap| for 
+visual mode. Function keys from <F5> to <F8> are used in this example. The 
+rest of the line is a code word for Vim and this plugin. They must be written 
+exactly as shown in the example. I think the code words are pretty much 
+self-descriptive.
+
+Don't use |:nnoremap| and |:vnoremap| commands here; they don't work because 
+the right-hand side (<Plug>...) must be remappable. See Vim's manual for more 
+information about the key map commands.
+
+Most part of this plugin is loaded into memory when the text-formatting 
+commands or key maps are used for the first time. Only the very minimum is 
+automatically loaded when Vim is started. If you want to completely avoid 
+loading this plugin put the following line to your .vimrc file:
+>
+        let g:loaded_textformat = 1
+
+Happy formatting!
+
+==============================================================================
+5. Version history                                        *textformat-history*
+
+        v2.1                                                        2008-09-13
+
+              - Minor internal cleanup.
+
+        v2.0                                                        2008-08-10
+
+              - \al and \aj now reformat text also in visual mode.
+              - \al and \aj honor "w" in 'formatoptions' and detect paragraph 
+                boundaries accordingly.
+              - :AlignLeft, :AlignJustify, \al and \aj recognize several 
+                paragraphs within the range and detect indent for each 
+                paragraph separately.
+              - Add logic to load the plugin script only once.
+
+        v1.1                                                        2008-08-04
+
+              - Keep cursor position more accurately when formatting 
+                a paragraph with \al and \aj.
+              - When 'joinspaces' is set insert two spaces after .?! 
+                punctuation with left-right justify. This is now similar to 
+                other commands.
+
+        v1.0                                                        2008-08-03
+
+              - All the commands now follow user's 'expandtab' setting and 
+                print leading whitespaces accordingly. Now this works just 
+                like :left, :right and :center commands.
+              - The left-aligned last line in justified paragraph did not 
+                honor 'joinspaces'. Fixed.
+
+        v0.9                                                        2008-08-01
+
+              - Initial upload to http://www.vim.org .
+
+==============================================================================
+vim: ft=help tw=78 ts=8 et norl fo+=2aw
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/.vim/ftdetect/scala.vim	Tue May 03 08:57:01 2011 +0200
@@ -0,0 +1,3 @@
+"        $URL: https://lampsvn.epfl.ch/svn-repos/scala/scala-tool-support/trunk/src/vim/ftdetect/scala.vim $
+
+au BufRead,BufNewFile *.scala set filetype=scala
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/.vim/indent/scala.vim	Tue May 03 08:57:01 2011 +0200
@@ -0,0 +1,85 @@
+" Vim indent file
+" Language   : Scala (http://scala-lang.org/)
+" Maintainer : Stefan Matthias Aust
+" Last Change: 2006 Apr 13
+" Revision   : $Id: scala.vim 15234 2008-05-29 21:54:59Z stepancheg $
+"        $URL: https://lampsvn.epfl.ch/svn-repos/scala/scala-tool-support/trunk/src/vim/indent/scala.vim $
+
+if exists("b:did_indent")
+  finish
+endif
+let b:did_indent = 1
+
+setlocal indentexpr=GetScalaIndent()
+
+setlocal indentkeys=0{,0},0),!^F,<>>,<CR>
+
+setlocal autoindent sw=2 et
+
+if exists("*GetScalaIndent")
+  finish
+endif
+
+function! CountParens(line)
+  let line = substitute(a:line, '"\(.\|\\"\)*"', '', 'g')
+  let open = substitute(line, '[^(]', '', 'g')
+  let close = substitute(line, '[^)]', '', 'g')
+  return strlen(open) - strlen(close)
+endfunction
+
+function! GetScalaIndent()
+  " Find a non-blank line above the current line.
+  let lnum = prevnonblank(v:lnum - 1)
+
+  " Hit the start of the file, use zero indent.
+  if lnum == 0
+    return 0
+  endif
+
+  let ind = indent(lnum)
+  let prevline = getline(lnum)
+
+  "Indent html literals
+  if prevline !~ '/>\s*$' && prevline =~ '^\s*<[a-zA-Z][^>]*>\s*$'
+    return ind + &shiftwidth
+  endif
+
+  " Add a 'shiftwidth' after lines that start a block
+  " If if, for or while end with ), this is a one-line block
+  " If val, var, def end with =, this is a one-line block
+  if prevline =~ '^\s*\<\(\(else\s\+\)\?if\|for\|while\|va[lr]\|def\)\>.*[)=]\s*$'
+        \ || prevline =~ '^\s*\<else\>\s*$'
+        \ || prevline =~ '{\s*$'
+    let ind = ind + &shiftwidth
+  endif
+
+  " If parenthesis are unbalanced, indent or dedent
+  let c = CountParens(prevline)
+  echo c
+  if c > 0
+    let ind = ind + &shiftwidth
+  elseif c < 0
+    let ind = ind - &shiftwidth
+  endif
+  
+  " Dedent after if, for, while and val, var, def without block
+  let pprevline = getline(prevnonblank(lnum - 1))
+  if pprevline =~ '^\s*\<\(\(else\s\+\)\?if\|for\|while\|va[lr]\|def\)\>.*[)=]\s*$'
+        \ || pprevline =~ '^\s*\<else\>\s*$'
+    let ind = ind - &shiftwidth
+  endif
+
+  " Align 'for' clauses nicely
+  if prevline =~ '^\s*\<for\> (.*;\s*$'
+    let ind = ind - &shiftwidth + 5
+  endif
+
+  " Subtract a 'shiftwidth' on '}' or html
+  let thisline = getline(v:lnum)
+  if thisline =~ '^\s*[})]' 
+        \ || thisline =~ '^\s*</[a-zA-Z][^>]*>'
+    let ind = ind - &shiftwidth
+  endif
+
+  return ind
+endfunction
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/.vim/plugin/31-create-scala.vim	Tue May 03 08:57:01 2011 +0200
@@ -0,0 +1,57 @@
+" Vim plugin that generates new Scala source file when you type
+"    vim nonexistent.scala.
+" Scripts tries to detect package name from the directory path, e. g.
+" .../src/main/scala/com/mycompany/myapp/app.scala gets header
+" package com.mycompany.myapp
+"
+" Author     :   Stepan Koltsov <yozh@mx1.ru>
+" Revision   : $Id: 31-create-scala.vim 17312 2009-03-16 04:02:05Z stepancheg $
+"        $URL: https://lampsvn.epfl.ch/svn-repos/scala/scala-tool-support/trunk/src/vim/plugin/31-create-scala.vim $
+
+function! MakeScalaFile()
+    if exists("b:template_used") && b:template_used
+        return
+    endif
+    
+    let b:template_used = 1
+    
+    let filename = expand("<afile>:p")
+    let x = substitute(filename, "\.scala$", "", "")
+    
+    let p = substitute(x, "/[^/]*$", "", "")
+    let p = substitute(p, "/", ".", "g")
+    let p = substitute(p, ".*\.src$", "@", "") " unnamed package
+    let p = substitute(p, ".*\.src\.", "!", "")
+    let p = substitute(p, "^!main\.scala\.", "!", "") "
+    let p = substitute(p, "^!.*\.ru\.", "!ru.", "")
+    let p = substitute(p, "^!.*\.org\.", "!org.", "")
+    let p = substitute(p, "^!.*\.com\.", "!com.", "")
+    
+    " ! marks that we found package name.
+    if match(p, "^!") == 0
+        let p = substitute(p, "^!", "", "")
+    else
+        " Don't know package name.
+        let p = "@"
+    endif
+    
+    let class = substitute(x, ".*/", "", "")
+    
+    if p != "@"
+        call append("0", "package " . p)
+    endif
+    
+    "norm G
+    "call append(".", "class " . class . " {")
+    
+    "norm G
+    "call append(".", "} /// end of " . class)
+    
+    call append(".", "// vim: set ts=2 sw=2 et:")
+    call append(".", "")
+    
+endfunction
+
+au BufNewFile *.scala call MakeScalaFile()
+
+" vim: set ts=4 sw=4 et:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/.vim/plugin/DrawItPlugin.vim	Tue May 03 08:57:01 2011 +0200
@@ -0,0 +1,65 @@
+" DrawItPlugin.vim: a simple way to draw things in Vim -- just put this file in
+"             your plugin directory, use \di to start (\ds to stop), and
+"             just move about using the cursor keys.
+"
+"             You may also use visual-block mode to select endpoints and
+"             draw lines, arrows, and ellipses.
+"
+" Date:			Jul 18, 2006
+" Maintainer:	Charles E. Campbell, Jr.  (Charles.E.Campbell.1@gsfc.nasa.gov)
+" Copyright:    Copyright (C) 1999-2005 Charles E. Campbell, Jr. {{{1
+"               Permission is hereby granted to use and distribute this code,
+"               with or without modifications, provided that this copyright
+"               notice is copied with it. Like anything else that's free,
+"               DrawIt.vim is provided *as is* and comes with no warranty
+"               of any kind, either expressed or implied. By using this
+"               plugin, you agree that in no event will the copyright
+"               holder be liable for any damages resulting from the use
+"               of this software.
+"
+" Required:  this script requires Vim 7.0 (or later) {{{1
+" To Enable: simply put this plugin into your ~/.vim/plugin directory {{{2
+"
+" GetLatestVimScripts: 40 1 :AutoInstall: DrawIt.vim
+"
+"  (Zeph 3:1,2 WEB) Woe to her who is rebellious and polluted, the {{{1
+"  oppressing city! She didn't obey the voice. She didn't receive
+"  correction.  She didn't trust in Yahweh. She didn't draw near to her God.
+
+" ---------------------------------------------------------------------
+" Load Once: {{{1
+if &cp || exists("g:loaded_DrawItPlugin")
+ finish
+endif
+let g:loaded_DrawItPlugin = 1
+let s:keepcpo             = &cpo
+set cpo&vim
+
+" ---------------------------------------------------------------------
+" DrChip Menu Support: {{{1
+if has("gui_running") && has("menu") && &go =~ 'm'
+ if !exists("g:DrChipTopLvlMenu")
+  let g:DrChipTopLvlMenu= "DrChip."
+ endif
+ exe 'menu '.g:DrChipTopLvlMenu.'DrawIt.Start\ DrawIt<tab>\\di		<Leader>di'
+endif
+
+" ---------------------------------------------------------------------
+" Public Interface: {{{1
+if !hasmapto('<Plug>StartDrawIt')
+  map <unique> <Leader>di <Plug>StartDrawIt
+endif
+map <silent> <Plug>StartDrawIt  :set lz<cr>:call DrawIt#StartDrawIt()<cr>:set nolz<cr>
+com! -nargs=0 DIstart set lz|call DrawIt#StartDrawIt()|set nolz
+
+if !hasmapto('<Plug>StopDrawIt')
+  map <unique> <Leader>ds <Plug>StopDrawIt
+endif
+map <silent> <Plug>StopDrawIt :set lz<cr>:call DrawIt#StopDrawIt()<cr>:set nolz<cr>
+com! -nargs=0 DIstop set lz|call DrawIt#StopDrawIt()|set nolz
+
+" ---------------------------------------------------------------------
+"  Cleanup And Modelines:
+"  vim: fdm=marker
+let &cpo= s:keepcpo
+unlet s:keepcpo
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/.vim/plugin/bufexplorer.vim	Tue May 03 08:57:01 2011 +0200
@@ -0,0 +1,1140 @@
+"==============================================================================
+"    Copyright: Copyright (C) 2001-2010 Jeff Lanzarotta
+"               Permission is hereby granted to use and distribute this code,
+"               with or without modifications, provided that this copyright
+"               notice is copied with it. Like anything else that's free,
+"               bufexplorer.vim is provided *as is* and comes with no
+"               warranty of any kind, either expressed or implied. In no
+"               event will the copyright holder be liable for any damages
+"               resulting from the use of this software.
+" Name Of File: bufexplorer.vim
+"  Description: Buffer Explorer Vim Plugin
+"   Maintainer: Jeff Lanzarotta (delux256-vim at yahoo dot com)
+" Last Changed: Tuesday, 16 Feb 2010
+"      Version: See g:bufexplorer_version for version number.
+"        Usage: This file should reside in the plugin directory and be
+"               automatically sourced.
+"
+"               You may use the default keymappings of
+"
+"                 <Leader>be  - Opens BE.
+"                 <Leader>bs  - Opens horizontally window BE.
+"                 <Leader>bv  - Opens vertically window BE.
+"
+"               Or you can use
+"
+"                 ":BufExplorer"                - Opens BE.
+"                 ":BufExplorerHorizontalSplit" - Opens horizontally window BE.
+"                 ":BufExplorerVerticalSplit"   - Opens vertically window BE.
+"
+"               For more help see supplied documentation.
+"      History: See supplied documentation.
+"==============================================================================
+
+" Exit quickly if already running or when 'compatible' is set. {{{1
+if exists("g:bufexplorer_version") || &cp
+  finish
+endif
+"1}}}
+
+" Version number
+let g:bufexplorer_version = "7.2.7"
+
+" Check for Vim version 700 or greater {{{1
+if v:version < 700
+  echo "Sorry, bufexplorer ".g:bufexplorer_version."\nONLY runs with Vim 7.0 and greater."
+  finish
+endif
+
+" Public Interface {{{1
+if maparg("<Leader>be") =~ 'BufExplorer'
+  nunmap <Leader>be
+endif
+
+if maparg("<Leader>bs") =~ 'BufExplorerHorizontalSplit'
+  nunmap <Leader>bs
+endif
+
+if maparg("<Leader>bv") =~ 'BufExplorerVerticalSplit'
+  nunmap <Leader>bv
+endif
+
+nmap <script> <silent> <unique> <Leader>be :BufExplorer<CR>
+nmap <script> <silent> <unique> <Leader>bs :BufExplorerHorizontalSplit<CR>
+nmap <script> <silent> <unique> <Leader>bv :BufExplorerVerticalSplit<CR>
+
+" Create commands {{{1
+command! BufExplorer :call StartBufExplorer(has ("gui") ? "drop" : "hide edit")
+command! BufExplorerHorizontalSplit :call BufExplorerHorizontalSplit()
+command! BufExplorerVerticalSplit :call BufExplorerVerticalSplit()
+
+" BESet {{{1
+function! s:BESet(var, default)
+  if !exists(a:var)
+    if type(a:default)
+      exec "let" a:var "=" string(a:default)
+    else
+      exec "let" a:var "=" a:default
+    endif
+
+    return 1
+  endif
+
+  return 0
+endfunction
+
+" BEReset {{{1
+function! s:BEReset()
+  " Build initial MRUList. This makes sure all the files specified on the
+  " command line are picked up correctly.
+  let s:MRUList = range(1, bufnr('$'))
+
+  " Initialize one tab space array, ignore zero-based tabpagenr
+  " since all tabpagenr's start at 1.
+  " -1 signifies this is the first time we are referencing this
+  " tabpagenr.
+  let s:tabSpace = [ [-1], [-1] ]
+endfunction
+
+" Setup the autocommands that handle the MRUList and other stuff. {{{1
+" This is only done once when Vim starts up.
+augroup BufExplorerVimEnter
+  autocmd!
+  autocmd VimEnter * call s:BESetup()
+augroup END
+
+" BESetup {{{1
+function! s:BESetup()
+  call s:BEReset()
+
+  " Now that the MRUList is created, add the other autocmds.
+  augroup BufExplorer
+    " Deleting autocommands in case the script is reloaded
+    autocmd!
+    autocmd TabEnter * call s:BETabEnter()
+    autocmd BufNew * call s:BEAddBuffer()
+    autocmd BufEnter * call s:BEActivateBuffer()
+
+    autocmd BufWipeOut * call s:BEDeactivateBuffer(1)
+    autocmd BufDelete * call s:BEDeactivateBuffer(0)
+
+    autocmd BufWinEnter \[BufExplorer\] call s:BEInitialize()
+    autocmd BufWinLeave \[BufExplorer\] call s:BECleanup()
+    autocmd SessionLoadPost * call s:BEReset()
+  augroup END
+
+  " Remove the VimEnter event as it is no longer needed
+  augroup SelectBufVimEnter
+    autocmd!
+  augroup END
+endfunction
+
+" BETabEnter {{{1
+function! s:BETabEnter()
+  " Make s:tabSpace 1-based
+  if empty(s:tabSpace) || len(s:tabSpace) < (tabpagenr() + 1)
+    call add(s:tabSpace, [-1])
+  endif
+endfunction
+
+" BEAddBuffer {{{1
+function! s:BEAddBuffer()
+  if !exists('s:raw_buffer_listing') || empty(s:raw_buffer_listing)
+    silent let s:raw_buffer_listing = s:BEGetBufferInfo(0)
+  else
+    " We cannot use :buffers! or :ls! to gather information 
+    " about this buffer since it was only just added.
+    " Any changes to the buffer (setlocal buftype, ...) 
+    " happens after this event fires.
+    "
+    " So we will indicate the :buffers! command must be re-run.
+    " This should help with the performance of the plugin.
+
+    " There are some checks which can be performed 
+    " before deciding to refresh the buffer list.
+    let bufnr = expand('<abuf>') + 0
+
+    if s:BEIgnoreBuffer(bufnr) == 1
+      return 
+    else
+      let s:refreshBufferList = 1
+    endif
+  endif
+
+  call s:BEActivateBuffer()
+endfunction
+
+" ActivateBuffer {{{1
+function! s:BEActivateBuffer()
+  let b = bufnr("%")
+  let l = get(s:tabSpace, tabpagenr(), [])
+
+  if s:BEIgnoreBuffer(b) == 1
+    return
+  endif
+
+  if !empty(l) && l[0] == '-1'
+    " The first time we add a tab Vim uses the current 
+    " buffer as it's starting page, even though we are about
+    " to edit a new page (BufEnter triggers after), so
+    " remove the -1 entry indicating we have covered this case.
+    let l = []
+    let s:tabSpace[tabpagenr()] = l
+  elseif empty(l) || index(l, b) == -1
+    " Add new buffer to this tab buffer list
+    let l = add(l, b)
+    let s:tabSpace[tabpagenr()] = l
+
+    if g:bufExplorerOnlyOneTab == 1
+      " If a buffer can only be available in 1 tab page
+      " ensure this buffer is not present in any other tabs
+      let tabidx = 1
+      while tabidx < len(s:tabSpace)
+        if tabidx != tabpagenr()
+          let bufidx = index(s:tabSpace[tabidx], b)
+          if bufidx != -1
+            call remove(s:tabSpace[tabidx], bufidx)
+          endif
+        endif
+        let tabidx = tabidx + 1
+      endwhile
+    endif
+  endif
+
+  call s:BEMRUPush(b)
+
+  if exists('s:raw_buffer_listing') && !empty(s:raw_buffer_listing)
+    " Check if the buffer exists, but was deleted previously
+    " Careful use of ' and " so we do not have to escape all the \'s
+    " Regex: ^\s*bu\>
+    "        ^ - Starting at the beginning of the string
+    "        \s* - optional whitespace
+    "        b - Vim's buffer number
+    "        u\> - the buffer must be unlisted
+    let shortlist = filter(copy(s:raw_buffer_listing), "v:val.attributes =~ '".'^\s*'.b.'u\>'."'")
+
+    if !empty(shortlist)
+      " If it is unlisted (ie deleted), but now we editing it again 
+      " rebuild the buffer list.
+      let s:refreshBufferList = 1
+    endif
+  endif
+endfunction
+
+" BEDeactivateBuffer {{{1
+function! s:BEDeactivateBuffer(remove)
+  let _bufnr = str2nr(expand("<abuf>"))
+
+  call s:BEMRUPop(_bufnr)
+
+  if a:remove
+    call s:BEDeleteBufferListing(_bufnr)
+  else
+    let s:refreshBufferList = 1
+  endif
+endfunction
+
+" BEMRUPop {{{1
+function! s:BEMRUPop(buf)
+  call filter(s:MRUList, 'v:val != '.a:buf)
+endfunction
+
+" BEMRUPush {{{1
+function! s:BEMRUPush(buf)
+  if s:BEIgnoreBuffer(a:buf) == 1
+    return
+  endif
+
+  " Remove the buffer number from the list if it already exists.
+  call s:BEMRUPop(a:buf)
+
+  " Add the buffer number to the head of the list.
+  call insert(s:MRUList,a:buf)
+endfunction
+
+" BEInitialize {{{1
+function! s:BEInitialize()
+  let s:_insertmode = &insertmode
+  set noinsertmode
+
+  let s:_showcmd = &showcmd
+  set noshowcmd
+
+  let s:_cpo = &cpo
+  set cpo&vim
+
+  let s:_report = &report
+  let &report = 10000
+
+  let s:_list = &list
+  set nolist
+
+  setlocal nonumber
+  setlocal foldcolumn=0
+  setlocal nofoldenable
+  setlocal cursorline
+  setlocal nospell
+  setlocal nobuflisted
+
+  let s:running = 1
+endfunction
+
+" BEIgnoreBuffer 
+function! s:BEIgnoreBuffer(buf)
+  " Check to see if this buffer should be ignore by BufExplorer.
+
+  " Skip temporary buffers with buftype set.
+  if empty(getbufvar(a:buf, "&buftype") == 0)
+    return 1
+  endif
+
+  " Skip unlisted buffers.
+  if buflisted(a:buf) == 0
+    return 1
+  endif
+
+  " Skip buffers with no name.
+  if empty(bufname(a:buf)) == 1
+    return 1
+  endif
+
+  " Do not add the BufExplorer window to the list.
+  if fnamemodify(bufname(a:buf), ":t") == s:name
+    return 1
+  endif
+
+  if index(s:MRU_Exclude_List, bufname(a:buf)) >= 0
+    return 1
+  end
+
+  return 0 
+endfunction
+
+" BECleanup {{{1
+function! s:BECleanup()
+  let &insertmode = s:_insertmode
+  let &showcmd = s:_showcmd
+  let &cpo = s:_cpo
+  let &report = s:_report
+  let &list = s:_list
+  let s:running = 0
+  let s:splitMode = ""
+
+  delmarks!
+endfunction
+
+" BufExplorerHorizontalSplit {{{1
+function! BufExplorerHorizontalSplit()
+  let s:splitMode = "sp"
+  exec "BufExplorer"
+endfunction
+
+" BufExplorerVerticalSplit {{{1
+function! BufExplorerVerticalSplit()
+  let s:splitMode = "vsp"
+  exec "BufExplorer"
+endfunction
+
+" StartBufExplorer {{{1
+function! StartBufExplorer(open)
+  let name = s:name
+
+  if !has("win32")
+    " On non-Windows boxes, escape the name so that is shows up correctly.
+    let name = escape(name, "[]")
+  endif
+
+  " Make sure there is only one explorer open at a time.
+  if s:running == 1
+    " Go to the open buffer.
+    if has("gui")
+      exec "drop" name
+    endif
+
+    return
+  endif
+
+  " Add zero to ensure the variable is treated as a Number.
+  let s:originBuffer = bufnr("%") + 0
+
+  " Create or rebuild the raw buffer list if necessary.
+  if !exists('s:raw_buffer_listing') || 
+        \ empty(s:raw_buffer_listing) ||
+        \ s:refreshBufferList == 1
+    silent let s:raw_buffer_listing = s:BEGetBufferInfo(0)
+  endif
+
+  let copy = copy(s:raw_buffer_listing)
+
+  if (g:bufExplorerShowUnlisted == 0)
+    call filter(copy, 'v:val.attributes !~ "u"')
+  endif
+
+  " We may have to split the current window.
+  if (s:splitMode != "")
+    " Save off the original settings.
+    let [_splitbelow, _splitright] = [&splitbelow, &splitright]
+
+    " Set the setting to ours.
+    let [&splitbelow, &splitright] = [g:bufExplorerSplitBelow, g:bufExplorerSplitRight]
+
+    " Do it.
+    exe 'keepalt '.s:splitMode
+
+    " Restore the original settings.
+    let [&splitbelow, &splitright] = [_splitbelow, _splitright]
+  endif
+
+  if !exists("b:displayMode") || b:displayMode != "winmanager"
+    " Do not use keepalt when opening bufexplorer to allow the buffer that we are
+    " leaving to become the new alternate buffer
+    exec "silent keepjumps ".a:open." ".name
+  endif
+
+  call s:BEDisplayBufferList()
+endfunction
+
+" BEDisplayBufferList {{{1
+function! s:BEDisplayBufferList()
+  " Do not set bufhidden since it wipes out 
+  " the data if we switch away from the buffer 
+  " using CTRL-^
+  setlocal buftype=nofile
+  setlocal modifiable
+  setlocal noswapfile
+  setlocal nowrap
+
+  " Delete all previous lines to the black hole register
+  call cursor(1,1)
+  exec 'silent! normal! "_dG'
+
+  call s:BESetupSyntax()
+  call s:BEMapKeys()
+  call setline(1, s:BECreateHelp())
+  call s:BEBuildBufferList()
+  call cursor(s:firstBufferLine, 1)
+
+  if !g:bufExplorerResize
+    normal! zz
+  endif
+
+  setlocal nomodifiable
+endfunction
+
+" BEMapKeys {{{1
+function! s:BEMapKeys()
+  if exists("b:displayMode") && b:displayMode == "winmanager"
+    nnoremap <buffer> <silent> <tab> :call <SID>BESelectBuffer("tab")<cr>
+  endif
+
+  nnoremap <buffer> <silent> <F1>          :call <SID>BEToggleHelp()<cr>
+  nnoremap <buffer> <silent> <2-leftmouse> :call <SID>BESelectBuffer()<cr>
+  nnoremap <buffer> <silent> <cr>          :call <SID>BESelectBuffer()<cr>
+  nnoremap <buffer> <silent> o             :call <SID>BESelectBuffer()<cr>
+  nnoremap <buffer> <silent> t             :call <SID>BESelectBuffer("tab")<cr>
+  nnoremap <buffer> <silent> <s-cr>        :call <SID>BESelectBuffer("tab")<cr>
+
+  nnoremap <buffer> <silent> d             :call <SID>BERemoveBuffer("delete", "n")<cr>
+  xnoremap <buffer> <silent> d             :call <SID>BERemoveBuffer("delete", "v")<cr>
+  nnoremap <buffer> <silent> D             :call <SID>BERemoveBuffer("wipe", "n")<cr>
+  xnoremap <buffer> <silent> D             :call <SID>BERemoveBuffer("wipe", "v")<cr>
+
+  nnoremap <buffer> <silent> m             :call <SID>BEMRUListShow()<cr>
+  nnoremap <buffer> <silent> p             :call <SID>BEToggleSplitOutPathName()<cr>
+  nnoremap <buffer> <silent> q             :call <SID>BEClose("quit")<cr>
+  nnoremap <buffer> <silent> r             :call <SID>BESortReverse()<cr>
+  nnoremap <buffer> <silent> R             :call <SID>BEToggleShowRelativePath()<cr>
+  nnoremap <buffer> <silent> s             :call <SID>BESortSelect()<cr>
+  nnoremap <buffer> <silent> S             :call <SID>BEReverseSortSelect()<cr>
+  nnoremap <buffer> <silent> u             :call <SID>BEToggleShowUnlisted()<cr>
+  nnoremap <buffer> <silent> f             :call <SID>BEToggleFindActive()<cr>
+  nnoremap <buffer> <silent> T             :call <SID>BEToggleShowTabBuffer()<cr>
+  nnoremap <buffer> <silent> B             :call <SID>BEToggleOnlyOneTab()<cr>
+
+  for k in ["G", "n", "N", "L", "M", "H"]
+    exec "nnoremap <buffer> <silent>" k ":keepjumps normal!" k."<cr>"
+  endfor
+endfunction
+
+" BESetupSyntax {{{1
+function! s:BESetupSyntax()
+  if has("syntax")
+    syn match bufExplorerHelp         "^\".*" contains=bufExplorerSortBy,bufExplorerMapping,bufExplorerTitle,bufExplorerSortType,bufExplorerToggleSplit,bufExplorerToggleOpen
+    syn match bufExplorerOpenIn       "Open in \w\+ window" contained
+    syn match bufExplorerSplit        "\w\+ split" contained
+    syn match bufExplorerSortBy       "Sorted by .*" contained contains=bufExplorerOpenIn,bufExplorerSplit
+    syn match bufExplorerMapping      "\" \zs.\+\ze :" contained
+    syn match bufExplorerTitle        "Buffer Explorer.*" contained
+    syn match bufExplorerSortType     "'\w\{-}'" contained
+    syn match bufExplorerBufNbr       /^\s*\d\+/
+    syn match bufExplorerToggleSplit  "toggle split type" contained
+    syn match bufExplorerToggleOpen   "toggle open mode" contained
+    syn match bufExplorerModBuf       /^\s*\d\+.\{4}+.*/
+    syn match bufExplorerLockedBuf    /^\s*\d\+.\{3}[\-=].*/
+    syn match bufExplorerHidBuf       /^\s*\d\+.\{2}h.*/
+    syn match bufExplorerActBuf       /^\s*\d\+.\{2}a.*/
+    syn match bufExplorerCurBuf       /^\s*\d\+.%.*/
+    syn match bufExplorerAltBuf       /^\s*\d\+.#.*/
+    syn match bufExplorerUnlBuf       /^\s*\d\+u.*/
+
+    hi def link bufExplorerBufNbr Number
+    hi def link bufExplorerMapping NonText
+    hi def link bufExplorerHelp Special
+    hi def link bufExplorerOpenIn Identifier
+    hi def link bufExplorerSortBy String
+    hi def link bufExplorerSplit NonText
+    hi def link bufExplorerTitle NonText
+    hi def link bufExplorerSortType bufExplorerSortBy
+    hi def link bufExplorerToggleSplit bufExplorerSplit
+    hi def link bufExplorerToggleOpen bufExplorerOpenIn
+
+    hi def link bufExplorerActBuf Identifier
+    hi def link bufExplorerAltBuf String
+    hi def link bufExplorerCurBuf Type
+    hi def link bufExplorerHidBuf Constant
+    hi def link bufExplorerLockedBuf Special
+    hi def link bufExplorerModBuf Exception
+    hi def link bufExplorerUnlBuf Comment
+  endif
+endfunction
+
+" BEToggleHelp {{{1
+function! s:BEToggleHelp()
+  let g:bufExplorerDetailedHelp = !g:bufExplorerDetailedHelp
+
+  setlocal modifiable
+
+  " Save position.
+  normal! ma
+
+  " Remove old header.
+  if (s:firstBufferLine > 1)
+    exec "keepjumps 1,".(s:firstBufferLine - 1) "d _"
+  endif
+
+  call append(0, s:BECreateHelp())
+
+  silent! normal! g`a
+  delmarks a
+
+  setlocal nomodifiable
+
+  if exists("b:displayMode") && b:displayMode == "winmanager"
+    call WinManagerForceReSize("BufExplorer")
+  endif
+endfunction
+
+" BEGetHelpStatus {{{1
+function! s:BEGetHelpStatus()
+  let ret = '" Sorted by '.((g:bufExplorerReverseSort == 1) ? "reverse " : "").g:bufExplorerSortBy
+  let ret .= ' | '.((g:bufExplorerFindActive == 0) ? "Don't " : "")."Locate buffer"
+  let ret .= ((g:bufExplorerShowUnlisted == 0) ? "" : " | Show unlisted")
+  let ret .= ((g:bufExplorerShowTabBuffer == 0) ? "" : " | Show buffers/tab")
+  let ret .= ((g:bufExplorerOnlyOneTab == 1) ? "" : " | One tab / buffer")
+  let ret .= ' | '.((g:bufExplorerShowRelativePath == 0) ? "Absolute" : "Relative")
+  let ret .= ' '.((g:bufExplorerSplitOutPathName == 0) ? "Full" : "Split")." path"
+
+  return ret
+endfunction
+
+" BECreateHelp {{{1
+function! s:BECreateHelp()
+  if g:bufExplorerDefaultHelp == 0 && g:bufExplorerDetailedHelp == 0
+    let s:firstBufferLine = 1
+    return []
+  endif
+
+  let header = []
+
+  if g:bufExplorerDetailedHelp == 1
+    call add(header, '" Buffer Explorer ('.g:bufexplorer_version.')')
+    call add(header, '" --------------------------')
+    call add(header, '" <F1> : toggle this help')
+    call add(header, '" <enter> or o or Mouse-Double-Click : open buffer under cursor')
+    call add(header, '" <shift-enter> or t : open buffer in another tab')
+    call add(header, '" d : delete buffer')
+    call add(header, '" D : wipe buffer')
+    call add(header, '" f : toggle find active buffer')
+    call add(header, '" p : toggle spliting of file and path name')
+    call add(header, '" q : quit')
+    call add(header, '" r : reverse sort')
+    call add(header, '" R : toggle showing relative or full paths')
+    call add(header, '" s : cycle thru "sort by" fields '.string(s:sort_by).'')
+    call add(header, '" S : reverse cycle thru "sort by" fields')
+    call add(header, '" T : toggle if to show only buffers for this tab or not')
+    call add(header, '" u : toggle showing unlisted buffers')
+  else
+    call add(header, '" Press <F1> for Help')
+  endif
+
+  if (!exists("b:displayMode") || b:displayMode != "winmanager") || (b:displayMode == "winmanager" && g:bufExplorerDetailedHelp == 1)
+    call add(header, s:BEGetHelpStatus())
+    call add(header, '"=')
+  endif
+
+  let s:firstBufferLine = len(header) + 1
+
+  return header
+endfunction
+
+" BEGetBufferInfo {{{1
+function! s:BEGetBufferInfo(bufnr)
+  redir => bufoutput
+  buffers!
+  redir END
+
+  if (a:bufnr > 0)
+    " Since we are only interested in this specified buffer 
+    " remove the other buffers listed
+    let bufoutput = substitute(bufoutput."\n", '^.*\n\(\s*'.a:bufnr.'\>.\{-}\)\n.*', '\1', '')
+  endif
+
+  let [all, allwidths, listedwidths] = [[], {}, {}]
+
+  for n in keys(s:types)
+    let allwidths[n] = []
+    let listedwidths[n] = []
+  endfor
+
+  for buf in split(bufoutput, '\n')
+    let bits = split(buf, '"')
+    let b = {"attributes": bits[0], "line": substitute(bits[2], '\s*', '', '')}
+
+    for [key, val] in items(s:types)
+      let b[key] = fnamemodify(bits[1], val)
+    endfor
+
+    if getftype(b.fullname) == "dir" && g:bufExplorerShowDirectories == 1
+      let b.shortname = "<DIRECTORY>"
+    endif
+
+    call add(all, b)
+
+    for n in keys(s:types)
+      call add(allwidths[n], len(b[n]))
+
+      if b.attributes !~ "u"
+        call add(listedwidths[n], len(b[n]))
+      endif
+    endfor
+  endfor
+
+  let [s:allpads, s:listedpads] = [{}, {}]
+
+  for n in keys(s:types)
+    let s:allpads[n] = repeat(' ', max(allwidths[n]))
+    let s:listedpads[n] = repeat(' ', max(listedwidths[n]))
+  endfor
+
+  let s:refreshBufferList = 1
+
+  return all
+endfunction
+
+" BEBuildBufferList {{{1
+function! s:BEBuildBufferList()
+  let lines = []
+
+  " Loop through every buffer.
+  for buf in s:raw_buffer_listing
+    if (!g:bufExplorerShowUnlisted && buf.attributes =~ "u")
+      " Skip unlisted buffers if we are not to show them.
+      continue
+    endif
+
+    if (g:bufExplorerShowTabBuffer)
+      let show_buffer = 0
+
+      for bufnr in s:tabSpace[tabpagenr()]
+        if (buf.attributes =~ '^\s*'.bufnr.'\>')
+          " Only buffers shown on the current tabpagenr
+          let show_buffer = 1
+          break
+        endif
+      endfor
+
+      if show_buffer == 0 
+        continue
+      endif
+    endif
+
+    let line = buf.attributes." "
+
+    if g:bufExplorerSplitOutPathName
+      let type = (g:bufExplorerShowRelativePath) ? "relativepath" : "path"
+      let path = buf[type]
+      let pad  = (g:bufExplorerShowUnlisted) ? s:allpads.shortname : s:listedpads.shortname
+      let line .= buf.shortname." ".strpart(pad.path, len(buf.shortname))
+    else
+      let type = (g:bufExplorerShowRelativePath) ? "relativename" : "fullname"
+      let path = buf[type]
+      let line .= path
+    endif
+
+    let pads = (g:bufExplorerShowUnlisted) ? s:allpads : s:listedpads
+
+    if !empty(pads[type])
+      let line .= strpart(pads[type], len(path))." "
+    endif
+
+    let line .= buf.line
+
+    call add(lines, line)
+  endfor
+
+  call setline(s:firstBufferLine, lines)
+
+  call s:BESortListing()
+endfunction
+
+" BESelectBuffer {{{1
+function! s:BESelectBuffer(...)
+  " Sometimes messages are not cleared when we get here so it looks like an error has
+  " occurred when it really has not.
+  echo ""
+
+  " Are we on a line with a file name?
+  if line('.') < s:firstBufferLine
+    exec "normal! \<cr>"
+    return
+  endif
+
+  let _bufNbr = str2nr(getline('.'))
+
+  " Check and see if we are running BE via WinManager.
+  if exists("b:displayMode") && b:displayMode == "winmanager"
+    let bufname = expand("#"._bufNbr.":p")
+
+    if (a:0 == 1) && (a:1 == "tab")
+      call WinManagerFileEdit(bufname, 1)
+    else
+      call WinManagerFileEdit(bufname, 0)
+    endif
+ 
+    return
+  endif
+
+  if bufexists(_bufNbr)
+    if bufnr("#") == _bufNbr
+      return s:BEClose("")
+    endif
+
+    " Are we suppose to open the selected buffer in a tab?
+    if (a:0 == 1) && (a:1 == "tab")
+      " Yes, we are to open the selected buffer in a tab.
+
+      " Restore [BufExplorer] buffer.
+      exec "keepjumps silent buffer!".s:originBuffer
+
+      " Get the tab number where this buffer is located at.
+      let tabNbr = s:BEGetTabNbr(_bufNbr)
+
+      " Was the tab found?
+      if tabNbr == 0
+        " _bufNbr is not opened in any tabs. Open a new tab with the selected buffer in it.
+        exec "999tab split +buffer" . _bufNbr
+      else
+        " The _bufNbr is already opened in tab, go to that tab.
+        exec tabNbr . "tabnext"
+
+        " Focus window.
+        exec s:BEGetWinNbr(tabNbr, _bufNbr) . "wincmd w"
+      endif
+    else
+      "No, the use did not ask to open the selected buffer in a tab.
+
+      " Are we suppose to move to the tab where this active buffer is?
+      if bufloaded(_bufNbr) && g:bufExplorerFindActive
+        " Close the BE window.
+        call s:BEClose("")
+
+        " Get the tab number where this buffer is located at.
+        let tabNbr = s:BEGetTabNbr(_bufNbr)
+
+        " Was the tab found?
+        if tabNbr != 0
+          " The buffer is located in a tab. Go to that tab number.
+          exec tabNbr . "tabnext"
+        else
+          " Nope, the buffer is not in a tab, simple switch to that buffer.
+          let bufname = expand("#"._bufNbr.":p")
+          exec bufname ? "drop ".escape(bufname, " ") : "buffer "._bufNbr
+        endif
+      endif
+
+      " Switch to the buffer.
+      exec "keepalt keepjumps silent b!" _bufNbr
+    endif
+
+    " Make the buffer 'listed' again.
+    call setbufvar(_bufNbr, "&buflisted", "1")
+  else
+    call s:BEError("Sorry, that buffer no longer exists, please select another")
+    call s:BEDeleteBuffer(_bufNbr, "wipe")
+  endif
+endfunction
+
+" BEDeleteBufferListing {{{1
+function! s:BEDeleteBufferListing(buf)
+  if exists('s:raw_buffer_listing') && !empty(s:raw_buffer_listing)
+    " Delete the buffer from the raw buffer list.
+    " Careful use of ' and " so we do not have to escape all the \'s
+    " Regex: ^\s*\(10\|20\)\>
+    "        ^ - Starting at the beginning of the string
+    "        \s* - optional whitespace
+    "        \(10\|20\) - either a 10 or a 20
+    "        \> - end of word (so it can't make 100 or 201)
+    call filter(s:raw_buffer_listing, "v:val.attributes !~ '".'^\s*\('.substitute(a:buf, ' ', '\\|', 'g').'\)\>'."'")
+  endif
+endfunction
+
+" BERemoveBuffer {{{1
+function! s:BERemoveBuffer(type, mode) range
+  " Are we on a line with a file name?
+  if line('.') < s:firstBufferLine
+    return
+  endif
+
+  " These commands are to temporarily suspend the activity of winmanager.
+  if exists("b:displayMode") && b:displayMode == "winmanager"
+    call WinManagerSuspendAUs()
+  endif
+
+  let _bufNbrs = ''
+
+  for lineNum in range(a:firstline, a:lastline)
+    let line = getline(lineNum)
+
+    if line =~ '^\s*\(\d\+\)'
+      " Regex: ^\s*\(10\|20\)\>
+      "        ^ - Starting at the beginning of the string
+      "        \s* - optional whitespace
+      "        \zs - start the match here
+      "        \d\+ - any digits
+      "        \> - end of word (so it can't make 100 or 201)
+      let bufNbr = matchstr(line, '^\s*\zs\d\+\>')
+
+      " Add 0 to bufNbr to ensure Vim treats it as a Number
+      " for use with the getbufvar() function
+      if bufNbr !~ '^\d\+$' || getbufvar(bufNbr+0, '&modified') != 0
+        call s:BEError("Sorry, no write since last change for buffer ".bufNbr.", unable to delete")
+      else
+        let _bufNbrs = _bufNbrs . (_bufNbrs==''?'':' '). bufNbr 
+      endif
+    endif
+  endfor
+
+  " Okay, everything is good, delete or wipe the buffers.
+  call s:BEDeleteBuffer(_bufNbrs, a:type)
+
+  " Reactivate winmanager autocommand activity.
+  if exists("b:displayMode") && b:displayMode == "winmanager"
+    call WinManagerForceReSize("BufExplorer")
+    call WinManagerResumeAUs()
+  endif
+endfunction
+
+" BEDeleteBuffer {{{1
+function! s:BEDeleteBuffer(bufNbr, mode)
+  " This routine assumes that the buffer to be removed is on the current line.
+  try
+    if a:mode == "wipe"
+      exe "bwipe" a:bufNbr
+    else
+      exe "bdelete" a:bufNbr
+    endif
+
+    setlocal modifiable
+
+    " Remove each of the lines beginning with the buffer numbers we are removing
+    " Regex: ^\s*\(10\|20\)\>
+    "        ^ - Starting at the beginning of the string
+    "        \s* - optional whitespace
+    "        \(10\|20\) - either a 10 or a 20
+    "        \> - end of word (so it can't make 100 or 201)
+    exec 'silent! g/^\s*\('.substitute(a:bufNbr, ' ', '\\|', 'g').'\)\>/d_'
+
+    setlocal nomodifiable
+
+    call s:BEDeleteBufferListing(a:bufNbr)
+  catch
+    call s:BEError(v:exception)
+  endtry
+endfunction
+
+" BEClose {{{1
+function! s:BEClose(mode)
+  " Get only the listed buffers.
+  let listed = filter(copy(s:MRUList), "buflisted(v:val)")
+
+  " If we needed to split the main window, close the split one.
+"  if (s:splitMode)
+  if (s:splitMode != "" && a:mode == "quit")
+    exec "wincmd c"
+  endif
+
+  if len(listed) == 0
+    exe "enew"
+  else
+    for b in reverse(listed[0:1])
+      exec "keepjumps silent b ".b
+    endfor
+  endif
+endfunction
+
+" BEToggleSplitOutPathName {{{1
+function! s:BEToggleSplitOutPathName()
+  let g:bufExplorerSplitOutPathName = !g:bufExplorerSplitOutPathName
+  call s:BERebuildBufferList()
+  call s:BEUpdateHelpStatus()
+endfunction
+
+" BEToggleShowRelativePath {{{1
+function! s:BEToggleShowRelativePath()
+  let g:bufExplorerShowRelativePath = !g:bufExplorerShowRelativePath
+  call s:BERebuildBufferList()
+  call s:BEUpdateHelpStatus()
+endfunction
+
+" BEToggleShowUnlisted {{{1
+function! s:BEToggleShowUnlisted()
+  let g:bufExplorerShowUnlisted = !g:bufExplorerShowUnlisted
+  let num_bufs = s:BERebuildBufferList(g:bufExplorerShowUnlisted == 0)
+  call s:BEUpdateHelpStatus()
+endfunction
+
+" BEToggleFindActive {{{1
+function! s:BEToggleFindActive()
+  let g:bufExplorerFindActive = !g:bufExplorerFindActive
+  call s:BEUpdateHelpStatus()
+endfunction
+
+" BEToggleShowTabBuffer {{{1
+function! s:BEToggleShowTabBuffer()
+  let g:bufExplorerShowTabBuffer = !g:bufExplorerShowTabBuffer
+  call s:BEDisplayBufferList()
+endfunction
+
+" BEToggleOnlyOneTab {{{1
+function! s:BEToggleOnlyOneTab()
+  let g:bufExplorerOnlyOneTab = !g:bufExplorerOnlyOneTab
+  call s:BEDisplayBufferList()
+endfunction
+
+" BERebuildBufferList {{{1
+function! s:BERebuildBufferList(...)
+  setlocal modifiable
+
+  let curPos = getpos('.')
+
+  if a:0
+    " Clear the list first.
+    exec "keepjumps ".s:firstBufferLine.',$d "_'
+  endif
+
+  let num_bufs = s:BEBuildBufferList()
+
+  call setpos('.', curPos)
+
+  setlocal nomodifiable
+
+  return num_bufs
+endfunction
+
+" BEUpdateHelpStatus {{{1
+function! s:BEUpdateHelpStatus()
+  setlocal modifiable
+
+  let text = s:BEGetHelpStatus()
+  call setline(s:firstBufferLine - 2, text)
+
+  setlocal nomodifiable
+endfunction
+
+" BEMRUCmp {{{1
+function! s:BEMRUCmp(line1, line2)
+  return index(s:MRUList, str2nr(a:line1)) - index(s:MRUList, str2nr(a:line2))
+endfunction
+
+" BESortReverse {{{1
+function! s:BESortReverse()
+  let g:bufExplorerReverseSort = !g:bufExplorerReverseSort
+
+  call s:BEReSortListing()
+endfunction
+
+" BESortSelect {{{1
+function! s:BESortSelect()
+  let g:bufExplorerSortBy = get(s:sort_by, index(s:sort_by, g:bufExplorerSortBy) + 1, s:sort_by[0])
+
+  call s:BEReSortListing()
+endfunction
+
+" BEReverseSortSelect {{{1
+function! s:BEReverseSortSelect()
+  let g:bufExplorerSortBy = get(s:sort_by, (index(s:sort_by, g:bufExplorerSortBy) + len(s:sort_by) - 1) % len(s:sort_by), s:sort_by[0])
+
+  call s:BEReSortListing()
+endfunction
+
+" BEReSortListing {{{1
+function! s:BEReSortListing()
+  setlocal modifiable
+
+  let curPos = getpos('.')
+
+  call s:BESortListing()
+  call s:BEUpdateHelpStatus()
+
+  call setpos('.', curPos)
+
+  setlocal nomodifiable
+endfunction
+
+" BESortListing {{{1
+function! s:BESortListing()
+  let sort = s:firstBufferLine.",$sort".((g:bufExplorerReverseSort == 1) ? "!": "")
+
+  if g:bufExplorerSortBy == "number"
+    " Easiest case.
+    exec sort 'n'
+  elseif g:bufExplorerSortBy == "name"
+    if g:bufExplorerSplitOutPathName
+      exec sort 'ir /\d.\{7}\zs\f\+\ze/'
+    else
+      exec sort 'ir /\zs[^\/\\]\+\ze\s*line/'
+    endif
+  elseif g:bufExplorerSortBy == "fullpath"
+    if g:bufExplorerSplitOutPathName
+      " Sort twice - first on the file name then on the path.
+      exec sort 'ir /\d.\{7}\zs\f\+\ze/'
+    endif
+
+    exec sort 'ir /\zs\f\+\ze\s\+line/'
+  elseif g:bufExplorerSortBy == "extension"
+    exec sort 'ir /\.\zs\w\+\ze\s/'
+  elseif g:bufExplorerSortBy == "mru"
+    let l = getline(s:firstBufferLine, "$")
+
+    call sort(l, "<SID>BEMRUCmp")
+
+    if g:bufExplorerReverseSort
+      call reverse(l)
+    endif
+
+    call setline(s:firstBufferLine, l)
+  endif
+endfunction
+
+" BEMRUListShow {{{1
+function! s:BEMRUListShow()
+  echomsg "MRUList=".string(s:MRUList)
+endfunction
+
+" BEError {{{1
+function! s:BEError(msg)
+  echohl ErrorMsg | echo a:msg | echohl none
+endfunction
+
+" BEWarning {{{1
+function! s:BEWarning(msg)
+  echohl WarningMsg | echo a:msg | echohl none
+endfunction
+
+" GetTabNbr {{{1
+function! s:BEGetTabNbr(bufNbr)
+  " Searching buffer bufno, in tabs.
+  for i in range(tabpagenr("$"))
+    if index(tabpagebuflist(i + 1), a:bufNbr) != -1
+      return i + 1
+    endif
+  endfor
+
+  return 0
+endfunction
+
+" GetWinNbr" {{{1
+function! s:BEGetWinNbr(tabNbr, bufNbr)
+  " window number in tabpage.
+  return index(tabpagebuflist(a:tabNbr), a:bufNbr) + 1
+endfunction
+
+" Winmanager Integration {{{1
+let g:BufExplorer_title = "\[Buf\ List\]"
+call s:BESet("g:bufExplorerResize", 1)
+call s:BESet("g:bufExplorerMaxHeight", 25) " Handles dynamic resizing of the window.
+
+" Function to start display. Set the mode to 'winmanager' for this buffer.
+" This is to figure out how this plugin was called. In a standalone fashion
+" or by winmanager.
+function! BufExplorer_Start()
+  let b:displayMode = "winmanager"
+  call StartBufExplorer("e")
+endfunction
+
+" Returns whether the display is okay or not.
+function! BufExplorer_IsValid()
+  return 0
+endfunction
+
+" Handles dynamic refreshing of the window.
+function! BufExplorer_Refresh()
+  let b:displayMode = "winmanager"
+  call StartBufExplorer("e")
+endfunction
+
+function! BufExplorer_ReSize()
+  if !g:bufExplorerResize
+    return
+  endif
+
+  let nlines = min([line("$"), g:bufExplorerMaxHeight])
+
+  exe nlines." wincmd _"
+
+  " The following lines restore the layout so that the last file line is also
+  " the last window line. Sometimes, when a line is deleted, although the
+  " window size is exactly equal to the number of lines in the file, some of
+  " the lines are pushed up and we see some lagging '~'s.
+  let pres = getpos(".")
+
+  exe $
+
+  let _scr = &scrolloff
+  let &scrolloff = 0
+
+  normal! z-
+
+  let &scrolloff = _scr
+
+  call setpos(".", pres)
+endfunction
+
+" Default values {{{1
+call s:BESet("g:bufExplorerDefaultHelp", 1)           " Show default help?
+call s:BESet("g:bufExplorerDetailedHelp", 0)          " Show detailed help?
+call s:BESet("g:bufExplorerFindActive", 1)            " When selecting an active buffer, take you to the window where it is active?
+call s:BESet("g:bufExplorerReverseSort", 0)           " sort reverse?
+call s:BESet("g:bufExplorerShowDirectories", 1)       " (Dir's are added by commands like ':e .')
+call s:BESet("g:bufExplorerShowRelativePath", 0)      " Show listings with relative or absolute paths?
+call s:BESet("g:bufExplorerShowUnlisted", 0)          " Show unlisted buffers?
+call s:BESet("g:bufExplorerSortBy", "mru")            " Sorting methods are in s:sort_by:
+call s:BESet("g:bufExplorerSplitOutPathName", 1)      " Split out path and file name?
+call s:BESet("g:bufExplorerSplitRight", &splitright)  " Should vertical splits be on the right or left of current window?
+call s:BESet("g:bufExplorerSplitBelow", &splitbelow)  " Should horizontal splits be below or above current window?
+call s:BESet("g:bufExplorerShowTabBuffer", 0)         " Show only buffer(s) for this tab?
+call s:BESet("g:bufExplorerOnlyOneTab", 1)            " If ShowTabBuffer = 1, only store the most recent tab for this buffer.
+
+" Global variables {{{1
+call s:BEReset()
+let s:running = 0
+let s:sort_by = ["number", "name", "fullpath", "mru", "extension"]
+let s:types = {"fullname": ':p', "path": ':p:h', "relativename": ':~:.', "relativepath": ':~:.:h', "shortname": ':t'}
+let s:originBuffer = 0
+let s:splitMode = ""
+let s:name = '[BufExplorer]'
+let s:refreshBufferList = 1
+let s:MRU_Exclude_List = ["[BufExplorer]","__MRU_Files__"]
+"1}}}
+
+" vim:ft=vim foldmethod=marker sw=2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/.vim/plugin/cecutil.vim	Tue May 03 08:57:01 2011 +0200
@@ -0,0 +1,467 @@
+" cecutil.vim : save/restore window position
+"               save/restore mark position
+"               save/restore selected user maps
+"  Author:	Charles E. Campbell, Jr.
+"  Version:	16
+"  Date:	Feb 12, 2007
+"
+"  Saving Restoring Destroying Marks: {{{1
+"       call SaveMark(markname)       let savemark= SaveMark(markname)
+"       call RestoreMark(markname)    call RestoreMark(savemark)
+"       call DestroyMark(markname)
+"       commands: SM RM DM
+"
+"  Saving Restoring Destroying Window Position: {{{1
+"       call SaveWinPosn()        let winposn= SaveWinPosn()
+"       call RestoreWinPosn()     call RestoreWinPosn(winposn)
+"		\swp : save current window/buffer's position
+"		\rwp : restore current window/buffer's previous position
+"       commands: SWP RWP
+"
+"  Saving And Restoring User Maps: {{{1
+"       call SaveUserMaps(mapmode,maplead,mapchx,suffix)
+"       call RestoreUserMaps(suffix)
+"
+" GetLatestVimScripts: 1066 1 :AutoInstall: cecutil.vim
+"
+" You believe that God is one. You do well. The demons also {{{1
+" believe, and shudder. But do you want to know, vain man, that
+" faith apart from works is dead?  (James 2:19,20 WEB)
+
+" Load Once: {{{1
+if &cp || exists("g:loaded_cecutil")
+ finish
+endif
+let g:loaded_cecutil = "v16"
+let s:keepcpo        = &cpo
+set cpo&vim
+"DechoVarOn
+
+" -----------------------
+"  Public Interface: {{{1
+" -----------------------
+
+"  Map Interface: {{{2
+if !hasmapto('<Plug>SaveWinPosn')
+ map <unique> <Leader>swp <Plug>SaveWinPosn
+endif
+if !hasmapto('<Plug>RestoreWinPosn')
+ map <unique> <Leader>rwp <Plug>RestoreWinPosn
+endif
+nmap <silent> <Plug>SaveWinPosn		:call SaveWinPosn()<CR>
+nmap <silent> <Plug>RestoreWinPosn	:call RestoreWinPosn()<CR>
+
+" Command Interface: {{{2
+com! -bar -nargs=0 SWP	call SaveWinPosn()
+com! -bar -nargs=0 RWP	call RestoreWinPosn()
+com! -bar -nargs=1 SM	call SaveMark(<q-args>)
+com! -bar -nargs=1 RM	call RestoreMark(<q-args>)
+com! -bar -nargs=1 DM	call DestroyMark(<q-args>)
+
+if v:version < 630
+ let s:modifier= "sil "
+else
+ let s:modifier= "sil keepj "
+endif
+
+" ---------------------------------------------------------------------
+" SaveWinPosn: {{{1
+"    let winposn= SaveWinPosn()  will save window position in winposn variable
+"    call SaveWinPosn()          will save window position in b:cecutil_winposn{b:cecutil_iwinposn}
+"    let winposn= SaveWinPosn(0) will *only* save window position in winposn variable (no stacking done)
+fun! SaveWinPosn(...)
+"  call Dfunc("SaveWinPosn() a:0=".a:0)
+  if line(".") == 1 && getline(1) == ""
+"   call Dfunc("SaveWinPosn : empty buffer")
+   return ""
+  endif
+  let so_keep   = &so
+  let siso_keep = &siso
+  let ss_keep   = &ss
+  set so=0 siso=0 ss=0
+
+  let swline    = line(".")
+  let swcol     = col(".")
+  let swwline   = winline() - 1
+  let swwcol    = virtcol(".") - wincol()
+  let savedposn = "call GoWinbufnr(".winbufnr(0).")|silent ".swline
+  let savedposn = savedposn."|".s:modifier."norm! 0z\<cr>"
+  if swwline > 0
+   let savedposn= savedposn.":".s:modifier."norm! ".swwline."\<c-y>\<cr>"
+  endif
+  if swwcol > 0
+   let savedposn= savedposn.":".s:modifier."norm! 0".swwcol."zl\<cr>"
+  endif
+  let savedposn = savedposn.":".s:modifier."call cursor(".swline.",".swcol.")\<cr>"
+
+  " save window position in
+  " b:cecutil_winposn_{iwinposn} (stack)
+  " only when SaveWinPosn() is used
+  if a:0 == 0
+   if !exists("b:cecutil_iwinposn")
+   	let b:cecutil_iwinposn= 1
+   else
+   	let b:cecutil_iwinposn= b:cecutil_iwinposn + 1
+   endif
+"   call Decho("saving posn to SWP stack")
+   let b:cecutil_winposn{b:cecutil_iwinposn}= savedposn
+  endif
+
+  let &so   = so_keep
+  let &siso = siso_keep
+  let &ss   = ss_keep
+
+"  if exists("b:cecutil_iwinposn")	 " Decho
+"   call Decho("b:cecutil_winpos{".b:cecutil_iwinposn."}[".b:cecutil_winposn{b:cecutil_iwinposn}."]")
+"  else                      " Decho
+"   call Decho("b:cecutil_iwinposn doesn't exist")
+"  endif                     " Decho
+"  call Dret("SaveWinPosn [".savedposn."]")
+  return savedposn
+endfun
+
+" ---------------------------------------------------------------------
+" RestoreWinPosn: {{{1
+fun! RestoreWinPosn(...)
+"  call Dfunc("RestoreWinPosn() a:0=".a:0)
+"  call Decho("getline(1)<".getline(1).">")
+"  call Decho("line(.)=".line("."))
+  if line(".") == 1 && getline(1) == ""
+"   call Dfunc("RestoreWinPosn : empty buffer")
+   return ""
+  endif
+  let so_keep   = &so
+  let siso_keep = &siso
+  let ss_keep   = &ss
+  set so=0 siso=0 ss=0
+
+  if a:0 == 0 || a:1 == ""
+   " use saved window position in b:cecutil_winposn{b:cecutil_iwinposn} if it exists
+   if exists("b:cecutil_iwinposn") && exists("b:cecutil_winposn{b:cecutil_iwinposn}")
+"   	call Decho("using stack b:cecutil_winposn{".b:cecutil_iwinposn."}<".b:cecutil_winposn{b:cecutil_iwinposn}.">")
+	try
+     exe "silent! ".b:cecutil_winposn{b:cecutil_iwinposn}
+	catch /^Vim\%((\a\+)\)\=:E749/
+	 " ignore empty buffer error messages
+	endtry
+    " normally drop top-of-stack by one
+    " but while new top-of-stack doesn't exist
+    " drop top-of-stack index by one again
+	if b:cecutil_iwinposn >= 1
+	 unlet b:cecutil_winposn{b:cecutil_iwinposn}
+	 let b:cecutil_iwinposn= b:cecutil_iwinposn - 1
+	 while b:cecutil_iwinposn >= 1 && !exists("b:cecutil_winposn{b:cecutil_iwinposn}")
+	  let b:cecutil_iwinposn= b:cecutil_iwinposn - 1
+	 endwhile
+	 if b:cecutil_iwinposn < 1
+	  unlet b:cecutil_iwinposn
+	 endif
+	endif
+   else
+   	echohl WarningMsg
+	echomsg "***warning*** need to SaveWinPosn first!"
+	echohl None
+   endif
+
+  else	 " handle input argument
+"   call Decho("using input a:1<".a:1.">")
+   " use window position passed to this function
+   exe "silent ".a:1
+   " remove a:1 pattern from b:cecutil_winposn{b:cecutil_iwinposn} stack
+   if exists("b:cecutil_iwinposn")
+    let jwinposn= b:cecutil_iwinposn
+    while jwinposn >= 1                     " search for a:1 in iwinposn..1
+        if exists("b:cecutil_winposn{jwinposn}")    " if it exists
+         if a:1 == b:cecutil_winposn{jwinposn}      " and the pattern matches
+       unlet b:cecutil_winposn{jwinposn}            " unlet it
+       if jwinposn == b:cecutil_iwinposn            " if at top-of-stack
+        let b:cecutil_iwinposn= b:cecutil_iwinposn - 1      " drop stacktop by one
+       endif
+      endif
+     endif
+     let jwinposn= jwinposn - 1
+    endwhile
+   endif
+  endif
+
+  " seems to be something odd: vertical motions after RWP
+  " cause jump to first column.  Following fixes that
+  if wincol() > 1
+   silent norm! hl
+  elseif virtcol(".") < virtcol("$")
+   silent norm! lh
+  endif
+
+  let &so   = so_keep
+  let &siso = siso_keep
+  let &ss   = ss_keep
+
+"  call Dret("RestoreWinPosn")
+endfun
+
+" ---------------------------------------------------------------------
+" GoWinbufnr: go to window holding given buffer (by number) {{{1
+"   Prefers current window; if its buffer number doesn't match,
+"   then will try from topleft to bottom right
+fun! GoWinbufnr(bufnum)
+"  call Dfunc("GoWinbufnr(".a:bufnum.")")
+  if winbufnr(0) == a:bufnum
+"   call Dret("GoWinbufnr : winbufnr(0)==a:bufnum")
+   return
+  endif
+  winc t
+  let first=1
+  while winbufnr(0) != a:bufnum && (first || winnr() != 1)
+  	winc w
+	let first= 0
+   endwhile
+"  call Dret("GoWinbufnr")
+endfun
+
+" ---------------------------------------------------------------------
+" SaveMark: sets up a string saving a mark position. {{{1
+"           For example, SaveMark("a")
+"           Also sets up a global variable, g:savemark_{markname}
+fun! SaveMark(markname)
+"  call Dfunc("SaveMark(markname<".a:markname.">)")
+  let markname= a:markname
+  if strpart(markname,0,1) !~ '\a'
+   let markname= strpart(markname,1,1)
+  endif
+"  call Decho("markname=".markname)
+
+  let lzkeep  = &lz
+  set lz
+
+  if 1 <= line("'".markname) && line("'".markname) <= line("$")
+   let winposn               = SaveWinPosn(0)
+   exe s:modifier."norm! `".markname
+   let savemark              = SaveWinPosn(0)
+   let g:savemark_{markname} = savemark
+   let savemark              = markname.savemark
+   call RestoreWinPosn(winposn)
+  else
+   let g:savemark_{markname} = ""
+   let savemark              = ""
+  endif
+
+  let &lz= lzkeep
+
+"  call Dret("SaveMark : savemark<".savemark.">")
+  return savemark
+endfun
+
+" ---------------------------------------------------------------------
+" RestoreMark: {{{1
+"   call RestoreMark("a")  -or- call RestoreMark(savemark)
+fun! RestoreMark(markname)
+"  call Dfunc("RestoreMark(markname<".a:markname.">)")
+
+  if strlen(a:markname) <= 0
+"   call Dret("RestoreMark : no such mark")
+   return
+  endif
+  let markname= strpart(a:markname,0,1)
+  if markname !~ '\a'
+   " handles 'a -> a styles
+   let markname= strpart(a:markname,1,1)
+  endif
+"  call Decho("markname=".markname." strlen(a:markname)=".strlen(a:markname))
+
+  let lzkeep  = &lz
+  set lz
+  let winposn = SaveWinPosn(0)
+
+  if strlen(a:markname) <= 2
+   if exists("g:savemark_{markname}") && strlen(g:savemark_{markname}) != 0
+	" use global variable g:savemark_{markname}
+"	call Decho("use savemark list")
+	call RestoreWinPosn(g:savemark_{markname})
+	exe "norm! m".markname
+   endif
+  else
+   " markname is a savemark command (string)
+"	call Decho("use savemark command")
+   let markcmd= strpart(a:markname,1)
+   call RestoreWinPosn(markcmd)
+   exe "norm! m".markname
+  endif
+
+  call RestoreWinPosn(winposn)
+  let &lz       = lzkeep
+
+"  call Dret("RestoreMark")
+endfun
+
+" ---------------------------------------------------------------------
+" DestroyMark: {{{1
+"   call DestroyMark("a")  -- destroys mark
+fun! DestroyMark(markname)
+"  call Dfunc("DestroyMark(markname<".a:markname.">)")
+
+  " save options and set to standard values
+  let reportkeep= &report
+  let lzkeep    = &lz
+  set lz report=10000
+
+  let markname= strpart(a:markname,0,1)
+  if markname !~ '\a'
+   " handles 'a -> a styles
+   let markname= strpart(a:markname,1,1)
+  endif
+"  call Decho("markname=".markname)
+
+  let curmod  = &mod
+  let winposn = SaveWinPosn(0)
+  1
+  let lineone = getline(".")
+  exe "k".markname
+  d
+  put! =lineone
+  let &mod    = curmod
+  call RestoreWinPosn(winposn)
+
+  " restore options to user settings
+  let &report = reportkeep
+  let &lz     = lzkeep
+
+"  call Dret("DestroyMark")
+endfun
+
+" ---------------------------------------------------------------------
+" ListWinPosn:
+"fun! ListWinPosn()                                                        " Decho 
+"  if !exists("b:cecutil_iwinposn") || b:cecutil_iwinposn == 0             " Decho 
+"   call Decho("nothing on SWP stack")                                     " Decho
+"  else                                                                    " Decho
+"   let jwinposn= b:cecutil_iwinposn                                       " Decho 
+"   while jwinposn >= 1                                                    " Decho 
+"    if exists("b:cecutil_winposn{jwinposn}")                              " Decho 
+"     call Decho("winposn{".jwinposn."}<".b:cecutil_winposn{jwinposn}.">") " Decho 
+"    else                                                                  " Decho 
+"     call Decho("winposn{".jwinposn."} -- doesn't exist")                 " Decho 
+"    endif                                                                 " Decho 
+"    let jwinposn= jwinposn - 1                                            " Decho 
+"   endwhile                                                               " Decho 
+"  endif                                                                   " Decho
+"endfun                                                                    " Decho 
+"com! -nargs=0 LWP	call ListWinPosn()                                    " Decho 
+
+" ---------------------------------------------------------------------
+" SaveUserMaps: this function sets up a script-variable (s:restoremap) {{{1
+"          which can be used to restore user maps later with
+"          call RestoreUserMaps()
+"
+"          mapmode - see :help maparg for its list
+"                    ex. "n" = Normal
+"                    If the first letter is u, then unmapping will be done
+"                    ex. "un" = Normal + unmapping
+"          maplead - see mapchx
+"          mapchx  - "<something>" handled as a single map item.
+"                    ex. "<left>"
+"                  - "string" a string of single letters which are actually
+"                    multiple two-letter maps (using the maplead:
+"                    maplead . each_character_in_string)
+"                    ex. maplead="\" and mapchx="abc" saves user mappings for
+"                        \a, \b, and \c
+"                    Of course, if maplead is "", then for mapchx="abc",
+"                    mappings for a, b, and c are saved.
+"                  - :something  handled as a single map item, w/o the ":"
+"                    ex.  mapchx= ":abc" will save a mapping for "abc"
+"          suffix  - a string unique to your plugin
+"                    ex.  suffix= "DrawIt"
+fun! SaveUserMaps(mapmode,maplead,mapchx,suffix)
+"  call Dfunc("SaveUserMaps(mapmode<".a:mapmode."> maplead<".a:maplead."> mapchx<".a:mapchx."> suffix<".a:suffix.">)")
+
+  if !exists("s:restoremap_{a:suffix}")
+   " initialize restoremap_suffix to null string
+   let s:restoremap_{a:suffix}= ""
+  endif
+
+  " set up dounmap: if 1, then save and unmap  (a:mapmode leads with a "u")
+  "                 if 0, save only
+  if a:mapmode =~ '^u'
+   let dounmap= 1
+   let mapmode= strpart(a:mapmode,1)
+  else
+   let dounmap= 0
+   let mapmode= a:mapmode
+  endif
+ 
+  " save single map :...something...
+  if strpart(a:mapchx,0,1) == ':'
+   let amap= strpart(a:mapchx,1)
+   if amap == "|" || amap == "\<c-v>"
+    let amap= "\<c-v>".amap
+   endif
+   let amap                    = a:maplead.amap
+   let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|:silent! ".mapmode."unmap ".amap
+   if maparg(amap,mapmode) != ""
+    let maprhs                  = substitute(maparg(amap,mapmode),'|','<bar>','ge')
+   	let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|:".mapmode."map ".amap." ".maprhs
+   endif
+   if dounmap
+    exe "silent! ".mapmode."unmap ".amap
+   endif
+ 
+  " save single map <something>
+  elseif strpart(a:mapchx,0,1) == '<'
+   let amap       = a:mapchx
+   if amap == "|" || amap == "\<c-v>"
+    let amap= "\<c-v>".amap
+   endif
+   let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|silent! ".mapmode."unmap ".amap
+   if maparg(a:mapchx,mapmode) != ""
+    let maprhs                  = substitute(maparg(amap,mapmode),'|','<bar>','ge')
+   	let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|".mapmode."map ".amap." ".maprhs
+   endif
+   if dounmap
+    exe "silent! ".mapmode."unmap ".amap
+   endif
+ 
+  " save multiple maps
+  else
+   let i= 1
+   while i <= strlen(a:mapchx)
+    let amap= a:maplead.strpart(a:mapchx,i-1,1)
+	if amap == "|" || amap == "\<c-v>"
+	 let amap= "\<c-v>".amap
+	endif
+    let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|silent! ".mapmode."unmap ".amap
+    if maparg(amap,mapmode) != ""
+     let maprhs                  = substitute(maparg(amap,mapmode),'|','<bar>','ge')
+   	 let s:restoremap_{a:suffix} = s:restoremap_{a:suffix}."|".mapmode."map ".amap." ".maprhs
+    endif
+	if dounmap
+     exe "silent! ".mapmode."unmap ".amap
+	endif
+    let i= i + 1
+   endwhile
+  endif
+"  call Dret("SaveUserMaps : restoremap_".a:suffix.": ".s:restoremap_{a:suffix})
+endfun
+
+" ---------------------------------------------------------------------
+" RestoreUserMaps: {{{1
+"   Used to restore user maps saved by SaveUserMaps()
+fun! RestoreUserMaps(suffix)
+"  call Dfunc("RestoreUserMaps(suffix<".a:suffix.">)")
+  if exists("s:restoremap_{a:suffix}")
+   let s:restoremap_{a:suffix}= substitute(s:restoremap_{a:suffix},'|\s*$','','e')
+   if s:restoremap_{a:suffix} != ""
+"   	call Decho("exe ".s:restoremap_{a:suffix})
+    exe "silent! ".s:restoremap_{a:suffix}
+   endif
+   unlet s:restoremap_{a:suffix}
+  endif
+"  call Dret("RestoreUserMaps")
+endfun
+
+" ---------------------------------------------------------------------
+"  Restore: {{{1
+let &cpo= s:keepcpo
+unlet s:keepcpo
+
+" ---------------------------------------------------------------------
+"  Modelines: {{{1
+" vim: ts=4 fdm=marker
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/.vim/plugin/project.vim	Tue May 03 08:57:01 2011 +0200
@@ -0,0 +1,1293 @@
+"=============================================================================
+" File:        project.vim
+" Author:      Aric Blumer (Aric.Blumer at aricvim@charter.net)
+" Last Change: Fri 13 Oct 2006 09:47:08 AM EDT
+" Version:     1.4.1
+"=============================================================================
+" See documentation in accompanying help file
+" You may use this code in whatever way you see fit.
+
+if exists('loaded_project') || &cp
+  finish
+endif
+let loaded_project=1
+
+function! s:Project(filename) " <<<
+    " Initialization <<<
+    if exists("g:proj_running")
+        if strlen(a:filename) != 0
+            call confirm('Project already loaded; ignoring filename "'.a:filename."\".\n".'See ":help project-invoking" for information about changing project files.', "&OK", 1)
+        endif
+        let filename=bufname(g:proj_running)
+    else
+        if strlen(a:filename) == 0
+            let filename ='~/.vimprojects'      " Default project filename
+        else
+            let filename = a:filename
+        endif
+    endif
+    if !exists('g:proj_window_width')
+        let g:proj_window_width=24              " Default project window width
+    endif
+    if !exists('g:proj_window_increment')
+        let g:proj_window_increment=100         " Project Window width increment
+    endif
+    if !exists('g:proj_flags')
+        if has("win32") || has("mac")
+            let g:proj_flags='imst'             " Project default flags for windows/mac
+        else
+            let g:proj_flags='imstb'            " Project default flags for everything else
+        endif
+    endif
+    if !exists("g:proj_running") || (bufwinnr(g:proj_running) == -1) " Open the Project Window
+        exec 'silent vertical new '.filename
+        if match(g:proj_flags, '\CF') == -1      " We're floating
+            silent! wincmd H
+            exec 'vertical resize '.g:proj_window_width
+        endif
+        setlocal nomodeline
+    else
+        silent! 99wincmd h
+        if bufwinnr(g:proj_running) == -1
+            vertical split
+            let v:errmsg="nothing"
+            silent! bnext
+            if 'nothing' != v:errmsg
+                enew
+            endif
+        endif
+        return
+    endif
+    " Process the flags
+    let b:proj_cd_cmd='cd'
+    if match(g:proj_flags, '\Cl') != -1
+        let b:proj_cd_cmd = 'lcd'
+    endif
+
+    let b:proj_locate_command='silent! wincmd H'
+    let b:proj_resize_command='exec ''vertical resize ''.g:proj_window_width'
+    if match(g:proj_flags, '\CF') != -1         " Set the resize commands to nothing
+        let b:proj_locate_command=''
+        let b:proj_resize_command=''
+    endif
+
+    let g:proj_last_buffer = -1
+    ">>>
+    " ProjFoldText() <<<
+    "   The foldtext function for displaying just the description.
+    function! ProjFoldText()
+        let line=substitute(getline(v:foldstart),'^[ \t#]*\([^=]*\).*', '\1', '')
+        let line=strpart('                                     ', 0, (v:foldlevel - 1)).substitute(line,'\s*{\+\s*', '', '')
+        return line
+    endfunction ">>>
+    " s:DoSetup() <<<
+    "   Ensure everything is set up
+    function! s:DoSetup()
+        setlocal foldenable foldmethod=marker foldmarker={,} commentstring=%s foldcolumn=0 nonumber noswapfile shiftwidth=1
+        setlocal foldtext=ProjFoldText() nobuflisted nowrap
+        setlocal winwidth=1
+        if match(g:proj_flags, '\Cn') != -1
+            setlocal number
+        endif
+    endfunction ">>>
+    call s:DoSetup()
+    " Syntax Stuff <<<
+    if match(g:proj_flags, '\Cs')!=-1 && has('syntax') && exists('g:syntax_on') && !has('syntax_items')
+        syntax match projectDescriptionDir '^\s*.\{-}=\s*\(\\ \|\f\|:\|"\)\+' contains=projectDescription,projectWhiteError
+        syntax match projectDescription    '\<.\{-}='he=e-1,me=e-1         contained nextgroup=projectDirectory contains=projectWhiteError
+        syntax match projectDescription    '{\|}'
+        syntax match projectDirectory      '=\(\\ \|\f\|:\)\+'             contained
+        syntax match projectDirectory      '=".\{-}"'                      contained
+        syntax match projectScriptinout    '\<in\s*=\s*\(\\ \|\f\|:\|"\)\+' contains=projectDescription,projectWhiteError
+        syntax match projectScriptinout    '\<out\s*=\s*\(\\ \|\f\|:\|"\)\+' contains=projectDescription,projectWhiteError
+        syntax match projectComment        '#.*'
+        syntax match projectCD             '\<CD\s*=\s*\(\\ \|\f\|:\|"\)\+' contains=projectDescription,projectWhiteError
+        syntax match projectFilterEntry    '\<filter\s*=.*"'               contains=projectWhiteError,projectFilterError,projectFilter,projectFilterRegexp
+        syntax match projectFilter         '\<filter='he=e-1,me=e-1        contained nextgroup=projectFilterRegexp,projectFilterError,projectWhiteError
+        syntax match projectFlagsEntry     '\<flags\s*=\( \|[^ ]*\)'       contains=projectFlags,projectWhiteError
+        syntax match projectFlags          '\<flags'                       contained nextgroup=projectFlagsValues,projectWhiteError
+        syntax match projectFlagsValues    '=[^ ]* 'hs=s+1,me=e-1          contained contains=projectFlagsError
+        syntax match projectFlagsError     '[^rtTsSwl= ]\+'                contained
+        syntax match projectWhiteError     '=\s\+'hs=s+1                   contained
+        syntax match projectWhiteError     '\s\+='he=e-1                   contained
+        syntax match projectFilterError    '=[^"]'hs=s+1                   contained
+        syntax match projectFilterRegexp   '=".*"'hs=s+1                   contained
+        syntax match projectFoldText       '^[^=]\+{'
+
+        highlight def link projectDescription  Identifier
+        highlight def link projectScriptinout  Identifier
+        highlight def link projectFoldText     Identifier
+        highlight def link projectComment      Comment
+        highlight def link projectFilter       Identifier
+        highlight def link projectFlags        Identifier
+        highlight def link projectDirectory    Constant
+        highlight def link projectFilterRegexp String
+        highlight def link projectFlagsValues  String
+        highlight def link projectWhiteError   Error
+        highlight def link projectFlagsError   Error
+        highlight def link projectFilterError  Error
+    endif ">>>
+    " s:SortR(start, end) <<<
+    " Sort lines.  SortR() is called recursively.
+    "  from ":help eval-examples" by Robert Webb, slightly modified
+    function! s:SortR(start, end)
+        if (a:start >= a:end)
+            return
+        endif
+        let partition = a:start - 1
+        let middle = partition
+        let partStr = getline((a:start + a:end) / 2)
+        let i = a:start
+        while (i <= a:end)
+            let str = getline(i)
+            if str < partStr
+                let result = -1
+            elseif str > partStr
+                let result = 1
+            else
+                let result = 0
+            endif
+            if (result <= 0)
+                let partition = partition + 1
+                if (result == 0)
+                    let middle = partition
+                endif
+                if (i != partition)
+                    let str2 = getline(partition)
+                    call setline(i, str2)
+                    call setline(partition, str)
+                endif
+            endif
+            let i = i + 1
+        endwhile
+        if (middle != partition)
+            let str = getline(middle)
+            let str2 = getline(partition)
+            call setline(middle, str2)
+            call setline(partition, str)
+        endif
+        call s:SortR(a:start, partition - 1)
+        call s:SortR(partition + 1, a:end)
+    endfunc ">>>
+    " s:IsAbsolutePath(path) <<<
+    "   Returns true if filename has an absolute path.
+    function! s:IsAbsolutePath(path)
+        if a:path =~ '^ftp:' || a:path =~ '^rcp:' || a:path =~ '^scp:' || a:path =~ '^http:'
+            return 2
+        endif
+        if a:path =~ '\$'
+            let path=expand(a:path) " Expand any environment variables that might be in the path
+        else
+            let path=a:path
+        endif
+        if path[0] == '/' || path[0] == '~' || path[0] == '\\' || path[1] == ':'
+            return 1
+        endif
+        return 0
+    endfunction " >>>
+    " s:DoSetupAndSplit() <<<
+    "   Call DoSetup to ensure the settings are correct.  Split to the next
+    "   file.
+    function! s:DoSetupAndSplit()
+        call s:DoSetup()                " Ensure that all the settings are right
+        let n = winnr()                 " Determine if there is a CTRL_W-p window
+        silent! wincmd p
+        if n == winnr()
+            silent! wincmd l
+        endif
+        if n == winnr()
+            " If n == winnr(), then there is no CTRL_W-p window
+            " So we have to create a new one
+            if bufnr('%') == g:proj_running
+                exec 'silent vertical new'
+            else
+                exec 'silent vertical split | silent! bnext'
+            endif
+            wincmd p " Go back to the Project Window and ensure it is the right width
+            exec b:proj_locate_command
+            exec b:proj_resize_command
+            wincmd p
+        endif
+    endfunction ">>>
+    " s:DoSetupAndSplit_au() <<<
+    "   Same as above but ensure that the Project window is the current
+    "   window.  Only called from an autocommand
+    function! s:DoSetupAndSplit_au()
+        if winbufnr(0) != g:proj_running
+            return
+        endif
+        call s:DoSetup()                " Ensure that all the settings are right
+        if winbufnr(2) == -1            " We're the only window right now.
+            exec 'silent vertical split | bnext'
+            if bufnr('%') == g:proj_running
+                enew
+            endif
+            if bufnr('%') == g:proj_last_buffer | bnext | bprev | bnext | endif
+            wincmd p " Go back to the Project Window and ensure it is the right width
+            exec b:proj_locate_command
+            exec b:proj_resize_command
+        elseif(winnr() != 1)
+            exec b:proj_locate_command
+            exec b:proj_resize_command
+        endif
+    endfunction
+    function! s:RecordPrevBuffer_au()
+        let g:proj_last_buffer = bufnr('%')
+    endfunction ">>>
+    " s:RecursivelyConstructDirectives(lineno) <<<
+    "   Construct the inherited directives
+    function! s:RecursivelyConstructDirectives(lineno)
+        let lineno=s:FindFoldTop(a:lineno)
+        let foldlineno = lineno
+        let foldlev=foldlevel(lineno)
+        let parent_infoline = ''
+        if foldlev > 1
+            while foldlevel(lineno) >= foldlev " Go to parent fold
+                if lineno < 1
+                    echoerr 'Some kind of fold error.  Check your syntax.'
+                    return
+                endif
+                let lineno = lineno - 1
+            endwhile
+            let parent_infoline = s:RecursivelyConstructDirectives(lineno)
+        endif
+        let parent_home = s:GetHome(parent_infoline, '')
+        let parent_c_d = s:GetCd(parent_infoline, parent_home)
+        let parent_scriptin = s:GetScriptin(parent_infoline, parent_home)
+        let parent_scriptout = s:GetScriptout(parent_infoline, parent_home)
+        let parent_filter = s:GetFilter(parent_infoline, '*')
+        let infoline = getline(foldlineno)
+        " Extract the home directory of this fold
+        let home=s:GetHome(infoline, parent_home)
+        if home != ''
+            if (foldlevel(foldlineno) == 1) && !s:IsAbsolutePath(home)
+                call confirm('Outermost Project Fold must have absolute path!  Or perhaps the path does not exist.', "&OK", 1)
+                let home = '~'  " Some 'reasonable' value
+            endif
+        endif
+        " Extract any CD information
+        let c_d = s:GetCd(infoline, home)
+        if c_d != ''
+            if (foldlevel(foldlineno) == 1) && !s:IsAbsolutePath(c_d)
+                call confirm('Outermost Project Fold must have absolute CD path!  Or perhaps the path does not exist.', "&OK", 1)
+                let c_d = '.'  " Some 'reasonable' value
+            endif
+        else
+            let c_d=parent_c_d
+        endif
+        " Extract scriptin
+        let scriptin = s:GetScriptin(infoline, home)
+        if scriptin == ''
+            let scriptin = parent_scriptin
+        endif
+        " Extract scriptout
+        let scriptout = s:GetScriptout(infoline, home)
+        if scriptout == ''
+            let scriptout = parent_scriptout
+        endif
+        " Extract filter
+        let filter = s:GetFilter(infoline, parent_filter)
+        if filter == '' | let filter = parent_filter | endif
+        return s:ConstructInfo(home, c_d, scriptin, scriptout, '', filter)
+    endfunction ">>>
+    " s:ConstructInfo(home, c_d, scriptin, scriptout, flags, filter) <<<
+    function! s:ConstructInfo(home, c_d, scriptin, scriptout, flags, filter)
+        let retval='Directory='.a:home
+        if a:c_d[0] != ''
+            let retval=retval.' CD='.a:c_d
+        endif
+        if a:scriptin[0] != ''
+            let retval=retval.' in='.a:scriptin
+        endif
+        if a:scriptout[0] != ''
+            let retval=retval.' out='.a:scriptout
+        endif
+        if a:filter[0] != ''
+            let retval=retval.' filter="'.a:filter.'"'
+        endif
+        return retval
+    endfunction ">>>
+    " s:OpenEntry(line, precmd, editcmd) <<<
+    "   Get the filename under the cursor, and open a window with it.
+    function! s:OpenEntry(line, precmd, editcmd, dir)
+        silent exec a:precmd
+        if (a:editcmd[0] != '')
+            if a:dir
+                let fname='.'
+            else
+                if (foldlevel(a:line) == 0) && (a:editcmd[0] != '')
+                    return 0                    " If we're outside a fold, do nothing
+                endif
+                let fname=substitute(getline(a:line), '\s*#.*', '', '') " Get rid of comments and whitespace before comment
+                let fname=substitute(fname, '^\s*\(.*\)', '\1', '') " Get rid of leading whitespace
+                if strlen(fname) == 0
+                    return 0                    " The line is blank. Do nothing.
+                endif
+            endif
+        else
+            let fname='.'
+        endif
+        let infoline = s:RecursivelyConstructDirectives(a:line)
+        let retval=s:OpenEntry2(a:line, infoline, fname, a:editcmd)
+        call s:DisplayInfo()
+        return retval
+    endfunction
+    ">>>
+    " s:OpenEntry2(line, infoline, precmd, editcmd) <<<
+    "   Get the filename under the cursor, and open a window with it.
+    function! s:OpenEntry2(line, infoline, fname, editcmd)
+        let fname=escape(a:fname, ' %#')        " Thanks to Thomas Link for cluing me in on % and #
+        let home=s:GetHome(a:infoline, '').'/'
+        if home=='/'
+            echoerr 'Project structure error. Check your syntax.'
+            return
+        endif
+        "Save the cd command
+        let cd_cmd = b:proj_cd_cmd
+        if a:editcmd[0] != '' " If editcmd is '', then just set up the environment in the Project Window
+            call s:DoSetupAndSplit()
+            " If it is an absolute path, don't prepend home
+            if !s:IsAbsolutePath(fname)
+                let fname=home.fname
+            endif
+            if s:IsAbsolutePath(fname) == 2
+                exec a:editcmd.' '.fname
+            else
+                silent exec 'silent '.a:editcmd.' '.fname
+            endif
+        else " only happens in the Project File
+            exec 'au! BufEnter,BufLeave '.expand('%:p')
+        endif
+        " Extract any CD information
+        let c_d = s:GetCd(a:infoline, home)
+        if c_d != '' && (s:IsAbsolutePath(home) != 2)
+            if match(g:proj_flags, '\CL') != -1
+                call s:SetupAutoCommand(c_d)
+            endif
+            if !isdirectory(glob(c_d))
+                call confirm("From this fold's entry,\nCD=".'"'.c_d.'" is not a valid directory.', "&OK", 1)
+            else
+                silent exec cd_cmd.' '.c_d
+            endif
+        endif
+        " Extract any scriptin information
+        let scriptin = s:GetScriptin(a:infoline, home)
+        if scriptin != ''
+            if !filereadable(glob(scriptin))
+                call confirm('"'.scriptin.'" not found. Ignoring.', "&OK", 1)
+            else
+                call s:SetupScriptAutoCommand('BufEnter', scriptin)
+                exec 'source '.scriptin
+            endif
+        endif
+        let scriptout = s:GetScriptout(a:infoline, home)
+        if scriptout != ''
+            if !filereadable(glob(scriptout))
+                call confirm('"'.scriptout.'" not found. Ignoring.', "&OK", 1)
+            else
+                call s:SetupScriptAutoCommand('BufLeave', scriptout)
+            endif
+        endif
+        return 1
+    endfunction
+    ">>>
+    " s:DoFoldOrOpenEntry(cmd0, cmd1) <<<
+    "   Used for double clicking. If the mouse is on a fold, open/close it. If
+    "   not, try to open the file.
+    function! s:DoFoldOrOpenEntry(cmd0, cmd1)
+        if getline('.')=~'{\|}' || foldclosed('.') != -1
+            normal! za
+        else
+            call s:DoEnsurePlacementSize_au()
+            call s:OpenEntry(line('.'), a:cmd0, a:cmd1, 0)
+            if (match(g:proj_flags, '\Cc') != -1)
+                let g:proj_mywinnumber = winbufnr(0)
+                Project
+                hide
+                if(g:proj_mywinnumber != winbufnr(0))
+                    wincmd p
+                endif
+                wincmd =
+            endif
+        endif
+    endfunction ">>>
+    " s:VimDirListing(filter, padding, separator, filevariable, filecount, dirvariable, dircount) <<<
+    function! s:VimDirListing(filter, padding, separator, filevariable, filecount, dirvariable, dircount)
+        let end = 0
+        let files=''
+        let filter = a:filter
+        " Chop up the filter
+        "   Apparently glob() cannot take something like this: glob('*.c *.h')
+        let while_var = 1
+        while while_var
+            let end = stridx(filter, ' ')
+            if end == -1
+                let end = strlen(filter)
+                let while_var = 0
+            endif
+            let single=glob(strpart(filter, 0, end))
+            if strlen(single) != 0
+                let files = files.single."\010"
+            endif
+            let filter = strpart(filter, end + 1)
+        endwhile
+        " files now contains a list of everything in the directory. We need to
+        " weed out the directories.
+        let fnames=files
+        let {a:filevariable}=''
+        let {a:dirvariable}=''
+        let {a:filecount}=0
+        let {a:dircount}=0
+        while strlen(fnames) > 0
+            let fname = substitute(fnames,  '\(\(\f\|[ :\[\]]\)*\).*', '\1', '')
+            let fnames = substitute(fnames, '\(\f\|[ :\[\]]\)*.\(.*\)', '\2', '')
+            if isdirectory(glob(fname))
+                let {a:dirvariable}={a:dirvariable}.a:padding.fname.a:separator
+                let {a:dircount}={a:dircount} + 1
+            else
+                let {a:filevariable}={a:filevariable}.a:padding.fname.a:separator
+                let {a:filecount}={a:filecount} + 1
+            endif
+        endwhile
+    endfunction ">>>
+    " s:GenerateEntry(recursive, name, absolute_dir, dir, c_d, filter_directive, filter, foldlev, sort) <<<
+    function! s:GenerateEntry(recursive, line, name, absolute_dir, dir, c_d, filter_directive, filter, foldlev, sort)
+        let line=a:line
+        if a:dir =~ '\\ '
+            let dir='"'.substitute(a:dir, '\\ ', ' ', 'g').'"'
+        else
+            let dir=a:dir
+        endif
+        let spaces=strpart('                                                             ', 0, a:foldlev)
+        let c_d=(strlen(a:c_d) > 0) ? 'CD='.a:c_d.' ' : ''
+        let c_d=(strlen(a:filter_directive) > 0) ? c_d.'filter="'.a:filter_directive.'" ': c_d
+        call append(line, spaces.'}')
+        call append(line, spaces.a:name.'='.dir.' '.c_d.'{')
+        if a:recursive
+            exec 'cd '.a:absolute_dir
+            call s:VimDirListing("*", '', "\010", 'b:files', 'b:filecount', 'b:dirs', 'b:dircount')
+            cd -
+            let dirs=b:dirs
+            let dcount=b:dircount
+            unlet b:files b:filecount b:dirs b:dircount
+            while dcount > 0
+                let dname = substitute(dirs,  '\(\( \|\f\|:\)*\).*', '\1', '')
+                let edname = escape(dname, ' ')
+                let dirs = substitute(dirs, '\( \|\f\|:\)*.\(.*\)', '\2', '')
+                let line=s:GenerateEntry(1, line + 1, dname, a:absolute_dir.'/'.edname, edname, '', '', a:filter, a:foldlev+1, a:sort)
+                let dcount=dcount-1
+            endwhile
+        endif
+        return line+1
+    endfunction " >>>
+    " s:DoEntryFromDir(line, name, absolute_dir, dir, c_d, filter_directive, filter, foldlev, sort) <<<
+    "   Generate the fold from the directory hierarchy (if recursive), then
+    "   fill it in with RefreshEntriesFromDir()
+    function! s:DoEntryFromDir(recursive, line, name, absolute_dir, dir, c_d, filter_directive, filter, foldlev, sort)
+        call s:GenerateEntry(a:recursive, a:line, a:name, escape(a:absolute_dir, ' '), escape(a:dir, ' '), escape(a:c_d, ' '), a:filter_directive, a:filter, a:foldlev, a:sort)
+        normal! j
+        call s:RefreshEntriesFromDir(1)
+    endfunction ">>>
+    " s:CreateEntriesFromDir(recursive) <<<
+    "   Prompts user for information and then calls s:DoEntryFromDir()
+    function! s:CreateEntriesFromDir(recursive)
+        " Save a mark for the current cursor position
+        normal! mk
+        let line=line('.')
+        let name = inputdialog('Enter the Name of the Entry: ')
+        if strlen(name) == 0
+            return
+        endif
+        let foldlev=foldlevel(line)
+        if (foldclosed(line) != -1) || (getline(line) =~ '}')
+            let foldlev=foldlev - 1
+        endif
+        let absolute = (foldlev <= 0)?'Absolute ': ''
+        let home=''
+        let filter='*'
+        if (match(g:proj_flags, '\Cb') != -1) && has('browse')
+            " Note that browse() is inconsistent: On Win32 you can't select a
+            " directory, and it gives you a relative path.
+            let dir = browse(0, 'Enter the '.absolute.'Directory to Load: ', '', '')
+            let dir = fnamemodify(dir, ':p')
+        else
+            let dir = inputdialog('Enter the '.absolute.'Directory to Load: ', '')
+        endif
+        if (dir[strlen(dir)-1] == '/') || (dir[strlen(dir)-1] == '\\')
+            let dir=strpart(dir, 0, strlen(dir)-1) " Remove trailing / or \
+        endif
+        let dir = substitute(dir, '^\~', $HOME, 'g')
+        if (foldlev > 0)
+            let parent_directive=s:RecursivelyConstructDirectives(line)
+            let filter = s:GetFilter(parent_directive, '*')
+            let home=s:GetHome(parent_directive, '')
+            if home[strlen(home)-1] != '/' && home[strlen(home)-1] != '\\'
+                let home=home.'/'
+            endif
+            unlet parent_directive
+            if s:IsAbsolutePath(dir)
+                " It is not a relative path  Try to make it relative
+                let hend=matchend(dir, '\C'.glob(home))
+                if hend != -1
+                    let dir=strpart(dir, hend)          " The directory can be a relative path
+                else
+                    let home=""
+                endif
+            endif
+        endif
+        if strlen(home.dir) == 0
+            return
+        endif
+        if !isdirectory(home.dir)
+            if has("unix")
+                silent exec '!mkdir '.home.dir.' > /dev/null'
+            else
+                call confirm('"'.home.dir.'" is not a valid directory.', "&OK", 1)
+                return
+            endif
+        endif
+        let c_d = inputdialog('Enter the CD parameter: ', '')
+        let filter_directive = inputdialog('Enter the File Filter: ', '')
+        if strlen(filter_directive) != 0
+            let filter = filter_directive
+        endif
+        " If I'm on a closed fold, go to the bottom of it
+        if foldclosedend(line) != -1
+            let line = foldclosedend(line)
+        endif
+        let foldlev = foldlevel(line)
+        " If we're at the end of a fold . . .
+        if getline(line) =~ '}'
+            let foldlev = foldlev - 1           " . . . decrease the indentation by 1.
+        endif
+        " Do the work
+        call s:DoEntryFromDir(a:recursive, line, name, home.dir, dir, c_d, filter_directive, filter, foldlev, 0)
+        " Restore the cursor position
+        normal! `k
+    endfunction ">>>
+    " s:RefreshEntriesFromDir(recursive) <<<
+    "   Finds metadata at the top of the fold, and then replaces all files
+    "   with the contents of the directory.  Works recursively if recursive is 1.
+    function! s:RefreshEntriesFromDir(recursive)
+        if foldlevel('.') == 0
+            echo 'Nothing to refresh.'
+            return
+        endif
+        " Open the fold.
+        if getline('.') =~ '}'
+            normal! zo[z
+        else
+            normal! zo]z[z
+        endif
+        let just_a_fold=0
+        let infoline = s:RecursivelyConstructDirectives(line('.'))
+        let immediate_infoline = getline('.')
+        if strlen(substitute(immediate_infoline, '[^=]*=\(\(\f\|:\|\\ \)*\).*', '\1', '')) == strlen(immediate_infoline)
+            let just_a_fold = 1
+        endif
+        " Extract the home directory of the fold
+        let home = s:GetHome(infoline, '')
+        if home == ''
+            " No Match.  This means that this is just a label with no
+            " directory entry.
+            if a:recursive == 0
+                return          " We're done--nothing to do
+            endif
+            " Mark that it is just a fold, so later we don't delete filenames
+            " that aren't there.
+            let just_a_fold = 1
+        endif
+        if just_a_fold == 0
+            " Extract the filter between quotes (we don't care what CD is).
+            let filter = s:GetFilter(infoline, '*')
+            " Extract the description (name) of the fold
+            let name = substitute(infoline, '^[#\t ]*\([^=]*\)=.*', '\1', '')
+            if strlen(name) == strlen(infoline)
+                return                  " If there's no name, we're done.
+            endif
+            if (home == '') || (name == '')
+                return
+            endif
+            " Extract the flags
+            let flags = s:GetFlags(immediate_infoline)
+            let sort = (match(g:proj_flags, '\CS') != -1)
+            if flags != ''
+                if match(flags, '\Cr') != -1
+                    " If the flags do not contain r (refresh), then treat it just
+                    " like a fold
+                    let just_a_fold = 1
+                endif
+                if match(flags, '\CS') != -1
+                    let sort = 1
+                endif
+                if match(flags, '\Cs') != -1
+                    let sort = 0
+                endif
+            else
+                let flags=''
+            endif
+        endif
+        " Move to the first non-fold boundary line
+        normal! j
+        " Delete filenames until we reach the end of the fold
+        while getline('.') !~ '}'
+            if line('.') == line('$')
+                break
+            endif
+            if getline('.') !~ '{'
+                " We haven't reached a sub-fold, so delete what's there.
+                if (just_a_fold == 0) && (getline('.') !~ '^\s*#') && (getline('.') !~ '#.*pragma keep')
+                    d _
+                else
+                    " Skip lines only in a fold and comment lines
+                    normal! j
+                endif
+            else
+                " We have reached a sub-fold. If we're doing recursive, then
+                " call this function again. If not, find the end of the fold.
+                if a:recursive == 1
+                    call s:RefreshEntriesFromDir(1)
+                    normal! ]zj
+                else
+                    if foldclosed('.') == -1
+                        normal! zc
+                    endif
+                    normal! j
+                endif
+            endif
+        endwhile
+        if just_a_fold == 0
+            " We're not just in a fold, and we have deleted all the filenames.
+            " Now it is time to regenerate what is in the directory.
+            if !isdirectory(glob(home))
+                call confirm('"'.home.'" is not a valid directory.', "&OK", 1)
+            else
+                let foldlev=foldlevel('.')
+                " T flag.  Thanks Tomas Z.
+                if (match(flags, '\Ct') != -1) || ((match(g:proj_flags, '\CT') == -1) && (match(flags, '\CT') == -1))
+                    " Go to the top of the fold (force other folds to the
+                    " bottom)
+                    normal! [z
+                    normal! j
+                    " Skip any comments
+                    while getline('.') =~ '^\s*#'
+                        normal! j
+                    endwhile
+                endif
+                normal! k
+                let cwd=getcwd()
+                let spaces=strpart('                                               ', 0, foldlev)
+                exec 'cd '.home
+                if match(g:proj_flags, '\Ci') != -1
+                    echon home."\r"
+                endif
+                call s:VimDirListing(filter, spaces, "\n", 'b:files', 'b:filecount', 'b:dirs', 'b:dircount')
+                if b:filecount > 0
+                    normal! mk
+                    silent! put =b:files
+                    normal! `kj
+                    if sort
+                        call s:SortR(line('.'), line('.') + b:filecount - 1)
+                    endif
+                else
+                    normal! j
+                endif
+                unlet b:files b:filecount b:dirs b:dircount
+                exec 'cd '.cwd
+            endif
+        endif
+        " Go to the top of the refreshed fold.
+        normal! [z
+    endfunction ">>>
+    " s:MoveUp() <<<
+    "   Moves the entity under the cursor up a line.
+    function! s:MoveUp()
+        let lineno=line('.')
+        if lineno == 1
+            return
+        endif
+        let fc=foldclosed('.')
+        let a_reg=@a
+        if lineno == line('$')
+            normal! "add"aP
+        else
+            normal! "addk"aP
+        endif
+        let @a=a_reg
+        if fc != -1
+            normal! zc
+        endif
+    endfunction ">>>
+    " s:MoveDown() <<<
+    "   Moves the entity under the cursor down a line.
+    function! s:MoveDown()
+        let fc=foldclosed('.')
+        let a_reg=@a
+        normal! "add"ap
+        let @a=a_reg
+        if (fc != -1) && (foldclosed('.') == -1)
+            normal! zc
+        endif
+    endfunction " >>>
+    " s:DisplayInfo() <<<
+    "   Displays filename and current working directory when i (info) is in
+    "   the flags.
+    function! s:DisplayInfo()
+        if match(g:proj_flags, '\Ci') != -1
+            echo 'file: '.expand('%').', cwd: '.getcwd().', lines: '.line('$')
+        endif
+    endfunction ">>>
+    " s:SetupAutoCommand(cwd) <<<
+    "   Sets up an autocommand to ensure that the cwd is set to the one
+    "   desired for the fold regardless.  :lcd only does this on a per-window
+    "   basis, not a per-buffer basis.
+    function! s:SetupAutoCommand(cwd)
+        if !exists("b:proj_has_autocommand")
+            let b:proj_cwd_save = escape(getcwd(), ' ')
+            let b:proj_has_autocommand = 1
+            let bufname=escape(substitute(expand('%:p', 0), '\\', '/', 'g'), ' ')
+            exec 'au BufEnter '.bufname." let b:proj_cwd_save=escape(getcwd(), ' ') | cd ".a:cwd
+            exec 'au BufLeave '.bufname.' exec "cd ".b:proj_cwd_save'
+            exec 'au BufWipeout '.bufname.' au! * '.bufname
+        endif
+    endfunction ">>>
+    " s:SetupScriptAutoCommand(bufcmd, script) <<<
+    "   Sets up an autocommand to run the scriptin script.
+    function! s:SetupScriptAutoCommand(bufcmd, script)
+        if !exists("b:proj_has_".a:bufcmd)
+            let b:proj_has_{a:bufcmd} = 1
+            exec 'au '.a:bufcmd.' '.escape(substitute(expand('%:p', 0), '\\', '/', 'g'), ' ').' source '.a:script
+        endif
+    endfunction " >>>
+    " s:DoEnsurePlacementSize_au() <<<
+    "   Ensure that the Project window is on the left of the window and has
+    "   the correct size. Only called from an autocommand
+    function! s:DoEnsurePlacementSize_au()
+        if (winbufnr(0) != g:proj_running) || (winnr() != 1)
+            if exists("g:proj_doinghelp")
+                if g:proj_doinghelp > 0
+                    let g:proj_doinghelp = g:proj_doinghelp - 1
+                    return
+                endif
+                unlet g:proj_doinghelp
+                return
+            endif
+            exec b:proj_locate_command
+        endif
+        exec b:proj_resize_command
+    endfunction ">>>
+    " s:Spawn(number) <<<
+    "   Spawn an external command on the file
+    function! s:Spawn(number)
+        echo | if exists("g:proj_run".a:number)
+            let fname=getline('.')
+            if fname!~'{\|}'
+                let fname=substitute(fname, '\s*#.*', '', '')
+                let fname=substitute(fname, '^\s*\(.*\)\s*', '\1', '')
+                if fname == '' | return | endif
+                let parent_infoline = s:RecursivelyConstructDirectives(line('.'))
+                let home=expand(s:GetHome(parent_infoline, ''))
+                let c_d=expand(s:GetCd(parent_infoline, ''))
+                let command=substitute(g:proj_run{a:number}, '%%', "\010", 'g')
+                let command=substitute(command, '%f', escape(home.'/'.fname, '\'), 'g')
+                let command=substitute(command, '%F', substitute(escape(home.'/'.fname, '\'), ' ', '\\\\ ', 'g'), 'g')
+                let command=substitute(command, '%s', escape(home.'/'.fname, '\'), 'g')
+                let command=substitute(command, '%n', escape(fname, '\'), 'g')
+                let command=substitute(command, '%N', substitute(fname, ' ', '\\\\ ', 'g'), 'g')
+                let command=substitute(command, '%h', escape(home, '\'), 'g')
+                let command=substitute(command, '%H', substitute(escape(home, '\'), ' ', '\\\\ ', 'g'), 'g')
+                if c_d != ''
+                    if c_d == home
+                        let percent_r='.'
+                    else
+                        let percent_r=substitute(home, escape(c_d.'/', '\'), '', 'g')
+                    endif
+                else
+                    let percent_r=home
+                endif
+                let command=substitute(command, '%r', percent_r, 'g')
+                let command=substitute(command, '%R', substitute(percent_r, ' ', '\\\\ ', 'g'), 'g')
+                let command=substitute(command, '%d', escape(c_d, '\'), 'g')
+                let command=substitute(command, '%D', substitute(escape(c_d, '\'), ' ', '\\\\ ', 'g'), 'g')
+                let command=substitute(command, "\010", '%', 'g')
+                exec command
+            endif
+        endif
+    endfunction ">>>
+    " s:ListSpawn(varnamesegment) <<<
+    "   List external commands
+    function! s:ListSpawn(varnamesegment)
+        let number = 1
+        while number < 10
+            if exists("g:proj_run".a:varnamesegment.number)
+                echohl LineNr | echo number.':' | echohl None | echon ' '.substitute(escape(g:proj_run{a:varnamesegment}{number}, '\'), "\n", '\\n', 'g')
+            else
+                echohl LineNr | echo number.':' | echohl None
+            endif
+            let number=number + 1
+        endwhile
+    endfunction ">>>
+    " s:FindFoldTop(line) <<<
+    "   Return the line number of the directive line
+    function! s:FindFoldTop(line)
+        let lineno=a:line
+        if getline(lineno) =~ '}'
+            let lineno = lineno - 1
+        endif
+        while getline(lineno) !~ '{' && lineno > 1
+            if getline(lineno) =~ '}'
+                let lineno=s:FindFoldTop(lineno)
+            endif
+            let lineno = lineno - 1
+        endwhile
+        return lineno
+    endfunction ">>>
+    " s:FindFoldBottom(line) <<<
+    "   Return the line number of the directive line
+    function! s:FindFoldBottom(line)
+        let lineno=a:line
+        if getline(lineno) =~ '{'
+            let lineno=lineno + 1
+        endif
+        while getline(lineno) !~ '}' && lineno < line('$')
+            if getline(lineno) =~ '{'
+                let lineno=s:FindFoldBottom(lineno)
+            endif
+            let lineno = lineno + 1
+        endwhile
+        return lineno
+    endfunction ">>>
+    " s:LoadAll(recurse, line) <<<
+    "   Load all files in a project
+    function! s:LoadAll(recurse, line)
+        let b:loadcount=0
+        function! s:SpawnExec(infoline, fname, lineno, data)
+            if s:OpenEntry2(a:lineno, a:infoline, a:fname, 'e')
+                wincmd p
+                let b:loadcount=b:loadcount+1
+                echon b:loadcount."\r"
+                if getchar(0) != 0
+                    let b:stop_everything=1
+                endif
+            endif
+        endfunction
+        call Project_ForEach(a:recurse, line('.'), "*<SID>SpawnExec", 0, '^\(.*l\)\@!')
+        delfunction s:SpawnExec
+        echon b:loadcount." Files Loaded\r"
+        unlet b:loadcount
+        if exists("b:stop_everything") | unlet b:stop_everything | endif
+    endfunction ">>>
+    " s:WipeAll(recurse, line) <<<
+    "   Wipe all files in a project
+    function! s:WipeAll(recurse, line)
+        let b:wipecount=0
+        let b:totalcount=0
+        function! s:SpawnExec(home, c_d, fname, lineno, data)
+            let fname=escape(a:fname, ' ')
+            if s:IsAbsolutePath(fname)
+                let fname=fnamemodify(fname, ':n')  " :n is coming, won't break anything now
+            else
+                let fname=fnamemodify(a:home.'/'.fname, ':n')  " :n is coming, won't break anything now
+            endif
+            let b:totalcount=b:totalcount+1
+            let fname=substitute(fname, '^\~', $HOME, 'g')
+            if bufloaded(substitute(fname, '\\ ', ' ', 'g'))
+                if getbufvar(fname.'\>', '&modified') == 1
+                    exec 'sb '.fname
+                    wincmd L
+                    w
+                    wincmd p
+                endif
+                let b:wipecount=b:wipecount+1
+                exec 'bwipe! '.fname
+            endif
+            if b:totalcount % 5 == 0
+                echon b:wipecount.' of '.b:totalcount."\r"
+                redraw
+            endif
+            if getchar(0) != 0
+                let b:stop_everything=1
+            endif
+        endfunction
+        call Project_ForEach(a:recurse, line('.'), "<SID>SpawnExec", 0, '^\(.*w\)\@!')
+        delfunction s:SpawnExec
+        echon b:wipecount.' of '.b:totalcount." Files Wiped\r"
+        unlet b:wipecount b:totalcount
+        if exists("b:stop_everything") | unlet b:stop_everything | endif
+    endfunction ">>>
+    " s:LoadAllSplit(recurse, line) <<<
+    "   Load all files in a project using split windows.
+    "   Contributed by A. Harrison
+    function! s:LoadAllSplit(recurse, line)
+        let b:loadcount=0
+        function! s:SpawnExec(infoline, fname, lineno, data)
+            let winNr = winnr() "get ProjectWindow number
+            if s:OpenEntry2(a:lineno, a:infoline, a:fname, 'sp')
+                exec winNr."wincmd w"
+                let b:loadcount=b:loadcount+1
+                echon b:loadcount."\r"
+                if getchar(0) != 0
+                    let b:stop_everything=1
+                endif
+            endif
+        endfunction
+        call Project_ForEach(a:recurse, line('.'), "*<SID>SpawnExec", 0, '^\(.*l\)\@!')
+        delfunction s:SpawnExec
+        echon b:loadcount." Files Loaded\r"
+        unlet b:loadcount
+        if exists("b:stop_everything") | unlet b:stop_everything | endif
+    endfunction ">>>
+    " s:GrepAll(recurse, lineno, pattern) <<<
+    "   Grep all files in a project, optionally recursively
+    function! s:GrepAll(recurse, lineno, pattern)
+        cunmap <buffer> help
+        let pattern=(a:pattern[0] == '')?input("GREP options and pattern: "):a:pattern
+        cnoremap <buffer> help let g:proj_doinghelp = 1<CR>:help
+        if pattern[0] == ''
+            return
+        endif
+        let b:escape_spaces=1
+        let fnames=Project_GetAllFnames(a:recurse, a:lineno, ' ')
+        unlet b:escape_spaces
+        cclose " Make sure grep window is closed
+        call s:DoSetupAndSplit()
+        if match(g:proj_flags, '\Cv') == -1
+            silent! exec 'silent! grep '.pattern.' '.fnames
+            if v:shell_error != 0
+                echo 'GREP error. Perhaps there are too many filenames.'
+            else
+                copen
+            endif
+        else
+            silent! exec 'silent! vimgrep '.pattern.' '.fnames
+            copen
+        endif
+    endfunction ">>>
+    " GetXXX Functions <<<
+    function! s:GetHome(info, parent_home)
+        " Thanks to Adam Montague for pointing out the need for @ in urls.
+        let home=substitute(a:info, '^[^=]*=\(\(\\ \|\f\|:\|@\)\+\).*', '\1', '')
+        if strlen(home) == strlen(a:info)
+            let home=substitute(a:info, '.\{-}"\(.\{-}\)".*', '\1', '')
+            if strlen(home) != strlen(a:info) | let home=escape(home, ' ') | endif
+        endif
+        if strlen(home) == strlen(a:info)
+            let home=a:parent_home
+        elseif home=='.'
+            let home=a:parent_home
+        elseif !s:IsAbsolutePath(home)
+            let home=a:parent_home.'/'.home
+        endif
+        return home
+    endfunction
+    function! s:GetFilter(info, parent_filter)
+        let filter = substitute(a:info, '.*\<filter="\([^"]*\).*', '\1', '')
+        if strlen(filter) == strlen(a:info) | let filter = a:parent_filter | endif
+        return filter
+    endfunction
+    function! s:GetCd(info, home)
+        let c_d=substitute(a:info, '.*\<CD=\(\(\\ \|\f\|:\)\+\).*', '\1', '')
+        if strlen(c_d) == strlen(a:info)
+            let c_d=substitute(a:info, '.*\<CD="\(.\{-}\)".*', '\1', '')
+            if strlen(c_d) != strlen(a:info) | let c_d=escape(c_d, ' ') | endif
+        endif
+        if strlen(c_d) == strlen(a:info)
+            let c_d=''
+        elseif c_d == '.'
+            let c_d = a:home
+        elseif !s:IsAbsolutePath(c_d)
+            let c_d = a:home.'/'.c_d
+        endif
+        return c_d
+    endfunction
+    function! s:GetScriptin(info, home)
+        let scriptin = substitute(a:info, '.*\<in=\(\(\\ \|\f\|:\)\+\).*', '\1', '')
+        if strlen(scriptin) == strlen(a:info)
+            let scriptin=substitute(a:info, '.*\<in="\(.\{-}\)".*', '\1', '')
+            if strlen(scriptin) != strlen(a:info) | let scriptin=escape(scriptin, ' ') | endif
+        endif
+        if strlen(scriptin) == strlen(a:info) | let scriptin='' | else
+        if !s:IsAbsolutePath(scriptin) | let scriptin=a:home.'/'.scriptin | endif | endif
+        return scriptin
+    endfunction
+    function! s:GetScriptout(info, home)
+        let scriptout = substitute(a:info, '.*\<out=\(\(\\ \|\f\|:\)\+\).*', '\1', '')
+        if strlen(scriptout) == strlen(a:info)
+            let scriptout=substitute(a:info, '.*\<out="\(.\{-}\)".*', '\1', '')
+            if strlen(scriptout) != strlen(a:info) | let scriptout=escape(scriptout, ' ') | endif
+        endif
+        if strlen(scriptout) == strlen(a:info) | let scriptout='' | else
+        if !s:IsAbsolutePath(scriptout) | let scriptout=a:home.'/'.scriptout | endif | endif
+        return scriptout
+    endfunction
+    function! s:GetFlags(info)
+        let flags=substitute(a:info, '.*\<flags=\([^ {]*\).*', '\1', '')
+        if (strlen(flags) == strlen(a:info))
+            let flags=''
+        endif
+        return flags
+    endfunction ">>>
+    " Project_GetAllFnames(recurse, lineno, separator) <<<
+    "   Grep all files in a project, optionally recursively
+    function! Project_GetAllFnames(recurse, lineno, separator)
+        let b:fnamelist=''
+        function! s:SpawnExec(home, c_d, fname, lineno, data)
+            if exists('b:escape_spaces')
+                let fname=escape(a:fname, ' ')
+            else
+                let fname=a:fname
+            endif
+            if !s:IsAbsolutePath(a:fname)
+                let fname=a:home.'/'.fname
+            endif
+            let b:fnamelist=b:fnamelist.a:data.fname
+        endfunction
+        call Project_ForEach(a:recurse, line('.'), "<SID>SpawnExec", a:separator, '')
+        delfunction s:SpawnExec
+        let retval=b:fnamelist
+        unlet b:fnamelist
+        return retval
+    endfunction ">>>
+    " Project_GetAllFnames(recurse, lineno, separator) <<<
+    "   Grep all files in a project, optionally recursively
+    function! Project_GetFname(line)
+        if (foldlevel(a:line) == 0)
+            return ''
+        endif
+        let fname=substitute(getline(a:line), '\s*#.*', '', '') " Get rid of comments and whitespace before comment
+        let fname=substitute(fname, '^\s*\(.*\)', '\1', '') " Get rid of leading whitespace
+        if strlen(fname) == 0
+            return ''                    " The line is blank. Do nothing.
+        endif
+        if s:IsAbsolutePath(fname)
+            return fname
+        endif
+        let infoline = s:RecursivelyConstructDirectives(a:line)
+        return s:GetHome(infoline, '').'/'.fname
+    endfunction ">>>
+    " Project_ForEach(recurse, lineno, cmd, data, match) <<<
+    "   Grep all files in a project, optionally recursively
+    function! Project_ForEach(recurse, lineno, cmd, data, match)
+        let info=s:RecursivelyConstructDirectives(a:lineno)
+        let lineno=s:FindFoldTop(a:lineno) + 1
+        let flags=s:GetFlags(getline(lineno - 1))
+        if (flags == '') || (a:match=='') || (match(flags, a:match) != -1)
+            call s:Project_ForEachR(a:recurse, lineno, info, a:cmd, a:data, a:match)
+        endif
+    endfunction
+    function! s:Project_ForEachR(recurse, lineno, info, cmd, data, match)
+        let home=s:GetHome(a:info, '')
+        let c_d=s:GetCd(a:info, home)
+        let scriptin = s:GetScriptin(a:info, home)
+        let scriptout = s:GetScriptout(a:info, home)
+        let filter = s:GetFilter(a:info, '')
+        let lineno = a:lineno
+        let curline=getline(lineno)
+        while (curline !~ '}') && (curline < line('$'))
+            if exists("b:stop_everything") && b:stop_everything | return 0 | endif
+            if curline =~ '{'
+                if a:recurse
+                    let flags=s:GetFlags(curline)
+                    if (flags == '') || (a:match=='') || (match(flags, a:match) != -1)
+                        let this_home=s:GetHome(curline, home)
+                        let this_cd=s:GetCd(curline, this_home)
+                        if this_cd=='' | let this_cd=c_d | endif
+                        let this_scriptin=s:GetScriptin(curline, this_home)
+                        if this_scriptin == '' | let this_scriptin=scriptin | endif
+                        let this_scriptout=s:GetScriptin(curline, this_home)
+                        if this_scriptout == '' | let this_scriptout=scriptout | endif
+                        let this_filter=s:GetFilter(curline, filter)
+                        let lineno=s:Project_ForEachR(1, lineno+1,
+                            \s:ConstructInfo(this_home, this_cd, this_scriptin, this_scriptout, flags, this_filter), a:cmd, a:data, a:match)
+                    else
+                        let lineno=s:FindFoldBottom(lineno)
+                    endif
+                else
+                    let lineno=s:FindFoldBottom(lineno)
+                endif
+            else
+                let fname=substitute(curline, '\s*#.*', '', '')
+                let fname=substitute(fname, '^\s*\(.*\)', '\1', '')
+                if (strlen(fname) != strlen(curline)) && (fname[0] != '')
+                    if a:cmd[0] == '*'
+                        call {strpart(a:cmd, 1)}(a:info, fname, lineno, a:data)
+                    else
+                        call {a:cmd}(home, c_d, fname, lineno, a:data)
+                    endif
+                endif
+            endif
+            let lineno=lineno + 1
+            let curline=getline(lineno)
+        endwhile
+        return lineno
+    endfunction ">>>
+    " s:SpawnAll(recurse, number) <<<
+    "   Spawn an external command on the files of a project
+    function! s:SpawnAll(recurse, number)
+        echo | if exists("g:proj_run_fold".a:number)
+            if g:proj_run_fold{a:number}[0] == '*'
+                function! s:SpawnExec(home, c_d, fname, lineno, data)
+                    let command=substitute(strpart(g:proj_run_fold{a:data}, 1), '%s', escape(a:fname, ' \'), 'g')
+                    let command=substitute(command, '%f', escape(a:fname, '\'), 'g')
+                    let command=substitute(command, '%h', escape(a:home, '\'), 'g')
+                    let command=substitute(command, '%d', escape(a:c_d, '\'), 'g')
+                    let command=substitute(command, '%F', substitute(escape(a:fname, '\'), ' ', '\\\\ ', 'g'), 'g')
+                    exec command
+                endfunction
+                call Project_ForEach(a:recurse, line('.'), "<SID>SpawnExec", a:number, '.')
+                delfunction s:SpawnExec
+            else
+                let info=s:RecursivelyConstructDirectives(line('.'))
+                let home=s:GetHome(info, '')
+                let c_d=s:GetCd(info, '')
+                let b:escape_spaces=1
+                let fnames=Project_GetAllFnames(a:recurse, line('.'), ' ')
+                unlet b:escape_spaces
+                let command=substitute(g:proj_run_fold{a:number}, '%f', substitute(escape(fnames, '\'), '\\ ', ' ', 'g'), 'g')
+                let command=substitute(command, '%s', escape(fnames, '\'), 'g')
+                let command=substitute(command, '%h', escape(home, '\'), 'g')
+                let command=substitute(command, '%d', escape(c_d, '\'), 'g')
+                let command=substitute(command, '%F', escape(fnames, '\'), 'g')
+                exec command
+                if v:shell_error != 0
+                    echo 'Shell error. Perhaps there are too many filenames.'
+                endif
+            endif
+        endif
+    endfunction ">>>
+    if !exists("g:proj_running")
+        " s:DoProjectOnly(void) <<<
+        "   Make the file window the only one.
+        function! s:DoProjectOnly()
+            if winbufnr(0) != g:proj_running
+                let lzsave=&lz
+                set lz
+                only
+                Project
+                silent! wincmd p
+                let &lz=lzsave
+                unlet lzsave
+            endif
+        endfunction
+        " >>>
+
+        " Mappings <<<
+        nnoremap <buffer> <silent> <Return>   \|:call <SID>DoFoldOrOpenEntry('', 'e')<CR>
+        nnoremap <buffer> <silent> <S-Return> \|:call <SID>DoFoldOrOpenEntry('', 'sp')<CR>
+        nnoremap <buffer> <silent> <C-Return> \|:call <SID>DoFoldOrOpenEntry('silent! only', 'e')<CR>
+        nnoremap <buffer> <silent> <LocalLeader>T \|:call <SID>DoFoldOrOpenEntry('', 'tabe')<CR>
+        nmap     <buffer> <silent> <LocalLeader>s <S-Return>
+        nnoremap <buffer> <silent> <LocalLeader>S \|:call <SID>LoadAllSplit(0, line('.'))<CR>
+        nmap     <buffer> <silent> <LocalLeader>o <C-Return>
+        nnoremap <buffer> <silent> <LocalLeader>i :echo <SID>RecursivelyConstructDirectives(line('.'))<CR>
+        nnoremap <buffer> <silent> <LocalLeader>I :echo Project_GetFname(line('.'))<CR>
+        nmap     <buffer> <silent> <M-CR> <Return><C-W>p
+        nmap     <buffer> <silent> <LocalLeader>v <M-CR>
+        nnoremap <buffer> <silent> <LocalLeader>l \|:call <SID>LoadAll(0, line('.'))<CR>
+        nnoremap <buffer> <silent> <LocalLeader>L \|:call <SID>LoadAll(1, line('.'))<CR>
+        nnoremap <buffer> <silent> <LocalLeader>w \|:call <SID>WipeAll(0, line('.'))<CR>
+        nnoremap <buffer> <silent> <LocalLeader>W \|:call <SID>WipeAll(1, line('.'))<CR>
+        nnoremap <buffer> <silent> <LocalLeader>W \|:call <SID>WipeAll(1, line('.'))<CR>
+        nnoremap <buffer> <silent> <LocalLeader>g \|:call <SID>GrepAll(0, line('.'), "")<CR>
+        nnoremap <buffer> <silent> <LocalLeader>G \|:call <SID>GrepAll(1, line('.'), "")<CR>
+        nnoremap <buffer> <silent> <2-LeftMouse>   \|:call <SID>DoFoldOrOpenEntry('', 'e')<CR>
+        nnoremap <buffer> <silent> <S-2-LeftMouse> \|:call <SID>DoFoldOrOpenEntry('', 'sp')<CR>
+        nnoremap <buffer> <silent> <M-2-LeftMouse> <M-CR>
+        nnoremap <buffer> <silent> <S-LeftMouse>   <LeftMouse>
+        nmap     <buffer> <silent> <C-2-LeftMouse> <C-Return>
+        nnoremap <buffer> <silent> <C-LeftMouse>   <LeftMouse>
+        nnoremap <buffer> <silent> <3-LeftMouse>  <Nop>
+        nmap     <buffer> <silent> <RightMouse>   <space>
+        nmap     <buffer> <silent> <2-RightMouse> <space>
+        nmap     <buffer> <silent> <3-RightMouse> <space>
+        nmap     <buffer> <silent> <4-RightMouse> <space>
+        nnoremap <buffer> <silent> <space>  \|:silent exec 'vertical resize '.(match(g:proj_flags, '\Ct')!=-1 && winwidth('.') > g:proj_window_width?(g:proj_window_width):(winwidth('.') + g:proj_window_increment))<CR>
+        nnoremap <buffer> <silent> <C-Up>   \|:silent call <SID>MoveUp()<CR>
+        nnoremap <buffer> <silent> <C-Down> \|:silent call <SID>MoveDown()<CR>
+        nmap     <buffer> <silent> <LocalLeader><Up> <C-Up>
+        nmap     <buffer> <silent> <LocalLeader><Down> <C-Down>
+        let k=1
+        while k < 10
+            exec 'nnoremap <buffer> <LocalLeader>'.k.'  \|:call <SID>Spawn('.k.')<CR>'
+            exec 'nnoremap <buffer> <LocalLeader>f'.k.' \|:call <SID>SpawnAll(0, '.k.')<CR>'
+            exec 'nnoremap <buffer> <LocalLeader>F'.k.' \|:call <SID>SpawnAll(1, '.k.')<CR>'
+            let k=k+1
+        endwhile
+        nnoremap <buffer>          <LocalLeader>0 \|:call <SID>ListSpawn("")<CR>
+        nnoremap <buffer>          <LocalLeader>f0 \|:call <SID>ListSpawn("_fold")<CR>
+        nnoremap <buffer>          <LocalLeader>F0 \|:call <SID>ListSpawn("_fold")<CR>
+        nnoremap <buffer> <silent> <LocalLeader>c :call <SID>CreateEntriesFromDir(0)<CR>
+        nnoremap <buffer> <silent> <LocalLeader>C :call <SID>CreateEntriesFromDir(1)<CR>
+        nnoremap <buffer> <silent> <LocalLeader>r :call <SID>RefreshEntriesFromDir(0)<CR>
+        nnoremap <buffer> <silent> <LocalLeader>R :call <SID>RefreshEntriesFromDir(1)<CR>
+        " For Windows users: same as \R
+        nnoremap <buffer> <silent>           <F5> :call <SID>RefreshEntriesFromDir(1)<CR>
+        nnoremap <buffer> <silent> <LocalLeader>e :call <SID>OpenEntry(line('.'), '', '', 0)<CR>
+        nnoremap <buffer> <silent> <LocalLeader>E :call <SID>OpenEntry(line('.'), '', 'e', 1)<CR>
+        " The :help command stomps on the Project Window.  Try to avoid that.
+        " This is not perfect, but it is alot better than without the mappings.
+        cnoremap <buffer> help let g:proj_doinghelp = 1<CR>:help
+        nnoremap <buffer> <F1> :let g:proj_doinghelp = 1<CR><F1>
+        " This is to avoid changing the buffer, but it is not fool-proof.
+        nnoremap <buffer> <silent> <C-^> <Nop>
+        "nnoremap <script> <Plug>ProjectOnly :let lzsave=&lz<CR>:set lz<CR><C-W>o:Project<CR>:silent! wincmd p<CR>:let &lz=lzsave<CR>:unlet lzsave<CR>
+        nnoremap <script> <Plug>ProjectOnly :call <SID>DoProjectOnly()<CR>
+        if match(g:proj_flags, '\Cm') != -1
+            if !hasmapto('<Plug>ProjectOnly')
+                nmap <silent> <unique> <C-W>o <Plug>ProjectOnly
+                nmap <silent> <unique> <C-W><C-O> <C-W>o
+            endif
+        endif " >>>
+        if filereadable(glob('~/.vimproject_mappings')) | source ~/.vimproject_mappings | endif
+        " Autocommands <<<
+        " Autocommands to clean up if we do a buffer wipe
+        " These don't work unless we substitute \ for / for Windows
+        let bufname=escape(substitute(expand('%:p', 0), '\\', '/', 'g'), ' ')
+        exec 'au BufWipeout '.bufname.' au! * '.bufname
+        exec 'au BufWipeout '.bufname.' unlet g:proj_running'
+        exec 'au BufWipeout '.bufname.' nunmap <C-W>o'
+        exec 'au BufWipeout '.bufname.' nunmap <C-W><C-O>'
+        " Autocommands to keep the window the specified size
+        exec 'au WinLeave '.bufname.' call s:DoEnsurePlacementSize_au()'
+        exec 'au BufEnter '.bufname.' call s:DoSetupAndSplit_au()'
+        au WinLeave * call s:RecordPrevBuffer_au()
+        " >>>
+        setlocal buflisted
+        let g:proj_running = bufnr(bufname.'\>')
+        if g:proj_running == -1
+            call confirm('Project/Vim error. Please Enter :Project again and report this bug.', "&OK", 1)
+            unlet g:proj_running
+        endif
+        setlocal nobuflisted
+    endif
+endfunction " >>>
+
+if exists(':Project') != 2
+    command -nargs=? -complete=file Project call <SID>Project('<args>')
+endif
+" Toggle Mapping
+if !exists("*<SID>DoToggleProject()") "<<<
+    function! s:DoToggleProject()
+        if !exists('g:proj_running') || bufwinnr(g:proj_running) == -1
+            Project
+        else
+            let g:proj_mywindow = winnr()
+            Project
+            hide
+            if(winnr() != g:proj_mywindow)
+                wincmd p
+            endif
+            unlet g:proj_mywindow
+        endif
+    endfunction
+endif ">>>
+nnoremap <script> <Plug>ToggleProject :call <SID>DoToggleProject()<CR>
+if exists('g:proj_flags') && (match(g:proj_flags, '\Cg') != -1)
+    if !hasmapto('<Plug>ToggleProject')
+        nmap <silent> <F12> <Plug>ToggleProject
+    endif
+endif
+
+finish
+
+" vim600: set foldmethod=marker foldmarker=<<<,>>> foldlevel=1:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/.vim/plugin/textformat.vim	Tue May 03 08:57:01 2011 +0200
@@ -0,0 +1,66 @@
+" Text formatter plugin for Vim text editor
+"
+" Version:              2.1
+" Last Change:          2008-09-13
+" Maintainer:           Teemu Likonen <tlikonen@iki.fi>
+" License:              This file is placed in the public domain.
+" GetLatestVimScripts:  2324 1 :AutoInstall: TextFormat
+
+"{{{1 The beginning stuff
+if &compatible || exists('g:loaded_textformat')
+	finish
+endif
+let s:save_cpo = &cpo
+set cpo&vim
+"}}}1
+
+if v:version < 700
+	echohl ErrorMsg
+	echomsg 'TextFormat plugin needs Vim version 7.0 or later. Sorry.'
+	echohl None
+	finish
+endif
+
+if !exists(':AlignLeft')
+	command -nargs=? -range AlignLeft <line1>,<line2>call textformat#Align_Command('left',<args>)
+endif
+if !exists(':AlignRight')
+	command -nargs=? -range AlignRight <line1>,<line2>call textformat#Align_Command('right',<args>)
+endif
+if !exists(':AlignJustify')
+	command -nargs=? -range AlignJustify <line1>,<line2>call textformat#Align_Command('justify',<args>)
+endif
+if !exists(':AlignCenter')
+	command -nargs=? -range AlignCenter <line1>,<line2>call textformat#Align_Command('center',<args>)
+endif
+
+nnoremap <silent> <Plug>Quick_Align_Paragraph_Left :call textformat#Quick_Align_Left()<CR>
+nnoremap <silent> <Plug>Quick_Align_Paragraph_Right :call textformat#Quick_Align_Right()<CR>
+nnoremap <silent> <Plug>Quick_Align_Paragraph_Justify :call textformat#Quick_Align_Justify()<CR>
+nnoremap <silent> <Plug>Quick_Align_Paragraph_Center :call textformat#Quick_Align_Center()<CR>
+
+vnoremap <silent> <Plug>Align_Range_Left :call textformat#Visual_Align_Left()<CR>
+vnoremap <silent> <Plug>Align_Range_Right :call textformat#Visual_Align_Right()<CR>
+vnoremap <silent> <Plug>Align_Range_Justify :call textformat#Visual_Align_Justify()<CR>
+vnoremap <silent> <Plug>Align_Range_Center :call textformat#Visual_Align_Center()<CR>
+
+function! s:Add_Mapping(mode, lhs, rhs)
+	if maparg(a:lhs, a:mode) == '' && !hasmapto(a:rhs, a:mode)
+		execute a:mode.'map '.a:lhs.' '.a:rhs
+	endif
+endfunction
+
+call s:Add_Mapping('n', '<Leader>al', '<Plug>Quick_Align_Paragraph_Left')
+call s:Add_Mapping('n', '<Leader>ar', '<Plug>Quick_Align_Paragraph_Right')
+call s:Add_Mapping('n', '<Leader>aj', '<Plug>Quick_Align_Paragraph_Justify')
+call s:Add_Mapping('n', '<Leader>ac', '<Plug>Quick_Align_Paragraph_Center')
+
+call s:Add_Mapping('v', '<Leader>al', '<Plug>Align_Range_Left')
+call s:Add_Mapping('v', '<Leader>ar', '<Plug>Align_Range_Right')
+call s:Add_Mapping('v', '<Leader>aj', '<Plug>Align_Range_Justify')
+call s:Add_Mapping('v', '<Leader>ac', '<Plug>Align_Range_Center')
+
+delfunction s:Add_Mapping
+let g:loaded_textformat = 1
+let &cpo = s:save_cpo
+" vim600: fdm=marker
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/config/.vim/syntax/scala.vim	Tue May 03 08:57:01 2011 +0200
@@ -0,0 +1,153 @@
+" Vim syntax file
+" Language   : Scala (http://scala-lang.org/)
+" Maintainers: Stefan Matthias Aust, Julien Wetterwald
+" Last Change: 2007 June 13
+" Revision   : $Id: scala.vim 15234 2008-05-29 21:54:59Z stepancheg $
+"        $URL: https://lampsvn.epfl.ch/svn-repos/scala/scala-tool-support/trunk/src/vim/syntax/scala.vim $
+
+if version < 600
+  syntax clear
+elseif exists("b:current_syntax")
+  finish
+endif
+
+syn case match
+syn sync minlines=50
+
+" most Scala keywords
+syn keyword scalaKeyword abstract case catch do else extends final finally for forSome if implicit lazy match new null override private protected requires return sealed super this throw try type while with yield
+syn match scalaKeyword "=>"
+syn match scalaKeyword "<-"
+syn match scalaKeyword "_"
+
+syn match scalaOperator ":\{2,\}" "this is not a type
+
+" package and import statements
+syn keyword scalaPackage package nextgroup=scalaFqn skipwhite
+syn keyword scalaImport import nextgroup=scalaFqn skipwhite
+syn match scalaFqn "\<[._$a-zA-Z0-9,]*" contained nextgroup=scalaFqnSet
+syn region scalaFqnSet start="{" end="}" contained
+
+" boolean literals
+syn keyword scalaBoolean true false
+
+" definitions
+syn keyword scalaDef def nextgroup=scalaDefName skipwhite
+syn keyword scalaVal val nextgroup=scalaValName skipwhite
+syn keyword scalaVar var nextgroup=scalaVarName skipwhite
+syn keyword scalaClass class nextgroup=scalaClassName skipwhite
+syn keyword scalaObject object nextgroup=scalaClassName skipwhite
+syn keyword scalaTrait trait nextgroup=scalaClassName skipwhite
+syn match scalaDefName "[^ =:;([]\+" contained nextgroup=scalaDefSpecializer skipwhite
+syn match scalaValName "[^ =:;([]\+" contained
+syn match scalaVarName "[^ =:;([]\+" contained 
+syn match scalaClassName "[^ =:;(\[]\+" contained nextgroup=scalaClassSpecializer skipwhite
+syn region scalaDefSpecializer start="\[" end="\]" contained contains=scalaDefSpecializer
+syn region scalaClassSpecializer start="\[" end="\]" contained contains=scalaClassSpecializer
+
+" type constructor (actually anything with an uppercase letter)
+syn match scalaConstructor "\<[A-Z][_$a-zA-Z0-9]*\>" nextgroup=scalaConstructorSpecializer
+syn region scalaConstructorSpecializer start="\[" end="\]" contained contains=scalaConstructorSpecializer
+
+" method call
+syn match scalaRoot "\<[a-zA-Z][_$a-zA-Z0-9]*\."me=e-1
+syn match scalaMethodCall "\.[a-z][_$a-zA-Z0-9]*"ms=s+1
+
+" type declarations in val/var/def
+syn match scalaType ":\s*\(=>\s*\)\?[._$a-zA-Z0-9]\+\(\[[^]]*\]\+\)\?\(\s*\(<:\|>:\|#\|=>\)\s*[._$a-zA-Z0-9]\+\(\[[^]]*\]\+\)*\)*"ms=s+1
+
+" comments
+syn match scalaTodo "[tT][oO][dD][oO]" contained
+syn match scalaLineComment "//.*" contains=scalaTodo
+syn region scalaComment start="/\*" end="\*/" contains=scalaTodo
+syn case ignore
+syn include @scalaHtml syntax/html.vim
+unlet b:current_syntax
+syn case match
+syn region scalaDocComment start="/\*\*" end="\*/" contains=scalaDocTags,scalaTodo,@scalaHtml keepend
+syn region scalaDocTags start="{@\(link\|linkplain\|inherit[Dd]oc\|doc[rR]oot\|value\)" end="}" contained
+syn match scalaDocTags "@[a-z]\+" contained
+
+syn match scalaEmptyString "\"\""
+
+" multi-line string literals
+syn region scalaMultiLineString start="\"\"\"" end="\"\"\"" contains=scalaUnicode
+syn match scalaUnicode "\\u[0-9a-fA-F]\{4}" contained
+
+" string literals with escapes
+syn region scalaString start="\"[^"]" skip="\\\"" end="\"" contains=scalaStringEscape " TODO end \n or not?
+syn match scalaStringEscape "\\u[0-9a-fA-F]\{4}" contained
+syn match scalaStringEscape "\\[nrfvb\\\"]" contained
+
+" symbol and character literals
+syn match scalaSymbol "'[_a-zA-Z0-9][_a-zA-Z0-9]*\>"
+syn match scalaChar "'[^'\\]'\|'\\.'\|'\\u[0-9a-fA-F]\{4}'"
+
+" number literals
+syn match scalaNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>"
+syn match scalaNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\="
+syn match scalaNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>"
+syn match scalaNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>"
+
+" xml literals
+syn match scalaXmlTag "<[a-zA-Z]\_[^>]*/>" contains=scalaXmlQuote,scalaXmlEscape,scalaXmlString
+syn region scalaXmlString start="\"" end="\"" contained
+syn match scalaXmlStart "<[a-zA-Z]\_[^>]*>" contained contains=scalaXmlQuote,scalaXmlEscape,scalaXmlString
+syn region scalaXml start="<\([a-zA-Z]\_[^>]*\_[^/]\|[a-zA-Z]\)>" matchgroup=scalaXmlStart end="</\_[^>]\+>" contains=scalaXmlEscape,scalaXmlQuote,scalaXml,scalaXmlStart,scalaXmlComment
+syn region scalaXmlEscape matchgroup=scalaXmlEscapeSpecial start="{" matchgroup=scalaXmlEscapeSpecial end="}" contained contains=TOP
+syn match scalaXmlQuote "&[^;]\+;" contained
+syn match scalaXmlComment "<!--\_[^>]*-->" contained
+
+syn sync fromstart
+
+" map Scala groups to standard groups
+hi link scalaKeyword Keyword
+hi link scalaPackage Include
+hi link scalaImport Include
+hi link scalaBoolean Boolean
+hi link scalaOperator Normal
+hi link scalaNumber Number
+hi link scalaEmptyString String
+hi link scalaString String
+hi link scalaChar String
+hi link scalaMultiLineString String
+hi link scalaStringEscape Special
+hi link scalaSymbol Special
+hi link scalaUnicode Special
+hi link scalaComment Comment
+hi link scalaLineComment Comment
+hi link scalaDocComment Comment
+hi link scalaDocTags Special
+hi link scalaTodo Todo
+hi link scalaType Type
+hi link scalaTypeSpecializer scalaType
+hi link scalaXml String
+hi link scalaXmlTag Include
+hi link scalaXmlString String
+hi link scalaXmlStart Include
+hi link scalaXmlEscape Normal
+hi link scalaXmlEscapeSpecial Special
+hi link scalaXmlQuote Special
+hi link scalaXmlComment Comment
+hi link scalaDef Keyword
+hi link scalaVar Keyword
+hi link scalaVal Keyword
+hi link scalaClass Keyword
+hi link scalaObject Keyword
+hi link scalaTrait Keyword
+hi link scalaDefName Function
+hi link scalaDefSpecializer Function
+hi link scalaClassName Special
+hi link scalaClassSpecializer Special
+hi link scalaConstructor Special
+hi link scalaConstructorSpecializer scalaConstructor
+
+let b:current_syntax = "scala"
+
+" you might like to put these lines in your .vimrc
+"
+" customize colors a little bit (should be a different file)
+" hi scalaNew gui=underline
+" hi scalaMethodCall gui=italic
+" hi scalaValName gui=underline
+" hi scalaVarName gui=underline