Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

first commit

  • Loading branch information...
commit 451f244f0b4b3aa119c8d54cdb1b708d911a884a 0 parents
Derek Wyatt authored
Showing with 72,449 additions and 0 deletions.
  1. +9 −0 .gitignore
  2. +3 −0  README.md
  3. +468 −0 after/ftplugin/cpp.vim
  4. +18 −0 after/ftplugin/help.vim
  5. +55 −0 after/ftplugin/wiki.vim
  6. +5 −0 after/plugin/fuzzyfinder.vim
  7. +1 −0  after/plugin/solarized.vim
  8. +25 −0 after/syntax/cpp/stl.vim
  9. +114 −0 after/syntax/help.vim
  10. +140 −0 autoload/pathogen.vim
  11. +1,029 −0 bundle/vim-align/autoload/Align.vim
  12. +330 −0 bundle/vim-align/autoload/AlignMaps.vim
  13. +1,469 −0 bundle/vim-align/doc/Align.txt
  14. +85 −0 bundle/vim-align/doc/tags
  15. +246 −0 bundle/vim-align/plugin/AlignMapsPlugin.vim
  16. +41 −0 bundle/vim-align/plugin/AlignPlugin.vim
  17. +510 −0 bundle/vim-align/plugin/cecutil.vim
  18. +626 −0 bundle/vim-bufkill/plugin/bufkill.vim
  19. +14,112 −0 bundle/vim-cref/doc/crefvim.txt
  20. +1,742 −0 bundle/vim-cref/doc/crefvimdoc.txt
  21. +30,720 −0 bundle/vim-cref/doc/stlrefvim.txt
  22. +1,629 −0 bundle/vim-cref/doc/tags
  23. +356 −0 bundle/vim-cref/plugin/crefvim.vim
  24. +361 −0 bundle/vim-cref/plugin/stlrefvim.vim
  25. +547 −0 bundle/vim-easygrep/doc/EasyGrep.txt
  26. +36 −0 bundle/vim-easygrep/doc/tags
  27. +2,236 −0 bundle/vim-easygrep/plugin/EasyGrep.vim
  28. +72 −0 bundle/vim-easygrep/plugin/EasyGrepFileAssociations
  29. +643 −0 bundle/vim-filtering/plugin/filtering.vim
  30. +1,046 −0 bundle/vim-fuzzyfinder/autoload/fuf.vim
  31. +163 −0 bundle/vim-fuzzyfinder/autoload/fuf/bookmarkdir.vim
  32. +199 −0 bundle/vim-fuzzyfinder/autoload/fuf/bookmarkfile.vim
  33. +189 −0 bundle/vim-fuzzyfinder/autoload/fuf/buffer.vim
  34. +300 −0 bundle/vim-fuzzyfinder/autoload/fuf/buffertag.vim
  35. +137 −0 bundle/vim-fuzzyfinder/autoload/fuf/callbackfile.vim
  36. +139 −0 bundle/vim-fuzzyfinder/autoload/fuf/callbackitem.vim
  37. +172 −0 bundle/vim-fuzzyfinder/autoload/fuf/changelist.vim
  38. +199 −0 bundle/vim-fuzzyfinder/autoload/fuf/coveragefile.vim
  39. +132 −0 bundle/vim-fuzzyfinder/autoload/fuf/dir.vim
  40. +139 −0 bundle/vim-fuzzyfinder/autoload/fuf/file.vim
  41. +123 −0 bundle/vim-fuzzyfinder/autoload/fuf/givencmd.vim
  42. +123 −0 bundle/vim-fuzzyfinder/autoload/fuf/givendir.vim
  43. +121 −0 bundle/vim-fuzzyfinder/autoload/fuf/givenfile.vim
  44. +198 −0 bundle/vim-fuzzyfinder/autoload/fuf/help.vim
  45. +182 −0 bundle/vim-fuzzyfinder/autoload/fuf/jumplist.vim
  46. +135 −0 bundle/vim-fuzzyfinder/autoload/fuf/line.vim
  47. +134 −0 bundle/vim-fuzzyfinder/autoload/fuf/mrucmd.vim
  48. +234 −0 bundle/vim-fuzzyfinder/autoload/fuf/mrufile.vim
  49. +154 −0 bundle/vim-fuzzyfinder/autoload/fuf/quickfix.vim
  50. +178 −0 bundle/vim-fuzzyfinder/autoload/fuf/tag.vim
  51. +159 −0 bundle/vim-fuzzyfinder/autoload/fuf/taggedfile.vim
  52. +1,405 −0 bundle/vim-fuzzyfinder/doc/fuf.jax
  53. +1,883 −0 bundle/vim-fuzzyfinder/doc/fuf.txt
  54. +176 −0 bundle/vim-fuzzyfinder/doc/tags
  55. +174 −0 bundle/vim-fuzzyfinder/doc/tags-ja
  56. +158 −0 bundle/vim-fuzzyfinder/plugin/fuf.vim
  57. +1,980 −0 bundle/vim-genutils/autoload/genutils.vim
  58. +1,047 −0 bundle/vim-genutils/plugin/genutils.vim
  59. +1,178 −0 bundle/vim-gnupg/plugin/gnupg.vim
  60. +682 −0 bundle/vim-histwin/autoload/histwin.vim
  61. +380 −0 bundle/vim-histwin/doc/histwin.txt
  62. +15 −0 bundle/vim-histwin/doc/tags
  63. +42 −0 bundle/vim-histwin/plugin/histwinPlugin.vim
  64. +570 −0 bundle/vim-l9/autoload/l9.vim
  65. +92 −0 bundle/vim-l9/autoload/l9/async.py
  66. +67 −0 bundle/vim-l9/autoload/l9/async.vim
  67. +107 −0 bundle/vim-l9/autoload/l9/quickfix.vim
  68. +112 −0 bundle/vim-l9/autoload/l9/tempbuffer.vim
  69. +60 −0 bundle/vim-l9/autoload/l9/tempvariables.vim
  70. +55 −0 bundle/vim-l9/doc/l9.jax
  71. +73 −0 bundle/vim-l9/doc/l9.txt
  72. +9 −0 bundle/vim-l9/doc/tags
Sorry, we could not display the entire diff because too many files (341) changed.
9 .gitignore
@@ -0,0 +1,9 @@
+vim-solarized
+vim-fugitive
+vim-fswitch
+vim-protodef
+vim-unimpaired
+vim-scala
+vim-easymotion
+vim-twitvim
+vim-rim
3  README.md
@@ -0,0 +1,3 @@
+# Derek Wyatt's Vim Configuration
+
+Yup... it's a vim configuration.
468 after/ftplugin/cpp.vim
@@ -0,0 +1,468 @@
+"
+" C++ Filetype Plugin
+" Derek Wyatt (derek <at> [my first name][mylastname] <dot> org)
+" http://derekwyatt.org
+"
+
+" We want to keep comments within an 80 column limit, but not code.
+" These two options give us that
+setlocal formatoptions=crq
+setlocal textwidth=80
+
+" This makes doxygen comments work the same as regular comments
+setlocal comments-=://
+setlocal comments+=:///,://
+
+" Indents are 4 spaces
+setlocal shiftwidth=4
+setlocal tabstop=4
+setlocal softtabstop=4
+
+" And they really are spaces, *not* tabs
+setlocal expandtab
+
+" Setup for indending
+setlocal nosmartindent
+setlocal autoindent
+setlocal cinkeys-=0#
+setlocal cinoptions+=^
+setlocal cinoptions+=g0
+setlocal cinoptions+=:0
+setlocal cinoptions+=(0
+
+" Highlight strings inside C comments
+let c_comment_strings=1
+
+" Load up the doxygen syntax
+let g:load_doxygen_syntax=1
+
+"
+" AddCPPUnitTestMacros()
+"
+" This function ensures that the CPPUNIT_TEST() entries in the header of the
+" C++ test class remain up to date with the tests that are actually defined
+" in the test class itself.
+"
+" class MyTests : public CppUnit::TestCase
+" {
+" CPPUNIT_TEST_SUITE(MyTests);
+" CPPUNIT_TEST(testOne);
+" CPPUNIT_TEST(testTwo);
+" // testThree() will go here when this function is called
+" CPPUNIT_TEST_SUITE_END();
+" public:
+" void testOne()
+" {
+" // Test code goes here
+" }
+"
+" void testTwo()
+" {
+" // Test code goes here
+" }
+"
+" void testThree()
+" {
+" // Test code goes here
+" }
+"
+" };
+"
+" It works off of a convention that test functions look like this:
+"
+" ^\s\+void test.*
+"
+" If you have a different convention you'll need to modify this code.
+"
+function! AddCPPUnitTestMacros()
+ if s:modifyCPPUnitHeader == 0
+ return
+ endif
+ let suitestart = search("CPPUNIT_TEST_SUITE(", 'nw')
+ if suitestart == 0
+ return
+ endif
+ execute "normal mp"
+ let contents = getbufline(bufname('%'), 1, "$")
+ let testlines = []
+ for line in contents
+ if match(line, "void test") != -1
+ let beg = match(line, "test")
+ let fin = match(line, "(")
+ let fun = strpart(line, beg, fin - beg)
+ call add(testlines, "CPPUNIT_TEST(".fun.");")
+ endif
+ endfor
+ if len(testlines) > 0
+ let suitestart = search("CPPUNIT_TEST_SUITE(", 'nw')
+ let suiteend = search("CPPUNIT_TEST_SUITE_END(", 'nw')
+ let suitestart = suitestart + 1
+ let suiteend = suiteend - 1
+ if suitestart <= suiteend
+ execute suitestart.",".suiteend."d"
+ endif
+ let linenum = suitestart - 1
+ for line in testlines
+ call setpos('.', [0, linenum, 0, 0])
+ execute "normal o".line
+ let linenum = linenum + 1
+ endfor
+ endif
+ execute "normal `p"
+endfunction
+
+" These functions and the s:modifyCPPUnitHeader variable allow the
+" functionality to be turned on and off. There are times you want to
+" comment out some tests and not have them updated automatically during
+" a run, so you'd want to shut this feature off.
+let s:modifyCPPUnitHeader = 0
+command! CPPUnitHeaderModify let s:modifyCPPUnitHeader = 1
+command! CPPUnitHeaderNoModify let s:modifyCPPUnitHeader = 0
+
+" Now plugin the AddCPPUnitTestMacros() to be called automatically
+" just before we write the file
+au! BufWritePre *.cpp call AddCPPUnitTestMacros()
+
+"
+" We want our code to stay within a certain set column length but we don't
+" want to be so brutal as to force an automatic word wrap by setting
+" 'textwidth'. What we want is to give a gentle reminder that we've gone
+" over our limits. To do this, we use the following two functions and some
+" colour settings.
+"
+" In addition to the column highlighting we also want to highlight when
+" there are leading tabs in the code - the last thing we want is people not
+" using the equivalent of 'expandtab' in their editors. When we load the
+" file in Vim we want to know that we've got some obnoxious leading tabs
+" that we should clean up.
+"
+
+"
+" DisableErrorHighlights()
+"
+" Clear out the highlighting that was done to warn us about the messes.
+"
+function! DisableErrorHighlights()
+ if exists("w:match120")
+ call matchdelete(w:match120)
+ unlet w:match120
+ endif
+ if exists("w:matchTab")
+ call matchdelete(w:matchTab)
+ unlet w:matchTab
+ endif
+endfunction
+
+"
+" EnableErrorHighlights()
+"
+" Highlight the stuff we are unhappy with.
+"
+function! EnableErrorHighlights()
+ if !exists("w:match120")
+ let w:match120=matchadd('BadInLine', '\%121v.*', -1)
+ endif
+ if !exists("w:matchTab")
+ let w:matchTab=matchadd('BadInLine', '^\t\+', -1)
+ endif
+endfunction
+
+"
+" AlterColour()
+"
+" This function is used in setting the error highlighting to compute an
+" appropriate colour for the highlighting that is computed independently
+" from the colour scheme itself. I find this nicer than hard-coding the
+" colour.
+"
+function! AlterColour(groupname, attr, shift)
+ let clr = synIDattr(synIDtrans(hlID(a:groupname)), a:attr)
+ if match(clr, '^#') == 0
+ let red = str2nr(strpart(clr, 1, 2), 16)
+ let green = str2nr(strpart(clr, 3, 2), 16)
+ let blue = str2nr(strpart(clr, 5, 2), 16)
+ let red = red + a:shift
+ if red <= 0
+ let red = "00"
+ elseif red >= 256
+ let red = "ff"
+ else
+ let red = printf("%02x", red)
+ end
+ let green = green + a:shift
+ if green <= 0
+ let green = "00"
+ elseif green >= 256
+ let green = "ff"
+ else
+ let green = printf("%02x", green)
+ end
+ let blue = blue + a:shift
+ if blue <= 0
+ let blue = "00"
+ elseif blue >= 256
+ let blue = "ff"
+ else
+ let blue = printf("%02x", blue)
+ end
+ return "#" . red . green . blue
+ elseif strlen(clr) != 0
+ echoerr 'Colour is not in hex form (' . clr . ')'
+ return clr
+ else
+ return ''
+ endif
+endfunction
+
+" The syntax highlight we use for the above error highlighting is 'BadInLine'
+" and we set what that colour is right here. I use the AlterColour() function
+" defined above to compute the right colour that's essentially colorshceme
+" neutral
+"
+" It's easier just to use black :)
+let darkerbg = ""
+if strlen(darkerbg) == 0
+ let darkerbg = "black"
+end
+exe "hi BadInLine gui=none guibg=" . darkerbg
+
+" Enable/Disable the highlighting of tabs and of line length overruns
+nmap <silent> ,ee :call EnableErrorHighlights()<CR>
+nmap <silent> ,ed :call DisableErrorHighlights()<CR>
+
+" set up retabbing on a source file
+nmap <silent> ,rr :1,$retab<CR>
+
+" Fix up indent issues - I can't stand wasting an indent because I'm in a
+" namespace. If you don't like this then just comment this line out.
+setlocal indentexpr=GetCppIndentNoNamespace(v:lnum)
+
+"
+" Helper functions for the Indent code below
+"
+function! IsBlockComment(lnum)
+ if getline(a:lnum) =~ '^\s*/\*'
+ return 1
+ else
+ return 0
+ endif
+endfunction
+
+function! IsBlockEndComment(lnum)
+ if getline(a:lnum) =~ '^\s*\*/'
+ return 1
+ else
+ return 0
+ endif
+endfunction
+
+function! IsLineComment(lnum)
+ if getline(a:lnum) =~ '^\s*//'
+ return 1
+ else
+ return 0
+ endif
+endfunction
+
+function! IsBrace(lnum)
+ if getline(a:lnum) =~ '^\s*{'
+ return 1
+ else
+ return 0
+ endif
+endfunction
+
+function! IsCode(lnum)
+ if !IsBrace(a:lnum) && getline(a:lnum) =~ '^\s*\S'
+ return 1
+ else
+ return 0
+ endif
+endfunction
+
+"
+" GetCppIndentNoNamespace()
+"
+" This little function calculates the indent level for C++ and treats the
+" namespace differently than usual - we ignore it. The indent level is the for
+" a given line is the same as it would be were the namespace not event there.
+"
+function! GetCppIndentNoNamespace(lnum)
+ let nsLineNum = search('^\s*\<namespace\>\s\+\S\+', 'bnW')
+ if nsLineNum == 0
+ return cindent(a:lnum)
+ else
+ let inBlockComment = 0
+ let inLineComment = 0
+ let inCode = 0
+ for n in range(nsLineNum + 1, a:lnum - 1)
+ if IsBlockComment(n)
+ let inBlockComment = 1
+ elseif IsBlockEndComment(n)
+ let inBlockComment = 0
+ elseif IsLineComment(n) && inBlockComment == 0
+ let inLineComment = 1
+ elseif IsCode(n) && inBlockComment == 0
+ let inCode = 1
+ break
+ endif
+ endfor
+ if inCode == 1
+ if IsBrace(a:lnum) && GetCppIndentNoNamespace(a:lnum - 1) == 0
+ return 0
+ else
+ return cindent(a:lnum)
+ endif
+ elseif inBlockComment
+ return cindent(a:lnum)
+ elseif inLineComment
+ if IsCode(a:lnum)
+ return cindent(nsLineNum)
+ else
+ return cindent(a:ln
+ endif
+ elseif inBlockComment == 0 && inLineComment == 0 && inCode == 0
+ return cindent(nsLineNum)
+ endif
+ endif
+endfunction
+
+"
+" FuzzyFinder stuff
+"
+"
+" SanitizeDirForFuzzyFinder()
+"
+" This is really just a convenience function to clean up
+" any stray '/' characters in the path, should they be there.
+"
+function! SanitizeDirForFuzzyFinder(dir)
+ let dir = expand(a:dir)
+ let dir = substitute(dir, '/\+$', '', '')
+ let dir = substitute(dir, '/\+', '/', '')
+
+ return dir
+endfunction
+
+"
+" GetDirForFuzzyFinder()
+"
+" The important function... Given a directory to start 'from',
+" walk up the hierarchy, looking for a path that matches the
+" 'addon' you want to see.
+"
+" If nothing can be found, then we just return the 'from' so
+" we don't really get the advantage of a hint, but just let
+" the user start from wherever he was starting from anyway.
+"
+function! GetDirForFuzzyFinder(from, addon)
+ let from = SanitizeDirForFuzzyFinder(a:from)
+ let addon = expand(a:addon)
+ let addon = substitute(addon, '^/\+', '', '')
+ let found = ''
+ " If the addon is right here, then we win
+ if isdirectory(from . '/' . addon)
+ let found = from . '/' . addon
+ else
+ let dirs = split(from, '/')
+ if !has('win32') && !has('win64')
+ let dirs[0] = '/' . dirs[0]
+ endif
+ " Walk up the tree and see if it's anywhere there
+ for n in range(len(dirs) - 1, 0, -1)
+ let path = join(dirs[0:n], '/')
+ if isdirectory(path . '/' . addon)
+ let found = path . '/' . addon
+ break
+ endif
+ endfor
+ endif
+ " If we found it, then let's see if we can go deeper
+ "
+ " For example, we may have found component_name/include
+ " but what if that directory only has a single directory
+ " in it, and that subdirectory only has a single directory
+ " in it, etc... ? This can happen when you're segmenting
+ " by namespace like this:
+ "
+ " component_name/include/org/vim/CoolClass.h
+ "
+ " You may find yourself always typing '' from the
+ " 'include' directory just to go into 'org/vim' so let's
+ " just eliminate the need to hit the ''.
+ if found != ''
+ let tempfrom = found
+ let globbed = globpath(tempfrom, '*')
+ while len(split(globbed, "\n")) == 1
+ let tempfrom = globbed
+ let globbed = globpath(tempfrom, '*')
+ endwhile
+ let found = SanitizeDirForFuzzyFinder(tempfrom) . '/'
+ else
+ let found = from
+ endif
+
+ return found
+endfunction
+
+"
+" GetDirForFuzzyFinder()
+"
+" Now overload GetDirForFuzzyFinder() specifically for
+" the test directory (I'm really only interested in going
+" down into test/src 90% of the time, so let's hit that
+" 90% and leave the other 10% to couple of extra keystrokes)
+"
+function! GetTestDirForFuzzyFinder(from)
+ return GetDirForFuzzyFinder(a:from, 'test/src/')
+endfunction
+
+"
+" GetIncludeDirForFuzzyFinder()
+"
+" Now specialize for the 'include'. Note that we rip off any
+" '/test/' in the current 'from'. Why? The /test/ directory
+" contains an 'include' directory, which would match if we
+" were anywhere in the 'test' directory, and we don't want that.
+"
+function! GetIncludeDirForFuzzyFinder(from)
+ let from = substitute(SanitizeDirForFuzzyFinder(a:from), '/test/.*$', '', '')
+ return GetDirForFuzzyFinder(from, 'include/')
+endfunction
+
+"
+" GetSrcDirForFuzzyFinder()
+"
+" Much like the GetIncludeDirForFuzzyFinder() but for the 'src' directory.
+"
+function! GetSrcDirForFuzzyFinder(from)
+ let from = substitute(SanitizeDirForFuzzyFinder(a:from), '/test/.*$', '', '')
+ return GetDirForFuzzyFinder(from, 'src/')
+endfunction
+
+nnoremap <buffer> <silent> ,ft :FufFile <c-r>=GetTestDirForFuzzyFinder('%:p:h')<cr><cr>
+nnoremap <buffer> <silent> ,fi :FufFile <c-r>=GetIncludeDirForFuzzyFinder('%:p:h')<cr><cr>
+nnoremap <buffer> <silent> ,fs :FufFile <c-r>=GetSrcDirForFuzzyFinder('%:p:h')<cr><cr>
+
+"
+" ProtoDef Settings
+" See http://www.vim.org/scripts/script.php?script_id=2624
+"
+let g:protodefprotogetter = expand($VIM) . '/pullproto.pl'
+let g:protodefctagsexe = '/ctags57/ctags.exe'
+
+augroup local_ftplugin_cpp
+ au!
+ " Enable and disable the highlighting of lines greater than
+ " our 'allowed' length
+ au BufWinEnter *.h,*.cpp call EnableErrorHighlights()
+ au BufWinLeave *.h,*.cpp call DisableErrorHighlights()
+ " Change the directory when entering a buffer
+ au BufWinEnter,BufEnter *.h,*.cpp :lcd %:h
+ " Settings for the FSwitch plugin
+ " See http://www.vim.org/scripts/script.php?script_id=2590
+ au BufEnter *.cpp let b:fswitchlocs = 'reg:/src/include/,reg:|src|include/**|,../include'
+ au BufEnter *.h let b:fswitchlocs = 'reg:/include/src/,reg:|include/.*|src|,reg:|include/.*||,../src'
+ au BufEnter *.h let b:fswitchdst = 'cpp'
+augroup END
+
18 after/ftplugin/help.vim
@@ -0,0 +1,18 @@
+function! JustifySectionTitle()
+ let line = getline('.')
+ let matches = matchlist(line, '^\(.\{-}\)\s\+\(\*.*\)\s*$')
+ let title = matches[1]
+ let theTag = matches[2]
+ let numSpaces = 78 - strlen(title) - strlen(theTag)
+ let c = 0
+ let spc = ""
+ while c < numSpaces
+ let spc = spc . " "
+ let c = c + 1
+ endwhile
+ let lnum = getpos('.')[1] - 1
+ normal dd
+ call append(lnum, title . spc . theTag)
+endfunction
+
+nmap ,jt :call JustifySectionTitle()<cr>
55 after/ftplugin/wiki.vim
@@ -0,0 +1,55 @@
+iabbrev <buffer> ALP [[ALP]]
+iabbrev <buffer> AccountSettings [[AccountSettings]]
+iabbrev <buffer> Adapter [[Adapter]]
+iabbrev <buffer> Agent [[Agent]]
+iabbrev <buffer> BBID [[BBID]]
+iabbrev <buffer> BBItemId [[BBItemId]]
+iabbrev <buffer> BCMI [[BCMI]]
+iabbrev <buffer> CalendarItem [[CalendarItem]]
+iabbrev <buffer> CalendarItems [[CalendarItem]]s
+iabbrev <buffer> Capabilities [[Capabilities]]
+iabbrev <buffer> Capability [[Capability]]
+iabbrev <buffer> ClassWaterMark [[ClassWaterMark]]
+iabbrev <buffer> ClassWaterMarks [[ClassWaterMark]]s
+iabbrev <buffer> Command [[Command]]
+iabbrev <buffer> ContactItem [[CalendarItem]]
+iabbrev <buffer> ContactItems [[CalendarItem]]s
+iabbrev <buffer> Create [[Create]]
+iabbrev <buffer> Delete [[Delete]]
+iabbrev <buffer> Device [[Device]]
+iabbrev <buffer> EmailItem [[CalendarItem]]
+iabbrev <buffer> EmailItems [[CalendarItem]]s
+iabbrev <buffer> Event [[Event]]
+iabbrev <buffer> Events [[Event]]s
+iabbrev <buffer> FolderItem [[FolderItem]]
+iabbrev <buffer> FolderItems [[FolderItem]]s
+iabbrev <buffer> FolderWaterMark [[FolderWaterMark]]
+iabbrev <buffer> FolderWaterMarks [[FolderWaterMark]]s
+iabbrev <buffer> Hydrah [[Hydrah]]
+iabbrev <buffer> ItemPresence [[ItemPresence]]
+iabbrev <buffer> ItemType [[ItemType]]
+iabbrev <buffer> MSID [[MSID]]
+iabbrev <buffer> MSItemId [[MSItemId]]
+iabbrev <buffer> MemoItem [[MemoItem]]
+iabbrev <buffer> MemoItems [[MemoItem]]s
+iabbrev <buffer> OrganizationSettings [[OrganizationSettings]]
+iabbrev <buffer> Pattern [[Pattern]]
+iabbrev <buffer> PatternType [[PatternType]]
+iabbrev <buffer> Patterns [[Pattern]]s
+iabbrev <buffer> Result [[Result]]
+iabbrev <buffer> ResultPattern [[ResultPattern]]
+iabbrev <buffer> Retrieve [[Retrieve]]
+iabbrev <buffer> SelectPattern [[SelectPattern]]
+iabbrev <buffer> Session [[Session]]
+iabbrev <buffer> SessionSettings [[SessionSettings]]
+iabbrev <buffer> State [[State]]
+iabbrev <buffer> Sync [[Sync]]
+iabbrev <buffer> ss [[Sync Server]]
+iabbrev <buffer> TaskItem [[TaskItem]]
+iabbrev <buffer> TaskItems [[TaskItem]]s
+iabbrev <buffer> Update [[Update]]
+iabbrev <buffer> VersionMark [[VersionMark]]
+iabbrev <buffer> VersionMarks [[VersionMark]]s
+iabbrev <buffer> WaterMark [[WaterMark]]
+iabbrev <buffer> WaterMarks [[WaterMark]]s
+iabbrev <buffer> bbc [[BlackBerry Core]]
5 after/plugin/fuzzyfinder.vim
@@ -0,0 +1,5 @@
+let g:projectRootDir = "/dev/null"
+let g:fuf_enumeratingLimit = 50
+let g:fuf_smartBs = 0
+let g:fuf_file_exclude .= '|\.(jar)$'
+let g:fuf_modesDisable = []
1  after/plugin/solarized.vim
@@ -0,0 +1 @@
+call togglebg#map("<c-F5>")
25 after/syntax/cpp/stl.vim
@@ -0,0 +1,25 @@
+" Vim syntax file
+" Language: C++ special highlighting for STL classes and methods
+" Maintainer: Jean-Francois Guchens (thanks to Nathan Skvirsky)
+" Last Change: 2008 May 02
+
+" [DQW] For now, this is annoying but there's still potential here
+finish
+
+syn keyword cppSTL abort abs accumulate acos adjacent_difference adjacent_find adjacent_find_if append asctime asin assert assign at atan atan2 atexit atof atoi atol back back_inserter bad bad_alloc bad_cast bad_exception bad_typeid badbit beg begin binary_compose binary_negate binary_search bind2nd binder1st binder2nd bitset bsearch c_str calloc capacity ceil cerr cin clear clearerr clock clog close compare compose1 compose2 construct copy copy_backward copy_n cos cosh count count_if cout ctime data destroy difference_type difftime div domain_error empty end endl eof eofbit equal equal_range erase exception exit exp fabs fail failbit failure fclose feof ferror fflush fgetc fgetpos fgets fill fill_n find find_end find_first_not_of find_first_of find_if find_last_not_of find_last_of first flags flip floor flush fmod fopen for_each fprintf fputc fputs fread free freopen frexp front fscanf fseek fsetpos ftell fwrite gcount generate generate_n get get_temporary_buffer getc getchar getenv getline gets gmtime good goodbit greater greater_equal ignore in includes inner_product inplace_merge insert inserter invalid_argument ios ios_base iostate iota is_heap is_open is_sorted isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit iter_swap iterator_category key_comp ldiv length length_error less less_equal lexicographical_compare lexicographical_compare_3way localtime log log10 logic_error logical_and logical_not logical_or longjmp lower_bound make_heap malloc max max_element max_size mem_fun mem_fun1 mem_fun1_ref mem_fun_ref memchr memcpy memmove memset merge min min_element minus mismatch mktime modf modulus multiplies negate next_permutation npos nth_element numeric_limits open out_of_range overflow_error partial_sort partial_sort_copy partial_sum partition peek perror plus pop pop_back pop_front pop_heap pow power precision prev_permutation printf ptr_fun push push_back push_front push_heap put putback putc putchar puts qsort raise rand random_sample random_sample_n random_shuffle range_error rbegin rdbuf rdstate read realloc reference remove remove_copy remove_copy_if remove_if rename rend replace replace_copy replace_copy_if replace_if reserve reset resize return_temporary_buffer reverse reverse_copy rewind rfind rotate rotate_copy runtime_error scanf search search_n second seekg seekp set_difference set_intersection set_symmetric_difference set_union setbuf setf setjmp setlocale setvbuf signal sin sinh size size_t size_type sort sort_heap splice sprintf sqrt srand sscanf stable_partition stable_sort std str strcat strchr strcmp strcoll strcpy strcspn strerror strftime string strlen strncat strncmp strncpy strpbrk strrchr strspn strstr strtod strtok strtol strtoul strxfrm substr swap swap_ranges sync_with_stdio system tan tanh tellg tellp test time time_t tmpfile tmpnam to_string to_ulong tolower top toupper transform unary_compose unary_negate underflow_error unget ungetc uninitialized_copy uninitialized_copy_n uninitialized_fill uninitialized_fill_n unique unique_copy unsetf upper_bound va_arg value_comp value_type vfprintf vprintf vsprintf width write tr1 boost posix_time
+
+syn keyword cppSTLtype istreambuf_iterator filebuf string ofstream ifstream stream istream_iterator istringstream ostream ostream_iterator ostringstream fstream auto_ptr pointer pointer_to_binary_function pointer_to_unary_function basic_string bit_vector bitset char_producer deque hash hash_map hash_multimap hash_multiset hash_set list map multimap multiset queue priority_queue rope set stack vector back_insert_iterator iterator bidirectional_iterator bidirectional_iterator_tag forward_iterator forward_iterator_tag front_insert_iterator input_iterator input_iterator_tag insert_iterator istream_iterator iterator_traits ostream_iterator output_iterator output_iterator_tag random_access_iterator random_access_iterator_tag raw_storage_iterator reverse_bidirectional_iterator reverse_iterator sequence_buffer binary_compose binary_function binary_negate binder1st binder2nd divides equal_to unary_compose unary_function unary_negate pair char_traits const_iterator reverse_iterator temporary_buffer shared_ptr any wstring ptime
+
+" Default highlighting
+if version >= 508 || !exists("did_cpp_syntax_inits")
+ if version < 508
+ let did_cpp_syntax_inits = 1
+ command -nargs=+ HiLink hi link <args>
+ else
+ command -nargs=+ HiLink hi def link <args>
+ endif
+ HiLink cppSTL Identifier
+ HiLink cppSTLtype Type
+ delcommand HiLink
+endif
+
114 after/syntax/help.vim
@@ -0,0 +1,114 @@
+"*****************************************************************************
+"** Name: help.vim - extend standard syntax highlighting for help **
+"** **
+"** Type: syntax file **
+"** **
+"** Author: Christian Habermann **
+"** christian (at) habermann-net (point) de **
+"** **
+"** Copyright: (c) 2002-2004 by Christian Habermann **
+"** **
+"** License: GNU General Public License 2 (GPL 2) or later **
+"** **
+"** This program is free software; you can redistribute it **
+"** and/or modify it under the terms of the GNU General Public **
+"** License as published by the Free Software Foundation; either **
+"** version 2 of the License, or (at your option) any later **
+"** version. **
+"** **
+"** This program is distributed in the hope that it will be **
+"** useful, but WITHOUT ANY WARRANTY; without even the implied **
+"** warrenty of MERCHANTABILITY or FITNESS FOR A PARTICULAR **
+"** PURPOSE. **
+"** See the GNU General Public License for more details. **
+"** **
+"** Version: 1.0.1 **
+"** tested under Linux and Win32, VIM and GVIM 6.2 **
+"** **
+"** History: 0.1.0 12. Dec. 2002 - 21. Feb. 2003 **
+"** initial version, not released **
+"** 1.0.0 6. Apr. 2003 **
+"** no changes, first release **
+"** 1.0.1 3. Mar. 2004 **
+"** marker changed from 0xa7 to $ in order to avoid problems **
+"** with fonts that use codes > 0x7f as multibyte characters **
+"** (e.g. Chinese, Korean, Japanese... fonts) **
+"** **
+"** **
+"*****************************************************************************
+"** Description: **
+"** This syntax file extends the standard syntax highlighting for help **
+"** files. This is needed in order to view the C-reference manual **
+"** of the project CRefVim correctly. **
+"** This syntax file is only active for the help file named **
+"** "crefvim.txt". For other help files no extention on syntax **
+"** highlighting is applied. **
+"** **
+"** For futher information see crefvimdoc.txt or do :help crefvimdoc **
+"** **
+"** Happy viming... **
+"*****************************************************************************
+
+
+" extend syntax-highlighting for "crefvim.txt" only (not case-sensitive)
+
+if tolower(expand("%:t"))=="crefvim.txt"
+ syn match helpCRVSubStatement "statement[0-9Ns]*" contained
+ syn match helpCRVSubCondition "condition[0-9]*" contained
+ syn match helpCRVSubExpression "expression[0-9]*" contained
+ syn match helpCRVSubExpr "expr[0-9N]" contained
+ syn match helpCRVSubType "type-name" contained
+ syn match helpCRVSubIdent "identifier" contained
+ syn match helpCRVSubIdentList "identifier-list" contained
+ syn match helpCRVSubOperand "operand[0-9]*" contained
+ syn match helpCRVSubConstExpr "constant-expression[1-9Ns]*" contained
+ syn match helpCRVSubClassSpec "storage-class-specifier" contained
+ syn match helpCRVSubTypeSpec "type-specifier" contained
+ syn match helpCRVSubEnumList "enumerator-list" contained
+ syn match helpCRVSubDecl "declarator" contained
+ syn match helpCRVSubRetType "return-type" contained
+ syn match helpCRVSubFuncName "function-name" contained
+ syn match helpCRVSubParamList "parameter-list" contained
+ syn match helpCRVSubReplList "replacement-list" contained
+ syn match helpCRVSubNewLine "newline" contained
+ syn match helpCRVSubMessage "message" contained
+ syn match helpCRVSubFilename "filename" contained
+ syn match helpCRVSubDigitSeq "digit-sequence" contained
+ syn match helpCRVSubMacroNames "macro-name[s]*" contained
+ syn match helpCRVSubDirective "directive" contained
+
+
+ syn match helpCRVignore "\$[a-zA-Z0-9\\\*/\._=()\-+%<>&\^|!~\?:,\[\];{}#\'\" ]\+\$" contains=helpCRVstate
+ syn match helpCRVstate "[a-zA-Z0-9\\\*/\._=()\-+%<>&\^|!~\?:,\[\];{}#\'\" ]\+" contained contains=helpCRVSub.*
+
+
+ hi helpCRVitalic term=italic cterm=italic gui=italic
+
+ hi def link helpCRVstate Comment
+ hi def link helpCRVSubStatement helpCRVitalic
+ hi def link helpCRVSubCondition helpCRVitalic
+ hi def link helpCRVSubExpression helpCRVitalic
+ hi def link helpCRVSubExpr helpCRVitalic
+ hi def link helpCRVSubOperand helpCRVitalic
+ hi def link helpCRVSubType helpCRVitalic
+ hi def link helpCRVSubIdent helpCRVitalic
+ hi def link helpCRVSubIdentList helpCRVitalic
+ hi def link helpCRVSubConstExpr helpCRVitalic
+ hi def link helpCRVSubClassSpec helpCRVitalic
+ hi def link helpCRVSubTypeSpec helpCRVitalic
+ hi def link helpCRVSubEnumList helpCRVitalic
+ hi def link helpCRVSubDecl helpCRVitalic
+ hi def link helpCRVSubRetType helpCRVitalic
+ hi def link helpCRVSubFuncName helpCRVitalic
+ hi def link helpCRVSubParamList helpCRVitalic
+ hi def link helpCRVSubReplList helpCRVitalic
+ hi def link helpCRVSubNewLine helpCRVitalic
+ hi def link helpCRVSubMessage helpCRVitalic
+ hi def link helpCRVSubFilename helpCRVitalic
+ hi def link helpCRVSubDigitSeq helpCRVitalic
+ hi def link helpCRVSubMacroNames helpCRVitalic
+ hi def link helpCRVSubDirective helpCRVitalic
+ hi def link helpCRVignore Ignore
+endif
+
+" vim: ts=8 sw=2
140 autoload/pathogen.vim
@@ -0,0 +1,140 @@
+" pathogen.vim - path option manipulation
+" Maintainer: Tim Pope <vimNOSPAM@tpope.org>
+" Version: 1.2
+
+" Install in ~/.vim/autoload (or ~\vimfiles\autoload).
+"
+" API is documented below.
+
+if exists("g:loaded_pathogen") || &cp
+ finish
+endif
+let g:loaded_pathogen = 1
+
+" Split a path into a list.
+function! pathogen#split(path) abort " {{{1
+ if type(a:path) == type([]) | return a:path | endif
+ let split = split(a:path,'\\\@<!\%(\\\\\)*\zs,')
+ return map(split,'substitute(v:val,''\\\([\\,]\)'',''\1'',"g")')
+endfunction " }}}1
+
+" Convert a list to a path.
+function! pathogen#join(...) abort " {{{1
+ if type(a:1) == type(1) && a:1
+ let i = 1
+ let space = ' '
+ else
+ let i = 0
+ let space = ''
+ endif
+ let path = ""
+ while i < a:0
+ if type(a:000[i]) == type([])
+ let list = a:000[i]
+ let j = 0
+ while j < len(list)
+ let escaped = substitute(list[j],'[,'.space.']\|\\[\,'.space.']\@=','\\&','g')
+ let path .= ',' . escaped
+ let j += 1
+ endwhile
+ else
+ let path .= "," . a:000[i]
+ endif
+ let i += 1
+ endwhile
+ return substitute(path,'^,','','')
+endfunction " }}}1
+
+" Convert a list to a path with escaped spaces for 'path', 'tag', etc.
+function! pathogen#legacyjoin(...) abort " {{{1
+ return call('pathogen#join',[1] + a:000)
+endfunction " }}}1
+
+" Remove duplicates from a list.
+function! pathogen#uniq(list) abort " {{{1
+ let i = 0
+ let seen = {}
+ while i < len(a:list)
+ if has_key(seen,a:list[i])
+ call remove(a:list,i)
+ else
+ let seen[a:list[i]] = 1
+ let i += 1
+ endif
+ endwhile
+ return a:list
+endfunction " }}}1
+
+" Returns a hash indicating which filetype features are enabled.
+function! pathogen#filetype() abort " {{{1
+ redir => output
+ silent filetype
+ redir END
+ let result = {}
+ let result.detection = match(output,'detection:ON') >= 0
+ let result.indent = match(output,'indent:ON') >= 0
+ let result.plugin = match(output,'plugin:ON') >= 0
+ return result
+endfunction " }}}1
+
+" \ on Windows unless shellslash is set, / everywhere else.
+function! pathogen#separator() abort " {{{1
+ return !exists("+shellslash") || &shellslash ? '/' : '\'
+endfunction " }}}1
+
+" Convenience wrapper around glob() which returns a list.
+function! pathogen#glob(pattern) abort " {{{1
+ let files = split(glob(a:pattern),"\n")
+ return map(files,'substitute(v:val,"[".pathogen#separator()."/]$","","")')
+endfunction "}}}1
+
+" Like pathogen#glob(), only limit the results to directories.
+function! pathogen#glob_directories(pattern) abort " {{{1
+ return filter(pathogen#glob(a:pattern),'isdirectory(v:val)')
+endfunction "}}}1
+
+" Prepend all subdirectories of path to the rtp, and append all after
+" directories in those subdirectories.
+function! pathogen#runtime_prepend_subdirectories(path) " {{{1
+ let sep = pathogen#separator()
+ let before = pathogen#glob_directories(a:path.sep."*[^~]")
+ let after = pathogen#glob_directories(a:path.sep."*[^~]".sep."after")
+ let rtp = pathogen#split(&rtp)
+ let path = expand(a:path)
+ call filter(rtp,'v:val[0:strlen(path)-1] !=# path')
+ let &rtp = pathogen#join(pathogen#uniq(before + rtp + after))
+ return &rtp
+endfunction " }}}1
+
+" For each directory in rtp, check for a subdirectory named dir. If it
+" exists, add all subdirectories of that subdirectory to the rtp, immediately
+" after the original directory. If no argument is given, 'bundle' is used.
+" Repeated calls with the same arguments are ignored.
+function! pathogen#runtime_append_all_bundles(...) " {{{1
+ let sep = pathogen#separator()
+ let name = a:0 ? a:1 : 'bundle'
+ let list = []
+ for dir in pathogen#split(&rtp)
+ if dir =~# '\<after$'
+ let list += pathogen#glob_directories(substitute(dir,'after$',name.sep.'*[^~]'.sep.'after','')) + [dir]
+ else
+ let list += [dir] + pathogen#glob_directories(dir.sep.name.sep.'*[^~]')
+ endif
+ endfor
+ let &rtp = pathogen#join(pathogen#uniq(list))
+ return 1
+endfunction
+
+" }}}1
+
+" Invoke :helptags on all non-$VIM doc directories in runtimepath.
+function! pathogen#helptags() " {{{1
+ for dir in pathogen#split(&rtp)
+ "if dir[0 : strlen($VIM)-1] !=# $VIM && isdirectory(dir.'/doc') && (!filereadable(dir.'/doc/tags') || filewritable(dir.'/doc/tags'))
+ if isdirectory(dir.'/doc') && (!filereadable(dir.'/doc/tags') || filewritable(dir.'/doc/tags'))
+ helptags `=dir.'/doc'`
+ endif
+ endfor
+endfunction " }}}1
+
+" vim:set ft=vim ts=8 sw=2 sts=2:
1,029 bundle/vim-align/autoload/Align.vim
@@ -0,0 +1,1029 @@
+" Align: tool to align multiple fields based on one or more separators
+" Author: Charles E. Campbell, Jr.
+" Date: Mar 03, 2009
+" Version: 35
+" GetLatestVimScripts: 294 1 :AutoInstall: Align.vim
+" GetLatestVimScripts: 1066 1 :AutoInstall: cecutil.vim
+" Copyright: Copyright (C) 1999-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,
+" Align.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.
+"
+" Romans 1:16,17a : For I am not ashamed of the gospel of Christ, for it is {{{1
+" the power of God for salvation for everyone who believes; for the Jew first,
+" and also for the Greek. For in it is revealed God's righteousness from
+" faith to faith.
+
+" ---------------------------------------------------------------------
+" Load Once: {{{1
+if exists("g:loaded_Align") || &cp
+ finish
+endif
+let g:loaded_Align = "v35"
+if v:version < 700
+ echohl WarningMsg
+ echo "***warning*** this version of Align needs vim 7.0"
+ echohl Normal
+ finish
+endif
+let s:keepcpo= &cpo
+set cpo&vim
+"DechoTabOn
+
+" ---------------------------------------------------------------------
+" Debugging Support: {{{1
+"if !exists("g:loaded_Decho") | runtime plugin/Decho.vim | endif
+
+" ---------------------------------------------------------------------
+" Options: {{{1
+if !exists("g:Align_xstrlen")
+ if &enc == "latin1" || $LANG == "en_US.UTF-8" || !has("multi_byte")
+ let g:Align_xstrlen= 0
+ else
+ let g:Align_xstrlen= 1
+ endif
+endif
+
+" ---------------------------------------------------------------------
+" Align#AlignCtrl: enter alignment patterns here {{{1
+"
+" Styles = all alignment-break patterns are equivalent
+" C cycle through alignment-break pattern(s)
+" l left-justified alignment
+" r right-justified alignment
+" c center alignment
+" - skip separator, treat as part of field
+" : treat rest of line as field
+" + repeat previous [lrc] style
+" < left justify separators
+" > right justify separators
+" | center separators
+"
+" Builds = s:AlignPat s:AlignCtrl s:AlignPatQty
+" C s:AlignPat s:AlignCtrl s:AlignPatQty
+" p s:AlignPrePad
+" P s:AlignPostPad
+" w s:AlignLeadKeep
+" W s:AlignLeadKeep
+" I s:AlignLeadKeep
+" l s:AlignStyle
+" r s:AlignStyle
+" - s:AlignStyle
+" + s:AlignStyle
+" : s:AlignStyle
+" c s:AlignStyle
+" g s:AlignGPat
+" v s:AlignVPat
+" < s:AlignSep
+" > s:AlignSep
+" | s:AlignSep
+fun! Align#AlignCtrl(...)
+
+" call Dfunc("AlignCtrl(...) a:0=".a:0)
+
+ " save options that will be changed
+ let keep_search = @/
+ let keep_ic = &ic
+
+ " turn ignorecase off
+ set noic
+
+ " clear visual mode so that old visual-mode selections don't
+ " get applied to new invocations of Align().
+ if v:version < 602
+ if !exists("s:Align_gavemsg")
+ let s:Align_gavemsg= 1
+ echomsg "Align needs at least Vim version 6.2 to clear visual-mode selection"
+ endif
+ elseif exists("s:dovisclear")
+" call Decho("clearing visual mode a:0=".a:0." a:1<".a:1.">")
+ let clearvmode= visualmode(1)
+ endif
+
+ " set up a list akin to an argument list
+ if a:0 > 0
+ let A= s:QArgSplitter(a:1)
+ else
+ let A=[0]
+ endif
+
+ if A[0] > 0
+ let style = A[1]
+
+ " Check for bad separator patterns (zero-length matches)
+ " (but zero-length patterns for g/v is ok)
+ if style !~# '[gv]'
+ let ipat= 2
+ while ipat <= A[0]
+ if "" =~ A[ipat]
+ echoerr "AlignCtrl: separator<".A[ipat]."> matches zero-length string"
+ let &ic= keep_ic
+" call Dret("AlignCtrl")
+ return
+ endif
+ let ipat= ipat + 1
+ endwhile
+ endif
+ endif
+
+" call Decho("AlignCtrl() A[0]=".A[0])
+ if !exists("s:AlignStyle")
+ let s:AlignStyle= "l"
+ endif
+ if !exists("s:AlignPrePad")
+ let s:AlignPrePad= 0
+ endif
+ if !exists("s:AlignPostPad")
+ let s:AlignPostPad= 0
+ endif
+ if !exists("s:AlignLeadKeep")
+ let s:AlignLeadKeep= 'w'
+ endif
+
+ if A[0] == 0
+ " ----------------------
+ " List current selection
+ " ----------------------
+ if !exists("s:AlignPatQty")
+ let s:AlignPatQty= 0
+ endif
+ echo "AlignCtrl<".s:AlignCtrl."> qty=".s:AlignPatQty." AlignStyle<".s:AlignStyle."> Padding<".s:AlignPrePad."|".s:AlignPostPad."> LeadingWS=".s:AlignLeadKeep." AlignSep=".s:AlignSep
+" call Decho("AlignCtrl<".s:AlignCtrl."> qty=".s:AlignPatQty." AlignStyle<".s:AlignStyle."> Padding<".s:AlignPrePad."|".s:AlignPostPad."> LeadingWS=".s:AlignLeadKeep." AlignSep=".s:AlignSep)
+ if exists("s:AlignGPat") && !exists("s:AlignVPat")
+ echo "AlignGPat<".s:AlignGPat.">"
+ elseif !exists("s:AlignGPat") && exists("s:AlignVPat")
+ echo "AlignVPat<".s:AlignVPat.">"
+ elseif exists("s:AlignGPat") && exists("s:AlignVPat")
+ echo "AlignGPat<".s:AlignGPat."> AlignVPat<".s:AlignVPat.">"
+ endif
+ let ipat= 1
+ while ipat <= s:AlignPatQty
+ echo "Pat".ipat."<".s:AlignPat_{ipat}.">"
+" call Decho("Pat".ipat."<".s:AlignPat_{ipat}.">")
+ let ipat= ipat + 1
+ endwhile
+
+ else
+ " ----------------------------------
+ " Process alignment control settings
+ " ----------------------------------
+" call Decho("process the alignctrl settings")
+" call Decho("style<".style.">")
+
+ if style ==? "default"
+ " Default: preserve initial leading whitespace, left-justified,
+ " alignment on '=', one space padding on both sides
+ if exists("s:AlignCtrlStackQty")
+ " clear AlignCtrl stack
+ while s:AlignCtrlStackQty > 0
+ call Align#AlignPop()
+ endwhile
+ unlet s:AlignCtrlStackQty
+ endif
+ " Set AlignCtrl to its default value
+ call Align#AlignCtrl("Ilp1P1=<",'=')
+ call Align#AlignCtrl("g")
+ call Align#AlignCtrl("v")
+ let s:dovisclear = 1
+ let &ic = keep_ic
+ let @/ = keep_search
+" call Dret("AlignCtrl")
+ return
+ endif
+
+ if style =~# 'm'
+ " map support: Do an AlignPush now and the next call to Align()
+ " will do an AlignPop at exit
+" call Decho("style case m: do AlignPush")
+ call Align#AlignPush()
+ let s:DoAlignPop= 1
+ endif
+
+ " = : record a list of alignment patterns that are equivalent
+ if style =~# "="
+" call Decho("style case =: record list of equiv alignment patterns")
+ let s:AlignCtrl = '='
+ if A[0] >= 2
+ let s:AlignPatQty= 1
+ let s:AlignPat_1 = A[2]
+ let ipat = 3
+ while ipat <= A[0]
+ let s:AlignPat_1 = s:AlignPat_1.'\|'.A[ipat]
+ let ipat = ipat + 1
+ endwhile
+ let s:AlignPat_1= '\('.s:AlignPat_1.'\)'
+" call Decho("AlignCtrl<".s:AlignCtrl."> AlignPat<".s:AlignPat_1.">")
+ endif
+
+ "c : cycle through alignment pattern(s)
+ elseif style =~# 'C'
+" call Decho("style case C: cycle through alignment pattern(s)")
+ let s:AlignCtrl = 'C'
+ if A[0] >= 2
+ let s:AlignPatQty= A[0] - 1
+ let ipat = 1
+ while ipat < A[0]
+ let s:AlignPat_{ipat}= A[ipat+1]
+" call Decho("AlignCtrl<".s:AlignCtrl."> AlignQty=".s:AlignPatQty." AlignPat_".ipat."<".s:AlignPat_{ipat}.">")
+ let ipat= ipat + 1
+ endwhile
+ endif
+ endif
+
+ if style =~# 'p'
+ let s:AlignPrePad= substitute(style,'^.*p\(\d\+\).*$','\1','')
+" call Decho("style case p".s:AlignPrePad.": pre-separator padding")
+ if s:AlignPrePad == ""
+ echoerr "AlignCtrl: 'p' needs to be followed by a numeric argument'
+ let @/ = keep_search
+ let &ic= keep_ic
+" call Dret("AlignCtrl")
+ return
+ endif
+ endif
+
+ if style =~# 'P'
+ let s:AlignPostPad= substitute(style,'^.*P\(\d\+\).*$','\1','')
+" call Decho("style case P".s:AlignPostPad.": post-separator padding")
+ if s:AlignPostPad == ""
+ echoerr "AlignCtrl: 'P' needs to be followed by a numeric argument'
+ let @/ = keep_search
+ let &ic= keep_ic
+" call Dret("AlignCtrl")
+ return
+ endif
+ endif
+
+ if style =~# 'w'
+" call Decho("style case w: ignore leading whitespace")
+ let s:AlignLeadKeep= 'w'
+ elseif style =~# 'W'
+" call Decho("style case w: keep leading whitespace")
+ let s:AlignLeadKeep= 'W'
+ elseif style =~# 'I'
+" call Decho("style case w: retain initial leading whitespace")
+ let s:AlignLeadKeep= 'I'
+ endif
+
+ if style =~# 'g'
+ " first list item is a "g" selector pattern
+" call Decho("style case g: global selector pattern")
+ if A[0] < 2
+ if exists("s:AlignGPat")
+ unlet s:AlignGPat
+" call Decho("unlet s:AlignGPat")
+ endif
+ else
+ let s:AlignGPat= A[2]
+" call Decho("s:AlignGPat<".s:AlignGPat.">")
+ endif
+ elseif style =~# 'v'
+ " first list item is a "v" selector pattern
+" call Decho("style case v: global selector anti-pattern")
+ if A[0] < 2
+ if exists("s:AlignVPat")
+ unlet s:AlignVPat
+" call Decho("unlet s:AlignVPat")
+ endif
+ else
+ let s:AlignVPat= A[2]
+" call Decho("s:AlignVPat<".s:AlignVPat.">")
+ endif
+ endif
+
+ "[-lrc+:] : set up s:AlignStyle
+ if style =~# '[-lrc+:]'
+" call Decho("style case [-lrc+:]: field justification")
+ let s:AlignStyle= substitute(style,'[^-lrc:+]','','g')
+" call Decho("AlignStyle<".s:AlignStyle.">")
+ endif
+
+ "[<>|] : set up s:AlignSep
+ if style =~# '[<>|]'
+" call Decho("style case [-lrc+:]: separator justification")
+ let s:AlignSep= substitute(style,'[^<>|]','','g')
+" call Decho("AlignSep ".s:AlignSep)
+ endif
+ endif
+
+ " sanity
+ if !exists("s:AlignCtrl")
+ let s:AlignCtrl= '='
+ endif
+
+ " restore search and options
+ let @/ = keep_search
+ let &ic= keep_ic
+
+" call Dret("AlignCtrl ".s:AlignCtrl.'p'.s:AlignPrePad.'P'.s:AlignPostPad.s:AlignLeadKeep.s:AlignStyle)
+ return s:AlignCtrl.'p'.s:AlignPrePad.'P'.s:AlignPostPad.s:AlignLeadKeep.s:AlignStyle
+endfun
+
+" ---------------------------------------------------------------------
+" s:MakeSpace: returns a string with spacecnt blanks {{{1
+fun! s:MakeSpace(spacecnt)
+" call Dfunc("MakeSpace(spacecnt=".a:spacecnt.")")
+ let str = ""
+ let spacecnt = a:spacecnt
+ while spacecnt > 0
+ let str = str . " "
+ let spacecnt = spacecnt - 1
+ endwhile
+" call Dret("MakeSpace <".str.">")
+ return str
+endfun
+
+" ---------------------------------------------------------------------
+" Align#Align: align selected text based on alignment pattern(s) {{{1
+fun! Align#Align(hasctrl,...) range
+" call Dfunc("Align#Align(hasctrl=".a:hasctrl.",...) a:0=".a:0)
+
+ " sanity checks
+ if string(a:hasctrl) != "0" && string(a:hasctrl) != "1"
+ echohl Error|echo 'usage: Align#Align(hasctrl<'.a:hasctrl.'> (should be 0 or 1),"separator(s)" (you have '.a:0.') )'|echohl None
+" call Dret("Align#Align")
+ return
+ endif
+ if exists("s:AlignStyle") && s:AlignStyle == ":"
+ echohl Error |echo '(Align#Align) your AlignStyle is ":", which implies "do-no-alignment"!'|echohl None
+" call Dret("Align#Align")
+ return
+ endif
+
+ " set up a list akin to an argument list
+ if a:0 > 0
+ let A= s:QArgSplitter(a:1)
+ else
+ let A=[0]
+ endif
+
+ " if :Align! was used, then the first argument is (should be!) an AlignCtrl string
+ " Note that any alignment control set this way will be temporary.
+ let hasctrl= a:hasctrl
+" call Decho("hasctrl=".hasctrl)
+ if a:hasctrl && A[0] >= 1
+" call Decho("Align! : using A[1]<".A[1]."> for AlignCtrl")
+ if A[1] =~ '[gv]'
+ let hasctrl= hasctrl + 1
+ call Align#AlignCtrl('m')
+ call Align#AlignCtrl(A[1],A[2])
+" call Decho("Align! : also using A[2]<".A[2]."> for AlignCtrl")
+ elseif A[1] !~ 'm'
+ call Align#AlignCtrl(A[1]."m")
+ else
+ call Align#AlignCtrl(A[1])
+ endif
+ endif
+
+ " Check for bad separator patterns (zero-length matches)
+ let ipat= 1 + hasctrl
+ while ipat <= A[0]
+ if "" =~ A[ipat]
+ echoerr "Align: separator<".A[ipat]."> matches zero-length string"
+" call Dret("Align#Align")
+ return
+ endif
+ let ipat= ipat + 1
+ endwhile
+
+ " record current search pattern for subsequent restoration
+ let keep_search= @/
+ let keep_ic = &ic
+ let keep_report= &report
+ set noic report=10000
+
+ if A[0] > hasctrl
+ " Align will accept a list of separator regexps
+" call Decho("A[0]=".A[0].": accepting list of separator regexp")
+
+ if s:AlignCtrl =~# "="
+ "= : consider all separators to be equivalent
+" call Decho("AlignCtrl: record list of equivalent alignment patterns")
+ let s:AlignCtrl = '='
+ let s:AlignPat_1 = A[1 + hasctrl]
+ let s:AlignPatQty= 1
+ let ipat = 2 + hasctrl
+ while ipat <= A[0]
+ let s:AlignPat_1 = s:AlignPat_1.'\|'.A[ipat]
+ let ipat = ipat + 1
+ endwhile
+ let s:AlignPat_1= '\('.s:AlignPat_1.'\)'
+" call Decho("AlignCtrl<".s:AlignCtrl."> AlignPat<".s:AlignPat_1.">")
+
+ elseif s:AlignCtrl =~# 'C'
+ "c : cycle through alignment pattern(s)
+" call Decho("AlignCtrl: cycle through alignment pattern(s)")
+ let s:AlignCtrl = 'C'
+ let s:AlignPatQty= A[0] - hasctrl
+ let ipat = 1
+ while ipat <= s:AlignPatQty
+ let s:AlignPat_{ipat}= A[(ipat + hasctrl)]
+" call Decho("AlignCtrl<".s:AlignCtrl."> AlignQty=".s:AlignPatQty." AlignPat_".ipat."<".s:AlignPat_{ipat}.">")
+ let ipat= ipat + 1
+ endwhile
+ endif
+ endif
+
+ " Initialize so that begline<endline and begcol<endcol.
+ " Ragged right: check if the column associated with '< or '>
+ " is greater than the line's string length -> ragged right.
+ " Have to be careful about visualmode() -- it returns the last visual
+ " mode used whether or not it was used currently.
+ let begcol = virtcol("'<")-1
+ let endcol = virtcol("'>")-1
+ if begcol > endcol
+ let begcol = virtcol("'>")-1
+ let endcol = virtcol("'<")-1
+ endif
+" call Decho("begcol=".begcol." endcol=".endcol)
+ let begline = a:firstline
+ let endline = a:lastline
+ if begline > endline
+ let begline = a:lastline
+ let endline = a:firstline
+ endif
+" call Decho("begline=".begline." endline=".endline)
+ let fieldcnt = 0
+ if (begline == line("'>") && endline == line("'<")) || (begline == line("'<") && endline == line("'>"))
+ let vmode= visualmode()
+" call Decho("vmode=".vmode)
+ if vmode == "\<c-v>"
+ if exists("g:Align_xstrlen") && g:Align_xstrlen
+ let ragged = ( col("'>") > s:Strlen(getline("'>")) || col("'<") > s:Strlen(getline("'<")) )
+ else
+ let ragged = ( col("'>") > strlen(getline("'>")) || col("'<") > strlen(getline("'<")) )
+ endif
+ else
+ let ragged= 1
+ endif
+ else
+ let ragged= 1
+ endif
+ if ragged
+ let begcol= 0
+ endif
+" call Decho("lines[".begline.",".endline."] col[".begcol.",".endcol."] ragged=".ragged." AlignCtrl<".s:AlignCtrl.">")
+
+ " Keep user options
+ let etkeep = &l:et
+ let pastekeep= &l:paste
+ setlocal et paste
+
+ " convert selected range of lines to use spaces instead of tabs
+ " but if first line's initial white spaces are to be retained
+ " then use 'em
+ if begcol <= 0 && s:AlignLeadKeep == 'I'
+ " retain first leading whitespace for all subsequent lines
+ let bgntxt= substitute(getline(begline),'^\(\s*\).\{-}$','\1','')
+" call Decho("retaining 1st leading whitespace: bgntxt<".bgntxt.">")
+ set noet
+ endif
+ exe begline.",".endline."ret"
+
+ " Execute two passes
+ " First pass: collect alignment data (max field sizes)
+ " Second pass: perform alignment
+ let pass= 1
+ while pass <= 2
+" call Decho(" ")
+" call Decho("---- Pass ".pass.": ----")
+
+ let line= begline
+ while line <= endline
+ " Process each line
+ let txt = getline(line)
+" call Decho(" ")
+" call Decho("Pass".pass.": Line ".line." <".txt.">")
+
+ " AlignGPat support: allows a selector pattern (akin to g/selector/cmd )
+ if exists("s:AlignGPat")
+" call Decho("Pass".pass.": AlignGPat<".s:AlignGPat.">")
+ if match(txt,s:AlignGPat) == -1
+" call Decho("Pass".pass.": skipping")
+ let line= line + 1
+ continue
+ endif
+ endif
+
+ " AlignVPat support: allows a selector pattern (akin to v/selector/cmd )
+ if exists("s:AlignVPat")
+" call Decho("Pass".pass.": AlignVPat<".s:AlignVPat.">")
+ if match(txt,s:AlignVPat) != -1
+" call Decho("Pass".pass.": skipping")
+ let line= line + 1
+ continue
+ endif
+ endif
+
+ " Always skip blank lines
+ if match(txt,'^\s*$') != -1
+" call Decho("Pass".pass.": skipping")
+ let line= line + 1
+ continue
+ endif
+
+ " Extract visual-block selected text (init bgntxt, endtxt)
+ if exists("g:Align_xstrlen") && g:Align_xstrlen
+ let txtlen= s:Strlen(txt)
+ else
+ let txtlen= strlen(txt)
+ endif
+ if begcol > 0
+ " Record text to left of selected area
+ let bgntxt= strpart(txt,0,begcol)
+" call Decho("Pass".pass.": record text to left: bgntxt<".bgntxt.">")
+ elseif s:AlignLeadKeep == 'W'
+ let bgntxt= substitute(txt,'^\(\s*\).\{-}$','\1','')
+" call Decho("Pass".pass.": retaining all leading ws: bgntxt<".bgntxt.">")
+ elseif s:AlignLeadKeep == 'w' || !exists("bgntxt")
+ " No beginning text
+ let bgntxt= ""
+" call Decho("Pass".pass.": no beginning text")
+ endif
+ if ragged
+ let endtxt= ""
+ else
+ " Elide any text lying outside selected columnar region
+ let endtxt= strpart(txt,endcol+1,txtlen-endcol)
+ let txt = strpart(txt,begcol,endcol-begcol+1)
+ endif
+" call Decho(" ")
+" call Decho("Pass".pass.": bgntxt<".bgntxt.">")
+" call Decho("Pass".pass.": txt<". txt .">")
+" call Decho("Pass".pass.": endtxt<".endtxt.">")
+ if !exists("s:AlignPat_{1}")
+ echohl Error|echo "no separators specified!"|echohl None
+" call Dret("Align#Align")
+ return
+ endif
+
+ " Initialize for both passes
+ let seppat = s:AlignPat_{1}
+ let ifield = 1
+ let ipat = 1
+ let bgnfield = 0
+ let endfield = 0
+ let alignstyle = s:AlignStyle
+ let doend = 1
+ let newtxt = ""
+ let alignprepad = s:AlignPrePad
+ let alignpostpad= s:AlignPostPad
+ let alignsep = s:AlignSep
+ let alignophold = " "
+ let alignop = "l"
+" call Decho("Pass".pass.": initial alignstyle<".alignstyle."> seppat<".seppat.">")
+
+ " Process each field on the line
+ while doend > 0
+
+ " C-style: cycle through pattern(s)
+ if s:AlignCtrl == 'C' && doend == 1
+ let seppat = s:AlignPat_{ipat}
+" call Decho("Pass".pass.": processing field: AlignCtrl=".s:AlignCtrl." ipat=".ipat." seppat<".seppat.">")
+ let ipat = ipat + 1
+ if ipat > s:AlignPatQty
+ let ipat = 1
+ endif
+ endif
+
+ " cyclic alignment/justification operator handling
+ let alignophold = alignop
+ let alignop = strpart(alignstyle,0,1)
+ if alignop == '+' || doend == 2
+ let alignop= alignophold
+ else
+ let alignstyle = strpart(alignstyle,1).strpart(alignstyle,0,1)
+ let alignopnxt = strpart(alignstyle,0,1)
+ if alignop == ':'
+ let seppat = '$'
+ let doend = 2
+" call Decho("Pass".pass.": alignop<:> case: setting seppat<$> doend==2")
+ endif
+ endif
+
+ " cylic separator alignment specification handling
+ let alignsepop= strpart(alignsep,0,1)
+ let alignsep = strpart(alignsep,1).alignsepop
+
+ " mark end-of-field and the subsequent end-of-separator.
+ " Extend field if alignop is '-'
+ let endfield = match(txt,seppat,bgnfield)
+ let sepfield = matchend(txt,seppat,bgnfield)
+ let skipfield= sepfield
+" call Decho("Pass".pass.": endfield=match(txt<".txt.">,seppat<".seppat.">,bgnfield=".bgnfield.")=".endfield)
+ while alignop == '-' && endfield != -1
+ let endfield = match(txt,seppat,skipfield)
+ let sepfield = matchend(txt,seppat,skipfield)
+ let skipfield = sepfield
+ let alignop = strpart(alignstyle,0,1)
+ let alignstyle= strpart(alignstyle,1).strpart(alignstyle,0,1)
+" call Decho("Pass".pass.": extend field: endfield<".strpart(txt,bgnfield,endfield-bgnfield)."> alignop<".alignop."> alignstyle<".alignstyle.">")
+ endwhile
+ let seplen= sepfield - endfield
+" call Decho("Pass".pass.": seplen=[sepfield=".sepfield."] - [endfield=".endfield."]=".seplen)
+
+ if endfield != -1
+ if pass == 1
+ " ---------------------------------------------------------------------
+ " Pass 1: Update FieldSize to max
+" call Decho("Pass".pass.": before lead/trail remove: field<".strpart(txt,bgnfield,endfield-bgnfield).">")
+ let field = substitute(strpart(txt,bgnfield,endfield-bgnfield),'^\s*\(.\{-}\)\s*$','\1','')
+ if s:AlignLeadKeep == 'W'
+ let field = bgntxt.field
+ let bgntxt= ""
+ endif
+ if exists("g:Align_xstrlen") && g:Align_xstrlen
+ let fieldlen = s:Strlen(field)
+ else
+ let fieldlen = strlen(field)
+ endif
+ let sFieldSize = "FieldSize_".ifield
+ if !exists(sFieldSize)
+ let FieldSize_{ifield}= fieldlen
+" call Decho("Pass".pass.": set FieldSize_{".ifield."}=".FieldSize_{ifield}." <".field.">")
+ elseif fieldlen > FieldSize_{ifield}
+ let FieldSize_{ifield}= fieldlen
+" call Decho("Pass".pass.": oset FieldSize_{".ifield."}=".FieldSize_{ifield}." <".field.">")
+ endif
+ let sSepSize= "SepSize_".ifield
+ if !exists(sSepSize)
+ let SepSize_{ifield}= seplen
+" call Decho(" set SepSize_{".ifield."}=".SepSize_{ifield}." <".field.">")
+ elseif seplen > SepSize_{ifield}
+ let SepSize_{ifield}= seplen
+" call Decho("Pass".pass.": oset SepSize_{".ifield."}=".SepSize_{ifield}." <".field.">")
+ endif
+
+ else
+ " ---------------------------------------------------------------------
+ " Pass 2: Perform Alignment
+ let prepad = strpart(alignprepad,0,1)
+ let postpad = strpart(alignpostpad,0,1)
+ let alignprepad = strpart(alignprepad,1).strpart(alignprepad,0,1)
+ let alignpostpad = strpart(alignpostpad,1).strpart(alignpostpad,0,1)
+ let field = substitute(strpart(txt,bgnfield,endfield-bgnfield),'^\s*\(.\{-}\)\s*$','\1','')
+ if s:AlignLeadKeep == 'W'
+ let field = bgntxt.field
+ let bgntxt= ""
+ endif
+ if doend == 2
+ let prepad = 0
+ let postpad= 0
+ endif
+ if exists("g:Align_xstrlen") && g:Align_xstrlen
+ let fieldlen = s:Strlen(field)
+ else
+ let fieldlen = strlen(field)
+ endif
+ let sep = s:MakeSpace(prepad).strpart(txt,endfield,sepfield-endfield).s:MakeSpace(postpad)
+ if seplen < SepSize_{ifield}
+ if alignsepop == "<"
+ " left-justify separators
+ let sep = sep.s:MakeSpace(SepSize_{ifield}-seplen)
+ elseif alignsepop == ">"
+ " right-justify separators
+ let sep = s:MakeSpace(SepSize_{ifield}-seplen).sep
+ else
+ " center-justify separators
+ let sepleft = (SepSize_{ifield} - seplen)/2
+ let sepright = SepSize_{ifield} - seplen - sepleft
+ let sep = s:MakeSpace(sepleft).sep.s:MakeSpace(sepright)
+ endif
+ endif
+ let spaces = FieldSize_{ifield} - fieldlen
+" call Decho("Pass".pass.": Field #".ifield."<".field."> spaces=".spaces." be[".bgnfield.",".endfield."] pad=".prepad.','.postpad." FS_".ifield."<".FieldSize_{ifield}."> sep<".sep."> ragged=".ragged." doend=".doend." alignop<".alignop.">")
+
+ " Perform alignment according to alignment style justification
+ if spaces > 0
+ if alignop == 'c'
+ " center the field
+ let spaceleft = spaces/2
+ let spaceright= FieldSize_{ifield} - spaceleft - fieldlen
+ let newtxt = newtxt.s:MakeSpace(spaceleft).field.s:MakeSpace(spaceright).sep
+ elseif alignop == 'r'
+ " right justify the field
+ let newtxt= newtxt.s:MakeSpace(spaces).field.sep
+ elseif ragged && doend == 2
+ " left justify rightmost field (no trailing blanks needed)
+ let newtxt= newtxt.field
+ else
+ " left justfiy the field
+ let newtxt= newtxt.field.s:MakeSpace(spaces).sep
+ endif
+ elseif ragged && doend == 2
+ " field at maximum field size and no trailing blanks needed
+ let newtxt= newtxt.field
+ else
+ " field is at maximum field size already
+ let newtxt= newtxt.field.sep
+ endif
+" call Decho("Pass".pass.": newtxt<".newtxt.">")
+ endif " pass 1/2
+
+ " bgnfield indexes to end of separator at right of current field
+ " Update field counter
+ let bgnfield= sepfield
+ let ifield = ifield + 1
+ if doend == 2
+ let doend= 0
+ endif
+ " handle end-of-text as end-of-field
+ elseif doend == 1
+ let seppat = '$'
+ let doend = 2
+ else
+ let doend = 0
+ endif " endfield != -1
+ endwhile " doend loop (as well as regularly separated fields)
+
+ if pass == 2
+ " Write altered line to buffer
+" call Decho("Pass".pass.": bgntxt<".bgntxt."> line=".line)
+" call Decho("Pass".pass.": newtxt<".newtxt.">")
+" call Decho("Pass".pass.": endtxt<".endtxt.">")
+ call setline(line,bgntxt.newtxt.endtxt)
+ endif
+
+ let line = line + 1
+ endwhile " line loop
+
+ let pass= pass + 1
+ endwhile " pass loop
+" call Decho("end of two pass loop")
+
+ " Restore user options
+ let &l:et = etkeep
+ let &l:paste = pastekeep
+
+ if exists("s:DoAlignPop")
+ " AlignCtrl Map support
+ call Align#AlignPop()
+ unlet s:DoAlignPop
+ endif
+
+ " restore current search pattern
+ let @/ = keep_search
+ let &ic = keep_ic
+ let &report = keep_report
+
+" call Dret("Align#Align")
+ return
+endfun
+
+" ---------------------------------------------------------------------
+" Align#AlignPush: this command/function pushes an alignment control string onto a stack {{{1
+fun! Align#AlignPush()
+" call Dfunc("AlignPush()")
+
+ " initialize the stack
+ if !exists("s:AlignCtrlStackQty")
+ let s:AlignCtrlStackQty= 1
+ else
+ let s:AlignCtrlStackQty= s:AlignCtrlStackQty + 1
+ endif
+
+ " construct an AlignCtrlStack entry
+ if !exists("s:AlignSep")
+ let s:AlignSep= ''
+ endif
+ let s:AlignCtrlStack_{s:AlignCtrlStackQty}= s:AlignCtrl.'p'.s:AlignPrePad.'P'.s:AlignPostPad.s:AlignLeadKeep.s:AlignStyle.s:AlignSep
+" call Decho("AlignPush: AlignCtrlStack_".s:AlignCtrlStackQty."<".s:AlignCtrlStack_{s:AlignCtrlStackQty}.">")
+
+ " push [GV] patterns onto their own stack
+ if exists("s:AlignGPat")
+ let s:AlignGPat_{s:AlignCtrlStackQty}= s:AlignGPat
+ else
+ let s:AlignGPat_{s:AlignCtrlStackQty}= ""
+ endif
+ if exists("s:AlignVPat")
+ let s:AlignVPat_{s:AlignCtrlStackQty}= s:AlignVPat
+ else
+ let s:AlignVPat_{s:AlignCtrlStackQty}= ""
+ endif
+
+" call Dret("AlignPush")
+endfun
+
+" ---------------------------------------------------------------------
+" Align#AlignPop: this command/function pops an alignment pattern from a stack {{{1
+" and into the AlignCtrl variables.
+fun! Align#AlignPop()
+" call Dfunc("Align#AlignPop()")
+
+ " sanity checks
+ if !exists("s:AlignCtrlStackQty")
+ echoerr "AlignPush needs to be used prior to AlignPop"
+" call Dret("Align#AlignPop <> : AlignPush needs to have been called first")
+ return ""
+ endif
+ if s:AlignCtrlStackQty <= 0
+ unlet s:AlignCtrlStackQty
+ echoerr "AlignPush needs to be used prior to AlignPop"
+" call Dret("Align#AlignPop <> : AlignPop needs to have been called first")
+ return ""
+ endif
+
+ " pop top of AlignCtrlStack and pass value to AlignCtrl
+ let retval=s:AlignCtrlStack_{s:AlignCtrlStackQty}
+ unlet s:AlignCtrlStack_{s:AlignCtrlStackQty}
+ call Align#AlignCtrl(retval)
+
+ " pop G pattern stack
+ if s:AlignGPat_{s:AlignCtrlStackQty} != ""
+ call Align#AlignCtrl('g',s:AlignGPat_{s:AlignCtrlStackQty})
+ else
+ call Align#AlignCtrl('g')
+ endif
+ unlet s:AlignGPat_{s:AlignCtrlStackQty}
+
+ " pop V pattern stack
+ if s:AlignVPat_{s:AlignCtrlStackQty} != ""
+ call Align#AlignCtrl('v',s:AlignVPat_{s:AlignCtrlStackQty})
+ else
+ call Align#AlignCtrl('v')
+ endif
+
+ unlet s:AlignVPat_{s:AlignCtrlStackQty}
+ let s:AlignCtrlStackQty= s:AlignCtrlStackQty - 1
+
+" call Dret("Align#AlignPop <".retval."> : AlignCtrlStackQty=".s:AlignCtrlStackQty)
+ return retval
+endfun
+
+" ---------------------------------------------------------------------
+" Align#AlignReplaceQuotedSpaces: {{{1
+fun! Align#AlignReplaceQuotedSpaces()
+" call Dfunc("AlignReplaceQuotedSpaces()")
+
+ let l:line = getline(line("."))
+ if exists("g:Align_xstrlen") && g:Align_xstrlen
+ let l:linelen = s:Strlen(l:line)
+ else
+ let l:linelen = strlen(l:line)
+ endif
+ let l:startingPos = 0
+ let l:startQuotePos = 0
+ let l:endQuotePos = 0
+ let l:spacePos = 0
+ let l:quoteRe = '\\\@<!"'
+
+" "call Decho("in replace spaces. line=" . line('.'))
+ while (1)
+ let l:startQuotePos = match(l:line, l:quoteRe, l:startingPos)
+ if (l:startQuotePos < 0)
+" "call Decho("No more quotes to the end of line")
+ break
+ endif
+ let l:endQuotePos = match(l:line, l:quoteRe, l:startQuotePos + 1)
+ if (l:endQuotePos < 0)
+" "call Decho("Mismatched quotes")
+ break
+ endif
+ let l:spaceReplaceRe = '^.\{' . (l:startQuotePos + 1) . '}.\{-}\zs\s\ze.*.\{' . (linelen - l:endQuotePos) . '}$'
+" "call Decho('spaceReplaceRe="' . l:spaceReplaceRe . '"')
+ let l:newStr = substitute(l:line, l:spaceReplaceRe, '%', '')
+ while (l:newStr != l:line)
+" "call Decho('newstr="' . l:newStr . '"')
+ let l:line = l:newStr
+ let l:newStr = substitute(l:line, l:spaceReplaceRe, '%', '')
+ endwhile
+ let l:startingPos = l:endQuotePos + 1
+ endwhile
+ call setline(line('.'), l:line)
+
+" call Dret("AlignReplaceQuotedSpaces")
+endfun
+
+" ---------------------------------------------------------------------
+" s:QArgSplitter: to avoid \ processing by <f-args>, <q-args> is needed. {{{1
+" However, <q-args> doesn't split at all, so this function returns a list
+" of arguments which has been:
+" * split at whitespace
+" * unless inside "..."s. One may escape characters with a backslash inside double quotes.
+" along with a leading length-of-list.
+"
+" Examples: %Align "\"" will align on "s
+" %Align " " will align on spaces
+"
+" The resulting list: qarglist[0] corresponds to a:0
+" qarglist[i] corresponds to a:{i}
+fun! s:QArgSplitter(qarg)
+" call Dfunc("s:QArgSplitter(qarg<".a:qarg.">)")
+
+ if a:qarg =~ '".*"'
+ " handle "..." args, which may include whitespace
+ let qarglist = []
+ let args = a:qarg
+" call Decho("handle quoted arguments: args<".args.">")
+ while args != ""
+ let iarg = 0
+ let arglen = strlen(args)
+" call Decho("args[".iarg."]<".args[iarg]."> arglen=".arglen)
+ " find index to first not-escaped '"'
+ while args[iarg] != '"' && iarg < arglen
+ if args[iarg] == '\'
+ let args= strpart(args,1)
+ endif
+ let iarg= iarg + 1
+ endwhile
+" call Decho("args<".args."> iarg=".iarg." arglen=".arglen)
+
+ if iarg > 0
+ " handle left of quote or remaining section
+" call Decho("handle left of quote or remaining section")
+ if args[iarg] == '"'
+ let qarglist= qarglist + split(strpart(args,0,iarg-1))
+ else
+ let qarglist= qarglist + split(strpart(args,0,iarg))
+ endif
+ let args = strpart(args,iarg)
+ let arglen = strlen(args)
+
+ elseif iarg < arglen && args[0] == '"'
+ " handle "quoted" section
+" call Decho("handle quoted section")
+ let iarg= 1
+ while args[iarg] != '"' && iarg < arglen
+ if args[iarg] == '\'
+ let args= strpart(args,1)
+ endif
+ let iarg= iarg + 1
+ endwhile
+" call Decho("args<".args."> iarg=".iarg." arglen=".arglen)
+ if args[iarg] == '"'
+ call add(qarglist,strpart(args,1,iarg-1))
+ let args= strpart(args,iarg+1)
+ else
+ let qarglist = qarglist + split(args)
+ let args = ""
+ endif
+ endif
+" call Decho("qarglist".string(qarglist)." iarg=".iarg." args<".args.">")
+ endwhile
+
+ else
+ " split at all whitespace
+ let qarglist= split(a:qarg)
+ endif
+
+ let qarglistlen= len(qarglist)
+ let qarglist = insert(qarglist,qarglistlen)
+" call Dret("s:QArgSplitter ".string(qarglist))
+ return qarglist
+endfun
+
+" ---------------------------------------------------------------------
+" s:Strlen: this function returns the length of a string, even if its {{{1
+" using two-byte etc characters.
+" Currently, its only used if g:Align_xstrlen is set to a
+" nonzero value. Solution from Nicolai Weibull, vim docs
+" (:help strlen()), Tony Mechelynck, and my own invention.
+fun! s:Strlen(x)
+" call Dfunc("s:Strlen(x<".a:x.">")
+ if g:Align_xstrlen == 1
+ " number of codepoints (Latin a + combining circumflex is two codepoints)
+ " (comment from TM, solution from NW)
+ let ret= strlen(substitute(a:x,'.','c','g'))
+
+ elseif g:Align_xstrlen == 2
+ " number of spacing codepoints (Latin a + combining circumflex is one spacing
+ " codepoint; a hard tab is one; wide and narrow CJK are one each; etc.)
+ " (comment from TM, solution from TM)
+ let ret=strlen(substitute(a:x, '.\Z', 'x', 'g'))
+
+ elseif g:Align_xstrlen == 3
+ " virtual length (counting, for instance, tabs as anything between 1 and
+ " 'tabstop', wide CJK as 2 rather than 1, Arabic alif as zero when immediately
+ " preceded by lam, one otherwise, etc.)
+ " (comment from TM, solution from me)
+ let modkeep= &l:mod
+ exe "norm! o\<esc>"
+ call setline(line("."),a:x)
+ let ret= virtcol("$") - 1
+ d
+ let &l:mod= modkeep
+
+ else
+ " at least give a decent default
+ ret= strlen(a:x)
+ endif
+" call Dret("s:Strlen ".ret)
+ return ret
+endfun
+
+" ---------------------------------------------------------------------
+" Set up default values: {{{1
+"call Decho("-- Begin AlignCtrl Initialization --")
+call Align#AlignCtrl("default")
+"call Decho("-- End AlignCtrl Initialization --")
+
+" ---------------------------------------------------------------------
+" Restore: {{{1
+let &cpo= s:keepcpo
+unlet s:keepcpo
+" vim: ts=4 fdm=marker
330 bundle/vim-align/autoload/AlignMaps.vim
@@ -0,0 +1,330 @@
+" AlignMaps.vim : support functions for AlignMaps
+" Author: Charles E. Campbell, Jr.
+" Date: Mar 03, 2009
+" Version: 41
+" ---------------------------------------------------------------------
+" Load Once: {{{1
+if &cp || exists("g:loaded_AlignMaps")
+ finish
+endif
+let g:loaded_AlignMaps= "v41"
+let s:keepcpo = &cpo
+set cpo&vim
+
+" =====================================================================
+" Functions: {{{1
+
+" ---------------------------------------------------------------------
+" AlignMaps#WrapperStart: {{{2
+fun! AlignMaps#WrapperStart(vis) range
+" call Dfunc("AlignMaps#WrapperStart(vis=".a:vis.")")
+
+ if a:vis
+ norm! '<ma'>
+ endif
+
+ if line("'y") == 0 || line("'z") == 0 || !exists("s:alignmaps_wrapcnt") || s:alignmaps_wrapcnt <= 0
+" call Decho("wrapper initialization")
+ let s:alignmaps_wrapcnt = 1
+ let s:alignmaps_keepgd = &gdefault
+ let s:alignmaps_keepsearch = @/
+ let s:alignmaps_keepch = &ch
+ let s:alignmaps_keepmy = SaveMark("'y")
+ let s:alignmaps_keepmz = SaveMark("'z")
+ let s:alignmaps_posn = SaveWinPosn(0)
+ " set up fencepost blank lines
+ put =''
+ norm! mz'a
+ put! =''
+ ky
+ let s:alignmaps_zline = line("'z")
+ exe "'y,'zs/@/\177/ge"
+ else
+" call Decho("embedded wrapper")
+ let s:alignmaps_wrapcnt = s:alignmaps_wrapcnt + 1
+ norm! 'yjma'zk
+ endif
+
+ " change some settings to align-standard values
+ set nogd
+ set ch=2
+ AlignPush
+ norm! 'zk
+" call Dret("AlignMaps#WrapperStart : alignmaps_wrapcnt=".s:alignmaps_wrapcnt." my=".line("'y")." mz=".line("'z"))
+endfun
+
+" ---------------------------------------------------------------------
+" AlignMaps#WrapperEnd: {{{2
+fun! AlignMaps#WrapperEnd() range
+" call Dfunc("AlignMaps#WrapperEnd() alignmaps_wrapcnt=".s:alignmaps_wrapcnt." my=".line("'y")." mz=".line("'z"))
+
+ " remove trailing white space introduced by whatever in the modification zone
+ 'y,'zs/ \+$//e
+
+ " restore AlignCtrl settings
+ AlignPop
+
+ let s:alignmaps_wrapcnt= s:alignmaps_wrapcnt - 1
+ if s:alignmaps_wrapcnt <= 0
+ " initial wrapper ending
+ exe "'y,'zs/\177/@/ge"
+
+ " if the 'z line hasn't moved, then go ahead and restore window position
+ let zstationary= s:alignmaps_zline == line("'z")
+
+ " remove fencepost blank lines.
+ " restore 'a
+ norm! 'yjmakdd'zdd
+
+ " restore original 'y, 'z, and window positioning
+ call RestoreMark(s:alignmaps_keepmy)
+ call RestoreMark(s:alignmaps_keepmz)
+ if zstationary > 0
+ call RestoreWinPosn(s:alignmaps_posn)
+" call Decho("restored window positioning")
+ endif
+
+ " restoration of options
+ let &gd= s:alignmaps_keepgd
+ let &ch= s:alignmaps_keepch
+ let @/ = s:alignmaps_keepsearch
+
+ " remove script variables
+ unlet s:alignmaps_keepch
+ unlet s:alignmaps_keepsearch
+ unlet s:alignmaps_keepmy
+ unlet s:alignmaps_keepmz
+ unlet s:alignmaps_keepgd
+ unlet s:alignmaps_posn
+ endif
+
+" call Dret("AlignMaps#WrapperEnd : alignmaps_wrapcnt=".s:alignmaps_wrapcnt." my=".line("'y")." mz=".line("'z"))
+endfun
+
+" ---------------------------------------------------------------------
+" AlignMaps#StdAlign: some semi-standard align calls {{{2
+fun! AlignMaps#StdAlign(mode) range
+" call Dfunc("AlignMaps#StdAlign(mode=".a:mode.")")
+ if a:mode == 1
+ " align on @
+" call Decho("align on @")
+ AlignCtrl mIp1P1=l @
+ 'a,.Align
+ elseif a:mode == 2
+ " align on @, retaining all initial white space on each line
+" call Decho("align on @, retaining all initial white space on each line")
+ AlignCtrl mWp1P1=l @
+ 'a,.Align
+ elseif a:mode == 3
+ " like mode 2, but ignore /* */-style comments
+" call Decho("like mode 2, but ignore /* */-style comments")
+ AlignCtrl v ^\s*/[/*]
+ AlignCtrl mWp1P1=l @
+ 'a,.Align
+ else
+ echoerr "(AlignMaps) AlignMaps#StdAlign doesn't support mode#".a:mode
+ endif
+" call Dret("AlignMaps#StdAlign")
+endfun
+
+" ---------------------------------------------------------------------
+" AlignMaps#CharJoiner: joins lines which end in the given character (spaces {{{2
+" at end are ignored)
+fun! AlignMaps#CharJoiner(chr)
+" call Dfunc("AlignMaps#CharJoiner(chr=".a:chr.")")
+ let aline = line("'a")
+ let rep = line(".") - aline
+ while rep > 0
+ norm! 'a
+ while match(getline(aline),a:chr . "\s*$") != -1 && rep >= 0
+ " while = at end-of-line, delete it and join with next
+ norm! 'a$
+ j!
+ let rep = rep - 1
+ endwhile
+ " update rep(eat) count
+ let rep = rep - 1
+ if rep <= 0
+ " terminate loop if at end-of-block
+ break
+ endif
+ " prepare for next line
+ norm! jma
+ let aline = line("'a")
+ endwhile
+" call Dret("AlignMaps#CharJoiner")
+endfun
+
+" ---------------------------------------------------------------------
+" AlignMaps#Equals: supports \t= and \T= {{{2
+fun! AlignMaps#Equals() range
+" call Dfunc("AlignMaps#Equals()")
+ 'a,'zs/\s\+\([*/+\-%|&\~^]\==\)/ \1/e
+ 'a,'zs@ \+\([*/+\-%|&\~^]\)=@\1=@ge
+ 'a,'zs/==/\="\<Char-0x0f>\<Char-0x0f>"/ge
+ 'a,'zs/\([!<>:]\)=/\=submatch(1)."\<Char-0x0f>"/ge
+ norm g'zk
+ AlignCtrl mIp1P1=l =
+ AlignCtrl g =
+ 'a,'z-1Align
+ 'a,'z-1s@\([*/+\-%|&\~^!=]\)\( \+\)=@\2\1=@ge
+ 'a,'z-1s/\( \+\);/;\1/ge
+ if &ft == "c" || &ft == "cpp"
+" call Decho("exception for ".&ft)
+ 'a,'z-1v/^\s*\/[*/]/s/\/[*/]/@&@/e
+ 'a,'z-1v/^\s*\/[*/]/s/\*\//@&/e
+ if exists("g:mapleader")
+ exe "norm 'zk"
+ call AlignMaps#StdAlign(1)
+ else
+ exe "norm 'zk"
+ call AlignMaps#StdAlign(1)
+ endif
+ 'y,'zs/^\(\s*\) @/\1/e
+ endif
+ 'a,'z-1s/\%x0f/=/ge
+ 'y,'zs/ @//eg
+" call Dret("AlignMaps#Equals")
+endfun
+
+" ---------------------------------------------------------------------
+" AlignMaps#Afnc: useful for splitting one-line function beginnings {{{2
+" into one line per argument format
+fun! AlignMaps#Afnc()
+" call Dfunc("AlignMaps#Afnc()")
+
+ " keep display quiet
+ let chkeep = &ch
+ let gdkeep = &gd
+ let vekeep = &ve
+ set ch=2 nogd ve=
+
+ " will use marks y,z ; save current values
+ let mykeep = SaveMark("'y")
+ let mzkeep = SaveMark("'z")
+
+ " Find beginning of function -- be careful to skip over comments
+ let cmmntid = synIDtrans(hlID("Comment"))
+ let stringid = synIDtrans(hlID("String"))
+ exe "norm! ]]"
+ while search(")","bW") != 0
+" call Decho("line=".line(".")." col=".col("."))
+ let parenid= synIDtrans(synID(line("."),col("."),1))
+ if parenid != cmmntid && parenid != stringid
+ break
+ endif
+ endwhile
+ norm! %my
+ s/(\s*\(\S\)/(\r \1/e
+ exe "norm! `y%"
+ s/)\s*\(\/[*/]\)/)\r\1/e
+ exe "norm! `y%mz"
+ 'y,'zs/\s\+$//e
+ 'y,'zs/^\s\+//e
+ 'y+1,'zs/^/ /
+
+ " insert newline after every comma only one parenthesis deep
+ sil! exe "norm! `y\<right>h"
+ let parens = 1
+ let cmmnt = 0
+ let cmmntline= -1
+ while parens >= 1
+" call Decho("parens=".parens." @a=".@a)
+ exe 'norm! ma "ay`a '
+ if @a == "("
+ let parens= parens + 1
+ elseif @a == ")"
+ let parens= parens - 1
+
+ " comment bypass: /* ... */ or //...
+ elseif cmmnt == 0 && @a == '/'
+ let cmmnt= 1
+ elseif cmmnt == 1
+ if @a == '/'
+ let cmmnt = 2 " //...
+ let cmmntline= line(".")
+ elseif @a == '*'
+ let cmmnt= 3 " /*...
+ else
+ let cmmnt= 0
+ endif
+ elseif cmmnt == 2 && line(".") != cmmntline
+ let cmmnt = 0
+ let cmmntline= -1
+ elseif cmmnt == 3 && @a == '*'
+ let cmmnt= 4
+ elseif cmmnt == 4
+ if @a == '/'
+ let cmmnt= 0 " ...*/
+ elseif @a != '*'
+ let cmmnt= 3
+ endif
+
+ elseif @a == "," && parens == 1 && cmmnt == 0
+ exe "norm! i\<CR>\<Esc>"
+ endif
+ endwhile
+ norm! `y%mz%
+ sil! 'y,'zg/^\s*$/d
+
+ " perform substitutes to mark fields for Align
+ sil! 'y+1,'zv/^\//s/^\s\+\(\S\)/ \1/e
+ sil! 'y+1,'zv/^\//s/\(\S\)\s\+/\1 /eg
+ sil! 'y+1,'zv/^\//s/\* \+/*/ge
+ sil! 'y+1,'zv/^\//s/\w\zs\s*\*/ */ge
+ " func
+ " ws <- declaration -> <-ptr -> <-var-> <-[array][] -> <-glop-> <-end->
+ sil! 'y+1,'zv/^\//s/^\s*\(\(\K\k*\s*\)\+\)\s\+\([(*]*\)\s*\(\K\k*\)\s*\(\(\[.\{-}]\)*\)\s*\(.\{-}\)\=\s*\([,)]\)\s*$/ \1@#\3@\4\5@\7\8/e
+ sil! 'y+1,'z+1g/^\s*\/[*/]/norm! kJ
+ sil! 'y+1,'z+1s%/[*/]%@&@%ge
+ sil! 'y+1,'z+1s%*/%@&%ge
+ AlignCtrl mIp0P0=l @
+ sil! 'y+1,'zAlign
+ sil! 'y,'zs%@\(/[*/]\)@%\t\1 %e
+ sil! 'y,'zs%@\*/% */%e
+ sil! 'y,'zs/@\([,)]\)/\1/
+ sil! 'y,'zs/@/ /
+ AlignCtrl mIlrp0P0= # @
+ sil! 'y+1,'zAlign
+ sil! 'y+1,'zs/#/ /
+ sil! 'y+1,'zs/@//
+ sil! 'y+1,'zs/\(\s\+\)\([,)]\)/\2\1/e
+
+ " Restore
+ call RestoreMark(mykeep)
+ call RestoreMark(mzkeep)
+ let &ch= chkeep
+ let &gd= gdkeep
+ let &ve= vekeep
+
+" call Dret("AlignMaps#Afnc")
+endfun
+
+" ---------------------------------------------------------------------
+" AlignMaps#FixMultiDec: converts a type arg,arg,arg; line to multiple lines {{{2
+fun! AlignMaps#FixMultiDec()
+" call Dfunc("AlignMaps#FixMultiDec()")
+
+ " save register x
+ let xkeep = @x
+ let curline = getline(".")
+" call Decho("curline<".curline.">")
+
+ " Get the type. I'm assuming one type per line (ie. int x; double y; on one line will not be handled properly)
+ let @x=substitute(curline,'^\(\s*[a-zA-Z_ \t][a-zA-Z0-9_ \t]*\)\s\+[(*]*\h.*$','\1','')
+" call Decho("@x<".@x.">")
+
+ " transform line
+ exe 's/,/;\r'.@x.' /ge'
+
+ "restore register x
+ let @x= xkeep
+
+" call Dret("AlignMaps#FixMultiDec : my=".line("'y")." mz=".line("'z"))
+endfun
+
+" ---------------------------------------------------------------------
+" Restore: {{{1
+let &cpo= s:keepcpo
+unlet s:keepcpo
+" vim: ts=4 fdm=marker
1,469 bundle/vim-align/doc/Align.txt
@@ -0,0 +1,1469 @@
+*align.txt* The Alignment Tool Mar 04, 2009
+
+Author: Charles E. Campbell, Jr. <NdrOchip@ScampbellPfamily.AbizM>
+ (remove NOSPAM from Campbell's email first)
+Copyright: (c) 2004-2008 by Charles E. Campbell, Jr. *Align-copyright*
+ The VIM LICENSE applies to Align.vim, AlignMaps.vim, and Align.txt
+ (see |copyright|) except use "Align and AlignMaps" instead of "Vim"
+ NO WARRANTY, EXPRESS OR IMPLIED. USE AT-YOUR-OWN-RISK.
+
+==============================================================================
+1. Contents *align* *align-contents* {{{1
+
+ 1. Contents.................: |align-contents|
+ 2. Alignment Manual.........: |align-manual|
+ 3. Alignment Usage..........: |align-usage|
+ Alignment Concepts.......: |align-concepts|
+ Alignment Commands.......: |align-commands|
+ Alignment Control........: |align-control|
+ Separators.............: |alignctrl-separators|
+ Initial Whitespace.....: |alignctrl-w| |alignctrl-W| |alignctrl-I|
+ Justification..........: |alignctrl-l| |alignctrl-r| |alignctrl-c|
+ Justification Control..: |alignctrl--| |alignctrl-+| |alignctrl-:|
+ Cyclic/Sequential......: |alignctrl-=| |alignctrl-C|
+ Separator Justification: |alignctrl-<| |alignctrl->| |alignctrl-||
+ Line (de)Selection.....: |alignctrl-g| |alignctrl-v|
+ Temporary Settings.....: |alignctrl-m|
+ Padding................: |alignctrl-p| |alignctrl-P|
+ Current Options........: |alignctrl-settings| |alignctrl-|
+ Alignment................: |align-align|
+ 4. Alignment Maps...........: |align-maps|
+ \a,....................: |alignmap-a,|
+ \a?....................: |alignmap-a?|
+ \a<....................: |alignmap-a<|
+ \abox..................: |alignmap-abox|
+ \acom..................: |alignmap-acom|
+ \anum..................: |alignmap-anum|
+ \ascom.................: |alignmap-ascom|
+ \adec..................: |alignmap-adec|
+ \adef..................: |alignmap-adef|
+ \afnc..................: |alignmap-afnc|
+ \adcom.................: |alignmap-adcom|
+ \aocom.................: |alignmap-aocom|
+ \tsp...................: |alignmap-tsp|
+ \tsq...................: |alignmap-tsq|
+ \tt....................: |alignmap-tt|
+ \t=....................: |alignmap-t=|
+ \T=....................: |alignmap-T=|
+ \Htd...................: |alignmap-Htd|
+ 5. Alignment Tool History...: |align-history|
+
+==============================================================================
+2. Align Manual *alignman* *alignmanual* *align-manual* {{{1
+
+ Align comes as a vimball; simply typing >
+ vim Align.vba.gz
+ :so %
+< should put its components where they belong. The components are: >
+ .vim/plugin/AlignPlugin.vim
+ .vim/plugin/AlignMapsPlugin.vim
+ .vim/plugin/cecutil.vim
+ .vim/autoload/Align.vim
+ .vim/autoload/AlignMaps.vim
+ .vim/doc/Align.txt
+< To see a user's guide, see |align-userguide|
+ To see examples, see |alignctrl| and |alignmaps|
+>
+/=============+=========+=====================================================\
+|| \ Default/ ||
+|| Commands \ Value/ Explanation ||
+|| | | ||
+++==============+====+=======================================================++
+|| AlignCtrl | | =Clrc-+:pPIWw [..list-of-separator-patterns..] ||
+|| | +-------------------------------------------------------+|
+|| | | may be called as a command or as a function: ||
+|| | | :AlignCtrl =lp0P0W & \\ ||
+|| | | :call Align#AlignCtrl('=lp0P0W','&','\\') ||