Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

first commit

  • Loading branch information...
commit 269930faa967fe8f393e7cdf1ea8ea8eb4351a8c 0 parents
@kenguest authored
Showing with 26,135 additions and 0 deletions.
  1. BIN  .README.un~
  2. BIN  .vimrc.un~
  3. +5 −0 README
  4. +11 −0 after/plugin/general.vim
  5. +5,148 −0 autoload/phpcomplete.vim
  6. +5 −0 backup/README~
  7. +311 −0 backup/vimrc~
  8. +75 −0 colors/darktango.vim
  9. +171 −0 colors/kib_darktango.vim
  10. +71 −0 colors/tango-morning.vim
  11. +78 −0 colors/tango.vim
  12. +100 −0 colors/two2tango.vim
  13. +930 −0 cvscommand.vim
  14. +404 −0 doc/matchit.txt
  15. +324 −0 doc/tSkeleton.txt
  16. +155 −0 doc/tags
  17. +814 −0 doc/vcscommand.txt
  18. +22 −0 drophyphen.vim
  19. +288 −0 etc/tSkeleton.lst
  20. +12 −0 filetype.vim
  21. +1 −0  ftdetect/txt.vim
  22. +23 −0 ftplugin/Wikipedia.vim
  23. +19 −0 ftplugin/bash.vim
  24. +85 −0 ftplugin/c.vim
  25. +7 −0 ftplugin/cc.vim
  26. +7 −0 ftplugin/cpp.vim
  27. +68 −0 ftplugin/cs.vim
  28. +1 −0  ftplugin/css.vim
  29. +75 −0 ftplugin/java.vim
  30. +59 −0 ftplugin/javascript.vim
  31. +225 −0 ftplugin/php.old.vim
  32. +259 −0 ftplugin/php.vim
  33. +355 −0 ftplugin/python.old.vim
  34. +25 −0 ftplugin/python.vim
  35. +8 −0 ftplugin/rtf.vim
  36. +19 −0 ftplugin/sh.vim
  37. +23 −0 ftplugin/sql.vim
  38. +4 −0 ftplugin/tex.vim
  39. +2 −0  ftplugin/tmp.vim
  40. +1 −0  ftplugin/txt.vim
  41. +20 −0 ftplugin/vb.vim
  42. +3,133 −0 funclist.txt
  43. +311 −0 info.vim
  44. +155 −0 jsl.conf
  45. +811 −0 mysql.txt
  46. +4 −0 mysql.vim
  47. +3 −0  overrides.vim
  48. +509 −0 php-doc.vim
  49. +1 −0  php_dump.txt
  50. +9 −0 phpdocheader.txt
  51. +67 −0 plugin/EncodeURL.vim
  52. +810 −0 plugin/matchit.vim
  53. +1,555 −0 plugin/tSkeleton.vim
  54. +1,292 −0 plugin/vcscommand.vim
  55. +441 −0 plugin/vcscvs.vim
  56. +258 −0 plugin/vcsgit.vim
  57. +262 −0 plugin/vcssvk.vim
  58. +288 −0 plugin/vcssvn.vim
  59. +664 −0 postgresql.txt
  60. +48 −0 python.vim
  61. +4 −0 screen.vim
  62. +2,866 −0 scripts/genutils.vim
  63. +1,527 −0 scripts/multvals.vim
  64. +7 −0 skeleton.php
  65. +11 −0 skeleton.txt
  66. +20 −0 skeletons/bits.samples/bib/@article
  67. +24 −0 skeletons/bits.samples/bib/@book
  68. +22 −0 skeletons/bits.samples/bib/@book_collection
  69. +16 −0 skeletons/bits.samples/bib/@conference
  70. +25 −0 skeletons/bits.samples/bib/@inbook
  71. +16 −0 skeletons/bits.samples/bib/@incollection
  72. +16 −0 skeletons/bits.samples/bib/@inproceedings
  73. +19 −0 skeletons/bits.samples/bib/@manual
  74. +19 −0 skeletons/bits.samples/bib/@masterthesis
  75. +17 −0 skeletons/bits.samples/bib/@misc
  76. +19 −0 skeletons/bits.samples/bib/@phdthesis
  77. +22 −0 skeletons/bits.samples/bib/@proceedings
  78. +20 −0 skeletons/bits.samples/bib/@techreport
  79. +17 −0 skeletons/bits.samples/bib/@unpublished
  80. +1 −0  skeletons/bits.samples/bib/Fields.abstract
  81. +1 −0  skeletons/bits.samples/bib/Fields.address
  82. +1 −0  skeletons/bits.samples/bib/Fields.annote
  83. +1 −0  skeletons/bits.samples/bib/Fields.author
  84. +18 −0 skeletons/bits.samples/bib/Fields.booklet
  85. +1 −0  skeletons/bits.samples/bib/Fields.booktitle
  86. +1 −0  skeletons/bits.samples/bib/Fields.chapter
  87. +1 −0  skeletons/bits.samples/bib/Fields.crossref
  88. +1 −0  skeletons/bits.samples/bib/Fields.edition
  89. +1 −0  skeletons/bits.samples/bib/Fields.editor
  90. +1 −0  skeletons/bits.samples/bib/Fields.howpublished
  91. +1 −0  skeletons/bits.samples/bib/Fields.institution
  92. +1 −0  skeletons/bits.samples/bib/Fields.journal
  93. +1 −0  skeletons/bits.samples/bib/Fields.key
  94. +1 −0  skeletons/bits.samples/bib/Fields.keywords
  95. +1 −0  skeletons/bits.samples/bib/Fields.month
  96. +1 −0  skeletons/bits.samples/bib/Fields.note
  97. +1 −0  skeletons/bits.samples/bib/Fields.number
  98. +1 −0  skeletons/bits.samples/bib/Fields.organization
  99. +1 −0  skeletons/bits.samples/bib/Fields.pages
  100. +1 −0  skeletons/bits.samples/bib/Fields.publisher
  101. +1 −0  skeletons/bits.samples/bib/Fields.school
  102. +1 −0  skeletons/bits.samples/bib/Fields.series
  103. +8 −0 skeletons/bits.samples/bib/Fields.standardEntries
  104. +1 −0  skeletons/bits.samples/bib/Fields.title
  105. +1 −0  skeletons/bits.samples/bib/Fields.type
  106. +1 −0  skeletons/bits.samples/bib/Fields.url
  107. +1 −0  skeletons/bits.samples/bib/Fields.volume
  108. +1 −0  skeletons/bits.samples/bib/Fields.year
  109. +1 −0  skeletons/bits.samples/css/background
  110. +1 −0  skeletons/bits.samples/css/border-bottom
  111. +1 −0  skeletons/bits.samples/css/border-left
  112. +1 −0  skeletons/bits.samples/css/border-right
  113. +1 −0  skeletons/bits.samples/css/border-spacing
  114. +1 −0  skeletons/bits.samples/css/border-top
  115. +4 −0 skeletons/bits.samples/css/entry
  116. +1 −0  skeletons/bits.samples/css/font-size
  117. +1 −0  skeletons/bits.samples/css/text-align
  118. +1 −0  skeletons/bits.samples/general/date
  119. +10 −0 skeletons/bits.samples/general/header
  120. +6 −0 skeletons/bits.samples/general/localvariables
  121. +28 −0 skeletons/bits.samples/general/test_tSkeleton
  122. +1 −0  skeletons/bits.samples/general/time
  123. +4 −0 skeletons/bits.samples/html.txt
  124. +1 −0  skeletons/bits.samples/html/&a.&href
  125. +1 −0  skeletons/bits.samples/html/&attribute.action=
  126. +1 −0  skeletons/bits.samples/html/&attribute.method=
  127. +1 −0  skeletons/bits.samples/html/&attribute.name=
  128. +10 −0 skeletons/bits.samples/html/&form.%3C&form
  129. +1 −0  skeletons/bits.samples/html/&form.&checkbox
  130. +4 −0 skeletons/bits.samples/html/&form.&clickbutton
  131. +1 −0  skeletons/bits.samples/html/&form.&option
  132. +1 −0  skeletons/bits.samples/html/&form.&radio
  133. +1 −0  skeletons/bits.samples/html/&form.&reset
  134. +14 −0 skeletons/bits.samples/html/&form.&select
  135. +1 −0  skeletons/bits.samples/html/&form.&submit
  136. +1 −0  skeletons/bits.samples/html/&form.&text
  137. +3 −0  skeletons/bits.samples/html/&head.html&401
  138. +7 −0 skeletons/bits.samples/html/tag
  139. +1 −0  skeletons/bits.samples/php/@.@&param
  140. +1 −0  skeletons/bits.samples/php/@.@&return
  141. +3 −0  skeletons/bits.samples/php/case
  142. +19 −0 skeletons/bits.samples/php/class
  143. +1 −0  skeletons/bits.samples/php/define
  144. +3 −0  skeletons/bits.samples/php/dowhile
  145. +1 −0  skeletons/bits.samples/php/elseif
  146. +12 −0 skeletons/bits.samples/php/for
  147. +12 −0 skeletons/bits.samples/php/for-
  148. +3 −0  skeletons/bits.samples/php/forall
  149. +3 −0  skeletons/bits.samples/php/foreach
  150. +3 −0  skeletons/bits.samples/php/foreach_assoc
  151. +6 −0 skeletons/bits.samples/php/function
  152. +5 −0 skeletons/bits.samples/php/ifelse
  153. +1 −0  skeletons/bits.samples/php/php
  154. +1 −0  skeletons/bits.samples/php/preg_replace
  155. +7 −0 skeletons/bits.samples/php/switch
  156. +6 −0 skeletons/bits.samples/php/var
  157. +1 −0  skeletons/bits.samples/php/var_export
  158. +3 −0  skeletons/bits.samples/php/while
  159. +3 −0  skeletons/bits.samples/ruby/&begin.&begin
  160. +4 −0 skeletons/bits.samples/ruby/&begin.begin_&ensure
  161. +5 −0 skeletons/bits.samples/ruby/&begin.begin_&rescue
  162. +3 −0  skeletons/bits.samples/ruby/&begin.begin_&while
  163. +7 −0 skeletons/bits.samples/ruby/case
  164. +3 −0  skeletons/bits.samples/ruby/catch
  165. +12 −0 skeletons/bits.samples/ruby/class
  166. +1 −0  skeletons/bits.samples/ruby/collect.&collect
  167. +3 −0  skeletons/bits.samples/ruby/collect.collect_&do
  168. +3 −0  skeletons/bits.samples/ruby/def
  169. +1 −0  skeletons/bits.samples/ruby/each.&each
  170. +3 −0  skeletons/bits.samples/ruby/each.each_&do
  171. +2 −0  skeletons/bits.samples/ruby/ensure
  172. +3 −0  skeletons/bits.samples/ruby/for
  173. BIN  skeletons/bits.samples/ruby/if
  174. +5 −0 skeletons/bits.samples/ruby/module.module
  175. +1 −0  skeletons/bits.samples/ruby/module.wrapper
  176. +2 −0  skeletons/bits.samples/ruby/rescue
  177. +1 −0  skeletons/bits.samples/ruby/shebang
  178. +3 −0  skeletons/bits.samples/ruby/until
  179. +2 −0  skeletons/bits.samples/ruby/when
  180. +3 −0  skeletons/bits.samples/ruby/while
  181. +3 −0  skeletons/bits.samples/tex/%5Cfootnote
  182. +1 −0  skeletons/bits.samples/tex/%5Citem
  183. +1 −0  skeletons/bits.samples/tex/%5Citem[]
  184. +1 −0  skeletons/bits.samples/tex/%5Cmulticolumn
  185. +3 −0  skeletons/bits.samples/tex/%5Cparagraph
  186. +3 −0  skeletons/bits.samples/tex/%5Csection
  187. +3 −0  skeletons/bits.samples/tex/%5Csub&paragraph
  188. +3 −0  skeletons/bits.samples/tex/%5Csubsection
  189. +3 −0  skeletons/bits.samples/tex/%5Csubsubsection
  190. +1 −0  skeletons/bits.samples/tex/%5Cusepackage
  191. +10 −0 skeletons/bits.samples/tex/&begin.%5C&begin
  192. +4 −0 skeletons/bits.samples/tex/&begin.&description
  193. +4 −0 skeletons/bits.samples/tex/&begin.&enumerate
  194. +5 −0 skeletons/bits.samples/tex/&begin.&figure
  195. +4 −0 skeletons/bits.samples/tex/&begin.&itemize
  196. +4 −0 skeletons/bits.samples/tex/&begin.&quotation
  197. +4 −0 skeletons/bits.samples/tex/&begin.&quote
  198. +5 −0 skeletons/bits.samples/tex/&begin.&table
  199. +4 −0 skeletons/bits.samples/tex/&begin.&verbatim
  200. +16 −0 skeletons/bits.samples/tex/&begin.tabu&lar
  201. +5 −0 skeletons/bits.samples/tskeleton/tskel_after
  202. +5 −0 skeletons/bits.samples/tskeleton/tskel_before
  203. +5 −0 skeletons/bits.samples/tskeleton/tskel_here_after
  204. +5 −0 skeletons/bits.samples/tskeleton/tskel_here_before
  205. +2 −0  skeletons/bits.samples/viki/Command.%23&ABBREV
  206. +2 −0  skeletons/bits.samples/viki/Command.%23&AUTHOR
  207. +2 −0  skeletons/bits.samples/viki/Command.%23&AUTHORNOTE
  208. +2 −0  skeletons/bits.samples/viki/Command.%23&AUTOIDX
  209. +2 −0  skeletons/bits.samples/viki/Command.%23&BIB
  210. +2 −0  skeletons/bits.samples/viki/Command.%23&CAPTION
  211. +2 −0  skeletons/bits.samples/viki/Command.%23&DONTIDX
  212. +2 −0  skeletons/bits.samples/viki/Command.%23&ELSE
  213. +2 −0  skeletons/bits.samples/viki/Command.%23&ELSEIF
  214. +2 −0  skeletons/bits.samples/viki/Command.%23&GET
  215. +2 −0  skeletons/bits.samples/viki/Command.%23&IDX
  216. +4 −0 skeletons/bits.samples/viki/Command.%23&IF
  217. +2 −0  skeletons/bits.samples/viki/Command.%23&IMG
  218. +2 −0  skeletons/bits.samples/viki/Command.%23&INCLUDE
  219. +2 −0  skeletons/bits.samples/viki/Command.%23&LANG
  220. +8 −0 skeletons/bits.samples/viki/Command.%23&LIST
  221. +2 −0  skeletons/bits.samples/viki/Command.%23&MAKEBIB
  222. +2 −0  skeletons/bits.samples/viki/Command.%23&MAKETITLE
  223. +2 −0  skeletons/bits.samples/viki/Command.%23&MODULE
  224. +2 −0  skeletons/bits.samples/viki/Command.%23&NOIDX
  225. +2 −0  skeletons/bits.samples/viki/Command.%23&OPT
  226. +2 −0  skeletons/bits.samples/viki/Command.%23&PAGE
  227. +2 −0  skeletons/bits.samples/viki/Command.%23&SET
  228. +2 −0  skeletons/bits.samples/viki/Command.%23&TABLE
  229. +2 −0  skeletons/bits.samples/viki/Command.%23&TITLE
  230. +2 −0  skeletons/bits.samples/viki/Command.%23&VAL
  231. +2 −0  skeletons/bits.samples/viki/Command.%23&VAR
  232. +2 −0  skeletons/bits.samples/viki/Command.%23&WITH
  233. +2 −0  skeletons/bits.samples/viki/Command.%23&XVAL
  234. +1 −0  skeletons/bits.samples/viki/Element.Break
  235. +2 −0  skeletons/bits.samples/viki/Heading.h&1
  236. +2 −0  skeletons/bits.samples/viki/Heading.h&2
  237. +2 −0  skeletons/bits.samples/viki/Heading.h&3
  238. +2 −0  skeletons/bits.samples/viki/Heading.h&4
  239. +2 −0  skeletons/bits.samples/viki/Heading.h&5
  240. +2 −0  skeletons/bits.samples/viki/Heading.h&6
  241. +2 −0  skeletons/bits.samples/viki/Heading.h&7
  242. +2 −0  skeletons/bits.samples/viki/Heading.h&8
  243. +2 −0  skeletons/bits.samples/viki/Heading.h&9
  244. +1 −0  skeletons/bits.samples/viki/List.Description
  245. +1 −0  skeletons/bits.samples/viki/List.Ordered
  246. +1 −0  skeletons/bits.samples/viki/List.OrderedAlpha
  247. +1 −0  skeletons/bits.samples/viki/List.Unordered
  248. +1 −0  skeletons/bits.samples/viki/Macro.%7Banchor
  249. +1 −0  skeletons/bits.samples/viki/Macro.%7Battrib
  250. +1 −0  skeletons/bits.samples/viki/Macro.%7Bcite
  251. +1 −0  skeletons/bits.samples/viki/Macro.%7Bcmt
  252. +1 −0  skeletons/bits.samples/viki/Macro.%7Bcode
  253. +7 −0 skeletons/bits.samples/viki/Macro.%7Bdate
  254. +1 −0  skeletons/bits.samples/viki/Macro.%7Bdoc
  255. +1 −0  skeletons/bits.samples/viki/Macro.%7Bem
  256. +1 −0  skeletons/bits.samples/viki/Macro.%7Bfn
  257. +1 −0  skeletons/bits.samples/viki/Macro.%7Bget
  258. +1 −0  skeletons/bits.samples/viki/Macro.%7Bidx
  259. +1 −0  skeletons/bits.samples/viki/Macro.%7Bimg
  260. +1 −0  skeletons/bits.samples/viki/Macro.%7Bins
  261. +1 −0  skeletons/bits.samples/viki/Macro.%7Bitem
  262. +7 −0 skeletons/bits.samples/viki/Macro.%7Blist
  263. +1 −0  skeletons/bits.samples/viki/Macro.%7Bltx
  264. +1 −0  skeletons/bits.samples/viki/Macro.%7Bmath
  265. +1 −0  skeletons/bits.samples/viki/Macro.%7Bnl
  266. +1 −0  skeletons/bits.samples/viki/Macro.%7Bopt
  267. +1 −0  skeletons/bits.samples/viki/Macro.%7Bpagenumber
  268. +1 −0  skeletons/bits.samples/viki/Macro.%7Bplain
  269. +1 −0  skeletons/bits.samples/viki/Macro.%7Bref
  270. +1 −0  skeletons/bits.samples/viki/Macro.%7Bruby
  271. +1 −0  skeletons/bits.samples/viki/Macro.%7Bstacked
  272. +1 −0  skeletons/bits.samples/viki/Macro.%7Bsub
  273. +1 −0  skeletons/bits.samples/viki/Macro.%7Bsuper
  274. +1 −0  skeletons/bits.samples/viki/Macro.%7Bterm
  275. +1 −0  skeletons/bits.samples/viki/Macro.%7Btext
  276. +1 −0  skeletons/bits.samples/viki/Macro.%7Bval
  277. +1 −0  skeletons/bits.samples/viki/Macro.%7Bxval
  278. +1 −0  skeletons/bits.samples/viki/Note.Attention
  279. +1 −0  skeletons/bits.samples/viki/Note.Discuss
  280. +1 −0  skeletons/bits.samples/viki/Note.Elaborate
  281. +1 −0  skeletons/bits.samples/viki/Note.Here
  282. +1 −0  skeletons/bits.samples/viki/Option.!=
  283. +1 −0  skeletons/bits.samples/viki/Option.==
  284. +7 −0 skeletons/bits.samples/viki/Option.context=
  285. +1 −0  skeletons/bits.samples/viki/Option.fmt!=
  286. +1 −0  skeletons/bits.samples/viki/Option.fmt=
  287. +1 −0  skeletons/bits.samples/viki/Option.fmt==
  288. +1 −0  skeletons/bits.samples/viki/Option.id=
  289. +1 −0  skeletons/bits.samples/viki/Option.if!=
  290. +1 −0  skeletons/bits.samples/viki/Option.if==
  291. +4 −0 skeletons/bits.samples/viki/Region.%23&Code
  292. +4 −0 skeletons/bits.samples/viki/Region.%23&Footnote
  293. +4 −0 skeletons/bits.samples/viki/Region.%23&Header
  294. +4 −0 skeletons/bits.samples/viki/Region.%23&Img
  295. +4 −0 skeletons/bits.samples/viki/Region.%23&Ltx
  296. +4 −0 skeletons/bits.samples/viki/Region.%23&Native
  297. +4 −0 skeletons/bits.samples/viki/Region.%23&Quote
  298. +4 −0 skeletons/bits.samples/viki/Region.%23&Set
  299. +4 −0 skeletons/bits.samples/viki/Region.%23&Verb
  300. +4 −0 skeletons/bits.samples/viki/Region.%23Def&Element
Sorry, we could not display the entire diff because too many files (383) changed.
BIN  .README.un~
Binary file not shown
BIN  .vimrc.un~
Binary file not shown
5 README
@@ -0,0 +1,5 @@
+Just create a symbolic link from ~/.vimrc to the vimrc file here.
+
+ ln -s vimrc ~/.vimrc
+
+
11 after/plugin/general.vim
@@ -0,0 +1,11 @@
+"let Tlist_Ctags_Cmd = "/usr/local/bin/ctags-ex"
+let Tlist_Ctags_Cmd = "/usr/bin/etags"
+let Tlist_Inc_Winwidth = 1
+let Tlist_Exit_OnlyWindow = 1
+let Tlist_File_Fold_Auto_Close = 1
+let Tlist_Process_File_Always = 1
+let Tlist_Enable_Fold_Column = 1
+let Tlist_php_settings = 'php;c:class;d:constant;f:function'
+if exists('loaded_taglist')
+ nmap <silent> <F8> :TlistToggle<CR>
+endif
5,148 autoload/phpcomplete.vim
5,148 additions, 0 deletions not shown
5 backup/README~
@@ -0,0 +1,5 @@
+Just create a symbolic link from ~/.vimrc to the vimrc file here.
+
+ ln -s vimrc ~/.vimrc
+
+
311 backup/vimrc~
@@ -0,0 +1,311 @@
+" vim:set et sts=2 sw=2:
+" {{{ Settings
+set nocompatible " I want VIM not vi. B-)
+"show possible completions
+set wildmenu
+" Set command-line completion mode:
+" - on first <Tab>, when more than one match, list all matches and complete
+" the longest common string
+" - on second <Tab>, complete the next full match and show menu
+":set wildmode=longest,list
+set wildmode=list:longest,full
+"Ignore these
+set wildignore=*~,*gz,*.a,*.bmp,*.class,*.flp,*.gif,*.jpg,*.la,*.mo,*.o,*.obj,*.png,*.so,*.swp,*.xpm,.svn,CVS,*.mli,*.cmi,*.cmx
+" map ,f to display all lines with keyword under cursor and ask which one to
+" jump to
+nmap ,f [I:let nr = input("Which one: ")<Bar>exe "normal " . nr ."[\t"<CR>
+set ttyfast
+set backspace=indent,eol,start
+
+set textwidth=79 " wrap at 79 characters
+if version >= 703
+ hi ColorColumn guibg=#101010
+ set colorcolumn=80,120
+endif
+set backup " backups are good
+set backupdir=~/.vim/backup
+set directory=~/tmp/vim
+
+set wrapmargin=1
+set viminfo='20,\"50 " read/write a .viminfo file, don't store more than
+ " 50 lines of registers
+set history=50 " keep 50 lines of command line history
+set autoindent
+set smartindent
+set incsearch " Use incremental searching
+set nohlsearch " don't highlight results of search. I think it's ugly.
+set showcmd " show the command in the status line
+set showmatch " Show matching brackets.
+" Enable CTRL-A/CTRL-X to work on octal and hex numbers, as well as characters
+set nrformats=octal,hex,alpha
+
+" Jump to matching bracket for 2/10th of a second (works with showmatch)
+set matchtime=2
+set laststatus=2 " Always have a status line
+set report=2 " If I've changed more than one...
+set ruler " show the cursor position all the time
+set splitbelow " Put new windows on bottom
+set ttimeout notimeout timeoutlen=100
+set showmode
+set encoding=utf8
+set shell=bash
+"tabs...
+set expandtab
+set tabstop=4
+" Use 4 spaces for (auto)indent
+set shiftwidth=4
+" Don't request terminal version string (for xterm)
+set t_RV=
+" Round indent to multiple of 'shiftwidth' for > and < commands
+set shiftround
+set softtabstop=4
+set nojoinspaces
+" Show line numbers by default
+"set number
+""" Enable folding by fold markers
+""set foldmethod=marker
+" Autoclose folds, when moving out of them
+set foldclose=all
+" Jump 5 lines when running out of the screen
+"set scrolljump=5
+" Indicate jump out of the screen when 3 lines before end of the screen
+"set scrolloff=3
+"also ignore .pyc files...
+set suffixes+=.pyc,.ps
+"shut up and don't flash (no noise; neither audio or visual)
+set vb t_vb=
+"automatically write the current file out when I move on to the next one.
+set autowrite
+set updatecount=50 " write a swapfile every 50 chars
+set updatetime=15000 " or every 15000 milliseconds
+""let me type in vowels with fadas and such.
+"set digraph
+" Where to find tags files for jumping to function definitions.
+set tags=./tags,../tags,../../tags,../../../tags
+" Where to find headers
+set path=.,/usr/include,/usr/X11/include,/usr/local/include,/usr/src/linux/include/
+
+"set cursorline
+"if I have split windows vertically, I want them to be at least 80 chars wide
+"and 10 chars tall when active
+if version >= 600
+ if has("windows")
+ set winwidth=80
+ set winheight=10
+ endif
+endif
+
+if version >= 703
+ set relativenumber
+ set undofile
+endif
+
+"only use the mouse for resizing windows and so on in Normal mode,
+"still want to be able to select/copy/paste text through all open xterms.
+if has("mouse")
+ set mouse=n
+ set mousemodel=popup
+endif
+
+if has("spell")
+ setlocal spell spelllang=en_gb
+ set nospell
+endif
+
+if $TERM=='screen'
+ exe "set title titlestring=vim:%f"
+ exe "set title t_ts=\<ESC>k t_fs=\<ESC>\\"
+endif
+
+
+" }}}
+" {{{ macros
+"macro for uppercasing some SQL built-in functions
+map s :s/select/SELECT/g<CR>:s/from/FROM/g<CR>:s/where/WHERE/g<CR>
+"macro for inserting current time-stamp
+map T "='['.strftime("%c").']'<CR>p
+"....
+map M :%s/modified="\d\d\d\d-\d\d-\d\d"/\="modified=\"".strftime("%Y-%m-%d")."\""<CR>
+" use Q for formatting, not ex-mode:
+map Q gq
+" }}}
+retab
+" Use filetype plugins, e.g. for PHP
+filetype plugin on
+" wordlist contains fixes for my silly tpyos.
+source $HOME/config/vim/wordlist.vim
+" Insert mode completion options
+set completeopt=menu,longest,preview
+" use CTRL-F for omni completion
+imap <C-F> 
+
+"have to toggle syntax for it to use the right colors after changing the
+"background value
+if has("syntax")
+ "syntax off
+ if v:progname =~ "vim.exe"
+ set background=light
+ color darkblue
+ elseif v:progname =~ "gvim"
+ set background=dark
+ color darkblue
+ else
+ set background=dark
+ endif
+ syntax on
+endif
+if &bg == "dark"
+ highlight Comment ctermfg=darkgreen
+ highlight MatchParen ctermbg=blue guibg=blue
+ highlight StatusLine ctermfg=white ctermbg=blue cterm=bold
+ highlight StatusLineNC ctermfg=lightgray ctermbg=black
+endif
+
+set pastetoggle=<F2>
+
+if has("autocmd")
+ if v:progname =~ "vim$"
+ au BufEnter * let &titlestring = $USER . "@" . hostname() . ":$vim %-0.65F"
+ if version >= 600
+ au BufEnter * let &printheader = $USER . "@" . hostname() .
+ \ ": %-0.65F%=Page %N"
+ endif
+ endif
+
+ au BufWrite * call SetStatusLine()
+ au BufRead * call SetStatusLine()
+
+ au BufEnter * set title titlelen=79
+" cron on FreeBSD doesn't like backups being made.
+ au BufEnter crontab.* set nobackup
+ au BufEnter crontab.* set nowritebackup
+ au BufNewFile,BufRead sql* set filetype=sql
+ au BufNewFile,BufRead *.phpt set filetype=php
+ au BufNewFile,BufRead *.py set expandtab
+ au BufNewFile,BufRead *.py set comments=:#
+ au BufNewFile,BufRead *.py source ~/config/vim/python.vim
+ au BufNewFile,BufRead *.mail set syntax=mail
+ au BufNewFile,BufRead *.vim set foldmethod=marker
+ au BufNewFile,BufRead *.vim set nospell
+ autocmd BufNewFile ~/.vim/skeletons/*.suffix TSkeletonSetup othertemplate.suffix
+ autocmd BufNewFile *.suffix TSkeletonSetup template.suffix
+
+ " Automatically chmod +x Shell and Perl scripts
+ au BufWritePost *.sh !chmod +x %
+ au BufWritePost *.pl !chmod +x %
+
+ augroup encrypted
+ au!
+
+ " First make sure nothing is written to ~/.viminfo while editing
+ " an encrypted file.
+ autocmd BufReadPre,FileReadPre *.gpg set viminfo=
+ " We don't want a swap file, as it writes unencrypted data to disk
+ autocmd BufReadPre,FileReadPre *.gpg set noswapfile
+ " Switch to binary mode to read the encrypted file
+ autocmd BufReadPre,FileReadPre *.gpg set bin
+ autocmd BufReadPre,FileReadPre *.gpg let ch_save = &ch|set ch=2
+ autocmd BufReadPre,FileReadPre *.gpg let shsave=&sh
+ autocmd BufReadPre,FileReadPre *.gpg let &sh='sh'
+ autocmd BufReadPre,FileReadPre *.gpg let ch_save = &ch|set ch=2
+ autocmd BufReadPost,FileReadPost *.gpg '[,']!gpg --decrypt --default-recipient-self 2> /dev/null
+ autocmd BufReadPost,FileReadPost *.gpg let &sh=shsave
+
+ " Switch to normal mode for editing
+ autocmd BufReadPost,FileReadPost *.gpg set nobin
+ autocmd BufReadPost,FileReadPost *.gpg let &ch = ch_save|unlet ch_save
+ autocmd BufReadPost,FileReadPost *.gpg execute ":doautocmd BufReadPost " . expand("%:r")
+
+ " Convert all text to encrypted text before writing
+ autocmd BufWritePre,FileWritePre *.gpg set bin
+ autocmd BufWritePre,FileWritePre *.gpg let shsave=&sh
+ autocmd BufWritePre,FileWritePre *.gpg let &sh='sh'
+ autocmd BufWritePre,FileWritePre *.gpg '[,']!gpg --encrypt --default-recipient-self 2>/dev/null
+ autocmd BufWritePre,FileWritePre *.gpg let &sh=shsave
+
+ " Undo the encryption so we are back in the normal text, directly
+ " after the file has been written.
+ autocmd BufWritePost,FileWritePost *.gpg silent u
+ autocmd BufWritePost,FileWritePost *.gpg set nobin
+ augroup END
+
+endif
+"{{{ <home> toggles between start of line and start of text
+"<home> toggles between start of line and start of text
+imap <khome> <home>
+nmap <khome> <home>
+inoremap <silent> <home> <C-O>:call Home()<CR>
+nnoremap <silent> <home> :call Home()<CR>
+function Home()
+ let curcol = wincol()
+ normal ^
+ let newcol = wincol()
+ if newcol == curcol
+ normal 0
+ endif
+endfunction
+"}}}
+"{{{<end> goes to end of screen before end of line
+imap <kend> <end>
+nmap <kend> <end>
+inoremap <silent> <end> <C-O>:call End()<CR>
+nnoremap <silent> <end> :call End()<CR>
+function End()
+ let curcol = wincol()
+ normal g$
+ let newcol = wincol()
+ if newcol == curcol
+ normal $
+ endif
+ "The following is to work around issue for insert mode only.
+ "normal g$ doesn't go to pos after last char when appropriate.
+ "More details and patch here:
+ "http://www.pixelbeat.org/patches/vim-7.0023-eol.diff
+ if virtcol(".") == virtcol("$") - 1
+ normal $
+ endif
+endfunction
+
+"}}}
+"make F10 call make for linting etc.
+inoremap <silent> <F10> <C-O>:make<CR>
+map <silent> <F10> :make<CR>
+"F5 toggles spell check
+inoremap <silent> <F5> <C-O>:call SpellToggle()<CR>
+map <silent> <F5> :call SpellToggle()<CR>
+function SpellToggle()
+ if &spell == 1
+ set nospell
+ else
+ set spell
+ endif
+endfunction
+
+" {{{ GenUtils
+"genutils is dependant on multvals so the order they are loaded in is important
+source $HOME/config/vim/scripts/multvals.vim
+source $HOME/config/vim/scripts/genutils.vim
+let tskelUserName='Ken Guest'
+let tskelUserEmail='ken@guest.cx'
+source $HOME/config/vim/overrides.vim
+" }}}
+highlight Comment ctermfg=darkgreen
+"highlight StatusLine ctermfg=yellow ctermbg=red cterm=bold
+highlight StatusLineNC ctermfg=lightgray ctermbg=blue
+let g:netrw_ftp_cmd="ftp -p"
+
+function! SetStatusLine()
+ set statusline=[%n]\ %f\ %(\ \ (%M%R%H)%)\ \ \ %=\t%{ShowTab()}\ \ \ Modified:\ %{Time()}\ \ [%3l:%3L,%2c]\ %p%%\
+endfunction
+
+function! Time()
+ return strftime("%c", getftime(bufname("%")))
+endfunction
+
+function! ShowTab()
+ let TabLevel = (indent('.') / &ts )
+ if TabLevel == 0
+ let TabLevel='*'
+ endif
+ return TabLevel
+endfunction
75 colors/darktango.vim
@@ -0,0 +1,75 @@
+" Vim color file
+" Name: DarkTango
+" Maintainer: Panos Laganakos <panos.laganakos@gmail.com>
+" Version: 0.3
+
+
+set background=dark
+if version > 580
+ " no guarantees for version 5.8 and below, but this makes it stop
+ " complaining
+ hi clear
+ if exists("syntax_on")
+ syntax reset
+ endif
+endif
+
+let g:colors_name="darktango"
+
+hi Normal guibg=#2e3436 guifg=#d3d7cf
+
+" {{{ syntax
+hi Comment guifg=#555753
+hi Title guifg=#eeeeec
+hi Underlined guifg=#20b0eF gui=none
+hi Statement guifg=#888a85
+hi Type guifg=#ce5c00
+hi PreProc guifg=#eeeeec
+hi Constant guifg=#babdb6
+hi Identifier guifg=#ce5c00
+hi Special guifg=#eeeeec
+hi Ignore guifg=#f57900
+hi Todo guibg=#ce5c00 guifg=#eeeeec
+"hi Error
+"}}}
+
+" {{{ groups
+hi Cursor guibg=#babdb6 guifg=#2e3436
+"hi CursorIM
+hi Directory guifg=#bbd0df
+"hi DiffAdd
+"hi DiffChange
+"hi DiffDelete
+"hi DiffText
+"hi ErrorMsg
+hi VertSplit guibg=#555753 guifg=#2e3436 gui=none
+hi Folded guibg=#555753 guifg=#eeeeec
+hi FoldColumn guibg=#2e3436 guifg=#555753
+hi LineNr guibg=#2e3436 guifg=#555753
+hi MatchParen guibg=#babdb6 guifg=#2e3436
+hi ModeMsg guifg=#ce5c00
+hi MoreMsg guifg=#ce5c00
+hi NonText guibg=#2e3436 guifg=#555753
+hi Question guifg=#aabbcc
+hi Search guibg=#fce94f guifg=#c4a000
+hi IncSearch guibg=#c4a000 guifg=#fce94f
+hi SpecialKey guifg=#ce5c00
+hi StatusLine guibg=#555753 guifg=#eeeeec gui=none
+hi StatusLineNC guibg=#555753 guifg=#272334 gui=none
+hi Visual guibg=#fcaf3e guifg=#ce5c00
+"hi VisualNOS
+hi WarningMsg guifg=salmon
+"hi WildMenu
+"hi Menu
+"hi Scrollbar guibg=grey30 guifg=tan
+"hi Tooltip
+hi Pmenu guibg=#babdb6 guifg=#555753
+hi PmenuSel guibg=#eeeeec guifg=#2e3436
+hi CursorLine guibg=#212628
+" }}}
+
+" {{{ terminal
+" TODO
+" }}}
+
+"vim: sw=4
171 colors/kib_darktango.vim
@@ -0,0 +1,171 @@
+" Vim color file
+" Name: kib_darktango
+" Maintainer: Kib² <kib2@free.fr>
+" Version: 0.3
+" Last Time Modified: 01.01.2007
+
+" Couleur du fond d'ecran
+set background=dark
+if version > 580
+ " Pas de versions inferieures a la 5.80, mais cela
+ " fait en sorte que Vim ne se plaint pas
+ hi clear
+ if exists("syntax_on")
+ syntax reset
+ endif
+endif
+
+let g:colors_name="kib_darktango"
+
+" To help you visit this page : http://www.vim.org/htmldoc/syntax.html#tag-highlight
+
+" ======================================================
+" ==================================== normal Mode:
+" ======================================================
+" {{{ syntax
+
+
+" ==== Some constants :
+
+" Normal : foreground and background
+hi Normal guibg=#2e3436 guifg=#d3d7cf
+" ==== Titles : ?
+hi Title guifg=#4e9a06
+
+
+" ==== Comments : any comment
+hi Comment guifg=#edd400 " any comment
+
+" ===== Constants :
+hi Constants guifg=#e9b96e " any constant
+hi String guifg=#729fcf " a string constant: "this is a string"
+hi Character guifg=#3465a4 " a character constant: 'c', '\n'
+hi Number guifg=#e9b96e " a number constant: 234, 0xff
+hi Boolean guifg=#c1c144 " a boolean constant: TRUE, false
+hi Float guifg=#c1c144 " a floating point constant: 2.3e10
+
+" ===== Identifier : any variable name
+hi Identifier guifg=#f57900 " function name (also: methods for classes)
+
+" ===== Statements : Les mots cles de chaque language
+hi Statement guifg=#729fcf " par défaut
+hi Conditional guifg=#4e9a06 " if, then, else, endif, switch, etc.
+hi Repeat guifg=#73d216 " boucles for, do, while, etc.
+hi Label guifg=#8ae234 " case, default, etc.
+hi Operator guifg=#fcaf3e " "sizeof", "+", "*", etc.
+hi Keyword guifg=#f57900 " any other keyword
+hi Exception guifg=#ce5c00 " try, catch, throw
+
+" ==== PreProc : generic Preprocessor
+hi PreProc guifg=#eeeeec " generic Preprocessor
+hi Include guifg=#eeeeec " preprocessor #include
+hi Define guifg=#eeeeec " preprocessor #define
+hi Macro guifg=#eeeeec " same as Define
+hi PreCondit guifg=#eeeeec " preprocessor #if, #else, #endif, etc.
+
+" ==== Types : int, long, char, etc.
+hi Type guifg=#ffffff " int, long, char, etc.
+hi StorageClass guifg=#ffffff " static, register, volatile, etc.
+hi Structure guifg=#ffffff " struct, union, enum, etc.
+hi Typedef guifg=#ffffff " A typedef
+
+" ==== Special : any special symbol
+hi Special guifg=#eeeeec " any special symbol
+hi SpecialChar guifg=#eeeeec " special character in a constant
+hi Tag guifg=#eeeeec " you can use CTRL-] on this
+hi Delimiter guifg=#eeeeec " character that needs attention
+hi SpecialComment guifg=#eeeeec " special things inside a comment
+hi Debug guifg=#eeeeec " debugging statements
+
+" ==== Underlined : text that stands out, liens HTML
+hi Underlined guifg=#20b0eF gui=none
+
+" ==== Ignore :
+hi Ignore guifg=#f57900 " left blank, hidden
+
+" ==== Error : any erroneous construct
+hi Error guifg=#f57900 "
+
+" ==== Todo :
+hi Todo guibg=#ce5c00 guifg=#eeeeec " keywords TODO FIXME and XXX
+
+" ======================================================
+" ==================================== End Normal mode
+" ======================================================
+
+" ======================================================
+" ==================================== Start Python Mode:
+" ======================================================
+
+" pythonStatement:
+hi pythonStatement guifg=#729fcf
+" pythonRepeat:
+hi pythonRepeat guifg=#8ae234
+" pythonConditional:
+hi pythonConditional guifg=#73d216
+" pythonPrecondit:
+hi pythonPrecondit guifg=#ef2929
+" pythonOperator:
+hi pythonOperator guifg=#ad7fa8
+" pythonComment:
+hi pythonComment guifg=#edd400
+" pythonEscape:
+hi pythonEscape guifg=#3465a4
+" pythonRawString:
+hi pythonRawString guifg=#ad9361
+" pythonBuiltin:
+hi pythonBuiltin guifg=#729fcf
+" pythonException:
+hi pythonException guifg=#cc0000
+" pythonFunction:
+" pythonTodo:
+" pythonDecorator:
+" pythonString:
+" pythonNumber:
+" pythonSpaceError:
+" pythonSync:
+
+" ======================================================
+" ==================================== End Python Mode:
+" ======================================================
+
+" {{{ groups
+hi Cursor guibg=#fcaf3e guifg=#2e3436
+"hi CursorIM
+hi Directory guifg=#bbd0df
+"hi DiffAdd
+"hi DiffChange
+"hi DiffDelete
+"hi DiffText
+"hi ErrorMsg
+hi VertSplit guibg=#888a85 guifg=#2e3436 gui=none
+hi Folded guibg=#555753 guifg=#eeeeec
+hi FoldColumn guibg=#2e3436 guifg=#555753
+hi LineNr guibg=#2e3436 guifg=#c4a000
+hi MatchParen guibg=#babdb6 guifg=#2e3436
+hi ModeMsg guifg=#f57900
+hi MoreMsg guifg=#f57900
+hi NonText guibg=#2e3436 guifg=#555753
+hi Question guifg=#aabbcc
+hi Search guibg=#fce94f guifg=#c4a000
+hi IncSearch guibg=#c4a000 guifg=#fce94f
+hi SpecialKey guifg=#ce5c00
+hi StatusLine guibg=#888a85 guifg=#2e3436 gui=none
+hi StatusLineNC guibg=#888a85 guifg=#fce94f gui=none
+hi Visual guibg=#fcaf3e guifg=#ce5c00
+"hi VisualNOS
+hi WarningMsg guifg=salmon
+"hi WildMenu
+"hi Menu
+"hi Scrollbar guibg=grey30 guifg=tan
+"hi Tooltip
+hi Pmenu guibg=#babdb6 guifg=#555753
+hi PmenuSel guibg=#eeeeec guifg=#2e3436
+hi CursorLine guibg=#212628
+" }}}
+
+" {{{ terminal
+" TODO
+" }}}
+
+"vim: sw=4
71 colors/tango-morning.vim
@@ -0,0 +1,71 @@
+" Vim color file
+" Maintainer: N Vineeth <nvineeth a-t yahoo>
+" Last Change: 2009 May 27
+" Version: 0.3
+
+" This color scheme uses a light grey background.
+" Based on "morning" color scheme and
+" Tango color palette : http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines#Color_Palette
+" The Terminal colors are based on "morning" color scheme and only the gui colors have been modified
+
+" First remove all existing highlighting.
+set background=light
+hi clear
+if exists("syntax_on")
+ syntax reset
+endif
+
+let colors_name = "tango-morning"
+
+hi Normal ctermfg=Black ctermbg=LightGrey guifg=#2e3436 guibg=#eeeeec
+
+" Groups used in the 'highlight' and 'guicursor' options default value.
+hi ErrorMsg term=standout ctermbg=DarkRed ctermfg=White guibg=#cc0000 guifg=#eeeeec
+hi IncSearch term=reverse cterm=reverse gui=reverse
+hi ModeMsg term=bold cterm=bold gui=bold
+hi StatusLine term=reverse,bold cterm=reverse,bold gui=reverse,bold
+hi StatusLineNC term=reverse cterm=reverse gui=reverse
+hi VertSplit term=reverse cterm=reverse gui=reverse
+hi Visual term=reverse ctermbg=grey guibg=#d3d7cf
+hi VisualNOS term=underline,bold cterm=underline,bold gui=underline,bold
+hi DiffText term=reverse cterm=bold ctermbg=Red gui=bold guibg=#fce94f
+hi Cursor guibg=#8ae234 guifg=NONE
+hi lCursor guibg=#8ae234 guifg=NONE
+hi Directory term=bold ctermfg=DarkBlue guifg=#3465a4
+hi LineNr term=underline ctermfg=Brown guifg=#204a87 guibg=#d3d7cf
+hi MatchParen guibg=#ad7fa8 guifg=#eeeeec
+hi MoreMsg term=bold ctermfg=DarkGreen gui=bold guifg=#4e9a06
+hi NonText term=bold ctermfg=Blue gui=bold guifg=#204a87 guibg=#d3d7cf
+hi PmenuSel guibg=#204a87 guifg=#eeeeec
+hi Pmenu guibg=#3465a4 guifg=#eeeeec
+hi PmenuSbar guibg=#729fcf guifg=#204a87
+hi PmenuThumb guibg=#729fcf guifg=#204a87
+hi Question term=standout ctermfg=DarkGreen gui=bold guifg=#4e9a06
+hi Search term=reverse ctermbg=Yellow ctermfg=NONE guibg=#fce94f
+hi SpecialKey term=bold ctermfg=DarkBlue guifg=#3465a4
+hi Title term=bold ctermfg=DarkMagenta gui=bold guifg=#4e9a06
+hi WarningMsg term=standout ctermfg=DarkRed guifg=#cc0000
+hi WildMenu term=standout ctermbg=Yellow ctermfg=Black guibg=#edd400 guifg=#888a85
+hi Folded term=standout ctermbg=Grey ctermfg=DarkBlue guibg=#d3d7cf guifg=#204a87
+hi FoldColumn term=standout ctermbg=Grey ctermfg=DarkBlue guibg=#d3d7cf guifg=#204a87
+hi DiffAdd term=bold ctermbg=LightBlue guibg=#204a87 guifg=#eeeeec
+hi DiffChange term=bold ctermbg=LightMagenta guibg=#e9b96e
+hi DiffDelete term=bold ctermfg=Blue ctermbg=LightCyan gui=bold guifg=#3465a4 guibg=#d3d7cf
+" hi CursorLine term=underline cterm=underline guibg=#555753
+hi CursorLine term=underline cterm=underline guibg=#eeeeec
+hi CursorColumn term=reverse ctermbg=grey guibg=#555753
+
+" Colors for syntax highlighting
+hi Comment guifg=#888a85
+hi Constant term=underline ctermfg=DarkRed guifg=#ce5c00
+hi Identifier guifg=#204a87
+hi Statement term=bold cterm=bold ctermfg=Brown gui=bold guifg=#8f5902
+hi PreProc guifg=#204a87
+hi Type guifg=#4e9a06
+hi Special term=bold ctermfg=DarkMagenta guifg=#ce5c00 guibg=#eeeeec
+hi Underlined guifg=#204a87
+hi Ignore ctermfg=LightGrey guifg=#555753
+hi Error guibg=#cc0000 guifg=#eeeeec
+hi Todo guibg=#fce94f guifg=#204a87
+
+" vim: sw=2
78 colors/tango.vim
@@ -0,0 +1,78 @@
+"
+" Tango Vim Color Scheme
+" =======================
+"
+" For best results, set up your terminal with a Tango palette.
+" Instructions for GNOME Terminal:
+" http://uwstopia.nl/blog/2006/07/tango-terminal
+"
+" author: Michele Campeotto <micampe@micampe.it>
+"
+set background=dark
+
+hi clear
+if exists("syntax_on")
+ syntax reset
+endif
+
+let colors_name = "tango"
+
+" Default Colors
+hi Normal guifg=#eeeeec guibg=#000000
+hi NonText guifg=#555753 guibg=#000000 gui=none
+hi NonText ctermfg=darkgray
+hi Cursor guibg=#d3d7cf
+hi lCursor guibg=#d3d7cf
+
+" Search
+hi Search guifg=#eeeeec guibg=#c4a000
+hi Search cterm=none ctermfg=grey ctermbg=blue
+hi IncSearch guibg=#eeeeec guifg=#729fcf
+hi IncSearch cterm=none ctermfg=yellow ctermbg=green
+
+" Window Elements
+hi StatusLine guifg=#eeeeec guibg=#4e9a06 gui=bold
+hi StatusLine ctermfg=white ctermbg=green cterm=bold
+hi StatusLineNC guifg=#d3d7df guibg=#4e9a06
+hi StatusLineNC ctermfg=lightgray ctermbg=darkgreen
+hi VertSplit guifg=#eeeeec guibg=#eeeeec
+hi Folded guifg=#eeeeec guibg=#75507b
+hi Folded ctermfg=white ctermbg=magenta
+hi Visual guifg=#d3d7cf guibg=#4e9a06
+hi Visual ctermbg=white ctermfg=lightgreen cterm=reverse
+
+" Specials
+hi Todo guifg=#8ae234 guibg=#4e9a06 gui=bold
+hi Todo ctermfg=white ctermbg=green
+hi Title guifg=#eeeeec gui=bold
+hi Title ctermfg=white cterm=bold
+
+" Syntax
+hi Constant guifg=#c4a000
+hi Constant ctermfg=darkyellow
+hi Number guifg=#729fcf
+hi Number ctermfg=darkblue
+hi Statement guifg=#4e9a06 gui=bold
+hi Statement ctermfg=green
+hi Identifier guifg=#8ae234
+hi Identifier ctermfg=darkgreen
+hi PreProc guifg=#cc0000
+hi PreProc ctermfg=darkred
+hi Comment guifg=#06989a gui=italic
+hi Comment ctermfg=cyan cterm=none
+hi Type guifg=#d3d7cf gui=bold
+hi Type ctermfg=gray cterm=bold
+hi Special guifg=#75507b
+hi Special ctermfg=magenta cterm=none
+hi Error guifg=#eeeeec guibg=#ef2929
+hi Error ctermfg=white ctermbg=red
+
+" Diff
+hi DiffAdd guifg=fg guibg=#3465a4 gui=none
+hi DiffAdd ctermfg=gray ctermbg=blue cterm=none
+hi DiffChange guifg=fg guibg=#555753 gui=none
+hi DiffChange ctermfg=gray ctermbg=darkgray cterm=none
+hi DiffDelete guibg=bg
+hi DiffDelete ctermfg=gray ctermbg=none cterm=none
+hi DiffText guifg=fg guibg=#c4a000 gui=none
+hi DiffText ctermfg=gray ctermbg=yellow cterm=none
100 colors/two2tango.vim
@@ -0,0 +1,100 @@
+" Vim color file
+" Name: two2tango
+" Maintainer: Erik Falor <ewfalor@gmail.com>
+" Version: 1.0
+"
+" Big props to Panos Laganakos <panos.laganakos@gmail.com>
+" for the original darktango.vim colorscheme upon which
+" this scheme is based.
+
+set background=dark
+if version > 580
+ " no guarantees for version 5.8 and below, but this makes it stop
+ " complaining
+ hi clear
+ if exists("syntax_on")
+ syntax reset
+ endif
+endif
+
+let g:colors_name="two2tango"
+
+"Tango palette
+"http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines
+" {{{
+let s:Butter = ['#fce94f', '#edd400', '#c4a000']
+let s:Chameleon = ['#8ae234', '#73d216', '#4e9a06']
+let s:Orange = ['#fcaf3e', '#f57900', '#ce5c00']
+let s:SkyBlue = ['#729fcf', '#3465a4', '#204a87']
+let s:Plum = ['#ad7fa8', '#75507b', '#5c3566']
+let s:Chocolate = ['#e9b96e', '#c17d11', '#8f5902']
+let s:ScarletRed = ['#ef2929', '#cc0000', '#a40000']
+let s:Aluminium = ['#eeeeec', '#d3d7cf', '#babdb6',
+ \'#888a85', '#555753', '#2e3436']
+"This color isn't part of the Tango Palette; I use it because there
+"isn't a Tango color that provides enough contrast
+let s:Background = '#212628'
+" }}}
+
+execute "hi Normal guibg=" . s:Aluminium[5] . " guifg=" . s:Aluminium[1]
+
+" {{{ syntax
+execute "hi Comment gui=italic guifg=" . s:Aluminium[4]
+execute "hi Conditional gui=bold guifg=" . s:Butter[2]
+execute "hi Constant guifg=" . s:Chocolate[1]
+execute "hi Error guifg=" . s:Aluminium[0] . " guibg=" . s:ScarletRed[2]
+execute "hi Identifier guifg=" . s:Orange[2]
+execute "hi Ignore guifg=" . s:Orange[1]
+execute "hi Operator guifg=" . s:Butter[1]
+execute "hi PreProc guifg=" . s:Chocolate[0]
+execute "hi Repeat gui=bold guifg=" . s:Butter[2]
+execute "hi Special guifg=" . s:SkyBlue[1]
+execute "hi Statement guifg=" . s:Aluminium[3]
+execute "hi String guifg=" . s:SkyBlue[0]
+execute "hi Title guifg=" . s:Aluminium[0]
+execute "hi Todo gui=bold guisp=NONE guibg=" . s:Orange[2]
+ \. " guifg=" . s:Aluminium[0]
+execute "hi Type guifg=" . s:Orange[2]
+execute "hi Underlined gui=underline guifg=" . s:SkyBlue[0]
+" }}}
+
+" {{{ groups
+execute "hi Cursor guibg=" . s:ScarletRed[0] . " guifg=" . s:Aluminium[5]
+execute "hi CursorLine guibg=" . s:Background
+execute "hi CursorColumn guibg=" . s:Background
+"hi CursorIM TODO
+execute "hi Directory guifg=" . s:SkyBlue[0]
+execute "hi ErrorMsg guifg=" . s:Aluminium[0] . " guibg=" . s:ScarletRed[2]
+execute "hi FoldColumn guibg=" . s:Aluminium[5] . " guifg=" . s:Aluminium[4]
+execute "hi Folded guibg=" . s:Aluminium[4] . " guifg=" . s:Aluminium[2]
+execute "hi IncSearch gui=none guibg=" . s:Butter[0] . " guifg=" . s:Butter[2]
+execute "hi LineNr guibg=" . s:Aluminium[5] . " guifg=" . s:Aluminium[4]
+execute "hi MatchParen guibg=" . s:Aluminium[2] . " guifg=" . s:Aluminium[5]
+"hi Menu TODO
+execute "hi ModeMsg guifg=" . s:Orange[2]
+execute "hi MoreMsg guifg=" . s:Orange[2]
+execute "hi NonText guibg=" . s:Aluminium[5] . " guifg=" . s:Aluminium[4]
+execute "hi Pmenu guibg=" . s:Aluminium[2] . " guifg=" . s:Aluminium[4]
+execute "hi PmenuSel guibg=" . s:Aluminium[0] . " guifg=" . s:Aluminium[5]
+execute "hi Question guifg=" . s:Plum[0]
+"hi Scrollbar TODO
+execute "hi Search guibg=" . s:Butter[0] . " guifg=" . s:Butter[2]
+execute "hi SpecialKey guifg=" . s:Orange[2]
+execute "hi StatusLine gui=none guibg=" . s:Orange[2] . " guifg=" . s:Aluminium[0]
+execute "hi StatusLineNC gui=none guibg=" . s:Aluminium[3] . " guifg=" . s:Aluminium[5]
+"hi TabLine TODO - non-active tab page label
+"hi TabLineFill TODO - fill color where there are no tabs
+"hi TabLineSel TODO - active tab page label
+execute "hi Tooltip gui=none guibg=" . s:SkyBlue[0] . " guifg=" . s:Aluminium[0]
+execute "hi VertSplit gui=none guibg=" . s:Aluminium[3] . " guifg=" . s:Aluminium[5]
+execute "hi Visual guibg=" . s:Orange[0] . " guifg=" . s:Orange[2]
+"hi VisualNOS TODO - Visual mode selection when vim is "Not Owning the Selection".
+execute "hi WarningMsg guifg=" . s:Orange[0]
+execute "hi WildMenu guifg=" . s:Butter[2] . " guibg=" . s:Butter[0]
+" }}}
+
+" {{{ terminal
+" TODO
+" }}}
+
+" vim: sw=4 foldmethod=marker
930 cvscommand.vim
@@ -0,0 +1,930 @@
+" vim600: set foldmethod=marker:
+" $Id: cvscommand.vim,v 1.1 2004-03-03 10:35:58 ken Exp $
+"
+" Vim plugin to assist in working with CVS-controlled files.
+"
+" Last Change: $Date: 2004-03-03 10:35:58 $
+" Maintainer: Bob Hiestand <bob@hiestandfamily.org>
+" License: This file is placed in the public domain.
+" Credits: Mathieu Clabaut for many suggestions and improvements
+"
+" Suresh Govindachar and Jeeva Chelladhurai for finding waaaay
+" too many bugs.
+"
+" Albrecht Gass for the Delete-on-Hide behavior suggestion.
+"
+" Section: Documentation {{{1
+"
+" Provides functions to invoke various CVS commands on the current file.
+" The output of the commands is captured in a new scratch window. For
+" convenience, if the functions are invoked on a CVS output window, the
+" original file is used for the cvs operation instead after the window is
+" split. This is primarily useful when running CVSCommit and you need to see
+" the changes made, so that CVSDiff is usable and shows up in another window.
+"
+" Function documentation {{{2
+"
+" CVSAdd Performs "cvs add" on the current file.
+"
+" CVSAnnotate Performs "cvs annotate" on the current file. If not given an
+" argument, uses the most recent version of the file on the current
+" branch. Otherwise, the argument is used as a revision number.
+"
+" CVSCommit This is a two-stage command. The first step opens a buffer to
+" accept a log message. When that buffer is written, it is
+" automatically closed and the file is committed using the
+" information from that log message. If the file should not be
+" committed, just destroy the log message buffer without writing
+" it.
+"
+" CVSDiff With no arguments, this performs "cvs diff" on the current
+" file. With one argument, "cvs diff" is performed on the
+" current file against the specified revision. With two
+" arguments, cvs diff is performed between the specified
+" revisions of the current file. This command uses the
+" 'CVSCommandDiffOpt' variable to specify diff options. If that
+" variable does not exist, then 'wbBc' is assumed. If you wish
+" to have no options, then set it to the empty string.
+"
+" CVSEdit Performs "cvs edit" on the current file.
+"
+" CVSLog Performs "cvs log" on the current file.
+"
+" CVSRevert Replaces the modified version of the current file with the
+" most recent version from the repository.
+"
+" CVSReview Retrieves a particular version of the current file. If no
+" argument is given, the most recent version of the file on
+" the current branch is retrieved. The specified revision is
+" retrieved into a new buffer.
+"
+" CVSStatus Performs "cvs status" on the current file.
+"
+" CVSUnedit Performs "cvs unedit" on the current file.
+"
+" CVSUpdate Performs "cvs update" on the current file.
+"
+" CVSVimDiff With no arguments, this prompts the user for a revision and
+" then uses vimdiff to display the differences between the current
+" file and the specified revision. If no revision is specified,
+" the most recent version of the file on the current branch is used.
+" With one argument, that argument is used as the revision as
+" above. With two arguments, the differences between the two
+" revisions is displayed using vimdiff.
+"
+" With either zero or one argument, the original buffer is used
+" to perform the vimdiff. When the other buffer is closed, the
+" original buffer will be returned to normal mode.
+"
+" Mapping documentation: {{{2
+"
+" By default, a mapping is defined for each command. User-provided mappings
+" can be used instead by mapping to <Plug>CommandName, for instance:
+"
+" nnoremap ,ca <Plug>CVSAdd
+"
+" The default mappings are as follow:
+"
+" <Leader>ca CVSAdd
+" <Leader>cn CVSAnnotate
+" <Leader>cc CVSCommit
+" <Leader>cd CVSDiff
+" <Leader>ce CVSEdit
+" <Leader>cl CVSLog
+" <Leader>cr CVSReview
+" <Leader>cs CVSStatus
+" <Leader>ct CVSUnedit
+" <Leader>cu CVSUpdate
+" <Leader>cv CVSVimDiff
+"
+" Options documentation: {{{2
+"
+" Several variables are checked by the script to determine behavior as follow:
+"
+" CVSCommandDeleteOnHide
+" This variable, if set to a non-zero value, causes the temporary CVS result
+" buffers to automatically delete themselves when hidden.
+"
+" CVSCommandDiffOpt
+" This variable, if set, determines the options passed to the diff command
+" of CVS. If not set, it defaults to 'wbBc'.
+"
+" CVSCommandNameResultBuffers
+" This variable, if set to a true value, causes the cvs result buffers to be
+" named in the old way ('<source file name> _<cvs command>_'). If not set
+" or set to a false value, the result buffer is nameless.
+"
+" CVSCommandNameMarker
+" This variable, if set, configures the special attention-getting characters
+" that appear on either side of the cvs buffer type in the buffer name.
+" This has no effect unless 'CVSCommandNameResultBuffers' is set to a true
+" value. If not set, it defaults to '_'.
+"
+" CVSCommandSplit
+" This variable controls the orientation of the various window splits that
+" may occur (such as with CVSVimDiff, when using a CVS command on a CVS
+" command buffer, or when the 'CVSCommandEdit' variable is set to 'split'.
+" If set to 'horizontal', the resulting windows will be on stacked on top of
+" one another. If set to 'vertical', the resulting windows will be
+" side-by-side. If not set, it defaults to 'horizontal' for all but
+" CVSVimDiff windows.
+"
+" CVSCommandDiffSplit
+" This variable overrides the CVSCommandSplit variable, but only for buffers
+" created with CVSVimDiff.
+"
+" CVSCommandEdit
+" This variable controls whether the original buffer is replaced ('edit') or
+" split ('split'). If not set, it defaults to 'edit'.
+"
+" CVSCommandInteractive
+" This variable, if set to a non-zero value, causes appropriate functions (for
+" the moment, only CVSReview) to query the user for a revision to use
+" instead of the current revision if none is specified.
+"
+" CVSCommandEnableBufferSetup
+" This variable, if set to a non-zero value, activates CVS buffer management
+" mode. This mode means that two buffer variables, 'CVSRevision' and
+" 'CVSBranch', are set if the file is CVS-controlled. This is useful for
+" displaying version information in the status bar.
+"
+" Event documentation {{{2
+" For additional customization, cvscommand.vim uses User event autocommand
+" hooks. Each event is in the CVSCommand group, and different patterns
+" match the various hooks.
+"
+" For instance, the following could be added to the vimrc to provide a 'q'
+" mapping to quit a CVS buffer:
+"
+" augroup CVSCommand
+" au CVSCommand User CVSBufferCreated silent! nmap <unique> <buffer> q:bwipeout<cr>
+" augroup END
+"
+" The following hooks are available:
+"
+" CVSBufferCreated This event is fired just after a cvs command
+" result buffer is created and filled with the
+" result of a cvs command. It is executed within
+" the context of the CVS command buffer.
+
+" Section: Plugin header {{{1
+" loaded_cvscommand is set to 1 when the initialization begins, and 2 when it
+" completes. This allows various actions to only be taken by functions after
+" system initialization.
+
+if exists("loaded_cvscommand")
+ finish
+endif
+let loaded_cvscommand = 1
+
+" Section: Event group setup {{{1
+
+augroup CVSCommand
+augroup END
+
+" Section: Plugin initialization {{{1
+silent do CVSCommand User CVSPluginInit
+
+" Section: Useful pattern constants {{{1
+
+let s:CVSCommandTagPattern='\a[A-Za-z0-9-_]*'
+
+" Section: Utility functions {{{1
+
+" Function: s:CVSResolveLink() {{{2
+" Fully resolve the given file name to remove shortcuts or symbolic links.
+
+function! s:CVSResolveLink(fileName)
+ let resolved = resolve(a:fileName)
+ if resolved != a:fileName
+ let resolved = s:CVSResolveLink(resolved)
+ endif
+ return resolved
+endfunction
+
+" Function: s:CVSChangeToCurrentFileDir() {{{2
+" Go to the directory in which the current CVS-controlled file is located.
+" If this is a CVS command buffer, first switch to the original file.
+
+function! s:CVSChangeToCurrentFileDir(fileName)
+ let oldCwd=getcwd()
+ let fileName=s:CVSResolveLink(a:fileName)
+ let newCwd=fnamemodify(fileName, ':h')
+ if strlen(newCwd) > 0
+ execute 'cd' escape(newCwd, ' ')
+ endif
+ return oldCwd
+endfunction
+
+" Function: s:CVSGetOption(name, default) {{{2
+" Grab a user-specified option to override the default provided. Options are
+" searched in the window, buffer, then global spaces.
+
+function! s:CVSGetOption(name, default)
+ if exists("w:" . a:name)
+ execute "return w:".a:name
+ elseif exists("b:" . a:name)
+ execute "return b:".a:name
+ elseif exists("g:" . a:name)
+ execute "return g:".a:name
+ else
+ return a:default
+ endif
+endfunction
+
+" Function: s:CVSEditFile(name, origBuffNR) {{{2
+" Wrapper around the 'edit' command to provide some helpful error text if the
+" current buffer can't be abandoned. If name is provided, it is used;
+" otherwise, a nameless scratch buffer is used.
+" Returns: 0 if successful, -1 if an error occurs.
+
+function! s:CVSEditFile(name, origBuffNR)
+ let v:errmsg = ""
+ let editCommand = s:CVSGetOption('CVSCommandEdit', 'edit')
+ if editCommand != 'edit'
+ if s:CVSGetOption('CVSCommandSplit', 'horizontal') == 'horizontal'
+ if a:name == ""
+ let editCommand = 'rightbelow new'
+ else
+ let editCommand = 'rightbelow split ' . a:name
+ endif
+ else
+ if a:name == ""
+ let editCommand = 'vert rightbelow new'
+ else
+ let editCommand = 'vert rightbelow split ' . a:name
+ endif
+ endif
+ else
+ if a:name == ""
+ let editCommand = 'enew'
+ else
+ let editCommand = 'edit ' . a:name
+ endif
+ endif
+
+ " Protect against useless buffer set-up
+ let g:CVSCommandEditFileRunning = 1
+ execute editCommand
+ unlet g:CVSCommandEditFileRunning
+
+ if v:errmsg != ""
+ if &modified && !&hidden
+ echoerr "Unable to open command buffer because 'nohidden' is set and the current buffer is modified (see :help 'hidden')."
+ else
+ echoerr "Unable to open command buffer" v:errmsg
+ endif
+ return -1
+ endif
+ let b:CVSOrigBuffNR=a:origBuffNR
+ let b:CVSCommandEdit='split'
+endfunction
+
+" Function: s:CVSCreateCommandBuffer(cmd, cmdName, statusText, filename) {{{2
+" Creates a new scratch buffer and captures the output from execution of the
+" given command. The name of the scratch buffer is returned.
+
+function! s:CVSCreateCommandBuffer(cmd, cmdName, statusText, origBuffNR)
+ let fileName=bufname(a:origBuffNR)
+
+ let resultBufferName=''
+
+ if s:CVSGetOption("CVSCommandNameResultBuffers", 0)
+ let nameMarker = s:CVSGetOption("CVSCommandNameMarker", '_')
+ if strlen(a:statusText) > 0
+ let bufName=a:cmdName . ' -- ' . a:statusText
+ else
+ let bufName=a:cmdName
+ endif
+ let bufName=fileName . ' ' . nameMarker . bufName . nameMarker
+ let counter=0
+ let resultBufferName = bufName
+ while buflisted(resultBufferName)
+ let counter=counter + 1
+ let resultBufferName=bufName . ' (' . counter . ')'
+ endwhile
+ let resultBufferName = escape(resultBufferName, ' *\')
+ endif
+
+ if s:CVSEditFile(resultBufferName, a:origBuffNR) == -1
+ return -1
+ endif
+
+ set buftype=nofile
+ set noswapfile
+ set filetype=
+
+ if s:CVSGetOption("CVSCommandDeleteOnHide", 0)
+ set bufhidden=delete
+ endif
+
+ silent execute a:cmd
+ $d
+ 1
+
+ " Define the environment and execute user-defined hooks.
+
+ let b:CVSSourceFile=fileName
+ let b:CVSCommand=a:cmdName
+ if a:statusText != ""
+ let b:CVSStatusText=a:statusText
+ endif
+
+ silent do CVSCommand User CVSBufferCreated
+ return bufnr("%")
+endfunction
+
+" Function: s:CVSBufferCheck(cvsBuffer) {{{2
+" Attempts to locate the original file to which CVS operations were applied
+" for a given buffer.
+
+function! s:CVSBufferCheck(cvsBuffer)
+ let origBuffer = getbufvar(a:cvsBuffer, "CVSOrigBuffNR")
+ if origBuffer
+ if bufexists(origBuffer)
+ return origBuffer
+ else
+ " Original buffer no longer exists.
+ return -1
+ endif
+ else
+ " No original buffer
+ return a:cvsBuffer
+ endif
+endfunction
+
+" Function: s:CVSCurrentBufferCheck() {{{2
+" Attempts to locate the original file to which CVS operations were applied
+" for the current buffer.
+
+function! s:CVSCurrentBufferCheck()
+ return s:CVSBufferCheck(bufnr("%"))
+endfunction
+
+" Function: s:CVSToggleDeleteOnHide() {{{2
+" Toggles on and off the delete-on-hide behavior of CVS buffers
+
+function! s:CVSToggleDeleteOnHide()
+ if exists("g:CVSCommandDeleteOnHide")
+ unlet g:CVSCommandDeleteOnHide
+ else
+ let g:CVSCommandDeleteOnHide=1
+ endif
+endfunction
+
+" Function: s:CVSDoCommand(cvscmd, cmdName, statusText) {{{2
+" General skeleton for CVS function execution.
+" Returns: name of the new command buffer containing the command results
+
+function! s:CVSDoCommand(cmd, cmdName, statusText)
+ let cvsBufferCheck=s:CVSCurrentBufferCheck()
+ if cvsBufferCheck == -1
+ echo "Original buffer no longer exists, aborting."
+ return -1
+ endif
+
+ let fileName=bufname(cvsBufferCheck)
+ let realFileName = fnamemodify(s:CVSResolveLink(fileName), ':t')
+ let oldCwd=s:CVSChangeToCurrentFileDir(fileName)
+ let fullCmd = '0r!' . a:cmd . ' "' . realFileName . '"'
+ let resultBuffer=s:CVSCreateCommandBuffer(fullCmd, a:cmdName, a:statusText, cvsBufferCheck)
+ execute 'cd' escape(oldCwd, ' ')
+ return resultBuffer
+endfunction
+
+
+" Function: s:CVSGetStatusVars(revision, branch) {{{2
+"
+" Obtains a CVS revision number and branch name. The 'revisionVar' and
+" 'branchVar' arguments, if non-empty, contain the names of variables to hold
+" the corresponding results.
+"
+" Returns: string to be exec'd that sets the multiple return values.
+
+function! s:CVSGetStatusVars(revisionVar, branchVar)
+ let cvsBufferCheck=s:CVSCurrentBufferCheck()
+ if cvsBufferCheck == -1
+ return ""
+ endif
+ let fileName=bufname(cvsBufferCheck)
+ let realFileName = fnamemodify(s:CVSResolveLink(fileName), ':t')
+ let oldCwd=s:CVSChangeToCurrentFileDir(fileName)
+ let statustext=system("cvs status " . escape(realFileName, " *?\\"))
+ if(v:shell_error)
+ execute 'cd' escape(oldCwd, ' ')
+ return ""
+ endif
+ let revision=substitute(statustext, '^\_.*Working revision:\s*\(\d\+\%(\.\d\+\)\+\|New file!\)\_.*$', '\1', "")
+
+ " We can still be in a CVS-controlled directory without this being a CVS
+ " file
+ if match(revision, '^New file!$') >= 0
+ let revision="NEW"
+ elseif match(revision, '^\d\+\.\d\+\%(\.\d\+\.\d\+\)*$') >=0
+ else
+ execute 'cd' escape(oldCwd, ' ')
+ return ""
+ endif
+
+ let returnExpression = "let " . a:revisionVar . "='" . revision . "'"
+
+ if a:branchVar != ""
+ let branch=substitute(statustext, '^\_.*Sticky Tag:\s\+\(' . s:CVSCommandTagPattern . '\|(none)\).*$', '\1', "")
+ let returnExpression=returnExpression . " | let " . a:branchVar . "='" . branch . "'"
+ endif
+
+ execute 'cd' escape(oldCwd, ' ')
+ return returnExpression
+endfunction
+
+" Function: s:CVSSetupBuffer() {{{2
+" Attempts to set the b:CVSBranch and b:CVSRevision variables.
+
+function! s:CVSSetupBuffer()
+ if (exists("b:CVSBufferSetup") && b:CVSBufferSetup)
+ return
+ endif
+
+ if !s:CVSGetOption("CVSCommandEnableBufferSetup", 0)
+ \ || @% == ""
+ \ || exists("g:CVSCommandEditFileRunning")
+ \ || exists("b:CVSOrigBuffNR")
+ unlet! b:CVSRevision
+ unlet! b:CVSBranch
+ return
+ endif
+
+ let revision=""
+ let branch=""
+
+ exec s:CVSGetStatusVars('revision', 'branch')
+ if revision != ""
+ let b:CVSRevision=revision
+ else
+ unlet! b:CVSRevision
+ endif
+ if branch != ""
+ let b:CVSBranch=branch
+ else
+ unlet! b:CVSBranch
+ endif
+ let b:CVSBufferSetup=1
+endfunction
+
+" Function: s:CVSMarkOrigBufferForSetup(cvsbuffer) {{{2
+" Resets the buffer setup state of the original buffer for a given CVS buffer.
+" Returns: The CVS buffer number in a passthrough mode.
+
+function! s:CVSMarkOrigBufferForSetup(cvsBuffer)
+ if a:cvsBuffer != -1
+ let origBuffer = s:CVSBufferCheck(a:cvsBuffer)
+ "This should never not work, but I'm paranoid
+ if origBuffer != a:cvsBuffer
+ call setbufvar(origBuffer, "CVSBufferSetup", 0)
+ endif
+ endif
+ return a:cvsBuffer
+endfunction
+
+" Section: Public functions {{{1
+
+" Function: CVSGetRevision() {{{2
+" Global function for retrieving the current buffer's CVS revision number.
+" Returns: Revision number or an empty string if an error occurs.
+
+function! CVSGetRevision()
+ let revision=""
+ exec s:CVSGetStatusVars('revision', '')
+ return revision
+endfunction
+
+" Function: CVSDisableBufferSetup() {{{2
+" Global function for deactivating the buffer autovariables.
+
+function! CVSDisableBufferSetup()
+ let g:CVSCommandEnableBufferSetup=0
+ silent! augroup! CVSCommandPlugin
+endfunction
+
+" Function: CVSEnableBufferSetup() {{{2
+" Global function for activating the buffer autovariables.
+
+function! CVSEnableBufferSetup()
+ let g:CVSCommandEnableBufferSetup=1
+ augroup CVSCommandPlugin
+ au!
+ au BufEnter * call s:CVSSetupBuffer()
+ augroup END
+
+ " Only auto-load if the plugin is fully loaded. This gives other plugins a
+ " chance to run.
+ if g:loaded_cvscommand == 2
+ call s:CVSSetupBuffer()
+ endif
+endfunction
+
+" Function: CVSGetStatusLine() {{{2
+" Default (sample) status line entry for CVS files. This is only useful if
+" CVS-managed buffer mode is on (see the CVSCommandEnableBufferSetup variable
+" for how to do this).
+
+function! CVSGetStatusLine()
+ if exists('b:CVSSourceFile')
+ " This is a result buffer
+ let value='[' . b:CVSCommand . ' ' . b:CVSSourceFile
+ if exists('b:CVSStatusText')
+ let value=value . ' ' . b:CVSStatusText
+ endif
+ let value = value . ']'
+ return value
+ endif
+
+ if exists('b:CVSRevision')
+ \ && b:CVSRevision != ''
+ \ && exists('b:CVSBranch')
+ \ && b:CVSBranch != ''
+ \ && exists('g:CVSCommandEnableBufferSetup')
+ \ && g:CVSCommandEnableBufferSetup
+ return '[CVS ' . b:CVSBranch . '/' . b:CVSRevision . ']'
+ else
+ return ''
+ endif
+endfunction
+
+" Section: CVS command functions {{{1
+
+" Function: s:CVSAdd() {{{2
+function! s:CVSAdd()
+ return s:CVSMarkOrigBufferForSetup(s:CVSDoCommand('cvs add', 'cvsadd', ''))
+endfunction
+
+" Function: s:CVSAnnotate(...) {{{2
+function! s:CVSAnnotate(...)
+ let cvsBufferCheck=s:CVSCurrentBufferCheck()
+ if cvsBufferCheck == -1
+ echo "Original buffer no longer exists, aborting."
+ return -1
+ endif
+
+ let fileName=bufname(cvsBufferCheck)
+ let realFileName = fnamemodify(s:CVSResolveLink(fileName), ':t')
+ let oldCwd=s:CVSChangeToCurrentFileDir(fileName)
+
+ let currentLine=line(".")
+
+ if a:0 == 0
+ let revision=CVSGetRevision()
+ if revision == ""
+ echo "Unable to obtain status for " . fileName
+ execute 'cd' escape(oldCwd, ' ')
+ return -1
+ endif
+ else
+ let revision=a:1
+ endif
+
+ if revision == "NEW"
+ echo "No annotatation available for new file " . fileName
+ execute 'cd' escape(oldCwd, ' ')
+ return -1
+ endif
+
+ let resultBuffer=s:CVSCreateCommandBuffer('0r!cvs -q annotate -r ' . revision . ' "' . realFileName . '"', 'cvsannotate', '', cvsBufferCheck)
+ if resultBuffer != -1
+ exec currentLine
+ set filetype=CVSAnnotate
+ endif
+
+ execute 'cd' escape(oldCwd, ' ')
+ return resultBuffer
+endfunction
+
+" Function: s:CVSCommit() {{{2
+function! s:CVSCommit()
+ let cvsBufferCheck=s:CVSCurrentBufferCheck()
+ if cvsBufferCheck == -1
+ echo "Original buffer no longer exists, aborting."
+ return -1
+ endif
+
+ let messageFileName = tempname()
+
+ let fileName=bufname(cvsBufferCheck)
+ let realFilePath=s:CVSResolveLink(fileName)
+ let newCwd=fnamemodify(realFilePath, ':h')
+ let realFileName=fnamemodify(realFilePath, ':t')
+
+ execute 'au BufWritePost' messageFileName 'call s:CVSFinishCommit("' . messageFileName . '", "' . newCwd . '", "' . realFileName . '", ' . cvsBufferCheck . ') | au! * ' messageFileName
+ execute 'au BufDelete' messageFileName 'au! * ' messageFileName
+
+ if s:CVSEditFile(messageFileName, cvsBufferCheck) == -1
+ execute 'au! *' messageFileName
+ else
+ 0put ='CVS: ----------------------------------------------------------------------'
+ put =\"CVS: Enter Log. Lines beginning with `CVS:' are removed automatically\"
+ put ='CVS: ----------------------------------------------------------------------'
+ $
+ let b:CVSSourceFile=fileName
+ let b:CVSCommand='CVSCommit'
+ endif
+endfunction
+
+" Function: s:CVSDiff(...) {{{2
+function! s:CVSDiff(...)
+ if a:0 == 1
+ let revOptions = '-r' . a:1
+ let caption = a:1 . ' -> current'
+ elseif a:0 == 2
+ let revOptions = '-r' . a:1 . ' -r' . a:2
+ let caption = a:1 . ' -> ' . a:2
+ else
+ let revOptions = ''
+ let caption = ''
+ endif
+
+ let cvsdiffopt=s:CVSGetOption('CVSCommandDiffOpt', 'wbBc')
+
+ if cvsdiffopt == ""
+ let diffoptionstring=""
+ else
+ let diffoptionstring=" -" . cvsdiffopt . " "
+ endif
+
+ let resultBuffer = s:CVSDoCommand('cvs diff ' . diffoptionstring . revOptions , 'cvsdiff', caption)
+ if resultBuffer != -1
+ set filetype=diff
+ endif
+ return resultBuffer
+endfunction
+
+" Function: s:CVSEdit() {{{2
+function! s:CVSEdit()
+ return s:CVSDoCommand('cvs edit', 'cvsedit', '')
+endfunction
+
+" Function: s:CVSFinishCommit(messageFile, targetDir, targetFile) {{{2
+function! s:CVSFinishCommit(messageFile, targetDir, targetFile, origBuffNR)
+ if filereadable(a:messageFile)
+ let oldCwd=getcwd()
+ if strlen(a:targetDir) > 0
+ execute 'cd' escape(a:targetDir, ' ')
+ endif
+ let resultBuffer=s:CVSCreateCommandBuffer('0r!cvs commit -F "' . a:messageFile . '" "'. a:targetFile . '"', 'cvscommit', '', a:origBuffNR)
+ execute 'cd' escape(oldCwd, ' ')
+ execute 'bw' escape(a:messageFile, ' *?\')
+ silent execute '!rm' a:messageFile
+ return s:CVSMarkOrigBufferForSetup(resultBuffer)
+ else
+ echo "Can't read message file; no commit is possible."
+ return -1
+ endif
+endfunction
+
+" Function: s:CVSLog() {{{2
+function! s:CVSLog(...)
+ if a:0 == 0
+ let versionOption = ""
+ let caption = ''
+ else
+ let versionOption=" -r" . a:1
+ let caption = a:1
+ endif
+
+ let resultBuffer=s:CVSDoCommand('cvs log' . versionOption, 'cvslog', caption)
+ if resultBuffer != ""
+ set filetype=rcslog
+ endif
+ return resultBuffer
+endfunction
+
+" Function: s:CVSRevert() {{{2
+function! s:CVSRevert()
+ return s:CVSMarkOrigBufferForSetup(s:CVSDoCommand('cvs update -C', 'cvsrevert', ''))
+endfunction
+
+" Function: s:CVSReview(...) {{{2
+function! s:CVSReview(...)
+ if a:0 == 0
+ let versiontag=""
+ if s:CVSGetOption('CVSCommandInteractive', 0)
+ let versiontag=input('Revision: ')
+ endif
+ if versiontag == ""
+ let versiontag="(current)"
+ let versionOption=""
+ else
+ let versionOption=" -r " . versiontag . " "
+ endif
+ else
+ let versiontag=a:1
+ let versionOption=" -r " . versiontag . " "
+ endif
+
+ let origFileType=&filetype
+
+ let resultBuffer = s:CVSDoCommand('cvs -q update -p' . versionOption, 'cvsreview', versiontag)
+
+ let &filetype=origFileType
+ return resultBuffer
+endfunction
+
+" Function: s:CVSStatus() {{{2
+function! s:CVSStatus()
+ return s:CVSDoCommand('cvs status', 'cvsstatus', '')
+endfunction
+
+" Function: s:CVSUnedit() {{{2
+function! s:CVSUnedit()
+ return s:CVSDoCommand('cvs unedit', 'cvsunedit', '')
+endfunction
+
+" Function: s:CVSUpdate() {{{2
+function! s:CVSUpdate()
+ return s:CVSMarkOrigBufferForSetup(s:CVSDoCommand('cvs update', 'update', ''))
+endfunction
+
+" Function: s:CVSVimDiff(...) {{{2
+function! s:CVSVimDiff(...)
+ if(a:0 == 0)
+ let resultBuffer=s:CVSReview()
+ diffthis
+ elseif(a:0 == 1)
+ let resultBuffer=s:CVSReview(a:1)
+ diffthis
+ else
+ call s:CVSReview(a:1)
+ diffthis
+ " If no split method is defined, cheat, and set it to vertical.
+ if s:CVSGetOption('CVSCommandDiffSplit', s:CVSGetOption('CVSCommandSplit', 'dummy')) == 'dummy'
+ let b:CVSCommandSplit='vertical'
+ endif
+ let resultBuffer=s:CVSReview(a:2)
+ diffthis
+ return resultBuffer
+ endif
+
+ let originalBuffer=b:CVSOrigBuffNR
+ let originalWindow=bufwinnr(originalBuffer)
+
+ " Don't remove the just-created buffer
+ let savedHideOption = getbufvar(resultBuffer, '&bufhidden')
+ call setbufvar(resultBuffer, '&bufhidden', 'hide')
+
+ execute "hide b" originalBuffer
+ let resultBufferName=escape(fnamemodify(bufname(resultBuffer), ':p'), ' \')
+
+ " If there's already a VimDiff'ed window, restore it.
+ " There may only be one CVSVimDiff original window at a time.
+
+ if exists("g:CVSCommandRestoreVimDiffStateCmd")
+ execute g:CVSCommandRestoreVimDiffStateCmd
+ endif
+
+ " Store the state of original buffer so that it can reset when the CVS
+ " buffer departs.
+
+ let g:CVSCommandRestoreVimDiffSourceBuffer = originalBuffer
+ let g:CVSCommandRestoreVimDiffScratchBuffer = resultBuffer
+ let g:CVSCommandRestoreVimDiffStateCmd =
+ \ "call setbufvar(".originalBuffer.", \"&diff\", ".getwinvar(originalWindow, '&diff').")"
+ \ . "|call setbufvar(".originalBuffer.", \"&foldcolumn\", ".getwinvar(originalWindow, '&foldcolumn').")"
+ \ . "|call setbufvar(".originalBuffer.", \"&foldmethod\", '". getwinvar(originalWindow, '&foldmethod')."')"
+ \ . "|call setbufvar(".originalBuffer.", \"&scrollbind\", ".getwinvar(originalWindow, '&scrollbind').")"
+ \ . "|call setbufvar(".originalBuffer.", \"&wrap\", ".getwinvar(originalWindow, '&wrap').")"
+
+
+ diffthis
+
+ let g:CVSCommandEditFileRunning = 1
+ if s:CVSGetOption('CVSCommandDiffSplit', s:CVSGetOption('CVSCommandSplit', 'vertical')) == 'horizontal'
+ execute "silent rightbelow sbuffer" . resultBuffer
+ else
+ execute "silent vert rightbelow sbuffer" . resultBuffer
+ endif
+ unlet g:CVSCommandEditFileRunning
+
+ call setbufvar(resultBuffer, '&bufhidden', savedHideOption)
+
+ return resultBuffer
+endfunction
+
+" Section: Command definitions {{{1
+" Section: Primary commands {{{2
+com! CVSAdd call s:CVSAdd()
+com! -nargs=? CVSAnnotate call s:CVSAnnotate(<f-args>)
+com! CVSCommit call s:CVSCommit()
+com! -nargs=* CVSDiff call s:CVSDiff(<f-args>)
+com! CVSEdit call s:CVSEdit()
+com! -nargs=? CVSLog call s:CVSLog(<f-args>)
+com! CVSRevert call s:CVSRevert()
+com! -nargs=? CVSReview call s:CVSReview(<f-args>)
+com! CVSStatus call s:CVSStatus()
+com! CVSUnedit call s:CVSUnedit()
+com! CVSUpdate call s:CVSUpdate()
+com! -nargs=* CVSVimDiff call s:CVSVimDiff(<f-args>)
+
+" Section: CVS buffer management commands {{{2
+com! CVSDisableBufferSetup call CVSDisableBufferSetup()
+com! CVSEnableBufferSetup call CVSEnableBufferSetup()
+
+" Allow reloading cvscommand.vim
+com! CVSReload unlet! loaded_cvscommand | runtime plugin/cvscommand.vim
+
+" Section: Plugin command mappings {{{1
+nnoremap <silent> <Plug>CVSAdd :CVSAdd<CR>
+nnoremap <silent> <Plug>CVSAnnotate :CVSAnnotate<CR>
+nnoremap <silent> <Plug>CVSCommit :CVSCommit<CR>
+nnoremap <silent> <Plug>CVSDiff :CVSDiff<CR>
+nnoremap <silent> <Plug>CVSEdit :CVSEdit<CR>
+nnoremap <silent> <Plug>CVSLog :CVSLog<CR>
+nnoremap <silent> <Plug>CVSRevert :CVSRevert<CR>
+nnoremap <silent> <Plug>CVSReview :CVSReview<CR>
+nnoremap <silent> <Plug>CVSStatus :CVSStatus<CR>
+nnoremap <silent> <Plug>CVSUnedit :CVSUnedit<CR>
+nnoremap <silent> <Plug>CVSUpdate :CVSUpdate<CR>
+nnoremap <silent> <Plug>CVSVimDiff :CVSVimDiff<CR>
+
+" Section: Default mappings {{{1
+if !hasmapto('<Plug>CVSAdd')
+ nmap <unique> <Leader>ca <Plug>CVSAdd
+endif
+if !hasmapto('<Plug>CVSAnnotate')
+ nmap <unique> <Leader>cn <Plug>CVSAnnotate
+endif
+if !hasmapto('<Plug>CVSCommit')
+ nmap <unique> <Leader>cc <Plug>CVSCommit
+endif
+if !hasmapto('<Plug>CVSDiff')
+ nmap <unique> <Leader>cd <Plug>CVSDiff
+endif
+if !hasmapto('<Plug>CVSEdit')
+ nmap <unique> <Leader>ce <Plug>CVSEdit
+endif
+if !hasmapto('<Plug>CVSLog')
+ nmap <unique> <Leader>cl <Plug>CVSLog
+endif
+if !hasmapto('<Plug>CVSRevert')
+ nmap <unique> <Leader>cq <Plug>CVSRevert
+endif
+if !hasmapto('<Plug>CVSReview')
+ nmap <unique> <Leader>cr <Plug>CVSReview
+endif
+if !hasmapto('<Plug>CVSStatus')
+ nmap <unique> <Leader>cs <Plug>CVSStatus
+endif
+if !hasmapto('<Plug>CVSUnedit')
+ nmap <unique> <Leader>ct <Plug>CVSUnedit
+endif
+if !hasmapto('<Plug>CVSUpdate')
+ nmap <unique> <Leader>cu <Plug>CVSUpdate
+endif
+if !hasmapto('<Plug>CVSVimDiff')
+ nmap <unique> <Leader>cv <Plug>CVSVimDiff
+endif
+
+" Section: Menu items {{{1
+amenu <silent> &Plugin.CVS.&Add <Plug>CVSAdd
+amenu <silent> &Plugin.CVS.A&nnotate <Plug>CVSAnnotate
+amenu <silent> &Plugin.CVS.&Commit <Plug>CVSCommit
+amenu <silent> &Plugin.CVS.&Diff <Plug>CVSDiff
+amenu <silent> &Plugin.CVS.&Edit <Plug>CVSEdit
+amenu <silent> &Plugin.CVS.&Log <Plug>CVSLog
+amenu <silent> &Plugin.CVS.Revert <Plug>CVSRevert
+amenu <silent> &Plugin.CVS.&Review <Plug>CVSReview
+amenu <silent> &Plugin.CVS.&Status <Plug>CVSStatus
+amenu <silent> &Plugin.CVS.Unedi&t <Plug>CVSUnedit
+amenu <silent> &Plugin.CVS.&Update <Plug>CVSUpdate
+amenu <silent> &Plugin.CVS.&VimDiff <Plug>CVSVimDiff
+
+" Section: Autocommands to restore vimdiff state {{{1
+function! s:CVSVimDiffRestore(vimDiffBuff)
+ if exists("g:CVSCommandRestoreVimDiffScratchBuffer")
+ \ && a:vimDiffBuff == g:CVSCommandRestoreVimDiffScratchBuffer
+ if exists("g:CVSCommandRestoreVimDiffSourceBuffer")
+ " Only restore if the source buffer is still in Diff mode
+ if getbufvar(g:CVSCommandRestoreVimDiffSourceBuffer, "&diff")
+ if exists("g:CVSCommandRestoreVimDiffStateCmd")
+ execute g:CVSCommandRestoreVimDiffStateCmd
+ unlet g:CVSCommandRestoreVimDiffStateCmd
+ endif
+ endif
+ unlet g:CVSCommandRestoreVimDiffSourceBuffer
+ endif
+ unlet g:CVSCommandRestoreVimDiffScratchBuffer
+ endif
+endfunction
+
+augroup CVSVimDiffRestore
+ au!
+ au BufUnload * call s:CVSVimDiffRestore(expand("<abuf>"))
+augroup END
+
+" Section: Optional activation of buffer management {{{1
+
+if s:CVSGetOption('CVSCommandEnableBufferSetup', 0)
+ call CVSEnableBufferSetup()
+endif
+
+" Section: Plugin completion {{{1
+let loaded_cvscommand=2
+silent do CVSCommand User CVSPluginFinish
404 doc/matchit.txt
@@ -0,0 +1,404 @@
+*matchit.txt* Extended "%" matching
+
+For instructions on installing this file, type
+ :help matchit-install
+inside Vim.
+
+For Vim version 6.3. Last change: 2006 Feb 23
+
+
+ VIM REFERENCE MANUAL by Benji Fisher
+
+*matchit* *matchit.vim*
+
+1. Extended matching with "%" |matchit-intro|
+2. Activation |matchit-activate|
+3. Configuration |matchit-configure|
+4. Supporting a New Language |matchit-newlang|
+5. Known Bugs and Limitations |matchit-bugs|
+
+The functionality mentioned here is a plugin, see |add-plugin|.
+This plugin is only available if 'compatible' is not set.
+You can avoid loading this plugin by setting the "loaded_matchit" variable
+in your |vimrc| file: >
+ :let loaded_matchit = 1
+
+{Vi does not have any of this}
+
+==============================================================================
+1. Extended matching with "%" *matchit-intro*
+
+ *matchit-%*
+% Cycle forward through matching groups, such as "if", "else", "endif",
+ as specified by |b:match_words|.
+
+ *g%* *v_g%* *o_g%*
+g% Cycle backwards through matching groups, as specified by
+ |b:match_words|. For example, go from "endif" to "else" to "if".
+
+ *[%* *v_[%* *o_[%*
+[% Go to [count] previous unmatched group, as specified by
+ |b:match_words|. Similar to |[{|.
+
+ *]%* *v_]%* *o_]%*
+]% Go to [count] next unmatched group, as specified by
+ |b:match_words|. Similar to |]}|.
+
+ *v_a%*
+a% In Visual mode, select the matching group, as specified by
+ |b:match_words|, containing the cursor. Similar to |v_a[|.
+ A [count] is ignored, and only the first character of the closing
+ pattern is selected.
+
+In Vim, as in plain vi, the percent key, |%|, jumps the cursor from a brace,
+bracket, or paren to its match. This can be configured with the 'matchpairs'
+option. The matchit plugin extends this in several ways:
+
+ You can match whole words, such as "if" and "endif", not just
+ single characters. You can also specify a |regular-expression|.
+ You can define groups with more than two words, such as "if",
+ "else", "endif". Banging on the "%" key will cycle from the "if" to
+ the first "else", the next "else", ..., the closing "endif", and back
+ to the opening "if". Nested structures are skipped. Using |g%| goes
+ in the reverse direction.
+ By default, words inside comments and strings are ignored, unless
+ the cursor is inside a comment or string when you type "%". If the
+ only thing you want to do is modify the behavior of "%" so that it
+ behaves this way, you can >
+ :let b:match_words = &matchpairs
+<
+See |matchit-details| for details on what the script does, and |b:match_words|
+for how to specify matching patterns.
+
+MODES: *matchit-modes* *matchit-v_%* *matchit-o_%*
+
+Mostly, % and related motions (|g%| and |[%| and |]%|) work just like built-in
+|motion| commands in |Operator-pending| and |Visual| modes. However, you
+cannot make these motions |linewise| or |characterwise|, since the |:omap|s
+that define them start with "v" in order to make the default behavior
+inclusive. (See |o_v|.) In other words, "dV%" will not work. The
+work-around is to go through Visual mode: "V%d" will work.
+
+LANGUAGES: *matchit-languages*
+
+Currently, the following languages are supported: Ada, ASP with VBS, Csh,
+DTD, Entity, Essbase, Fortran, HTML, JSP (same as HTML), LaTeX, Lua, Pascal,
+SGML, Shell, Tcsh, Vim, XML. Other languages may already have support via
+|filetype-plugin|s.
+
+To support a new language, see |matchit-newlang| below.
+
+DETAILS: *matchit-details* *matchit-parse*
+
+Here is an outline of what matchit.vim does each time you hit the "%" key. If
+there are |backref|s in |b:match_words| then the first step is to produce a
+version in which these back references have been eliminated; if there are no
+|backref|s then this step is skipped. This step is called parsing. For
+example, "\(foo\|bar\):end\1" is parsed to yield
+"\(foo\|bar\):end\(foo\|bar\)". This can get tricky, especially if there are
+nested groups. If debugging is turned on, the parsed version is saved as
+|b:match_pat|.
+
+ *matchit-choose*
+Next, the script looks for a word on the current line that matches the pattern
+just constructed. It includes the patterns from the 'matchpairs' option.
+The goal is to do what you expect, which turns out to be a little complicated.
+The script follows these rules:
+
+ Insist on a match that ends on or after the cursor.
+ Prefer a match that includes the cursor position (that is, one that
+ starts on or before the cursor).
+ Prefer a match that starts as close to the cursor as possible.
+ Prefer a match in |b:match_words| to a match in 'matchpairs'.
+ If more than one pattern in |b:match_words| matches, choose the one
+ that is listed first.
+
+Examples:
+
+ Suppose you >
+ :let b:match_words = '<:>,<tag>:</tag>'
+< and hit "%" with the cursor on or before the "<" in "a <tag> is born".
+ The pattern '<' comes first, so it is preferred over '<tag>', which
+ also matches. If the cursor is on the "t", however, then '<tag>' is
+ preferred, because this matches a bit of text containing the cursor.
+ If the two groups of patterns were reversed then '<' would never be
+ preferred.
+
+ Suppose you >
+ :let b:match_words = 'if:end if'
+< (Note the space!) and hit "%" with the cursor at the end of "end if".
+ Then "if" matches, which is probably not what you want, but if the
+ cursor starts on the "end " then "end if" is chosen. (You can avoid
+ this problem by using a more complicated pattern.)
+
+If there is no match, the script falls back on the usual behavior of |%|. If
+debugging is turned on, the matched bit of text is saved as |b:match_match|
+and the cursor column of the start of the match is saved as |b:match_col|.
+
+Next, the script looks through |b:match_words| (original and parsed versions)
+for the group and pattern that match. If debugging is turned on, the group is
+saved as |b:match_ini| (the first pattern) and |b:match_tail| (the rest). If
+there are |backref|s then, in addition, the matching pattern is saved as
+|b:match_word| and a table of translations is saved as |b:match_table|. If
+there are |backref|s, these are determined from the matching pattern and
+|b:match_match| and substituted into each pattern in the matching group.
+
+The script decides whether to search forwards or backwards and chooses
+arguments for the |searchpair()| function. Then, the cursor is moved to the
+start of the match, and |searchpair()| is called. By default, matching
+structures inside strings and comments are ignored. This can be changed by
+setting |b:match_skip|.
+
+==============================================================================
+2. Activation *matchit-activate*
+
+You can use this script as a plugin, by copying it to your plugin directory.
+See |add-global-plugin| for instructions. You can also add a line to your
+|vimrc| file, such as >
+ :source $VIMRUNTIME/macros/matchit.vim
+or >
+ :runtime macros/matchit.vim
+Either way, the script should start working the next time you start up Vim.
+
+The script does nothing unless it finds a |buffer-variable| named
+|b:match_words|. The script contains autocommands that set this variable for
+various file types: see |matchit-languages| above. For a new language, you
+can add autocommands to the script or to your vimrc file, but the recommended
+method is to add a line such as >
+ let b:match_words = '\<foo\>:\<bar\>'
+to the |filetype-plugin| for your language. See |b:match_words| below for how
+this variable is interpreted.
+
+TROUBLESHOOTING *matchit-troubleshoot*
+
+The script should work in most installations of Vim. It may not work if Vim
+was compiled with a minimal feature set, for example if the |+syntax| option
+was not enabled. If your Vim has support for syntax compiled in, but you do
+not have |syntax| highlighting turned on, matchit.vim should work, but it may
+fail to skip matching groups in comments and strings. If the |filetype|
+mechanism is turned off, the |b:match_words| variable will probably not be
+defined automatically.
+
+==============================================================================
+3. Configuration *matchit-configure*
+
+There are several variables that govern the behavior of matchit.vim. Note
+that these are variables local to the buffer, not options, so use |:let| to
+define them, not |:set|. Some of these variables have values that matter; for
+others, it only matters whether the variable has been defined. All of these
+can be defined in the |filetype-plugin| or autocommand that defines
+|b:match_words| or "on the fly."
+
+The main variable is |b:match_words|. It is described in the section below on
+supporting a new language.
+
+ *MatchError* *matchit-hl* *matchit-highlight*
+MatchError is the highlight group for error messages from the script. By
+default, it is linked to WarningMsg. If you do not want to be bothered by
+error messages, you can define this to be something invisible. For example,
+if you use the GUI version of Vim and your command line is normally white, you
+can do >
+ :hi MatchError guifg=white guibg=white
+<
+ *b:match_ignorecase*
+If you >
+ :let b:match_ignorecase = 1
+then matchit.vim acts as if 'ignorecase' is set: for example, "end" and "END"
+are equivalent. If you >
+ :let b:match_ignorecase = 0
+then matchit.vim treats "end" and "END" differently. (There will be no
+b:match_infercase option unless someone requests it.)
+
+ *b:match_debug*
+Define b:match_debug if you want debugging information to be saved. See
+|matchit-debug|, below.
+
+ *b:match_skip*
+If b:match_skip is defined, it is passed as the skip argument to
+|searchpair()|. This controls when matching structures are skipped, or
+ignored. By default, they are ignored inside comments and strings, as
+determined by the |syntax| mechanism. (If syntax highlighting is turned off,
+nothing is skipped.) You can set b:match_skip to a string, which evaluates to
+a non-zero, numerical value if the match is to be skipped or zero if the match
+should not be skipped. In addition, the following special values are
+supported by matchit.vim:
+ s:foo becomes (current syntax item) =~ foo
+ S:foo becomes (current syntax item) !~ foo
+ r:foo becomes (line before cursor) =~ foo
+ R:foo becomes (line before cursor) !~ foo
+(The "s" is meant to suggest "syntax", and the "r" is meant to suggest
+"regular expression".)
+
+Examples:
+
+ You can get the default behavior with >
+ :let b:match_skip = 's:comment\|string'
+<
+ If you want to skip matching structures unless they are at the start
+ of the line (ignoring whitespace) then you can >
+ :let b:match_skip = 'R:^\s*'
+< Do not do this if strings or comments can span several lines, since
+ the normal syntax checking will not be done if you set b:match_skip.
+
+ In LaTeX, since "%" is used as the comment character, you can >
+ :let b:match_skip = 'r:%'
+< Unfortunately, this will skip anything after "\%", an escaped "%". To
+ allow for this, and also "\\%" (an excaped backslash followed by the
+ comment character) you can >
+ :let b:match_skip = 'r:\(^\|[^\\]\)\(\\\\\)*%'
+<
+ See the $VIMRUNTIME/ftplugin/vim.vim for an example that uses both
+ syntax and a regular expression.
+
+==============================================================================
+4. Supporting a New Language *matchit-newlang*
+ *b:match_words*
+In order for matchit.vim to support a new language, you must define a suitable
+pattern for |b:match_words|. You may also want to set some of the
+|matchit-configure| variables, as described above. If your language has a
+complicated syntax, or many keywords, you will need to know something about
+Vim's |regular-expression|s.
+
+The format for |b:match_words| is similar to that of the 'matchpairs' option:
+it is a comma (,)-separated list of groups; each group is a colon(:)-separated
+list of patterns (regular expressions). Commas and backslashes that are part
+of a pattern should be escaped with backslashes ('\:' and '\,'). It is OK to
+have only one group; the effect is undefined if a group has only one pattern.
+A simple example is >
+ :let b:match_words = '\<if\>:\<endif\>,'
+ \ . '\<while\>:\<continue\>:\<break\>:\<endwhile\>'
+(In Vim regular expressions, |\<| and |\>| denote word boundaries. Thus "if"
+matches the end of "endif" but "\<if\>" does not.) Then banging on the "%"
+key will bounce the cursor between "if" and the matching "endif"; and from
+"while" to any matching "continue" or "break", then to the matching "endwhile"
+and back to the "while". It is almost always easier to use |literal-string|s
+(single quotes) as above: '\<if\>' rather than "\\<if\\>" and so on.
+
+Exception: If the ":" character does not appear in b:match_words, then it is
+treated as an expression to be evaluated. For example, >
+ :let b:match_words = 'GetMatchWords()'
+allows you to define a function. This can return a different string depending
+on the current syntax, for example.
+
+Once you have defined the appropriate value of |b:match_words|, you will
+probably want to have this set automatically each time you edit the
+appropriate file type. The recommended way to do this is by adding the
+definition to a |filetype-plugin| file.
+
+Tips: Be careful that your initial pattern does not match your final pattern.
+See the example above for the use of word-boundary expressions. It is usually
+better to use ".\{-}" (as many as necessary) instead of ".*" (as many as
+possible). See |\{-|. For example, in the string "<tag>label</tag>", "<.*>"
+matches the whole string whereas "<.\{-}>" and "<[^>]*>" match "<tag>" and
+"</tag>".
+
+ *matchit-spaces* *matchit-s:notend*
+If "if" is to be paired with "end if" (Note the space!) then word boundaries
+are not enough. Instead, define a regular expression s:notend that will match
+anything but "end" and use it as follows: >
+ :let s:notend = '\%(\<end\s\+\)\@<!'
+ :let b:match_words = s:notend . '\<if\>:\<end\s\+if\>'
+< *matchit-s:sol*
+This is a simplified version of what is done for Ada. The s:notend is a
+|script-variable|. Similarly, you may want to define a start-of-line regular
+expression >
+ :let s:sol = '\%(^\|;\)\s*'
+if keywords are only recognized after the start of a line or after a
+semicolon (;), with optional white space.
+
+ *matchit-backref* *matchit-\1*
+In any group, the expressions |\1|, |\2|, ..., |\9| refer to parts of the
+INITIAL pattern enclosed in |\(|escaped parentheses|\)|. These are referred
+to as back references, or backrefs. For example, >
+ :let b:match_words = '\<b\(o\+\)\>:\(h\)\1\>'
+means that "bo" pairs with "ho" and "boo" pairs with "hoo" and so on. Note
+that "\1" does not refer to the "\(h\)" in this example. If you have
+"\(nested \(parentheses\)\) then "\d" refers to the d-th "\(" and everything
+up to and including the matching "\)": in "\(nested\(parentheses\)\)", "\1"
+refers to everything and "\2" refers to "\(parentheses\)". If you use a
+variable such as |s:notend| or |s:sol| in the previous paragraph then remember
+to count any "\(" patterns in this variable. You do not have to count groups
+defined by |\%(\)|.
+
+It should be possible to resolve back references from any pattern in the
+group. For example, >
+ :let b:match_words = '\(foo\)\(bar\):more\1:and\2:end\1\2'
+would not work because "\2" cannot be determined from "morefoo" and "\1"
+cannot be determined from "andbar". On the other hand, >
+ :let b:match_words = '\(\(foo\)\(bar\)\):\3\2:end\1'
+should work (and have the same effect as "foobar:barfoo:endfoobar"), although
+this has not been thoroughly tested.
+
+You can use |zero-width| patterns such as |\@<=| and |\zs|. (The latter has
+not been thouroughly tested in matchit.vim.) For example, if the keyword "if"
+must occur at the start of the line, with optional white space, you might use
+the pattern "\(^\s*\)\@<=if" so that the cursor will end on the "i" instead of
+at the start of the line. For another example, if HTML had only one tag then