diff options
| author | Ben Beltran <ben@freshout.us> | 2012-10-08 11:44:10 -0500 |
|---|---|---|
| committer | Ben Beltran <ben@freshout.us> | 2012-10-08 11:44:10 -0500 |
| commit | 0d23b6e515a01a5782532351821ebfa11f3d6cf2 (patch) | |
| tree | aa395b7e50ccb533d6b48b809016ac06f2d5bc8c /vim/doc | |
| parent | a91731eac872b7837c2821341db5888702125cef (diff) | |
Add vim again :)
Diffstat (limited to 'vim/doc')
| -rw-r--r-- | vim/doc/.DS_Store | bin | 0 -> 6148 bytes | |||
| -rw-r--r-- | vim/doc/Align.txt | 1469 | ||||
| -rw-r--r-- | vim/doc/NERD_commenter.txt | 988 | ||||
| -rw-r--r-- | vim/doc/NERD_tree.txt | 1226 | ||||
| -rw-r--r-- | vim/doc/ZoomWin.txt | 121 | ||||
| -rw-r--r-- | vim/doc/ack.txt | 51 | ||||
| -rw-r--r-- | vim/doc/coffee-script.txt | 114 | ||||
| -rw-r--r-- | vim/doc/command-t.txt | 817 | ||||
| -rw-r--r-- | vim/doc/conque_term.txt | 156 | ||||
| -rw-r--r-- | vim/doc/delimitMate.txt | 818 | ||||
| -rwxr-xr-x | vim/doc/easymotion.txt | 319 | ||||
| -rw-r--r-- | vim/doc/ft-gitcommit-plugin.txt | 5 | ||||
| -rw-r--r-- | vim/doc/fugitive.txt | 269 | ||||
| -rw-r--r-- | vim/doc/gist-vim.txt | 182 | ||||
| -rw-r--r-- | vim/doc/indent-object.txt | 120 | ||||
| -rw-r--r-- | vim/doc/rails.txt | 1020 | ||||
| -rw-r--r-- | vim/doc/showmarks.txt | 264 | ||||
| -rw-r--r-- | vim/doc/snipMate.txt | 322 | ||||
| -rw-r--r-- | vim/doc/solarized.txt | 254 | ||||
| -rw-r--r-- | vim/doc/supertab.txt | 307 | ||||
| -rw-r--r-- | vim/doc/surround.txt | 222 | ||||
| -rw-r--r-- | vim/doc/syntastic.txt | 574 | ||||
| -rw-r--r-- | vim/doc/tagbar.txt | 1016 | ||||
| -rw-r--r-- | vim/doc/taglist.txt | 1501 | ||||
| -rw-r--r-- | vim/doc/tags | 892 | ||||
| -rw-r--r-- | vim/doc/textile.txt | 66 | ||||
| -rw-r--r-- | vim/doc/unimpaired.txt | 103 |
27 files changed, 13196 insertions, 0 deletions
diff --git a/vim/doc/.DS_Store b/vim/doc/.DS_Store Binary files differnew file mode 100644 index 0000000..5008ddf --- /dev/null +++ b/vim/doc/.DS_Store diff --git a/vim/doc/Align.txt b/vim/doc/Align.txt new file mode 100644 index 0000000..c447372 --- /dev/null +++ b/vim/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','&','\\') || +|| | | || +|| | +-------------------------------------------------------++ +|| 1st arg | = | = all separator patterns are equivalent and are || +|| | | simultaneously active. Patterns are |regexp|. || +|| | | C cycle through separator patterns. Patterns are || +|| | | |regexp| and are active sequentially. || +|| | | || +|| | < | < left justify separator Separators are justified, || +|| | | > right justify separator too. Separator styles || +|| | | | center separator are cyclic. || +|| | | || +|| | l | l left justify Justification styles are always || +|| | | r right justify cyclic (ie. lrc would mean left j., || +|| | | c center then right j., then center, repeat. || +|| | | - skip this separator || +|| | | + re-use last justification method || +|| | | : treat rest of text as a field || +|| | | || +|| | p1 | p### pad separator on left by # blanks || +|| | P1 | P### pad separator on right by # blanks || +|| | | || +|| | I | I preserve and apply first line's leading white || +|| | | space to all lines || +|| | | W preserve leading white space on every line, even || +|| | | if it varies from line to line || +|| | | w don't preserve leading white space || +|| | | || +|| | | g second argument is a selection pattern -- only || +|| | | align on lines that have a match (inspired by || +|| | | :g/selection pattern/command) || +|| | | v second argument is a selection pattern -- only || +|| | | align on lines that _don't_ have a match (inspired || +|| | | by :v/selection pattern/command) || +|| | | || +|| | | m Map support: AlignCtrl will immediately do an || +|| | | AlignPush() and the next call to Align() will do || +|| | | an AlignPop at the end. This feature allows maps || +|| | | to preserve user settings. || +|| | | || +|| | | default || +|| | | AlignCtrl default || +|| | | will clear the AlignCtrl || +|| | | stack & set the default: AlignCtrl "Ilp1P1=" '=' || +|| | | || +|| +----+-------------------------------------------------------+| +|| More args | More arguments are interpreted as describing separators || +|| +------------------------------------------------------------+| +|| No args | AlignCtrl will display its current settings || +||==============+============================================================+| +||[range]Align | [..list-of-separators..] || +||[range]Align! | [AlignCtrl settings] [..list-of-separators..] || +|| +------------------------------------------------------------+| +|| | Aligns text over the given range. The range may be || +|| | selected via visual mode (v, V, or ctrl-v) or via || +|| | the command line. The Align operation may be invoked || +|| | as a command or as a function; as a function, the first || +|| | argument is 0=separators only, 1=AlignCtrl option string || +|| | followed by a list of separators. || +|| | :[range]Align || +|| | :[range]Align [list of separators] || +|| | :[range]call Align#Align(0) || +|| | :[range]call Align#Align(0,"list","of","separators",...) || +\=============================================================================/ + +============================================================================== +3. Alignment Usage *alignusage* *align-usage* *align-userguide* {{{1 + + +ALIGNMENT CONCEPTS *align-concept* *align-concepts* {{{2 + + The typical text to be aligned is considered to be: + + * composed of two or more fields + * separated by one or more separator pattern(s): + * two or more lines +> + ws field ws separator ws field ws separator ... + ws field ws separator ws field ws separator ... +< + where "ws" stands for "white space" such as blanks and/or tabs, + and "fields" are arbitrary text. For example, consider > + + x= y= z= 3; + xx= yy= zz= 4; + zzz= yyy= zzz= 5; + a= b= c= 3; +< + Assume that it is desired to line up all the "=" signs; these, + then, are the separators. The fields are composed of all the + alphameric text. Assuming they lie on lines 1-4, one may align + those "=" signs with: > + :AlignCtrl l + :1,4Align = +< The result is: > + x = y = z = 3; + xx = yy = zz = 4; + zzz = yyy = zzz = 5; + a = b = c = 3; + +< Note how each "=" sign is surrounded by a single space; the + default padding is p1P1 (p1 means one space before the separator, + and P1 means one space after it). If you wish to change the + padding, say to no padding, use (see |alignctrl-p|) > + :AlignCtrl lp0P0 + +< Next, note how each field is left justified; that's what the "l" + (a small letter "ell") does. If right-justification of the fields + had been desired, an "r" could've been used: > + :AlignCtrl r +< yielding > + x = y = z = 3; + xx = yy = zz = 4; + zzz = yyy = zzz = 5; + a = b = c = 3; +< There are many more options available for field justification: see + |alignctrl-c| and |alignctrl--|. + + Separators, although commonly only one character long, are actually + specified by regular expressions (see |regexp|), and one may left + justify, right justify, or center them, too (see |alignctrl-<|). + + Assume that for some reason a left-right-left-right-... justification + sequence was wished. This wish is simply achieved with > + :AlignCtrl lr + :1,4Align = +< because the justification commands are considered to be "cylic"; ie. + lr is the same as lrlrlrlrlrlrlr... + + There's a lot more discussed under |alignctrl|; hopefully the examples + there will help, too. + + +ALIGNMENT COMMANDS *align-command* *align-commands* {{{2 + + The <Align.vim> script includes two primary commands and two + minor commands: + + AlignCtrl : this command/function sets up alignment options + which persist until changed for later Align calls. + It controls such things as: how to specify field + separators, initial white space, padding about + separators, left/right/center justification, etc. > + ex. AlignCtrl wp0P1 + Interpretation: during subsequent alignment + operations, preserve each line's initial + whitespace. Use no padding before separators + but provide one padding space after separators. +< + Align : this command/function operates on the range given it to + align text based on one or more separator patterns. The + patterns may be provided via AlignCtrl or via Align + itself. > + + ex. :%Align , + Interpretation: align all commas over the entire + file. +< The :Align! format permits alignment control commands + to precede the alignment patterns. > + ex. :%Align! p2P2 = +< This will align all "=" in the file with two padding + spaces on both sides of each "=" sign. + + NOTE ON USING PATTERNS WITH ALIGN:~ + Align and AlignCtrl use |<q-args>| to obtain their + input patterns and they use an internal function to + split arguments at whitespace unless inside "..."s. + One may escape characters inside a double-quote string + by preceding such characters with a backslash. + + AlignPush : this command/function pushes the current AlignCtrl + state onto an internal stack. > + ex. :AlignPush + Interpretation: save the current AlignCtrl + settings, whatever they may be. They'll + also remain as the current settings until + AlignCtrl is used to change them. +< + AlignPop : this command/function pops the current AlignCtrl + state from an internal stack. > + ex. :AlignPop + Interpretation: presumably AlignPush was + used (at least once) previously; this command + restores the AlignCtrl settings when AlignPush + was last used. +< Also see |alignctrl-m| for a way to automatically do + an AlignPop after an Align (primarily this is for maps). + +ALIGNMENT OPTIONS *align-option* *align-options* {{{2 + *align-utf8* *align-utf* *align-codepoint* *align-strlen* *align-multibyte* + + For those of you who are using 2-byte (or more) characters such as are + available with utf-8, Align now provides a special option which you + may choose based upon your needs: + + Use Built-in strlen() ~ +> + let g:Align_xstrlen= 0 + +< This is the fastest method, but it doesn't handle multibyte characters + well. It is the default for: + + enc=latin1 + vim compiled without multi-byte support + $LANG is en_US.UTF-8 (assuming USA english) + + Number of codepoints (Latin a + combining circumflex is two codepoints)~ +> + let g:Align_xstrlen= 1 (default) +< + 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.)~ +> + let g:Align_xstrlen= 2 +< + 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.)~ +> + let g:Align_xstrlen= 3 +< + By putting one of these settings into your <.vimrc>, Align will use an + internal (interpreted) function to determine a string's length instead + of the Vim's built-in |strlen()| function. Since the function is + interpreted, Align will run a bit slower but will handle such strings + correctly. The last setting (g:Align_xstrlen= 3) probably will run + the slowest but be the most accurate. (thanks to Tony Mechelynck for + these) + + +ALIGNMENT CONTROL *alignctrl* *align-control* {{{2 + + This command doesn't do the alignment operation itself; instead, it + controls subsequent alignment operation(s). + + The first argument to AlignCtrl is a string which may contain one or + more alignment control settings. Most of the settings are specified + by single letters; the exceptions are the p# and P# commands which + interpret a digit following the p or P as specifying padding about the + separator. + + The typical text line is considered to be composed of two or more + fields separated by one or more separator pattern(s): > + + ws field ws separator ws field ws separator ... +< + where "ws" stands for "white space" such as blanks and/or tabs. + + + SEPARATORS *alignctrl-separators* {{{3 + + As a result, separators may not have white space (tabs or blanks) on + their outsides (ie. ": :" is fine as a separator, but " :: " is + not). Usually such separators are not needed, although a map has been + provided which works around this limitation and aligns on whitespace + (see |alignmap-tsp|). + + However, if you really need to have separators with leading or + trailing whitespace, consider handling them by performing a substitute + first (ie. s/ :: /@/g), do the alignment on the temporary pattern + (ie. @), and then perform a substitute to revert the separators back + to their desired condition (ie. s/@/ :: /g). + + The Align#Align() function will first convert tabs over the region into + spaces and then apply alignment control. Except for initial white + space, white space surrounding the fields is ignored. One has three + options just for handling initial white space: + + + --- *alignctrl-w* + wWI INITIAL WHITE SPACE *alignctrl-W* {{{3 + --- *alignctrl-I* + w : ignore all selected lines' initial white space + W : retain all selected lines' initial white space + I : retain only the first line's initial white space and + re-use it for subsequent lines + + Example: Leading white space options: > + +---------------+-------------------+-----------------+ + |AlignCtrl w= :=| AlignCtrl W= := | AlignCtrl I= := | + +------------------+---------------+-------------------+-----------------+ + | Original | w option | W option | I option | + +------------------+---------------+-------------------+-----------------+ + | a := baaa |a := baaa | a : = baaa | a := baaa | + | caaaa := deeee |caaaa := deeee | caaaa : = deeee| caaaa := deeee| + | ee := f |ee := f | ee : = f | ee := f | + +------------------+---------------+-------------------+-----------------+ +< + The original has at least one leading white space on every line. + Using Align with w eliminated each line's leading white space. + Using Align with W preserved each line's leading white space. + Using Align with I applied the first line's leading white space + (three spaces) to each line. + + + ------ *alignctrl-l* + lrc-+: FIELD JUSTIFICATION *alignctrl-r* {{{3 + ------ *alignctrl-c* + + With "lrc", the fields will be left-justified, right-justified, or + centered as indicated by the justification specifiers (lrc). The + "lrc" options are re-used by cycling through them as needed: + + l means llllll.... + r means rrrrrr.... + lr means lrlrlr.... + llr means llrllr.... + + Example: Justification options: Align = > + +------------+-------------------+-------------------+-------------------+ + | Original | AlignCtrl l | AlignCtrl r | AlignCtrl lr | + +------------+-------------------+-------------------+-------------------+ + | a=bb=ccc=1 |a = bb = ccc = 1| a = bb = ccc = 1|a = bb = ccc = 1| + | ccc=a=bb=2 |ccc = a = bb = 2|ccc = a = bb = 2|ccc = a = bb = 2| + | dd=eee=f=3 |dd = eee = f = 3| dd = eee = f = 3|dd = eee = f = 3| + +------------+-------------------+-------------------+-------------------+ + | Alignment |l l l l| r r r r|l r l r| + +------------+-------------------+-------------------+-------------------+ +< + AlignCtrl l : The = separator is repeatedly re-used, as the + cycle only consists of one character (the "l"). + Every time left-justification is used for fields. + AlignCtrl r : The = separator is repeatedly re-used, as the + cycle only consists of one character (the "l"). + Every time right-justification is used for fields + AlignCtrl lr: Again, the "=" separator is repeatedly re-used, + but the fields are justified alternately between + left and right. + + Even more separator control is available. With "-+:": + + - : skip treating the separator as a separator. *alignctrl--* + + : repeat use of the last "lrc" justification *alignctrl-+* + : : treat the rest of the line as a single field *alignctrl-:* + + Example: More justification options: Align = > + +------------+---------------+--------------------+---------------+ + | Original | AlignCtrl -l | AlignCtrl rl+ | AlignCtrl l: | + +------------+---------------+--------------------+---------------+ + | a=bb=ccc=1 |a=bb = ccc=1 | a = bb = ccc = 1 |a = bb=ccc=1 | + | ccc=a=bb=2 |ccc=a = bb=2 |ccc = a = bb = 2 |ccc = a=bb=2 | + | dd=eee=f=3 |dd=eee = f=3 | dd = eee = f = 3 |dd = eee=f=3 | + +------------+---------------+--------------------+---------------+ + | Alignment |l l | r l l l |l l | + +------------+---------------+--------------------+---------------+ +< + In the first example in "More justification options": + + The first "=" separator is skipped by the "-" specification, + and so "a=bb", "ccc=a", and "dd=eee" are considered as single fields. + + The next "=" separator has its (left side) field left-justified. + Due to the cyclic nature of separator patterns, the "-l" + specification is equivalent to "-l-l-l ...". + + Hence the next specification is a "skip", so "ccc=1", etc are fields. + + In the second example in "More justification options": + + The first field is right-justified, the second field is left + justified, and all remaining fields repeat the last justification + command (ie. they are left justified, too). + + Hence rl+ is equivalent to rlllllllll ... + (whereas plain rl is equivalent to rlrlrlrlrl ... ). + + In the third example in "More justification options": + + The text following the first separator is treated as a single field. + + Thus using the - and : operators one can apply justification to a + single separator. + + ex. 1st separator only: AlignCtrl l: + 2nd separator only: AlignCtrl -l: + 3rd separator only: AlignCtrl --l: + etc. + + + --- *alignctrl-=* + =C CYCLIC VS ALL-ACTIVE SEPARATORS *alignctrl-C* {{{3 + --- + + The separators themselves may be considered as equivalent and + simultaneously active ("=") or sequentially cycled through ("C"). + Separators are regular expressions (|regexp|) and are specified as the + second, third, etc arguments. When the separator patterns are + equivalent and simultaneously active, there will be one pattern + constructed: > + + AlignCtrl ... pat1 pat2 pat3 + \(pat1\|pat2\|pat3\) +< + Each separator pattern is thus equivalent and simultaneously active. + The cyclic separator AlignCtrl option stores a list of patterns, only + one of which is active for each field at a time. + + Example: Equivalent/Simultaneously-Active vs Cyclic Separators > + +-------------+------------------+---------------------+----------------------+ + | Original | AlignCtrl = = + -| AlignCtrl = = | AlignCtrl C = + - | + +-------------+------------------+---------------------+----------------------+ + |a = b + c - d|a = b + c - d |a = b + c - d |a = b + c - d | + |x = y = z + 2|x = y = z + 2 |x = y = z + 2|x = y = z + 2 | + |w = s - t = 0|w = s - t = 0 |w = s - t = 0 |w = s - t = 0 | + +-------------+------------------+---------------------+----------------------+ +< + The original is initially aligned with all operators (=+-) being + considered as equivalent and simultaneously active field separators. + Thus the "AlignCtrl = = + -" example shows no change. + + The second example only accepts the '=' as a field separator; + consequently "b + c - d" is now a single field. + + The third example illustrates cyclic field separators and is analyzed + in the following illustration: > + + field1 separator field2 separator field3 separator field4 + a = b + c - d + x = y = z + 2 + w = s - t = 0 +< + The word "cyclic" is used because the patterns form a cycle of use; in + the above case, its = + - = + - = + - = + -... + + Example: Cyclic separators > + Label : this is some text discussing ":"s | ex. abc:def:ghi + Label : this is some text with a ":" in it | ex. abc:def +< + apply AlignCtrl lWC : | | + (select lines)Align > + Label : this is some text discussing ":"s | ex. abc:def:ghi + Label : this is some text with a ":" in it | ex. abcd:efg +< + In the current example, + : is the first separator So the first ":"s are aligned + | is the second separator but subsequent ":"s are not. + | is the third separator The "|"s are aligned, too. + : is the fourth separator Since there aren't two bars, + | is the fifth separator the subsequent potential cycles + | is the sixth separator don't appear. + ... + + In this case it would probably have been a better idea to have used > + AlignCtrl WCl: : | +< as that alignment control would guarantee that no more cycling + would be used after the vertical bar. + + Example: Cyclic separators + + Original: > + a| b&c | (d|e) & f-g-h + aa| bb&cc | (dd|ee) & ff-gg-hh + aaa| bbb&ccc | (ddd|eee) & fff-ggg-hhh +< + AlignCtrl C | | & - > + a | b&c | (d|e) & f - g-h + aa | bb&cc | (dd|ee) & ff - gg-hh + aaa | bbb&ccc | (ddd|eee) & fff - ggg-hhh +< + In this example, + the first and second separators are "|", + the third separator is "&", and + the fourth separator is "-", + + (cycling) + the fifth and sixth separators are "|", + the seventh separator is "&", and + the eighth separator is "-", etc. + + Thus the first "&"s are (not yet) separators, and hence are treated as + part of the field. Ignoring white space for the moment, the AlignCtrl + shown here means that Align will work with > + + field | field | field & field - field | field | field & field - ... +< + + --- *alignctrl-<* + <>| SEPARATOR JUSTIFICATION *alignctrl->* {{{3 + --- *alignctrl-|* + + Separators may be of differing lengths as shown in the example below. + Hence they too may be justified left, right, or centered. + Furthermore, separator justification specifications are cyclic: + + < means <<<<<... justify separator(s) to the left + > means >>>>>... justify separator(s) to the right + | means |||||... center separator(s) + + Example: Separator Justification: Align -\+ > + +-----------------+ + | Original | + +-----------------+ + | a - bbb - c | + | aa -- bb -- ccc | + | aaa --- b --- cc| + +---------------------+-+-----------------+-+---------------------+ + | AlignCtrl < | AlignCtrl > | AlignCtrl | | + +---------------------+---------------------+---------------------+ + | a - bbb - c | a - bbb - c | a - bbb - c | + | aa -- bb -- ccc | aa -- bb -- ccc | aa -- bb -- ccc | + | aaa --- b --- cc | aaa --- b --- cc | aaa --- b --- cc | + +---------------------+---------------------+---------------------+ +< + + --- *alignctrl-g* + gv SELECTIVE APPLICATION *alignctrl-v* {{{3 + --- + + + These two options provide a way to select (g) or to deselect (v) lines + based on a pattern. Ideally :g/pat/Align would work; unfortunately + it results in Align#Align() being called on each line satisfying the + pattern separately. > + + AlignCtrl g pattern +< + Align will only consider those lines which have the given pattern. > + + AlignCtrl v pattern +< + Align will only consider those lines without the given pattern. As an + example of use, consider the following example: > + + :AlignCtrl v ^\s*/\* + Original :Align = :Align = + +----------------+------------------+----------------+ + |one= 2; |one = 2; |one = 2; | + |three= 4; |three = 4; |three = 4; | + |/* skip=this */ |/* skip = this */ |/* skip=this */ | + |five= 6; |five = 6; |five = 6; | + +----------------+------------------+----------------+ +< + The first "Align =" aligned with all "="s, including that one in the + "skip=this" comment. + + The second "Align =" had a AlignCtrl v-pattern which caused it to skip + (ignore) the "skip=this" line when aligning. + + To remove AlignCtrl's g and v patterns, use (as appropriate) > + + AlignCtrl g + AlignCtrl v +< + To see what g/v patterns are currently active, just use the reporting + capability of an unadorned call to AlignCtrl: > + + AlignCtrl +< + + --- + m MAP SUPPORT *alignctrl-m* {{{3 + --- + + This option primarily supports the development of maps. The + Align#AlignCtrl() call will first do an Align#AlignPush() (ie. retain + current alignment control settings). The next Align#Align() will, in + addition to its alignment job, finish up with an Align#AlignPop(). + Thus the Align#AlignCtrl settings that follow the "m" are only + temporarily in effect for just the next Align#Align(). + + + --- + p### *alignctrl-p* + P### PADDING *alignctrl-P* {{{3 + --- + + These two options control pre-padding and post-padding with blanks + about the separator. One may pad separators with zero to nine spaces; + the padding number(s) is/are treated as a cyclic parameter. Thus one + may specify padding separately for each field or re-use a padding + pattern. > + + Example: AlignCtrl p102P0 + +---------+----------------------------------+ + | Original| a=b=c=d=e=f=g=h=1 | + | Align = | a =b=c =d =e=f =g =h=1 | + +---------+----------------------------------+ + | prepad | 1 0 2 1 0 2 1 0 | + +---------+----------------------------------+ +< + This example will cause Align to: + + pre-pad the first "=" with a single blank, + pre-pad the second "=" with no blanks, + pre-pad the third "=" with two blanks, + pre-pad the fourth "=" with a single blank, + pre-pad the fifth "=" with no blanks, + pre-pad the sixth "=" with two blanks, + etc. + + --------------- *alignctrl-settings* + No option given DISPLAY STATUS *alignctrl-* {{{3 + --------------- *alignctrl-no-option* + + AlignCtrl, when called with no arguments, will display the current + alignment control settings. A typical display is shown below: > + + AlignCtrl<=> qty=1 AlignStyle<l> Padding<1|1> + Pat1<\(=\)> +< + Interpreting, this means that the separator patterns are all + equivalent; in this case, there's only one (qty=1). Fields will be + padded on the right with spaces (left justification), and separators + will be padded on each side with a single space. + + To change one of these items, see: + + AlignCtrl......|alignctrl| + qty............|align-concept| + AlignStyle.....|alignctrl--| |alignctrl-+| |alignctrl-:||alignctrl-c| + Padding........|alignctrl-p| |alignctrl-P| + + One may get a string which can be fed back into AlignCtrl: > + + :let alignctrl= Align#AlignCtrl() +< + This form will put a string describing the current AlignCtrl options, + except for the "g" and "v" patterns, into a variable. The + Align#AlignCtrl() function will still echo its settings, however. One + can feed any non-supported "option" to AlignCtrl() to prevent this, + however: > + + :let alignctrl= Align#AlignCtrl("d") +< + +ALIGNMENT *align-align* {{{2 + + Once the alignment control has been determined, the user specifies a + range of lines for the Align command/function to do its thing. + Alignment is often done on a line-range basis, but one may also + restrict alignment to a visual block using ctrl-v. For any visual + mode, one types the colon (:) and then "Align". One may, of course, + specify a range of lines: > + + :[range]Align [list-of-separators] +< + where the |:range| is the usual Vim-powered set of possibilities; the + list of separators is the same as the AlignCtrl capability. There is + only one list of separators, but either AlignCtrl or Align can be used + to specify that list. + + An alternative form of the Align command can handle both alignment + control and the separator list: > + + :[range]Align! [alignment-control-string] [list-of-separators] +< + The alignment control string will be applied only for this particular + application of Align (it uses |alignctrl-m|). The "g pattern" and + "v pattern" alignment controls (see |alignctrl-g| and |alignctrl-v|) + are also available via this form of the Align command. + + Align makes two passes over the text to be aligned. The first pass + determines how many fields there are and determines the maximum sizes + of each field; these sizes are then stored in a vector. The second + pass pads the field (left/right/centered as specified) to bring its + length up to the maximum size of the field. Then the separator and + its AlignCtrl-specified padding is appended. + + Pseudo-Code:~ + During pass 1 + | For all fields in the current line + || Determine current separator + || Examine field specified by current separator + || Determine length of field and save if largest thus far + Initialize newline based on initial whitespace option (wWI) + During pass 2 + | For all fields in current line + || Determine current separator + || Extract field specified by current separator + || Prepend/append padding as specified by AlignCtrl + || (right/left/center)-justify to fit field into max-size field + || Append separator with AlignCtrl-specified separator padding + || Delete current line, install newly aligned line + + The g and v AlignCtrl patterns cause the passes not to consider lines + for alignment, either by requiring that the g-pattern be present or + that the v-pattern not be present. + + The whitespace on either side of a separator is ignored. + + +============================================================================== +4. Alignment Maps *alignmaps* *align-maps* {{{1 + + There are a number of maps using Align#AlignCtrl() and Align#Align() + in the <AlignMapsPlugin.vim> file. This file may also be put into the + plugins subdirectory. Since AlignCtrl and Align supercede textab and + its <ttalign.vim> file, the maps either have a leading "t" (for + "textab") or the more complicated ones an "a" (for "alignment") for + backwards compatibility. + + The maps are shown below with a leading backslash (\). Actually, the + <Leader> construct is used (see |mapleader|), so the maps' leading + kick-off character is easily customized. + + Furthermore, all AlignMapsPlugin.vim maps use the <Plug> construct (see + |<Plug>|and |usr_41.txt|). Hence, if one wishes to override the + mapping entirely, one may do that, too. As an example: > + map <Leader>ACOM <Plug>AM_acom +< would have \ACOM do what \acom previously did (assuming that the + mapleader has been left at its default value of a backslash). + + \a, : useful for breaking up comma-separated + declarations prior to \adec |alignmap-a,| + \a( : aligns ( and , (useful for prototypes) *alignmap-a(* + \a? : aligns (...)? ...:... expressions on ? and : |alignmap-a?| + \a< : aligns << and >> for c++ |alignmap-a<| + \a= : aligns := assignments |alignmap-a=| + \abox : draw a C-style comment box around text lines |alignmap-abox| + \acom : useful for aligning comments |alignmap-acom| + \adcom: useful for aligning comments in declarations |alignmap-adcom| + \anum : useful for aligning numbers |alignmap-anum| + NOTE: For the visual-mode use of \anum, <vis.vim> is needed! + See http://mysite.verizon.net/astronaut/vim/index.html#VIS + \aenum: align a European-style number |alignmap-anum| + \aunum: align a USA-style number |alignmap-anum| + \adec : useful for aligning declarations |alignmap-adec| + \adef : useful for aligning definitions |alignmap-adef| + \afnc : useful for aligning ansi-c style functions' + argument lists |alignmap-afnc| + \adcom: a variant of \acom, restricted to comment |alignmap-adcom| + containing lines only, but also only for + those which don't begin with a comment. + Good for certain declaration styles. + \aocom: a variant of \acom, restricted to comment |alignmap-aocom| + containing lines only + \tab : align a table based on tabs *alignmap-tab* + (converts to spaces) + \tml : useful for aligning the trailing backslashes |alignmap-tml| + used to continue lines (shell programming, etc) + \tsp : use Align to make a table separated by blanks |alignmap-tsp| + (left justified) + \ts, : like \t, but swaps whitespace on the right of *alignmap-ts,* + the commas to their left + \ts: : like \t: but swaps whitespace on the right of *alignmap-ts:* + the colons to their left + \ts< : like \t< but swaps whitespace on the right of *alignmap-ts<* + the less-than signs to their left + \ts= : like \t= but swaps whitespace on the right of *alignmap-ts=* + the equals signs to their left + \Tsp : use Align to make a table separated by blanks |alignmap-Tsp| + (right justified) + \tsq : use Align to make a table separated by blanks |alignmap-tsq| + (left justified) -- "strings" are not split up + \tt : useful for aligning LaTeX tabular tables |alignmap-tt| + \Htd : tabularizes html tables: |alignmap-Htd| + <TR><TD> ...field... </TD><TD> ...field... </TD></TR> + + *alignmap-t|* *alignmap-t#* *alignmap-t,* *alignmap-t:* + *alignmap-t;* *alignmap-t<* *alignmap-t?* *alignmap-t~* + *alignmap-m=* + \tx : make a left-justified alignment on + character "x" where "x" is: ,:<=@|# |alignmap-t=| + \Tx : make a right-justified alignment on + character "x" where "x" is: ,:<=@# |alignmap-T=| + \m= : like \t= but aligns with %... style comments + + The leading backslash is actually <leader> (see |mapleader| for how to + customize the leader to be whatever you like). These maps use the + <Align.vim> package and are defined in the <AlignMaps.vim> file. + Although the maps use AlignCtrl options, they typically use the "m" + option which pushes the options (AlignPush). The associated Align + call which follows will then AlignPop the user's original options + back. + + ALIGNMENT MAP USE WITH MARK AND MOVE~ + In the examples below, one may select the text with a "ma" at the + first line, move to the last line, then execute the map. + + ALIGNMENT MAP USE WITH VISUAL MODE~ + Alternatively, one may select the text with the "V" visual mode + command. + + ALIGNMENT MAP USE WITH MENUS~ + One may use the mark-and-move style (ma, move, use the menu) or + the visual mode style (use the V visual mode, move, then select + the alignment map with menu selection). The alignment map menu + items are under DrChip.AlignMaps . + + One may even change the top level menu name to whatever is wished; by + default, its > + let g:DrChipTopLvlMenu= "DrChip." +< If you set the variable to the empty string (""), then no menu items + will be produced. Of course, one must have a vim with +menu, the gui + must be running, and |'go'| must have the menu bar suboption (ie. m + must be included). + + COMPLEX ALIGNMENT MAP METHOD~ + + For those complex alignment maps which do alignment on constructs + (e.g. \acom, \adec, etc), a series of substitutes is used to insert + "@" symbols in appropriate locations. Align#Align() is then used to + do alignment directly on "@"s; then it is followed by further + substitutes to do clean-up. However, the maps \WS and \WE, used by + every map supported by AlignMaps, protect any original embedded "@" + symbols by first converting them to <DEL> characters, doing the + requested job, and then converting them back. > + + \WS calls AlignMaps#WrapperStart() + \WE calls AlignMaps#WrapperEnd() +< + + --------------------------- + Alignment Map Examples: \a, *alignmap-a,* {{{3 + --------------------------- + + Original: illustrates comma-separated declaration splitting: > + int a,b,c; + struct ABC_str abc,def; +< + Becomes: > + int a; + int b; + int c; + struct ABC_str abc; + struct ABC_str def; +< + + --------------------------- + Alignment Map Examples: \a? *alignmap-a?* {{{3 + --------------------------- + + Original: illustrates ()?: aligning > + printf("<%s>\n", + (x == ABC)? "abc" : + (x == DEFG)? "defg" : + (x == HIJKL)? "hijkl" : "???"); +< + Becomes: select "(x == ..." lines, then \a? > + printf("<%s>\n", + (x == ABC)? "abc" : + (x == DEFG)? "defg" : + (x == HIJKL)? "hijkl" : "???"); +< + + --------------------------- + Alignment Map Examples: \a< *alignmap-a<* {{{3 + --------------------------- + + Original: illustrating aligning of << and >> > + cin << x; + cin << y; + cout << "this is x=" << x; + cout << "but y=" << y << "is not"; +< + Becomes: select "(x == ..." lines, then \a< > + cin << x; + cin << y; + cout << "this is x=" << x; + cout << "but y=" << y << "is not"; +< + + --------------------------- + Alignment Map Examples: \a= *alignmap-a=* {{{3 + --------------------------- + + Original: illustrates how to align := assignments > + aa:=bb:=cc:=1; + a:=b:=c:=1; + aaa:=bbb:=ccc:=1; +< + Bcomes: select the three assignment lines, then \a:= > + aa := bb := cc := 1; + a := b := c := 1; + aaa := bbb := ccc := 1; +< + + --------------------------- + Alignment Map Examples: \abox *alignmap-abox* {{{3 + --------------------------- + + Original: illustrates how to comment-box some text > + This is some plain text + which will + soon be surrounded by a + comment box. +< + Becomes: Select "This..box." with ctrl-v, press \abox > + /*************************** + * This is some plain text * + * which will * + * soon be surrounded by a * + * comment box. * + ***************************/ +< + + --------------------------- + Alignment Map Examples: \acom *alignmap-acom* {{{3 + --------------------------- + + Original: illustrates aligning C-style comments (works for //, too) > + if(itworks) { /* this */ + then= dothis; /* is a */ + } /* set of three comments */ +< + Becomes: Select the three lines, press \acom > + if(itworks) { /* this */ + then= dothis; /* is a */ + } /* set of three comments */ +< + Also see |alignmap-aocom| + + + --------------------------- + Alignment Map Examples: \anum *alignmap-anum* {{{3 + --------------------------- + + Original: illustrates how to get numbers lined up > + -1.234 .5678 -.901e-4 + 1.234 5.678 9.01e-4 + 12.34 56.78 90.1e-4 + 123.4 567.8 901.e-4 +< + Becomes: Go to first line, ma. Go to last line, press \anum > + -1.234 .5678 -.901e-4 + 1.234 5.678 9.01e-4 + 12.34 56.78 90.1e-4 + 123.4 567.8 901.e-4 +< + Original: > + | -1.234 .5678 -.901e-4 | + | 1.234 5.678 9.01e-4 | + | 12.34 56.78 90.1e-4 | + | 123.4 567.8 901.e-4 | +< + Becomes: Select the numbers with ctrl-v (visual-block mode), > + press \anum + | -1.234 .5678 -.901e-4 | + | 1.234 5.678 9.01e-4 | + | 12.34 56.78 90.1e-4 | + | 123.4 567.8 901.e-4 | +< + Original: > + -1,234 ,5678 -,901e-4 + 1,234 5,678 9,01e-4 + 12,34 56,78 90,1e-4 + 123,4 567,8 901,e-4 +< + Becomes: Go to first line, ma. Go to last line, press \anum > + -1,234 ,5678 -,901e-4 + 1,234 5,678 9,01e-4 + 12,34 56,78 90,1e-4 + 123,4 567,8 901,e-4 +< + In addition: + \aenum is provided to support European-style numbers + \aunum is provided to support USA-style numbers + + One may get \aenum behavior for \anum > + let g:alignmaps_euronumber= 1 +< or \aunum behavior for \anum if one puts > + let g:alignmaps_usanumber= 1 +< in one's <.vimrc>. + + + --------------------------- + Alignment Map Examples: \ascom *alignmap-ascom* {{{3 + --------------------------- + + Original: > + /* A Title */ + int x; /* this is a comment */ + int yzw; /* this is another comment*/ +< + Becomes: Select the three lines, press \ascom > + /* A Title */ + int x; /* this is a comment */ + int yzw; /* this is another comment */ +< + + --------------------------- + Alignment Map Examples: \adec *alignmap-adec* {{{3 + --------------------------- + + Original: illustrates how to clean up C/C++ declarations > + int a; + float b; + double *c=NULL; + char x[5]; + struct abc_str abc; + struct abc_str *pabc; + int a; /* a */ + float b; /* b */ + double *c=NULL; /* b */ + char x[5]; /* x[5] */ + struct abc_str abc; /* abc */ + struct abc_str *pabc; /* pabc */ + static int a; /* a */ + static float b; /* b */ + static double *c=NULL; /* b */ + static char x[5]; /* x[5] */ + static struct abc_str abc; /* abc */ + static struct abc_str *pabc; /* pabc */ +< + Becomes: Select the declarations text, then \adec > + int a; + float b; + double *c = NULL; + char x[5]; + struct abc_str abc; + struct abc_str *pabc; + int a; /* a */ + float b; /* b */ + double *c = NULL; /* b */ + char x[5]; /* x[5] */ + struct abc_str abc; /* abc */ + struct abc_str *pabc; /* pabc */ + static int a; /* a */ + static float b; /* b */ + static double *c = NULL; /* b */ + static char x[5]; /* x[5] */ + static struct abc_str abc; /* abc */ + static struct abc_str *pabc; /* pabc */ +< + + --------------------------- + Alignment Map Examples: \adef *alignmap-adef* {{{3 + --------------------------- + + Original: illustrates how to line up #def'initions > + #define ONE 1 + #define TWO 22 + #define THREE 333 + #define FOUR 4444 +< + Becomes: Select four definition lines, apply \adef > + # define ONE 1 + # define TWO 22 + # define THREE 333 + # define FOUR 4444 +< + + --------------------------- + Alignment Map Examples: \afnc *alignmap-afnc* {{{3 + --------------------------- + + This map is an exception to the usual selection rules. + It uses "]]" to find the function body's leading "{". + Just put the cursor anywhere in the function arguments and + the entire function declaration should be processed. + + Because "]]" looks for that "{" in the first column, the + "original" and "becomes" examples are in the first column, + too. + + Original: illustrates lining up ansi-c style function definitions > + int f( + struct abc_str ***a, /* one */ + long *b, /* two */ + int c) /* three */ + { + } +< + Becomes: put cursor anywhere before the '{', press \afnc > + int f( + struct abc_str ***a, /* one */ + long *b, /* two */ + int c) /* three */ + { + } +< + + --------------------------- + Alignment Map Examples: \adcom *alignmap-adcom* {{{3 + --------------------------- + + Original: illustrates aligning comments that don't begin + lines (optionally after some whitespace). > + struct { + /* this is a test */ + int x; /* of how */ + double y; /* to use adcom */ + }; +< + Becomes: Select the inside lines of the structure, + then press \adcom. The comment-only + line is ignored but the other two comments + get aligned. > + struct { + /* this is a test */ + int x; /* of how */ + double y; /* to use adcom */ + }; +< + + --------------------------- + Alignment Map Examples: \aocom *alignmap-aocom* {{{3 + --------------------------- + + Original: illustrates how to align C-style comments (works for //, too) + but restricted only to aligning with those lines containing + comments. See the difference from \acom (|alignmap-acom|). > + if(itworks) { /* this comment */ + then= dothis; + } /* only appears on two lines */ +< + Becomes: Select the three lines, press \aocom > + if(itworks) { /* this comment */ + then= dothis; + } /* only appears on two lines */ +< + Also see |alignmap-acom| + + + --------------------------- *alignmap-Tsp* + Alignment Map Examples: \tsp *alignmap-tsp* {{{3 + --------------------------- + + Normally Align can't use white spaces for field separators as such + characters are ignored surrounding field separators. The \tsp and + \Tsp maps get around this limitation. + + Original: > + one two three four five + six seven eight nine ten + eleven twelve thirteen fourteen fifteen +< + Becomes: Select the lines, \tsp > + one two three four five + six seven eight nine ten + eleven twelve thirteen fourteen fifteen +< + Becomes: Select the lines, \Tsp > + one two three four five + six seven eight nine ten + eleven twelve thirteen fourteen fifteen +< + + --------------------------- + Alignment Map Examples: \tsq *alignmap-tsq* {{{3 + --------------------------- + + The \tsp map is useful for aligning tables based on white space, + but sometimes one wants double-quoted strings to act as a single + object in spite of embedded spaces. The \tsq map was invented + to support this. (thanks to Leif Wickland) + + Original: > + "one two" three + four "five six" +< + Becomes: Select the lines, \tsq > + "one two" three + four "five six" +< + + --------------------------- + Alignment Map Examples: \tt *alignmap-tt* {{{3 + --------------------------- + + Original: illustrates aligning a LaTex Table > + \begin{tabular}{||c|l|r||} + \hline\hline + one&two&three\\ \hline + four&five&six\\ + seven&eight&nine\\ + \hline\hline + \end{tabular} +< + Becomes: Select the three lines inside the table > + (ie. one..,four..,seven..) and press \tt + \begin{tabular}{||c|l|r||} + \hline\hline + one & two & three \\ \hline + four & five & six \\ + seven & eight & nine \\ + \hline\hline + \end{tabular} +< + + ---------------------------- + Alignment Map Examples: \tml *alignmap-tml* {{{3 + ---------------------------- + + Original: illustrates aligning multi-line continuation marks > + one \ + two three \ + four five six \ + seven \\ \ + eight \nine \ + ten \ +< + Becomes: > + one \ + two three \ + four five six \ + seven \\ \ + eight \nine \ + ten \ +< + + --------------------------- + Alignment Map Examples: \t= *alignmap-t=* {{{3 + --------------------------- + + Original: illustrates left-justified aligning of = > + aa=bb=cc=1;/*one*/ + a=b=c=1;/*two*/ + aaa=bbb=ccc=1;/*three*/ +< + Becomes: Select the three equations, press \t= > + aa = bb = cc = 1; /* one */ + a = b = c = 1; /* two */ + aaa = bbb = ccc = 1; /* three */ +< + + --------------------------- + Alignment Map Examples: \T= *alignmap-T=* {{{3 + --------------------------- + + Original: illustrates right-justified aligning of = > + aa=bb=cc=1; /* one */ + a=b=c=1; /* two */ + aaa=bbb=ccc=1; /* three */ +< + Becomes: Select the three equations, press \T= > + aa = bb = cc = 1; /* one */ + a = b = c = 1; /* two */ + aaa = bbb = ccc = 1; /* three */ +< + + --------------------------- + Alignment Map Examples: \Htd *alignmap-Htd* {{{3 + --------------------------- + + Original: for aligning tables with html > + <TR><TD>...field one...</TD><TD>...field two...</TD></TR> + <TR><TD>...field three...</TD><TD>...field four...</TD></TR> +< + Becomes: Select <TR>... lines, press \Htd > + <TR><TD> ...field one... </TD><TD> ...field two... </TD></TR> + <TR><TD> ...field three... </TD><TD> ...field four... </TD></TR> +< +============================================================================== +4. Alignment Tools' History *align-history* {{{1 + +ALIGN HISTORY {{{2 + 35 : Nov 02, 2008 * g:loaded_AlignPlugin testing to prevent re-loading + installed + Nov 19, 2008 * new sanity check for an AlignStyle of just ":" + Jan 08, 2009 * save&restore of |'mod'| now done with local + variant + 34 : Jul 08, 2008 * using :AlignCtrl before entering any alignment + control commands was causing an error. + 33 : Sep 20, 2007 * s:Strlen() introduced to support various ways + used to represent characters and their effects + on string lengths. See |align-strlen|. + * Align now accepts "..." -- so it can accept + whitespace as separators. + 32 : Aug 18, 2007 * uses |<q-args>| instead of |<f-args>| plus a + custom argument splitter to allow patterns with + backslashes to slide in unaltered. + 31 : Aug 06, 2007 * :[range]Align! [AlignCtrl settings] pattern(s) + implemented. + 30 : Feb 12, 2007 * now uses |setline()| + 29 : Jan 18, 2006 * cecutil updated to use keepjumps + Feb 23, 2006 * Align now converted to vim 7.0 style using + auto-loading functions. + 28 : Aug 17, 2005 * report option workaround + Oct 24, 2005 * AlignCtrl l: wasn't behaving as expected; fixed + 27 : Apr 15, 2005 : cpo workaround + ignorecase workaround + 26 : Aug 20, 2004 : loaded_align now also indicates version number + GetLatestVimScripts :AutoInstall: now supported + 25 : Jul 27, 2004 : For debugging, uses Dfunc(), Dret(), and Decho() + 24 : Mar 03, 2004 : (should've done this earlier!) visualmode(1) + not supported until v6.2, now Align will avoid + calling it for earlier versions. Visualmode + clearing won't take place then, of course. + 23 : Oct 07, 2003 : Included Leif Wickland's ReplaceQuotedSpaces() + function which supports \tsq + 22 : Jan 29, 2003 : Now requires 6.1.308 or later to clear visualmode() + 21 : Jan 10, 2003 : BugFix: similar problem to #19; new code + bypasses "norm! v\<Esc>" until initialization + is over. + 20 : Dec 30, 2002 : BugFix: more on "unable to highlight" fixed + 19 : Nov 21, 2002 : BugFix: some terminals gave an "unable to highlight" + message at startup; Hari Krishna Dara tracked it + down; a silent! now included to prevent noise. + 18 : Nov 04, 2002 : BugFix: re-enabled anti-repeated-loading + 17 : Nov 04, 2002 : BugFix: forgot to have AlignPush() push s:AlignSep + AlignCtrl now clears visual-block mode when used so + that Align won't try to use old visual-block + selection marks '< '> + 16 : Sep 18, 2002 : AlignCtrl <>| options implemented (separator + justification) + 15 : Aug 22, 2002 : bug fix: AlignCtrl's ":" now acts as a modifier of + the preceding alignment operator (lrc) + 14 : Aug 20, 2002 : bug fix: AlignCtrl default now keeps &ic unchanged + bug fix: Align, on end-field, wasn't using correct + alignop bug fix: Align, on end-field, was appending + padding + 13 : Aug 19, 2002 : bug fix: zero-length g/v patterns are accepted + bug fix: always skip blank lines + bug fix: AlignCtrl default now also clears g and v + patterns + 12 : Aug 16, 2002 : moved keep_ic above zero-length pattern checks + added "AlignCtrl default" + fixed bug with last field getting separator spaces + at end line + 11 : Jul 08, 2002 : prevent separator patterns which match zero length + -+: included as additional alignment/justification + styles + 10 : Jun 26, 2002 : =~# used instead of =~ (for matching case) + ignorecase option handled + 9 : Jun 25, 2002 : implemented cyclic padding + +ALIGNMENT MAP HISTORY *alignmap-history* {{{2 + v41 Nov 02, 2008 * g:loaded_AlignMapsPlugin testing to prevent + re-loading installed + * AlignMaps now use 0x0f (ctrl-p) for special + character substitutions (instead of 0xff). + Seems to avoid some problems with having to + use Strlen(). + * bug fixed with \ts, + * new maps: \ts; \ts, \ts: \ts< \ts= \a( + v40 Oct 21, 2008 * Modified AlignMaps so that its maps use <Plug>s + and <script>s. \t@ and related maps have been + changed to call StdAlign() instead. The + WrapperStart function now takes an argument and + handles being called via visual mode. The + former nmaps and vmaps have thus been replaced + with a simple map. + Oct 24, 2008 * broke AlignMaps into a plugin and autoload + pair of scripts. + v39 Mar 06, 2008 : * \t= only does /* ... */ aligning when in *.c + *.cpp files. + v38 Aug 18, 2007 : * \tt altered so that it works with the new + use of |<q-args>| plus a custom argument + splitter + v36 Sep 27, 2006 : * AlignWrapperStart() now has tests that marks + y and z are not set + May 15, 2007 * \anum and variants improved + v35 Sep 01, 2006 : * \t= and cousins used "`"s. They now use \xff + characters. + * \acom now works with doxygen style /// comments + * <char-0xff> used in \t= \T= \w= and \m= instead + of backquotes. + v34 Feb 23, 2006 : * AlignMaps now converted to vim 7.0 style using + auto-loading functions. + v33 Oct 12, 2005 : * \ts, now uses P1 in its AlignCtrl call + v32 Jun 28, 2005 : * s:WrapperStart() changed to AlignWrapperStart() + s:WrapperEnd() changed to AlignWrapperEnd() + These changes let the AlignWrapper...()s to be + used outside of AlignMaps.vim + v31 Feb 01, 2005 : * \adcom included, with help + * \a, now works across multiple lines with + different types + * AlignMaps now uses <cecutil.vim> for its mark and + window-position saving and restoration + Mar 04, 2005 * improved \a, + Apr 06, 2005 * included \aenum, \aunum, and provided + g:alignmaps_{usa|euro]number} options + v30 Aug 20, 2004 : * \a, : handles embedded assignments and does \adec + * \acom now can handle Doxygen-style comments + * g:loaded_alignmaps now also indicates version + * internal maps \WE and \WS are now re-entrant + v29 Jul 27, 2004 : * \tml aligns trailing multi-line single + backslashes (thanks to Raul Benavente!) + v28 May 13, 2004 : * \a, had problems with leading blanks; fixed! + v27 Mar 31, 2004 : * \T= was having problems with == and != + * Fixed more problems with \adec + v26 Dec 09, 2003 : * \ascom now also ignores lines without comments + * \tt \& now not matched + * \a< handles both << and >> + v25 Nov 14, 2003 : * included \anum (aligns numbers with periods and + commas). \anum also supported with ctrl-v mode. + * \ts, \Ts, : (aligns on commas, then swaps leading + spaces with commas) + * \adec ignores preprocessor lines and lines with + with comments-only + v23 Sep 10, 2003 : * Bugfix for \afnc - no longer overwrites marks y,z + * fixed bug in \tsp, \tab, \Tsp, and \Tab - lines + containing backslashes were having their + backslashes removed. Included Leif Wickland's + patch for \tsq. + * \adef now ignores lines holding comments only + v18 Aug 22, 2003 : \a< lines up C++'s << operators + saves/restores gdefault option (sets to nogd) + all b:..varname.. are now b:alignmaps_..varname.. + v17 Nov 04, 2002 : \afnc now handles // comments correctly and + commas within comments + v16 Sep 10, 2002 : changed : to :silent! for \adec + v15 Aug 27, 2002 : removed some <c-v>s + v14 Aug 20, 2002 : \WS, \WE mostly moved to functions, marks y and z + now restored + v11 Jul 08, 2002 : \abox bug fix + v9 Jun 25, 2002 : \abox now handles leading initial whitespace + : various bugfixes to \afnc, \T=, etc + +============================================================================== +Modelines: {{{1 +vim:tw=78:ts=8:ft=help:fdm=marker: diff --git a/vim/doc/NERD_commenter.txt b/vim/doc/NERD_commenter.txt new file mode 100644 index 0000000..5309f61 --- /dev/null +++ b/vim/doc/NERD_commenter.txt @@ -0,0 +1,988 @@ +*NERD_commenter.txt* Plugin for commenting code + + + NERD COMMENTER REFERENCE MANUAL~ + + + + + +============================================================================== +CONTENTS *NERDCommenterContents* + + 1.Intro...................................|NERDCommenter| + 2.Installation............................|NERDComInstallation| + 3.Functionality provided..................|NERDComFunctionality| + 3.1 Functionality Summary.............|NERDComFunctionalitySummary| + 3.2 Functionality Details.............|NERDComFunctionalityDetails| + 3.2.1 Comment map.................|NERDComComment| + 3.2.2 Nested comment map..........|NERDComNestedComment| + 3.2.3 Toggle comment map..........|NERDComToggleComment| + 3.2.4 Minimal comment map.........|NERDComMinimalComment| + 3.2.5 Invert comment map..........|NERDComInvertComment| + 3.2.6 Sexy comment map............|NERDComSexyComment| + 3.2.7 Yank comment map............|NERDComYankComment| + 3.2.8 Comment to EOL map..........|NERDComEOLComment| + 3.2.9 Append com to line map......|NERDComAppendComment| + 3.2.10 Insert comment map.........|NERDComInsertComment| + 3.2.11 Use alternate delims map...|NERDComAltDelim| + 3.2.12 Comment aligned maps.......|NERDComAlignedComment| + 3.2.13 Uncomment line map.........|NERDComUncommentLine| + 3.4 Sexy Comments.....................|NERDComSexyComments| + 3.5 The NERDComment function..........|NERDComNERDComment| + 4.Options.................................|NERDComOptions| + 4.1 Options summary...................|NERDComOptionsSummary| + 4.2 Options details...................|NERDComOptionsDetails| + 4.3 Default delimiter Options.........|NERDComDefaultDelims| + 5. Customising key mappings...............|NERDComMappings| + 6. Issues with the script.................|NERDComIssues| + 6.1 Delimiter detection heuristics....|NERDComHeuristics| + 6.2 Nesting issues....................|NERDComNesting| + 7.About.. ............................|NERDComAbout| + 8.Changelog...............................|NERDComChangelog| + 9.Credits.................................|NERDComCredits| + 10.License................................|NERDComLicense| + +============================================================================== +1. Intro *NERDCommenter* + +The NERD commenter provides many different commenting operations and styles +which are invoked via key mappings and a menu. These operations are available +for most filetypes. + +There are also options that allow to tweak the commenting engine to your +taste. + +============================================================================== +2. Installation *NERDComInstallation* + +The NERD Commenter requires Vim 7 or higher. + +Extract the plugin files in your ~/.vim (*nix) or ~/vimfiles (Windows). You +should have 2 files: > + plugin/NERD_commenter.vim + doc/NERD_commenter.txt +< +Next, to finish installing the help file run: > + :helptags ~/.vim/doc +< +See |add-local-help| for more details. + +Make sure that you have filetype plugins enabled, as the script makes use of +|'commentstring'| where possible (which is usually set in a filetype plugin). +See |filetype-plugin-on| for details, but basically, stick this in your vimrc > + filetype plugin on +< + +============================================================================== +3. Functionality provided *NERDComFunctionality* + +------------------------------------------------------------------------------ +3.1 Functionality summary *NERDComFunctionalitySummary* + +The following key mappings are provided by default (there is also a menu +with items corresponding to all the mappings below): + +[count]<leader>cc |NERDComComment| +Comment out the current line or text selected in visual mode. + + +[count]<leader>cn |NERDComNestedComment| +Same as <leader>cc but forces nesting. + + +[count]<leader>c<space> |NERDComToggleComment| +Toggles the comment state of the selected line(s). If the topmost selected +line is commented, all selected lines are uncommented and vice versa. + + +[count]<leader>cm |NERDComMinimalComment| +Comments the given lines using only one set of multipart delimiters. + + +[count]<leader>ci |NERDComInvertComment| +Toggles the comment state of the selected line(s) individually. + + +[count]<leader>cs |NERDComSexyComment| +Comments out the selected lines ``sexily'' + + +[count]<leader>cy |NERDComYankComment| +Same as <leader>cc except that the commented line(s) are yanked first. + + +<leader>c$ |NERDComEOLComment| +Comments the current line from the cursor to the end of line. + + +<leader>cA |NERDComAppendComment| +Adds comment delimiters to the end of line and goes into insert mode between +them. + + +|NERDComInsertComment| +Adds comment delimiters at the current cursor position and inserts between. +Disabled by default. + + +<leader>ca |NERDComAltDelim| +Switches to the alternative set of delimiters. + + +[count]<leader>cl +[count]<leader>cb |NERDComAlignedComment| +Same as |NERDComComment| except that the delimiters are aligned down the +left side (<leader>cl) or both sides (<leader>cb). + + +[count]<leader>cu |NERDComUncommentLine| +Uncomments the selected line(s). + +------------------------------------------------------------------------------ +3.2 Functionality details *NERDComFunctionalityDetails* + +------------------------------------------------------------------------------ +3.2.1 Comment map *NERDComComment* + +Default mapping: [count]<leader>cc +Mapped to: <plug>NERDCommenterComment +Applicable modes: normal visual visual-line visual-block. + + +Comments out the current line. If multiple lines are selected in visual-line +mode, they are all commented out. If some text is selected in visual or +visual-block mode then the script will try to comment out the exact text that +is selected using multi-part delimiters if they are available. + +If a [count] is given in normal mode, the mapping works as though that many +lines were selected in visual-line mode. + +------------------------------------------------------------------------------ +3.2.2 Nested comment map *NERDComNestedComment* + +Default mapping: [count]<leader>cn +Mapped to: <plug>NERDCommenterNest +Applicable modes: normal visual visual-line visual-block. + +Performs nested commenting. Works the same as <leader>cc except that if a line +is already commented then it will be commented again. + +If |'NERDUsePlaceHolders'| is set then the previous comment delimiters will +be replaced by place-holder delimiters if needed. Otherwise the nested +comment will only be added if the current commenting delimiters have no right +delimiter (to avoid syntax errors) + +If a [count] is given in normal mode, the mapping works as though that many +lines were selected in visual-line mode. + +Related options: +|'NERDDefaultNesting'| + +------------------------------------------------------------------------------ +3.2.3 Toggle comment map *NERDComToggleComment* + +Default mapping: [count]<leader>c<space> +Mapped to: <plug>NERDCommenterToggle +Applicable modes: normal visual-line. + +Toggles commenting of the lines selected. The behaviour of this mapping +depends on whether the first line selected is commented or not. If so, all +selected lines are uncommented and vice versa. + +With this mapping, a line is only considered to be commented if it starts with +a left delimiter. + +If a [count] is given in normal mode, the mapping works as though that many +lines were selected in visual-line mode. + +------------------------------------------------------------------------------ +3.2.4 Minimal comment map *NERDComMinimalComment* + +Default mapping: [count]<leader>cm +Mapped to: <plug>NERDCommenterMinimal +Applicable modes: normal visual-line. + +Comments the selected lines using one set of multipart delimiters if possible. + +For example: if you are programming in c and you select 5 lines and press +<leader>cm then a '/*' will be placed at the start of the top line and a '*/' +will be placed at the end of the last line. + +Sets of multipart comment delimiters that are between the top and bottom +selected lines are replaced with place holders (see |'NERDLPlace'|) if +|'NERDUsePlaceHolders'| is set for the current filetype. If it is not, then +the comment will be aborted if place holders are required to prevent illegal +syntax. + +If a [count] is given in normal mode, the mapping works as though that many +lines were selected in visual-line mode. + +------------------------------------------------------------------------------ +3.2.5 Invert comment map *NERDComInvertComment* + +Default mapping: <leader>ci +Mapped to: <plug>NERDCommenterInvert +Applicable modes: normal visual-line. + +Inverts the commented state of each selected line. If the a selected line is +commented then it is uncommented and vice versa. Each line is examined and +commented/uncommented individually. + +With this mapping, a line is only considered to be commented if it starts with +a left delimiter. + +If a [count] is given in normal mode, the mapping works as though that many +lines were selected in visual-line mode. + +------------------------------------------------------------------------------ +3.2.6 Sexy comment map *NERDComSexyComment* + +Default mapping: [count]<leader>cs +Mapped to: <plug>NERDCommenterSexy +Applicable modes: normal, visual-line. + +Comments the selected line(s) ``sexily''... see |NERDComSexyComments| for +a description of what sexy comments are. Can only be done on filetypes for +which there is at least one set of multipart comment delimiters specified. + +Sexy comments cannot be nested and lines inside a sexy comment cannot be +commented again. + +If a [count] is given in normal mode, the mapping works as though that many +lines were selected in visual-line mode. + +Related options: +|'NERDCompactSexyComs'| + +------------------------------------------------------------------------------ +3.2.7 Yank comment map *NERDComYankComment* + +Default mapping: [count]<leader>cy +Mapped to: <plug>NERDCommenterYank +Applicable modes: normal visual visual-line visual-block. + +Same as <leader>cc except that it yanks the line(s) that are commented first. + +------------------------------------------------------------------------------ +3.2.8 Comment to EOL map *NERDComEOLComment* + +Default mapping: <leader>c$ +Mapped to: <plug>NERDCommenterToEOL +Applicable modes: normal. + +Comments the current line from the current cursor position up to the end of +the line. + +------------------------------------------------------------------------------ +3.2.9 Append com to line map *NERDComAppendComment* + +Default mapping: <leader>cA +Mapped to: <plug>NERDCommenterAppend +Applicable modes: normal. + +Appends comment delimiters to the end of the current line and goes +to insert mode between the new delimiters. + +------------------------------------------------------------------------------ +3.2.10 Insert comment map *NERDComInsertComment* + +Default mapping: disabled by default. +Map it to: <plug>NERDCommenterInInsert +Applicable modes: insert. + +Adds comment delimiters at the current cursor position and inserts +between them. + +NOTE: prior to version 2.1.17 this was mapped to ctrl-c. To restore this +mapping add > + let NERDComInsertMap='<c-c>' +< +to your vimrc. + +------------------------------------------------------------------------------ +3.2.11 Use alternate delims map *NERDComAltDelim* + +Default mapping: <leader>ca +Mapped to: <plug>NERDCommenterAltDelims +Applicable modes: normal. + +Changes to the alternative commenting style if one is available. For example, +if the user is editing a c++ file using // comments and they hit <leader>ca +then they will be switched over to /**/ comments. + +See also |NERDComDefaultDelims| + +------------------------------------------------------------------------------ +3.2.12 Comment aligned maps *NERDComAlignedComment* + +Default mappings: [count]<leader>cl [count]<leader>cb +Mapped to: <plug>NERDCommenterAlignLeft + <plug>NERDCommenterAlignBoth +Applicable modes: normal visual-line. + +Same as <leader>cc except that the comment delimiters are aligned on the left +side or both sides respectively. These comments are always nested if the +line(s) are already commented. + +If a [count] is given in normal mode, the mapping works as though that many +lines were selected in visual-line mode. + +------------------------------------------------------------------------------ +3.2.13 Uncomment line map *NERDComUncommentLine* + +Default mapping: [count]<leader>cu +Mapped to: <plug>NERDCommenterUncomment +Applicable modes: normal visual visual-line visual-block. + +Uncomments the current line. If multiple lines are selected in +visual mode then they are all uncommented. + +When uncommenting, if the line contains multiple sets of delimiters then the +``outtermost'' pair of delimiters will be removed. + +The script uses a set of heurisics to distinguish ``real'' delimiters from +``fake'' ones when uncommenting. See |NERDComIssues| for details. + +If a [count] is given in normal mode, the mapping works as though that many +lines were selected in visual-line mode. + +Related options: +|'NERDRemoveAltComs'| +|'NERDRemoveExtraSpaces'| + +------------------------------------------------------------------------------ +3.3 Sexy Comments *NERDComSexyComments* +These are comments that use one set of multipart comment delimiters as well as +one other marker symbol. For example: > + /* + * This is a c style sexy comment + * So there! + */ + + /* This is a c style sexy comment + * So there! + * But this one is ``compact'' style */ +< +Here the multipart delimiters are /* and */ and the marker is *. + +------------------------------------------------------------------------------ +3.4 The NERDComment function *NERDComNERDComment* + +All of the NERD commenter mappings and menu items invoke a single function +which delegates the commenting work to other functions. This function is +public and has the prototype: > + function! NERDComment(isVisual, type) +< +The arguments to this function are simple: + - isVisual: if you wish to do any kind of visual comment then set this to + 1 and the function will use the '< and '> marks to find the comment + boundries. If set to 0 then the function will operate on the current + line. + - type: is used to specify what type of commenting operation is to be + performed, and it can be one of the following: "sexy", "invert", + "minimal", "toggle", "alignLeft", "alignBoth", "norm", "nested", + "toEOL", "append", "insert", "uncomment", "yank" + +For example, if you typed > + :call NERDComment(1, 'sexy') +< +then the script would do a sexy comment on the last visual selection. + + +============================================================================== +4. Options *NERDComOptions* + +------------------------------------------------------------------------------ +4.1 Options summary *NERDComOptionsSummary* + +|'loaded_nerd_comments'| Turns off the script. +|'NERDAllowAnyVisualDelims'| Allows multipart alternative delims to + be used when commenting in + visual/visual-block mode. +|'NERDBlockComIgnoreEmpty'| Forces right delims to be placed when + doing visual-block comments. +|'NERDCommentWholeLinesInVMode'| Changes behaviour of visual comments. +|'NERDCreateDefaultMappings'| Turn the default mappings on/off. +|'NERDDefaultNesting'| Tells the script to use nested comments + by default. +|'NERDMenuMode'| Specifies how the NERD commenter menu + will appear (if at all). +|'NERDLPlace'| Specifies what to use as the left + delimiter placeholder when nesting + comments. +|'NERDUsePlaceHolders'| Specifies which filetypes may use + placeholders when nesting comments. +|'NERDRemoveAltComs'| Tells the script whether to remove + alternative comment delimiters when + uncommenting. +|'NERDRemoveExtraSpaces'| Tells the script to always remove the + extra spaces when uncommenting + (regardless of whether NERDSpaceDelims + is set) +|'NERDRPlace'| Specifies what to use as the right + delimiter placeholder when nesting + comments. +|'NERDSpaceDelims'| Specifies whether to add extra spaces + around delimiters when commenting, and + whether to remove them when + uncommenting. +|'NERDCompactSexyComs'| Specifies whether to use the compact + style sexy comments. + +------------------------------------------------------------------------------ +4.3 Options details *NERDComOptionsDetails* + +To enable any of the below options you should put the given line in your +~/.vimrc + + *'loaded_nerd_comments'* +If this script is driving you insane you can turn it off by setting this +option > + let loaded_nerd_comments=1 +< +------------------------------------------------------------------------------ + *'NERDAllowAnyVisualDelims'* +Values: 0 or 1. +Default: 1. + +If set to 1 then, when doing a visual or visual-block comment (but not a +visual-line comment), the script will choose the right delimiters to use for +the comment. This means either using the current delimiters if they are +multipart or using the alternative delimiters if THEY are multipart. For +example if we are editing the following java code: > + float foo = 1221; + float bar = 324; + System.out.println(foo * bar); +< +If we are using // comments and select the "foo" and "bar" in visual-block +mode, as shown left below (where '|'s are used to represent the visual-block +boundary), and comment it then the script will use the alternative delims as +shown on the right: > + + float |foo| = 1221; float /*foo*/ = 1221; + float |bar| = 324; float /*bar*/ = 324; + System.out.println(foo * bar); System.out.println(foo * bar); +< +------------------------------------------------------------------------------ + *'NERDBlockComIgnoreEmpty'* +Values: 0 or 1. +Default: 1. + +This option affects visual-block mode commenting. If this option is turned +on, lines that begin outside the right boundary of the selection block will be +ignored. + +For example, if you are commenting this chunk of c code in visual-block mode +(where the '|'s are used to represent the visual-block boundary) > + #include <sys/types.h> + #include <unistd.h> + #include <stdio.h> + |int| main(){ + | | printf("SUCK THIS\n"); + | | while(1){ + | | fork(); + | | } + |} | +< +If NERDBlockComIgnoreEmpty=0 then this code will become: > + #include <sys/types.h> + #include <unistd.h> + #include <stdio.h> + /*int*/ main(){ + /* */ printf("SUCK THIS\n"); + /* */ while(1){ + /* */ fork(); + /* */ } + /*} */ +< +Otherwise, the code block would become: > + #include <sys/types.h> + #include <unistd.h> + #include <stdio.h> + /*int*/ main(){ + printf("SUCK THIS\n"); + while(1){ + fork(); + } + /*} */ +< +------------------------------------------------------------------------------ + *'NERDCommentWholeLinesInVMode'* +Values: 0, 1 or 2. +Default: 0. + +By default the script tries to comment out exactly what is selected in visual +mode (v). For example if you select and comment the following c code (using | +to represent the visual boundary): > + in|t foo = 3; + int bar =| 9; + int baz = foo + bar; +< +This will result in: > + in/*t foo = 3;*/ + /*int bar =*/ 9; + int baz = foo + bar; +< +But some people prefer it if the whole lines are commented like: > + /*int foo = 3;*/ + /*int bar = 9;*/ + int baz = foo + bar; +< +If you prefer the second option then stick this line in your vimrc: > + let NERDCommentWholeLinesInVMode=1 +< + +If the filetype you are editing only has no multipart delimiters (for example +a shell script) and you hadnt set this option then the above would become > + in#t foo = 3; + #int bar = 9; +< +(where # is the comment delimiter) as this is the closest the script can +come to commenting out exactly what was selected. If you prefer for whole +lines to be commented out when there is no multipart delimiters but the EXACT +text that was selected to be commented out if there IS multipart delimiters +then stick the following line in your vimrc: > + let NERDCommentWholeLinesInVMode=2 +< + +Note that this option does not affect the behaviour of commenting in +|visual-block| mode. + +------------------------------------------------------------------------------ + *'NERDCreateDefaultMappings'* +Values: 0 or 1. +Default: 1. + +If set to 0, none of the default mappings will be created. + +See also |NERDComMappings|. + +------------------------------------------------------------------------------ + *'NERDRemoveAltComs'* +Values: 0 or 1. +Default: 1. + +When uncommenting a line (for a filetype with an alternative commenting style) +this option tells the script whether to look for, and remove, comment +delimiters of the alternative style. + +For example, if you are editing a c++ file using // style comments and you go +<leader>cu on this line: > + /* This is a c++ comment baby! */ +< +It will not be uncommented if the NERDRemoveAltComs is set to 0. + +------------------------------------------------------------------------------ + *'NERDRemoveExtraSpaces'* +Values: 0 or 1. +Default: 1. + +By default, the NERD commenter will remove spaces around comment delimiters if +either: +1. |'NERDSpaceDelims'| is set to 1. +2. NERDRemoveExtraSpaces is set to 1. + +This means that if we have the following lines in a c code file: > + /* int foo = 5; */ + /* int bar = 10; */ + int baz = foo + bar +< +If either of the above conditions hold then if these lines are uncommented +they will become: > + int foo = 5; + int bar = 10; + int baz = foo + bar +< +Otherwise they would become: > + int foo = 5; + int bar = 10; + int baz = foo + bar +< +If you want the spaces to be removed only if |'NERDSpaceDelims'| is set then +set NERDRemoveExtraSpaces to 0. + +------------------------------------------------------------------------------ + *'NERDLPlace'* + *'NERDRPlace'* +Values: arbitrary string. +Default: + NERDLPlace: "[>" + NERDRPlace: "<]" + +These options are used to control the strings used as place-holder delimiters. +Place holder delimiters are used when performing nested commenting when the +filetype supports commenting styles with both left and right delimiters. +To set these options use lines like: > + let NERDLPlace="FOO" + let NERDRPlace="BAR" +< +Following the above example, if we have line of c code: > + /* int horse */ +< +and we comment it with <leader>cn it will be changed to: > + /*FOO int horse BAR*/ +< +When we uncomment this line it will go back to what it was. + +------------------------------------------------------------------------------ + *'NERDMenuMode'* +Values: 0, 1, 2, 3. +Default: 3 + +This option can take 4 values: + "0": Turns the menu off. + "1": Turns the 'comment' menu on with no menu shortcut. + "2": Turns the 'comment 'menu on with <alt>-c as the shortcut. + "3": Turns the 'Plugin -> comment' menu on with <alt>-c as the shortcut. + +------------------------------------------------------------------------------ + *'NERDUsePlaceHolders'* +Values: 0 or 1. +Default 1. + +This option is used to specify whether place-holder delimiters should be used +when creating a nested comment. + +------------------------------------------------------------------------------ + *'NERDSpaceDelims'* +Values: 0 or 1. +Default 0. + +Some people prefer a space after the left delimiter and before the right +delimiter like this: > + /* int foo=2; */ +< +as opposed to this: > + /*int foo=2;*/ +< +If you want spaces to be added then set NERDSpaceDelims to 1 in your vimrc. + +See also |'NERDRemoveExtraSpaces'|. + +------------------------------------------------------------------------------ + *'NERDCompactSexyComs'* +Values: 0 or 1. +Default 0. + +Some people may want their sexy comments to be like this: > + /* Hi There! + * This is a sexy comment + * in c */ +< +As opposed to like this: > + /* + * Hi There! + * This is a sexy comment + * in c + */ +< +If this option is set to 1 then the top style will be used. + +------------------------------------------------------------------------------ + *'NERDDefaultNesting'* +Values: 0 or 1. +Default 1. + +When this option is set to 1, comments are nested automatically. That is, if +you hit <leader>cc on a line that is already commented it will be commented +again. + +------------------------------------------------------------------------------ +3.3 Default delimiter customisation *NERDComDefaultDelims* + +If you want the NERD commenter to use the alternative delimiters for a +specific filetype by default then put a line of this form into your vimrc: > + let NERD_<filetype>_alt_style=1 +< +Example: java uses // style comments by default, but you want it to default to +/* */ style comments instead. You would put this line in your vimrc: > + let NERD_java_alt_style=1 +< + +See |NERDComAltDelim| for switching commenting styles at runtime. + +============================================================================== +5. Key mapping customisation *NERDComMappings* + +To change a mapping just map another key combo to the internal <plug> mapping. +For example, to remap the |NERDComComment| mapping to ",omg" you would put +this line in your vimrc: > + map ,omg <plug>NERDCommenterComment +< +This will stop the corresponding default mappings from being created. + +See the help for the mapping in question to see which <plug> mapping to +map to. + +See also |'NERDCreateDefaultMappings'|. + +============================================================================== +6. Issues with the script *NERDComIssues* + + +------------------------------------------------------------------------------ +6.1 Delimiter detection heuristics *NERDComHeuristics* + +Heuristics are used to distinguish the real comment delimiters + +Because we have comment mappings that place delimiters in the middle of lines, +removing comment delimiters is a bit tricky. This is because if comment +delimiters appear in a line doesnt mean they really ARE delimiters. For +example, Java uses // comments but the line > + System.out.println("//"); +< +clearly contains no real comment delimiters. + +To distinguish between ``real'' comment delimiters and ``fake'' ones we use a +set of heuristics. For example, one such heuristic states that any comment +delimiter that has an odd number of non-escaped " characters both preceding +and following it on the line is not a comment because it is probably part of a +string. These heuristics, while usually pretty accurate, will not work for all +cases. + +------------------------------------------------------------------------------ +6.2 Nesting issues *NERDComNesting* + +If we have some line of code like this: > + /*int foo */ = /*5 + 9;*/ +< +This will not be uncommented legally. The NERD commenter will remove the +"outter most" delimiters so the line will become: > + int foo */ = /*5 + 9; +< +which almost certainly will not be what you want. Nested sets of comments will +uncomment fine though. Eg: > + /*int/* foo =*/ 5 + 9;*/ +< +will become: > + int/* foo =*/ 5 + 9; +< +(Note that in the above examples I have deliberately not used place holders +for simplicity) + +============================================================================== +7. About *NERDComAbout* + +The author of the NERD commenter is Martyzillatron --- the half robot, half +dinosaur bastard son of Megatron and Godzilla. He enjoys destroying +metropolises and eating tourist busses. + +Drop him a line at martin_grenfell at msn.com. He would love to hear from you. +its a lonely life being the worlds premier terror machine. How would you feel +if your face looked like a toaster and a t-rex put together? :( + +The latest stable versions can be found at + http://www.vim.org/scripts/script.php?script_id=1218 + +The latest dev versions are on github + http://github.com/scrooloose/nerdcommenter + +============================================================================== +8. Changelog *NERDComChangelog* + +2.3.0 + - remove all filetypes which have a &commentstring in the standard vim + runtime for vim > 7.0 unless the script stores an alternate set of + delimiters + - make the script complain if the user doesnt have filetype plugins enabled + - use <leader> instead of comma to start the default mappings + - fix a couple of bugs with sexy comments - thanks to Tim Smart + - lots of refactoring + +2.2.2 + - remove the NERDShutup option and the message is suppresses, this makes + the plugin silently rely on &commentstring for unknown filetypes. + - add support for dhcpd, limits, ntp, resolv, rgb, sysctl, udevconf and + udevrules. Thanks to Thilo Six. + - match filetypes case insensitively + - add support for mp (metapost), thanks to Andrey Skvortsov. + - add support for htmlcheetah, thanks to Simon Hengel. + - add support for javacc, thanks to Matt Tolton. + - make <%# %> the default delims for eruby, thanks to tpope. + - add support for javascript.jquery, thanks to Ivan Devat. + - add support for cucumber and pdf. Fix sass and railslog delims, + thanks to tpope + +2.2.1 + - add support for newlisp and clojure, thanks to Matthew Lee Hinman. + - fix automake comments, thanks to Elias Pipping + - make haml comments default to -# with / as the alternative delimiter, + thanks to tpope + - add support for actionscript and processing thanks to Edwin Benavides + - add support for ps1 (powershell), thanks to Jason Mills + - add support for hostsaccess, thanks to Thomas Rowe + - add support for CVScommit + - add support for asciidoc, git and gitrebase. Thanks to Simon Ruderich. + - use # for gitcommit comments, thanks to Simon Ruderich. + - add support for mako and genshi, thanks to Keitheis. + - add support for conkyrc, thanks to David + - add support for SVNannotate, thanks to Miguel Jaque Barbero. + - add support for sieve, thanks to Stefan Walk + - add support for objj, thanks to Adam Thorsen. + +2.2.0 + - rewrote the mappings system to be more "standard". + - removed all the mapping options. Now, mappings to <plug> mappings are + used + - see :help NERDComMappings, and :help NERDCreateDefaultMappings for + more info + - remove "prepend comments" and "right aligned comments". + - add support for applescript, calbire, man, SVNcommit, potwiki, txt2tags and SVNinfo. + Thanks to nicothakis, timberke, sgronblo, mntnoe, Bernhard Grotz, John + O'Shea, François and Giacomo Mariani respectively. + - bugfix for haskell delimiters. Thanks to mntnoe. +2.1.18 + - add support for llvm. Thanks to nicothakis. + - add support for xquery. Thanks to Phillip Kovalev. +2.1.17 + - fixed haskell delimiters (hackily). Thanks to Elias Pipping. + - add support for mailcap. Thanks to Pascal Brueckner. + - add support for stata. Thanks to Jerónimo Carballo. + - applied a patch from ewfalor to fix an error in the help file with the + NERDMapleader doc + - disable the insert mode ctrl-c mapping by default, see :help + NERDComInsertComment if you wish to restore it + +============================================================================== +9. Credits *NERDComCredits* + +Thanks to the follow people for suggestions and patches: + +Nick Brettell +Matthew Hawkins +Mathieu Clabaut +Greg Searle +Nguyen +Litchi +Jorge Scandaliaris +Shufeng Zheng +Martin Stubenschrott +Markus Erlmann +Brent Rice +Richard Willis +Igor Prischepoff +Harry +David Bourgeois +Eike Von Seggern +Torsten Blix +Alexander Bosecke +Stefano Zacchiroli +Norick Chen +Joseph Barker +Gary Church +Tim Carey-Smith +Markus Klinik +Anders +Seth Mason +James Hales +Heptite +Cheng Fang +Yongwei Wu +David Miani +Jeremy Hinegardner +Marco +Ingo Karkat +Zhang Shuhan +tpope +Ben Schmidt +David Fishburn +Erik Falor +JaGoTerr +Elias Pipping +mntnoe +Mark S. + + +Thanks to the following people for sending me new filetypes to support: + +The hackers The filetypes~ +Sam R verilog +Jonathan Derque context, plaintext and mail +Vigil fetchmail +Michael Brunner kconfig +Antono Vasiljev netdict +Melissa Reid omlet +Ilia N Ternovich quickfix +John O'Shea RTF, SVNcommitlog and vcscommit, SVNCommit +Anders occam +Mark Woodward csv +fREW gentoo-package-mask, + gentoo-package-keywords, + gentoo-package-use, and vo_base +Alexey verilog_systemverilog, systemverilog +Lizendir fstab +Michael Böhler autoit, autohotkey and docbk +Aaron Small cmake +Ramiro htmldjango and django +Stefano Zacchiroli debcontrol, debchangelog, mkd +Alex Tarkovsky ebuild and eclass +Jorge Rodrigues gams +Rainer Müller Objective C +Jason Mills Groovy, ps1 +Normandie Azucena vera +Florian Apolloner ldif +David Fishburn lookupfile +Niels Aan de Brugh rst +Don Hatlestad ahk +Christophe Benz Desktop and xsd +Eyolf Østrem lilypond, bbx and lytex +Ingo Karkat dosbatch +Nicolas Weber markdown, objcpp +tinoucas gentoo-conf-d +Greg Weber D, haml +Bruce Sherrod velocity +timberke cobol, calibre +Aaron Schaefer factor +Mr X asterisk, mplayerconf +Kuchma Michael plsql +Brett Warneke spectre +Pipp lhaskell +Renald Buter scala +Vladimir Lomov asymptote +Marco mrxvtrc, aap +nicothakis SVNAnnotate, CVSAnnotate, SVKAnnotate, + SVNdiff, gitAnnotate, gitdiff, dtrace + llvm, applescript +Chen Xing Wikipedia +Jacobo Diaz dakota, patran +Li Jin gentoo-env-d, gentoo-init-d, + gentoo-make-conf, grub, modconf, sudoers +SpookeyPeanut rib +Greg Jandl pyrex/cython +Christophe Benz services, gitcommit +A Pontus vimperator +Stromnov slice, bzr +Martin Kustermann pamconf +Indriði Einarsson mason +Chris map +Krzysztof A. Adamski group +Pascal Brueckner mailcap +Jerónimo Carballo stata +Phillip Kovalev xquery +Bernhard Grotz potwiki +sgronblo man +François txt2tags +Giacomo Mariani SVNinfo +Matthew Lee Hinman newlisp, clojure +Elias Pipping automake +Edwin Benavides actionscript, processing +Thomas Rowe hostsaccess +Simon Ruderich asciidoc, git, gitcommit, gitrebase +Keitheis mako, genshi +David conkyrc +Miguel Jaque Barbero SVNannotate +Stefan Walk sieve +Adam Thorsen objj +Thilo Six dhcpd, limits, ntp, resolv, rgb, sysctl, + udevconf, udevrules +Andrey Skvortsov mp +Simon Hengel htmlcheetah +Matt Tolton javacc +Ivan Devat javascript.jquery +tpope cucumber,pdf +============================================================================== +10. License *NERDComLicense* + +The NERD commenter is released under the wtfpl. +See http://sam.zoy.org/wtfpl/COPYING. diff --git a/vim/doc/NERD_tree.txt b/vim/doc/NERD_tree.txt new file mode 100644 index 0000000..5ff0651 --- /dev/null +++ b/vim/doc/NERD_tree.txt @@ -0,0 +1,1226 @@ +*NERD_tree.txt* A tree explorer plugin that owns your momma! + + + + omg its ... ~ + + ________ ________ _ ____________ ____ __________ ____________~ + /_ __/ / / / ____/ / | / / ____/ __ \/ __ \ /_ __/ __ \/ ____/ ____/~ + / / / /_/ / __/ / |/ / __/ / /_/ / / / / / / / /_/ / __/ / __/ ~ + / / / __ / /___ / /| / /___/ _, _/ /_/ / / / / _, _/ /___/ /___ ~ + /_/ /_/ /_/_____/ /_/ |_/_____/_/ |_/_____/ /_/ /_/ |_/_____/_____/ ~ + + + Reference Manual~ + + + + +============================================================================== +CONTENTS *NERDTree-contents* + + 1.Intro...................................|NERDTree| + 2.Functionality provided..................|NERDTreeFunctionality| + 2.1.Global commands...................|NERDTreeGlobalCommands| + 2.2.Bookmarks.........................|NERDTreeBookmarks| + 2.2.1.The bookmark table..........|NERDTreeBookmarkTable| + 2.2.2.Bookmark commands...........|NERDTreeBookmarkCommands| + 2.2.3.Invalid bookmarks...........|NERDTreeInvalidBookmarks| + 2.3.NERD tree mappings................|NERDTreeMappings| + 2.4.The NERD tree menu................|NERDTreeMenu| + 3.Options.................................|NERDTreeOptions| + 3.1.Option summary....................|NERDTreeOptionSummary| + 3.2.Option details....................|NERDTreeOptionDetails| + 4.The NERD tree API.......................|NERDTreeAPI| + 4.1.Key map API.......................|NERDTreeKeymapAPI| + 4.2.Menu API..........................|NERDTreeMenuAPI| + 5.About...................................|NERDTreeAbout| + 6.Changelog...............................|NERDTreeChangelog| + 7.Credits.................................|NERDTreeCredits| + 8.License.................................|NERDTreeLicense| + +============================================================================== +1. Intro *NERDTree* + +What is this "NERD tree"?? + +The NERD tree allows you to explore your filesystem and to open files and +directories. It presents the filesystem to you in the form of a tree which you +manipulate with the keyboard and/or mouse. It also allows you to perform +simple filesystem operations. + +The following features and functionality are provided by the NERD tree: + * Files and directories are displayed in a hierarchical tree structure + * Different highlighting is provided for the following types of nodes: + * files + * directories + * sym-links + * windows .lnk files + * read-only files + * executable files + * Many (customisable) mappings are provided to manipulate the tree: + * Mappings to open/close/explore directory nodes + * Mappings to open files in new/existing windows/tabs + * Mappings to change the current root of the tree + * Mappings to navigate around the tree + * ... + * Directories and files can be bookmarked. + * Most NERD tree navigation can also be done with the mouse + * Filtering of tree content (can be toggled at runtime) + * custom file filters to prevent e.g. vim backup files being displayed + * optional displaying of hidden files (. files) + * files can be "turned off" so that only directories are displayed + * The position and size of the NERD tree window can be customised + * The order in which the nodes in the tree are listed can be customised. + * A model of your filesystem is created/maintained as you explore it. This + has several advantages: + * All filesystem information is cached and is only re-read on demand + * If you revisit a part of the tree that you left earlier in your + session, the directory nodes will be opened/closed as you left them + * The script remembers the cursor position and window position in the NERD + tree so you can toggle it off (or just close the tree window) and then + reopen it (with NERDTreeToggle) the NERD tree window will appear exactly + as you left it + * You can have a separate NERD tree for each tab, share trees across tabs, + or a mix of both. + * By default the script overrides the default file browser (netw), so if + you :edit a directory a (slighly modified) NERD tree will appear in the + current window + * A programmable menu system is provided (simulates right clicking on a + node) + * one default menu plugin is provided to perform basic filesytem + operations (create/delete/move/copy files/directories) + * There's an API for adding your own keymappings + + +============================================================================== +2. Functionality provided *NERDTreeFunctionality* + +------------------------------------------------------------------------------ +2.1. Global Commands *NERDTreeGlobalCommands* + +:NERDTree [<start-directory> | <bookmark>] *:NERDTree* + Opens a fresh NERD tree. The root of the tree depends on the argument + given. There are 3 cases: If no argument is given, the current directory + will be used. If a directory is given, that will be used. If a bookmark + name is given, the corresponding directory will be used. For example: > + :NERDTree /home/marty/vim7/src + :NERDTree foo (foo is the name of a bookmark) +< +:NERDTreeFromBookmark <bookmark> *:NERDTreeFromBookmark* + Opens a fresh NERD tree with the root initialized to the dir for + <bookmark>. This only reason to use this command over :NERDTree is for + the completion (which is for bookmarks rather than directories). + +:NERDTreeToggle [<start-directory> | <bookmark>] *:NERDTreeToggle* + If a NERD tree already exists for this tab, it is reopened and rendered + again. If no NERD tree exists for this tab then this command acts the + same as the |:NERDTree| command. + +:NERDTreeMirror *:NERDTreeMirror* + Shares an existing NERD tree, from another tab, in the current tab. + Changes made to one tree are reflected in both as they are actually the + same buffer. + + If only one other NERD tree exists, that tree is automatically mirrored. If + more than one exists, the script will ask which tree to mirror. + +:NERDTreeClose *:NERDTreeClose* + Close the NERD tree in this tab. + +:NERDTreeFind *:NERDTreeFind* + Find the current file in the tree. If no tree exists for the current tab, + or the file is not under the current root, then initialize a new tree where + the root is the directory of the current file. + +------------------------------------------------------------------------------ +2.2. Bookmarks *NERDTreeBookmarks* + +Bookmarks in the NERD tree are a way to tag files or directories of interest. +For example, you could use bookmarks to tag all of your project directories. + +------------------------------------------------------------------------------ +2.2.1. The Bookmark Table *NERDTreeBookmarkTable* + +If the bookmark table is active (see |NERDTree-B| and +|'NERDTreeShowBookmarks'|), it will be rendered above the tree. You can double +click bookmarks or use the |NERDTree-o| mapping to activate them. See also, +|NERDTree-t| and |NERDTree-T| + +------------------------------------------------------------------------------ +2.2.2. Bookmark commands *NERDTreeBookmarkCommands* + +Note that the following commands are only available in the NERD tree buffer. + +:Bookmark <name> + Bookmark the current node as <name>. If there is already a <name> + bookmark, it is overwritten. <name> must not contain spaces. + +:BookmarkToRoot <bookmark> + Make the directory corresponding to <bookmark> the new root. If a treenode + corresponding to <bookmark> is already cached somewhere in the tree then + the current tree will be used, otherwise a fresh tree will be opened. + Note that if <bookmark> points to a file then its parent will be used + instead. + +:RevealBookmark <bookmark> + If the node is cached under the current root then it will be revealed + (i.e. directory nodes above it will be opened) and the cursor will be + placed on it. + +:OpenBookmark <bookmark> + <bookmark> must point to a file. The file is opened as though |NERDTree-o| + was applied. If the node is cached under the current root then it will be + revealed and the cursor will be placed on it. + +:ClearBookmarks [<bookmarks>] + Remove all the given bookmarks. If no bookmarks are given then remove all + bookmarks on the current node. + +:ClearAllBookmarks + Remove all bookmarks. + +:ReadBookmarks + Re-read the bookmarks in the |'NERDTreeBookmarksFile'|. + +See also |:NERDTree| and |:NERDTreeFromBookmark|. + +------------------------------------------------------------------------------ +2.2.3. Invalid Bookmarks *NERDTreeInvalidBookmarks* + +If invalid bookmarks are detected, the script will issue an error message and +the invalid bookmarks will become unavailable for use. + +These bookmarks will still be stored in the bookmarks file (see +|'NERDTreeBookmarksFile'|), down the bottom. There will always be a blank line +after the valid bookmarks but before the invalid ones. + +Each line in the bookmarks file represents one bookmark. The proper format is: +<bookmark name><space><full path to the bookmark location> + +After you have corrected any invalid bookmarks, either restart vim, or go +:ReadBookmarks from the NERD tree window. + +------------------------------------------------------------------------------ +2.3. NERD tree Mappings *NERDTreeMappings* + +Default Description~ help-tag~ +Key~ + +o.......Open files, directories and bookmarks....................|NERDTree-o| +go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go| +t.......Open selected node/bookmark in a new tab.................|NERDTree-t| +T.......Same as 't' but keep the focus on the current tab........|NERDTree-T| +i.......Open selected file in a split window.....................|NERDTree-i| +gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi| +s.......Open selected file in a new vsplit.......................|NERDTree-s| +gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs| +O.......Recursively open the selected directory..................|NERDTree-O| +x.......Close the current nodes parent...........................|NERDTree-x| +X.......Recursively close all children of the current node.......|NERDTree-X| +e.......Edit the current dif.....................................|NERDTree-e| + +<CR>...............same as |NERDTree-o|. +double-click.......same as the |NERDTree-o| map. +middle-click.......same as |NERDTree-i| for files, same as + |NERDTree-e| for dirs. + +D.......Delete the current bookmark .............................|NERDTree-D| + +P.......Jump to the root node....................................|NERDTree-P| +p.......Jump to current nodes parent.............................|NERDTree-p| +K.......Jump up inside directories at the current tree depth.....|NERDTree-K| +J.......Jump down inside directories at the current tree depth...|NERDTree-J| +<C-J>...Jump down to the next sibling of the current directory...|NERDTree-C-J| +<C-K>...Jump up to the previous sibling of the current directory.|NERDTree-C-K| + +C.......Change the tree root to the selected dir.................|NERDTree-C| +u.......Move the tree root up one directory......................|NERDTree-u| +U.......Same as 'u' except the old root node is left open........|NERDTree-U| +r.......Recursively refresh the current directory................|NERDTree-r| +R.......Recursively refresh the current root.....................|NERDTree-R| +m.......Display the NERD tree menu...............................|NERDTree-m| +cd......Change the CWD to the dir of the selected node...........|NERDTree-cd| + +I.......Toggle whether hidden files displayed....................|NERDTree-I| +f.......Toggle whether the file filters are used.................|NERDTree-f| +F.......Toggle whether files are displayed.......................|NERDTree-F| +B.......Toggle whether the bookmark table is displayed...........|NERDTree-B| + +q.......Close the NERDTree window................................|NERDTree-q| +A.......Zoom (maximize/minimize) the NERDTree window.............|NERDTree-A| +?.......Toggle the display of the quick help.....................|NERDTree-?| + +------------------------------------------------------------------------------ + *NERDTree-o* +Default key: o +Map option: NERDTreeMapActivateNode +Applies to: files and directories. + +If a file node is selected, it is opened in the previous window. + +If a directory is selected it is opened or closed depending on its current +state. + +If a bookmark that links to a directory is selected then that directory +becomes the new root. + +If a bookmark that links to a file is selected then that file is opened in the +previous window. + +------------------------------------------------------------------------------ + *NERDTree-go* +Default key: go +Map option: None +Applies to: files. + +If a file node is selected, it is opened in the previous window, but the +cursor does not move. + +The key combo for this mapping is always "g" + NERDTreeMapActivateNode (see +|NERDTree-o|). + +------------------------------------------------------------------------------ + *NERDTree-t* +Default key: t +Map option: NERDTreeMapOpenInTab +Applies to: files and directories. + +Opens the selected file in a new tab. If a directory is selected, a fresh +NERD Tree for that directory is opened in a new tab. + +If a bookmark which points to a directory is selected, open a NERD tree for +that directory in a new tab. If the bookmark points to a file, open that file +in a new tab. + +------------------------------------------------------------------------------ + *NERDTree-T* +Default key: T +Map option: NERDTreeMapOpenInTabSilent +Applies to: files and directories. + +The same as |NERDTree-t| except that the focus is kept in the current tab. + +------------------------------------------------------------------------------ + *NERDTree-i* +Default key: i +Map option: NERDTreeMapOpenSplit +Applies to: files. + +Opens the selected file in a new split window and puts the cursor in the new +window. + +------------------------------------------------------------------------------ + *NERDTree-gi* +Default key: gi +Map option: None +Applies to: files. + +The same as |NERDTree-i| except that the cursor is not moved. + +The key combo for this mapping is always "g" + NERDTreeMapOpenSplit (see +|NERDTree-i|). + +------------------------------------------------------------------------------ + *NERDTree-s* +Default key: s +Map option: NERDTreeMapOpenVSplit +Applies to: files. + +Opens the selected file in a new vertically split window and puts the cursor in +the new window. + +------------------------------------------------------------------------------ + *NERDTree-gs* +Default key: gs +Map option: None +Applies to: files. + +The same as |NERDTree-s| except that the cursor is not moved. + +The key combo for this mapping is always "g" + NERDTreeMapOpenVSplit (see +|NERDTree-s|). + +------------------------------------------------------------------------------ + *NERDTree-O* +Default key: O +Map option: NERDTreeMapOpenRecursively +Applies to: directories. + +Recursively opens the selelected directory. + +All files and directories are cached, but if a directory would not be +displayed due to file filters (see |'NERDTreeIgnore'| |NERDTree-f|) or the +hidden file filter (see |'NERDTreeShowHidden'|) then its contents are not +cached. This is handy, especially if you have .svn directories. + +------------------------------------------------------------------------------ + *NERDTree-x* +Default key: x +Map option: NERDTreeMapCloseDir +Applies to: files and directories. + +Closes the parent of the selected node. + +------------------------------------------------------------------------------ + *NERDTree-X* +Default key: X +Map option: NERDTreeMapCloseChildren +Applies to: directories. + +Recursively closes all children of the selected directory. + +Tip: To quickly "reset" the tree, use |NERDTree-P| with this mapping. + +------------------------------------------------------------------------------ + *NERDTree-e* +Default key: e +Map option: NERDTreeMapOpenExpl +Applies to: files and directories. + +|:edit|s the selected directory, or the selected file's directory. This could +result in a NERD tree or a netrw being opened, depending on +|'NERDTreeHijackNetrw'|. + +------------------------------------------------------------------------------ + *NERDTree-D* +Default key: D +Map option: NERDTreeMapDeleteBookmark +Applies to: lines in the bookmarks table + +Deletes the currently selected bookmark. + +------------------------------------------------------------------------------ + *NERDTree-P* +Default key: P +Map option: NERDTreeMapJumpRoot +Applies to: no restrictions. + +Jump to the tree root. + +------------------------------------------------------------------------------ + *NERDTree-p* +Default key: p +Map option: NERDTreeMapJumpParent +Applies to: files and directories. + +Jump to the parent node of the selected node. + +------------------------------------------------------------------------------ + *NERDTree-K* +Default key: K +Map option: NERDTreeMapJumpFirstChild +Applies to: files and directories. + +Jump to the first child of the current nodes parent. + +If the cursor is already on the first node then do the following: + * loop back thru the siblings of the current nodes parent until we find an + open dir with children + * go to the first child of that node + +------------------------------------------------------------------------------ + *NERDTree-J* +Default key: J +Map option: NERDTreeMapJumpLastChild +Applies to: files and directories. + +Jump to the last child of the current nodes parent. + +If the cursor is already on the last node then do the following: + * loop forward thru the siblings of the current nodes parent until we find + an open dir with children + * go to the last child of that node + +------------------------------------------------------------------------------ + *NERDTree-C-J* +Default key: <C-J> +Map option: NERDTreeMapJumpNextSibling +Applies to: files and directories. + +Jump to the next sibling of the selected node. + +------------------------------------------------------------------------------ + *NERDTree-C-K* +Default key: <C-K> +Map option: NERDTreeMapJumpPrevSibling +Applies to: files and directories. + +Jump to the previous sibling of the selected node. + +------------------------------------------------------------------------------ + *NERDTree-C* +Default key: C +Map option: NERDTreeMapChdir +Applies to: directories. + +Make the selected directory node the new tree root. If a file is selected, its +parent is used. + +------------------------------------------------------------------------------ + *NERDTree-u* +Default key: u +Map option: NERDTreeMapUpdir +Applies to: no restrictions. + +Move the tree root up a dir (like doing a "cd .."). + +------------------------------------------------------------------------------ + *NERDTree-U* +Default key: U +Map option: NERDTreeMapUpdirKeepOpen +Applies to: no restrictions. + +Like |NERDTree-u| except that the old tree root is kept open. + +------------------------------------------------------------------------------ + *NERDTree-r* +Default key: r +Map option: NERDTreeMapRefresh +Applies to: files and directories. + +If a dir is selected, recursively refresh that dir, i.e. scan the filesystem +for changes and represent them in the tree. + +If a file node is selected then the above is done on it's parent. + +------------------------------------------------------------------------------ + *NERDTree-R* +Default key: R +Map option: NERDTreeMapRefreshRoot +Applies to: no restrictions. + +Recursively refresh the tree root. + +------------------------------------------------------------------------------ + *NERDTree-m* +Default key: m +Map option: NERDTreeMapMenu +Applies to: files and directories. + +Display the NERD tree menu. See |NERDTreeMenu| for details. + +------------------------------------------------------------------------------ + *NERDTree-cd* +Default key: cd +Map option: NERDTreeMapChdir +Applies to: files and directories. + +Change vims current working directory to that of the selected node. + +------------------------------------------------------------------------------ + *NERDTree-I* +Default key: I +Map option: NERDTreeMapToggleHidden +Applies to: no restrictions. + +Toggles whether hidden files (i.e. "dot files") are displayed. + +------------------------------------------------------------------------------ + *NERDTree-f* +Default key: f +Map option: NERDTreeMapToggleFilters +Applies to: no restrictions. + +Toggles whether file filters are used. See |'NERDTreeIgnore'| for details. + +------------------------------------------------------------------------------ + *NERDTree-F* +Default key: F +Map option: NERDTreeMapToggleFiles +Applies to: no restrictions. + +Toggles whether file nodes are displayed. + +------------------------------------------------------------------------------ + *NERDTree-B* +Default key: B +Map option: NERDTreeMapToggleBookmarks +Applies to: no restrictions. + +Toggles whether the bookmarks table is displayed. + +------------------------------------------------------------------------------ + *NERDTree-q* +Default key: q +Map option: NERDTreeMapQuit +Applies to: no restrictions. + +Closes the NERDtree window. + +------------------------------------------------------------------------------ + *NERDTree-A* +Default key: A +Map option: NERDTreeMapToggleZoom +Applies to: no restrictions. + +Maximize (zoom) and minimize the NERDtree window. + +------------------------------------------------------------------------------ + *NERDTree-?* +Default key: ? +Map option: NERDTreeMapHelp +Applies to: no restrictions. + +Toggles whether the quickhelp is displayed. + +------------------------------------------------------------------------------ +2.3. The NERD tree menu *NERDTreeMenu* + +The NERD tree has a menu that can be programmed via the an API (see +|NERDTreeMenuAPI|). The idea is to simulate the "right click" menus that most +file explorers have. + +The script comes with two default menu plugins: exec_menuitem.vim and +fs_menu.vim. fs_menu.vim adds some basic filesystem operations to the menu for +creating/deleting/moving/copying files and dirs. exec_menuitem.vim provides a +menu item to execute executable files. + +Related tags: |NERDTree-m| |NERDTreeApi| + +============================================================================== +3. Customisation *NERDTreeOptions* + + +------------------------------------------------------------------------------ +3.1. Customisation summary *NERDTreeOptionSummary* + +The script provides the following options that can customise the behaviour the +NERD tree. These options should be set in your vimrc. + +|'loaded_nerd_tree'| Turns off the script. + +|'NERDChristmasTree'| Tells the NERD tree to make itself colourful + and pretty. + +|'NERDTreeAutoCenter'| Controls whether the NERD tree window centers + when the cursor moves within a specified + distance to the top/bottom of the window. +|'NERDTreeAutoCenterThreshold'| Controls the sensitivity of autocentering. + +|'NERDTreeCaseSensitiveSort'| Tells the NERD tree whether to be case + sensitive or not when sorting nodes. + +|'NERDTreeChDirMode'| Tells the NERD tree if/when it should change + vim's current working directory. + +|'NERDTreeHighlightCursorline'| Tell the NERD tree whether to highlight the + current cursor line. + +|'NERDTreeHijackNetrw'| Tell the NERD tree whether to replace the netrw + autocommands for exploring local directories. + +|'NERDTreeIgnore'| Tells the NERD tree which files to ignore. + +|'NERDTreeBookmarksFile'| Where the bookmarks are stored. + +|'NERDTreeMouseMode'| Tells the NERD tree how to handle mouse + clicks. + +|'NERDTreeQuitOnOpen'| Closes the tree window after opening a file. + +|'NERDTreeShowBookmarks'| Tells the NERD tree whether to display the + bookmarks table on startup. + +|'NERDTreeShowFiles'| Tells the NERD tree whether to display files + in the tree on startup. + +|'NERDTreeShowHidden'| Tells the NERD tree whether to display hidden + files on startup. + +|'NERDTreeShowLineNumbers'| Tells the NERD tree whether to display line + numbers in the tree window. + +|'NERDTreeSortOrder'| Tell the NERD tree how to sort the nodes in + the tree. + +|'NERDTreeStatusline'| Set a statusline for NERD tree windows. + +|'NERDTreeWinPos'| Tells the script where to put the NERD tree + window. + +|'NERDTreeWinSize'| Sets the window size when the NERD tree is + opened. + +------------------------------------------------------------------------------ +3.2. Customisation details *NERDTreeOptionDetails* + +To enable any of the below options you should put the given line in your +~/.vimrc + + *'loaded_nerd_tree'* +If this plugin is making you feel homicidal, it may be a good idea to turn it +off with this line in your vimrc: > + let loaded_nerd_tree=1 +< +------------------------------------------------------------------------------ + *'NERDChristmasTree'* +Values: 0 or 1. +Default: 1. + +If this option is set to 1 then some extra syntax highlighting elements are +added to the nerd tree to make it more colourful. + +Set it to 0 for a more vanilla looking tree. + +------------------------------------------------------------------------------ + *'NERDTreeAutoCenter'* +Values: 0 or 1. +Default: 1 + +If set to 1, the NERD tree window will center around the cursor if it moves to +within |'NERDTreeAutoCenterThreshold'| lines of the top/bottom of the window. + +This is ONLY done in response to tree navigation mappings, +i.e. |NERDTree-J| |NERDTree-K| |NERDTree-C-J| |NERDTree-C-K| |NERDTree-p| +|NERDTree-P| + +The centering is done with a |zz| operation. + +------------------------------------------------------------------------------ + *'NERDTreeAutoCenterThreshold'* +Values: Any natural number. +Default: 3 + +This option controls the "sensitivity" of the NERD tree auto centering. See +|'NERDTreeAutoCenter'| for details. + +------------------------------------------------------------------------------ + *'NERDTreeCaseSensitiveSort'* +Values: 0 or 1. +Default: 0. + +By default the NERD tree does not sort nodes case sensitively, i.e. nodes +could appear like this: > + bar.c + Baz.c + blarg.c + boner.c + Foo.c +< +But, if you set this option to 1 then the case of the nodes will be taken into +account. The above nodes would then be sorted like this: > + Baz.c + Foo.c + bar.c + blarg.c + boner.c +< +------------------------------------------------------------------------------ + *'NERDTreeChDirMode'* + +Values: 0, 1 or 2. +Default: 0. + +Use this option to tell the script when (if at all) to change the current +working directory (CWD) for vim. + +If it is set to 0 then the CWD is never changed by the NERD tree. + +If set to 1 then the CWD is changed when the NERD tree is first loaded to the +directory it is initialized in. For example, if you start the NERD tree with > + :NERDTree /home/marty/foobar +< +then the CWD will be changed to /home/marty/foobar and will not be changed +again unless you init another NERD tree with a similar command. + +If the option is set to 2 then it behaves the same as if set to 1 except that +the CWD is changed whenever the tree root is changed. For example, if the CWD +is /home/marty/foobar and you make the node for /home/marty/foobar/baz the new +root then the CWD will become /home/marty/foobar/baz. + +------------------------------------------------------------------------------ + *'NERDTreeHighlightCursorline'* +Values: 0 or 1. +Default: 1. + +If set to 1, the current cursor line in the NERD tree buffer will be +highlighted. This is done using the |'cursorline'| option. + +------------------------------------------------------------------------------ + *'NERDTreeHijackNetrw'* +Values: 0 or 1. +Default: 1. + +If set to 1, doing a > + :edit <some directory> +< +will open up a "secondary" NERD tree instead of a netrw in the target window. + +Secondary NERD trees behaves slighly different from a regular trees in the +following respects: + 1. 'o' will open the selected file in the same window as the tree, + replacing it. + 2. you can have as many secondary tree as you want in the same tab. + +------------------------------------------------------------------------------ + *'NERDTreeIgnore'* +Values: a list of regular expressions. +Default: ['\~$']. + +This option is used to specify which files the NERD tree should ignore. It +must be a list of regular expressions. When the NERD tree is rendered, any +files/dirs that match any of the regex's in 'NERDTreeIgnore' wont be +displayed. + +For example if you put the following line in your vimrc: > + let NERDTreeIgnore=['\.vim$', '\~$'] +< +then all files ending in .vim or ~ will be ignored. + +Note: to tell the NERD tree not to ignore any files you must use the following +line: > + let NERDTreeIgnore=[] +< + +The file filters can be turned on and off dynamically with the |NERDTree-f| +mapping. + +------------------------------------------------------------------------------ + *'NERDTreeBookmarksFile'* +Values: a path +Default: $HOME/.NERDTreeBookmarks + +This is where bookmarks are saved. See |NERDTreeBookmarkCommands|. + +------------------------------------------------------------------------------ + *'NERDTreeMouseMode'* +Values: 1, 2 or 3. +Default: 1. + +If set to 1 then a double click on a node is required to open it. +If set to 2 then a single click will open directory nodes, while a double +click will still be required for file nodes. +If set to 3 then a single click will open any node. + +Note: a double click anywhere on a line that a tree node is on will +activate it, but all single-click activations must be done on name of the node +itself. For example, if you have the following node: > + | | |-application.rb +< +then (to single click activate it) you must click somewhere in +'application.rb'. + +------------------------------------------------------------------------------ + *'NERDTreeQuitOnOpen'* + +Values: 0 or 1. +Default: 0 + +If set to 1, the NERD tree window will close after opening a file with the +|NERDTree-o|, |NERDTree-i|, |NERDTree-t| and |NERDTree-T| mappings. + +------------------------------------------------------------------------------ + *'NERDTreeShowBookmarks'* +Values: 0 or 1. +Default: 0. + +If this option is set to 1 then the bookmarks table will be displayed. + +This option can be toggled dynamically, per tree, with the |NERDTree-B| +mapping. + +------------------------------------------------------------------------------ + *'NERDTreeShowFiles'* +Values: 0 or 1. +Default: 1. + +If this option is set to 1 then files are displayed in the NERD tree. If it is +set to 0 then only directories are displayed. + +This option can be toggled dynamically, per tree, with the |NERDTree-F| +mapping and is useful for drastically shrinking the tree when you are +navigating to a different part of the tree. + +------------------------------------------------------------------------------ + *'NERDTreeShowHidden'* +Values: 0 or 1. +Default: 0. + +This option tells vim whether to display hidden files by default. This option +can be dynamically toggled, per tree, with the |NERDTree-I| mapping. Use one +of the follow lines to set this option: > + let NERDTreeShowHidden=0 + let NERDTreeShowHidden=1 +< + +------------------------------------------------------------------------------ + *'NERDTreeShowLineNumbers'* +Values: 0 or 1. +Default: 0. + +This option tells vim whether to display line numbers for the NERD tree +window. Use one of the follow lines to set this option: > + let NERDTreeShowLineNumbers=0 + let NERDTreeShowLineNumbers=1 +< + +------------------------------------------------------------------------------ + *'NERDTreeSortOrder'* +Values: a list of regular expressions. +Default: ['\/$', '*', '\.swp$', '\.bak$', '\~$'] + +This option is set to a list of regular expressions which are used to +specify the order of nodes under their parent. + +For example, if the option is set to: > + ['\.vim$', '\.c$', '\.h$', '*', 'foobar'] +< +then all .vim files will be placed at the top, followed by all .c files then +all .h files. All files containing the string 'foobar' will be placed at the +end. The star is a special flag: it tells the script that every node that +doesnt match any of the other regexps should be placed here. + +If no star is present in 'NERDTreeSortOrder' then one is automatically +appended to the array. + +The regex '\/$' should be used to match directory nodes. + +After this sorting is done, the files in each group are sorted alphabetically. + +Other examples: > + (1) ['*', '\/$'] + (2) [] + (3) ['\/$', '\.rb$', '\.php$', '*', '\.swp$', '\.bak$', '\~$'] +< +1. Directories will appear last, everything else will appear above. +2. Everything will simply appear in alphabetical order. +3. Dirs will appear first, then ruby and php. Swap files, bak files and vim + backup files will appear last with everything else preceding them. + +------------------------------------------------------------------------------ + *'NERDTreeStatusline'* +Values: Any valid statusline setting. +Default: %{b:NERDTreeRoot.path.strForOS(0)} + +Tells the script what to use as the |'statusline'| setting for NERD tree +windows. + +Note that the statusline is set using |:let-&| not |:set| so escaping spaces +isn't necessary. + +Setting this option to -1 will will deactivate it so that your global +statusline setting is used instead. + +------------------------------------------------------------------------------ + *'NERDTreeWinPos'* +Values: "left" or "right" +Default: "left". + +This option is used to determine where NERD tree window is placed on the +screen. + +This option makes it possible to use two different explorer plugins +simultaneously. For example, you could have the taglist plugin on the left of +the window and the NERD tree on the right. + +------------------------------------------------------------------------------ + *'NERDTreeWinSize'* +Values: a positive integer. +Default: 31. + +This option is used to change the size of the NERD tree when it is loaded. + +============================================================================== +4. The NERD tree API *NERDTreeAPI* + +The NERD tree script allows you to add custom key mappings and menu items via +a set of API calls. Any scripts that use this API should be placed in +~/.vim/nerdtree_plugin/ (*nix) or ~/vimfiles/nerdtree_plugin (windows). + +The script exposes some prototype objects that can be used to manipulate the +tree and/or get information from it: > + g:NERDTreePath + g:NERDTreeDirNode + g:NERDTreeFileNode + g:NERDTreeBookmark +< +See the code/comments in NERD_tree.vim to find how to use these objects. The +following code conventions are used: + * class members start with a capital letter + * instance members start with a lower case letter + * private members start with an underscore + +See this blog post for more details: + http://got-ravings.blogspot.com/2008/09/vim-pr0n-prototype-based-objects.html + +------------------------------------------------------------------------------ +4.1. Key map API *NERDTreeKeymapAPI* + +NERDTreeAddKeyMap({options}) *NERDTreeAddKeyMap()* + Adds a new keymapping for all NERD tree buffers. + {options} must be a dictionary, and must contain the following keys: + "key" - the trigger key for the new mapping + "callback" - the function the new mapping will be bound to + "quickhelpText" - the text that will appear in the quickhelp (see + |NERDTree-?|) + + Example: > + call NERDTreeAddKeyMap({ + \ 'key': 'b', + \ 'callback': 'NERDTreeEchoCurrentNode', + \ 'quickhelpText': 'echo full path of current node' }) + + function! NERDTreeEchoCurrentNode() + let n = g:NERDTreeFileNode.GetSelected() + if n != {} + echomsg 'Current node: ' . n.path.str() + endif + endfunction +< + This code should sit in a file like ~/.vim/nerdtree_plugin/mymapping.vim. + It adds a (rather useless) mapping on 'b' which echos the full path to the + current node. + +------------------------------------------------------------------------------ +4.2. Menu API *NERDTreeMenuAPI* + +NERDTreeAddSubmenu({options}) *NERDTreeAddSubmenu()* + Creates and returns a new submenu. + + {options} must be a dictionary and must contain the following keys: + "text" - the text of the submenu that the user will see + "shortcut" - a shortcut key for the submenu (need not be unique) + + The following keys are optional: + "isActiveCallback" - a function that will be called to determine whether + this submenu item will be displayed or not. The callback function must return + 0 or 1. + "parent" - the parent submenu of the new submenu (returned from a previous + invocation of NERDTreeAddSubmenu()). If this key is left out then the new + submenu will sit under the top level menu. + + See below for an example. + +NERDTreeAddMenuItem({options}) *NERDTreeAddMenuItem()* + Adds a new menu item to the NERD tree menu (see |NERDTreeMenu|). + + {options} must be a dictionary and must contain the + following keys: + "text" - the text of the menu item which the user will see + "shortcut" - a shortcut key for the menu item (need not be unique) + "callback" - the function that will be called when the user activates the + menu item. + + The following keys are optional: + "isActiveCallback" - a function that will be called to determine whether + this menu item will be displayed or not. The callback function must return + 0 or 1. + "parent" - if the menu item belongs under a submenu then this key must be + specified. This value for this key will be the object that + was returned when the submenu was created with |NERDTreeAddSubmenu()|. + + See below for an example. + +NERDTreeAddMenuSeparator([{options}]) *NERDTreeAddMenuSeparator()* + Adds a menu separator (a row of dashes). + + {options} is an optional dictionary that may contain the following keys: + "isActiveCallback" - see description in |NERDTreeAddMenuItem()|. + +Below is an example of the menu API in action. > + call NERDTreeAddMenuSeparator() + + call NERDTreeAddMenuItem({ + \ 'text': 'a (t)op level menu item', + \ 'shortcut': 't', + \ 'callback': 'SomeFunction' }) + + let submenu = NERDTreeAddSubmenu({ + \ 'text': 'a (s)ub menu', + \ 'shortcut': 's' }) + + call NERDTreeAddMenuItem({ + \ 'text': '(n)ested item 1', + \ 'shortcut': 'n', + \ 'callback': 'SomeFunction', + \ 'parent': submenu }) + + call NERDTreeAddMenuItem({ + \ 'text': '(n)ested item 2', + \ 'shortcut': 'n', + \ 'callback': 'SomeFunction', + \ 'parent': submenu }) +< +This will create the following menu: > + -------------------- + a (t)op level menu item + a (s)ub menu +< +Where selecting "a (s)ub menu" will lead to a second menu: > + (n)ested item 1 + (n)ested item 2 +< +When any of the 3 concrete menu items are selected the function "SomeFunction" +will be called. + +------------------------------------------------------------------------------ +NERDTreeRender() *NERDTreeRender()* + Re-renders the NERD tree buffer. Useful if you change the state of the + tree and you want to it to be reflected in the UI. + +============================================================================== +5. About *NERDTreeAbout* + +The author of the NERD tree is a terrible terrible monster called Martyzilla +who gobbles up small children with milk and sugar for breakfast. + +He can be reached at martin.grenfell at gmail dot com. He would love to hear +from you, so feel free to send him suggestions and/or comments about this +plugin. Don't be shy --- the worst he can do is slaughter you and stuff you in +the fridge for later ;) + +The latest stable versions can be found at + http://www.vim.org/scripts/script.php?script_id=1658 + +The latest dev versions are on github + http://github.com/scrooloose/nerdtree + + +============================================================================== +6. Changelog *NERDTreeChangelog* + +4.x.x + - Fix a bug with :NERDTreeFind and symlinks. Thanks to Vitaly Bogdanov. + +4.1.0 + features: + - NERDTreeFind to reveal the node for the current buffer in the tree, + see |NERDTreeFind|. This effectively merges the FindInNERDTree plugin (by + Doug McInnes) into the script. + - make NERDTreeQuitOnOpen apply to the t/T keymaps too. Thanks to Stefan + Ritter and Rémi Prévost. + - truncate the root node if wider than the tree window. Thanks to Victor + Gonzalez. + + bugfixes: + - really fix window state restoring + - fix some win32 path escaping issues. Thanks to Stephan Baumeister, Ricky, + jfilip1024, and Chris Chambers + +4.0.0 + - add a new programmable menu system (see :help NERDTreeMenu). + - add new APIs to add menus/menu-items to the menu system as well as + custom key mappings to the NERD tree buffer (see :help NERDTreeAPI). + - removed the old API functions + - added a mapping to maximize/restore the size of nerd tree window, thanks + to Guillaume Duranceau for the patch. See :help NERDTree-A for details. + + - fix a bug where secondary nerd trees (netrw hijacked trees) and + NERDTreeQuitOnOpen didnt play nicely, thanks to Curtis Harvey. + - fix a bug where the script ignored directories whose name ended in a dot, + thanks to Aggelos Orfanakos for the patch. + - fix a bug when using the x mapping on the tree root, thanks to Bryan + Venteicher for the patch. + - fix a bug where the cursor position/window size of the nerd tree buffer + wasnt being stored on closing the window, thanks to Richard Hart. + - fix a bug where NERDTreeMirror would mirror the wrong tree + +3.1.1 + - fix a bug where a non-listed no-name buffer was getting created every + time the tree windows was created, thanks to Derek Wyatt and owen1 + - make <CR> behave the same as the 'o' mapping + - some helptag fixes in the doc, thanks strull + - fix a bug when using :set nohidden and opening a file where the previous + buf was modified. Thanks iElectric + - other minor fixes + +3.1.0 + New features: + - add mappings to open files in a vsplit, see :help NERDTree-s and :help + NERDTree-gs + - make the statusline for the nerd tree window default to something + hopefully more useful. See :help 'NERDTreeStatusline' + Bugfixes: + - make the hijack netrw functionality work when vim is started with "vim + <some dir>" (thanks to Alf Mikula for the patch). + - fix a bug where the CWD wasnt being changed for some operations even when + NERDTreeChDirMode==2 (thanks to Lucas S. Buchala) + - add -bar to all the nerd tree :commands so they can chain with other + :commands (thanks to tpope) + - fix bugs when ignorecase was set (thanks to nach) + - fix a bug with the relative path code (thanks to nach) + - fix a bug where doing a :cd would cause :NERDTreeToggle to fail (thanks nach) + + +3.0.1 + Bugfixes: + - fix bugs with :NERDTreeToggle and :NERDTreeMirror when 'hidden + was not set + - fix a bug where :NERDTree <path> would fail if <path> was relative and + didnt start with a ./ or ../ Thanks to James Kanze. + - make the q mapping work with secondary (:e <dir> style) trees, + thanks to jamessan + - fix a bunch of small bugs with secondary trees + + More insane refactoring. + +3.0.0 + - hijack netrw so that doing an :edit <directory> will put a NERD tree in + the window rather than a netrw browser. See :help 'NERDTreeHijackNetrw' + - allow sharing of trees across tabs, see :help :NERDTreeMirror + - remove "top" and "bottom" as valid settings for NERDTreeWinPos + - change the '<tab>' mapping to 'i' + - change the 'H' mapping to 'I' + - lots of refactoring + +============================================================================== +7. Credits *NERDTreeCredits* + +Thanks to the following people for testing, bug reports, ideas etc. Without +you I probably would have got bored of the hacking the NERD tree and +just downloaded pr0n instead. + + Tim Carey-Smith (halorgium) + Vigil + Nick Brettell + Thomas Scott Urban + Terrance Cohen + Yegappan Lakshmanan + Jason Mills + Michael Geddes (frogonwheels) + Yu Jun + Michael Madsen + AOYAMA Shotaro + Zhang Weiwu + Niels Aan de Brugh + Olivier Yiptong + Zhang Shuhan + Cory Echols + Piotr Czachur + Yuan Jiang + Matan Nassau + Maxim Kim + Charlton Wang + Matt Wozniski (godlygeek) + knekk + Sean Chou + Ryan Penn + Simon Peter Nicholls + Michael Foobar + Tomasz Chomiuk + Denis Pokataev + Tim Pope (tpope) + James Kanze + James Vega (jamessan) + Frederic Chanal (nach) + Alf Mikula + Lucas S. Buchala + Curtis Harvey + Guillaume Duranceau + Richard Hart (hates) + Doug McInnes + Stefan Ritter + Rémi Prévost + Victor Gonzalez + Stephan Baumeister + Ricky + jfilip1024 + Chris Chambers + Vitaly Bogdanov + +============================================================================== +8. License *NERDTreeLicense* + +The NERD tree is released under the wtfpl. +See http://sam.zoy.org/wtfpl/COPYING. diff --git a/vim/doc/ZoomWin.txt b/vim/doc/ZoomWin.txt new file mode 100644 index 0000000..a691a60 --- /dev/null +++ b/vim/doc/ZoomWin.txt @@ -0,0 +1,121 @@ +*ZoomWin.txt* Zoom into/out-of a window Jan 26, 2009 +Authors: Charles E. Campbell, Jr. *zoomwin* + Ron Aaron +Copyright: (c) 2004-2008 by Charles E. Campbell, Jr. *zoomwin-copyright* + The VIM LICENSE applies to ZoomWin.vim and ZoomWin.txt + (see |copyright|) except use "ZoomWin" instead of "Vim" + No warranty, express or implied. Use At-Your-Own-Risk. + +============================================================================== +1. Usage *zoomwin-usage* + + :call ZoomWin() + :ZoomWin + <c-w>o + + Either of the two commands or the normal mode <c-w>o will toggle between + * selecting the current window for display as the only window or + * to restore the original multiple-window view. + +============================================================================== +2. Setup *zoomwin-setup* + + Simply put ZoomWin.vim into your .vim/plugin directory (you may need to + make such a directory first). Under Windows that should be + vimfiles\plugin. ZoomWin now uses the HelpExtractor method to + automatically extract help and to make it known to vim by running helptags + on it. + +============================================================================== +3. History *zoomwin-history* + + v23 Apr 24, 2008 : * when |'scrollbind'| was activated: when ZoomWin + attempted to restore multiple-windows, the cursor + position was incorrect. Fixed. + Jan 02, 2009 * included some more things in the session file + * broke ZoomWin into an plugin + autoload pair + * (Ingo Karkat) contributed a patch to retain the + the search pattern before zooming + * (Ingo Karkat) contributed a patch to detect the + vim 7.2 name for the command line window + v22 Apr 10, 2006 : * "only" was occasionally issuing an "Already one + window" message, which is now prevented + * SavePosn() issued error message when handling an + empty buffer + * saves yank registers and restores them on each + zoom/unzoom + v21 Oct 12, 2004 : * v14 fixed a bug when wmw and/or wmv equal to 0; + v21 will invoke the patch only if the version <= 603. + For vim version 6.3 users, this fix allows more files + to be handled by ZoomWin. + May 10, 2005 * When :version shows -mksession, and the vim version + is at least 6.3, ZoomWin will now do a partial zoom + v20 Jul 26, 2004 : * bugfix - ZoomWin didn't always retain the + position in the former zoomed-in window after + the window layout was restored. It was restoring + the position when the zoom-in occurred. + v19 May 26, 2004 : * bugfix - winmanager has events firing that, + amongst other things, reset the bufhidden + option to delete for some windows while + ZoomWin worked. ZoomWin now works + successfully with winmanager. + v18 May 20, 2004 : * bugfix - didn't adversely affect anything, but + ZoomWin was deleting its session file twice. + * bugfix -- a multi-source file + minibufexplorer + + Taglist interaction bug -- minibufexplorer's + autocmd events were firing, generating a new + window while ZoomWin was attempting to restore + the display. ZoomWin didn't have restoration + information for the new window and so reported + an error. Events are now temporarily disabled + while ZoomWin is restoring the layout. + v17 Mar 26, 2004 : * ZoomWin command installed. Works nicely with + taglist: vim +Tlist +ZoomWin filename + v16 Dec 22, 2003 : * handles bufhidden and nobl windows (TagList support). + * Now also works with quickfix window (:copen) but + still not with |cmdline-window| (q:) + v15 Dec 19, 2003 : * SavePosn()/RestorePosn() needed to be preceded + by s: to prevent clashes + v14 Dec 18, 2003 : * works around a restoration-bug with mksession + when either wmw or wmh settings are zero + * Bwipes internal temporary buffers + * Known bugs: will not work with command-line + * Editing window (|cmdline-window|) nor the + quickfix window (|copen|). + v13 Dec 18, 2003 : Uses eventignore to prevent events/autocmds from + firing while changing the mksession results. + v12 Dec 12, 2003 : uses hidden and a minimalist mksession save + v11 Oct 14, 2003 : bug fix: apparently RestorePosn()'s variables, + which were b:, weren't always defined, so s: + ones are now used. + v10 Sep 22, 2003 : Bug fix: when a single window is showing, the user + moves the cursor, then <c-w>o used to restore + screen, the current cursor position wasn't retained + Restores v:this_session. + Bug fix: change a window, use <c-w>o, then write. + Was saving file only to temporary file instead of + actual file, but when the actual file was brought back, + the changes were lost. + v9 Aug 15, 2003 : v8 managed to trash syntax highlighting on + reload, this one removes the eventignore + handling. Will need more pondering... + v8 Aug 14, 2003 : now handles not-modified but not filereadable + buffers, nowrite buffers uses eventignore to + bypass autocmd firing + v7 May 23, 2003 : bugfix - GotoWinNum() didn't always get the + cursor into the correct window + v6 Mar 25, 2003 : more cleanup included + v5 Mar 14, 2003 : includes support for handling scratch buffers, + no-name buffer windows, and modified-buffer + windows. All windows' contents will be saved to + temporary buffers + v4 Dec 12, 2002 : Zak Beck contributed code to clean up temporary + session files if one leaves vim while zoomed-in + v3 Dec 11, 2002 : plugin-ized + v2 Nov 08, 2002 : A guaranteed-to-be-unique to this + session file is used for session information. + Modified but not yet saved files are made hidden + during zoom in. + v1 the epoch : Ron Aaron's original + +vim:tw=78:ts=8:ft=help diff --git a/vim/doc/ack.txt b/vim/doc/ack.txt new file mode 100644 index 0000000..bbe4299 --- /dev/null +++ b/vim/doc/ack.txt @@ -0,0 +1,51 @@ +*ack.txt* Plugin that integrates ack with Vim + +============================================================================== +Author: Antoine Imbert <antoine.imbert+ackvim@gmail.com> *ack-author* +License: Same terms as Vim itself (see |license|) + +============================================================================== +INTRODUCTION *ack* + +This plugin is a front for the Perl module App::Ack. Ack can be used as a +replacement for grep. This plugin will allow you to run ack from vim, and +shows the results in a split window. + +:Ack[!] [options] {pattern} [{directory}] *:Ack* + + Search recursively in {directory} (which defaults to the current + directory) for the {pattern}. Behaves just like the |:grep| command, but + will open the |Quickfix| window for you. If [!] is not given the first + error is jumped to. + +:AckAdd [options] {pattern} [{directory}] *:AckAdd* + + Just like |:Ack|, but instead of making a new list, the matches are + appended to the current |quickfix| list. + +:AckFromSearch [{directory}] *:AckFromSearch* + + Just like |:Ack| but the pattern is from previous search. + +:LAck [options] {pattern} [{directory}] *:LAck* + + Just like |:Ack| but instead of the |quickfix| list, matches are placed in + the current |location-list|. + +:LAckAdd [options] {pattern} [{directory}] *:LAckAdd* + + Just like |:AckAdd| but instead of the |quickfix| list, matches are added + to the current |location-list| + +:AckFile [options] {pattern} [{directory}] *:AckFile* + + Search recursively in {directory} (which defaults to the current + directory) for filenames matching the {pattern}. Behaves just like the + |:grep| command, but will open the |Quickfix| window for you. + +Files containing the search term will be listed in the split window, along +with the line number of the occurrence, once for each occurrence. <Enter> on +a line in this window will open the file, and place the cursor on the matching +line. + +See http://betterthangrep.com/ for more information. diff --git a/vim/doc/coffee-script.txt b/vim/doc/coffee-script.txt new file mode 100644 index 0000000..792ffff --- /dev/null +++ b/vim/doc/coffee-script.txt @@ -0,0 +1,114 @@ +*coffee-script.txt* Plugin for editing, compiling and running CoffeeScript + +============================================================================= +Author: Mick Koch <kchmck@gmail.com> *coffee-script-author* +License: WTFPL (see |coffee-script-license|) + +============================================================================= + +CONTENTS *coffee-script-contents* + +|coffee-script-introduction| Introduction and Feature Summary +|coffee-script-commands| Commands +|coffee-script-settings| Settings + +{Vi does not have any of this} + +============================================================================= + +INTRODUCTION *coffee-script* + *coffee-script-introduction* + +This plugin provides facilities for editing CoffeeScript, including syntax +highlighting, indenting and compilation. Also included is syntax support for +Eco templates, and handling of {text/coffeescript} in HTML. + + +COMMANDS *coffee-script-commands* + + *:CoffeeMake* +:CoffeeMake {opts} Calls |:make!|, with 'makeprg' being "coffee -c" plus + any additional {opts} given. Opens the |quickfix| + window if there are any errors and jumps to the first + error. You may set |g:coffee_make_options| to specify + default command-line options that will always be + passed. By default, all compiler output is shown -- + running with |:silent| will hide this. + + *:CoffeeMake!* +:CoffeeMake! {opts} As with :CoffeeMake, but will not jump to the first + error. + + *:CoffeeCompile* +:[range]CoffeeCompile [vertical] [{win-size}] + Shows how the current file or [range] will be compiled + to JavaScript. [vertical] (or vert) splits the + compile buffer vertically instead of horizontally, and + {win-size} sets the initial size of the buffer. It can + be closed quickly with the "q" key. + +:CoffeeCompile {watch} [vertical] [{win-size}] + The watch mode of :CoffeeCompile emulates the "Try + CoffeeScript" live preview on the CoffeeScript web + site -- after making changes to the source file, + exiting insert mode will cause the preview buffer to + update automatically. {watch} should be given as + "watch" or "unwatch," where the latter will of course + stop the automatic updating. [vertical] is + recommended, and 'scrollbind' is useful. + + *:CoffeeRun* +:[range]CoffeeRun Compiles the file or [range] and runs the resulting + JavaScript, displaying the output. + + +SETTINGS *coffee-script-settings* + +You can configure plugin behavior by setting global variables or syntax +highlighting directives in your |vimrc|. + +Global Settings~ + +You may set these in your |vimrc| as illustrated below. + + *g:coffee_make_options* > + let g:coffee_make_options='--bare' +Always include the specified options when compiling with |:CoffeeCompile|. + +Syntax Highlighting~ + *ft-coffee-script-syntax* +Trailing whitespace is highlighted as an error by default. This can be +disabled with: +> + hi link coffeeSpaceError NONE + +Trailing semicolons are also considered an error (for help transitioning from +JavaScript.) This can be disabled with: +> + hi link coffeeSemicolonError NONE + +Reserved words like {function} and {var} are highlighted as an error in +contexts disallowed by CoffeeScript. This can be disabled with: +> + hi link coffeeReservedError NONE + + +============================================================================= + +LICENSE *coffee-script-license* + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (C) 2010 to 2011 Mick Koch <kchmck@gmail.com> + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. + + vim:tw=78:ts=8:ft=help:norl: diff --git a/vim/doc/command-t.txt b/vim/doc/command-t.txt new file mode 100644 index 0000000..d7e8c41 --- /dev/null +++ b/vim/doc/command-t.txt @@ -0,0 +1,817 @@ +*command-t.txt* Command-T plug-in for Vim *command-t* + +CONTENTS *command-t-contents* + + 1. Introduction |command-t-intro| + 2. Requirements |command-t-requirements| + 3. Installation |command-t-installation| + 3. Managing using Pathogen |command-t-pathogen| + 4. Trouble-shooting |command-t-trouble-shooting| + 5. Usage |command-t-usage| + 6. Commands |command-t-commands| + 7. Mappings |command-t-mappings| + 8. Options |command-t-options| + 9. Authors |command-t-authors| +10. Website |command-t-website| +11. Donations |command-t-donations| +12. License |command-t-license| +13. History |command-t-history| + + +INTRODUCTION *command-t-intro* + +The Command-T plug-in provides an extremely fast, intuitive mechanism for +opening files and buffers with a minimal number of keystrokes. It's named +"Command-T" because it is inspired by the "Go to File" window bound to +Command-T in TextMate. + +Files are selected by typing characters that appear in their paths, and are +ordered by an algorithm which knows that characters that appear in certain +locations (for example, immediately after a path separator) should be given +more weight. + +To search efficiently, especially in large projects, you should adopt a +"path-centric" rather than a "filename-centric" mentality. That is you should +think more about where the desired file is found rather than what it is +called. This means narrowing your search down by including some characters +from the upper path components rather than just entering characters from the +filename itself. + +Screencasts demonstrating the plug-in can be viewed at: + + https://wincent.com/products/command-t + + +REQUIREMENTS *command-t-requirements* + +The plug-in requires Vim compiled with Ruby support, a compatible Ruby +installation at the operating system level, and a C compiler to build +the Ruby extension. + + +1. Vim compiled with Ruby support + +You can check for Ruby support by launching Vim with the --version switch: + + vim --version + +If "+ruby" appears in the version information then your version of Vim has +Ruby support. + +Another way to check is to simply try using the :ruby command from within Vim +itself: + + :ruby 1 + +If your Vim lacks support you'll see an error message like this: + + E319: Sorry, the command is not available in this version + +The version of Vim distributed with Mac OS X does not include Ruby support, +while MacVim does; it is available from: + + http://github.com/b4winckler/macvim/downloads + +For Windows users, the Vim 7.2 executable available from www.vim.org does +include Ruby support, and is recommended over version 7.3 (which links against +Ruby 1.9, but apparently has some bugs that need to be resolved). + + +2. Ruby + +In addition to having Ruby support in Vim, your system itself must have a +compatible Ruby install. "Compatible" means the same version as Vim itself +links against. If you use a different version then Command-T is unlikely +to work (see TROUBLE-SHOOTING below). + +On Mac OS X Snow Leopard, the system comes with Ruby 1.8.7 and all recent +versions of MacVim (the 7.2 snapshots and 7.3) are linked against it. + +On Linux and similar platforms, the linked version of Ruby will depend on +your distribution. You can usually find this out by examining the +compilation and linking flags displayed by the |:version| command in Vim, and +by looking at the output of: + + :ruby puts RUBY_VERSION + +A suitable Ruby environment for Windows can be installed using the Ruby +1.8.7-p299 RubyInstaller available at: + + http://rubyinstaller.org/downloads/archives + +If using RubyInstaller be sure to download the installer executable, not the +7-zip archive. When installing mark the checkbox "Add Ruby executables to your +PATH" so that Vim can find them. + + +3. C compiler + +Part of Command-T is implemented in C as a Ruby extension for speed, allowing +it to work responsively even on directory hierarchies containing enormous +numbers of files. As such, a C compiler is required in order to build the +extension and complete the installation. + +On Mac OS X, this can be obtained by installing the Xcode Tools that come on +the Mac OS X install disc. + +On Windows, the RubyInstaller Development Kit can be used to conveniently +install the necessary tool chain: + + http://rubyinstaller.org/downloads/archives + +At the time of writing, the appropriate development kit for use with Ruby +1.8.7 is DevKit-3.4.5r3-20091110. + +To use the Development Kit extract the archive contents to your C:\Ruby +folder. + + +INSTALLATION *command-t-installation* + +Command-T is distributed as a "vimball" which means that it can be installed +by opening it in Vim and then sourcing it: + + :e command-t.vba + :so % + +The files will be installed in your |'runtimepath'|. To check where this is +you can issue: + + :echo &rtp + +The C extension must then be built, which can be done from the shell. If you +use a typical |'runtimepath'| then the files were installed inside ~/.vim and +you can build the extension with: + + cd ~/.vim/ruby/command-t + ruby extconf.rb + make + +Note: If you are an RVM user, you must perform the build using the same +version of Ruby that Vim itself is linked against. This will often be the +system Ruby, which can be selected before issuing the "make" command with: + + rvm use system + + +MANAGING USING PATHOGEN *command-t-pathogen* + +Pathogen is a plugin that allows you to maintain plugin installations in +separate, isolated subdirectories under the "bundle" directory in your +|'runtimepath'|. The following examples assume that you already have +Pathogen installed and configured, and that you are installing into +~/.vim/bundle. For more information about Pathogen, see: + + http://www.vim.org/scripts/script.php?script_id=2332 + +If you manage your entire ~/.vim folder using Git then you can add the +Command-T repository as a submodule: + + cd ~/.vim + git submodule add git://git.wincent.com/command-t.git bundle/command-t + git submodule init + +Or if you just wish to do a simple clone instead of using submodules: + + cd ~/.vim + git clone git://git.wincent.com/command-t.git bundle/command-t + +Once you have a local copy of the repository you can update it at any time +with: + + cd ~/.vim/bundle/command-t + git pull + +Or you can switch to a specific release with: + + cd ~/.vim/bundle/command-t + git checkout 0.8b + +After installing or updating you must build the extension: + + cd ~/.vim/bundle/command-t + rake make + +While the Vimball installation automatically generates the help tags, under +Pathogen it is necessary to do so explicitly from inside Vim: + + :call pathogen#helptags() + + +TROUBLE-SHOOTING *command-t-trouble-shooting* + +Most installation problems are caused by a mismatch between the version of +Ruby on the host operating system, and the version of Ruby that Vim itself +linked against at compile time. For example, if one is 32-bit and the other is +64-bit, or one is from the Ruby 1.9 series and the other is from the 1.8 +series, then the plug-in is not likely to work. + +As such, on Mac OS X, I recommend using the standard Ruby that comes with the +system (currently 1.8.7) along with the latest version of MacVim (currently +version 7.3). If you wish to use custom builds of Ruby or of MacVim (not +recommmended) then you will have to take extra care to ensure that the exact +same Ruby environment is in effect when building Ruby, Vim and the Command-T +extension. + +For Windows, the following combination is known to work: + + - Vim 7.2 from http://www.vim.org/download.php: + ftp://ftp.vim.org/pub/vim/pc/gvim72.exe + - Ruby 1.8.7-p299 from http://rubyinstaller.org/downloads/archives: + http://rubyforge.org/frs/download.php/71492/rubyinstaller-1.8.7-p299.exe + - DevKit 3.4.5r3-20091110 from http://rubyinstaller.org/downloads/archives: + http://rubyforge.org/frs/download.php/66888/devkit-3.4.5r3-20091110.7z + +If a problem occurs the first thing you should do is inspect the output of: + + ruby extconf.rb + make + +During the installation, and: + + vim --version + +And compare the compilation and linker flags that were passed to the +extension and to Vim itself when they were built. If the Ruby-related +flags or architecture flags are different then it is likely that something +has changed in your Ruby environment and the extension may not work until +you eliminate the discrepancy. + + +USAGE *command-t-usage* + +Bring up the Command-T file window by typing: + + <Leader>t + +This mapping is set up automatically for you, provided you do not already have +a mapping for <Leader>t or |:CommandT|. You can also bring up the file window +by issuing the command: + + :CommandT + +A prompt will appear at the bottom of the screen along with a file window +showing all of the files in the current directory (as returned by the +|:pwd| command). + +For the most efficient file navigation within a project it's recommended that +you |:cd| into the root directory of your project when starting to work on it. +If you wish to open a file from outside of the project folder you can pass in +an optional path argument (relative or absolute) to |:CommandT|: + + :CommandT ../path/to/other/files + +Type letters in the prompt to narrow down the selection, showing only the +files whose paths contain those letters in the specified order. Letters do not +need to appear consecutively in a path in order for it to be classified as a +match. + +Once the desired file has been selected it can be opened by pressing <CR>. +(By default files are opened in the current window, but there are other +mappings that you can use to open in a vertical or horizontal split, or in +a new tab.) Note that if you have |'nohidden'| set and there are unsaved +changes in the current window when you press <CR> then opening in the current +window would fail; in this case Command-T will open the file in a new split. + +The following mappings are active when the prompt has focus: + + <BS> delete the character to the left of the cursor + <Del> delete the character at the cursor + <Left> move the cursor one character to the left + <C-h> move the cursor one character to the left + <Right> move the cursor one character to the right + <C-l> move the cursor one character to the right + <C-a> move the cursor to the start (left) + <C-e> move the cursor to the end (right) + <C-u> clear the contents of the prompt + <Tab> change focus to the file listing + +The following mappings are active when the file listing has focus: + + <Tab> change focus to the prompt + +The following mappings are active when either the prompt or the file listing +has focus: + + <CR> open the selected file + <C-CR> open the selected file in a new split window + <C-s> open the selected file in a new split window + <C-v> open the selected file in a new vertical split window + <C-t> open the selected file in a new tab + <C-j> select next file in the file listing + <C-n> select next file in the file listing + <Down> select next file in the file listing + <C-k> select previous file in the file listing + <C-p> select previous file in the file listing + <Up> select previous file in the file listing + <C-c> cancel (dismisses file listing) + +The following is also available on terminals which support it: + + <Esc> cancel (dismisses file listing) + +Note that the default mappings can be overriden by setting options in your +~/.vimrc file (see the OPTIONS section for a full list of available options). + +In addition, when the file listing has focus, typing a character will cause +the selection to jump to the first path which begins with that character. +Typing multiple characters consecutively can be used to distinguish between +paths which begin with the same prefix. + + +COMMANDS *command-t-commands* + + *:CommandT* +|:CommandT| Brings up the Command-T file window, starting in the + current working directory as returned by the|:pwd| + command. + + *:CommandTBuffer* +|:CommandTBuffer|Brings up the Command-T buffer window. + This works exactly like the standard file window, + except that the selection is limited to files that + you already have open in buffers. + + *:CommandTJumps* +|:CommandTJump| Brings up the Command-T jumplist window. + This works exactly like the standard file window, + except that the selection is limited to files that + you already have in the jumplist. Note that jumps + can persist across Vim sessions (see Vim's |jumplist| + documentation for more info). + + *:CommandTFlush* +|:CommandTFlush|Instructs the plug-in to flush its path cache, causing + the directory to be rescanned for new or deleted paths + the next time the file window is shown. In addition, all + configuration settings are re-evaluated, causing any + changes made to settings via the |:let| command to be picked + up. + + +MAPPINGS *command-t-mappings* + +By default Command-T comes with only two mappings: + + <Leader>t bring up the Command-T file window + <Leader>b bring up the Command-T buffer window + +However, Command-T won't overwrite a pre-existing mapping so if you prefer +to define different mappings use lines like these in your ~/.vimrc: + + nnoremap <silent> <Leader>t :CommandT<CR> + nnoremap <silent> <Leader>b :CommandTBuffer<CR> + +Replacing "<Leader>t" or "<Leader>b" with your mapping of choice. + +Note that in the case of MacVim you actually can map to Command-T (written +as <D-t> in Vim) in your ~/.gvimrc file if you first unmap the existing menu +binding of Command-T to "New Tab": + + if has("gui_macvim") + macmenu &File.New\ Tab key=<nop> + map <D-t> :CommandT<CR> + endif + +When the Command-T window is active a number of other additional mappings +become available for doing things like moving between and selecting matches. +These are fully described above in the USAGE section, and settings for +overriding the mappings are listed below under OPTIONS. + + +OPTIONS *command-t-options* + +A number of options may be set in your ~/.vimrc to influence the behaviour of +the plug-in. To set an option, you include a line like this in your ~/.vimrc: + + let g:CommandTMaxFiles=20000 + +To have Command-T pick up new settings immediately (that is, without having +to restart Vim) you can issue the |:CommandTFlush| command after making +changes via |:let|. + +Following is a list of all available options: + + *g:CommandTMaxFiles* + |g:CommandTMaxFiles| number (default 10000) + + The maximum number of files that will be considered when scanning the + current directory. Upon reaching this number scanning stops. This + limit applies only to file listings and is ignored for buffer + listings. + + *g:CommandTMaxDepth* + |g:CommandTMaxDepth| number (default 15) + + The maximum depth (levels of recursion) to be explored when scanning the + current directory. Any directories at levels beyond this depth will be + skipped. + + *g:CommandTMaxCachedDirectories* + |g:CommandTMaxCachedDirectories| number (default 1) + + The maximum number of directories whose contents should be cached when + recursively scanning. With the default value of 1, each time you change + directories the cache will be emptied and Command-T will have to + rescan. Higher values will make Command-T hold more directories in the + cache, bringing performance at the cost of memory usage. If set to 0, + there is no limit on the number of cached directories. + + *g:CommandTMaxHeight* + |g:CommandTMaxHeight| number (default: 0) + + The maximum height in lines the match window is allowed to expand to. + If set to 0, the window will occupy as much of the available space as + needed to show matching entries. + + *g:CommandTAlwaysShowDotFiles* + |g:CommandTAlwaysShowDotFiles| boolean (default: 0) + + When showing the file listing Command-T will by default show dot-files + only if the entered search string contains a dot that could cause a + dot-file to match. When set to a non-zero value, this setting instructs + Command-T to always include matching dot-files in the match list + regardless of whether the search string contains a dot. See also + |g:CommandTNeverShowDotFiles|. Note that this setting only influences + the file listing; the buffer listing treats dot-files like any other + file. + + *g:CommandTNeverShowDotFiles* + |g:CommandTNeverShowDotFiles| boolean (default: 0) + + In the file listing, Command-T will by default show dot-files if the + entered search string contains a dot that could cause a dot-file to + match. When set to a non-zero value, this setting instructs Command-T to + never show dot-files under any circumstances. Note that it is + contradictory to set both this setting and + |g:CommandTAlwaysShowDotFiles| to true, and if you do so Vim will suffer + from headaches, nervous twitches, and sudden mood swings. This setting + has no effect in buffer listings, where dot files are treated like any + other file. + + *g:CommandTScanDotDirectories* + |g:CommandTScanDotDirectories| boolean (default: 0) + + Normally Command-T will not recurse into "dot-directories" (directories + whose names begin with a dot) while performing its initial scan. Set + this setting to a non-zero value to override this behavior and recurse. + Note that this setting is completely independent of the + |g:CommandTAlwaysShowDotFiles| and |g:CommandTNeverShowDotFiles| + settings; those apply only to the selection and display of matches + (after scanning has been performed), whereas + |g:CommandTScanDotDirectories| affects the behaviour at scan-time. + + Note also that even with this setting off you can still use Command-T to + open files inside a "dot-directory" such as ~/.vim, but you have to use + the |:cd| command to change into that directory first. For example: + + :cd ~/.vim + :CommandT + + *g:CommandTMatchWindowAtTop* + |g:CommandTMatchWindowAtTop| boolean (default: 0) + + When this setting is off (the default) the match window will appear at + the bottom so as to keep it near to the prompt. Turning it on causes the + match window to appear at the top instead. This may be preferable if you + want the best match (usually the first one) to appear in a fixed location + on the screen rather than moving as the number of matches changes during + typing. + + *g:CommandTMatchWindowReverse* + |g:CommandTMatchWindowReverse| boolean (default: 0) + + When this setting is off (the default) the matches will appear from + top to bottom with the topmost being selected. Turning it on causes the + matches to be reversed so the best match is at the bottom and the + initially selected match is the bottom most. This may be preferable if + you want the best match to appear in a fixed location on the screen + but still be near the prompt at the bottom. + +As well as the basic options listed above, there are a number of settings that +can be used to override the default key mappings used by Command-T. For +example, to set <C-x> as the mapping for cancelling (dismissing) the Command-T +window, you would add the following to your ~/.vimrc: + + let g:CommandTCancelMap='<C-x>' + +Multiple, alternative mappings may be specified using list syntax: + + let g:CommandTCancelMap=['<C-x>', '<C-c>'] + +Following is a list of all map settings and their defaults: + + Setting Default mapping(s) + + *g:CommandTBackspaceMap* + |g:CommandTBackspaceMap| <BS> + + *g:CommandTDeleteMap* + |g:CommandTDeleteMap| <Del> + + *g:CommandTAcceptSelectionMap* + |g:CommandTAcceptSelectionMap| <CR> + + *g:CommandTAcceptSelectionSplitMap* + |g:CommandTAcceptSelectionSplitMap| <C-CR> + <C-s> + + *g:CommandTAcceptSelectionTabMap* + |g:CommandTAcceptSelectionTabMap| <C-t> + + *g:CommandTAcceptSelectionVSplitMap* + |g:CommandTAcceptSelectionVSplitMap| <C-v> + + *g:CommandTToggleFocusMap* + |g:CommandTToggleFocusMap| <Tab> + + *g:CommandTCancelMap* + |g:CommandTCancelMap| <C-c> + <Esc> (not on all terminals) + + *g:CommandTSelectNextMap* + |g:CommandTSelectNextMap| <C-n> + <C-j> + <Down> + + *g:CommandTSelectPrevMap* + |g:CommandTSelectPrevMap| <C-p> + <C-k> + <Up> + + *g:CommandTClearMap* + |g:CommandTClearMap| <C-u> + + *g:CommandTCursorLeftMap* + |g:CommandTCursorLeftMap| <Left> + <C-h> + + *g:CommandTCursorRightMap* + |g:CommandTCursorRightMap| <Right> + <C-l> + + *g:CommandTCursorEndMap* + |g:CommandTCursorEndMap| <C-e> + + *g:CommandTCursorStartMap* + |g:CommandTCursorStartMap| <C-a> + +In addition to the options provided by Command-T itself, some of Vim's own +settings can be used to control behavior: + + *command-t-wildignore* + |'wildignore'| string (default: '') + + Vim's |'wildignore'| setting is used to determine which files should be + excluded from listings. This is a comma-separated list of glob patterns. + It defaults to the empty string, but common settings include "*.o,*.obj" + (to exclude object files) or ".git,.svn" (to exclude SCM metadata + directories). For example: + + :set wildignore+=*.o,*.obj,.git + + A pattern such as "vendor/rails/**" would exclude all files and + subdirectories inside the "vendor/rails" directory (relative to + directory Command-T starts in). + + See the |'wildignore'| documentation for more information. + + +AUTHORS *command-t-authors* + +Command-T is written and maintained by Wincent Colaiuta <win@wincent.com>. +Other contributors that have submitted patches include (in alphabetical +order): + + Anthony Panozzo + Daniel Hahler + Lucas de Vries + Marian Schubert + Matthew Todd + Mike Lundy + Scott Bronson + Steven Moazami + Sung Pae + Victor Hugo Borja + Woody Peterson + Zak Johnson + +As this was the first Vim plug-in I had ever written I was heavily influenced +by the design of the LustyExplorer plug-in by Stephen Bach, which I understand +is one of the largest Ruby-based Vim plug-ins to date. + +While the Command-T codebase doesn't contain any code directly copied from +LustyExplorer, I did use it as a reference for answers to basic questions (like +"How do you do 'X' in a Ruby-based Vim plug-in?"), and also copied some basic +architectural decisions (like the division of the code into Prompt, Settings +and MatchWindow classes). + +LustyExplorer is available from: + + http://www.vim.org/scripts/script.php?script_id=1890 + + +WEBSITE *command-t-website* + +The official website for Command-T is: + + https://wincent.com/products/command-t + +The latest release will always be available from there. + +Development in progress can be inspected via the project's Git repository +browser at: + + https://wincent.com/repos/command-t + +A copy of each release is also available from the official Vim scripts site +at: + + http://www.vim.org/scripts/script.php?script_id=3025 + +Bug reports should be submitted to the issue tracker at: + + https://wincent.com/issues + + +DONATIONS *command-t-donations* + +Command-T itself is free software released under the terms of the BSD license. +If you would like to support further development you can make a donation via +PayPal to win@wincent.com: + + https://wincent.com/products/command-t/donations + + +LICENSE *command-t-license* + +Copyright 2010-2011 Wincent Colaiuta. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +HISTORY *command-t-history* + +1.3.1 (18 December 2011) + +- fix jumplist navigation under Ruby 1.9.x (patch from Woody Peterson) + +1.3 (27 November 2011) + +- added the option to maintain multiple caches when changing among + directories; see the accompanying |g:CommandTMaxCachedDirectories| setting +- added the ability to navigate using the Vim jumplist (patch from Marian + Schubert) + +1.2.1 (30 April 2011) + +- Remove duplicate copy of the documentation that was causing "Duplicate tag" + errors +- Mitigate issue with distracting blinking cursor in non-GUI versions of Vim + (patch from Steven Moazami) + +1.2 (30 April 2011) + +- added |g:CommandTMatchWindowReverse| option, to reverse the order of items + in the match listing (patch from Steven Moazami) + +1.1b2 (26 March 2011) + +- fix a glitch in the release process; the plugin itself is unchanged since + 1.1b + +1.1b (26 March 2011) + +- add |:CommandTBuffer| command for quickly selecting among open buffers + +1.0.1 (5 January 2011) + +- work around bug when mapping |:CommandTFlush|, wherein the default mapping + for |:CommandT| would not be set up +- clean up when leaving the Command-T buffer via unexpected means (such as + with <C-W k> or similar) + +1.0 (26 November 2010) + +- make relative path simplification work on Windows + +1.0b (5 November 2010) + +- work around platform-specific Vim 7.3 bug seen by some users (wherein + Vim always falsely reports to Ruby that the buffer numbers is 0) +- re-use the buffer that is used to show the match listing, rather than + throwing it away and recreating it each time Command-T is shown; this + stops the buffer numbers from creeping up needlessly + +0.9 (8 October 2010) + +- use relative paths when opening files inside the current working directory + in order to keep buffer listings as brief as possible (patch from Matthew + Todd) + +0.8.1 (14 September 2010) + +- fix mapping issues for users who have set |'notimeout'| (patch from Sung + Pae) + +0.8 (19 August 2010) + +- overrides for the default mappings can now be lists of strings, allowing + multiple mappings to be defined for any given action +- <Leader>t mapping only set up if no other map for |:CommandT| exists + (patch from Scott Bronson) +- prevent folds from appearing in the match listing +- tweaks to avoid the likelihood of "Not enough room" errors when trying to + open files +- watch out for "nil" windows when restoring window dimensions +- optimizations (avoid some repeated downcasing) +- move all Ruby files under the "command-t" subdirectory and avoid polluting + the "Vim" module namespace + +0.8b (11 July 2010) + +- large overhaul of the scoring algorithm to make the ordering of returned + results more intuitive; given the scope of the changes and room for + optimization of the new algorithm, this release is labelled as "beta" + +0.7 (10 June 2010) + +- handle more |'wildignore'| patterns by delegating to Vim's own |expand()| + function; with this change it is now viable to exclude patterns such as + 'vendor/rails/**' in addition to filename-only patterns like '*.o' and + '.git' (patch from Mike Lundy) +- always sort results alphabetically for empty search strings; this eliminates + filesystem-specific variations (patch from Mike Lundy) + +0.6 (28 April 2010) + +- |:CommandT| now accepts an optional parameter to specify the starting + directory, temporarily overriding the usual default of Vim's |:pwd| +- fix truncated paths when operating from root directory + +0.5.1 (11 April 2010) + +- fix for Ruby 1.9 compatibility regression introduced in 0.5 +- documentation enhancements, specifically targetted at Windows users + +0.5 (3 April 2010) + +- |:CommandTFlush| now re-evaluates settings, allowing changes made via |let| + to be picked up without having to restart Vim +- fix premature abort when scanning very deep directory hierarchies +- remove broken |<Esc>| key mapping on vt100 and xterm terminals +- provide settings for overriding default mappings +- minor performance optimization + +0.4 (27 March 2010) + +- add |g:CommandTMatchWindowAtTop| setting (patch from Zak Johnson) +- documentation fixes and enhancements +- internal refactoring and simplification + +0.3 (24 March 2010) + +- add |g:CommandTMaxHeight| setting for controlling the maximum height of the + match window (patch from Lucas de Vries) +- fix bug where |'list'| setting might be inappropriately set after dismissing + Command-T +- compatibility fix for different behaviour of "autoload" under Ruby 1.9.1 +- avoid "highlight group not found" warning when run under a version of Vim + that does not have syntax highlighting support +- open in split when opening normally would fail due to |'hidden'| and + |'modified'| values + +0.2 (23 March 2010) + +- compatibility fixes for compilation under Ruby 1.9 series +- compatibility fixes for compilation under Ruby 1.8.5 +- compatibility fixes for Windows and other non-UNIX platforms +- suppress "mapping already exists" message if <Leader>t mapping is already + defined when plug-in is loaded +- exclude paths based on |'wildignore'| setting rather than a hardcoded + regular expression + +0.1 (22 March 2010) + +- initial public release + +------------------------------------------------------------------------------ +vim:tw=78:ft=help: diff --git a/vim/doc/conque_term.txt b/vim/doc/conque_term.txt new file mode 100644 index 0000000..ff8ca54 --- /dev/null +++ b/vim/doc/conque_term.txt @@ -0,0 +1,156 @@ +*ConqueTerm* Plugin to run a shell in a buffer + +The ConqueTerm plugin will convert a buffer into a terminal emulator, allowing +you to run a shell or shell application in the buffer. + + *conque_term-usage* + +Type :ConqueTerm <command> to launch an application in the current buffer. E.g. + + :ConqueTerm bash + :ConqueTerm mysql -h localhost -u joe_lunchbox Menu + :ConqueTerm man top + +Use :ConqueTermSplit or :ConqueTermVSplit to open Conque in a new horizontal +or vertical buffer. + +Keys pressed in insert mode will be sent to the shell, along with output from +the 'p' command in normal mode. + +Press the <Esc> key twice to send a single <Esc> to the shell. Pressing this +key once will leave insert mode like normal. + +Press <F9> in any buffer to send a visual selection to the shell. + + + *conque_term-settings* + +Set the following in your .vimrc (default values shown) + +" Enable colors. Setting this to 0 will make your terminal faster. +let g:ConqueTerm_Color = 1 + +" Set your terminal type. I strong recommend leaving this as vt100, +" however more features may be enabled with xterm. +let g:ConqueTerm_TERM = 'vt100' + +" Set buffer syntax. Conque has highlighting for MySQL, but not much else. +let g:ConqueTerm_Syntax = 'conque' + +" Continue updating shell when it's not the current, focused buffer +let g:ConqueTerm_ReadUnfocused = 1 + + + *conque_term-requirements* + +The following minimum requirements are needed to run Conque. Conque will not +run on Windows without a Cygwin-like environment. + + - Vim 7.1 + - Python 2.3 + - Supported operating systems: *nix, Mac, or Cygwin + +Tested on: + - Vim 7.2 / Python 2.6 / Ubuntu 9.10 (Gnome & GTK) + - Vim 7.2 / Python 2.6 / FreeBSD 8.0 (GTK) + - Vim 7.1 / Python 2.6 / FreeBSD 8.0 (GTK) + x Vim 7.0 / Python 2.6 / FreeBSD 8.0 (GTK) + * feedkeys() doesn't restart updatetime + - Vim 7.2 / Python 2.4 / OpenSolaris 2009.06 (Gnome) + - Vim 7.2 / Python 2.4 / CentOS 5.3 (no GUI) + - Vim 7.1 / Python 2.3 / RHEL 4 (no GUI) + - Vim 7.2 / Python 2.5 / Cygwin (Windows Vista 64b) + - MacVim 7.2 / Python 2.3 / OS X 10.6.2 + + *conque_term-bugs* + +The following are known limitations: + + - Font/color highlighting is imperfect and slow. If you don't care about + color in your shell, set g:ConqueTerm_Color = 0 in your .vimrc + - Conque only supports the extended ASCII character set for input, not utf-8. + - VT100 escape sequence support is not complete. + - Alt/Meta key support in Vim isn't great in general, and conque is no + exception. Pressing <Esc><Esc>x or <Esc><M-x> instead of <M-x> works in + most cases. + + *conque_term-todo* + + - Fix pasting from named registers + - Polling unfucused conque buffers (Top explodes when window resizes) + - Enable graphics character set + - Consider supporting xterm escapes + - Improve color logic + - Find a solution to UTF-8 input (See InsertCharPre in Vim todo.txt) + - Find an alternative to updatetime polling (See Vim todo.txt) + - Find a graceful solution to Meta key input + - Windows support + (See PyConsole http://www.vim.org/scripts/script.php?script_id=1974) + - Always: look for performance improvements + + + *conque_term-contribute* + +The two contributions most in need are improvements to Vim itself. I currently +use hacks to simulate a key press event and repeating CursorHold event. The +Vim todo.txt document lists proposed improvements to give users this behavior +without hacks. Having a key press event should allow Conque to work with multi- +byte input. If you are a Vim developer, please consider prioritizing these two +items: + + - todo.txt (Autocommands, line ~3137) + 8 Add an event like CursorHold that is triggered repeatedly, not just + once after typing something. + + - todo.txt (Autocommands, proposed event list, line ~3189) + InsertCharPre - user typed character Insert mode, before inserting the + char. Pattern is matched with text before the cursor. Set v:char to the + character, can be changed. (not triggered when 'paste' is set). + +Bugs, suggestions and patches are all welcome. + +For more information visit http://conque.googlecode.com + +Check out the latest from svn at http://conque.googlecode.com/svn/trunk/ + + *conque_term-changelog* + + - 1.0 / 2010-02- + * Complete python rewrite + * Add support for ncurses based applications + * Add continuous polling, instead of using <Tab> + * Improve speed + * Improve syntax highlighting + + - 0.6 / 2009-12-18 + * Fix GVim errors with non-english locale + * No functional changes + + - 0.5 / 2009-12-02 + * Various performance enhancements and bugfixes. + * Rewritten escape sequence processing + + - 0.4 / 2009-10-30 + * Improved history and tab completion + * Fix escape sequence formatting and improve highlighting + * Send selected text to shell from any buffer + * Add special handling of "vi" and "man" commands + * Improve error handling + * Add key mappings for <C-p> <C-n> <C-l> <C-j> + * Various bugfixes + + - 0.3 / 2009-10-13 + * Apply escape sequence coloring to output, e.g. ls --color + * Clean up syntax files for portability + * Fix several Vim 7.1 bugs + * Bugfixes for multiple shell buffers + * Add experimental shell folding option + + - 0.2 / 2009-10-01 + * Rewritten subprocess management module in python instead of c + * Added support for OS X, partial support for Windows + * Improved tab completion + + - 0.1 / 2009-09-03 + * Initial release + diff --git a/vim/doc/delimitMate.txt b/vim/doc/delimitMate.txt new file mode 100644 index 0000000..8067cf2 --- /dev/null +++ b/vim/doc/delimitMate.txt @@ -0,0 +1,818 @@ +*delimitMate.txt* Trying to keep those beasts at bay! v2.6 *delimitMate* + + + + MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM + MMMM MMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMM MMMMM MMMMMMMMMMMMMMMMMMMMM ~ + MMMM MMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMM MMM MMMMMMMMMMMMMMMMMMMMM + MMMM MMMMMMMMM MMMMMMMMMMMMMMMMMMMMM MMM M M MMMMMMMMMM MMMMMMMMM ~ + MMMM MMM MMM MM MM M M MMM MM MM MM MM MMM MMM MMM MM + MM MM M MM MMMMMM MMMMMMM MMM MMMMM MM M MMM MMM M M ~ + M M MM MM MM MM M M MM MMM MMM MMMMM MMMMM MMM MMM M + M M MM MMMMM MM MM M M MM MMM MMM MMMMM MMM MMM MMM MMMM ~ + M M MM M MM MM MM M M MM MMM MMM MMMMM MM M MMM MMM M M + MM MMM MMM MM MM M M MM MMM MM MMMMM MMM MMM MMM MM ~ + MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM + + + +============================================================================== + 0.- CONTENTS *delimitMate-contents* + + 1. Introduction____________________________|delimitMateIntro| + 2. Customization___________________________|delimitMateOptions| + 2.1 Options summary____________________|delimitMateOptionSummary| + 2.2 Options details____________________|delimitMateOptionDetails| + 3. Functionality___________________________|delimitMateFunctionality| + 3.1 Automatic closing & exiting________|delimitMateAutoClose| + 3.2 Expansion of space and CR__________|delimitMateExpansion| + 3.3 Backspace__________________________|delimitMateBackspace| + 3.4 Smart Quotes_______________________|delimitMateSmartQuotes| + 3.5 Balancing matching pairs___________|delimitMateBalance| + 3.6 FileType based configuration_______|delimitMateFileType| + 3.7 Syntax awareness___________________|delimitMateSyntax| + 4. Commands________________________________|delimitMateCommands| + 5. Mappings________________________________|delimitMateMappings| + 6. Functions_______________________________|delimitMateFunctions| + 7. TODO list_______________________________|delimitMateTodo| + 8. Maintainer______________________________|delimitMateMaintainer| + 9. Credits_________________________________|delimitMateCredits| + 10. History_________________________________|delimitMateHistory| + +============================================================================== + 1.- INTRODUCTION *delimitMateIntro* + +This plug-in provides automatic closing of quotes, parenthesis, brackets, +etc.; besides some other related features that should make your time in insert +mode a little bit easier. + +Most of the features can be modified or disabled permanently, using global +variables, or on a FileType basis, using autocommands. With a couple of +exceptions and limitations, this features don't brake undo, redo or history. + +NOTE 1: If you have any trouble with this plugin, please run |:DelimitMateTest| +in a new buffer to see what is not working. + +NOTE 2: |'timeout'| needs to be set when working in the terminal, otherwise you +might find weird behaviour with mappings including <Esc> or arrow keys. + +NOTE 3: Abbreiations set with |:iabbrev| will not be expanded by delimiters +used on delimitMate, you should use <C-]> (read |i_CTRL-]|) to expand them on +the go. + +============================================================================== + 2. CUSTOMIZATION *delimitMateOptions* + +You can create your own mappings for some features using the global functions. +Read |DelimitMateFunctions| for more info. + +------------------------------------------------------------------------------ + 2.1 OPTIONS SUMMARY *delimitMateOptionSummary* + +The behaviour of this script can be customized setting the following options +in your vimrc file. You can use local options to set the configuration for +specific file types, see |delimitMateOptionDetails| for examples. + +|'loaded_delimitMate'| Turns off the script. + +|'delimitMate_autoclose'| Tells delimitMate whether to automagically + insert the closing delimiter. + +|'delimitMate_matchpairs'| Tells delimitMate which characters are + matching pairs. + +|'delimitMate_quotes'| Tells delimitMate which quotes should be + used. + +|'delimitMate_nesting_quotes'| Tells delimitMate which quotes should be + allowed to be nested. + +|'delimitMate_expand_cr'| Turns on/off the expansion of <CR>. + +|'delimitMate_expand_space'| Turns on/off the expansion of <Space>. + +|'delimitMate_smart_quotes'| Turns on/off the "smart quotes" feature. + +|'delimitMate_smart_matchpairs'| Turns on/off the "smart matchpairs" feature. + +|'delimitMate_balance_matchpairs'|Turns on/off the "balance matching pairs" + feature. + +|'delimitMate_excluded_regions'| Turns off the script for the given regions or + syntax group names. + +|'delimitMate_excluded_ft'| Turns off the script for the given file types. + +|'delimitMate_apostrophes'| Tells delimitMate how it should "fix" + balancing of single quotes when used as + apostrophes. NOTE: Not needed any more, kept + for compatibility with older versions. + +------------------------------------------------------------------------------ + 2.2 OPTIONS DETAILS *delimitMateOptionDetails* + +Add the shown lines to your vimrc file in order to set the below options. +Buffer variables take precedence over global ones and can be used along with +autocmd to modify delimitMate's behavior for specific file types, read more in +|delimitMateFileType|. + +Note: Use buffer variables only to set options for specific file types using +:autocmd, use global variables to set options for every buffer. Read more in +|g:var| and |b:var|. + +------------------------------------------------------------------------------ + *'loaded_delimitMate'* + *'b:loaded_delimitMate'* +This option prevents delimitMate from loading. +e.g.: > + let loaded_delimitMate = 1 + au FileType mail let b:loaded_delimitMate = 1 +< +------------------------------------------------------------------------------ + *'delimitMate_autoclose'* + *'b:delimitMate_autoclose'* +Values: 0 or 1. ~ +Default: 1 ~ + +If this option is set to 0, delimitMate will not add a closing delimiter +automagically. See |delimitMateAutoClose| for details. +e.g.: > + let delimitMate_autoclose = 0 + au FileType mail let b:delimitMate_autoclose = 0 +< +------------------------------------------------------------------------------ + *'delimitMate_matchpairs'* + *'b:delimitMate_matchpairs'* +Values: A string with |'matchpairs'| syntax, plus support for multi-byte~ + characters.~ +Default: &matchpairs ~ + +Use this option to tell delimitMate which characters should be considered +matching pairs. Read |delimitMateAutoClose| for details. +e.g: > + let delimitMate_matchpairs = "(:),[:],{:},<:>" + au FileType vim,html let b:delimitMate_matchpairs = "(:),[:],{:},<:>" +< +------------------------------------------------------------------------------ + *'delimitMate_quotes'* + *'b:delimitMate_quotes'* +Values: A string of characters separated by spaces. ~ +Default: "\" ' `" ~ + +Use this option to tell delimitMate which characters should be considered as +quotes. Read |delimitMateAutoClose| for details. +e.g.: > + let delimitMate_quotes = "\" ' ` *" + au FileType html let b:delimitMate_quotes = "\" '" +< +------------------------------------------------------------------------------ + *'delimitMate_nesting_quotes'* + *'b:delimitMate_nesting_quotes'* +Values: A list of quotes. ~ +Default: [] ~ + +Quotes listed here will not be able to jump out of the empty pair, thus +allowing the autoclosed quotes to be nested. +e.g.: > + let delimitMate_nesting_quotes = ['"','`'] + au FileType python let b:delimitMate_nesting_quotes = ['"'] +< +------------------------------------------------------------------------------ + *'delimitMate_expand_cr'* + *'b:delimitMate_expand_cr'* +Values: 1 or 0 ~ +Default: 0 ~ + +This option turns on/off the expansion of <CR>. Read |delimitMateExpansion| +for details. NOTE This feature requires that 'backspace' is either set to 2 or +has "eol" and "start" as part of its value. +e.g.: > + let delimitMate_expand_cr = 1 + au FileType mail let b:delimitMate_expand_cr = 1 +< +------------------------------------------------------------------------------ + *'delimitMate_expand_space'* + *'b:delimitMate_expand_space'* +Values: 1 or 0 ~ +Default: 0 ~ +This option turns on/off the expansion of <Space>. Read |delimitMateExpansion| +for details. +e.g.: > + let delimitMate_expand_space = 1 + au FileType tcl let b:delimitMate_expand_space = 1 +< +------------------------------------------------------------------------------ + *'delimitMate_smart_quotes'* + *'b:delimitMate_smart_quotes'* +Values: 1 or 0 ~ +Default: 1 ~ + +This option turns on/off the smart quotes feature. Read +|delimitMateSmartQuotes| for details. +e.g.: > + let delimitMate_smart_quotes = 0 + au FileType tcl let b:delimitMate_smart_quotes = 1 +< +------------------------------------------------------------------------------ + *'delimitMate_smart_matchpairs'* + *'b:delimitMate_smart_matchpairs'* +Values: Regexp ~ +Default: '^\%(\w\|\!\|£\|\$\|_\|["'']\s*\S\)' ~ + +This regex is matched against the text to the right of cursor, if it's not +empty and there is a match delimitMate will not autoclose the pair. At the +moment to match the text, an escaped bang (\!) in the regex will be replaced +by the character being inserted, while an escaped number symbol (\#) will be +replaced by the closing pair. +e.g.: > + let delimitMate_smart_matchpairs = '' + au FileType tcl let b:delimitMate_smart_matchpairs = '^\%(\w\|\$\)' +< +------------------------------------------------------------------------------ + *'delimitMate_balance_matchpairs'* + *'b:delimitMate_balance_matchpairs'* +Values: 1 or 0 ~ +Default: 0 ~ + +This option turns on/off the balancing of matching pairs. Read +|delimitMateBalance| for details. +e.g.: > + let delimitMate_balance_matchpairs = 1 + au FileType tcl let b:delimitMate_balance_matchpairs = 1 +< +------------------------------------------------------------------------------ + *'delimitMate_excluded_regions'* +Values: A string of syntax group names names separated by single commas. ~ +Default: Comment ~ + +This options turns delimitMate off for the listed regions, read |group-name| +for more info about what is a region. +e.g.: > + let delimitMate_excluded_regions = "Comments,String" +< +------------------------------------------------------------------------------ + *'delimitMate_excluded_ft'* +Values: A string of file type names separated by single commas. ~ +Default: Empty. ~ + +This options turns delimitMate off for the listed file types, use this option +only if you don't want any of the features it provides on those file types. +e.g.: > + let delimitMate_excluded_ft = "mail,txt" +< +------------------------------------------------------------------------------ + *'delimitMate_apostrophes'* +Values: Strings separated by ":". ~ +Default: No longer used. ~ + +NOTE: This feature is turned off by default, it's been kept for compatibility +with older version, read |delimitMateSmartQuotes| for details. +If auto-close is enabled, this option tells delimitMate how to try to fix the +balancing of single quotes when used as apostrophes. The values of this option +are strings of text where a single quote would be used as an apostrophe (e.g.: +the "n't" of wouldn't or can't) separated by ":". Set it to an empty string to +disable this feature. +e.g.: > + let delimitMate_apostrophes = "" + au FileType tcl let delimitMate_apostrophes = "" +< +============================================================================== + 3. FUNCTIONALITY *delimitMateFunctionality* + +------------------------------------------------------------------------------ + 3.1 AUTOMATIC CLOSING AND EXITING *delimitMateAutoClose* + +With automatic closing enabled, if an opening delimiter is inserted the plugin +inserts the closing delimiter and places the cursor between the pair. With +automatic closing disabled, no closing delimiters is inserted by delimitMate, +but when a pair of delimiters is typed, the cursor is placed in the middle. + +When the cursor is inside an empty pair or located next to the left of a +closing delimiter, the cursor is placed outside the pair to the right of the +closing delimiter. + +When |'delimitMate_smart_matchpairs'| is not empty and it matches the text to +the right of the cursor, delimitMate will not automatically insert the closing +pair. + +Unless |'delimitMate_matchpairs'| or |'delimitMate_quotes'| are set, this +script uses the values in '&matchpairs' to identify the pairs, and ", ' and ` +for quotes respectively. + +<S-Tab> will jump over a single closing delimiter or quote, <C-G>g will jump +over contiguous delimiters and/or quotes. + +The following table shows the behaviour, this applies to quotes too (the final +position of the cursor is represented by a "|"): + +With auto-close: > + Type | You get + ======================= + ( | (|) + –––––––––––|––––––––––– + () | ()| + –––––––––––|––––––––––– + (<S-Tab> | ()| + –––––––––––|––––––––––– + {("<C-G>g | {("")}| +< +Without auto-close: > + + Type | You get + ========================= + () | (|) + –––––––––-----|–––––––––– + ()) | ()| + –––––––––-----|–––––––––– + ()<S-Tab> | ()| + ––––––––––––––|––––––––––– + {}()""<C-G>g | {("")}| +< +NOTE: Abbreviations will not be expanded by delimiters used on delimitMate, +you should use <C-]> (read |i_CTRL-]|) to expand them on the go. + +------------------------------------------------------------------------------ + 3.2 EXPANSION OF SPACE AND CAR RETURN *delimitMateExpansion* + +When the cursor is inside an empty pair of delimiters, <Space> and <CR> can be +expanded, see |'delimitMate_expand_space'| and +|'delimitMate_expand_cr'|: + +Expand <Space> to: > + + <Space><Space><Left> | You get + ==================================== + (|) | ( | ) +< +Expand <CR> to: > + + <CR><CR><Up> | You get + ============================ + (|) | ( + | | + | ) +< + +NOTE that the expansion of <CR> will brake the redo command. + +Since <Space> and <CR> are used everywhere, I have made the functions involved +in expansions global, so they can be used to make custom mappings. Read +|delimitMateFunctions| for more details. + +------------------------------------------------------------------------------ + 3.3 BACKSPACE *delimitMateBackspace* + +If you press backspace inside an empty pair, both delimiters are deleted. When +expansions are enabled, <BS> will also delete the expansions. NOTE that +deleting <CR> expansions will brake the redo command. + +If you type <S-BS> (shift + backspace) instead, only the closing delimiter +will be deleted. NOTE that this will not usually work when using Vim from the +terminal, see 'delimitMate#JumpAny()' below to see how to fix it. + +e.g. typing at the "|": > + + What | Before | After + ============================================== + <BS> | call expand(|) | call expand| + ---------|-------------------|----------------- + <BS> | call expand( | ) | call expand(|) + ---------|-------------------|----------------- + <BS> | call expand( | call expand(|) + | | | + | ) | + ---------|-------------------|----------------- + <S-BS> | call expand(|) | call expand(| +< + +------------------------------------------------------------------------------ + 3.4 SMART QUOTES *delimitMateSmartQuotes* + +Only one quote will be inserted following a quote, a "\" or, following or +preceding a keyword character. This should cover closing quotes after a +string, opening quotes before a string, escaped quotes and apostrophes. Except +for apostrophes, this feature can be disabled setting the option +|'delimitMate_smart_quotes'| to 0. + +e.g. typing at the "|": > + + What | Before | After + ======================================= + " | Text | | Text "|" + " | "String| | "String"| + " | let i = "| | let i = "|" + 'm | I| | I'm| +< +------------------------------------------------------------------------------ + 3.4 SMART MATCHPAIRS *delimitMateSmartMatchpairs* + +This is similar to "smart quotes", but applied to the characters in +|'delimitMate_matchpairs'|. The difference is that delimitMate will not +auto-close the pair when the regex matches the text on the right of the +cursor. See |'delimitMate_smart_matchpairs'| for more details. + + +e.g. typing at the "|": > + + What | Before | After + ======================================= + ( | function| | function(|) + ( | |var | (|var +< +------------------------------------------------------------------------------ + 3.5 BALANCING MATCHING PAIRS *delimitMateBalance* + +When inserting an opening paren and |'delimitMate_balance_matchpairs'| is +enabled, delimitMate will try to balance the closing pairs in the current +line. + +e.g. typing at the "|": > + + What | Before | After + ======================================= + ( | | | (|) + ( | |) | (|) + (( | |) | ((|)) +< +------------------------------------------------------------------------------ + 3.6 FILE TYPE BASED CONFIGURATION *delimitMateFileType* + +delimitMate options can be set globally for all buffers using global +("regular") variables in your |vimrc| file. But |:autocmd| can be used to set +options for specific file types (see |'filetype'|) using buffer variables in +the following way: > + + au FileType mail,text let b:delimitMate_autoclose = 0 + ^ ^ ^ ^ ^ + | | | | | + | | | | - Option value. + | | | - Option name. + | | - Buffer variable. + | - File types for which the option will be set. + - Don't forget to put this event. +< +NOTE that you should use buffer variables (|b:var|) only to set options with +|:autocmd|, for global options use regular variables (|g:var|) in your vimrc. + +------------------------------------------------------------------------------ + 3.7 SYNTAX AWARENESS *delimitMateSyntax* + +The features of this plug-in might not be always helpful, comments and strings +usualy don't need auto-completion. delimitMate monitors which region is being +edited and if it detects that the cursor is in a comment it'll turn itself off +until the cursor leaves the comment. The excluded regions can be set using the +option |'delimitMate_excluded_regions'|. Read |group-name| for a list of +regions or syntax group names. + +NOTE that this feature relies on a proper syntax file for the current file +type, if the appropiate syntax file doesn't define a region, delimitMate won't +know about it. + +============================================================================== + 4. COMMANDS *delimitMateCommands* + +------------------------------------------------------------------------------ +:DelimitMateReload *:DelimitMateReload* + +Re-sets all the mappings used for this script, use it if any option has been +changed or if the filetype option hasn't been set yet. + +------------------------------------------------------------------------------ +:DelimitMateSwitch *:DelimitMateSwitch* + +Switches the plug-in on and off. + +------------------------------------------------------------------------------ +:DelimitMateTest *:DelimitMateTest* + +This command tests every mapping set-up for this script, useful for testing +custom configurations. + +The following output corresponds to the default values, it will be different +depending on your configuration. "Open & close:" represents the final result +when the closing delimiter has been inserted, either manually or +automatically, see |delimitMateExpansion|. "Delete:" typing backspace in an +empty pair, see |delimitMateBackspace|. "Exit:" typing a closing delimiter +inside a pair of delimiters, see |delimitMateAutoclose|. "Space:" the +expansion, if any, of space, see |delimitMateExpansion|. "Visual-L", +"Visual-R" and "Visual" shows visual wrapping, see +|delimitMateVisualWrapping|. "Car return:" the expansion of car return, see +|delimitMateExpansion|. The cursor's position at the end of every test is +represented by an "|": > + + * AUTOCLOSE: + Open & close: (|) + Delete: | + Exit: ()| + Space: ( |) + Visual-L: (v) + Visual-R: (v) + Car return: ( + |) + + Open & close: {|} + Delete: | + Exit: {}| + Space: { |} + Visual-L: {v} + Visual-R: {v} + Car return: { + |} + + Open & close: [|] + Delete: | + Exit: []| + Space: [ |] + Visual-L: [v] + Visual-R: [v] + Car return: [ + |] + + Open & close: "|" + Delete: | + Exit: ""| + Space: " |" + Visual: "v" + Car return: " + |" + + Open & close: '|' + Delete: | + Exit: ''| + Space: ' |' + Visual: 'v' + Car return: ' + |' + + Open & close: `|` + Delete: | + Exit: ``| + Space: ` |` + Visual: `v` + Car return: ` + |` +< + +============================================================================== + 5. MAPPINGS *delimitMateMappings* + +delimitMate doesn't override any existing map, so you may encounter that it +doesn't work as expected because a mapping is missing. In that case, the +conflicting mappings should be resolved by either disabling the conflicting +mapping or creating a custom mappings. + +In order to make custom mappings easier and prevent overwritting existing +ones, delimitMate uses the |<Plug>| + |hasmapto()| (|usr_41.txt|) construct +for its mappings. + +These are the default mappings: + +<BS> is mapped to <Plug>delimitMateBS +<S-BS> is mapped to <Plug>delimitMateS-BS +<S-Tab> is mapped to <Plug>delimitMateS-Tab +<C-G>g is mapped to <Plug>delimitMateJumpMany +<Del> is mapped to <Plug>delimitMateDel +<Esc> is mapped to <Plug>delimitMateEsc +<Left> is mapped to <Plug>delimitMateLeft +<Right> is mapped to <Plug>delimitMateRight +<Home> is mapped to <Plug>delimitMateHome +<End> is mapped to <Plug>delimitMateEnd +<Up> is mapped to <Plug>delimitMateUp +<Down> is mapped to <Plug>delimitMateDown +<PageUp> is mapped to <Plug>delimitMatePageUp +<PageDown> is mapped to <Plug>delimitMatePageDown +<S-Down> is mapped to <Plug>delimitMateS-Down +<S-Up> is mapped to <Plug>delimitMateS-Up +<LeftMouse> is mapped to <Plug>delimitMateMLeftMouse +<RightMouse> is mapped to <Plug>delimitMateMRightMouse + +The rest of the mappings correspond to parens, quotes, CR, Space, etc. and they +depend on the values of the delimitMate options, they have the following form: + +<Plug>delimitMate + char + +e.g.: for "(": + +( is mapped to <Plug>delimitMate( + +e.g.: If you have <CR> expansion enabled, you might want to skip it on pop-up +menus: + + imap <expr> <CR> pumvisible() ? + \"\<c-y>" : + \ "<Plug>delimitMateCR" + + +============================================================================== + 6. FUNCTIONS *delimitMateFunctions* + +------------------------------------------------------------------------------ +delimitMate#WithinEmptyPair() *delimitMate#WithinEmptyPair()* + +Returns 1 if the cursor is inside an empty pair, 0 otherwise. +e.g.: > + + inoremap <expr> <CR> delimitMate#WithinEmptyPair() ? + \ "\<C-R>=delimitMate#ExpandReturn()\<CR>" : + \ "external_mapping" +< + +------------------------------------------------------------------------------ +delimitMate#ShouldJump() *delimitMate#ShouldJump()* + +Returns 1 if there is a closing delimiter or a quote to the right of the +cursor, 0 otherwise. + +------------------------------------------------------------------------------ +delimitMate#JumpAny(key) *delimitMate#JumpAny()* + +This function returns a mapping that will make the cursor jump to the right +when delimitMate#ShouldJump() returns 1, returns the argument "key" otherwise. +e.g.: You can use this to create your own mapping to jump over any delimiter. +> + inoremap <C-Tab> <C-R>=delimitMate#JumpAny("\<C-Tab>")<CR> +< + +============================================================================== + 7. TODO LIST *delimitMateTodo* + +- Automatic set-up by file type. +- Make block-wise visual wrapping work on un-even regions. + +============================================================================== + 8. MAINTAINER *delimitMateMaintainer* + +Hi there! My name is Israel Chauca F. and I can be reached at: + mailto:israelchauca@gmail.com + +Feel free to send me any suggestions and/or comments about this plugin, I'll +be very pleased to read them. + +============================================================================== + 9. CREDITS *delimitMateCredits* + +Contributors: ~ + + - Kim Silkebækken ~ + Fixed mappings being echoed in the terminal. + + - Eric Van Dewoestine ~ + Implemented smart matchpairs. + +Some of the code that makes this script was modified or just shamelessly +copied from the following sources: + + - Ian McCracken ~ + Post titled: Vim, Part II: Matching Pairs: + http://concisionandconcinnity.blogspot.com/ + + - Aristotle Pagaltzis ~ + From the comments on the previous blog post and from: + http://gist.github.com/144619 + + - Karl Guertin ~ + AutoClose: + http://www.vim.org/scripts/script.php?script_id=1849 + + - Thiago Alves ~ + AutoClose: + http://www.vim.org/scripts/script.php?script_id=2009 + + - Edoardo Vacchi ~ + ClosePairs: + http://www.vim.org/scripts/script.php?script_id=2373 + +This script was inspired by the auto-completion of delimiters on TextMate. + +============================================================================== + 10. HISTORY *delimitMateHistory* + + Version Date Release notes ~ +|---------|------------|-----------------------------------------------------| + 2.6 2011-01-14 * Current release: + - Add smart_matchpairs feature. + - Add mapping to jump over contiguous delimiters. + - Fix behaviour of b:loaded_delimitMate. +|---------|------------|-----------------------------------------------------| + 2.5.1 2010-09-30 * - Remove visual wrapping. Surround.vim offers a much + better implementation. + - Minor mods to DelimitMateTest. +|---------|------------|-----------------------------------------------------| + 2.5 2010-09-22 * - Better handling of mappings. + - Add report for mappings in |:DelimitMateTest|. + - Allow the use of "|" and multi-byte characters in + |'delimitMate_quotes'| and |'delimitMate_matchpairs'|. + - Allow commands to be concatenated using |. +|---------|------------|-----------------------------------------------------| + 2.4.1 2010-07-31 * - Fix problem with <Home> and <End>. + - Add missing doc on |'delimitMate_smart_quotes'|, + |delimitMateBalance| and + |'delimitMate_balance_matchpairs'|. +|---------|------------|-----------------------------------------------------| + 2.4 2010-07-29 * - Unbalanced parens: see :help delimitMateBalance. + - Visual wrapping now works on block-wise visual + with some limitations. + - Arrow keys didn't work on terminal. + - Added option to allow nested quotes. + - Expand Smart Quotes to look for a string on the + right of the cursor. + +|---------|------------|-----------------------------------------------------| + 2.3.1 2010-06-06 * - Fix: an extra <Space> is inserted after <Space> + expansion. + +|---------|------------|-----------------------------------------------------| + 2.3 2010-06-06 * - Syntax aware: Will turn off when editing comments + or other regions, customizable. + - Changed format of most mappings. + - Fix: <CR> expansion doesn't brake automatic + indentation adjustments anymore. + - Fix: Arrow keys would insert A, B, C or D instead + of moving the cursor when using Vim on a terminal. + +|---------|------------|-----------------------------------------------------| + 2.2 2010-05-16 * - Added command to switch the plug-in on and off. + - Fix: some problems with <Left>, <Right> and <CR>. + - Fix: A small problem when inserting a delimiter at + the beginning of the line. + +|---------|------------|-----------------------------------------------------| + 2.1 2010-05-10 * - Most of the functions have been moved to an + autoload script to avoid loading unnecessary ones. + - Fixed a problem with the redo command. + - Many small fixes. + +|---------|------------|-----------------------------------------------------| + 2.0 2010-04-01 * New features: + - All features are redo/undo-wise safe. + - A single quote typed after an alphanumeric + character is considered an apostrophe and one + single quote is inserted. + - A quote typed after another quote inserts a single + quote and the cursor jumps to the middle. + - <S-Tab> jumps out of any empty pair. + - <CR> and <Space> expansions are fixed, but the + functions used for it are global and can be used in + custom mappings. The previous system is still + active if you have any of the expansion options + set. + - <S-Backspace> deletes the closing delimiter. + * Fixed bug: + - s:vars were being used to store buffer options. + +|---------|------------|-----------------------------------------------------| + 1.6 2009-10-10 * Now delimitMate tries to fix the balancing of single + quotes when used as apostrophes. You can read + |delimitMate_apostrophes| for details. + Fixed an error when |b:delimitMate_expand_space| + wasn't set but |delimitMate_expand_space| wasn't. + +|---------|------------|-----------------------------------------------------| + 1.5 2009-10-05 * Fix: delimitMate should work correctly for files + passed as arguments to Vim. Thanks to Ben Beuchler + for helping to nail this bug. + +|---------|------------|-----------------------------------------------------| + 1.4 2009-09-27 * Fix: delimitMate is now enabled on new buffers even + if they don't have set the file type option or were + opened directly from the terminal. + +|---------|------------|-----------------------------------------------------| + 1.3 2009-09-24 * Now local options can be used along with autocmd + for specific file type configurations. + Fixes: + - Unnamed register content is not lost on visual + mode. + - Use noremap where appropiate. + - Wrapping a single empty line works as expected. + +|---------|------------|-----------------------------------------------------| + 1.2 2009-09-07 * Fixes: + - When inside nested empty pairs, deleting the + innermost left delimiter would delete all right + contiguous delimiters. + - When inside an empty pair, inserting a left + delimiter wouldn't insert the right one, instead + the cursor would jump to the right. + - New buffer inside the current window wouldn't + have the mappings set. + +|---------|------------|-----------------------------------------------------| + 1.1 2009-08-25 * Fixed an error that ocurred when mapleader wasn't + set and added support for GetLatestScripts + auto-detection. + +|---------|------------|-----------------------------------------------------| + 1.0 2009-08-23 * Initial upload. + +|---------|------------|-----------------------------------------------------| + + + `\|||/´ MMM \|/ www __^__ ~ + (o o) (o o) @ @ (O-O) /(o o)\\ ~ +ooO_(_)_Ooo__ ooO_(_)_Ooo___oOO_(_)_OOo___oOO__(_)__OOo___oOO__(_)__OOo_____ ~ +_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|____ ~ +__|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_ ~ +_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|____ ~ + +vim:tw=78:et:ts=2:sw=2:ft=help:norl:formatoptions+=tcroqn:autoindent: diff --git a/vim/doc/easymotion.txt b/vim/doc/easymotion.txt new file mode 100755 index 0000000..c91a959 --- /dev/null +++ b/vim/doc/easymotion.txt @@ -0,0 +1,319 @@ +*easymotion.txt* Version 1.3. Last change: 2011 Nov 7 + + + ______ __ ___ __ _ + / ____/____ ________ __/ |/ /____ / /_(_)____ ____ + / __/ / __ `/ ___/ / / / /|_/ // __ \/ __/ // __ \/ __ \ + / /___ / /_/ (__ ) /_/ / / / // /_/ / /_/ // /_/ / / / / + /_____/ \__,_/____/\__, /_/ /_/ \____/\__/_/ \____/_/ /_/ + /____/ + - Vim motions on speed! + + +============================================================================== +CONTENTS *easymotion-contents* + + 1. Introduction ....................... |easymotion-introduction| + 2. Usage .............................. |easymotion-usage| + 2.1 Default mappings ............... |easymotion-default-mappings| + 3. Requirements ....................... |easymotion-requirements| + 4. Configuration ...................... |easymotion-configuration| + 4.1 EasyMotion_keys ................ |EasyMotion_keys| + 4.2 EasyMotion_do_shade ............ |EasyMotion_do_shade| + 4.3 EasyMotion_do_mapping .......... |EasyMotion_do_mapping| + 4.4 EasyMotion_grouping ............ |EasyMotion_grouping| + 4.5 Custom highlighting ............ |easymotion-custom-hl| + 4.6 Custom mappings ................ |easymotion-custom-mappings| + 4.6.1 Leader key ............... |easymotion-leader-key| + 4.6.2 Custom keys .............. |easymotion-custom-keys| + 5. License ............................ |easymotion-license| + 6. Known bugs ......................... |easymotion-known-bugs| + 7. Contributing ....................... |easymotion-contributing| + 8. Credits ............................ |easymotion-credits| + +============================================================================== +1. Introduction *easymotion* *easymotion-introduction* + +EasyMotion provides a much simpler way to use some motions in vim. It takes +the <number> out of <number>w or <number>f{char} by highlighting all possible +choices and allowing you to press one key to jump directly to the target. + +When one of the available motions is triggered, all visible text preceding or +following the cursor is faded, and motion targets are highlighted. + +============================================================================== +2. Usage *easymotion-usage* + +EasyMotion is triggered by one of the provided mappings (see +|easymotion-default-mappings| for details). + +Example: > + + <cursor>Lorem ipsum dolor sit amet. + +Type <Leader><Leader>w to trigger the word motion |w|. See +|easymotion-leader-key| for details about the leader key. When the +motion is triggered, the text is updated (no braces are actually added, +the text is highlighted in red by default): > + + <cursor>Lorem {a}psum {b}olor {c}it {d}met. + +Press "c" to jump to the beginning of the word "sit": > + + Lorem ipsum dolor <cursor>sit amet. + +Similarly, if you're looking for an "o", you can use the |f| motion. +Type <Leader><Leader>fo, and all "o" characters are highlighted: > + + <cursor>L{a}rem ipsum d{b}l{c}r sit amet. + +Press "b" to jump to the second "o": > + + Lorem ipsum d<cursor>olor sit amet. + +And that's it! + +------------------------------------------------------------------------------ +2.1 Default mappings *easymotion-default-mappings* + +The default configuration defines the following mappings in normal, +visual and operator-pending mode: + + Mapping | Details + ------------------|---------------------------------------------- + <Leader>f{char} | Find {char} to the right. See |f|. + <Leader>F{char} | Find {char} to the left. See |F|. + <Leader>t{char} | Till before the {char} to the right. See |t|. + <Leader>T{char} | Till after the {char} to the left. See |T|. + <Leader>w | Beginning of word forward. See |w|. + <Leader>W | Beginning of WORD forward. See |W|. + <Leader>b | Beginning of word backward. See |b|. + <Leader>B | Beginning of WORD backward. See |B|. + <Leader>e | End of word forward. See |e|. + <Leader>E | End of WORD forward. See |E|. + <Leader>ge | End of word backward. See |ge|. + <Leader>gE | End of WORD backward. See |gE|. + <Leader>j | Line downward. See |j|. + <Leader>k | Line upward. See |k|. + <Leader>n | Jump to latest "/" or "?" forward. See |n|. + <Leader>N | Jump to latest "/" or "?" backward. See |N|. + +See |easymotion-leader-key| and |mapleader| for details about the leader key. +See |easymotion-custom-mappings| for customizing the default mappings. + +============================================================================== +3. Requirements *easymotion-requirements* + +EasyMotion has been developed and tested in vim 7.3, but it should run without +any problems in vim 7.2. + +Vi-compatible mode must be disabled. + +============================================================================== +4. Configuration *easymotion-configuration* + +EasyMotion will work fine without any configuration, but you can override the +default behavior by setting configuration variables globally in your |vimrc| +file. + +Example (this will change the target keys and disable shading): > + + let g:EasyMotion_keys = '1234567890' + let g:EasyMotion_do_shade = 0 + +------------------------------------------------------------------------------ +4.1 EasyMotion_keys *EasyMotion_keys* + +Set the keys which will be used for motion targets. Add as many keys as you +want. There's a lower chance that the motion targets will be grouped if many +keys are available. + +Default: 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' + +------------------------------------------------------------------------------ +4.2 EasyMotion_do_shade *EasyMotion_do_shade* + +The default behavior is to shade the text following the cursor (forward +motions) or preceding the cursor (backward motions) to make the motion targets +more visible. Set this option to 0 if you want to disable text shading. + +Default: 1 + +------------------------------------------------------------------------------ +4.3 EasyMotion_do_mapping *EasyMotion_do_mapping* + +Set this option to 0 if you want to disable the default mappings. See +|easymotion-default-mappings| for details about the default mappings. + +Note: If you disable this option, you'll have to map the motions yourself. See +the plugin source code for mapping details. You usually shouldn't need to do +this, see |easymotion-custom-mappings| for customizing the default mappings. + +Default: 1 + +------------------------------------------------------------------------------ +4.4 EasyMotion_grouping *EasyMotion_grouping* + +When there are too many possible targets on the screen, the results have to be +grouped. This configuration option lets you change which grouping algorithm +you want to use. There are two grouping algorithms available: + + * Single-key priority (value: 1) + ------------------- + + This algorithm prioritizes single-key jumps for the targets closest to + the cursor and only groups the last jump targets to maximize the amount + of single-key jumps. + + This algorithm works recursively and will work with as few keys as two. + + Example (with |EasyMotion_keys| = "abcdef"): > + + x x x x x x x x x +< + The |w| motion is triggered: > + + a b c d e f f f f + ^ ^ ^ ^ ^ Direct jump to target + ^ ^ ^ ^ Enter group "f" +< + * Original (value: 2) + -------- + + This is the original algorithm which always groups all targets if there + are too many possible motion targets. + + Example (with |EasyMotion_keys| = "abcdef"): > + + x x x x x x x x x +< + The |w| motion is triggered: > + + a a a a a a b b b + ^ ^ ^ ^ ^ ^ Enter group "a" + ^ ^ ^ Enter group "b" + +Default: 1 + +------------------------------------------------------------------------------ +4.5 Custom highlighting *easymotion-custom-hl* + +The default EasyMotion configuration uses two highlighting groups that link +to groups with default values. The highlighting groups are: + + * EasyMotionTarget + + Highlights motion targets, the default value is bold red + + * EasyMotionShade + + Highlights shaded text, the default value is dark gray + +There are two ways to override the default colors: + + 1) Set the highlighting in your color scheme + + This will only affect a single color scheme. The default red/gray colors + will be used if you change the color scheme to one that doesn't assign + any EasyMotion colors. + + Example: > + + hi EasyMotionTarget ctermbg=none ctermfg=green + hi EasyMotionShade ctermbg=none ctermfg=blue +< + 2) Set the highlighting in your vimrc + + This is ideal if you want to link the colors to highlighting groups that + are available in almost every color scheme, e.g. |ErrorMsg| (usually + bright red) and Comment (usually faded). You can be sure that the + color scheme's colors will be used instead of the default red/gray + if you choose this option. + + Example: > + + hi link EasyMotionTarget ErrorMsg + hi link EasyMotionShade Comment +< +------------------------------------------------------------------------------ +4.6 Custom mappings *easymotion-custom-mappings* + +EasyMotion allows you to customize all default mappings to avoid conflicts +with existing mappings. It is possible to change the default leader key +of all mappings to another key or sequence. It is also possible to fine +tune the plugin to your need by changing every single sequence. + +4.6.1 Leader key *EasyMotion_leader_key* *easymotion-leader-key* + +The default leader key can be changed with the configuration option +|EasyMotion_leader_key|. + +Set this option to the key sequence to use as the prefix of the mappings +described in |easymotion-default-mappings|. + +Note: The default leader key has been changed to '<Leader><Leader>' to +avoid conflicts with other plugins. You can revert to the original +leader by setting this option in your vimrc: > + + let g:EasyMotion_leader_key = '<Leader>' +< +Default: '<Leader><Leader>' + +4.6.2 Custom Keys *easymotion-custom-keys* + +All custom mappings follow the same variable format: > + + EasyMotion_mapping_{motion} = {mapping} +< +Example: > + + let g:EasyMotion_mapping_f = '_f' + let g:EasyMotion_mapping_T = '<C-T>' +< +See |easymotion-default-mappings| for a table of motions that can be mapped +and their default values. + +Note: The leader key defined by |EasyMotion_leader_key| is not prepended to +your customized mappings! You have to provide full key sequences when setting +these options. + +============================================================================== +5. License *easymotion-license* + +Creative Commons Attribution-ShareAlike 3.0 Unported + +http://creativecommons.org/licenses/by-sa/3.0/ + +============================================================================== +6. Known bugs *easymotion-known-bugs* + +None. + +============================================================================== +7. Contributing *easymotion-contributing* + +If you experience any bugs or have feature requests, please open an issue on +GitHub. Fork the source repository on GitHub and send a pull request if you +have any code improvements. + +Author: Kim Silkebækken <kim.silkebaekken+vim@gmail.com> +Source repository: https://github.com/Lokaltog/vim-easymotion + +============================================================================== +8. Credits *easymotion-credits* + +- Ben Boeckel: ge and WORD motions +- Drew Neil: operator-pending mappings +- Rob O'Dwyer: customizable mappings without giving up all defaults +- Michel D'Hooge: customizable leader +- Maxime Bourget: search motion, improved JK motion behavior +- Kearn Holliday: fix jumplist issues +- Shougo Matsushita: fix CSApprox issue + +EasyMotion is based on Bartlomiej Podolak's great PreciseJump script, which +can be downloaded here: + +http://www.vim.org/scripts/script.php?script_id=3437 + +============================================================================== +vim:tw=78:sw=4:ts=8:ft=help:norl: diff --git a/vim/doc/ft-gitcommit-plugin.txt b/vim/doc/ft-gitcommit-plugin.txt new file mode 100644 index 0000000..0d89ae1 --- /dev/null +++ b/vim/doc/ft-gitcommit-plugin.txt @@ -0,0 +1,5 @@ +GIT COMMIT *ft-gitcommit-plugin* + +One command, :DiffGitCached, is provided to show a diff of the current commit +in the preview window. It is equivalent to calling "git diff --cached" plus +any arguments given to the command. diff --git a/vim/doc/fugitive.txt b/vim/doc/fugitive.txt new file mode 100644 index 0000000..e2ae323 --- /dev/null +++ b/vim/doc/fugitive.txt @@ -0,0 +1,269 @@ +*fugitive.txt* A Git wrapper so awesome, it should be illegal + +Author: Tim Pope <http://tpo.pe/> +License: Same terms as Vim itself (see |license|) + +This plugin is only available if 'compatible' is not set. + +INTRODUCTION *fugitive* + +Whenever you edit a file from a Git repository, a set of commands is defined +that serve as a gateway to Git. + +COMMANDS *fugitive-commands* + +These commands are local to the buffers in which they work (generally, buffers +that are part of Git repositories). + + *fugitive-:Git* +:Git [args] Run an arbitrary git command. Similar to :!git [args] + but chdir to the repository tree first. + + *fugitive-:Git!* +:Git! [args] Like |:Git|, but capture the output into a temp file, + and edit that temp file. + + *fugitive-:Gcd* +:Gcd [directory] |:cd| relative to the repository. + + *fugitive-:Glcd* +:Glcd [directory] |:lcd| relative to the repository. + + *fugitive-:Gstatus* +:Gstatus Bring up the output of git-status in the preview + window. The following maps, which work on the cursor + line file where sensible, are provided: + + <C-N> next file + <C-P> previous file + <CR> |:Gedit| + - |:Git| add + - |:Git| reset (staged files) + C |:Gcommit| + cA |Gcommit| --amend --reuse-message=HEAD + ca |Gcommit| --amend + D |:Gdiff| + ds |:Gsdiff| + dp |:Git!| diff (p for patch; use :Gw to apply) + dp |:Git| add --intent-to-add (untracked files) + dv |:Gvdiff| + O |:Gtabedit| + o |:Gsplit| + p |:Git| add --patch + p |:Git| reset --patch (staged files) + q close status + R reload status + + *fugitive-:Gcommit* +:Gcommit [args] A wrapper around git-commit. If there is nothing + to commit, |:Gstatus| is called instead. Unless the + arguments given would skip the invocation of an editor + (e.g., -m), a split window will be used to obtain a + commit message. Write and close that window (:wq or + |:Gwrite|) to finish the commit. Unlike when running + the actual git-commit command, it is possible (but + unadvisable) to muck with the index with commands like + git-add and git-reset while a commit message is + pending. + + *fugitive-:Ggrep* +:Ggrep [args] |:grep| with git-grep as 'grepprg'. + + *fugitive-:Glog* +:Glog [args] Load all previous revisions of the current file into + the quickfix list. Additional git-log arguments can + be given (for example, --reverse). If "--" appears as + an argument, no file specific filtering is done, and + commits are loaded into the quickfix list. + + *fugitive-:Gedit* *fugitive-:Ge* +:Gedit [revision] |:edit| a |fugitive-revision|. + + *fugitive-:Gsplit* +:Gsplit [revision] |:split| a |fugitive-revision|. + + *fugitive-:Gvsplit* +:Gvsplit [revision] |:vsplit| a |fugitive-revision|. + + *fugitive-:Gtabedit* +:Gtabedit [revision] |:tabedit| a |fugitive-revision|. + + *fugitive-:Gpedit* +:Gpedit [revision] |:pedit| a |fugitive-revision|. + +:Gsplit! [args] *fugitive-:Gsplit!* *fugitive-:Gvsplit!* +:Gvsplit! [args] *fugitive-:Gtabedit!* *fugitive-:Gpedit!* +:Gtabedit! [args] Like |:Git!|, but open the resulting temp file in a +:Gpedit! [args] split, tab, or preview window. + + *fugitive-:Gread* +:Gread [revision] Empty the buffer and |:read| a |fugitive-revision|. + When the argument is omitted, this is similar to + git-checkout on a work tree file or git-add on a stage + file, but without writing anything to disk. + +:{range}Gread [revision] + |:read| in a |fugitive-revision| after {range}. + + *fugitive-:Gread!* +:Gread! [args] Empty the buffer and |:read| the output of a Git + command. For example, :Gread! show HEAD:%. + +:{range}Gread! [args] |:read| the output of a Git command after {range}. + + *fugitive-:Gwrite* +:Gwrite Write to the current file's path and stage the results. + When run in a work tree file, it is effectively git + add. Elsewhere, it is effectively git-checkout. A + great deal of effort is expended to behave sensibly + when the work tree or index version of the file is + open in another buffer. + +:Gwrite {path} You can give |:Gwrite| an explicit path of where in + the work tree to write. You can also give a path like + :0:foo.txt or even :0 to write to just that stage in + the index. + + *fugitive-:Gwq* +:Gwq [path] Like |:Gwrite| followed by |:quit| if the write + succeeded. + +:Gwq! [path] Like |:Gwrite|! followed by |:quit|! if the write + succeeded. + + *fugitive-:Gdiff* +:Gdiff [revision] Perform a |vimdiff| against the current file in the + given revision. With no argument, the version in the + index is used (which means a three-way diff during a + merge conflict, making it a git-mergetool + alternative). The newer of the two files is placed + to the right. Use |do| and |dp| and write to the + index file to simulate "git add --patch". + + *fugitive-:Gsdiff* +:Gsdiff [revision] Like |:Gdiff|, but split horizontally. + + *fugitive-:Gvdiff* +:Gvdiff [revision] Identical to |:Gdiff|. For symmetry with |:Gsdiff|. + + *fugitive-:Gmove* +:Gmove {destination} Wrapper around git-mv that renames the buffer + afterward. The destination is relative to the current + directory except when started with a /, in which case + it is relative to the work tree. Add a ! to pass -f. + + *fugitive-:Gremove* +:Gremove Wrapper around git-rm that deletes the buffer + afterward. When invoked in an index file, --cached is + passed. Add a ! to pass -f and forcefully discard the + buffer. + + *fugitive-:Gblame* +:Gblame [flags] Run git-blame on the file and open the results in a + scroll bound vertical split. Press enter on a line to + reblame the file as it was in that commit. You can + give any of ltwfsMC as flags and they will be passed + along to git-blame. + + In a blame buffer on any line, one can press <CR> to + reblame at that commit, ~ to reblame at that commit's + [count]th first grandparent (like HEAD~[count]), or P + to reblame at that commit's [count]th parent (like + HEAD^[count]). Press o or O to open up that commit + in a horizontal of vertical split. Pressing q will + close the blame buffer. + +:[range]Gblame [flags] Run git-blame on the given range. + + *fugitive-:Gbrowse* +:[range]Gbrowse If the remote for the current branch is on GitHub, + open the current file, blob, tree, commit, or tag + (with git-web--browse) on GitHub. Otherwise, open the + current file, blob, tree, commit, or tag in + git-instaweb (if you have issues, verify you can run + "git instaweb" from a terminal). If a range is given, + it is appropriately appended to the URL as an anchor. + +:[range]Gbrowse! Like :Gbrowse, but put the URL on the clipboard rather + than opening it. + +:[range]Gbrowse {revision} + Like :Gbrowse, but for a given |fugitive-revision|. A + useful value here is -, which ties the URL to the + latest commit rather than a volatile branch. + +:[range]Gbrowse [...]@{remote} + Force using the given remote rather than the remote + for the current branch. The remote is used to + determine which GitHub repository to link to. + +MAPPINGS *fugitive-mappings* + +These maps are available in Git objects. + + *fugitive-<CR>* +<CR> Jump to the revision under the cursor. + + *fugitive-o* +o Jump to the revision under the cursor in a new split. + + *fugitive-O* +O Jump to the revision under the cursor in a new tab. + + *fugitive-~* +~ Go to the current file in the [count]th first + ancestor. + + *fugitive-P* +P Go to the current file in the [count]th parent. + + *fugitive-C* +C Go to the commit containing the current file. + + *fugitive-a* +a Show the current tag, commit, or tree in an alternate + format. + +SPECIFYING REVISIONS *fugitive-revision* + +Fugitive revisions are similar to Git revisions as defined in the "SPECIFYING +REVISIONS" section in the git-rev-parse man page. For commands that accept an +optional revision, the default is the file in the index for work tree files +and the work tree file for everything else. Example revisions follow. + +Revision Meaning ~ +HEAD .git/HEAD +master .git/refs/heads/master +HEAD^{} The commit referenced by HEAD +HEAD^ The parent of the commit referenced by HEAD +HEAD: The tree referenced by HEAD +/HEAD The file named HEAD in the work tree +Makefile The file named Makefile in the work tree +HEAD^:Makefile The file named Makefile in the parent of HEAD +:Makefile The file named Makefile in the index (writable) +- The current file in HEAD +^ The current file in the previous commit +~3 The current file 3 commits ago +: .git/index (Same as |:Gstatus|) +:0 The current file in the index +:1 The current file's common ancestor during a conflict +:2 The current file in the target branch during a conflict +:3 The current file in the merged branch during a conflict +:/foo The most recent commit with "foo" in the message + +STATUSLINE *fugitive-statusline* + + *fugitive#statusline()* +Add %{fugitive#statusline()} to your statusline to get an indicator including +the current branch and the currently edited file's commit. If you don't have +a statusline, this one matches the default when 'ruler' is set: +> + set statusline=%<%f\ %h%m%r%{fugitive#statusline()}%=%-14.(%l,%c%V%)\ %P +< +ABOUT *fugitive-about* + +Grab the latest version or report a bug on GitHub: + +http://github.com/tpope/vim-fugitive + + vim:tw=78:et:ft=help:norl: diff --git a/vim/doc/gist-vim.txt b/vim/doc/gist-vim.txt new file mode 100644 index 0000000..36ef71c --- /dev/null +++ b/vim/doc/gist-vim.txt @@ -0,0 +1,182 @@ +*Gist.vim* Vimscript for creating gists (http://gist.github.com) + +Usage |gist-vim-usage| +Tips |gist-vim-tips| +Requirements |gist-vim-requirements| +License |gist-vim-license| +Install |gist-vim-install| + +This is a vimscript for creating gists (http://gist.github.com) + +For the latest version please see https://github.com/mattn/gist-vim. + +============================================================================== +USAGE *:Gist* *gist-vim-usage* + +- Post current buffer to gist, using default privacy option. > + + :Gist +< +- Post selected text to gist, using defualt privacy option. + This applies to all permutations listed below (except multi). > + + :'<,'>Gist +< +- Create a private gist. > + + :Gist -p +< +- Create a public gist. + (Only relevant if you've set gists to be private by default.) > + + :Gist -P +< +- Post whole text to gist as public. + This is only relevant if you've set gists to be private by default; + if you get an empty gist list, try ":Gist --abandon". > + + :Gist -P +< +- Post whole text to gist as public. + This is only relevant if you've set gists to be private by default. + If you get an empty gist list, try ":Gist --abandon". > + + :Gist -P +< +- Create a gist anonymously. > + + :Gist -a +< +- Create a gist with all open buffers. > + + :Gist -m +< +- Edit the gist (you need to have opened the gist buffer first). + You can update the gist with the {:w} command within the gist buffer. > + + :Gist -e +< +- Edit the gist with name "foo.js" (you need to have opened the gist buffer + first). > + + :Gist -e foo.js +< +- Delete the gist (you need to have opened the gist buffer first). + Password authentication is needed. > + + :Gist -d +< +- Fork the gist (you need to have opened the gist buffer first). + Password authentication is needed. > + + :Gist -f +< +- Get gist XXXXX. > + + :Gist XXXXX +< +- Get gist XXXXX and add to clipboard. > + + :Gist -c XXXXX +< +- List your public gists. > + + :Gist -l +< +- List gists from user "mattn". > + + :Gist -l mattn +< +- List all (public and private) of your gists. > + + :Gist -la +< + +============================================================================== +TIPS *gist-vim-tips* + +If you set "g:gist_clip_command", gist.vim will copy the gist code with option +"-c". + + - Mac: > + let g:gist_clip_command = 'pbcopy' +< + - Linux: > + let g:gist_clip_command = 'xclip -selection clipboard' +< + - Others (cygwin?): > + let g:gist_clip_command = 'putclip' +< +If you want to detect filetype from the filename: > + + let g:gist_detect_filetype = 1 +< +If you want to open the browser after the post: > + + let g:gist_open_browser_after_post = 1 +< +If you want to change the browser: > + + let g:gist_browser_command = 'w3m %URL%' +< +or: > + + let g:gist_browser_command = 'opera %URL% &' +< +On windows, this should work with your user settings. + +If you want to show your private gists with ":Gist -l": > + + let g:gist_show_privates = 1 +< +If you get problems when creating gists try: > + + :Gist --abandon +< + +============================================================================== +REQUIREMENTS *gist-vim-requirements* + + - Curl command (http://curl.haxx.se/) + - and, if you want to use your git profile, the git command-line client. + +============================================================================== +LICENSE *gist-vim-license* + + + Copyright 2010 by Yasuhiro Matsumoto + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + +============================================================================== +INSTALL *gist-vim-install* + +Copy gist.vim to your plugin directory. + +gist.vim will create a curl cookie-jar file in your runtimepath. + +rtp: + - plugin/gist.vim + - cookies/github + +If you want to uninstall gist.vim, remember to also remove "cookies/github". + + vim:tw=78:ts=8:ft=help:norl: diff --git a/vim/doc/indent-object.txt b/vim/doc/indent-object.txt new file mode 100644 index 0000000..5b58102 --- /dev/null +++ b/vim/doc/indent-object.txt @@ -0,0 +1,120 @@ +*indent-object.txt* Text objects based on indent levels.
+
+ Copyright (c) 2010 Michael Smith
+
+Indent Text Objects
+
+INTRODUCTION |idntobj-introduction|
+TEXT OBJECTS |idntobj-objects|
+BLANK LINES |idntobj-blanklines|
+ABOUT |idntobj-about|
+
+
+==============================================================================
+INTRODUCTION *idntobj-introduction*
+
+Vim text objects provide a convenient way to select and operate on various
+types of objects. These objects include regions surrounded by various types of
+brackets and various parts of language (ie sentences, paragraphs, etc).
+
+This plugin defines a new text object, based on indentation levels. This is
+very useful in languages such as Python, in which the syntax defines scope in
+terms of indentation. Using the objects defined in this plugin, an entire if
+structure can be quickly selected, for example.
+
+
+==============================================================================
+TEXT OBJECTS *ai* *ii* *aI* *iI* *idntobj-objects*
+
+This plugin defines two new text objects. These are very similar - they differ
+only in whether they include the line below the block or not.
+
+ Key Mapping Description ~
+>
+ <count>ai (A)n (I)ndentation level and line above.
+ <count>ii (I)nner (I)ndentation level (no line above).
+ <count>aI (A)n (I)ndentation level and lines above/below.
+ <count>iI (I)nner (I)ndentation level (no lines above/below).
+<
+
+Note that the iI mapping is mostly included simply for completeness, it is
+effectively a synonym for ii.
+
+Just like regular text objects, these mappings can be used either with
+operators expecting a motion, such as 'd' or 'c', as well as in visual mode.
+In visual mode the mapping can be repeated, which has the effect of
+iteratively increasing the scope of indentation block selected. Specifying a
+count can be used to achieve the same effect.
+
+The difference between |ai| and |aI| is that |ai| includes the line
+immediately above the indentation block, whereas aI includes not only that,
+but also the line below. Which of these is most useful largely depends on the
+structure of the language being edited.
+
+For example, when editing the Python code, |ai| is generally more useful, as
+the line above the indentation block is usually related to it. For example, in
+the following code (* is used to indicate the cursor position):
+>
+ if foo > 3:
+ log("foo is big") *
+ foo = 3
+ do_something_else()
+<
+the if clause is logically related to the code block, whereas the function
+call below is not. It is unlikely we would want to select the line below when
+we are interested in the if block.
+
+However, in other languages, such as Vim scripts, control structures are
+usually terminated with something like 'endif'. Therefore, in this example:
+>
+ if foo > 3
+ echo "foo is big" *
+ let foo = 3
+ endif
+ call do_something_else()
+<
+we would more likely want to include the endif when we select the if
+structure.
+
+
+==============================================================================
+BLANK LINES *idntobj-blanklines*
+
+When scanning code blocks, the plugin usually ignores blank lines. There is an
+exception to this, however, when the block being selected is not indented. In
+this case if blank lines are ignored, then the entire file would be selected.
+Instead when code at the top level is being indented blank lines are
+considered to delimit the block.
+
+
+==============================================================================
+ABOUT *idntobj-about*
+
+vim-indent-object was written by Michael Smith <msmith@msmith.id.au>. The
+project repository is kept at:
+
+http://github.com/michaeljsmith/vim-indent-object
+
+Any feedback or criticism is welcome, and can be mailed to the author at the
+above email address. Alternatively issues can be raised on the project
+website.
+
+Licence:
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to
+deal in the Software without restriction, including without limitation the
+rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+sell copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+IN THE SOFTWARE.
diff --git a/vim/doc/rails.txt b/vim/doc/rails.txt new file mode 100644 index 0000000..6dbbb1e --- /dev/null +++ b/vim/doc/rails.txt @@ -0,0 +1,1020 @@ +*rails.txt* Plugin for working with Ruby on Rails applications + +Author: Tim Pope <http://tpo.pe/> + +|rails-introduction| Introduction and Feature Summary +|rails-commands| General Commands +|rails-navigation| Navigation +|rails-gf| File Under Cursor - gf +|rails-alternate-related| Alternate and Related Files +|rails-type-navigation| File Type Commands +|rails-custom-navigation| Custom Navigation Commands +|rails-rake| Rake +|rails-scripts| Script Wrappers +|rails-refactoring| Refactoring Helpers +|rails-partials| Partial Extraction +|rails-migrations| Migration Inversion +|rails-integration| Integration +|rails-vim-integration| Integration with the Vim Universe +|rails-rails-integration| Integration with the Rails Universe +|rails-abbreviations| Abbreviations +|rails-syntax| Syntax Highlighting +|rails-options| Managed Vim Options +|rails-configuration| Configuration +|rails-global-settings| Global Settings +|rails-about| About rails.vim +|rails-license| License + +This plugin is only available if 'compatible' is not set. + +{Vi does not have any of this} + +INTRODUCTION *rails-introduction* *rails* + +Whenever you edit a file in a Rails application, this plugin will be +automatically activated. This sets various options and defines a few +buffer-specific commands. + +If you are in a hurry to get started, with a minimal amount of reading, you +are encouraged to at least skim through the headings and command names in this +file, to get a better idea of what is offered. If you only read one thing, +make sure it is the navigation section: |rails-navigation|. + +GENERAL COMMANDS *rails-commands* + +All commands are buffer local, unless otherwise stated. This means you must +actually edit a file from a Rails application. + + *rails-:Rails* +:Rails new {directory} The only global command. Creates a new Rails + application in {directory}, and loads the README. + +:Rails! Show the version of rails.vim installed. If rails.vim + is active for the current buffer, also show the type + of Rails file detected. + + *rails-:Rcd* +:Rcd [{directory}] |:cd| to /path/to/railsapp/{directory}. + + *rails-:Rlcd* +:Rlcd [{directory}] |:lcd| to /path/to/railsapp/{directory}. + + *rails-:Rdoc* +:Rdoc Browse to the Rails API, either in doc/api in the + current Rails application, gem_server if it is + running, or http://api.rubyonrails.org/ . Requires + :OpenURL to be defined (see |rails-:OpenURL|). + + *rails-:Rdoc!* +:Rdoc! Make the appropriate |:helptags| call and invoke + |:help| rails. + + *rails-:Redit* +:Redit {file} Deprecated in favor of |:R|. + + *rails-:Rfind* +:Rfind [{file}] Deprecated in favor of |:R| or |:find|. + + *rails-:Rlog* +:Rlog [{logfile}] Split window and open {logfile} ($RAILS_ENV or + development by default). The control characters used + for highlighting are removed. If you have a :Tail + command (provided by |tailminusf|.vim), that is used; + otherwise, the file does NOT reload upon change. + Use |:checktime| to tell Vim to check for changes. + |G| has been mapped to do just that prior to jumping + to the end of the file, and q is mapped to close the + window. If the delay in loading is too long, you + might like :Rake log:clear. + + *rails-:Rpreview* +:Rpreview [{path}] Creates a URL from http://localhost:3000/ and the + {path} given. The not too useful default is to then + edit this URL using Vim itself, allowing |netrw| to + download it. More useful is to define a :OpenURL + command, which will be used instead (see + |rails-:OpenURL|). If {path} is omitted, a sensible + default is used (considers the current + controller/template, but does not take routing into + account). The default is overridden by comments like + the following that are either before the current + method call or at the top of the file: > + # GET /users + # PUT /users/1 +< + *rails-:Rpreview!* +:Rpreview! [{path}] As with :Rpreview, except :OpenURL is never used. + + *rails-:Rtags* +:Rtags Calls ctags -R on the current application root and + writes the result to tmp/tags. Exuberant ctags must + be installed. Additional arguments can be passed to + ctags with |g:rails_ctags_arguments|. + + *rails-:Rrefresh* +:Rrefresh Refreshes certain cached settings. Most noticeably, + this clears the cached list of classes that are syntax + highlighted as railsUserClass. + + *rails-:Rrefresh!* +:Rrefresh! As above, and also reloads rails.vim. + + *rails-:OpenURL* +:OpenURL {url} This is not a command provided by the plugin, but + rather provided by user and utilized by other plugin + features. This command should be defined to open the + provided {url} in a web browser. An example command + on a Mac might be: > + :command -bar -nargs=1 OpenURL :!open <args> +< The following appears to work on Windows: > + :command -bar -nargs=1 OpenURL :!start cmd /cstart /b <args> +< On Debian compatible distributions, the following is + the preferred method: > + :command -bar -nargs=1 OpenURL :!sensible-browser <args> +< If exists("$SECURITYSESSIONID"), has("gui_win32"), or + executable("sensible-browser") is true, the + corresponding command above will be automatically + defined. Otherwise, you must provide your own (which + is recommended, regardless). + +NAVIGATION *rails-navigation* + +Navigation is where the real power of this plugin lies. Efficient use of the +following features will greatly ease navigating the Rails file structure. + +The 'path' has been modified to include all the best places to be. +> + :find application_controller.rb +< +File Under Cursor - gf ~ + *rails-gf* +The |gf| command, which normally edits the current file under the cursor, has +been remapped to take context into account. |CTRL-W_f| (open in new window) +and |CTRL-W_gf| (open in new tab) are also remapped. + +Example uses of |gf|, and where they might lead. +(* indicates cursor position) +> + Pos*t.first +< app/models/post.rb ~ +> + has_many :c*omments +< app/models/comment.rb ~ +> + link_to 'Home', :controller => 'bl*og' +< app/controllers/blog_controller.rb ~ +> + <%= render 'sh*ared/sidebar' %> +< app/views/shared/_sidebar.html.erb ~ +> + <%= stylesheet_link_tag 'scaf*fold' %> +< public/stylesheets/scaffold.css ~ +> + class BlogController < Applica*tionController +< app/controllers/application_controller.rb ~ +> + class ApplicationController < ActionCont*roller::Base +< .../action_controller/base.rb ~ +> + fixtures :pos*ts +< test/fixtures/posts.yml ~ +> + layout :pri*nt +< app/views/layouts/print.html.erb ~ +> + <%= link_to "New", new_comme*nt_path %> +< app/controllers/comments_controller.rb (jumps to def new) ~ + +In the last example, the controller and action for the named route are +determined by evaluating routes.rb as Ruby and doing some introspection. This +means code from the application is executed. Keep this in mind when +navigating unfamiliar applications. + +Alternate and Related Files ~ + *rails-alternate-related* +Two commands, :A and :R, are used quickly jump to an "alternate" and a +"related" file, defined below. + + *rails-:A* *rails-:AE* *rails-:AS* *rails-:AV* *rails-:AT* *rails-:AD* +:A These commands were picked to mimic Michael Sharpe's +:AE a.vim. Briefly, they edit the "alternate" file, in +:AS either the same window (:A and :AE), a new split +:AV window (:AS), a new vertically split window (:AV), a +:AT new tab (:AT), or read it into the current buffer +:AD (:AD). + + *rails-:R* *rails-:RE* *rails-:RS* *rails-:RV* *rails-:RT* *rails-:RD* +:R These are similar |rails-:A| and friends above, only +:RE they jump to the "related" file rather than the +:RS "alternate." With a file name argument, they edit +:RV a file relative to the application root (:R Rakefile), +:RT and with a count and a file name argument, they find a +:RD file in 'path' (e.g., :1R PostsController.) You can + also append a line number (post.rb:42) or a method + (PostsController#32) to both forms. + + *rails-alternate* *rails-related* +The alternate file is most frequently the test file, though there are +exceptions. The related file varies, and is sometimes dependent on current +location in the file. For example, when editing a controller, the related +file is template for the method currently being edited. + +The easiest way to learn these commands is to experiment. A few examples of +alternate and related files for a Test::Unit application follow: + +Current file Alternate file Related file ~ +model unit test schema definition +controller (in method) functional test template (view) +template (view) functional test controller (jump to method) +migration previous migration next migration +config/database.yml config/routes.rb config/environments/*.rb + +Suggestions for further contexts to consider for the alternate file, related +file, and file under the cursor are welcome. They are subtly tweaked from +release to release. + +File Type Navigation Commands ~ + *rails-type-navigation* +For the less common cases, a more deliberate set of commands are provided. +Each of the upcoming commands takes an optional argument (with tab completion) +but defaults to a reasonable guess. Commands that default to the current +model or controller generally behave like you'd expect in other file types. +For example, in app/helpers/posts_helper.rb, the current controller is +"posts", and in test/fixtures/comments.yml, the current model is "comment". +In model related files, the current controller is the pluralized model name, +and in controller related files, the current model is the singularized +controller name. + +Each of the following commands has variants for splitting, vertical splitting, +opening in a new tab, and reading the file into the current buffer. For +:Rmodel, those variants would be :RSmodel, :RVmodel, :RTmodel, and :RDmodel. +There is also :REmodel which is a synonym for :Rmodel (future versions might +allow customization of the behavior of :Rmodel). They also allow for jumping +to methods or line numbers using the same syntax as |:R|, and file creation +can be forced by adding a ! after the filename (not after the command +itself!). + +:Rcontroller |rails-:Rcontroller| +:Renvironment |rails-:Renvironment| +:Rfixtures |rails-:Rfixtures| +:Rfunctionaltest |rails-:Rfunctionaltest| +:Rhelper |rails-:Rhelper| +:Rinitializer |rails-:Rinitializer| +:Rintegrationtest |rails-:Rintegrationtest| +:Rjavascript |rails-:Rjavascript| +:Rlayout |rails-:Rlayout| +:Rlib |rails-:Rlib| +:Rlocale |rails-:Rlocale| +:Rmailer |rails-:Rmailer| +:Rmetal |rails-:Rmetal| +:Rmigration |rails-:Rmigration| +:Rmodel |rails-:Rmodel| +:Robserver |rails-:Robserver| +:Rplugin |rails-:Rplugin| +:Rspec |rails-:Rspec| +:Rstylesheet |rails-:Rstylesheet| +:Rtask |rails-:Rtask| +:Runittest |rails-:Runittest| +:Rview |rails-:Rview| + + *rails-:Rcontroller* +:Rcontroller [{name}] Edit the specified or current controller. + + *rails-:Renvironment* +:Renvironment [{name}] Edit the config/environments file specified. With no + argument, defaults to editing config/application.rb + or config/environment.rb. + + *rails-:Rfixtures* +:Rfixtures [{name}] Edit the fixtures for the given or current model. If + an argument is given, it must be pluralized, like the + final filename (this may change in the future). If + omitted, the current model is pluralized. An optional + extension can be given, to distinguish between YAML + and CSV fixtures. + + *rails-:Rfunctionaltest* +:Rfunctionaltest [{name}] + Edit the functional test or controller spec for the + specified or current controller. + + *rails-:Rhelper* +:Rhelper [{name}] Edit the helper for the specified name or current + controller. + + *rails-:Rinitializer* +:Rinitializer [{name}] Edit the config/initializers file specified. With no + argument, defaults to editing config/routes.rb. + + *rails-:Rintegrationtest* +:Rintegrationtest [{name}] + Edit the integration test, integration spec, or + cucumber feature specified. With no argument, + defaults to editing test/test_helper.rb. + + *rails-:Rjavascript* +:Rjavascript [{name}] Edit the JavaScript for the specified name or current + controller. Also supports CoffeeScript in + app/scripts/. + + *rails-:Rlayout* +:Rlayout [{name}] Edit the specified layout. Defaults to the layout for + the current controller, or the application layout if + that cannot be found. A new layout will be created if + an extension is given. + + *rails-:Rlib* +:Rlib [{name}] Edit the library from the lib directory for the + specified name. If the current file is part of a + plugin, the libraries from that plugin can be + specified as well. With no argument, defaults to + editing db/seeds.rb. + + *rails-:Rlocale* +:Rlocale [{name}] Edit the config/locale file specified, optionally + adding a yml or rb extension if none is given. With + no argument, checks config/environment.rb for the + default locale. + + *rails-:Rmailer* +:Rmailer [{name}] Edit the mailer specified. This looks in both + app/mailers for Rails 3 and app/models for older + versions of Rails but only tab completes the former. + + *rails-:Rmetal* +:Rmetal [{name}] Edit the app/metal file specified. With no argument, + defaults to editing config/boot.rb. + + *rails-:Rmigration* +:Rmigration [{pattern}] If {pattern} is a number, find the migration for that + particular set of digits, zero-padding if necessary. + Otherwise, find the newest migration containing the + given pattern. Omitting the pattern selects the + latest migration. Give a numeric argument of 0 to edit + db/schema.rb. + + *rails-:Rmodel* +:Rmodel [{name}] Edit the specified or current model. + + *rails-:Robserver* +:Robserver [{name}] Find the observer with a name like + {model}_observer.rb. When in an observer, most + commands (like :Rmodel) will seek based on the + observed model ({model}) and not the actual observer + ({model}_observer). However, for the command + :Runittest, a file of the form + {model}_observer_test.rb will be found. + + *rails-:Rplugin* +:Rplugin [{plugin}[/{path}]] + Edits a file within a plugin. If the path to the file + is omitted, it defaults to init.rb. If no argument is + given, it defaults to editing the application Gemfile. + + *rails-:Rspec* +:Rspec [{name}] Edit the given spec. With no argument, defaults to + editing spec/spec_helper.rb (If you want to jump to + the spec for the given file, use |:A| instead). This + command is only defined if there is a spec folder in + the root of the application. + + *rails-:Rstylesheet* +:Rstylesheet [{name}] Edit the stylesheet for the specified name or current + controller. Also supports Sass and SCSS. + + *rails-:Rtask* +:Rtask [{name}] Edit the .rake file from lib/tasks for the specified + name. If the current file is part of a plugin, the + tasks for that plugin can be specified as well. If no + argument is given, either the current plugin's + Rakefile or the application Rakefile will be edited. + + *rails-:Runittest* +:Runittest [{name}] Edit the unit test or model spec for the specified + name or current model. + + *rails-:Rview* +:Rview [[{controller}/]{view}] + Edit the specified view. The controller will default + sensibly, and the view name can be omitted when + editing a method of a controller. If a view name is + given with an extension, a new file will be created. + This is a quick way to create a new view. + +Custom Navigation Commands ~ + *rails-custom-navigation* + +It is also possible to create custom navigation commands. This is best done +in an initialization routine of some sort (e.g., an autocommand); see +|rails-configuration| for details. + + *rails-:Rnavcommand* +:Rnavcommand [options] {name} [{path} ...] + Create a navigation command with the supplied + name, looking in the supplied paths, using the + supplied options. The -suffix option specifies what + suffix to filter on, and strip from the filename, and + defaults to -suffix=.rb . The -glob option specifies + a file glob to use to find files, _excluding_ the + suffix. Useful values include -glob=* and -glob=**/*. + The -default option specifies a default argument (not + a full path). If it is specified as -default=model(), + -default=controller(), or -default=both(), the current + model, controller, or both (as with :Rintegrationtest) + is used as a default. + + *rails-:Rcommand* +:Rcommand Obsolete alias for |:Rnavcommand|. + +Examples: > + Rnavcommand api app/apis -glob=**/* -suffix=_api.rb + Rnavcommand config config -glob=*.* -suffix= -default=routes.rb + Rnavcommand concern app/concerns -glob=**/* + Rnavcommand exemplar test/exemplars spec/exemplars -glob=**/* + \ -default=model() -suffix=_exemplar.rb + +Finally, one Vim feature that proves helpful in conjunction with all of the +above is |CTRL-^|. This keystroke edits the previous file, and is helpful to +back out of any of the above commands. + +RAKE *rails-rake* + +Rake integration happens through the :Rake command. + + *rails-:Rake* +:[range]Rake {targets} Calls |:make!| {targets} (with 'makeprg' being rake, + or `bundle exec rake` if bundler.vim is active) and + opens the quickfix window if there were any errors. + An argument of "-" reruns the last task. If {targets} + are omitted, :Rake defaults to something sensible as + described below. Giving a line number argument may + affect that default. + + *rails-:Rake!* +:[range]Rake! {targets} Called with a bang, :Rake will forgo opening the + quickfix window. + + *rails-rake-defaults* + +Generally, the default task is one that runs the test you'd expect. For +example, if you're in a view in an RSpec application, the view spec is run, +but if it's a Test::Unit application, the functional test for the +corresponding controller is run. The following table lists the most +interesting mappings: + +File Task ~ +unit test test:units TEST=... +functional test test:functionals TEST=... +integration test test:integration TEST=... +spec spec SPEC=... +feature cucumber FEATURE=... +model test:units TEST=... spec SPEC=... +controller test:functionals TEST=... spec SPEC=... +helper test:functionals TEST=... spec SPEC=... +view test:functionals TEST=... spec SPEC=... +fixtures db:fixtures:load FIXTURES=... +migration db:migrate VERSION=... +config/routes.rb routes +db/seeds.rb db:seed + +Additionally, when :Rake is given a line number (e.g., :.Rake), the following +additional tasks can be invoked: + +File Task ~ +unit test test:units TEST=... TESTOPTS=-n... +functional test test:functionals TEST=... TESTOPTS=-n... +integration test test:integration TEST=... TESTOPTS=-n... +spec spec SPEC=...:... +feature cucumber FEATURE=...:... +controller routes CONTROLLER=... +fixtures db:fixtures:identify LABEL=... +migration in self.up db:migrate:up VERSION=... +migration in self.down db:migrate:down VERSION=... +migration elsewhere db:migrate:redo VERSION=... +task ... (try to guess currently edited declaration) + +Finally, you can override the default task with a comment like "# rake ..." +before the method pointed to by [range] or at the top of the file. + +SCRIPT WRAPPERS *rails-scripts* + +The following commands are wrappers around the scripts in the script directory +of the Rails application. Most have extra features beyond calling the script. +A limited amount of completion with <Tab> is supported. + + *rails-:Rscript* +:Rscript {script} {options} + Call ruby script/{script} {options}. Defaults to + calling script/console. + + *rails-:Rconsole* +:Rconsole {options} Obsolete. Call |:Rscript| instead. + + *rails-:Rrunner* +:[range]Rrunner {code} Executes {code} with script/runner. Differs from + :Rscript runner {code} in that the code is passed as + one argument. Also, |system()| is used instead of + |:!|. This is to help eliminate annoying "Press + ENTER" prompts. If a line number is given in the + range slot, the output is pasted into the buffer after + that line. + + *rails-:Rp* +:[range]Rp {code} Like :Rrunner, but call the Ruby p method on the + result. Literally "p begin {code} end". + + *rails-:Rpp* *rails-:Ry* +:[range]Rpp {code} Like :Rp, but with pp (pretty print) or y (YAML +:[range]Ry {code} output). + + *rails-:Rgenerate* +:Rgenerate {options} Calls script/generate {options}, and then edits the + first file generated. + + *rails-:Rdestroy* +:Rdestroy {options} Calls script/destroy {options}. + + *rails-:Rserver* +:Rserver {options} Launches script/server {options} in the background. + On win32, this means |!start|. On other systems, this + uses the --daemon option. + + *rails-:Rserver!* +:Rserver! {options} Same as |:Rserver|, only first attempts to kill any + other server using the same port. On non-Windows + systems, lsof must be installed for this to work. + +REFACTORING HELPERS *rails-refactoring* + +A few features are dedicated to helping you refactor your code. + +Partial Extraction ~ + *rails-partials* + +The :Rextract command can be used to extract a partial to a new file. + + *rails-:Rextract* +:[range]Rextract [{controller}/]{name} + Create a {name} partial from [range] lines (default: + current line). + + *rails-:Rpartial* +:[range]Rpartial [{controller}/]{name} + Obsolete alias for :Rextract. + +If this is your file, in app/views/blog/show.html.erb: > + + 1 <div> + 2 <h2><%= @post.title %></h2> + 3 <p><%= @post.body %></p> + 4 </div> + +And you issue this command: > + + :2,3Rextract post + +Your file will change to this: > + + 1 <div> + 2 <%= render :partial => 'post' %> + 3 </div> + +And app/views/blog/_post.html.erb will now contain: > + + 1 <h2><%= post.title %></h2> + 2 <p><%= post.body %></p> + +As a special case, if the file had looked like this: > + + 1 <% for object in @posts -%> + 2 <h2><%= object.title %></h2> + 3 <p><%= object.body %></p> + 4 <% end -%> +< +The end result would have been this: > + + 1 <%= render :partial => 'post', :collection => @posts %> +< +The easiest way to choose what to extract is to use |linewise-visual| mode. +Then, a simple > + :'<,'>Rextract blog/post +will suffice. (Note the use of a controller name in this example.) + +Migration Inversion ~ + *rails-migrations* *rails-:Rinvert* +:Rinvert In a migration, rewrite the self.up method into a + self.down method. If self.up is empty, the process is + reversed. This chokes on more complicated + instructions, but works reasonably well for simple + calls to create_table, add_column, and the like. + +INTEGRATION *rails-integration* + +Having one foot in Rails and one in Vim, rails.vim has two worlds with which +to interact. + +Integration with the Vim Universe ~ + *rails-vim-integration* + +A handful of Vim plugins are enhanced by rails.vim. All plugins mentioned can +be found at http://www.vim.org/. Cream and GUI menus (for lack of a better +place) are also covered in this section. + + *rails-:Rtree* +:Rtree [{arg}] If |NERDTree| is installed, open a tree for the + application root or the given subdirectory. + + *rails-:Rdbext* *rails-dbext* +:Rdbext [{environment}] This command is only provided when the |dbext| plugin + is installed. Loads the {environment} configuration + (defaults to $RAILS_ENV or development) from + config/database.yml and uses it to configure dbext. + The configuration is cached on a per application + basis. With dbext version 8.00 and newer, this + command is called automatically when needed. When + dbext is configured, you can execute SQL directly from + Vim: > + :Select * from posts order by id desc + :Update comments set author_id = 1 +< + *rails-surround* +The |surround| plugin available from vim.org enables adding and removing +"surroundings" like parentheses, quotes, and HTML tags. Even by itself, it is +quite useful for Rails development, particularly eRuby editing. When coupled +with this plugin, a few additional replacement surroundings are available in +eRuby files. See the |surround| documentation for details on how to use them. +The table below uses ^ to represent the position of the surrounded text. + +Key Surrounding ~ += <%= ^ %> +- <% ^ -%> +# <%# ^ %> +<C-E> <% ^ -%>\n<% end -%> + +The last surrounding is particularly useful in insert mode with the following +map in one's vimrc. Use Alt+o to open a new line below the current one. This +works nicely even in a terminal (where most alt/meta maps will fail) because +most terminals send <M-o> as <Esc>o anyways. +> + imap <M-o> <Esc>o +< +One can also use the <C-E> surrounding in a plain Ruby file to append a bare +"end" on the following line. + + *rails-abolish* +Among the many features of |abolish| on vim.org is the ability to change the +inflection of the word under the cursor. For example, one can hit crs to +change from MixedCase to snake_case. This plugin adds two additional +inflections: crl for alternating between the singular and plural, and crt for +altering between tableize and classify. The latter is useful in changing +constructs like BlogPost.all to current_user.blog_posts.all and vice versa. + + *rails-cream* +This plugin provides a few additional key bindings if it is running under +Cream, the user friendly editor which uses Vim as a back-end. Ctrl+Enter +finds the file under the cursor (as in |rails-gf|), and Alt+[ and Alt+] find +the alternate (|rails-alternate|) and related (|rails-related|) files. + + *rails-menu* +If the GUI is running, a menu for several commonly used features is provided. +Also on this menu is a list of recently accessed projects. This list of +projects can persist across restarts if a 'viminfo' flag is set to enable +retaining certain global variables. If this interests you, add something like +the following to your vimrc: > + set viminfo^=! +< +Integration with the Rails Universe ~ + *rails-rails-integration* +The general policy of rails.vim is to focus exclusively on the Ruby on Rails +core. Supporting plugins and other add-ons to Rails has the potential to +rapidly get out of hand. However, a few pragmatic exceptions have been made. + + *rails-template-types* +Commands like :Rview use a hardwired list of extensions (erb, rjs, etc.) +when searching for files. In order to facilitate working with non-standard +template types, several popular extensions are featured in this list, +including haml, liquid, and mab (markaby). These extensions will disappear +once a related configuration option is added to rails.vim. + + *rails-rspec* +The presence of a spec directory causes several additional behaviors to +activate. :A knows about specs and will jump to them (but Test::Unit files +still get priority). The associated controller or model of a spec is +detected, so all navigation commands should work as expected inside a spec +file. :Rake in a spec runs just that spec, and in a model, controller, or +helper, runs the associated spec. + +|:Runittest| and |:Rfunctionaltest| lead double lives, handling model and +controller specs respectively. For helper and view specs, you can use +|:Rspec| or define your own navigation commands: +> + Rnavcommand spechelper spec/helpers -glob=**/* + \ -suffix=_helper_spec.rb -default=controller() + Rnavcommand specview spec/views -glob=**/* -suffix=_spec.rb +< +ABBREVIATIONS *rails-abbreviations* *rails-snippets* + +Abbreviations are "snippets lite". They may later be extracted into a +separate plugin, or removed entirely. + + *rails-:Rabbrev* +:Rabbrev List all Rails abbreviations. + +:Rabbrev {abbr} {expn} [{extra}] + Define a new Rails abbreviation. {extra} is permitted + if and only if {expn} ends with "(". + + *rails-:Rabbrev!* +:Rabbrev! {abbr} Remove an abbreviation. + +Rails abbreviations differ from regular abbreviations in that they only expand +after a <C-]> (see |i_CTRL-]|) or a <Tab> (if <Tab> does not work, it is +likely mapped by another plugin). If the abbreviation ends in certain +punctuation marks, additional expansions are possible. A few examples will +hopefully clear this up (all of the following are enabled by default in +appropriate file types). + +Command Sequence typed Resulting text ~ +Rabbrev rp( render :partial\ => rp( render(:partial => +Rabbrev rp( render :partial\ => rp<Tab> render :partial => +Rabbrev vs( validates_size_of vs( validates_size_of( +Rabbrev pa[ params pa[:id] params[:id] +Rabbrev pa[ params pa<C-]> params +Rabbrev pa[ params pa.inspect params.inspect +Rabbrev AR:: ActionRecord AR::Base ActiveRecord::Base +Rabbrev :a :action\ =>\ render :a<Tab> render :action => + +In short, ( expands on (, :: expands on . and :, and [ expands on . and [. +These trailing punctuation marks are NOT part of the final abbreviation, and +you cannot have two mappings that differ only by punctuation. + +You must escape spaces in your expansion, either as "\ " or as "<Space>". For +an abbreviation ending with "(", you may define where to insert the +parenthesis by splitting the expansion into two parts (divided by an unescaped +space). + +Many abbreviations are provided by default: use :Rabbrev to list them. They +vary depending on the type of file (models have different abbreviations than +controllers). There is one "smart" abbreviation, :c, which expands to +":controller => ", ":collection => ", or ":conditions => " depending on +context. + +SYNTAX HIGHLIGHTING *rails-syntax* + +Syntax highlighting is by and large a transparent process. For the full +effect, however, you need a colorscheme which accentuates rails.vim +extensions. One such colorscheme is vividchalk, available from vim.org. + +The following is a summary of the changes made by rails.vim to the standard +syntax highlighting. + + *rails-syntax-keywords* +Rails specific keywords are highlighted in a filetype specific manner. For +example, in a model, has_many is highlighted, whereas in a controller, +before_filter is highlighted. A wide variety of syntax groups are used but +they all link by default to railsMethod. + +If you feel a method has been wrongfully omitted, submit it to the +|rails-plugin-author|. + + *rails-syntax-classes* +Models, helpers, and controllers are given special highlighting. Depending on +the version of Vim installed, you may need a rails.vim aware colorscheme in +order to see this. Said colorscheme needs to provide highlighting for the +railsUserClass syntax group. + +The class names are determined by camelizing filenames from certain +directories of your application. If app/models/line_item.rb exists, the class +"LineItem" will be highlighted. + +The list of classes is refreshed automatically after certain commands like +|:Rgenerate|. Use |:Rrefresh| to trigger the process manually. + + *rails-syntax-assertions* +If you define custom assertions in test_helper.rb, these will be highlighted +in your tests. These are found by scanning test_helper.rb for lines of the +form " def assert_..." and extracting the method name. The railsUserMethod +syntax group is used. The list of assertions can be refreshed with +|:Rrefresh|. + + *rails-syntax-strings* +In the following line of code, the "?" in the conditions clause and the "ASC" +in the order clause will be highlighted: > + Post.find(:all, :conditions => ["body like ?","%e%"], :order => "title ASC") +< +A string literal using %Q<> or %<> delimiters will have its contents +highlighted as HTML. This is sometimes useful when writing helpers. > + link = %<<a href="http://www.vim.org">Vim</a>> +< + *rails-syntax-yaml* +YAML syntax highlighting has been extended to highlight eRuby, which can be +used in most Rails YAML files (including database.yml and fixtures). + +MANAGED VIM OPTIONS *rails-options* + +The following options are set local to buffers where the plugin is active. + + *rails-'shiftwidth'* *rails-'sw'* + *rails-'softtabstop'* *rails-'sts'* + *rails-'expandtab'* *rails-'et'* +A value of 2 is used for 'shiftwidth' (and 'softtabstop'), and 'expandtab' is +enabled. This is a strong convention in Rails, so the conventional wisdom +that this is a user preference has been ignored. + + *rails-'path'* *rails-'pa'* +All the relevant directories from your application are added to your 'path'. +This makes it easy to access a buried file: > + :find blog_controller.rb +< + *rails-'suffixesadd'* *rails-'sua'* +This is filetype dependent, but typically includes .rb, .rake, and several +others. This allows shortening the above example: > + :find blog_controller +< + *rails-'includeexpr'* *rails-'inex'* +The 'includeexpr' option is set to enable the magic described in |rails-gf|. + + *rails-'filetype'* *rails-'ft'* +The 'filetype' is sometimes adjusted for Rails files. Most notably, *.rxml +and *.rjs are treated as Ruby files, and files that have been falsely +identified as Mason sources are changed back to eRuby files (but only when +they are part of a Rails application). + + *rails-'completefunc'* *rails-'cfu'* +A 'completefunc' is provided (if not already set). It is very simple, as it +uses syntax highlighting to make its guess. See |i_CTRL-X_CTRL-U|. + +CONFIGURATION *rails-configuration* + +Very little configuration is actually required; this plugin automatically +detects your Rails application and adjusts Vim sensibly. + + *rails-:autocmd* *rails-autocommands* +If you would like to set your own custom Vim settings whenever a Rails file is +loaded, you can use an autocommand like the following in your vimrc: > + autocmd User Rails silent! Rlcd + autocmd User Rails map <buffer> <F9> :Rake<CR> +You can also have autocommands that only apply to certain types of files. +These are based off the information shown when running the |:Rails!| +command, with hyphens changed to periods. A few examples: > + autocmd User Rails.controller* iabbr <buffer> wsn wsdl_service_name + autocmd User Rails.model.arb* iabbr <buffer> vfo validates_format_of + autocmd User Rails.view.erb* imap <buffer> <C-Z> <%= %><C-O>3h +End all such Rails autocommands with asterisks, even if you have an exact +specification, to allow for more specific subtypes to be added in the future. +There is also a filename matching syntax: > + autocmd User Rails/config/environment.rb Rabbrev c config + autocmd User Rails/**/foo_bar.rb Rabbrev FB:: FooBar +Use the filetype based syntax whenever possible, reserving the filename based +syntax for more advanced cases. + + *macros/rails.vim* +If you have several commands to run on initialization for all file types, they +can be placed in a "macros/rails.vim" file in the 'runtimepath' (for example, +"~/.vim/macros/rails.vim"). This file is sourced by rails.vim each time a +Rails file is loaded. + + *config/rails.vim* +If you have settings particular to a specific project, they can be put in a +config/rails.vim file in the root directory of the application. The file is +sourced in the |sandbox| for security reasons. + + *rails-:Rset* +:Rset {option}[={value}] + Query or set a local option. This command may be + called directly, from an autocommand, or from + config/rails.vim. + +Options may be set in one of four scopes, which may be indicated by an +optional prefix. These scopes determine how broadly an option will apply. +Generally, the default scope is sufficient. + +Scope Description ~ +a: All files in one Rails application +b: Buffer (file) specific +g: Global to all applications +l: Local to method (same as b: in non-Ruby files) + +Options are shown below with their default scope, which should be omitted. +While you may override the scope with a prefix, this is rarely necessary and +oftentimes useless. (For example, setting g:task is useless because the +default rake task will apply before considering this option.) + +Option Meaning ~ +b:alternate Custom alternate file for :A, relative to the Rails root +b:controller Default controller for certain commands (e.g., :Rhelper) +b:model Default model for certain commands (e.g., :Rfixtures) +l:related Custom related file for :R, relative to the Rails root +a:root_url Root URL for commands like :Rpreview + +Examples: > + :Rset root_url=http://localhost:12345 + :Rset related=app/views/blog/edit.html.erb +< + *rails-modelines* +If |g:rails_modelines| is enabled, these options can also be set from +modelines near the beginning or end of the file. These modelines will always +set buffer-local options; scope should never be specified. Examples: > + # Rset task=db:schema:load + <%# Rset alternate=app/views/layouts/application.html.erb %> +Modelines can also be local to a method. Example: > + def test_comment + # rset alternate=app/models/comment.rb +These two forms differ only in case. + +Modelines are deprecated. + +GLOBAL SETTINGS *rails-global-settings* + +A few global variables control the behavior of this plugin. In general, they +can be enabled by setting them to 1 in your vimrc, and disabled by setting +them to 0. > + let g:rails_some_option=1 + let g:rails_some_option=0 +Most of these seldom need to be used. So seldom, in fact, that you should +notify the |rails-plugin-author| if you find any of them useful, as nearly all +are being considered for removal. + + *g:loaded_rails* > + let g:loaded_rails=1 +Set this include guard to prevent the plugin from being loaded. + + *g:rails_abbreviations* +Enable Rails abbreviations. See |rails-abbreviations|. Enabled by default. + + *g:rails_ctags_arguments* > + let g:rails_ctags_arguments='--languages=-javascript' +Additional arguments to pass to ctags from |:Rtags|. Defaults to ignoring +JavaScript files, since ctags has a tendency to choke on those. + + *g:rails_default_file* > + let g:rails_default_file='config/database.yml' +File to load when a new Rails application is created. Defaults to the README. + + *rails-screen* *g:rails_gnu_screen* > + let g:rails_gnu_screen=1 +Use GNU Screen or Tmux (if it is running) to launch |:Rscript| console and +|:Rserver| in the background. Enabled by default. + + *g:rails_history_size* > + let g:rails_history_size=5 +Number of projects to remember. Set to 0 to disable. See |rails-menu| for +information on retaining these projects across a restart. + + *g:rails_mappings* > + let g:rails_mappings=1 +Enables a few mappings (mostly for |rails-navigation|). Enabled by default. + + *g:rails_modelines* > + let g:rails_modelines=1 +Enable modelines like the following: > + # Rset task=db:schema:load +Modelines set buffer-local options using the :Rset command. +Also enables method specific modelines (note the case difference): > + def show + # rset preview=blog/show/1 +Modelines are deprecated and disabled by default. + + *g:rails_menu* > + let g:rails_menu=1 +When 2, a Rails menu is created. When 1, this menu is a submenu under the +Plugin menu. The default is 0, as the menu is slated for removal from future +versions of rails.vim. + + *g:rails_url* > + let g:rails_url='http://localhost:3000/' +Used for the |:Rpreview| command. Default is as shown above. Overridden by +b:rails_url. + + *g:rails_syntax* > + let g:rails_syntax=1 +When enabled, this tweaks the syntax highlighting to be more Rails friendly. +Enabled by default. See |rails-syntax|. + + *rails-tabs* *g:rails_tabstop* > + let g:rails_tabstop=4 +This option now requires the plugin railstab.vim from vim.org: + http://www.vim.org/scripts/script.php?script_id=2253 + +If your goal is simply just override this plugin's settings and use your own +custom 'shiftwidth', adjust things manually in an autocommand: > + autocmd User Rails set sw=4 sts=4 noet +This is highly discouraged: don't fight Rails. + +ABOUT *rails-about* *rails-plugin-author* + +This plugin was written by Tim Pope. Email all comments, complaints, and compliments to him at vim at tpope. org. + +The latest stable version can be found at + http://www.vim.org/scripts/script.php?script_id=1567 + +Bugs can be reported and the very latest development version can be retrieved +from GitHub: + https://github.com/tpope/vim-rails + git clone git://github.com/tpope/vim-rails.git + + *rails-license* +Copyright (c) Tim Pope. Distributed under the same terms as Vim itself. +See |license|. + + vim:tw=78:ts=8:ft=help:norl: diff --git a/vim/doc/showmarks.txt b/vim/doc/showmarks.txt new file mode 100644 index 0000000..96dc1e1 --- /dev/null +++ b/vim/doc/showmarks.txt @@ -0,0 +1,264 @@ +*showmarks.txt* Visually show the location of marks + + By Anthony Kruize <trandor@labyrinth.net.au> + Michael Geddes <michaelrgeddes@optushome.com.au> + + +ShowMarks provides a visual representation of |marks| local to a buffer. +Marks are useful for jumping back and forth between interesting points in a +buffer, but can be hard to keep track of without any way to see where you have +placed them. + +ShowMarks hopefully makes life easier by placing a |sign| in the +leftmost column of the buffer. The sign indicates the label of the mark and +its location. + +ShowMarks is activated by the |CursorHold| |autocommand| which is triggered +every |updatetime| milliseconds. This is set to 4000(4 seconds) by default. +If this is too slow, setting it to a lower value will make it more responsive. + +Note: This plugin requires Vim 6.x compiled with the |+signs| feature. + +=============================================================================== +1. Contents *showmarks* *showmarks-contents* + + 1. Contents |showmarks-contents| + 2. Configuration |showmarks-configuration| + 3. Highlighting |showmarks-highlighting| + 4. Key mappings |showmarks-mappings| + 5. Commands |showmarks-commands| + 6. ChangeLog |showmarks-changelog| + + Appendix + A. Using marks |marks| + B. Using signs |sign| + C. Defining updatetime |updatetime| + D. Defining a mapleader |mapleader| + E. Defining highlighting |highlight| + +=============================================================================== +2. Configuration *showmarks-configuration* + +ShowMarks can be configured to suit your needs. +The following options can be added to your |vimrc| to change how ShowMarks +behaves: + + *'showmarks_enable'* +'showmarks_enable' boolean (default: 1) + global + This option enables or disables ShowMarks on startup. Normally ShowMarks + will be enabled when Vim starts, setting this to 0 will disable ShowMarks + by default. + ShowMarks can be turned back on using the |ShowMarksToggle| command. + + *'showmarks_include'* +'showmarks_include' string (default: +"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.'`^<>[]{}()\"") + global or local to buffer + This option specifies which marks will be shown and in which order if + placed on the same line. Marks earlier in the list take precedence over + marks later in the list. + This option can also be specified as a buffer option which will override + the global version. + + NOTE: When including the " mark, it must be escaped with a \. + + For example to only include marks 'abcdefzxABHJio', in that order: +> + let g:showmarks_include="abcdefzxABJio" +< + To override this for a particular buffer with 'ABCDhj.'^': +> + let b:showmarks_include="abcdefzxABJio" +< + *'showmarks_ignore_type'* +'showmarks_ignore_type' string (default: "hq") + global + This option defines which types of buffers should be ignored. + Each type is represented by a letter. This option is not case-sensitive. + Valid buffer types are: + - h : Help + - m : Non-modifiable + - p : Preview + - q : Quickfix + - r : Readonly + + For example to ignore help, preview and readonly files: +> + let g:showmarks_ignore_type="hpr" +< + *'showmarks_ignore_name'* +'showmarks_textlower' string (default: ">" ) + global + This option defines how the marks a-z will be displayed. + A maximum of two characters can be defined. + To include the mark in the text use a tab(\t) character. A single + character will display as the mark with the character suffixed (same as + "\t<character>"). Specifying two characters will simply display those two + characters. + + Some examples: + To display the mark with a > suffixed: > + let g:showmarks_textlower="\t>" +< or > + let g:showmarks_textlower=">" +< + To display the mark with a ( prefixed: > + let g:showmarks_textlower="(\t" +< + To display two > characters: > + let g:showmarks_textlower=">>" +< + *'showmarks_textupper'* +'showmarks_textupper' string (default: ">") + global + This option defines how the marks A-Z will be displayed. It behaves the same + as the |'showmarks_textlower'| option. + + *'showmarks_textother'* +'showmarks_textother' string (default: ">") + global + This option defines how all other marks will be displayed. It behaves the + same as the |'showmarks_textlower'| option. + +'showmarks_hlline_lower' boolean (default: 0) *'showmarks_hlline_lower'* + global + This option defines whether the entire line a lowercase mark is on will + be highlighted. + +'showmarks_hlline_upper' boolean (default: 0) *'showmarks_hlline_upper'* + global + This option defines whether the entire line an uppercase mark is on will + be highlighted. + +'showmarks_hlline_other' boolean (default: 0) *'showmarks_hlline_other'* + global + This option defines whether the entire line other marks are on will be + highlighted. + +=============================================================================== +3. Highlighting *showmarks-highlighting* + +Four highlighting groups are used by ShowMarks to define the colours used to +highlight each of the marks. + + - ShowMarksHLl : This group is used to highlight all the lowercase marks. + - ShowMarksHLu : This group is used to highlight all the uppercase marks. + - ShowMarksHLo : This group is used to highlight all other marks. + - ShowMarksHLm : This group is used when multiple marks are on the same line. + +You can define your own highlighting by overriding these groups in your |vimrc|. +For example: > + + highlight ShowMarksHLl guifg=red guibg=green +< +Will set all lowercase marks to be red on green when running in GVim. +See |highlight| for more information. + +=============================================================================== +4. Mappings *showmarks-mappings* + +The following mappings are setup by default: + + <Leader>mt - Toggles ShowMarks on and off. + <Leader>mo - Forces ShowMarks on. + <Leader>mh - Clears the mark at the current line. + <Leader>ma - Clears all marks in the current buffer. + <Leader>mm - Places the next available mark on the current line. + +(see |mapleader| for how to setup the mapleader variable.) + +=============================================================================== +5. Commands *showmarks-commands* + + *ShowMarksToggle* +:ShowMarksToggle + This command will toggle the display of marks on or off. + + +:ShowMarksOn *ShowMarksOn* + This command will force the display of marks on. + + *ShowMarksClearMark* +:ShowMarksClearMark + This command will clear the mark on the current line. + It doesn't actually remove the mark, it simply moves it to line 1 and + removes the sign. + + *ShowMarksClearAll* +:ShowMarksClearAll + This command will clear all marks in the current buffer. + It doesn't actually remove the marks, it simply moves them to line 1 and + removes the signs. + + *ShowMarksPlaceMark* +:ShowMarksPlaceMark + This command will place the next available mark on the current line. This + effectively automates mark placement so you don't have to remember which + marks are placed or not. Hidden marks are considered to be available. + NOTE: Only marks a-z are supported by this function. + +=============================================================================== +6. ChangeLog *showmarks-changelog* + +2.2 - 2004-08-17 + Fixed highlighting of the A-Z marks when ignorecase is on. (Mike Kelly) + Fixed the delay with ShowMarks triggering when entering a buffer for the + first time. (Mikolaj Machowski) + Added support for highlighting the entire line where a mark is placed. + Now uses HelpExtractor by Charles E. Campbell to install the help file. + +2.1 - 2004-03-04 + Added ShowMarksOn. It forces ShowMarks to be enabled whether it's on or not. + (Gary Holloway) + Marks now have a definable order of precedence for when mulitple alpha marks + have been placed on the same line. A new highlight group, ShowMarksHLm is + used to identify this situation. (Gary Holloway) + - showmarks_include has changed accordingly. + - ShowMarksHL is now ShowMarksHLl. + ShowMarksPlaceMark now places marks in the order specified by + showmarks_include. (Gary Holloway) + showmarks_include can now be specified per buffer. (Gary Holloway) + +2.0 - 2003-08-11 + Added ability to ignore buffers by type. + Fixed toggling ShowMarks off when switching buffers. + ShowMarksHideMark and ShowMarksHideAll have been renamed to + ShowMarksClearMark and ShowMarksClearAll. + Marks a-z, A-Z and others now have different highlighting from each other. + Added support for all other marks. (Gary Holloway) + Enhanced customization of how marks are displayed by allowing a prefix to + be specified.(Gary Holloway & Anthony Kruize) + Fixed CursorHold autocmd triggering even when ShowMarks is disabled. + (Charles E. Campbell) + +1.5 - 2002-07-16 + Added ability to customize how the marks are displayed. + +1.4 - 2002-05-29 + Added support for placing the next available mark. + (Thanks to Shishir Ramam for the idea) + Added support for hiding all marks. + Marks on line 1 are no longer shown. This stops hidden marks from + reappearing when the file is opened again. + Added a help file. + +1.3 - 2002-05-20 + Fixed toggling ShowMarks not responding immediately. + Added user commands for toggling/hiding marks. + Added ability to disable ShowMarks by default. + +1.2 - 2002-03-06 + Added a check that Vim was compiled with +signs support. + Added the ability to define which marks are shown. + Removed debugging code that was accidently left in. + +1.1 - 2002-02-05 + Added support for the A-Z marks. + Fixed sign staying placed if the line it was on is deleted. + Clear autocommands before making new ones. + +1.0 - 2001-11-20 + First release. + +vim:tw=78:ts=8:ft=help diff --git a/vim/doc/snipMate.txt b/vim/doc/snipMate.txt new file mode 100644 index 0000000..521235d --- /dev/null +++ b/vim/doc/snipMate.txt @@ -0,0 +1,322 @@ +*snipMate.txt* Plugin for using TextMate-style snippets in Vim. + +snipMate *snippet* *snippets* *snipMate* +Last Change: December 27, 2009 + +|snipMate-description| Description +|snipMate-syntax| Snippet syntax +|snipMate-usage| Usage +|snipMate-settings| Settings +|snipMate-features| Features +|snipMate-disadvantages| Disadvantages to TextMate +|snipMate-contact| Contact +|snipMate-license| License + +For Vim version 7.0 or later. +This plugin only works if 'compatible' is not set. +{Vi does not have any of these features.} + +============================================================================== +DESCRIPTION *snipMate-description* + +snipMate.vim implements some of TextMate's snippets features in Vim. A +snippet is a piece of often-typed text that you can insert into your +document using a trigger word followed by a <tab>. + +For instance, in a C file using the default installation of snipMate.vim, if +you type "for<tab>" in insert mode, it will expand a typical for loop in C: > + + for (i = 0; i < count; i++) { + + } + + +To go to the next item in the loop, simply <tab> over to it; if there is +repeated code, such as the "i" variable in this example, you can simply +start typing once it's highlighted and all the matches specified in the +snippet will be updated. To go in reverse, use <shift-tab>. + +============================================================================== +SYNTAX *snippet-syntax* + +Snippets can be defined in two ways. They can be in their own file, named +after their trigger in 'snippets/<filetype>/<trigger>.snippet', or they can be +defined together in a 'snippets/<filetype>.snippets' file. Note that dotted +'filetype' syntax is supported -- e.g., you can use > + + :set ft=html.eruby + +to activate snippets for both HTML and eRuby for the current file. + +The syntax for snippets in *.snippets files is the following: > + + snippet trigger + expanded text + more expanded text + +Note that the first hard tab after the snippet trigger is required, and not +expanded in the actual snippet. The syntax for *.snippet files is the same, +only without the trigger declaration and starting indentation. + +Also note that snippets must be defined using hard tabs. They can be expanded +to spaces later if desired (see |snipMate-indenting|). + +"#" is used as a line-comment character in *.snippets files; however, they can +only be used outside of a snippet declaration. E.g.: > + + # this is a correct comment + snippet trigger + expanded text + snippet another_trigger + # this isn't a comment! + expanded text +< +This should hopefully be obvious with the included syntax highlighting. + + *snipMate-${#}* +Tab stops ~ + +By default, the cursor is placed at the end of a snippet. To specify where the +cursor is to be placed next, use "${#}", where the # is the number of the tab +stop. E.g., to place the cursor first on the id of a <div> tag, and then allow +the user to press <tab> to go to the middle of it: + > + snippet div + <div id="${1}"> + ${2} + </div> +< + *snipMate-placeholders* *snipMate-${#:}* *snipMate-$#* +Placeholders ~ + +Placeholder text can be supplied using "${#:text}", where # is the number of +the tab stop. This text then can be copied throughout the snippet using "$#", +given # is the same number as used before. So, to make a C for loop: > + + snippet for + for (${2:i}; $2 < ${1:count}; $1++) { + ${4} + } + +This will cause "count" to first be selected and change if the user starts +typing. When <tab> is pressed, the "i" in ${2}'s position will be selected; +all $2 variables will default to "i" and automatically be updated if the user +starts typing. +NOTE: "$#" syntax is used only for variables, not for tab stops as in TextMate. + +Variables within variables are also possible. For instance: > + + snippet opt + <option value="${1:option}">${2:$1}</option> + +Will, as usual, cause "option" to first be selected and update all the $1 +variables if the user starts typing. Since one of these variables is inside of +${2}, this text will then be used as a placeholder for the next tab stop, +allowing the user to change it if he wishes. + +To copy a value throughout a snippet without supplying default text, simply +use the "${#:}" construct without the text; e.g.: > + + snippet foo + ${1:}bar$1 +< *snipMate-commands* +Interpolated Vim Script ~ + +Snippets can also contain Vim script commands that are executed (via |eval()|) +when the snippet is inserted. Commands are given inside backticks (`...`); for +TextMates's functionality, use the |system()| function. E.g.: > + + snippet date + `system("date +%Y-%m-%d")` + +will insert the current date, assuming you are on a Unix system. Note that you +can also (and should) use |strftime()| for this example. + +Filename([{expr}] [, {defaultText}]) *snipMate-filename* *Filename()* + +Since the current filename is used often in snippets, a default function +has been defined for it in snipMate.vim, appropriately called Filename(). + +With no arguments, the default filename without an extension is returned; +the first argument specifies what to place before or after the filename, +and the second argument supplies the default text to be used if the file +has not been named. "$1" in the first argument is replaced with the filename; +if you only want the filename to be returned, the first argument can be left +blank. Examples: > + + snippet filename + `Filename()` + snippet filename_with_default + `Filename('', 'name')` + snippet filename_foo + `filename('$1_foo')` + +The first example returns the filename if it the file has been named, and an +empty string if it hasn't. The second returns the filename if it's been named, +and "name" if it hasn't. The third returns the filename followed by "_foo" if +it has been named, and an empty string if it hasn't. + + *multi_snip* +To specify that a snippet can have multiple matches in a *.snippets file, use +this syntax: > + + snippet trigger A description of snippet #1 + expand this text + snippet trigger A description of snippet #2 + expand THIS text! + +In this example, when "trigger<tab>" is typed, a numbered menu containing all +of the descriptions of the "trigger" will be shown; when the user presses the +corresponding number, that snippet will then be expanded. + +To create a snippet with multiple matches using *.snippet files, +simply place all the snippets in a subdirectory with the trigger name: +'snippets/<filetype>/<trigger>/<name>.snippet'. + +============================================================================== +USAGE *snipMate-usage* + + *'snippets'* *g:snippets_dir* +Snippets are by default looked for any 'snippets' directory in your +'runtimepath'. Typically, it is located at '~/.vim/snippets/' on *nix or +'$HOME\vimfiles\snippets\' on Windows. To change that location or add another +one, change the g:snippets_dir variable in your |.vimrc| to your preferred +directory, or use the |ExtractSnips()|function. This will be used by the +|globpath()| function, and so accepts the same syntax as it (e.g., +comma-separated paths). + +ExtractSnipsFile({directory}, {filetype}) *ExtractSnipsFile()* *.snippets* + +ExtractSnipsFile() extracts the specified *.snippets file for the given +filetype. A .snippets file contains multiple snippet declarations for the +filetype. It is further explained above, in |snippet-syntax|. + +ExtractSnips({directory}, {filetype}) *ExtractSnips()* *.snippet* + +ExtractSnips() extracts *.snippet files from the specified directory and +defines them as snippets for the given filetype. The directory tree should +look like this: 'snippets/<filetype>/<trigger>.snippet'. If the snippet has +multiple matches, it should look like this: +'snippets/<filetype>/<trigger>/<name>.snippet' (see |multi_snip|). + +ResetAllSnippets() *ResetAllSnippets()* +ResetAllSnippets() removes all snippets from memory. This is useful to put at +the top of a snippet setup file for if you would like to |:source| it multiple +times. + +ResetSnippets({filetype}) *ResetSnippets()* +ResetSnippets() removes all snippets from memory for the given filetype. + +ReloadAllSnippets() *ReloadAllSnippets()* +ReloadAllSnippets() reloads all snippets for all filetypes. This is useful for +testing and debugging. + +ReloadSnippets({filetype}) *ReloadSnippets()* +ReloadSnippets() reloads all snippets for the given filetype. + + *list-snippets* *i_CTRL-R_<Tab>* +If you would like to see what snippets are available, simply type <c-r><tab> +in the current buffer to show a list via |popupmenu-completion|. + +============================================================================== +SETTINGS *snipMate-settings* *g:snips_author* + +The g:snips_author string (similar to $TM_FULLNAME in TextMate) should be set +to your name; it can then be used in snippets to automatically add it. E.g.: > + + let g:snips_author = 'Hubert Farnsworth' + snippet name + `g:snips_author` +< + *snipMate-expandtab* *snipMate-indenting* +If you would like your snippets to be expanded using spaces instead of tabs, +just enable 'expandtab' and set 'softtabstop' to your preferred amount of +spaces. If 'softtabstop' is not set, 'shiftwidth' is used instead. + + *snipMate-remap* +snipMate does not come with a setting to customize the trigger key, but you +can remap it easily in the two lines it's defined in the 'after' directory +under 'plugin/snipMate.vim'. For instance, to change the trigger key +to CTRL-J, just change this: > + + ino <tab> <c-r>=TriggerSnippet()<cr> + snor <tab> <esc>i<right><c-r>=TriggerSnippet()<cr> + +to this: > + ino <c-j> <c-r>=TriggerSnippet()<cr> + snor <c-j> <esc>i<right><c-r>=TriggerSnippet()<cr> + +============================================================================== +FEATURES *snipMate-features* + +snipMate.vim has the following features among others: + - The syntax of snippets is very similar to TextMate's, allowing + easy conversion. + - The position of the snippet is kept transparently (i.e. it does not use + markers/placeholders written to the buffer), which allows you to escape + out of an incomplete snippet, something particularly useful in Vim. + - Variables in snippets are updated as-you-type. + - Snippets can have multiple matches. + - Snippets can be out of order. For instance, in a do...while loop, the + condition can be added before the code. + - [New] File-based snippets are supported. + - [New] Triggers after non-word delimiters are expanded, e.g. "foo" + in "bar.foo". + - [New] <shift-tab> can now be used to jump tab stops in reverse order. + +============================================================================== +DISADVANTAGES *snipMate-disadvantages* + +snipMate.vim currently has the following disadvantages to TextMate's snippets: + - There is no $0; the order of tab stops must be explicitly stated. + - Placeholders within placeholders are not possible. E.g.: > + + '<div${1: id="${2:some_id}}">${3}</div>' +< + In TextMate this would first highlight ' id="some_id"', and if + you hit delete it would automatically skip ${2} and go to ${3} + on the next <tab>, but if you didn't delete it it would highlight + "some_id" first. You cannot do this in snipMate.vim. + - Regex cannot be performed on variables, such as "${1/.*/\U&}" + - Placeholders cannot span multiple lines. + - Activating snippets in different scopes of the same file is + not possible. + +Perhaps some of these features will be added in a later release. + +============================================================================== +CONTACT *snipMate-contact* *snipMate-author* + +To contact the author (Michael Sanders), please email: + msanders42+snipmate <at> gmail <dot> com + +I greatly appreciate any suggestions or improvements offered for the script. + +============================================================================== +LICENSE *snipMate-license* + +snipMate is released under the MIT license: + +Copyright 2009-2010 Michael Sanders. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +The software is provided "as is", without warranty of any kind, express or +implied, including but not limited to the warranties of merchantability, +fitness for a particular purpose and noninfringement. In no event shall the +authors or copyright holders be liable for any claim, damages or other +liability, whether in an action of contract, tort or otherwise, arising from, +out of or in connection with the software or the use or other dealings in the +software. + +============================================================================== + +vim:tw=78:ts=8:ft=help:norl: diff --git a/vim/doc/solarized.txt b/vim/doc/solarized.txt new file mode 100644 index 0000000..93ebd68 --- /dev/null +++ b/vim/doc/solarized.txt @@ -0,0 +1,254 @@ +*solarized.vim* for Vim version 7.3 or newer. Modified: 2011 May 05 + + + Solarized Vim Colorscheme by Ethan Schoonover ~ + +Solarized Colorscheme *solarized* + *solarized-help* + *solarized-colors* + *solarized-colorscheme* + *vim-colors-solarized* + +Solarized is a carefully designed selective contrast colorscheme with dual +light and dark modes that runs in both GUI, 256 and 16 color modes. + +See the homepage at http://ethanschoonover.com/solarized for screenshots and +details. + +0. Install |solarized-install| +1. Solarized Menu |solarized-menu| +2. Options |solarized-options| +3. Toggle Background |solarized-togglebg| +4. Terminal Issues |solarized-term| + +============================================================================== +0. Install *solarized-install* + +Note: I recommend using Tim Pope's pathogen plugin to install this +colorscheme. See https://github.com/tpope/vim-pathogen . If you've installed +pathogen properly you can install Solarized with the following commands, +followed by the .vimrc configuration below. + + $ cd ~/.vim/bundle + $ git clone https://github.com/altercation/vim-colors-solarized.git + +If you aren't using pathogen, you can use the following three steps to install +Solarized: + +1. Download the solarized distribution (available on the homepage above) + and unarchive the file. + +2. Move `solarized.vim` to your `.vim/colors` directory. + +3. Move each of the files in each subdirectories to the corresponding .vim + subdirectory (e.g. autoload/togglebg.vim goes into your .vim/autoload + directory as .vim/autoload/togglebg.vim). + + +After installation, place the following lines in your .vimrc: + + syntax enable + set background=dark + colorscheme solarized + +or, for the light background mode of Solarized: + + syntax enable + set background=light + colorscheme solarized + +============================================================================== +1. Solarized Menu *solarized-menu* + +Solarized makes available a menu when used in Vim GUI mode (gvim, macvim). +This menu includes many of the options detailed below so that you can test out +different values quickly without modifying your .vimrc file. If you wish to +turn off this menu permanently, simply place the following line in your .vimrc +above the "colorscheme solarized" line. + + let g:solarized_menu=0 + +============================================================================== +2. Toggle Background *solarized-togglebg* + *toggle-bg* *togglebg* + *toggle-background* + +Solarized comes with Toggle Background, a simple plugin to switch between +light and dark background modes and reset the colorscheme. This is most useful +for colorschemes that support both light and dark modes and in terminals or +gui vim windows where the background will be properly set. + +Toggle Background can be accessed by: + + * the Solarized menu (in Vim gui mode) + * the Window menu (in Vim gui mode, even if the Solarized menu is off) + * the "yin/yang" toolbar button (in Vim gui mode) + * the default mapping of <F5> + * custom key mapping you set in your .vimrc (see below) + * command line via ":ToggleBG" (no quotes) + +Toggle Background starts with a default mapping to function key <F5>. If you +are already using this in a mapping, Toggle Background will not map itself to +a default and you will have to map it manually in your .vimrc file, or +remove/change your existing <F5> mapping to another value. To customize the +keyboard mapping in your .vimrc file, use the following line, changing the +"<F5>" value to the key or key combination you wish to use: + + call togglebg#map("<F5>") + +Note that you'll want to use a single function key or equivalent if you want +the plugin to work in all modes (normal, insert, visual). + +When using the plugin during normal, visual, or insert mode, there should be +no interruption in workflow. However, if you activate the plugin during +REPLACE mode, you will switch to standard insert mode (you will leave the +overwrite replace mode). + +============================================================================== +3. Solarized Terminal Issues *solarized-term* + +If you are going to use Solarized in Terminal mode (i.e. not in a GUI version +like gvim or macvim), **please please please** consider setting your terminal +emulator's colorscheme to used the Solarized palette. I've included palettes +for some popular terminal emulator as well as Xdefaults in the official +Solarized download available from the Solarized homepage listed at the top of +this help document. If you use Solarized *without* these colors, Solarized +will need to be told to degrade its colorscheme to a set compatible with the +limited 256 terminal palette (whereas by using the terminal's 16 ansi color +values, you can set the correct, specific values for the Solarized palette). + +If you do use the custom terminal colors, solarized.vim should work out of +the box for you. If you are using a terminal emulator that supports 256 +colors and don't want to use the custom Solarized terminal colors, you will +need to use the degraded 256 colorscheme. To do so, simply add the following +line *before* the `colorschem solarized` line: + + let g:solarized_termcolors=256 + +Again, I recommend just changing your terminal colors to Solarized values +either manually or via one of the many terminal schemes available for import. + +============================================================================== +4. Solarized Options *solarized-options* + + +AUTOGENERATE OPTIONS + +You can easily modify and experiment with Solarized display options using the +Solarized menu when using Vim in gui mode. Once you have things set to your +liking, you can autogenerate the current option list in a format ready for +insertion into your .vimrc file using the Solarized menu "Autogenerate +Options" command or at the command line with: + + :SolarizedOptions + + +OPTION LIST + +Set these in your vimrc file prior to calling the colorscheme. + +option name default optional +------------------------------------------------ +g:solarized_termcolors= 16 | 256 +g:solarized_termtrans = 0 | 1 +g:solarized_degrade = 0 | 1 +g:solarized_bold = 1 | 0 +g:solarized_underline = 1 | 0 +g:solarized_italic = 1 | 0 +g:solarized_contrast = "normal"| "high" or "low" +g:solarized_visibility= "normal"| "high" or "low" +g:solarized_hitrail = 0 | 1 +g:solarized_menu = 1 | 0 +------------------------------------------------ + + +OPTION DETAILS + +------------------------------------------------ +g:solarized_termcolors= 256 | 16 *'solarized_termcolors'* +------------------------------------------------ +The most important option if you are using vim in terminal (non gui) mode! +This tells Solarized to use the 256 degraded color mode if running in a 256 +color capable terminal. Otherwise, if set to `16` it will use the terminal +emulators colorscheme (best option as long as you've set the emulators colors +to the Solarized palette). + +If you are going to use Solarized in Terminal mode (i.e. not in a GUI +version like gvim or macvim), **please please please** consider setting your +terminal emulator's colorscheme to used the Solarized palette. I've included +palettes for some popular terminal emulator as well as Xdefaults in the +official Solarized download available from: +http://ethanschoonover.com/solarized . If you use Solarized without these +colors, Solarized will by default use an approximate set of 256 colors. It +isn't bad looking and has been extensively tweaked, but it's still not quite +the real thing. + +------------------------------------------------ +g:solarized_termtrans = 0 | 1 *'solarized_termtrans'* +------------------------------------------------ +If you use a terminal emulator with a transparent background and Solarized +isn't displaying the background color transparently, set this to 1 and +Solarized will use the default (transparent) background of the terminal +emulator. *urxvt* required this in my testing; iTerm2 did not. + +Note that on Mac OS X Terminal.app, solarized_termtrans is set to 1 by +default as this is almost always the best option. The only exception to this +is if the working terminfo file supports 256 colors (xterm-256color). + +------------------------------------------------ +g:solarized_degrade = 0 | 1 *'solarized_degrade'* +------------------------------------------------ +For test purposes only; forces Solarized to use the 256 degraded color mode +to test the approximate color values for accuracy. + +------------------------------------------------ +g:solarized_bold = 1 | 0 *'solarized_bold'* +------------------------------------------------ +------------------------------------------------ +g:solarized_underline = 1 | 0 *'solarized_underline'* +------------------------------------------------ +------------------------------------------------ +g:solarized_italic = 1 | 0 *'solarized_italic'* +------------------------------------------------ +If you wish to stop Solarized from displaying bold, underlined or +italicized typefaces, simply assign a zero value to the appropriate +variable, for example: `let g:solarized_italic=0` + +------------------------------------------------ +g:solarized_contrast = "normal"| "high" or "low" *'solarized_contrast'* +------------------------------------------------ +Stick with normal! It's been carefully tested. Setting this option to high +or low does use the same Solarized palette but simply shifts some values up +or down in order to expand or compress the tonal range displayed. + +------------------------------------------------ +g:solarized_visibility = "normal"| "high" or "low" *'solarized_visibility'* +------------------------------------------------ +Special characters such as trailing whitespace, tabs, newlines, when +displayed using ":set list" can be set to one of three levels depending on +your needs. + +------------------------------------------------ +g:solarized_hitrail = 0 | 1 *'solarized_hitrail'* +------------------------------------------------ +Visibility can make listchar entities more visible, but if one has set +cursorline on, these same listchar values standout somewhat less due to the +background color of the cursorline. g:solarized_hitrail enables highlighting +of trailing spaces (only one of the listchar types, but a particularly +important one) while in the cursoline in a different manner in order to make +them more visible. This may not work consistently as Solarized is using +a pattern match than can be overridden by a more encompassing syntax-native +match such as a comment line. + + +------------------------------------------------ +g:solarized_menu = 1 | 0 *'solarized_menu'* +------------------------------------------------ +Solarized includes a menu providing access to several of the above +display related options, including contrast and visibility. This allows +for an easy method of testing different values quickly before settling +on a final assignment for your .vimrc. If you wish to turn off this menu, +assign g:solarized_menu a value of 0. + + + vim:tw=78:noet:ts=8:ft=help:norl: diff --git a/vim/doc/supertab.txt b/vim/doc/supertab.txt new file mode 100644 index 0000000..038bcb5 --- /dev/null +++ b/vim/doc/supertab.txt @@ -0,0 +1,307 @@ +*supertab.txt* + +Authors: + Original: Gergely Kontra <kgergely@mcl.hu> + Current: Eric Van Dewoestine <ervandew@gmail.com> (as of version 0.4) + +Contributors: + Christophe-Marie Duquesne <chm.duquesne@gmail.com> (documentation) + +Please direct all correspondence to Eric. + +This plugin is licensed under the terms of the BSD License. Please see +supertab.vim for the license in its entirety. + +============================================================================== +Supertab *supertab* + +1. Introduction |supertab-intro| +2. Supertab Usage |supertab-usage| +3. Supertab Options |supertab-options| + Default completion type |supertab-defaultcompletion| + Secondary default completion type |supertab-contextdefault| + Completion contexts |supertab-completioncontexts| + Context text |supertab-contexttext| + Context Discover |supertab-contextdiscover| + Example |supertab-contextexample| + Completion Duration |supertab-duration| + Preventing Completion After/Before... |supertab-preventcomplete| + Changing default mapping |supertab-forwardbackward| + Inserting true tabs |supertab-mappingtabliteral| + Enhanced longest match support |supertab-longestenhanced| + Preselecting the first entry |supertab-longesthighlight| + +============================================================================== +1. Introduction *supertab-intro* + +Supertab is a plugin which allows you to perform all your insert completion +(|ins-completion|) using the tab key. + +Supertab requires Vim version 7.0 or above. + +============================================================================== +2. Supertab usage *supertab-usage* + +Using Supertab is as easy as hitting <Tab> or <S-Tab> (shift+tab) while in +insert mode, with at least one non whitespace character before the cursor, to +start the completion and then <Tab> or <S-Tab> again to cycle forwards or +backwards through the available completions. + +Example ('|' denotes the cursor location): + +bar +baz +b|<Tab> Hitting <Tab> here will start the completion, allowing you to + then cycle through the suggested words ('bar' and 'baz'). + +============================================================================== +3. Supertab Options *supertab-options* + +Supertab is configured via several global variables that you can set in your +|vimrc| file according to your needs. Below is a comprehensive list of +the variables available. + + +Default Completion Type *supertab-defaultcompletion* + *g:SuperTabDefaultCompletionType* + +g:SuperTabDefaultCompletionType (default value: "<c-p>") + +Used to set the default completion type. There is no need to escape this +value as that will be done for you when the type is set. + + Example: setting the default completion to 'user' completion: + + let g:SuperTabDefaultCompletionType = "<c-x><c-u>" + +Note: a special value of 'context' is supported which will result in +super tab attempting to use the text preceding the cursor to decide which +type of completion to attempt. Currently super tab can recognize method +calls or attribute references via '.', '::' or '->', and file path +references containing '/'. + + let g:SuperTabDefaultCompletionType = "context" + + /usr/l<tab> # will use filename completion + myvar.t<tab> # will use user completion if completefunc set, + # or omni completion if omnifunc set. + myvar-><tab> # same as above + +When using context completion, super tab will fall back to a secondary default +completion type set by |g:SuperTabContextDefaultCompletionType|. + +Note: once the buffer has been initialized, changing the value of this setting +will not change the default complete type used. If you want to change the +default completion type for the current buffer after it has been set, perhaps +in an ftplugin, you'll need to call SuperTabSetDefaultCompletionType like so, +supplying the completion type you wish to switch to: + + call SuperTabSetDefaultCompletionType("<c-x><c-u>") + + +Secondary default completion type *supertab-contextdefault* + *g:SuperTabContextDefaultCompletionType* + +g:SuperTabContextDefaultCompletionType (default value: "<c-p>") + +Sets the default completion type used when g:SuperTabDefaultCompletionType is +set to 'context' and no completion type is returned by any of the configured +contexts. + + +Completion contexts *supertab-completioncontexts* + *g:SuperTabCompletionContexts* + +g:SuperTabCompletionContexts (default value: ['s:ContextText']) + +Sets the list of contexts used for context completion. This value should +be a list of function names which provide the context implementation. + +When supertab starts the default completion, each of these contexts will be +consulted, in the order they were supplied, to determine the completion type +to use. If a context returns a completion type, that type will be used, +otherwise the next context in the list will be consulted. If after executing +all the context functions, no completion type has been determined, then the +value of g:SuperTabContextDefaultCompletionType will be used. + +Built in completion contexts: + + s:ContextText *supertab-contexttext* + + The text context will examine the text near the cursor to decide which type + of completion to attempt. Currently the text context can recognize method + calls or attribute references via '.', '::' or '->', and file path + references containing '/'. + + /usr/l<tab> # will use filename completion + myvar.t<tab> # will use user completion if completefunc set, or + # omni completion if omnifunc set. + myvar-><tab> # same as above + + Supported configuration attributes: + + g:SuperTabContextTextFileTypeExclusions + List of file types for which the text context will be skipped. + + g:SuperTabContextTextOmniPrecedence + List of omni completion option names in the order of precedence that they + should be used if available. By default, user completion will be given + precedence over omni completion, but you can use this variable to give + omni completion higher precedence by placing it first in the list. + + s:ContextDiscover *supertab-contextdiscover* + + This context will use the 'g:SuperTabContextDiscoverDiscovery' variable to + determine the completion type to use. It will evaluate each value, in the + order they were defined, until a variable evaluates to a non-zero or + non-empty value, then the associated completion type is used. + + Supported configuration properties: + + g:SuperTabContextDiscoverDiscovery + List of variable:completionType mappings. + + Example context configuration: *supertab-contextexample* + + let g:SuperTabCompletionContexts = ['s:ContextText', 's:ContextDiscover'] + let g:SuperTabContextTextOmniPrecedence = ['&omnifunc', '&completefunc'] + let g:SuperTabContextDiscoverDiscovery = + \ ["&completefunc:<c-x><c-u>", "&omnifunc:<c-x><c-o>"] + + In addition to the default completion contexts, you can plug in your own + implementation by creating a globally accessible function that returns + the completion type to use (eg. "\<c-x>\<c-u>"). + + function MyTagContext() + if filereadable(expand('%:p:h') . '/tags') + return "\<c-x>\<c-]>" + endif + " no return will result in the evaluation of the next + " configured context + endfunction + let g:SuperTabCompletionContexts = + \ ['MyTagContext', 's:ContextText', 's:ContextDiscover'] + + Note: supertab also supports the b:SuperTabCompletionContexts variable + allowing you to set the list of contexts separately for the current buffer, + like from an ftplugin for example. + + +Completion Duration *supertab-duration* + *g:SuperTabRetainCompletionDuration* + +g:SuperTabRetainCompletionDuration (default value: 'insert') + +Determines if, and for how long, the current completion type is retained. +The possible values include: +'completion' - The current completion type is only retained for the + current completion. Once you have chosen a completion + result or exited the completion mode, the default + completion type is restored. +'insert' - The current completion type is saved until you exit insert + mode (via ESC). Once you exit insert mode the default + completion type is restored. (supertab default) +'session' - The current completion type is saved for the duration of + your vim session or until you enter a different completion + mode. + + +Preventing completion after... *supertab-preventcomplete* + *g:SuperTabNoCompleteBefore* + *g:SuperTabNoCompleteAfter* + +g:SuperTabNoCompleteBefore (default value: []) +g:SuperTabNoCompleteAfter (default value: ['\s']) + +These two variables are used to control when supertab will attempt completion +or instead fall back to inserting a literal <tab>, by specifying a list of +patterns which are tested against the text before and after the current cursor +position that when matched, prevent completion. So if you don't want supertab +to start completion after a comma or space, you can set +g:SuperTabNoCompleteAfter to [',', '\s']. + +Note: That a buffer local version of these variables +(b:SuperTabNoCompleteBefore, b:SuperTabNoCompleteAfter) is also supported +should you wish to have different values depending on the file type for +instance. + +Changing the default mapping *supertab-forwardbackward* + *g:SuperTabMappingForward* + *g:SuperTabMappingBackward* + +g:SuperTabMappingForward (default value: '<tab>') +g:SuperTabMappingBackward (default value: '<s-tab>') + +These two variables allow you to set the keys used to kick off the current +completion. By default this is <tab> and <s-tab>. To change to something +like <c-space> and <s-c-space>, you can add the following to your |vimrc|. + + let g:SuperTabMappingForward = '<c-space>' + let g:SuperTabMappingBackward = '<s-c-space>' + +Note: if the above does not have the desired effect (which may happen in +console version of vim), you can try the following mappings. Although the +backwards mapping still doesn't seem to work in the console for me, your +milage may vary. + + let g:SuperTabMappingForward = '<nul>' + let g:SuperTabMappingBackward = '<s-nul>' + + +Inserting true tabs *supertab-mappingtabliteral* + *g:SuperTabMappingTabLiteral* + +g:SuperTabMappingTabLiteral (default value: '<c-tab>') + +Sets the key mapping used to insert a literal tab where supertab would +otherwise attempt to kick off insert completion. The default is '<c-tab>' +(ctrl-tab) which unfortunately might not work at the console. So if you are +using a console vim and want this functionality, you may have to change it to +something that is supported. Alternatively, you can escape the <tab> with +<c-v> (see |i_CTRL-V| for more infos). + + +Enhanced longest match support *supertab-longestenhanced* + *g:SuperTabLongestEnhanced* + +g:SuperTabLongestEnhanced (default value: 0) + +When enabled and 'longest' is in your |completeopt| setting, supertab will +provide an enhanced longest match support where typing one or more letters and +hitting tab again while in a completion mode will complete the longest common +match using the new text in the buffer. + +For example, say you have a buffer with the following contents: + FooBarFoo + FooBar + Foo + FooBarBaz +And you then type F<tab>. Vim's builtin longest support will complete the +longest common text 'Foo' and offer 'FooBarFoo', 'FooBar', 'Foo', and +'FooBarBaz' as possible completions. With supertab's longest match +enhancement disabled, typing B<tab> while still in the completion mode will +end up completing 'FooBarBaz' or 'FooBarFoo' depending your settings, instead +of the next longest common match of 'FooBar'. With supertab's enhanced +longest match feature enabled, the typing of B<tab> will result in the next +longest text being completed. + + +Preselecting the first entry *supertab-longesthighlight* + *g:SuperTabLongestHighlight* + +g:SuperTabLongestHighlight (default value: 0) + +Sets whether or not to pre-highlight the first match when completeopt has the +popup menu enabled and the 'longest' option as well. When enabled, <tab> will +kick off completion and pre-select the first entry in the popup menu, allowing +you to simply hit <enter> to use it. + + +Mapping <cr> to end completion *supertab-crmapping* + *g:SuperTabCrMapping* + +g:SuperTabCrMapping (default value: 1) + +When enabled, <cr> will cancel completion mode preserving the current text. + +vim:tw=78:ts=8:ft=help:norl: diff --git a/vim/doc/surround.txt b/vim/doc/surround.txt new file mode 100644 index 0000000..4387fa2 --- /dev/null +++ b/vim/doc/surround.txt @@ -0,0 +1,222 @@ +*surround.txt* Plugin for deleting, changing, and adding "surroundings" + +Author: Tim Pope <vimNOSPAM@tpope.info> *surround-author* +License: Same terms as Vim itself (see |license|) + +This plugin is only available if 'compatible' is not set. + +INTRODUCTION *surround* + +This plugin is a tool for dealing with pairs of "surroundings." Examples +of surroundings include parentheses, quotes, and HTML tags. They are +closely related to what Vim refers to as |text-objects|. Provided +are mappings to allow for removing, changing, and adding surroundings. + +Details follow on the exact semantics, but first, consider the following +examples. An asterisk (*) is used to denote the cursor position. + + Old text Command New text ~ + "Hello *world!" ds" Hello world! + [123+4*56]/2 cs]) (123+456)/2 + "Look ma, I'm *HTML!" cs"<q> <q>Look ma, I'm HTML!</q> + if *x>3 { ysW( if ( x>3 ) { + my $str = *whee!; vlllls' my $str = 'whee!'; + +While a few features of this plugin will work in older versions of Vim, +Vim 7 is recommended for full functionality. + +MAPPINGS *surround-mappings* + +Delete surroundings is *ds* . The next character given determines the target +to delete. The exact nature of the target is explained in |surround-targets| +but essentially it is the last character of a |text-object|. This mapping +deletes the difference between the "i"nner object and "a"n object. This is +easiest to understand with some examples: + + Old text Command New text ~ + "Hello *world!" ds" Hello world! + (123+4*56)/2 ds) 123+456/2 + <div>Yo!*</div> dst Yo! + +Change surroundings is *cs* . It takes two arguments, a target like with +|ds|, and a replacement. Details about the second argument can be found +below in |surround-replacements|. Once again, examples are in order. + + Old text Command New text ~ + "Hello *world!" cs"' 'Hello world!' + "Hello *world!" cs"<q> <q>Hello world!</q> + (123+4*56)/2 cs)] [123+456]/2 + (123+4*56)/2 cs)[ [ 123+456 ]/2 + <div>Yo!*</div> cst<p> <p>Yo!</p> + +*ys* takes a valid Vim motion or text object as the first object, and wraps +it using the second argument as with |cs|. (Unfortunately there's no good +mnemonic for "ys".) + + Old text Command New text ~ + Hello w*orld! ysiw) Hello (world)! + +As a special case, *yss* operates on the current line, ignoring leading +whitespace. + + Old text Command New text ~ + Hello w*orld! yssB {Hello world!} + +There is also *yS* and *ySS* which indent the surrounded text and place it +on a line of its own. + +In visual mode, a simple "s" with an argument wraps the selection. This is +referred to as the *vS* mapping, although ordinarily there will be +additional keystrokes between the v and s. In linewise visual mode, the +surroundings are placed on separate lines and indented. In blockwise visual +mode, each line is surrounded. + +A "gS" in visual mode, known as *vgS* , behaves similarly. In linewise visual +mode, the automatic indenting is surpressed. In blockwise visual mode, this +enables surrounding past the end of the like with 'virtualedit' set (there +seems to be no way in Vim Script to differentiate between a jagged end of line +selection and a virtual block selected past the end of the line, so two maps +were needed). + +Additionally, there is a legacy "s" or *vs* mapping which is basically the +same as |vS|. Due to popular demand of wanting to use "s" as Vim does to mean +replacing the selection (also available as "c"), this mapping is going away. +If you were one of these people and would like to disable "s" with the current +release, indicate this to surround.vim by assigning the "s" mapping to +something else. +> + xmap <Leader>s <Plug>Vsurround +< + *i_CTRL-G_s* *i_CTRL-G_S* +Finally, there is an experimental insert mode mapping on <C-G>s and <C-S>. +Beware that the latter won't work on terminals with flow control (if you +accidentally freeze your terminal, use <C-Q> to unfreeze it). The mapping +inserts the specified surroundings and puts the cursor between them. If, +immediately after the mapping and before the replacement, a second <C-S> or +carriage return is pressed, the prefix, cursor, and suffix will be placed on +three separate lines. <C-G>S (not <C-G>s) also exhibits this behavior. + +TARGETS *surround-targets* + +The |ds| and |cs| commands both take a target as their first argument. The +possible targets are based closely on the |text-objects| provided by Vim. +In order for a target to work, the corresponding text object must be +supported in the version of Vim used (Vim 7 adds several text objects, and +thus is highly recommended). All targets are currently just one character. + +Eight punctuation marks, (, ), {, }, [, ], <, and >, represent themselves +and their counterparts. If the opening mark is used, contained whitespace is +also trimmed. The targets b, B, r, and a are aliases for ), }, ], and > +(the first two mirror Vim; the second two are completely arbitrary and +subject to change). + +Three quote marks, ', ", `, represent themselves, in pairs. They are only +searched for on the current line. + +A t is a pair of HTML or XML tags. See |tag-blocks| for details. Remember +that you can specify a numerical argument if you want to get to a tag other +than the innermost one. + +The letters w, W, and s correspond to a |word|, a |WORD|, and a |sentence|, +respectively. These are special in that they have nothing to delete, and +used with |ds| they are a no-op. With |cs|, one could consider them a +slight shortcut for ysi (cswb == ysiwb, more or less). + +A p represents a |paragraph|. This behaves similarly to w, W, and s above; +however, newlines are sometimes added and/or removed. + +REPLACEMENTS *surround-replacements* + +A replacement argument is a single character, and is required by |cs|, |ys|, +and |vs|. Undefined replacement characters (with the exception of alphabetic +characters) default to placing themselves at the beginning and end of the +destination, which can be useful for characters like / and |. + +If either ), }, ], or > is used, the text is wrapped in the appropriate pair +of characters. Similar behavior can be found with (, {, and [ (but not <), +which append an additional space to the inside. Like with the targets above, +b, B, r, and a are aliases for ), }, ], and >. To fulfill the common need for +code blocks in C-style languages, <C-}> (which is really <C-]>) adds braces on +lines separate from the content. + +If t or < is used, Vim prompts for an HTML/XML tag to insert. You may specify +attributes here and they will be stripped from the closing tag. End your +input by pressing <CR> or >. If <C-T> is used, the tags will appear on lines +by themselves. + +A deprecated replacement of a LaTeX environment is provided on \ and l. The +name of the environment and any arguments will be input from a prompt. This +will be removed once a more fully functional customization system is +implemented. The following shows the resulting environment from +csp\tabular}{lc<CR> +> + \begin{tabular}{lc} + \end{tabular} +< +CUSTOMIZING *surround-customizing* + +The following adds a potential replacement on "-" (ASCII 45) in PHP files. +(To determine the ASCII code to use, :echo char2nr("-")). The carriage +return will be replaced by the original text. +> + autocmd FileType php let b:surround_45 = "<?php \r ?>" +< +This can be used in a PHP file as in the following example. + + Old text Command New text ~ + print "Hello *world!" yss- <?php print "Hello world!" ?> + +Additionally, one can use a global variable for globally available +replacements. +> + let g:surround_45 = "<% \r %>" + let g:surround_61 = "<%= \r %>" +< +Advanced, experimental, and subject to change: One can also prompt for +replacement text. The syntax for this is to surround the replacement in pairs +of low numbered control characters. If this sounds confusing, that's because +it is (but it makes the parsing easy). Consider the following example for a +LaTeX environment on the "l" replacement. +> + let g:surround_108 = "\\begin{\1environment: \1}\r\\end{\1\1}" +< +When this replacement is used, the user is prompted with an "environment: " +prompt for input. This input is inserted between each set of \1's. +Additional inputs up to \7 can be used. + +Furthermore, one can specify a regular expression substitution to apply. +> + let g:surround_108 = "\\begin{\1environment: \1}\r\\end{\1\r}.*\r\1}" +< +This will remove anything after the first } in the input when the text is +placed within the \end{} slot. The first \r marks where the pattern begins, +and the second where the replacement text begins. + +Here's a second example for creating an HTML <div>. The substitution cleverly +prompts for an id, but only adds id="" if it is non-blank. You may have to +read this one a few times slowly before you understand it. +> + let g:surround_{char2nr("d")} = "<div\1id: \r..*\r id=\"&\"\1>\r</div>" +< +Inputting text replacements is a proof of concept at this point. The ugly, +unintuitive interface and the brevity of the documentation reflect this. + +Finally, It is possible to always append a string to surroundings in insert +mode (and only insert mode). This is useful with certain plugins and mappings +that allow you to jump to such markings. +> + let g:surround_insert_tail = "<++>" +< +ISSUES *surround-issues* + +Vim could potentially get confused when deleting/changing occurs at the very +end of the line. Please report any repeatable instances of this. + +Do we need to use |inputsave()|/|inputrestore()| with the tag replacement? + +Indenting is handled haphazardly. Need to decide the most appropriate +behavior and implement it. Right now one can do :let b:surround_indent = 1 +(or the global equivalent) to enable automatic re-indenting by Vim via |=|; +should this be the default? + + vim:tw=78:ts=8:ft=help:norl: diff --git a/vim/doc/syntastic.txt b/vim/doc/syntastic.txt new file mode 100644 index 0000000..f0cede3 --- /dev/null +++ b/vim/doc/syntastic.txt @@ -0,0 +1,574 @@ +*syntastic.txt* Syntax checking on the fly has never been so pimp. +*syntastic* + + + It's a bird! It's a plane! ZOMG It's ... ~ + + _____ __ __ _ ~ + / ___/__ ______ / /_____ ______/ /_(_)____ ~ + \__ \/ / / / __ \/ __/ __ `/ ___/ __/ / ___/ ~ + ___/ / /_/ / / / / /_/ /_/ (__ ) /_/ / /__ ~ + /____/\__, /_/ /_/\__/\__,_/____/\__/_/\___/ ~ + /____/ ~ + + + + Reference Manual~ + + +============================================================================== +CONTENTS *syntastic-contents* + + 1.Intro...................................|syntastic-intro| + 2.Functionality provided..................|syntastic-functionality| + 2.1.The statusline flag...............|syntastic-statusline-flag| + 2.2.Error signs.......................|syntastic-error-signs| + 2.3.Error window......................|syntastic-error-window| + 3.Commands................................|syntastic-commands| + 4.Options.................................|syntastic-options| + 5.Writing syntax checkers.................|syntastic-syntax-checkers| + 6.About...................................|syntastic-about| + 7.Changelog...............................|syntastic-changelog| + 8.Credits.................................|syntastic-credits| + 9.License.................................|syntastic-license| + + +============================================================================== +1. Intro *syntastic-intro* + +Syntastic is a syntax checking plugin that runs files through external syntax +checkers. This can be done on demand, or automatically as files are saved and +opened. If syntax errors are detected, the user is notified and is happy +because they didn't have to compile their code or execute their script to find +them. + +Syntastic comes in two parts: the syntax checker plugins, and the core script +(i.e. syntastic.vim). The syntax checker plugins are defined on a per-filetype +basis where each one wraps up an external syntax checking program. The core +script delegates off to these plugins and uses their output to provide the +syntastic functionality. At the time of this writing, syntax checking plugins +exist for c, coffee, cpp, css, cucumber, cuda, docbk, erlang, eruby, fortran, +go, haml, haskell, html, javascript, less, lua, matlab, perl, php, puppet, +python, ruby, sass/scss, sh, tcl, tex, vala, xhtml, xml, xslt, zpt + +Take a look in the syntax_checkers directory for the most up to date list. + +If your language is not supported then see |syntastic-syntax-checkers| for +details on how to implement a syntax checking plugin, and be sure to send me a +patch ;-) + +This plugin is currently only recommended for *nix users. It is functional on +Windows, but since the syntax checking plugins shell out, the command window +briefly appears whenever one is executed. + + +============================================================================== +2. Functionality provided *syntastic-functionality* + +Syntax checking can be done automatically or on demand (see +|'syntastic_mode_map'| for configuring this). + +When syntax checking is done, the features below can be used to notify the +user of errors. See |syntastic-options| for how to configure and +activate/deactivate these features. + + * A configurable statusline flag + * Lines with errors can have |signs| placed beside them - where a different + sign is used for errors and warnings. + * A |location-list| can be displayed with error messages for erroneous + buffers. + * Offending parts of lines can be highlighted (this functionality is only + provided by some syntax checkers). + * Balloons (if compiled in) can be used to display error messages for + erroneous lines when hovering the mouse over them. + + +Note: This functionality is only available if a syntax checker plugin is +present for the filetype of the buffer in question. See +|syntastic-syntax-checkers| for details. + +------------------------------------------------------------------------------ +2.1. The statusline flag *syntastic-statusline-flag* + +To use the statusline flag, this must appear in your |'statusline'| setting > + %{SyntasticStatuslineFlag()} +< +Something like this could be more useful: > + set statusline+=%#warningmsg# + set statusline+=%{SyntasticStatuslineFlag()} + set statusline+=%* +< +When syntax errors are detected a flag will be shown. The content of the flag +is derived from the |syntastic_stl_format| option +------------------------------------------------------------------------------ +2.2. Error signs *syntastic-error-signs* + +Syntastic uses the |:sign| commands to mark lines with errors and warnings in +the sign column. To enable this feature, use the |'syntastic_enable_signs'| +option. + +------------------------------------------------------------------------------ +2.3. The error window *:Errors* *syntastic-error-window* + +You can use the :Errors command to display the errors for the current buffer +in the |location-list|. + +Note that when you use :Errors, the current location list is overwritten with +Syntastic's own location list. + + +============================================================================== +3. Commands *syntastic-commands* + +:Errors *:SyntasticErrors* + +When errors have been detected, use this command to pop up the |location-list| +and display the error messages. + + +:SyntasticToggleMode *:SyntasticToggleMode* + +Toggles syntastic between active and passive mode. See |'syntastic_mode_map'| +for more info. + + +:SyntasticCheck *:SyntasticCheck* + +Manually cause a syntax check to be done. Useful in passive mode, or if the +current filetype is set to passive. See |'syntastic_mode_map'| for more info. + + +============================================================================== +4. Options *syntastic-options* + + + *'syntastic_check_on_open'* +Default: 0 +If enabled, syntastic will do syntax checks when buffers are first loaded as +well as on saving > + let g:syntastic_check_on_open=1 +< + + *'syntastic_echo_current_error'* +Default: 1 +If enabled, syntastic will error message associated with the current line to +the command window. If multiple errors are found, the first will be used. > + let g:syntastic_echo_current_error=1 +< + + *'syntastic_enable_signs'* +Default: 1 +Use this option to tell syntastic whether to use the |:sign| interface to mark +syntax errors: > + let g:syntastic_enable_signs=1 +< + + *'syntastic_enable_balloons'* +Default: 1 +Use this option to tell syntastic whether to display error messages in balloons +when the mouse is hovered over erroneous lines: > + let g:syntastic_enable_balloons = 1 +< +Note that vim must be compiled with |+balloon_eval|. + + *'syntastic_enable_highlighting'* +Default: 1 +Use this option to tell syntastic whether to use syntax highlighting to mark +errors (where possible). Highlighting can be turned off with the following > + let g:syntastic_enable_highlighting = 0 +< + + *'syntastic_auto_jump'* +Default: 0 +Enable this option if you want the cursor to jump to the first detected error +when saving or opening a file: > + let g:syntastic_auto_jump=1 +< + + *'syntastic_auto_loc_list'* +Default: 2 +Use this option to tell syntastic to automatically open and/or close the +|location-list| (see |syntastic-error-window|). + +When set to 0 the error window will not be opened or closed automatically. > + let g:syntastic_auto_loc_list=0 +< + +When set to 1 the error window will be automatically opened when errors are +detected, and closed when none are detected. > + let g:syntastic_auto_loc_list=1 +< +When set to 2 the error window will be automatically closed when no errors are +detected, but not opened automatically. > + let g:syntastic_auto_loc_list=2 +< + + *'syntastic_loc_list_height'* +Default: 10 +Use this option to specify the height of the location lists that syntastic +opens. > + let g:syntastic_loc_list_height=5 +< + + + *'syntastic_mode_map'* +Default: { "mode": "active", + "active_filetypes": [], + "passive_filetypes": [] } + +Use this option to fine tune when automatic syntax checking is done (or not +done). + +The option should be set to something like: > + + let g:syntastic_mode_map = { 'mode': 'active', + \ 'active_filetypes': ['ruby', 'php'], + \ 'passive_filetypes': ['puppet'] } +< + +"mode" can be mapped to one of two values - "active" or "passive". When set to +active, syntastic does automatic checking whenever a buffer is saved or +initially opened. When set to "passive" syntastic only checks when the user +calls :SyntasticCheck. + +The exceptions to these rules are defined with "active_filetypes" and +"passive_filetypes". In passive mode, automatic checks are still done +for all filetypes in the "active_filetypes" array. In active mode, +automatic checks are not done for any filetypes in the +"passive_filetypes" array. + +At runtime, the |:SyntasticToggleMode| command can be used to switch between +active and passive mode. + +If any of "mode", "active_filetypes", or "passive_filetypes" are not specified +then they will default to their default value as above. + + *'syntastic_quiet_warnings'* + +Use this option if you only care about syntax errors, not warnings. When set, +this option has the following effects: + * no |signs| appear unless there is at least one error, whereupon both + errors and warnings are displayed + * the |'syntastic_auto_loc_list'| option only pops up the error window if + there's at least one error, whereupon both errors and warnings are + displayed +> + let g:syntastic_quiet_warnings=1 +< + + *'syntastic_stl_format'* + +Default: [Syntax: line:%F (%t)] +Use this option to control what the syntastic statusline text contains. Several +magic flags are availble to insert information: + %e - number of errors + %w - number of warnings + %t - total number of warnings and errors + %fe - line number of first error + %fw - line number of first warning + %F - line number of first warning or error + +Several additional flags are available to hide text under certain conditions: + %E{...} - hide the text in the brackets unless there are errors + %W{...} - hide the text in the brackets unless there are warnings + %B{...} - hide the text in the brackets unless there are both warnings AND + errors +These flags cant be nested. + +Example: > + let g:syntastic_stl_format = '[%E{Err: %fe #%e}%B{, }%W{Warn: %fw #%w}]' +< +If this format is used and the current buffer has 5 errors and 1 warning +starting on lines 20 and 10 respectively then this would appear on the +statusline: > + [Err: 20 #5, Warn: 10 #1] +< +If the buffer had 2 warnings, starting on line 5 then this would appear: > + [Warn: 5 #2] +< + + +============================================================================== +5. Writing syntax checkers *syntastic-syntax-checkers* + + +A syntax checker plugin is really nothing more than a single function. You +should define them in ~/.vim/syntax_checkers/<filetype>.vim, but this is +purely for convenience; Syntastic doesn't actually care where these functions +are defined. + +A syntax checker plugin must define a function of the form: +> + SyntaxCheckers_<filetype>_GetLocList() +< +The output of this function must be of the same format as that returned by +the |getloclist()| function. See |getloclist()| and |getqflist()| for +details. + +To achieve this, the function should call |SyntasticMake()| or shell out to a +syntax checker, parse the output and munge it into the format. + +There are several syntax checker plugins provided with this plugin. The ruby +one is a good example of |SyntasticMake()|, while the haml one is a good +example of how to create the data structure manually. + + +SyntasticMake({options}) *SyntasticMake()* + {options} must be a dictionary. It can contain "makeprg" and "errorformat" + as keys (both optional). + + SyntasticMake will run |:lmake| with the given |'makeprg'| and + |'errorformat'| (using the current settings if none are supplied). It will + store the resulting error list and use it to provide all of the + |syntastic-functionality|. The previous makeprg and errorformat settings + will then be restored, as well as the location list for the window. From + the user's perspective, it will be as though |:lmake| was never run. + + Note that the given "makeprg" and "errorformat" will be set using |:let-&|, + so you should not escape spaces. + + +============================================================================== +6. About *syntastic-about* + +The author of syntastic is a mighty wild stallion, hear him roar! > + _ _ _____ _____ ___ ___ ___ ____ _ _ _ + | \ | | ____| ____|_ _|_ _|_ _/ ___| | | | | + | \| | _| | _| | | | | | | | _| |_| | | + | |\ | |___| |___ | | | | | | |_| | _ |_| + |_| \_|_____|_____|___|___|___\____|_| |_(_) + +< +He likes to trot around in the back yard reading his emails and sipping a +scolding hot cup of Earl Grey. Email him at martin.grenfell at gmail dot com. +He can also be found trolling the #vim channel on the freenode IRC network as +scrooloose. + +Bug reports, feedback, suggestions etc are welcomed. + + +The latest official releases will be on vim.org at some point. + +The latest dev versions are on github + http://github.com/scrooloose/syntastic + +============================================================================== +7. Changelog *syntastic-changelog* + +2.3.0 + - Add syntastic_loc_list_height option + - Allow errors to have a "subtype" that is signed differently to standard + errors. Currently geared towards differentiating style errors from + syntax errors. Currently implemented for phpcs (technosophos). + - New checkers for: + - yaml + - haxe (davidB) + - ocaml (edwintorok) + - pylint (parantapa) + - rust (cjab) + + - Updates to existing checkers: + - jslint + - jshint (gillesruppert) + - fortran (bmattern) + - sass + - html (darcyparker) + - coffee (darcyparker) + - docbk (darcyparker) + - xml + - xslt + - less (irrationalfab) + - php (AD7six, technosophos) + - cuda + - python (mitchellh, pneff) + - perl (Anthony Carapetis) + - c (naoina, zsprackett) + - puppet (frimik) + +2.2.0 + - only do syntax checks when files are saved (not when first opened) - add + g:syntastic_check_on_open option to get the old behavior back + - bug fix with echoing error messages; fixes incompatability with cmd-t (datanoise) + - dont allow warnings to mask errors when signing/echoing errors (ashikase) + - auto close location list when leaving buffer. (millermedeiros) + - update errors appropriately when :SyntasticToggleMode is called + - updates/fixes to existing checkers: + - javascript/jshint (millermedeiros) + - javascript/jslint + - c (kongo2002) + - Support for new filetypes: + - JSON (millermedeiros, tocer) + - rst (reStructuredText files) (JNRowe) + - gentoo-metadata (JNRowe) + + +2.1.0 + - when the cursor is on a line containing an error, echo the + error msg (kevinw) + - various bug fixes and refactoring + - updates/fixes to existing checkers: + - html (millermedeiros) + - erlang + - coffeescript + - javascript + - sh + - php (add support for phpcs - technosophos) + - add an applescript checker (Zhai Cai) + - add support for hyphenated filetypes (JNRowe) + +2.0.0 + - Add support for highlighting the erroneous parts of lines (kstep) + - Add support for displaying errors via balloons (kstep) + - Add syntastic_mode_map option to give more control over when checking + should be done. + - Add :SyntasticCheck command to force a syntax check - useful in passive + mode (justone). + - Add the option to automatically close the location list, but not + automatically open it (milkypostman) + - Add syntastic_auto_jump option to automatically jump to the first + error (milkypostman) + - Only source syntax checkers as needed - instead of loading all of them + when vim starts + + - Support for new filetypes: + - less (julienXX) + - docbook (tpope) + - matlab (jasongraham) + - go (dtjm) + - puppet (uggedal, roman, zsprackett) + - haskell (baldo, roman) + - tcl (et) + - vala (kstep) + - cuda (temporaer) + - css (oryband, sitedyno) + - fortran (Karl Yngve Lervåg) + - xml (kusnier) + - xslt (kusnier) + - erlang (kTT) + - zpt (claytron) + + - updates to existing checkers: + - javascript (mogren, bryanforbes, cjab, ajduncan) + - sass/scss (tmm1, atourino, dlee, epeli) + - ruby (changa) + - perl (harleypig) + - haml (bmihelac) + - php (kstep, docteurklein) + - python (kstep, soli) + - lua (kstep) + - html (kstep) + - xhtml (kstep) + - c (kongo2002, brandonw) + - cpp (kongo2002) + - coffee (industrial) + - eruby (sergevm) + +1.2.0 + - New syntax checkers from github:kongo2002 + - c (thanks also to github:jperras) + - cpp + - lua + - sh (thanks also to github:jmcantrell) + - add coffee syntax checked by github:lstoll + - add tex syntax checker + - make html checker play nicer with html5, thanks to github:enaeseth + - escape filenames properly when invoking syntax checkers, thanks to + github:jmcantrell + - adjust the ruby syntax checker to avoid some common annoying warnings, + thanks to github:robertwahler + +1.1.0 [codenamed: tpimp] + - Dont load rubygems for ruby/eruby syntax checkers. Thanks tpope. + - Improve the javascript syntax checker to catch some warnings that were + getting missed. Thanks tpope. + - Dont automatically focus the error window. Thanks tpope. + - Add support for cucumber [tpope], haskell & perl [Anthony Carapetis], + and xhtml + - Add commands to enable/disable syntax checking at runtime. See :help + syntastic-commands. + - Add an option to specifiy syntax checkers that should be disabled by + default. See :help syntastic_disabled_filetypes. + - Dont use :signs if vim wasnt compiled with support for them. +) + +============================================================================== +8. Credits *syntastic-credits* + +Thanks to the following people for testing, bug reports, patches etc. They own, +hard. + + Mikael Fridh (frimik) + Patrice Neff (pneff ) + Gilles Ruppert (gillesruppert) + Naoya INADA (naoina) + Mitchell Hashimoto (mitchellh) + irrationalfab + Andy Dawson (AD7six) + Parantapa Bhattacharya (parantapa) + edwintorok + Darcy Parker (darcyparker) + bmattern + David Bernard (davidB) + Aleksey V. Zapparov (ixti) + Benji Fisher (benjifisher) + Lance Fetters (ashikase) + datanoise + Giuseppe Rota (grota) + tocer + James Rowe (JNRowe) + Zhai Cai + Matt Butcher (technosophos) + Kevin Watters (kevinw) + Miller Medeiros (millermedeiros) + Pawel Salata (kTT) + Fjölnir Ásgeirsson (aptiva) + Clayton Parker (claytron) + S. Zachariah Sprackett (zsprackett) + Sylvain Soliman (soli) + Ricardo Catalinas Jiménez (jimenezrick) + kusnier + Klein Florian (docteurklein) + sitedyno + Matthew Batema (mlb-) + Nate Jones (justone) + sergevm + Karl Yngve Lervåg + Pavel Argentov (argent-smith) + Andy Duncan (ajduncan) + Antonio Touriño (atourino) + Chad Jablonski (cjab) + Roman Gonzalez (roman) + Tom Wieland (industrial) + Ory Band (oryband) + Esa-Matti Suuronen (epeli) + Brandon Waskiewicz (brandonw) + dlee + temporaer + Jason Graham (jasongraham) + Sam Nguyen (dtjm) + Claes Mogren (mogren) + Eivind Uggedal (uggedal) + kstep + Andreas Baldeau (baldo) + Eric Thomas (et) + Brian Donovan (eventualbuddha) + Bryan Forbes (bryanforbes) + Aman Gupta (tmm1) + Donald Ephraim Curtis (milkypostman) + Dominique Rose-Rosette (changa) + Harley Pig (harleypig) + bmihelac + Julien Blanchard (julienXX) + Gregor Uhlenheuer (kongo2002) + Lincoln Stoll + Tim Carey-Smith (halorgium) + Tim Pope (tpope) + Travis Jeffery + Anthony Carapetis + + +============================================================================== +9. License *syntastic-license* + +Syntastic is released under the wtfpl. +See http://sam.zoy.org/wtfpl/COPYING. diff --git a/vim/doc/tagbar.txt b/vim/doc/tagbar.txt new file mode 100644 index 0000000..cb9a3e3 --- /dev/null +++ b/vim/doc/tagbar.txt @@ -0,0 +1,1016 @@ +*tagbar.txt* Display tags of a file in their correct scope + +Author: Jan Larres <jan@majutsushi.net> +Licence: Vim licence, see |license| +Homepage: http://majutsushi.github.com/tagbar/ +Version: 2.3 + +============================================================================== +Contents *tagbar* *tagbar-contents* + + 1. Intro ........................... |tagbar-intro| + Pseudo-tags ................... |tagbar-pseudotags| + Supported features ............ |tagbar-features| + Other ctags-compatible programs |tagbar-other| + 2. Requirements .................... |tagbar-requirements| + 3. Installation .................... |tagbar-installation| + 4. Usage ........................... |tagbar-usage| + Commands ...................... |tagbar-commands| + Key mappings .................. |tagbar-keys| + 5. Configuration ................... |tagbar-configuration| + Highlight colours ............. |tagbar-highlight| + Automatically opening Tagbar .. |tagbar-autoopen| + 6. Extending Tagbar ................ |tagbar-extend| + 7. Troubleshooting & Known issues .. |tagbar-issues| + 8. History ......................... |tagbar-history| + 9. Todo ............................ |tagbar-todo| + 10. Credits ......................... |tagbar-credits| + +============================================================================== +1. Intro *tagbar-intro* + +Tagbar is a plugin for browsing the tags of source code files. It provides a +sidebar that displays the ctags-generated tags of the current file, ordered by +their scope. This means that for example methods in C++ are displayed under +the class they are defined in. + +Let's say we have the following code inside of a C++ file: +> + namespace { + char a; + + class Foo + { + public: + Foo(); + ~Foo(); + private: + int var; + }; + }; +< +Then Tagbar would display the tag information like so: +> + __anon1* : namespace + Foo : class + +Foo() + +~Foo() + -var + a +< +This example shows several important points. First, the tags are listed +indented below the scope they are defined in. Second, the type of a scope is +listed after its name and a colon. Third, tags for which the access/visibility +information is known are prefixed with a symbol indicating that. + +------------------------------------------------------------------------------ +PSEUDO-TAGS *tagbar-pseudotags* + +The example also introduces the concept of "pseudo-tags". Pseudo-tags are tags +that are not explicitly defined in the file but have children in it. In this +example the namespace doesn't have a name and thus ctags doesn't generate a +tag for it, but since it has children it still needs to be displayed using an +auto-generated name. + +Another case where pseudo-tags appear is in C++ implementation files. Since +classes are usually defined in a header file but the member methods and +variables in the implementation file the class itself won't generate a tag +in that file. + +Since pseudo-tags don't really exist they cannot be jumped to from the Tagbar +window. + +Pseudo-tags are denoted with an asterisk ('*') at the end of their name. + +------------------------------------------------------------------------------ +SUPPORTED FEATURES *tagbar-features* + +The following features are supported by Tagbar: + + - Display tags under their correct scope. + - Automatically update the tags when switching between buffers and editing + files. + - Display visibility information of tags if available. + - Highlight the tag near the cursor while editing files. + - Jump to a tag from the Tagbar window. + - Display the complete prototype of a tag. + - Tags can be sorted either by name or order of appearance in the file. + - Scopes can be folded to hide uninteresting information. + - Supports all of the languages that ctags does, i.e. Ant, Assembler, ASP, + Awk, Basic, BETA, C, C++, C#, COBOL, DosBatch, Eiffel, Erlang, Flex, + Fortran, HTML, Java, JavaScript, Lisp, Lua, Make, MatLab, OCaml, Pascal, + Perl, PHP, Python, REXX, Ruby, Scheme, Shell script, SLang, SML, SQL, Tcl, + Tex, Vera, Verilog, VHDL, Vim and YACC. + - Can be extended to support arbitrary new types. + +------------------------------------------------------------------------------ +OTHER CTAGS-COMPATIBLE PROGRAMS *tagbar-other* + +Tagbar theoretically also supports filetype-specific programs that can output +tag information that is compatible with ctags. However due to potential +incompatibilities this may not always completely work. Tagbar has been tested +with doctorjs/jsctags and will use that if present, other programs require +some configuration (see |tagbar-extend|). If a program does not work even with +correct configuration please contact me. + +Note: Please check |tagbar-issues| for some possible issues with jsctags. + +============================================================================== +2. Requirements *tagbar-requirements* + +The following requirements have to be met in order to be able to use tagbar: + + - Vim 7.0 or higher. Older versions will not work since Tagbar uses data + structures that were only introduced in Vim 7. + - Exuberant ctags 5.5 or higher. Ctags is the program that generates the + tag information that Tagbar uses. It is shipped with most Linux + distributions, otherwise it can be downloaded from the following + website: + + http://ctags.sourceforge.net/ + + Tagbar will work on any platform that ctags runs on -- this includes + UNIX derivatives, Mac OS X and Windows. Note that other versions like + GNU ctags will not work. + Tagbar generates the tag information by itself and doesn't need (or use) + already existing tag files. + - File type detection must be turned on in vim. This can be done with the + following command in your vimrc: +> + filetype on +< + See |filetype| for more information. + - Tagbar will not work in |restricted-mode| or with 'compatible' set. + +============================================================================== +3. Installation *tagbar-installation* + +Use the normal Vimball install method for installing tagbar.vba: +> + vim tagbar.vba + :so % + :q +< +Alternatively you can clone the git repository and then add the path to +'runtimepath' or use the pathogen plugin. Don't forget to run |:helptags| if +you're not using pathogen. + +If the ctags executable is not installed in one of the directories in your +$PATH environment variable you have to set the g:tagbar_ctags_bin variable, +see |g:tagbar_ctags_bin|. + +============================================================================== +4. Usage *tagbar-usage* + +There are essentially two ways to use Tagbar: + + 1. Have it running all the time in a window on the side of the screen. In + this case Tagbar will update its contents whenever the source file is + changed and highlight the tag the cursor is currently on in the file. If + a tag is selected in Tagbar the file window will jump to the tag and the + Tagbar window will stay open. |g:tagbar_autoclose| has to be unset for + this mode. + 2. Only open Tagbar when you want to jump to a specific tag and have it + close automatically once you have selected one. This can be useful for + example for small screens where a permanent window would take up too much + space. You have to set the option |g:tagbar_autoclose| in this case. The + cursor will also automatically jump to the Tagbar window when opening it. + +Opening and closing the Tagbar window~ +Use |:TagbarOpen| or |:TagbarToggle| to open the Tagbar window if it is +closed. By default the window is opened on the right side, set the option +|g:tagbar_left| to open it on the left instead. If the window is already open, +|:TagbarOpen| will jump to it and |:TagbarToggle| will close it again. +|:TagbarClose| will simply close the window if it is open. + +It is probably a good idea to assign a key to these commands. For example, put +this in your |vimrc|: +> + nnoremap <silent> <F9> :TagbarToggle<CR> +< +You can then open and close Tagbar by simply pressing the <F9> key. + +You can also use |:TagbarOpenAutoClose| to open the Tagbar window, jump to it +and have it close automatically on tag selection regardless of the +|g:tagbar_autoclose| setting. + +Jumping to tags~ +When you're inside the Tagbar window you can jump to the definition of a tag +by moving the cursor to a tag and pressing <Enter> or double-clicking on it +with the mouse. The source file will then move to the definition and put the +cursor in the corresponding line. This won't work for pseudo-tags. + +Sorting~ +You can sort the tags in the Tagbar window in two ways: by name or by file +order. Sorting them by name simply displays the tags in their alphabetical +order under their corresponding scope. Sorting by file order means that the +tags keep the order they have in the source file, but are still associated +with the correct scope. You can change the sort order by pressing the "s" key +in the Tagbar window. The current sort order is displayed in the statusbar of +the Tagbar window. + +Folding~ +The displayed scopes (and unscoped types) can be folded to hide uninteresting +information. Mappings similar to Vim's built-in ones are provided. Folds can +also be opened and closed by clicking on the fold icon with the mouse. + +Displaying the prototype of a tag~ +Tagbar can display the prototype of a tag. More precisely it can display the +line in which the tag is defined. This can be done by either pressing <Space> +when on a tag or hovering over a tag with the mouse. In the former case the +prototype will be displayed in the command line |Command-line|, in the latter +case it will be displayed in a pop-up window. The prototype will also be +displayed when the cursor stays on a tag for 'updatetime' milliseconds. + +------------------------------------------------------------------------------ +COMMANDS *tagbar-commands* + +:TagbarOpen [{flags}] + Open the Tagbar window if it is closed. + + Additional behaviour can be specified with the optional {flags} argument. + It is a string which can contain these character flags: + 'f' Jump to Tagbar window when opening (just as if |g:tagbar_autofocus| + were set to 1) + 'j' Jump to Tagbar window if already open + 'c' Close Tagbar on tag selection (just as if |g:tagbar_autoclose| were + set to 1, but doesn't imply 'f') + + For example, the following command would always jump to the Tagbar window, + opening it first if necessary, but keep it open after selecting a tag + (unless |g:tagbar_autoclose| is set): > + :TagbarOpen fj +< +:TagbarClose + Close the Tagbar window if it is open. + +:TagbarToggle + Open the Tagbar window if it is closed or close it if it is open. + +:TagbarOpenAutoClose + Open the Tagbar window, jump to it and close it on tag selection. This is + an alias for ":TagbarOpen fc". + +:TagbarSetFoldlevel {number} + Set the foldlevel of the tags of the current file to {number}. The + foldlevel of tags in other files remains unaffected. Works in the same way + as 'foldlevel'. + +:TagbarShowTag + Open the parent folds of the current tag in the file window as much as + needed for the tag to be visible in the Tagbar window. + +:TagbarDebug [logfile] + Start debug mode. This will write debug messages to file [logfile] while + using Tagbar. If no argument is given "tagbardebug.log" in the current + directory is used. Note: an existing file will be overwritten! + +:TagbarDebugEnd + End debug mode, debug messages will no longer be written to the logfile. + +------------------------------------------------------------------------------ +KEY MAPPINGS *tagbar-keys* + +The following mappings are valid in the Tagbar window: + +<F1> Display key mapping help. +<CR>/<Enter> Jump to the tag under the cursor. Doesn't work for pseudo-tags + or generic headers. +p Jump to the tag under the cursor, but stay in the Tagbar window. +<LeftMouse> When on a fold icon, open or close the fold depending on the + current state. +<2-LeftMouse> Same as <CR>. See |g:tagbar_singleclick| if you want to use a + single- instead of a double-click. +<Space> Display the prototype of the current tag (i.e. the line defining + it) in the command line. ++/zo Open the fold under the cursor. +-/zc Close the fold under the cursor or the current one if there is + no fold under the cursor. +o/za Toggle the fold under the cursor or the current one if there is + no fold under the cursor. +*/zR Open all folds by setting foldlevel to 99. +=/zM Close all folds by setting foldlevel to 0. +<C-N> Go to the next top-level tag. +<C-P> Go to the previous top-level tag. +s Toggle sort order between name and file order. +x Toggle zooming the window. +q Close the Tagbar window. + +============================================================================== +5. Configuration *tagbar-configuration* + + *g:tagbar_ctags_bin* +g:tagbar_ctags_bin~ +Default: empty + +Use this option to specify the location of your ctags executable. Only needed +if it is not in one of the directories in your $PATH environment variable. + +Example: +> + let g:tagbar_ctags_bin = 'C:\Ctags5.8\ctags.exe' +< + + *g:tagbar_left* +g:tagbar_left~ +Default: 0 + +By default the Tagbar window will be opened on the right-hand side of vim. Set +this option to open it on the left instead. + +Example: +> + let g:tagbar_left = 1 +< + + *g:tagbar_width* +g:tagbar_width~ +Default: 40 + +Width of the Tagbar window in characters. + +Example: +> + let g:tagbar_width = 30 +< + + *g:tagbar_autoclose* +g:tagbar_autoclose~ +Default: 0 + +If you set this option the Tagbar window will automatically close when you +jump to a tag. This implies |g:tagbar_autofocus|. + +Example: +> + let g:tagbar_autoclose = 1 +< + + *g:tagbar_autofocus* +g:tagbar_autofocus~ +Default: 0 + +If you set this option the cursor will move to the Tagbar window when it is +opened. + +Example: +> + let g:tagbar_autofocus = 1 +< + + *g:tagbar_sort* +g:tagbar_sort~ +Default: 1 + +If this option is set the tags are sorted according to their name. If it is +unset they are sorted according to their order in the source file. Note that +in the second case Pseudo-tags are always sorted before normal tags of the +same kind since they don't have a real position in the file. + +Example: +> + let g:tagbar_sort = 0 +< + + *g:tagbar_compact* +g:tagbar_compact~ +Default: 0 + +Setting this option will result in Tagbar omitting the short help at the +top of the window and the blank lines in between top-level scopes in order to +save screen real estate. + +Example: +> + let g:tagbar_compact = 1 +< + + *g:tagbar_expand* +g:tagbar_expand~ +Default: 0 + +If this option is set the Vim window will be expanded by the width of the +Tagbar window if using a GUI version of Vim. + +Example: +> + let g:tagbar_expand = 1 +< + + *g:tagbar_singleclick* +g:tagbar_singleclick~ +Default: 0 + +If this option is set then a single- instead of a double-click is used to jump +to the tag definition. + +Example: +> + let g:tagbar_singleclick = 1 +< + + *g:tagbar_foldlevel* +g:tagbar_foldlevel~ +Default: 99 + +The initial foldlevel for folds in the Tagbar window. Fold with a level higher +than this number will be closed. + +Example: +> + let g:tagbar_foldlevel = 2 +< + + *g:tagbar_iconchars* +g:tagbar_iconchars~ + +Since the display of the icons used to indicate open or closed folds depends +on the actual font used, different characters may be optimal for different +fonts. With this variable you can set the icons to characters of your liking. +The first character in the list specifies the icon to use for a closed fold, +and the second one for an open fold. + +Examples (don't worry if some the characters aren't displayed correctly, just +choose other characters in that case): +> + let g:tagbar_iconchars = ['▶', '▼'] (default on Linux and Mac OS X) + let g:tagbar_iconchars = ['▾', '▸'] + let g:tagbar_iconchars = ['▷', '◢'] + let g:tagbar_iconchars = ['+', '-'] (default on Windows) +< + + *g:tagbar_autoshowtag* +g:tagbar_autoshowtag~ +Default: 0 + +If this variable is set and the current tag is inside of a closed fold then +the folds will be opened as much as needed for the tag to be visible so it can +be highlighted. If it is not set then the folds won't be opened and the parent +tag will be highlighted instead. You can use the TagbarShowTag command to open +the folds manually. + +Example: +> + let g:tagbar_autoshowtag = 1 +< + + *g:tagbar_updateonsave_maxlines* +g:tagbar_updateonsave_maxlines~ +Default: 5000 + +If the current file has fewer lines than the value of this variable, Tagbar +will update immediately after saving the file. If it is longer then the update +will only happen on the |CursorHold| event and when switching buffers (or +windows). This is to prevent the time it takes to save a large file from +becoming annoying in case you have a slow computer. If you have a fast +computer you can set it to a higher value. + +Example: +> + let g:tagbar_updateonsave_maxlines = 10000 +< + + *g:tagbar_systemenc* +g:tagbar_systemenc~ +Default: value of 'encoding' + +This variable is for cases where the character encoding of your operating +system is different from the one set in Vim, i.e. the 'encoding' option. For +example, if you use a Simplified Chinese Windows version that has a system +encoding of "cp936", and you have set 'encoding' to "utf-8", then you would +have to set this variable to "cp936". + +Example: +> + let g:tagbar_systemenc = 'cp936' +< + +------------------------------------------------------------------------------ +HIGHLIGHT COLOURS *tagbar-highlight* + +All of the colours used by Tagbar can be customized. Here is a list of the +highlight groups that are defined by Tagbar: + +TagbarComment + The help at the top of the buffer. + +TagbarKind + The header of generic "kinds" like "functions" and "variables". + +TagbarNestedKind + The "kind" headers in square brackets inside of scopes. + +TagbarScope + Tags that define a scope like classes, structs etc. + +TagbarType + The type of a tag or scope if available. + +TagbarSignature + Function signatures. + +TagbarPseudoID + The asterisk (*) that signifies a pseudo-tag. + +TagbarFoldIcon + The fold icon on the left of foldable tags. + +TagbarHighlight + The colour that is used for automatically highlighting the current tag. + +TagbarAccessPublic + The "public" visibility/access symbol. + +TagbarAccessProtected + The "protected" visibility/access symbol. + +TagbarAccessPrivate + The "private" visibility/access symbol. + +If you want to change any of those colours put a line like the following in +your vimrc: +> + highlight TagbarScope guifg=Green ctermfg=Green +< +See |:highlight| for more information. + +------------------------------------------------------------------------------ +AUTOMATICALLY OPENING TAGBAR *tagbar-autoopen* + +Since there are several different situations in which you might want to open +Tagbar automatically there is no single option to enable automatic opening. +Instead, autocommands can be used together with a convenience function that +opens Tagbar only if a supported file is open(ed). + +If you want to open Tagbar automatically on Vim startup no matter what put +this into your vimrc: +> + autocmd VimEnter * nested :TagbarOpen +< +If you want to open it only if you're opening Vim with a supported file/files +use this instead: +> + autocmd VimEnter * nested :call tagbar#autoopen() +< +For opening Tagbar also if you open a supported file in an already running +Vim: +> + autocmd FileType * nested :call tagbar#autoopen() +< +And if you only want to open Tagbar only for specific filetypes, not for all +of the supported ones: +> + autocmd FileType c,cpp nested :TagbarOpen +< +Check out |autocmd.txt| if you want it to open automatically in more +complicated cases. + +============================================================================== +6. Extending Tagbar *tagbar-extend* + +Tagbar has a flexible mechanism for extending the existing file type (i.e. +language) definitions. This can be used both to change the settings of the +existing types and to add completely new types. A complete configuration +consists of a type definition for Tagbar in your |vimrc| and optionally a +language definition for ctags in case you want to add a new language. + +Before writing your own extension have a look at the wiki +(https://github.com/majutsushi/tagbar/wiki/Support-for-additional-filetypes) +or try googling for existing ones. If you do end up creating your own +extension please consider adding it to the wiki so that others will be able to +use it, too. + +Every type definition in Tagbar is a dictionary with the following keys: + +ctagstype: The name of the language as recognized by ctags. Use the command > + ctags --list-languages +< to get a list of the languages ctags supports. The case doesn't + matter. +kinds: A list of the "language kinds" that should be listed in Tagbar, + ordered by the order they should appear in in the Tagbar window. + Use the command > + ctags --list-kinds={language name} +< to get a list of the kinds ctags supports for a given language. An + entry in this list is a string with two or three parts separated + by a colon: the first part is the one-character abbreviation that + ctags uses, and the second part is an arbitrary string that will + be used in Tagbar as the header for the tags of this kind that are + not listed under a specific scope. The optional third part + determines whether tags of this kind should be folded by default, + with 1 meaning they should be folded and 0 they should not. If + this part is omitted the tags will not be folded by default. For + example, the string > + "f:functions:1" +< would list all the function definitions in a file under the header + "functions" and fold them. +sro: The scope resolution operator. For example, in C++ it is "::" and + in Java it is ".". If in doubt run ctags as shown below and check + the output. +kind2scope: A dictionary describing the mapping of tag kinds (in their + one-character representation) to the scopes their children will + appear in, for example classes, structs etc. + Unfortunately there is no ctags option to list the scopes, you + have to look at the tags ctags generates manually. For example, + let's say we have a C++ file "test.cpp" with the following + contents: > + class Foo + { + public: + Foo(); + ~Foo(); + private: + int var; + }; +< We then run ctags in the following way: > + ctags -f - --format=2 --excmd=pattern --extra= --fields=nksaSmt test.cpp +< Then the output for the variable "var" would look like this: > + var tmp.cpp /^ int var;$/;" kind:m line:11 class:Foo access:private +< This shows that the scope name for an entry in a C++ class is + simply "class". So this would be the word that the "kind" + character of a class has to be mapped to. +scope2kind: The opposite of the above, mapping scopes to the kinds of their + parents. Most of the time it is the exact inverse of the above, + but in some cases it can be different, for example when more than + one kind maps to the same scope. If it is the exact inverse for + your language you only need to specify one of the two keys. +replace: If you set this entry to 1 your definition will completely replace +{optional} an existing default definition. This is useful if you want to + disable scopes for a file type for some reason. Note that in this + case you have to provide all the needed entries yourself! +sort: This entry can be used to override the global sort setting for +{optional} this specific file type. The meaning of the value is the same as + with the global setting, that is if you want to sort tags by name + set it to 1 and if you want to sort them according to their order + in the file set it to 0. +deffile: The path to a file with additional ctags definitions (see the +{optional} section below on adding a new definition for what exactly that + means). This is especially useful for ftplugins since they can + provide a complete type definition with ctags and Tagbar + configurations without requiring user intervention. + Let's say you have an ftplugin that adds support for the language + "mylang", and your directory structure looks like this: > + ctags/mylang.cnf + ftplugin/mylang.vim +< Then the "deffile" entry would look like this to allow for the + plugin to be installed in an arbitray location (for example + with pathogen): > + + 'deffile' : expand('<sfile>:p:h:h') . '/ctags/mylang.cnf' +< +ctagsbin: The path to a filetype-specific ctags-compatible program like +{optional} jsctags. Set it in the same way as |g:tagbar_ctags_bin|. jsctags is + used automatically if found in your $PATH and does not have to be + set in that case. If it is not in your path you have to set this + key, the rest of the configuration should not be necessary (unless + you want to change something, of course). +ctagsargs: The arguments to be passed to the filetype-specific ctags program +{optional} (without the filename). Make sure you set an option that makes the + program output its data on stdout. Not used for the normal ctags + program. + + +You then have to assign this dictionary to a variable in your vimrc with the +name +> + g:tagbar_type_{vim filetype} +< +For example, for C++ the name would be "g:tagbar_type_cpp". If you don't know +the vim file type then run the following command: +> + :set filetype? +< +and vim will display the file type of the current buffer. + +Example: C++~ +Here is a complete example that shows the default configuration for C++ as +used in Tagbar. This is just for illustration purposes since user +configurations will usually be less complicated. +> + let g:tagbar_type_cpp = { + \ 'ctagstype' : 'c++', + \ 'kinds' : [ + \ 'd:macros:1', + \ 'p:prototypes:1', + \ 'g:enums', + \ 'e:enumerators', + \ 't:typedefs', + \ 'n:namespaces', + \ 'c:classes', + \ 's:structs', + \ 'u:unions', + \ 'f:functions', + \ 'm:members', + \ 'v:variables' + \ ], + \ 'sro' : '::', + \ 'kind2scope' : { + \ 'g' : 'enum', + \ 'n' : 'namespace', + \ 'c' : 'class', + \ 's' : 'struct', + \ 'u' : 'union' + \ }, + \ 'scope2kind' : { + \ 'enum' : 'g', + \ 'namespace' : 'n', + \ 'class' : 'c', + \ 'struct' : 's', + \ 'union' : 'u' + \ } + \ } +< + +Which of the keys you have to specify depends on what you want to do. + +Changing an existing definition~ +If you want to change an existing definition you only need to specify the +parts that you want to change. It probably only makes sense to change "kinds" +and/or "scopes", which would be the case if you wanted to exclude certain +kinds from appearing in Tagbar or if you want to change their order. As an +example, if you didn't want Tagbar to show prototypes for C++ files and switch +the order of enums and typedefs, you would do it like this: +> + let g:tagbar_type_cpp = { + \ 'kinds' : [ + \ 'd:macros:1', + \ 'g:enums', + \ 't:typedefs', + \ 'e:enumerators', + \ 'n:namespaces', + \ 'c:classes', + \ 's:structs', + \ 'u:unions', + \ 'f:functions', + \ 'm:members', + \ 'v:variables' + \ ] + \ } +< +Compare with the complete example above to see the difference. + +Adding a definition for a new language/file type~ +In order to be able to add a new language to Tagbar you first have to create a +configuration for ctags that it can use to parse the files. This can be done +in two ways: + + 1. Use the --regex argument for specifying regular expressions that are used + to parse the files. An example of this is given below. A disadvantage of + this approach is that you can't specify scopes. + 2. Write a parser plugin in C for ctags. This approach is much more powerful + than the regex approach since you can make use of all of ctags' + functionality but it also requires much more work. Read the ctags + documentation for more information about how to do this. + +For the first approach the only keys that are needed in the Tagbar definition +are "ctagstype" and "kinds". A definition that supports scopes has to define +those two and in addition "scopes", "sro" and at least one of "kind2scope" and +"scope2kind". + +Let's assume we want to add support for LaTeX to Tagbar using the regex +approach. First we put the following text into ~/.ctags or a file pointed to +by the "deffile" definition entry: +> + --langdef=latex + --langmap=latex:.tex + --regex-latex=/^\\tableofcontents/TABLE OF CONTENTS/s,toc/ + --regex-latex=/^\\frontmatter/FRONTMATTER/s,frontmatter/ + --regex-latex=/^\\mainmatter/MAINMATTER/s,mainmatter/ + --regex-latex=/^\\backmatter/BACKMATTER/s,backmatter/ + --regex-latex=/^\\bibliography\{/BIBLIOGRAPHY/s,bibliography/ + --regex-latex=/^\\part[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/PART \2/s,part/ + --regex-latex=/^\\part[[:space:]]*\*[[:space:]]*\{([^}]+)\}/PART \1/s,part/ + --regex-latex=/^\\chapter[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/CHAP \2/s,chapter/ + --regex-latex=/^\\chapter[[:space:]]*\*[[:space:]]*\{([^}]+)\}/CHAP \1/s,chapter/ + --regex-latex=/^\\section[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/\. \2/s,section/ + --regex-latex=/^\\section[[:space:]]*\*[[:space:]]*\{([^}]+)\}/\. \1/s,section/ + --regex-latex=/^\\subsection[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/\.\. \2/s,subsection/ + --regex-latex=/^\\subsection[[:space:]]*\*[[:space:]]*\{([^}]+)\}/\.\. \1/s,subsection/ + --regex-latex=/^\\subsubsection[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/\.\.\. \2/s,subsubsection/ + --regex-latex=/^\\subsubsection[[:space:]]*\*[[:space:]]*\{([^}]+)\}/\.\.\. \1/s,subsubsection/ + --regex-latex=/^\\includegraphics[[:space:]]*(\[[^]]*\])?[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/\3/g,graphic+listing/ + --regex-latex=/^\\lstinputlisting[[:space:]]*(\[[^]]*\])?[[:space:]]*(\[[^]]*\])?[[:space:]]*\{([^}]+)\}/\3/g,graphic+listing/ + --regex-latex=/\\label[[:space:]]*\{([^}]+)\}/\1/l,label/ + --regex-latex=/\\ref[[:space:]]*\{([^}]+)\}/\1/r,ref/ + --regex-latex=/\\pageref[[:space:]]*\{([^}]+)\}/\1/p,pageref/ +< +This will create a new language definition with the name "latex" and associate +it with files with the extension ".tex". It will also define the kinds "s" for +sections, chapters and the like, "g" for included graphics, "l" for labels, +"r" for references and "p" for page references. See the ctags documentation +for more information about the exact syntax. + +Now we have to create the Tagbar language definition in our vimrc: +> + let g:tagbar_type_tex = { + \ 'ctagstype' : 'latex', + \ 'kinds' : [ + \ 's:sections', + \ 'g:graphics', + \ 'l:labels', + \ 'r:refs:1', + \ 'p:pagerefs:1' + \ ], + \ 'sort' : 0, + \ 'deffile' : expand('<sfile>:p:h:h') . '/ctags/latex.cnf' + \ } +< +The "deffile" field is of course only needed if the ctags definition actually +is in that file and not in ~/.ctags. + +Sort has been disabled for LaTeX so that the sections appear in their correct +order. They unfortunately can't be shown nested with their correct scopes +since as already mentioned the regular expression approach doesn't support +that. + +Tagbar should now be able to show the sections and other tags from LaTeX +files. + +============================================================================== +7. Troubleshooting & Known issues *tagbar-issues* + +As a general rule, if the tag information displayed by Tagbar is wrong (for +example, a method doesn't show up or is in the wrong place) you should first +try running ctags manually to see whether ctags reports the wrong information +or whether that information is correct and Tagbar does something wrong. To run +ctags manually execute the following command in a terminal: +> + ctags -f - --format=2 --excmd=pattern --extra= --fields=nksaSmt myfile +< +If you set the |g:tagbar_ctags_bin| variable you probably have to use the same +value here instead of simply "ctags". + +If Tagbar doesn't seem to work at all, but you don't get any error messages, +you can use Tagbar's debug mode to try to find the source of the problem (see +|tagbar-commands| on how to invoke it). In that case you should especially pay +attention to the reported file type and the ctags command line in the log +file. + + + - jsctags has to be newer than 2011-01-06 since it needs the "-f" option to + work. Also, the output of jsctags seems to be a bit unreliable at the + moment (especially regarding line numbers), so if you notice some strange + behaviour with it please run it manually in a terminal to check whether + the bug is in jsctags or Tagbar. + + - Nested pseudo-tags cannot be properly parsed since only the direct parent + scope of a tag gets assigned a type, the type of the grandparents is not + reported by ctags (assuming the grandparents don't have direct, real + children). + + For example, if we have a C++ file with the following content: +> + foo::Bar::init() + { + // ... + } + foo::Baz::method() + { + // ... + } +< + In this case the type of "foo" is not known. Is it a namespace? A class? + For this reason the methods are displayed in Tagbar like this: +> + foo::Bar* : class + init() + foo::Baz* : class + method() +< + - Scope-defining tags at the top level that have the same name but a + different kind/scope type can lead to an incorrect display. For example, + the following Python code will incorrectly insert a pseudo-tag "Inner2" + into the "test" class: +> + class test: + class Inner: + def foo(self): + pass + + def test(): + class Inner2: + def bar(self): + pass +< + I haven't found a clean way around this yet, but it shouldn't be much of a + problem in practice anyway. Tags with the same name at any other level are + no problem, though. + +============================================================================== +8. History *tagbar-history* + +2.3 (2011-12-24) + - Add a convenience function that allows more flexible ways to + automatically open Tagbar. + - Replace option tagbar_usearrows with tagbar_iconchars to allow custom + characters to be specified. This helps with fonts that don't display the + default characters properly. + - Remove the need to provide the complete jsctags configuration if jsctags + is not found in $PATH, now only the concrete path has to be specified. + - Add debugging functionality. + +2.2 (2011-11-26) + - Small incompatible change: TagbarOpen now doesn't jump to the Tagbar + window anymore if it is already open. Use "TagbarOpen j" instead or see + its documentation for more options. + - Tags inside of scopes now have a header displaying their "kind". + - The Tagbar contents are now immediately updated on save for files + smaller than a configurable size. + - Tagbar can now be configured to jump to a tag with only a single-click + instead of a double-click. + - Most of the script has been moved to the |autoload| directory, so Vim + startup should be faster (thanks to Kien N). + - Jumping to tags should work most of the time even if the file has been + modified and not saved. + - If Ctags has been installed into the default location using Homebrew or + MacPorts it should now be found automatically. + - Several bugfixes. + +2.1 (2011-05-29) + - Make Tagbar work in (hopefully) all cases under Windows + - Handle cases where 'encoding' is different from system encoding, for + example on a Chinese Windows with 'encoding' set to "utf-8" (see manual + for details in case it doesn't work out-of-the-box) + - Fixed a bug with the handling of subtypes like "python.django" + - If a session got saved with Tagbar open it now gets restored properly + - Locally reset foldmethod/foldexpr in case foldexpr got set to something + expensive globally + - Tagbar now tries hard to go to the correct window when jumping to a tag + - Explain some possible issues with the current jsctags version in the + manual + - Explicitly check for some possible configuration problems to be able to + give better feedback + - A few other small fixes + +2.0.1 (2011-04-26) + - Fix sorting bug when 'ignorecase' is set + +2.0 (2011-04-26) + - Folding now works correctly. Folds will be preserved when leaving the + Tagbar window and when switching between files. Also tag types can be + configured to be folded by default, which is useful for things like + includes and imports. + - DoctorJS/jsctags and other compatible programs are now supported. + - All of the highlight groups can now be overridden. + - Added keybinding to quickly jump to next/previous top-level tag. + - Added Taglist's "p" keybinding for jumping to a tag without leaving the + Tagbar window. + - Several bugfixes and other small improvements. + +1.5 (2011-03-06) + - Type definitions can now include a path to a file with the ctags + definition. This is especially useful for ftplugins that can now ship + with a complete ctags and Tagbar configuration without requiring user + intervention. Thanks to Jan Christoph Ebersbach for the suggestion. + - Added autofocus setting by Taybin Rutkin. This will put the cursor in + the Tagbar window when it is opened. + - The "scopes" field is no longer needed in type definitions, the + information is already there in "scope2kind". Existing definitions will + be ignored. + - Some fixes and improvements related to redrawing and window switching. + +1.2 (2011-02-28) + - Fix typo in Ruby definition + +1.1 (2011-02-26) + - Don't lose syntax highlighting when ':syntax enable' is called + - Allow expanding the Vim window when Tagbar is opened + +1.0 (2011-02-23) + - Initial release + +============================================================================== +9. Todo *tagbar-todo* + + - Allow filtering the Tagbar content by some criteria like tag name, + visibility, kind ... + - Integrate Tagbar with the FSwitch plugin to provide header file + information in C/C++. + - Allow jumping to a tag in the preview window, a split window or a new tab. + +============================================================================== +10. Credits *tagbar-credits* + +Tagbar was written by Jan Larres and is released under the Vim licence, see +|license|. It was heavily inspired by the Taglist plugin by Yegappan +Lakshmanan and uses a small amount of code from it. + +Original taglist copyright notice: +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, taglist.vim is provided *as is* and comes with no +warranty of any kind, either expressed or implied. In no event will the +copyright holder be liable for any damamges resulting from the use of this +software. + +The folding technique was inspired by NERDTree by Martin Grenfell. + +Thanks to the following people for code contributions, feature suggestions etc: +Jan Christoph Ebersbach +Leandro Freitas +Seth Milliken +Kien N +pielgrzym +Taybin Rutkin + +============================================================================== + vim: tw=78 ts=8 sw=8 sts=8 noet ft=help diff --git a/vim/doc/taglist.txt b/vim/doc/taglist.txt new file mode 100644 index 0000000..6a62b39 --- /dev/null +++ b/vim/doc/taglist.txt @@ -0,0 +1,1501 @@ +*taglist.txt* Plugin for browsing source code + +Author: Yegappan Lakshmanan (yegappan AT yahoo DOT com) +For Vim version 6.0 and above +Last change: 2007 May 24 + +1. Overview |taglist-intro| +2. Taglist on the internet |taglist-internet| +3. Requirements |taglist-requirements| +4. Installation |taglist-install| +5. Usage |taglist-using| +6. Options |taglist-options| +7. Commands |taglist-commands| +8. Global functions |taglist-functions| +9. Extending |taglist-extend| +10. FAQ |taglist-faq| +11. License |taglist-license| +12. Todo |taglist-todo| + +============================================================================== + *taglist-intro* +1. Overview~ + +The "Tag List" plugin is a source code browser plugin for Vim. This plugin +allows you to efficiently browse through source code files for different +programming languages. The "Tag List" plugin provides the following features: + + * Displays the tags (functions, classes, structures, variables, etc.) + defined in a file in a vertically or horizontally split Vim window. + * In GUI Vim, optionally displays the tags in the Tags drop-down menu and + in the popup menu. + * Automatically updates the taglist window as you switch between + files/buffers. As you open new files, the tags defined in the new files + are added to the existing file list and the tags defined in all the + files are displayed grouped by the filename. + * When a tag name is selected from the taglist window, positions the + cursor at the definition of the tag in the source file. + * Automatically highlights the current tag name. + * Groups the tags by their type and displays them in a foldable tree. + * Can display the prototype and scope of a tag. + * Can optionally display the tag prototype instead of the tag name in the + taglist window. + * The tag list can be sorted either by name or by chronological order. + * Supports the following language files: Assembly, ASP, Awk, Beta, C, + C++, C#, Cobol, Eiffel, Erlang, Fortran, HTML, Java, Javascript, Lisp, + Lua, Make, Pascal, Perl, PHP, Python, Rexx, Ruby, Scheme, Shell, Slang, + SML, Sql, TCL, Verilog, Vim and Yacc. + * Can be easily extended to support new languages. Support for + existing languages can be modified easily. + * Provides functions to display the current tag name in the Vim status + line or the window title bar. + * The list of tags and files in the taglist can be saved and + restored across Vim sessions. + * Provides commands to get the name and prototype of the current tag. + * Runs in both console/terminal and GUI versions of Vim. + * Works with the winmanager plugin. Using the winmanager plugin, you + can use Vim plugins like the file explorer, buffer explorer and the + taglist plugin at the same time like an IDE. + * Can be used in both Unix and MS-Windows systems. + +============================================================================== + *taglist-internet* +2. Taglist on the internet~ + +The home page of the taglist plugin is at: +> + http://vim-taglist.sourceforge.net/ +< +You can subscribe to the taglist mailing list to post your questions or +suggestions for improvement or to send bug reports. Visit the following page +for subscribing to the mailing list: +> + http://groups.yahoo.com/group/taglist +< +============================================================================== + *taglist-requirements* +3. Requirements~ + +The taglist plugin requires the following: + + * Vim version 6.0 and above + * Exuberant ctags 5.0 and above + +The taglist plugin will work on all the platforms where the exuberant ctags +utility and Vim are supported (this includes MS-Windows and Unix based +systems). + +The taglist plugin relies on the exuberant ctags utility to dynamically +generate the tag listing. The exuberant ctags utility must be installed in +your system to use this plugin. The exuberant ctags utility is shipped with +most of the Linux distributions. You can download the exuberant ctags utility +from +> + http://ctags.sourceforge.net +< +The taglist plugin doesn't use or create a tags file and there is no need to +create a tags file to use this plugin. The taglist plugin will not work with +the GNU ctags or the Unix ctags utility. + +This plugin relies on the Vim "filetype" detection mechanism to determine the +type of the current file. You have to turn on the Vim filetype detection by +adding the following line to your .vimrc file: +> + filetype on +< +The taglist plugin will not work if you run Vim in the restricted mode (using +the -Z command-line argument). + +The taglist plugin uses the Vim system() function to invoke the exuberant +ctags utility. If Vim is compiled without the system() function then you +cannot use the taglist plugin. Some of the Linux distributions (Suse) compile +Vim without the system() function for security reasons. + +============================================================================== + *taglist-install* +4. Installation~ + +1. Download the taglist.zip file and unzip the files to the $HOME/.vim or the + $HOME/vimfiles or the $VIM/vimfiles directory. After this step, you should + have the following two files (the directory structure should be preserved): + + plugin/taglist.vim - main taglist plugin file + doc/taglist.txt - documentation (help) file + + Refer to the |add-plugin|and |'runtimepath'| Vim help pages for more + details about installing Vim plugins. +2. Change to the $HOME/.vim/doc or $HOME/vimfiles/doc or $VIM/vimfiles/doc + directory, start Vim and run the ":helptags ." command to process the + taglist help file. Without this step, you cannot jump to the taglist help + topics. +3. If the exuberant ctags utility is not present in one of the directories in + the PATH environment variable, then set the 'Tlist_Ctags_Cmd' variable to + point to the location of the exuberant ctags utility (not to the directory) + in the .vimrc file. +4. If you are running a terminal/console version of Vim and the terminal + doesn't support changing the window width then set the + 'Tlist_Inc_Winwidth' variable to 0 in the .vimrc file. +5. Restart Vim. +6. You can now use the ":TlistToggle" command to open/close the taglist + window. You can use the ":help taglist" command to get more information + about using the taglist plugin. + +To uninstall the taglist plugin, remove the plugin/taglist.vim and +doc/taglist.txt files from the $HOME/.vim or $HOME/vimfiles directory. + +============================================================================== + *taglist-using* +5. Usage~ + +The taglist plugin can be used in several different ways. + +1. You can keep the taglist window open during the entire editing session. On + opening the taglist window, the tags defined in all the files in the Vim + buffer list will be displayed in the taglist window. As you edit files, the + tags defined in them will be added to the taglist window. You can select a + tag from the taglist window and jump to it. The current tag will be + highlighted in the taglist window. You can close the taglist window when + you no longer need the window. +2. You can configure the taglist plugin to process the tags defined in all the + edited files always. In this configuration, even if the taglist window is + closed and the taglist menu is not displayed, the taglist plugin will + processes the tags defined in newly edited files. You can then open the + taglist window only when you need to select a tag and then automatically + close the taglist window after selecting the tag. +3. You can configure the taglist plugin to display only the tags defined in + the current file in the taglist window. By default, the taglist plugin + displays the tags defined in all the files in the Vim buffer list. As you + switch between files, the taglist window will be refreshed to display only + the tags defined in the current file. +4. In GUI Vim, you can use the Tags pull-down and popup menu created by the + taglist plugin to display the tags defined in the current file and select a + tag to jump to it. You can use the menu without opening the taglist window. + By default, the Tags menu is disabled. +5. You can configure the taglist plugin to display the name of the current tag + in the Vim window status line or in the Vim window title bar. For this to + work without the taglist window or menu, you need to configure the taglist + plugin to process the tags defined in a file always. +6. You can save the tags defined in multiple files to a taglist session file + and load it when needed. You can also configure the taglist plugin to not + update the taglist window when editing new files. You can then manually add + files to the taglist window. + +Opening the taglist window~ +You can open the taglist window using the ":TlistOpen" or the ":TlistToggle" +commands. The ":TlistOpen" command opens the taglist window and jumps to it. +The ":TlistToggle" command opens or closes (toggle) the taglist window and the +cursor remains in the current window. If the 'Tlist_GainFocus_On_ToggleOpen' +variable is set to 1, then the ":TlistToggle" command opens the taglist window +and moves the cursor to the taglist window. + +You can map a key to invoke these commands. For example, the following command +creates a normal mode mapping for the <F8> key to toggle the taglist window. +> + nnoremap <silent> <F8> :TlistToggle<CR> +< +Add the above mapping to your ~/.vimrc or $HOME/_vimrc file. + +To automatically open the taglist window on Vim startup, set the +'Tlist_Auto_Open' variable to 1. + +You can also open the taglist window on startup using the following command +line: +> + $ vim +TlistOpen +< +Closing the taglist window~ +You can close the taglist window from the taglist window by pressing 'q' or +using the Vim ":q" command. You can also use any of the Vim window commands to +close the taglist window. Invoking the ":TlistToggle" command when the taglist +window is opened, closes the taglist window. You can also use the +":TlistClose" command to close the taglist window. + +To automatically close the taglist window when a tag or file is selected, you +can set the 'Tlist_Close_On_Select' variable to 1. To exit Vim when only the +taglist window is present, set the 'Tlist_Exit_OnlyWindow' variable to 1. + +Jumping to a tag or a file~ +You can select a tag in the taglist window either by pressing the <Enter> key +or by double clicking the tag name using the mouse. To jump to a tag on a +single mouse click set the 'Tlist_Use_SingleClick' variable to 1. + +If the selected file is already opened in a window, then the cursor is moved +to that window. If the file is not currently opened in a window then the file +is opened in the window used by the taglist plugin to show the previously +selected file. If there are no usable windows, then the file is opened in a +new window. The file is not opened in special windows like the quickfix +window, preview window and windows containing buffer with the 'buftype' option +set. + +To jump to the tag in a new window, press the 'o' key. To open the file in the +previous window (Ctrl-W_p) use the 'P' key. You can press the 'p' key to jump +to the tag but still keep the cursor in the taglist window (preview). + +To open the selected file in a tab, use the 't' key. If the file is already +present in a tab then the cursor is moved to that tab otherwise the file is +opened in a new tab. To jump to a tag in a new tab press Ctrl-t. The taglist +window is automatically opened in the newly created tab. + +Instead of jumping to a tag, you can open a file by pressing the <Enter> key +or by double clicking the file name using the mouse. + +In the taglist window, you can use the [[ or <Backspace> key to jump to the +beginning of the previous file. You can use the ]] or <Tab> key to jump to the +beginning of the next file. When you reach the first or last file, the search +wraps around and the jumps to the next/previous file. + +Highlighting the current tag~ +The taglist plugin automatically highlights the name of the current tag in the +taglist window. The Vim |CursorHold| autocmd event is used for this. If the +current tag name is not visible in the taglist window, then the taglist window +contents are scrolled to make that tag name visible. You can also use the +":TlistHighlightTag" command to force the highlighting of the current tag. + +The tag name is highlighted if no activity is performed for |'updatetime'| +milliseconds. The default value for this Vim option is 4 seconds. To avoid +unexpected problems, you should not set the |'updatetime'| option to a very +low value. + +To disable the automatic highlighting of the current tag name in the taglist +window, set the 'Tlist_Auto_Highlight_Tag' variable to zero. + +When entering a Vim buffer/window, the taglist plugin automatically highlights +the current tag in that buffer/window. If you like to disable the automatic +highlighting of the current tag when entering a buffer, set the +'Tlist_Highlight_Tag_On_BufEnter' variable to zero. + +Adding files to the taglist~ +When the taglist window is opened, all the files in the Vim buffer list are +processed and the supported files are added to the taglist. When you edit a +file in Vim, the taglist plugin automatically processes this file and adds it +to the taglist. If you close the taglist window, the tag information in the +taglist is retained. + +To process files even when the taglist window is not open, set the +'Tlist_Process_File_Always' variable to 1. + +You can manually add multiple files to the taglist without opening them using +the ":TlistAddFiles" and the ":TlistAddFilesRecursive" commands. + +For example, to add all the C files in the /my/project/dir directory to the +taglist, you can use the following command: +> + :TlistAddFiles /my/project/dir/*.c +< +Note that when adding several files with a large number of tags or a large +number of files, it will take several seconds to several minutes for the +taglist plugin to process all the files. You should not interrupt the taglist +plugin by pressing <CTRL-C>. + +You can recursively add multiple files from a directory tree using the +":TlistAddFilesRecursive" command: +> + :TlistAddFilesRecursive /my/project/dir *.c +< +This command takes two arguments. The first argument specifies the directory +from which to recursively add the files. The second optional argument +specifies the wildcard matching pattern for selecting the files to add. The +default pattern is * and all the files are added. + +Displaying tags for only one file~ +The taglist window displays the tags for all the files in the Vim buffer list +and all the manually added files. To display the tags for only the current +active buffer, set the 'Tlist_Show_One_File' variable to 1. + +Removing files from the taglist~ +You can remove a file from the taglist window, by pressing the 'd' key when the +cursor is on one of the tags listed for the file in the taglist window. The +removed file will no longer be displayed in the taglist window in the current +Vim session. To again display the tags for the file, open the file in a Vim +window and then use the ":TlistUpdate" command or use ":TlistAddFiles" command +to add the file to the taglist. + +When a buffer is removed from the Vim buffer list using the ":bdelete" or the +":bwipeout" command, the taglist is updated to remove the stored information +for this buffer. + +Updating the tags displayed for a file~ +The taglist plugin keeps track of the modification time of a file. When the +modification time changes (the file is modified), the taglist plugin +automatically updates the tags listed for that file. The modification time of +a file is checked when you enter a window containing that file or when you +load that file. + +You can also update or refresh the tags displayed for a file by pressing the +"u" key in the taglist window. If an existing file is modified, after the file +is saved, the taglist plugin automatically updates the tags displayed for the +file. + +You can also use the ":TlistUpdate" command to update the tags for the current +buffer after you made some changes to it. You should save the modified buffer +before you update the taglist window. Otherwise the listed tags will not +include the new tags created in the buffer. + +If you have deleted the tags displayed for a file in the taglist window using +the 'd' key, you can again display the tags for that file using the +":TlistUpdate" command. + +Controlling the taglist updates~ +To disable the automatic processing of new files or modified files, you can +set the 'Tlist_Auto_Update' variable to zero. When this variable is set to +zero, the taglist is updated only when you use the ":TlistUpdate" command or +the ":TlistAddFiles" or the ":TlistAddFilesRecursive" commands. You can use +this option to control which files are added to the taglist. + +You can use the ":TlistLock" command to lock the taglist contents. After this +command is executed, new files are not automatically added to the taglist. +When the taglist is locked, you can use the ":TlistUpdate" command to add the +current file or the ":TlistAddFiles" or ":TlistAddFilesRecursive" commands to +add new files to the taglist. To unlock the taglist, use the ":TlistUnlock" +command. + +Displaying the tag prototype~ +To display the prototype of the tag under the cursor in the taglist window, +press the space bar. If you place the cursor on a tag name in the taglist +window, then the tag prototype is displayed at the Vim status line after +|'updatetime'| milliseconds. The default value for the |'updatetime'| Vim +option is 4 seconds. + +You can get the name and prototype of a tag without opening the taglist window +and the taglist menu using the ":TlistShowTag" and the ":TlistShowPrototype" +commands. These commands will work only if the current file is already present +in the taglist. To use these commands without opening the taglist window, set +the 'Tlist_Process_File_Always' variable to 1. + +You can use the ":TlistShowTag" command to display the name of the tag at or +before the specified line number in the specified file. If the file name and +line number are not supplied, then this command will display the name of the +current tag. For example, +> + :TlistShowTag + :TlistShowTag myfile.java 100 +< +You can use the ":TlistShowPrototype" command to display the prototype of the +tag at or before the specified line number in the specified file. If the file +name and the line number are not supplied, then this command will display the +prototype of the current tag. For example, +> + :TlistShowPrototype + :TlistShowPrototype myfile.c 50 +< +In the taglist window, when the mouse is moved over a tag name, the tag +prototype is displayed in a balloon. This works only in GUI versions where +balloon evaluation is supported. + +Taglist window contents~ +The taglist window contains the tags defined in various files in the taglist +grouped by the filename and by the tag type (variable, function, class, etc.). +For tags with scope information (like class members, structures inside +structures, etc.), the scope information is displayed in square brackets "[]" +after the tag name. + +The contents of the taglist buffer/window are managed by the taglist plugin. +The |'filetype'| for the taglist buffer is set to 'taglist'. The Vim +|'modifiable'| option is turned off for the taglist buffer. You should not +manually edit the taglist buffer, by setting the |'modifiable'| flag. If you +manually edit the taglist buffer contents, then the taglist plugin will be out +of sync with the taglist buffer contents and the plugin will no longer work +correctly. To redisplay the taglist buffer contents again, close the taglist +window and reopen it. + +Opening and closing the tag and file tree~ +In the taglist window, the tag names are displayed as a foldable tree using +the Vim folding support. You can collapse the tree using the '-' key or using +the Vim |zc| fold command. You can open the tree using the '+' key or using +the Vim |zo| fold command. You can open all the folds using the '*' key or +using the Vim |zR| fold command. You can also use the mouse to open/close the +folds. You can close all the folds using the '=' key. You should not manually +create or delete the folds in the taglist window. + +To automatically close the fold for the inactive files/buffers and open only +the fold for the current buffer in the taglist window, set the +'Tlist_File_Fold_Auto_Close' variable to 1. + +Sorting the tags for a file~ +The tags displayed in the taglist window can be sorted either by their name or +by their chronological order. The default sorting method is by the order in +which the tags appear in a file. You can change the default sort method by +setting the 'Tlist_Sort_Type' variable to either "name" or "order". You can +sort the tags by their name by pressing the "s" key in the taglist window. You +can again sort the tags by their chronological order using the "s" key. Each +file in the taglist window can be sorted using different order. + +Zooming in and out of the taglist window~ +You can press the 'x' key in the taglist window to maximize the taglist +window width/height. The window will be maximized to the maximum possible +width/height without closing the other existing windows. You can again press +'x' to restore the taglist window to the default width/height. + + *taglist-session* +Taglist Session~ +A taglist session refers to the group of files and their tags stored in the +taglist in a Vim session. + +You can save and restore a taglist session (and all the displayed tags) using +the ":TlistSessionSave" and ":TlistSessionLoad" commands. + +To save the information about the tags and files in the taglist to a file, use +the ":TlistSessionSave" command and specify the filename: +> + :TlistSessionSave <file name> +< +To load a saved taglist session, use the ":TlistSessionLoad" command: > + + :TlistSessionLoad <file name> +< +When you load a taglist session file, the tags stored in the file will be +added to the tags already stored in the taglist. + +The taglist session feature can be used to save the tags for large files or a +group of frequently used files (like a project). By using the taglist session +file, you can minimize the amount to time it takes to load/refresh the taglist +for multiple files. + +You can create more than one taglist session file for multiple groups of +files. + +Displaying the tag name in the Vim status line or the window title bar~ +You can use the Tlist_Get_Tagname_By_Line() function provided by the taglist +plugin to display the current tag name in the Vim status line or the window +title bar. Similarly, you can use the Tlist_Get_Tag_Prototype_By_Line() +function to display the current tag prototype in the Vim status line or the +window title bar. + +For example, the following command can be used to display the current tag name +in the status line: +> + :set statusline=%<%f%=%([%{Tlist_Get_Tagname_By_Line()}]%) +< +The following command can be used to display the current tag name in the +window title bar: +> + :set title titlestring=%<%f\ %([%{Tlist_Get_Tagname_By_Line()}]%) +< +Note that the current tag name can be displayed only after the file is +processed by the taglist plugin. For this, you have to either set the +'Tlist_Process_File_Always' variable to 1 or open the taglist window or use +the taglist menu. For more information about configuring the Vim status line, +refer to the documentation for the Vim |'statusline'| option. + +Changing the taglist window highlighting~ +The following Vim highlight groups are defined and used to highlight the +various entities in the taglist window: + + TagListTagName - Used for tag names + TagListTagScope - Used for tag scope + TagListTitle - Used for tag titles + TagListComment - Used for comments + TagListFileName - Used for filenames + +By default, these highlight groups are linked to the standard Vim highlight +groups. If you want to change the colors used for these highlight groups, +prefix the highlight group name with 'My' and define it in your .vimrc or +.gvimrc file: MyTagListTagName, MyTagListTagScope, MyTagListTitle, +MyTagListComment and MyTagListFileName. For example, to change the colors +used for tag names, you can use the following command: +> + :highlight MyTagListTagName guifg=blue ctermfg=blue +< +Controlling the taglist window~ +To use a horizontally split taglist window, instead of a vertically split +window, set the 'Tlist_Use_Horiz_Window' variable to 1. + +To use a vertically split taglist window on the rightmost side of the Vim +window, set the 'Tlist_Use_Right_Window' variable to 1. + +You can specify the width of the vertically split taglist window, by setting +the 'Tlist_WinWidth' variable. You can specify the height of the horizontally +split taglist window, by setting the 'Tlist_WinHeight' variable. + +When opening a vertically split taglist window, the Vim window width is +increased to accommodate the new taglist window. When the taglist window is +closed, the Vim window is reduced. To disable this, set the +'Tlist_Inc_Winwidth' variable to zero. + +To reduce the number of empty lines in the taglist window, set the +'Tlist_Compact_Format' variable to 1. + +To not display the Vim fold column in the taglist window, set the +'Tlist_Enable_Fold_Column' variable to zero. + +To display the tag prototypes instead of the tag names in the taglist window, +set the 'Tlist_Display_Prototype' variable to 1. + +To not display the scope of the tags next to the tag names, set the +'Tlist_Display_Tag_Scope' variable to zero. + + *taglist-keys* +Taglist window key list~ +The following table lists the description of the keys that can be used +in the taglist window. + + Key Description~ + + <CR> Jump to the location where the tag under cursor is + defined. + o Jump to the location where the tag under cursor is + defined in a new window. + P Jump to the tag in the previous (Ctrl-W_p) window. + p Display the tag definition in the file window and + keep the cursor in the taglist window itself. + t Jump to the tag in a new tab. If the file is already + opened in a tab, move to that tab. + Ctrl-t Jump to the tag in a new tab. + <Space> Display the prototype of the tag under the cursor. + For file names, display the full path to the file, + file type and the number of tags. For tag types, display the + tag type and the number of tags. + u Update the tags listed in the taglist window + s Change the sort order of the tags (by name or by order) + d Remove the tags for the file under the cursor + x Zoom-in or Zoom-out the taglist window + + Open a fold + - Close a fold + * Open all folds + = Close all folds + [[ Jump to the beginning of the previous file + <Backspace> Jump to the beginning of the previous file + ]] Jump to the beginning of the next file + <Tab> Jump to the beginning of the next file + q Close the taglist window + <F1> Display help + +The above keys will work in both the normal mode and the insert mode. + + *taglist-menu* +Taglist menu~ +When using GUI Vim, the taglist plugin can display the tags defined in the +current file in the drop-down menu and the popup menu. By default, this +feature is turned off. To turn on this feature, set the 'Tlist_Show_Menu' +variable to 1. + +You can jump to a tag by selecting the tag name from the menu. You can use the +taglist menu independent of the taglist window i.e. you don't need to open the +taglist window to get the taglist menu. + +When you switch between files/buffers, the taglist menu is automatically +updated to display the tags defined in the current file/buffer. + +The tags are grouped by their type (variables, functions, classes, methods, +etc.) and displayed as a separate sub-menu for each type. If all the tags +defined in a file are of the same type (e.g. functions), then the sub-menu is +not used. + +If the number of items in a tag type submenu exceeds the value specified by +the 'Tlist_Max_Submenu_Items' variable, then the submenu will be split into +multiple submenus. The default setting for 'Tlist_Max_Submenu_Items' is 25. +The first and last tag names in the submenu are used to form the submenu name. +The menu items are prefixed by alpha-numeric characters for easy selection by +keyboard. + +If the popup menu support is enabled (the |'mousemodel'| option contains +"popup"), then the tags menu is added to the popup menu. You can access +the popup menu by right clicking on the GUI window. + +You can regenerate the tags menu by selecting the 'Tags->Refresh menu' entry. +You can sort the tags listed in the menu either by name or by order by +selecting the 'Tags->Sort menu by->Name/Order' menu entry. + +You can tear-off the Tags menu and keep it on the side of the Vim window +for quickly locating the tags. + +Using the taglist plugin with the winmanager plugin~ +You can use the taglist plugin with the winmanager plugin. This will allow you +to use the file explorer, buffer explorer and the taglist plugin at the same +time in different windows. To use the taglist plugin with the winmanager +plugin, set 'TagList' in the 'winManagerWindowLayout' variable. For example, +to use the file explorer plugin and the taglist plugin at the same time, use +the following setting: > + + let winManagerWindowLayout = 'FileExplorer|TagList' +< +Getting help~ +If you have installed the taglist help file (this file), then you can use the +Vim ":help taglist-<keyword>" command to get help on the various taglist +topics. + +You can press the <F1> key in the taglist window to display the help +information about using the taglist window. If you again press the <F1> key, +the help information is removed from the taglist window. + + *taglist-debug* +Debugging the taglist plugin~ +You can use the ":TlistDebug" command to enable logging of the debug messages +from the taglist plugin. To display the logged debug messages, you can use the +":TlistMessages" command. To disable the logging of the debug messages, use +the ":TlistUndebug" command. + +You can specify a file name to the ":TlistDebug" command to log the debug +messages to a file. Otherwise, the debug messages are stored in a script-local +variable. In the later case, to minimize memory usage, only the last 3000 +characters from the debug messages are stored. + +============================================================================== + *taglist-options* +6. Options~ + +A number of Vim variables control the behavior of the taglist plugin. These +variables are initialized to a default value. By changing these variables you +can change the behavior of the taglist plugin. You need to change these +settings only if you want to change the behavior of the taglist plugin. You +should use the |:let| command in your .vimrc file to change the setting of any +of these variables. + +The configurable taglist variables are listed below. For a detailed +description of these variables refer to the text below this table. + +|'Tlist_Auto_Highlight_Tag'| Automatically highlight the current tag in the + taglist. +|'Tlist_Auto_Open'| Open the taglist window when Vim starts. +|'Tlist_Auto_Update'| Automatically update the taglist to include + newly edited files. +|'Tlist_Close_On_Select'| Close the taglist window when a file or tag is + selected. +|'Tlist_Compact_Format'| Remove extra information and blank lines from + the taglist window. +|'Tlist_Ctags_Cmd'| Specifies the path to the ctags utility. +|'Tlist_Display_Prototype'| Show prototypes and not tags in the taglist + window. +|'Tlist_Display_Tag_Scope'| Show tag scope next to the tag name. +|'Tlist_Enable_Fold_Column'| Show the fold indicator column in the taglist + window. +|'Tlist_Exit_OnlyWindow'| Close Vim if the taglist is the only window. +|'Tlist_File_Fold_Auto_Close'| Close tag folds for inactive buffers. +|'Tlist_GainFocus_On_ToggleOpen'| + Jump to taglist window on open. +|'Tlist_Highlight_Tag_On_BufEnter'| + On entering a buffer, automatically highlight + the current tag. +|'Tlist_Inc_Winwidth'| Increase the Vim window width to accommodate + the taglist window. +|'Tlist_Max_Submenu_Items'| Maximum number of items in a tags sub-menu. +|'Tlist_Max_Tag_Length'| Maximum tag length used in a tag menu entry. +|'Tlist_Process_File_Always'| Process files even when the taglist window is + closed. +|'Tlist_Show_Menu'| Display the tags menu. +|'Tlist_Show_One_File'| Show tags for the current buffer only. +|'Tlist_Sort_Type'| Sort method used for arranging the tags. +|'Tlist_Use_Horiz_Window'| Use a horizontally split window for the + taglist window. +|'Tlist_Use_Right_Window'| Place the taglist window on the right side. +|'Tlist_Use_SingleClick'| Single click on a tag jumps to it. +|'Tlist_WinHeight'| Horizontally split taglist window height. +|'Tlist_WinWidth'| Vertically split taglist window width. + + *'Tlist_Auto_Highlight_Tag'* +Tlist_Auto_Highlight_Tag~ +The taglist plugin will automatically highlight the current tag in the taglist +window. If you want to disable this, then you can set the +'Tlist_Auto_Highlight_Tag' variable to zero. Note that even though the current +tag highlighting is disabled, the tags for a new file will still be added to +the taglist window. +> + let Tlist_Auto_Highlight_Tag = 0 +< +With the above variable set to 1, you can use the ":TlistHighlightTag" command +to highlight the current tag. + + *'Tlist_Auto_Open'* +Tlist_Auto_Open~ +To automatically open the taglist window, when you start Vim, you can set the +'Tlist_Auto_Open' variable to 1. By default, this variable is set to zero and +the taglist window will not be opened automatically on Vim startup. +> + let Tlist_Auto_Open = 1 +< +The taglist window is opened only when a supported type of file is opened on +Vim startup. For example, if you open text files, then the taglist window will +not be opened. + + *'Tlist_Auto_Update'* +Tlist_Auto_Update~ +When a new file is edited, the tags defined in the file are automatically +processed and added to the taglist. To stop adding new files to the taglist, +set the 'Tlist_Auto_Update' variable to zero. By default, this variable is set +to 1. +> + let Tlist_Auto_Update = 0 +< +With the above variable set to 1, you can use the ":TlistUpdate" command to +add the tags defined in the current file to the taglist. + + *'Tlist_Close_On_Select'* +Tlist_Close_On_Select~ +If you want to close the taglist window when a file or tag is selected, then +set the 'Tlist_Close_On_Select' variable to 1. By default, this variable is +set zero and when you select a tag or file from the taglist window, the window +is not closed. +> + let Tlist_Close_On_Select = 1 +< + *'Tlist_Compact_Format'* +Tlist_Compact_Format~ +By default, empty lines are used to separate different tag types displayed for +a file and the tags displayed for different files in the taglist window. If +you want to display as many tags as possible in the taglist window, you can +set the 'Tlist_Compact_Format' variable to 1 to get a compact display. +> + let Tlist_Compact_Format = 1 +< + *'Tlist_Ctags_Cmd'* +Tlist_Ctags_Cmd~ +The 'Tlist_Ctags_Cmd' variable specifies the location (path) of the exuberant +ctags utility. If exuberant ctags is present in any one of the directories in +the PATH environment variable, then there is no need to set this variable. + +The exuberant ctags tool can be installed under different names. When the +taglist plugin starts up, if the 'Tlist_Ctags_Cmd' variable is not set, it +checks for the names exuberant-ctags, exctags, ctags, ctags.exe and tags in +the PATH environment variable. If any one of the named executable is found, +then the Tlist_Ctags_Cmd variable is set to that name. + +If exuberant ctags is not present in one of the directories specified in the +PATH environment variable, then set this variable to point to the location of +the ctags utility in your system. Note that this variable should point to the +fully qualified exuberant ctags location and NOT to the directory in which +exuberant ctags is installed. If the exuberant ctags tool is not found in +either PATH or in the specified location, then the taglist plugin will not be +loaded. Examples: +> + let Tlist_Ctags_Cmd = 'd:\tools\ctags.exe' + let Tlist_Ctags_Cmd = '/usr/local/bin/ctags' +< + *'Tlist_Display_Prototype'* +Tlist_Display_Prototype~ +By default, only the tag name will be displayed in the taglist window. If you +like to see tag prototypes instead of names, set the 'Tlist_Display_Prototype' +variable to 1. By default, this variable is set to zero and only tag names +will be displayed. +> + let Tlist_Display_Prototype = 1 +< + *'Tlist_Display_Tag_Scope'* +Tlist_Display_Tag_Scope~ +By default, the scope of a tag (like a C++ class) will be displayed in +square brackets next to the tag name. If you don't want the tag scopes +to be displayed, then set the 'Tlist_Display_Tag_Scope' to zero. By default, +this variable is set to 1 and the tag scopes will be displayed. +> + let Tlist_Display_Tag_Scope = 0 +< + *'Tlist_Enable_Fold_Column'* +Tlist_Enable_Fold_Column~ +By default, the Vim fold column is enabled and displayed in the taglist +window. If you wish to disable this (for example, when you are working with a +narrow Vim window or terminal), you can set the 'Tlist_Enable_Fold_Column' +variable to zero. +> + let Tlist_Enable_Fold_Column = 1 +< + *'Tlist_Exit_OnlyWindow'* +Tlist_Exit_OnlyWindow~ +If you want to exit Vim if only the taglist window is currently opened, then +set the 'Tlist_Exit_OnlyWindow' variable to 1. By default, this variable is +set to zero and the Vim instance will not be closed if only the taglist window +is present. +> + let Tlist_Exit_OnlyWindow = 1 +< + *'Tlist_File_Fold_Auto_Close'* +Tlist_File_Fold_Auto_Close~ +By default, the tags tree displayed in the taglist window for all the files is +opened. You can close/fold the tags tree for the files manually. To +automatically close the tags tree for inactive files, you can set the +'Tlist_File_Fold_Auto_Close' variable to 1. When this variable is set to 1, +the tags tree for the current buffer is automatically opened and for all the +other buffers is closed. +> + let Tlist_File_Fold_Auto_Close = 1 +< + *'Tlist_GainFocus_On_ToggleOpen'* +Tlist_GainFocus_On_ToggleOpen~ +When the taglist window is opened using the ':TlistToggle' command, this +option controls whether the cursor is moved to the taglist window or remains +in the current window. By default, this option is set to 0 and the cursor +remains in the current window. When this variable is set to 1, the cursor +moves to the taglist window after opening the taglist window. +> + let Tlist_GainFocus_On_ToggleOpen = 1 +< + *'Tlist_Highlight_Tag_On_BufEnter'* +Tlist_Highlight_Tag_On_BufEnter~ +When you enter a Vim buffer/window, the current tag in that buffer/window is +automatically highlighted in the taglist window. If the current tag name is +not visible in the taglist window, then the taglist window contents are +scrolled to make that tag name visible. If you like to disable the automatic +highlighting of the current tag when entering a buffer, you can set the +'Tlist_Highlight_Tag_On_BufEnter' variable to zero. The default setting for +this variable is 1. +> + let Tlist_Highlight_Tag_On_BufEnter = 0 +< + *'Tlist_Inc_Winwidth'* +Tlist_Inc_Winwidth~ +By default, when the width of the window is less than 100 and a new taglist +window is opened vertically, then the window width is increased by the value +set in the 'Tlist_WinWidth' variable to accommodate the new window. The value +of this variable is used only if you are using a vertically split taglist +window. + +If your terminal doesn't support changing the window width from Vim (older +version of xterm running in a Unix system) or if you see any weird problems in +the screen due to the change in the window width or if you prefer not to +adjust the window width then set the 'Tlist_Inc_Winwidth' variable to zero. +CAUTION: If you are using the MS-Windows version of Vim in a MS-DOS command +window then you must set this variable to zero, otherwise the system may hang +due to a Vim limitation (explained in :help win32-problems) +> + let Tlist_Inc_Winwidth = 0 +< + *'Tlist_Max_Submenu_Items'* +Tlist_Max_Submenu_Items~ +If a file contains too many tags of a particular type (function, variable, +class, etc.), greater than that specified by the 'Tlist_Max_Submenu_Items' +variable, then the menu for that tag type will be split into multiple +sub-menus. The default setting for the 'Tlist_Max_Submenu_Items' variable is +25. This can be changed by setting the 'Tlist_Max_Submenu_Items' variable: +> + let Tlist_Max_Submenu_Items = 20 +< +The name of the submenu is formed using the names of the first and the last +tag entries in that submenu. + + *'Tlist_Max_Tag_Length'* +Tlist_Max_Tag_Length~ +Only the first 'Tlist_Max_Tag_Length' characters from the tag names will be +used to form the tag type submenu name. The default value for this variable is +10. Change the 'Tlist_Max_Tag_Length' setting if you want to include more or +less characters: +> + let Tlist_Max_Tag_Length = 10 +< + *'Tlist_Process_File_Always'* +Tlist_Process_File_Always~ +By default, the taglist plugin will generate and process the tags defined in +the newly opened files only when the taglist window is opened or when the +taglist menu is enabled. When the taglist window is closed, the taglist plugin +will stop processing the tags for newly opened files. + +You can set the 'Tlist_Process_File_Always' variable to 1 to generate the list +of tags for new files even when the taglist window is closed and the taglist +menu is disabled. +> + let Tlist_Process_File_Always = 1 +< +To use the ":TlistShowTag" and the ":TlistShowPrototype" commands without the +taglist window and the taglist menu, you should set this variable to 1. + + *'Tlist_Show_Menu'* +Tlist_Show_Menu~ +When using GUI Vim, you can display the tags defined in the current file in a +menu named "Tags". By default, this feature is turned off. To turn on this +feature, set the 'Tlist_Show_Menu' variable to 1: +> + let Tlist_Show_Menu = 1 +< + *'Tlist_Show_One_File'* +Tlist_Show_One_File~ +By default, the taglist plugin will display the tags defined in all the loaded +buffers in the taglist window. If you prefer to display the tags defined only +in the current buffer, then you can set the 'Tlist_Show_One_File' to 1. When +this variable is set to 1, as you switch between buffers, the taglist window +will be refreshed to display the tags for the current buffer and the tags for +the previous buffer will be removed. +> + let Tlist_Show_One_File = 1 +< + *'Tlist_Sort_Type'* +Tlist_Sort_Type~ +The 'Tlist_Sort_Type' variable specifies the sort order for the tags in the +taglist window. The tags can be sorted either alphabetically by their name or +by the order of their appearance in the file (chronological order). By +default, the tag names will be listed by the order in which they are defined +in the file. You can change the sort type (from name to order or from order to +name) by pressing the "s" key in the taglist window. You can also change the +default sort order by setting 'Tlist_Sort_Type' to "name" or "order": +> + let Tlist_Sort_Type = "name" +< + *'Tlist_Use_Horiz_Window'* +Tlist_Use_Horiz_Window~ +Be default, the tag names are displayed in a vertically split window. If you +prefer a horizontally split window, then set the 'Tlist_Use_Horiz_Window' +variable to 1. If you are running MS-Windows version of Vim in a MS-DOS +command window, then you should use a horizontally split window instead of a +vertically split window. Also, if you are using an older version of xterm in a +Unix system that doesn't support changing the xterm window width, you should +use a horizontally split window. +> + let Tlist_Use_Horiz_Window = 1 +< + *'Tlist_Use_Right_Window'* +Tlist_Use_Right_Window~ +By default, the vertically split taglist window will appear on the left hand +side. If you prefer to open the window on the right hand side, you can set the +'Tlist_Use_Right_Window' variable to 1: +> + let Tlist_Use_Right_Window = 1 +< + *'Tlist_Use_SingleClick'* +Tlist_Use_SingleClick~ +By default, when you double click on the tag name using the left mouse +button, the cursor will be positioned at the definition of the tag. You +can set the 'Tlist_Use_SingleClick' variable to 1 to jump to a tag when +you single click on the tag name using the mouse. By default this variable +is set to zero. +> + let Tlist_Use_SingleClick = 1 +< +Due to a bug in Vim, if you set 'Tlist_Use_SingleClick' to 1 and try to resize +the taglist window using the mouse, then Vim will crash. This problem is fixed +in Vim 6.3 and above. In the meantime, instead of resizing the taglist window +using the mouse, you can use normal Vim window resizing commands to resize the +taglist window. + + *'Tlist_WinHeight'* +Tlist_WinHeight~ +The default height of the horizontally split taglist window is 10. This can be +changed by modifying the 'Tlist_WinHeight' variable: +> + let Tlist_WinHeight = 20 +< +The |'winfixheight'| option is set for the taglist window, to maintain the +height of the taglist window, when new Vim windows are opened and existing +windows are closed. + + *'Tlist_WinWidth'* +Tlist_WinWidth~ +The default width of the vertically split taglist window is 30. This can be +changed by modifying the 'Tlist_WinWidth' variable: +> + let Tlist_WinWidth = 20 +< +Note that the value of the |'winwidth'| option setting determines the minimum +width of the current window. If you set the 'Tlist_WinWidth' variable to a +value less than that of the |'winwidth'| option setting, then Vim will use the +value of the |'winwidth'| option. + +When new Vim windows are opened and existing windows are closed, the taglist +plugin will try to maintain the width of the taglist window to the size +specified by the 'Tlist_WinWidth' variable. + +============================================================================== + *taglist-commands* +7. Commands~ + +The taglist plugin provides the following ex-mode commands: + +|:TlistAddFiles| Add multiple files to the taglist. +|:TlistAddFilesRecursive| + Add files recursively to the taglist. +|:TlistClose| Close the taglist window. +|:TlistDebug| Start logging of taglist debug messages. +|:TlistLock| Stop adding new files to the taglist. +|:TlistMessages| Display the logged taglist plugin debug messages. +|:TlistOpen| Open and jump to the taglist window. +|:TlistSessionSave| Save the information about files and tags in the + taglist to a session file. +|:TlistSessionLoad| Load the information about files and tags stored + in a session file to taglist. +|:TlistShowPrototype| Display the prototype of the tag at or before the + specified line number. +|:TlistShowTag| Display the name of the tag defined at or before the + specified line number. +|:TlistHighlightTag| Highlight the current tag in the taglist window. +|:TlistToggle| Open or close (toggle) the taglist window. +|:TlistUndebug| Stop logging of taglist debug messages. +|:TlistUnlock| Start adding new files to the taglist. +|:TlistUpdate| Update the tags for the current buffer. + + *:TlistAddFiles* +:TlistAddFiles {file(s)} [file(s) ...] + Add one or more specified files to the taglist. You can + specify multiple filenames using wildcards. To specify a + file name with space character, you should escape the space + character with a backslash. + Examples: +> + :TlistAddFiles *.c *.cpp + :TlistAddFiles file1.html file2.html +< + If you specify a large number of files, then it will take some + time for the taglist plugin to process all of them. The + specified files will not be edited in a Vim window and will + not be added to the Vim buffer list. + + *:TlistAddFilesRecursive* +:TlistAddFilesRecursive {directory} [ {pattern} ] + Add files matching {pattern} recursively from the specified + {directory} to the taglist. If {pattern} is not specified, + then '*' is assumed. To specify the current directory, use "." + for {directory}. To specify a directory name with space + character, you should escape the space character with a + backslash. + Examples: +> + :TlistAddFilesRecursive myproject *.java + :TlistAddFilesRecursive smallproject +< + If large number of files are present in the specified + directory tree, then it will take some time for the taglist + plugin to process all of them. + + *:TlistClose* +:TlistClose Close the taglist window. This command can be used from any + one of the Vim windows. + + *:TlistDebug* +:TlistDebug [filename] + Start logging of debug messages from the taglist plugin. + If {filename} is specified, then the debug messages are stored + in the specified file. Otherwise, the debug messages are + stored in a script local variable. If the file {filename} is + already present, then it is overwritten. + + *:TlistLock* +:TlistLock + Lock the taglist and don't process new files. After this + command is executed, newly edited files will not be added to + the taglist. + + *:TlistMessages* +:TlistMessages + Display the logged debug messages from the taglist plugin + in a window. This command works only when logging to a + script-local variable. + + *:TlistOpen* +:TlistOpen Open and jump to the taglist window. Creates the taglist + window, if the window is not opened currently. After executing + this command, the cursor is moved to the taglist window. When + the taglist window is opened for the first time, all the files + in the buffer list are processed and the tags defined in them + are displayed in the taglist window. + + *:TlistSessionSave* +:TlistSessionSave {filename} + Saves the information about files and tags in the taglist to + the specified file. This command can be used to save and + restore the taglist contents across Vim sessions. + + *:TlistSessionLoad* +:TlistSessionLoad {filename} + Load the information about files and tags stored in the + specified session file to the taglist. + + *:TlistShowPrototype* +:TlistShowPrototype [filename] [linenumber] + Display the prototype of the tag at or before the specified + line number. If the file name and the line number are not + specified, then the current file name and line number are + used. A tag spans multiple lines starting from the line where + it is defined to the line before the next tag. This command + displays the prototype for the tag for any line number in this + range. + + *:TlistShowTag* +:TlistShowTag [filename] [linenumber] + Display the name of the tag defined at or before the specified + line number. If the file name and the line number are not + specified, then the current file name and line number are + used. A tag spans multiple lines starting from the line where + it is defined to the line before the next tag. This command + displays the tag name for any line number in this range. + + *:TlistHighlightTag* +:TlistHighlightTag + Highlight the current tag in the taglist window. By default, + the taglist plugin periodically updates the taglist window to + highlight the current tag. This command can be used to force + the taglist plugin to highlight the current tag. + + *:TlistToggle* +:TlistToggle Open or close (toggle) the taglist window. Opens the taglist + window, if the window is not opened currently. Closes the + taglist window, if the taglist window is already opened. When + the taglist window is opened for the first time, all the files + in the buffer list are processed and the tags are displayed in + the taglist window. After executing this command, the cursor + is not moved from the current window to the taglist window. + + *:TlistUndebug* +:TlistUndebug + Stop logging of debug messages from the taglist plugin. + + *:TlistUnlock* +:TlistUnlock + Unlock the taglist and start processing newly edited files. + + *:TlistUpdate* +:TlistUpdate Update the tags information for the current buffer. This + command can be used to re-process the current file/buffer and + get the tags information. As the taglist plugin uses the file + saved in the disk (instead of the file displayed in a Vim + buffer), you should save a modified buffer before you update + the taglist. Otherwise the listed tags will not include the + new tags created in the buffer. You can use this command even + when the taglist window is not opened. + +============================================================================== + *taglist-functions* +8. Global functions~ + +The taglist plugin provides several global functions that can be used from +other Vim plugins to interact with the taglist plugin. These functions are +described below. + +|Tlist_Update_File_Tags()| Update the tags for the specified file +|Tlist_Get_Tag_Prototype_By_Line()| Return the prototype of the tag at or + before the specified line number in the + specified file. +|Tlist_Get_Tagname_By_Line()| Return the name of the tag at or + before the specified line number in + the specified file. +|Tlist_Set_App()| Set the name of the application + controlling the taglist window. + + *Tlist_Update_File_Tags()* +Tlist_Update_File_Tags({filename}, {filetype}) + Update the tags for the file {filename}. The second argument + specifies the Vim filetype for the file. If the taglist plugin + has not processed the file previously, then the exuberant + ctags tool is invoked to generate the tags for the file. + + *Tlist_Get_Tag_Prototype_By_Line()* +Tlist_Get_Tag_Prototype_By_Line([{filename}, {linenumber}]) + Return the prototype of the tag at or before the specified + line number in the specified file. If the filename and line + number are not specified, then the current buffer name and the + current line number are used. + + *Tlist_Get_Tagname_By_Line()* +Tlist_Get_Tagname_By_Line([{filename}, {linenumber}]) + Return the name of the tag at or before the specified line + number in the specified file. If the filename and line number + are not specified, then the current buffer name and the + current line number are used. + + *Tlist_Set_App()* +Tlist_Set_App({appname}) + Set the name of the plugin that controls the taglist plugin + window and buffer. This can be used to integrate the taglist + plugin with other Vim plugins. + + For example, the winmanager plugin and the Cream package use + this function and specify the appname as "winmanager" and + "cream" respectively. + + By default, the taglist plugin is a stand-alone plugin and + controls the taglist window and buffer. If the taglist window + is controlled by an external plugin, then the appname should + be set appropriately. + +============================================================================== + *taglist-extend* +9. Extending~ + +The taglist plugin supports all the languages supported by the exuberant ctags +tool, which includes the following languages: Assembly, ASP, Awk, Beta, C, +C++, C#, Cobol, Eiffel, Erlang, Fortran, HTML, Java, Javascript, Lisp, Lua, +Make, Pascal, Perl, PHP, Python, Rexx, Ruby, Scheme, Shell, Slang, SML, Sql, +TCL, Verilog, Vim and Yacc. + +You can extend the taglist plugin to add support for new languages and also +modify the support for the above listed languages. + +You should NOT make modifications to the taglist plugin script file to add +support for new languages. You will lose these changes when you upgrade to the +next version of the taglist plugin. Instead you should follow the below +described instructions to extend the taglist plugin. + +You can extend the taglist plugin by setting variables in the .vimrc or _vimrc +file. The name of these variables depends on the language name and is +described below. + +Modifying support for an existing language~ +To modify the support for an already supported language, you have to set the +tlist_xxx_settings variable in the ~/.vimrc or $HOME/_vimrc file. Replace xxx +with the Vim filetype name for the language file. For example, to modify the +support for the perl language files, you have to set the tlist_perl_settings +variable. To modify the support for java files, you have to set the +tlist_java_settings variable. + +To determine the filetype name used by Vim for a file, use the following +command in the buffer containing the file: + + :set filetype + +The above command will display the Vim filetype for the current buffer. + +The format of the value set in the tlist_xxx_settings variable is + + <language_name>;flag1:name1;flag2:name2;flag3:name3 + +The different fields in the value are separated by the ';' character. + +The first field 'language_name' is the name used by exuberant ctags to refer +to this language file. This name can be different from the file type name used +by Vim. For example, for C++, the language name used by ctags is 'c++' but the +filetype name used by Vim is 'cpp'. To get the list of language names +supported by exuberant ctags, use the following command: + + $ ctags --list-maps=all + +The remaining fields follow the format "flag:name". The sub-field 'flag' is +the language specific flag used by exuberant ctags to generate the +corresponding tags. For example, for the C language, to list only the +functions, the 'f' flag is used. To get the list of flags supported by +exuberant ctags for the various languages use the following command: + + $ ctags --list-kinds=all + +The sub-field 'name' specifies the title text to use for displaying the tags +of a particular type. For example, 'name' can be set to 'functions'. This +field can be set to any text string name. + +For example, to list only the classes and functions defined in a C++ language +file, add the following line to your .vimrc file: + + let tlist_cpp_settings = 'c++;c:class;f:function' + +In the above setting, 'cpp' is the Vim filetype name and 'c++' is the name +used by the exuberant ctags tool. 'c' and 'f' are the flags passed to +exuberant ctags to list C++ classes and functions and 'class' is the title +used for the class tags and 'function' is the title used for the function tags +in the taglist window. + +For example, to display only functions defined in a C file and to use "My +Functions" as the title for the function tags, use + + let tlist_c_settings = 'c;f:My Functions' + +When you set the tlist_xxx_settings variable, you will override the default +setting used by the taglist plugin for the 'xxx' language. You cannot add to +the default options used by the taglist plugin for a particular file type. To +add to the options used by the taglist plugin for a language, copy the option +values from the taglist plugin file to your .vimrc file and modify it. + +Adding support for a new language~ +If you want to add support for a new language to the taglist plugin, you need +to first extend the exuberant ctags tool. For more information about extending +exuberant ctags, visit the following page: + + http://ctags.sourceforge.net/EXTENDING.html + +To add support for a new language, set the tlist_xxx_settings variable in the +~/.vimrc file appropriately as described above. Replace 'xxx' in the variable +name with the Vim filetype name for the new language. + +For example, to extend the taglist plugin to support the latex language, you +can use the following line (assuming, you have already extended exuberant +ctags to support the latex language): + + let tlist_tex_settings='latex;b:bibitem;c:command;l:label' + +With the above line, when you edit files of filetype "tex" in Vim, the taglist +plugin will invoke the exuberant ctags tool passing the "latex" filetype and +the flags b, c and l to generate the tags. The text heading 'bibitem', +'command' and 'label' will be used in the taglist window for the tags which +are generated for the flags b, c and l respectively. + +============================================================================== + *taglist-faq* +10. Frequently Asked Questions~ + +Q. The taglist plugin doesn't work. The taglist window is empty and the tags + defined in a file are not displayed. +A. Are you using Vim version 6.0 and above? The taglist plugin relies on the + features supported by Vim version 6.0 and above. You can use the following + command to get the Vim version: +> + $ vim --version +< + Are you using exuberant ctags version 5.0 and above? The taglist plugin + relies on the features supported by exuberant ctags and will not work with + GNU ctags or the Unix ctags utility. You can use the following command to + determine whether the ctags installed in your system is exuberant ctags: +> + $ ctags --version +< + Is exuberant ctags present in one of the directories in your PATH? If not, + you need to set the Tlist_Ctags_Cmd variable to point to the location of + exuberant ctags. Use the following Vim command to verify that this is setup + correctly: +> + :echo system(Tlist_Ctags_Cmd . ' --version') +< + The above command should display the version information for exuberant + ctags. + + Did you turn on the Vim filetype detection? The taglist plugin relies on + the filetype detected by Vim and passes the filetype to the exuberant ctags + utility to parse the tags. Check the output of the following Vim command: +> + :filetype +< + The output of the above command should contain "filetype detection:ON". + To turn on the filetype detection, add the following line to the .vimrc or + _vimrc file: +> + filetype on +< + Is your version of Vim compiled with the support for the system() function? + The following Vim command should display 1: +> + :echo exists('*system') +< + In some Linux distributions (particularly Suse Linux), the default Vim + installation is built without the support for the system() function. The + taglist plugin uses the system() function to invoke the exuberant ctags + utility. You need to rebuild Vim after enabling the support for the + system() function. If you use the default build options, the system() + function will be supported. + + Do you have the |'shellslash'| option set? You can try disabling the + |'shellslash'| option. When the taglist plugin invokes the exuberant ctags + utility with the path to the file, if the incorrect slashes are used, then + you will see errors. + + Check the shell related Vim options values using the following command: +> + :set shell? shellcmdflag? shellpipe? + :set shellquote? shellredir? shellxquote? +< + If these options are set in your .vimrc or _vimrc file, try removing those + lines. + + Are you using a Unix shell in a MS-Windows environment? For example, + the Unix shell from the MKS-toolkit. Do you have the SHELL environment + set to point to this shell? You can try resetting the SHELL environment + variable. + + If you are using a Unix shell on MS-Windows, you should try to use + exuberant ctags that is compiled for Unix-like environments so that + exuberant ctags will understand path names with forward slash characters. + + Is your filetype supported by the exuberant ctags utility? The file types + supported by the exuberant ctags utility are listed in the ctags help. If a + file type is not supported, you have to extend exuberant ctags. You can use + the following command to list the filetypes supported by exuberant ctags: +> + ctags --list-languages +< + Run the following command from the shell prompt and check whether the tags + defined in your file are listed in the output from exuberant ctags: +> + ctags -f - --format=2 --excmd=pattern --fields=nks <filename> +< + If you see your tags in the output from the above command, then the + exuberant ctags utility is properly parsing your file. + + Do you have the .ctags or _ctags or the ctags.cnf file in your home + directory for specifying default options or for extending exuberant ctags? + If you do have this file, check the options in this file and make sure + these options are not interfering with the operation of the taglist plugin. + + If you are using MS-Windows, check the value of the TEMP and TMP + environment variables. If these environment variables are set to a path + with space characters in the name, then try using the DOS 8.3 short name + for the path or set them to a path without the space characters in the + name. For example, if the temporary directory name is "C:\Documents and + Settings\xyz\Local Settings\Temp", then try setting the TEMP variable to + the following: +> + set TEMP=C:\DOCUMEN~1\xyz\LOCALS~1\Temp +< + If exuberant ctags is installed in a directory with space characters in the + name, then try adding the directory to the PATH environment variable or try + setting the 'Tlist_Ctags_Cmd' variable to the shortest path name to ctags + or try copying the exuberant ctags to a path without space characters in + the name. For example, if exuberant ctags is installed in the directory + "C:\Program Files\Ctags", then try setting the 'Tlist_Ctags_Cmd' variable + as below: +> + let Tlist_Ctags_Cmd='C:\Progra~1\Ctags\ctags.exe' +< + If you are using a cygwin compiled version of exuberant ctags on MS-Windows, + make sure that either you have the cygwin compiled sort utility installed + and available in your PATH or compile exuberant ctags with internal sort + support. Otherwise, when exuberant ctags sorts the tags output by invoking + the sort utility, it may end up invoking the MS-Windows version of + sort.exe, thereby resulting in failure. + +Q. When I try to open the taglist window, I am seeing the following error + message. How do I fix this problem? + + Taglist: Failed to generate tags for /my/path/to/file + ctags: illegal option -- -^@usage: ctags [-BFadtuwvx] [-f tagsfile] file ... + +A. The taglist plugin will work only with the exuberant ctags tool. You + cannot use the GNU ctags or the Unix ctags program with the taglist plugin. + You will see an error message similar to the one shown above, if you try + use a non-exuberant ctags program with Vim. To fix this problem, either add + the exuberant ctags tool location to the PATH environment variable or set + the 'Tlist_Ctags_Cmd' variable. + +Q. A file has more than one tag with the same name. When I select a tag name + from the taglist window, the cursor is positioned at the incorrect tag + location. +A. The taglist plugin uses the search pattern generated by the exuberant ctags + utility to position the cursor at the location of a tag definition. If a + file has more than one tag with the same name and same prototype, then the + search pattern will be the same. In this case, when searching for the tag + pattern, the cursor may be positioned at the incorrect location. + +Q. I have made some modifications to my file and introduced new + functions/classes/variables. I have not yet saved my file. The taglist + plugin is not displaying the new tags when I update the taglist window. +A. The exuberant ctags utility will process only files that are present in the + disk. To list the tags defined in a file, you have to save the file and + then update the taglist window. + +Q. I have created a ctags file using the exuberant ctags utility for my source + tree. How do I configure the taglist plugin to use this tags file? +A. The taglist plugin doesn't use a tags file stored in disk. For every opened + file, the taglist plugin invokes the exuberant ctags utility to get the + list of tags dynamically. The Vim system() function is used to invoke + exuberant ctags and get the ctags output. This function internally uses a + temporary file to store the output. This file is deleted after the output + from the command is read. So you will never see the file that contains the + output of exuberant ctags. + +Q. When I set the |'updatetime'| option to a low value (less than 1000) and if + I keep pressing a key with the taglist window open, the current buffer + contents are changed. Why is this? +A. The taglist plugin uses the |CursorHold| autocmd to highlight the current + tag. The CursorHold autocmd triggers for every |'updatetime'| milliseconds. + If the |'updatetime'| option is set to a low value, then the CursorHold + autocmd will be triggered frequently. As the taglist plugin changes + the focus to the taglist window to highlight the current tag, this could + interfere with the key movement resulting in changing the contents of + the current buffer. The workaround for this problem is to not set the + |'updatetime'| option to a low value. + +============================================================================== + *taglist-license* +11. License~ +Permission is hereby granted to use and distribute the taglist plugin, with or +without modifications, provided that this copyright notice is copied with it. +Like anything else that's free, taglist.vim is provided *as is* and comes with +no warranty of any kind, either expressed or implied. In no event will the +copyright holder be liable for any damamges resulting from the use of this +software. + +============================================================================== + *taglist-todo* +12. Todo~ + +1. Group tags according to the scope and display them. For example, + group all the tags belonging to a C++/Java class +2. Support for displaying tags in a modified (not-yet-saved) file. +3. Automatically open the taglist window only for selected filetypes. + For other filetypes, close the taglist window. +4. When using the shell from the MKS toolkit, the taglist plugin + doesn't work. +5. The taglist plugin doesn't work with files edited remotely using the + netrw plugin. The exuberant ctags utility cannot process files over + scp/rcp/ftp, etc. + +============================================================================== + +vim:tw=78:ts=8:noet:ft=help: diff --git a/vim/doc/tags b/vim/doc/tags new file mode 100644 index 0000000..7c855b7 --- /dev/null +++ b/vim/doc/tags @@ -0,0 +1,892 @@ +'NERDAllowAnyVisualDelims' NERD_commenter.txt /*'NERDAllowAnyVisualDelims'* +'NERDBlockComIgnoreEmpty' NERD_commenter.txt /*'NERDBlockComIgnoreEmpty'* +'NERDChristmasTree' NERD_tree.txt /*'NERDChristmasTree'* +'NERDCommentWholeLinesInVMode' NERD_commenter.txt /*'NERDCommentWholeLinesInVMode'* +'NERDCompactSexyComs' NERD_commenter.txt /*'NERDCompactSexyComs'* +'NERDCreateDefaultMappings' NERD_commenter.txt /*'NERDCreateDefaultMappings'* +'NERDDefaultNesting' NERD_commenter.txt /*'NERDDefaultNesting'* +'NERDLPlace' NERD_commenter.txt /*'NERDLPlace'* +'NERDMenuMode' NERD_commenter.txt /*'NERDMenuMode'* +'NERDRPlace' NERD_commenter.txt /*'NERDRPlace'* +'NERDRemoveAltComs' NERD_commenter.txt /*'NERDRemoveAltComs'* +'NERDRemoveExtraSpaces' NERD_commenter.txt /*'NERDRemoveExtraSpaces'* +'NERDSpaceDelims' NERD_commenter.txt /*'NERDSpaceDelims'* +'NERDTreeAutoCenter' NERD_tree.txt /*'NERDTreeAutoCenter'* +'NERDTreeAutoCenterThreshold' NERD_tree.txt /*'NERDTreeAutoCenterThreshold'* +'NERDTreeBookmarksFile' NERD_tree.txt /*'NERDTreeBookmarksFile'* +'NERDTreeCaseSensitiveSort' NERD_tree.txt /*'NERDTreeCaseSensitiveSort'* +'NERDTreeChDirMode' NERD_tree.txt /*'NERDTreeChDirMode'* +'NERDTreeHighlightCursorline' NERD_tree.txt /*'NERDTreeHighlightCursorline'* +'NERDTreeHijackNetrw' NERD_tree.txt /*'NERDTreeHijackNetrw'* +'NERDTreeIgnore' NERD_tree.txt /*'NERDTreeIgnore'* +'NERDTreeMouseMode' NERD_tree.txt /*'NERDTreeMouseMode'* +'NERDTreeQuitOnOpen' NERD_tree.txt /*'NERDTreeQuitOnOpen'* +'NERDTreeShowBookmarks' NERD_tree.txt /*'NERDTreeShowBookmarks'* +'NERDTreeShowFiles' NERD_tree.txt /*'NERDTreeShowFiles'* +'NERDTreeShowHidden' NERD_tree.txt /*'NERDTreeShowHidden'* +'NERDTreeShowLineNumbers' NERD_tree.txt /*'NERDTreeShowLineNumbers'* +'NERDTreeSortOrder' NERD_tree.txt /*'NERDTreeSortOrder'* +'NERDTreeStatusline' NERD_tree.txt /*'NERDTreeStatusline'* +'NERDTreeWinPos' NERD_tree.txt /*'NERDTreeWinPos'* +'NERDTreeWinSize' NERD_tree.txt /*'NERDTreeWinSize'* +'NERDUsePlaceHolders' NERD_commenter.txt /*'NERDUsePlaceHolders'* +'Tlist_Auto_Highlight_Tag' taglist.txt /*'Tlist_Auto_Highlight_Tag'* +'Tlist_Auto_Open' taglist.txt /*'Tlist_Auto_Open'* +'Tlist_Auto_Update' taglist.txt /*'Tlist_Auto_Update'* +'Tlist_Close_On_Select' taglist.txt /*'Tlist_Close_On_Select'* +'Tlist_Compact_Format' taglist.txt /*'Tlist_Compact_Format'* +'Tlist_Ctags_Cmd' taglist.txt /*'Tlist_Ctags_Cmd'* +'Tlist_Display_Prototype' taglist.txt /*'Tlist_Display_Prototype'* +'Tlist_Display_Tag_Scope' taglist.txt /*'Tlist_Display_Tag_Scope'* +'Tlist_Enable_Fold_Column' taglist.txt /*'Tlist_Enable_Fold_Column'* +'Tlist_Exit_OnlyWindow' taglist.txt /*'Tlist_Exit_OnlyWindow'* +'Tlist_File_Fold_Auto_Close' taglist.txt /*'Tlist_File_Fold_Auto_Close'* +'Tlist_GainFocus_On_ToggleOpen' taglist.txt /*'Tlist_GainFocus_On_ToggleOpen'* +'Tlist_Highlight_Tag_On_BufEnter' taglist.txt /*'Tlist_Highlight_Tag_On_BufEnter'* +'Tlist_Inc_Winwidth' taglist.txt /*'Tlist_Inc_Winwidth'* +'Tlist_Max_Submenu_Items' taglist.txt /*'Tlist_Max_Submenu_Items'* +'Tlist_Max_Tag_Length' taglist.txt /*'Tlist_Max_Tag_Length'* +'Tlist_Process_File_Always' taglist.txt /*'Tlist_Process_File_Always'* +'Tlist_Show_Menu' taglist.txt /*'Tlist_Show_Menu'* +'Tlist_Show_One_File' taglist.txt /*'Tlist_Show_One_File'* +'Tlist_Sort_Type' taglist.txt /*'Tlist_Sort_Type'* +'Tlist_Use_Horiz_Window' taglist.txt /*'Tlist_Use_Horiz_Window'* +'Tlist_Use_Right_Window' taglist.txt /*'Tlist_Use_Right_Window'* +'Tlist_Use_SingleClick' taglist.txt /*'Tlist_Use_SingleClick'* +'Tlist_WinHeight' taglist.txt /*'Tlist_WinHeight'* +'Tlist_WinWidth' taglist.txt /*'Tlist_WinWidth'* +'b:delimitMate_autoclose' delimitMate.txt /*'b:delimitMate_autoclose'* +'b:delimitMate_balance_matchpairs' delimitMate.txt /*'b:delimitMate_balance_matchpairs'* +'b:delimitMate_expand_cr' delimitMate.txt /*'b:delimitMate_expand_cr'* +'b:delimitMate_expand_space' delimitMate.txt /*'b:delimitMate_expand_space'* +'b:delimitMate_matchpairs' delimitMate.txt /*'b:delimitMate_matchpairs'* +'b:delimitMate_nesting_quotes' delimitMate.txt /*'b:delimitMate_nesting_quotes'* +'b:delimitMate_quotes' delimitMate.txt /*'b:delimitMate_quotes'* +'b:delimitMate_smart_matchpairs' delimitMate.txt /*'b:delimitMate_smart_matchpairs'* +'b:delimitMate_smart_quotes' delimitMate.txt /*'b:delimitMate_smart_quotes'* +'b:loaded_delimitMate' delimitMate.txt /*'b:loaded_delimitMate'* +'delimitMate_apostrophes' delimitMate.txt /*'delimitMate_apostrophes'* +'delimitMate_autoclose' delimitMate.txt /*'delimitMate_autoclose'* +'delimitMate_balance_matchpairs' delimitMate.txt /*'delimitMate_balance_matchpairs'* +'delimitMate_excluded_ft' delimitMate.txt /*'delimitMate_excluded_ft'* +'delimitMate_excluded_regions' delimitMate.txt /*'delimitMate_excluded_regions'* +'delimitMate_expand_cr' delimitMate.txt /*'delimitMate_expand_cr'* +'delimitMate_expand_space' delimitMate.txt /*'delimitMate_expand_space'* +'delimitMate_matchpairs' delimitMate.txt /*'delimitMate_matchpairs'* +'delimitMate_nesting_quotes' delimitMate.txt /*'delimitMate_nesting_quotes'* +'delimitMate_quotes' delimitMate.txt /*'delimitMate_quotes'* +'delimitMate_smart_matchpairs' delimitMate.txt /*'delimitMate_smart_matchpairs'* +'delimitMate_smart_quotes' delimitMate.txt /*'delimitMate_smart_quotes'* +'loaded_delimitMate' delimitMate.txt /*'loaded_delimitMate'* +'loaded_nerd_comments' NERD_commenter.txt /*'loaded_nerd_comments'* +'loaded_nerd_tree' NERD_tree.txt /*'loaded_nerd_tree'* +'showmarks_enable' showmarks.txt /*'showmarks_enable'* +'showmarks_hlline_lower' showmarks.txt /*'showmarks_hlline_lower'* +'showmarks_hlline_other' showmarks.txt /*'showmarks_hlline_other'* +'showmarks_hlline_upper' showmarks.txt /*'showmarks_hlline_upper'* +'showmarks_ignore_name' showmarks.txt /*'showmarks_ignore_name'* +'showmarks_ignore_type' showmarks.txt /*'showmarks_ignore_type'* +'showmarks_include' showmarks.txt /*'showmarks_include'* +'showmarks_textother' showmarks.txt /*'showmarks_textother'* +'showmarks_textupper' showmarks.txt /*'showmarks_textupper'* +'snippets' snipMate.txt /*'snippets'* +'solarized_bold' solarized.txt /*'solarized_bold'* +'solarized_contrast' solarized.txt /*'solarized_contrast'* +'solarized_degrade' solarized.txt /*'solarized_degrade'* +'solarized_hitrail' solarized.txt /*'solarized_hitrail'* +'solarized_italic' solarized.txt /*'solarized_italic'* +'solarized_menu' solarized.txt /*'solarized_menu'* +'solarized_termcolors' solarized.txt /*'solarized_termcolors'* +'solarized_termtrans' solarized.txt /*'solarized_termtrans'* +'solarized_underline' solarized.txt /*'solarized_underline'* +'solarized_visibility' solarized.txt /*'solarized_visibility'* +'syntastic_auto_jump' syntastic.txt /*'syntastic_auto_jump'* +'syntastic_auto_loc_list' syntastic.txt /*'syntastic_auto_loc_list'* +'syntastic_check_on_open' syntastic.txt /*'syntastic_check_on_open'* +'syntastic_echo_current_error' syntastic.txt /*'syntastic_echo_current_error'* +'syntastic_enable_balloons' syntastic.txt /*'syntastic_enable_balloons'* +'syntastic_enable_highlighting' syntastic.txt /*'syntastic_enable_highlighting'* +'syntastic_enable_signs' syntastic.txt /*'syntastic_enable_signs'* +'syntastic_loc_list_height' syntastic.txt /*'syntastic_loc_list_height'* +'syntastic_mode_map' syntastic.txt /*'syntastic_mode_map'* +'syntastic_quiet_warnings' syntastic.txt /*'syntastic_quiet_warnings'* +'syntastic_stl_format' syntastic.txt /*'syntastic_stl_format'* +.snippet snipMate.txt /*.snippet* +.snippets snipMate.txt /*.snippets* +:Ack ack.txt /*:Ack* +:AckAdd ack.txt /*:AckAdd* +:AckFile ack.txt /*:AckFile* +:AckFromSearch ack.txt /*:AckFromSearch* +:CoffeeCompile coffee-script.txt /*:CoffeeCompile* +:CoffeeMake coffee-script.txt /*:CoffeeMake* +:CoffeeMake! coffee-script.txt /*:CoffeeMake!* +:CoffeeRun coffee-script.txt /*:CoffeeRun* +:CommandT command-t.txt /*:CommandT* +:CommandTBuffer command-t.txt /*:CommandTBuffer* +:CommandTFlush command-t.txt /*:CommandTFlush* +:CommandTJumps command-t.txt /*:CommandTJumps* +:DelimitMateReload delimitMate.txt /*:DelimitMateReload* +:DelimitMateSwitch delimitMate.txt /*:DelimitMateSwitch* +:DelimitMateTest delimitMate.txt /*:DelimitMateTest* +:Errors syntastic.txt /*:Errors* +:Gist gist-vim.txt /*:Gist* +:LAck ack.txt /*:LAck* +:LAckAdd ack.txt /*:LAckAdd* +:LuaInspect luainspect.txt /*:LuaInspect* +:LuaInspectToggle luainspect.txt /*:LuaInspectToggle* +:NERDTree NERD_tree.txt /*:NERDTree* +:NERDTreeClose NERD_tree.txt /*:NERDTreeClose* +:NERDTreeFind NERD_tree.txt /*:NERDTreeFind* +:NERDTreeFromBookmark NERD_tree.txt /*:NERDTreeFromBookmark* +:NERDTreeMirror NERD_tree.txt /*:NERDTreeMirror* +:NERDTreeToggle NERD_tree.txt /*:NERDTreeToggle* +:SyntasticCheck syntastic.txt /*:SyntasticCheck* +:SyntasticErrors syntastic.txt /*:SyntasticErrors* +:SyntasticToggleMode syntastic.txt /*:SyntasticToggleMode* +:TlistAddFiles taglist.txt /*:TlistAddFiles* +:TlistAddFilesRecursive taglist.txt /*:TlistAddFilesRecursive* +:TlistClose taglist.txt /*:TlistClose* +:TlistDebug taglist.txt /*:TlistDebug* +:TlistHighlightTag taglist.txt /*:TlistHighlightTag* +:TlistLock taglist.txt /*:TlistLock* +:TlistMessages taglist.txt /*:TlistMessages* +:TlistOpen taglist.txt /*:TlistOpen* +:TlistSessionLoad taglist.txt /*:TlistSessionLoad* +:TlistSessionSave taglist.txt /*:TlistSessionSave* +:TlistShowPrototype taglist.txt /*:TlistShowPrototype* +:TlistShowTag taglist.txt /*:TlistShowTag* +:TlistToggle taglist.txt /*:TlistToggle* +:TlistUndebug taglist.txt /*:TlistUndebug* +:TlistUnlock taglist.txt /*:TlistUnlock* +:TlistUpdate taglist.txt /*:TlistUpdate* +Align-copyright Align.txt /*Align-copyright* +ConqueTerm conque_term.txt /*ConqueTerm* +ExtractSnips() snipMate.txt /*ExtractSnips()* +ExtractSnipsFile() snipMate.txt /*ExtractSnipsFile()* +Filename() snipMate.txt /*Filename()* +Gist.vim gist-vim.txt /*Gist.vim* +NERDComAbout NERD_commenter.txt /*NERDComAbout* +NERDComAlignedComment NERD_commenter.txt /*NERDComAlignedComment* +NERDComAltDelim NERD_commenter.txt /*NERDComAltDelim* +NERDComAppendComment NERD_commenter.txt /*NERDComAppendComment* +NERDComChangelog NERD_commenter.txt /*NERDComChangelog* +NERDComComment NERD_commenter.txt /*NERDComComment* +NERDComCredits NERD_commenter.txt /*NERDComCredits* +NERDComDefaultDelims NERD_commenter.txt /*NERDComDefaultDelims* +NERDComEOLComment NERD_commenter.txt /*NERDComEOLComment* +NERDComFunctionality NERD_commenter.txt /*NERDComFunctionality* +NERDComFunctionalityDetails NERD_commenter.txt /*NERDComFunctionalityDetails* +NERDComFunctionalitySummary NERD_commenter.txt /*NERDComFunctionalitySummary* +NERDComHeuristics NERD_commenter.txt /*NERDComHeuristics* +NERDComInsertComment NERD_commenter.txt /*NERDComInsertComment* +NERDComInstallation NERD_commenter.txt /*NERDComInstallation* +NERDComInvertComment NERD_commenter.txt /*NERDComInvertComment* +NERDComIssues NERD_commenter.txt /*NERDComIssues* +NERDComLicense NERD_commenter.txt /*NERDComLicense* +NERDComMappings NERD_commenter.txt /*NERDComMappings* +NERDComMinimalComment NERD_commenter.txt /*NERDComMinimalComment* +NERDComNERDComment NERD_commenter.txt /*NERDComNERDComment* +NERDComNestedComment NERD_commenter.txt /*NERDComNestedComment* +NERDComNesting NERD_commenter.txt /*NERDComNesting* +NERDComOptions NERD_commenter.txt /*NERDComOptions* +NERDComOptionsDetails NERD_commenter.txt /*NERDComOptionsDetails* +NERDComOptionsSummary NERD_commenter.txt /*NERDComOptionsSummary* +NERDComSexyComment NERD_commenter.txt /*NERDComSexyComment* +NERDComSexyComments NERD_commenter.txt /*NERDComSexyComments* +NERDComToggleComment NERD_commenter.txt /*NERDComToggleComment* +NERDComUncommentLine NERD_commenter.txt /*NERDComUncommentLine* +NERDComYankComment NERD_commenter.txt /*NERDComYankComment* +NERDCommenter NERD_commenter.txt /*NERDCommenter* +NERDCommenterContents NERD_commenter.txt /*NERDCommenterContents* +NERDTree NERD_tree.txt /*NERDTree* +NERDTree-? NERD_tree.txt /*NERDTree-?* +NERDTree-A NERD_tree.txt /*NERDTree-A* +NERDTree-B NERD_tree.txt /*NERDTree-B* +NERDTree-C NERD_tree.txt /*NERDTree-C* +NERDTree-C-J NERD_tree.txt /*NERDTree-C-J* +NERDTree-C-K NERD_tree.txt /*NERDTree-C-K* +NERDTree-D NERD_tree.txt /*NERDTree-D* +NERDTree-F NERD_tree.txt /*NERDTree-F* +NERDTree-I NERD_tree.txt /*NERDTree-I* +NERDTree-J NERD_tree.txt /*NERDTree-J* +NERDTree-K NERD_tree.txt /*NERDTree-K* +NERDTree-O NERD_tree.txt /*NERDTree-O* +NERDTree-P NERD_tree.txt /*NERDTree-P* +NERDTree-R NERD_tree.txt /*NERDTree-R* +NERDTree-T NERD_tree.txt /*NERDTree-T* +NERDTree-U NERD_tree.txt /*NERDTree-U* +NERDTree-X NERD_tree.txt /*NERDTree-X* +NERDTree-cd NERD_tree.txt /*NERDTree-cd* +NERDTree-contents NERD_tree.txt /*NERDTree-contents* +NERDTree-e NERD_tree.txt /*NERDTree-e* +NERDTree-f NERD_tree.txt /*NERDTree-f* +NERDTree-gi NERD_tree.txt /*NERDTree-gi* +NERDTree-go NERD_tree.txt /*NERDTree-go* +NERDTree-gs NERD_tree.txt /*NERDTree-gs* +NERDTree-i NERD_tree.txt /*NERDTree-i* +NERDTree-m NERD_tree.txt /*NERDTree-m* +NERDTree-o NERD_tree.txt /*NERDTree-o* +NERDTree-p NERD_tree.txt /*NERDTree-p* +NERDTree-q NERD_tree.txt /*NERDTree-q* +NERDTree-r NERD_tree.txt /*NERDTree-r* +NERDTree-s NERD_tree.txt /*NERDTree-s* +NERDTree-t NERD_tree.txt /*NERDTree-t* +NERDTree-u NERD_tree.txt /*NERDTree-u* +NERDTree-x NERD_tree.txt /*NERDTree-x* +NERDTreeAPI NERD_tree.txt /*NERDTreeAPI* +NERDTreeAbout NERD_tree.txt /*NERDTreeAbout* +NERDTreeAddKeyMap() NERD_tree.txt /*NERDTreeAddKeyMap()* +NERDTreeAddMenuItem() NERD_tree.txt /*NERDTreeAddMenuItem()* +NERDTreeAddMenuSeparator() NERD_tree.txt /*NERDTreeAddMenuSeparator()* +NERDTreeAddSubmenu() NERD_tree.txt /*NERDTreeAddSubmenu()* +NERDTreeBookmarkCommands NERD_tree.txt /*NERDTreeBookmarkCommands* +NERDTreeBookmarkTable NERD_tree.txt /*NERDTreeBookmarkTable* +NERDTreeBookmarks NERD_tree.txt /*NERDTreeBookmarks* +NERDTreeChangelog NERD_tree.txt /*NERDTreeChangelog* +NERDTreeCredits NERD_tree.txt /*NERDTreeCredits* +NERDTreeFunctionality NERD_tree.txt /*NERDTreeFunctionality* +NERDTreeGlobalCommands NERD_tree.txt /*NERDTreeGlobalCommands* +NERDTreeInvalidBookmarks NERD_tree.txt /*NERDTreeInvalidBookmarks* +NERDTreeKeymapAPI NERD_tree.txt /*NERDTreeKeymapAPI* +NERDTreeLicense NERD_tree.txt /*NERDTreeLicense* +NERDTreeMappings NERD_tree.txt /*NERDTreeMappings* +NERDTreeMenu NERD_tree.txt /*NERDTreeMenu* +NERDTreeMenuAPI NERD_tree.txt /*NERDTreeMenuAPI* +NERDTreeOptionDetails NERD_tree.txt /*NERDTreeOptionDetails* +NERDTreeOptionSummary NERD_tree.txt /*NERDTreeOptionSummary* +NERDTreeOptions NERD_tree.txt /*NERDTreeOptions* +NERDTreeRender() NERD_tree.txt /*NERDTreeRender()* +NERD_commenter.txt NERD_commenter.txt /*NERD_commenter.txt* +NERD_tree.txt NERD_tree.txt /*NERD_tree.txt* +ReloadAllSnippets() snipMate.txt /*ReloadAllSnippets()* +ReloadSnippets() snipMate.txt /*ReloadSnippets()* +ResetAllSnippets() snipMate.txt /*ResetAllSnippets()* +ResetSnippets() snipMate.txt /*ResetSnippets()* +ShowMarksClearAll showmarks.txt /*ShowMarksClearAll* +ShowMarksClearMark showmarks.txt /*ShowMarksClearMark* +ShowMarksOn showmarks.txt /*ShowMarksOn* +ShowMarksPlaceMark showmarks.txt /*ShowMarksPlaceMark* +ShowMarksToggle showmarks.txt /*ShowMarksToggle* +SyntasticMake() syntastic.txt /*SyntasticMake()* +Tlist_Get_Tag_Prototype_By_Line() taglist.txt /*Tlist_Get_Tag_Prototype_By_Line()* +Tlist_Get_Tagname_By_Line() taglist.txt /*Tlist_Get_Tagname_By_Line()* +Tlist_Set_App() taglist.txt /*Tlist_Set_App()* +Tlist_Update_File_Tags() taglist.txt /*Tlist_Update_File_Tags()* +ZoomWin.txt ZoomWin.txt /*ZoomWin.txt* +[<Space> unimpaired.txt /*[<Space>* +[A unimpaired.txt /*[A* +[B unimpaired.txt /*[B* +[L unimpaired.txt /*[L* +[Q unimpaired.txt /*[Q* +[T unimpaired.txt /*[T* +[a unimpaired.txt /*[a* +[b unimpaired.txt /*[b* +[e unimpaired.txt /*[e* +[l unimpaired.txt /*[l* +[o unimpaired.txt /*[o* +[q unimpaired.txt /*[q* +[t unimpaired.txt /*[t* +[u unimpaired.txt /*[u* +[uu unimpaired.txt /*[uu* +[x unimpaired.txt /*[x* +[xx unimpaired.txt /*[xx* +[y unimpaired.txt /*[y* +[yy unimpaired.txt /*[yy* +]<Space> unimpaired.txt /*]<Space>* +]A unimpaired.txt /*]A* +]B unimpaired.txt /*]B* +]L unimpaired.txt /*]L* +]Q unimpaired.txt /*]Q* +]T unimpaired.txt /*]T* +]a unimpaired.txt /*]a* +]b unimpaired.txt /*]b* +]e unimpaired.txt /*]e* +]l unimpaired.txt /*]l* +]o unimpaired.txt /*]o* +]q unimpaired.txt /*]q* +]t unimpaired.txt /*]t* +]u unimpaired.txt /*]u* +]uu unimpaired.txt /*]uu* +]x unimpaired.txt /*]x* +]xx unimpaired.txt /*]xx* +]y unimpaired.txt /*]y* +]yy unimpaired.txt /*]yy* +aI indent-object.txt /*aI* +ack ack.txt /*ack* +ack-author ack.txt /*ack-author* +ack.txt ack.txt /*ack.txt* +ai indent-object.txt /*ai* +align Align.txt /*align* +align-align Align.txt /*align-align* +align-codepoint Align.txt /*align-codepoint* +align-command Align.txt /*align-command* +align-commands Align.txt /*align-commands* +align-concept Align.txt /*align-concept* +align-concepts Align.txt /*align-concepts* +align-contents Align.txt /*align-contents* +align-control Align.txt /*align-control* +align-history Align.txt /*align-history* +align-manual Align.txt /*align-manual* +align-maps Align.txt /*align-maps* +align-multibyte Align.txt /*align-multibyte* +align-option Align.txt /*align-option* +align-options Align.txt /*align-options* +align-strlen Align.txt /*align-strlen* +align-usage Align.txt /*align-usage* +align-userguide Align.txt /*align-userguide* +align-utf Align.txt /*align-utf* +align-utf8 Align.txt /*align-utf8* +align.txt Align.txt /*align.txt* +alignctrl Align.txt /*alignctrl* +alignctrl- Align.txt /*alignctrl-* +alignctrl-+ Align.txt /*alignctrl-+* +alignctrl-- Align.txt /*alignctrl--* +alignctrl-: Align.txt /*alignctrl-:* +alignctrl-< Align.txt /*alignctrl-<* +alignctrl-= Align.txt /*alignctrl-=* +alignctrl-> Align.txt /*alignctrl->* +alignctrl-C Align.txt /*alignctrl-C* +alignctrl-I Align.txt /*alignctrl-I* +alignctrl-P Align.txt /*alignctrl-P* +alignctrl-W Align.txt /*alignctrl-W* +alignctrl-c Align.txt /*alignctrl-c* +alignctrl-g Align.txt /*alignctrl-g* +alignctrl-l Align.txt /*alignctrl-l* +alignctrl-m Align.txt /*alignctrl-m* +alignctrl-no-option Align.txt /*alignctrl-no-option* +alignctrl-p Align.txt /*alignctrl-p* +alignctrl-r Align.txt /*alignctrl-r* +alignctrl-separators Align.txt /*alignctrl-separators* +alignctrl-settings Align.txt /*alignctrl-settings* +alignctrl-v Align.txt /*alignctrl-v* +alignctrl-w Align.txt /*alignctrl-w* +alignman Align.txt /*alignman* +alignmanual Align.txt /*alignmanual* +alignmap-Htd Align.txt /*alignmap-Htd* +alignmap-T= Align.txt /*alignmap-T=* +alignmap-Tsp Align.txt /*alignmap-Tsp* +alignmap-a( Align.txt /*alignmap-a(* +alignmap-a, Align.txt /*alignmap-a,* +alignmap-a< Align.txt /*alignmap-a<* +alignmap-a= Align.txt /*alignmap-a=* +alignmap-a? Align.txt /*alignmap-a?* +alignmap-abox Align.txt /*alignmap-abox* +alignmap-acom Align.txt /*alignmap-acom* +alignmap-adcom Align.txt /*alignmap-adcom* +alignmap-adec Align.txt /*alignmap-adec* +alignmap-adef Align.txt /*alignmap-adef* +alignmap-afnc Align.txt /*alignmap-afnc* +alignmap-anum Align.txt /*alignmap-anum* +alignmap-aocom Align.txt /*alignmap-aocom* +alignmap-ascom Align.txt /*alignmap-ascom* +alignmap-history Align.txt /*alignmap-history* +alignmap-m= Align.txt /*alignmap-m=* +alignmap-t# Align.txt /*alignmap-t#* +alignmap-t, Align.txt /*alignmap-t,* +alignmap-t: Align.txt /*alignmap-t:* +alignmap-t; Align.txt /*alignmap-t;* +alignmap-t< Align.txt /*alignmap-t<* +alignmap-t= Align.txt /*alignmap-t=* +alignmap-t? Align.txt /*alignmap-t?* +alignmap-tab Align.txt /*alignmap-tab* +alignmap-tml Align.txt /*alignmap-tml* +alignmap-ts, Align.txt /*alignmap-ts,* +alignmap-ts: Align.txt /*alignmap-ts:* +alignmap-ts< Align.txt /*alignmap-ts<* +alignmap-ts= Align.txt /*alignmap-ts=* +alignmap-tsp Align.txt /*alignmap-tsp* +alignmap-tsq Align.txt /*alignmap-tsq* +alignmap-tt Align.txt /*alignmap-tt* +alignmap-t~ Align.txt /*alignmap-t~* +alignmaps Align.txt /*alignmaps* +alignusage Align.txt /*alignusage* +before solarized.txt /*before* +coffee-script coffee-script.txt /*coffee-script* +coffee-script-author coffee-script.txt /*coffee-script-author* +coffee-script-commands coffee-script.txt /*coffee-script-commands* +coffee-script-contents coffee-script.txt /*coffee-script-contents* +coffee-script-introduction coffee-script.txt /*coffee-script-introduction* +coffee-script-license coffee-script.txt /*coffee-script-license* +coffee-script-settings coffee-script.txt /*coffee-script-settings* +coffee-script.txt coffee-script.txt /*coffee-script.txt* +command-t command-t.txt /*command-t* +command-t-authors command-t.txt /*command-t-authors* +command-t-commands command-t.txt /*command-t-commands* +command-t-contents command-t.txt /*command-t-contents* +command-t-donations command-t.txt /*command-t-donations* +command-t-history command-t.txt /*command-t-history* +command-t-installation command-t.txt /*command-t-installation* +command-t-intro command-t.txt /*command-t-intro* +command-t-license command-t.txt /*command-t-license* +command-t-mappings command-t.txt /*command-t-mappings* +command-t-options command-t.txt /*command-t-options* +command-t-pathogen command-t.txt /*command-t-pathogen* +command-t-requirements command-t.txt /*command-t-requirements* +command-t-trouble-shooting command-t.txt /*command-t-trouble-shooting* +command-t-usage command-t.txt /*command-t-usage* +command-t-website command-t.txt /*command-t-website* +command-t-wildignore command-t.txt /*command-t-wildignore* +command-t.txt command-t.txt /*command-t.txt* +config/rails.vim rails.txt /*config\/rails.vim* +conque_term-bugs conque_term.txt /*conque_term-bugs* +conque_term-changelog conque_term.txt /*conque_term-changelog* +conque_term-contribute conque_term.txt /*conque_term-contribute* +conque_term-requirements conque_term.txt /*conque_term-requirements* +conque_term-settings conque_term.txt /*conque_term-settings* +conque_term-todo conque_term.txt /*conque_term-todo* +conque_term-usage conque_term.txt /*conque_term-usage* +cs surround.txt /*cs* +delimitMate delimitMate.txt /*delimitMate* +delimitMate#JumpAny() delimitMate.txt /*delimitMate#JumpAny()* +delimitMate#ShouldJump() delimitMate.txt /*delimitMate#ShouldJump()* +delimitMate#WithinEmptyPair() delimitMate.txt /*delimitMate#WithinEmptyPair()* +delimitMate-contents delimitMate.txt /*delimitMate-contents* +delimitMate.txt delimitMate.txt /*delimitMate.txt* +delimitMateAutoClose delimitMate.txt /*delimitMateAutoClose* +delimitMateBackspace delimitMate.txt /*delimitMateBackspace* +delimitMateBalance delimitMate.txt /*delimitMateBalance* +delimitMateCommands delimitMate.txt /*delimitMateCommands* +delimitMateCredits delimitMate.txt /*delimitMateCredits* +delimitMateExpansion delimitMate.txt /*delimitMateExpansion* +delimitMateFileType delimitMate.txt /*delimitMateFileType* +delimitMateFunctionality delimitMate.txt /*delimitMateFunctionality* +delimitMateFunctions delimitMate.txt /*delimitMateFunctions* +delimitMateHistory delimitMate.txt /*delimitMateHistory* +delimitMateIntro delimitMate.txt /*delimitMateIntro* +delimitMateMaintainer delimitMate.txt /*delimitMateMaintainer* +delimitMateMappings delimitMate.txt /*delimitMateMappings* +delimitMateOptionDetails delimitMate.txt /*delimitMateOptionDetails* +delimitMateOptionSummary delimitMate.txt /*delimitMateOptionSummary* +delimitMateOptions delimitMate.txt /*delimitMateOptions* +delimitMateSmartMatchpairs delimitMate.txt /*delimitMateSmartMatchpairs* +delimitMateSmartQuotes delimitMate.txt /*delimitMateSmartQuotes* +delimitMateSyntax delimitMate.txt /*delimitMateSyntax* +delimitMateTodo delimitMate.txt /*delimitMateTodo* +ds surround.txt /*ds* +ft-coffee-script-syntax coffee-script.txt /*ft-coffee-script-syntax* +ft-gitcommit-plugin ft-gitcommit-plugin.txt /*ft-gitcommit-plugin* +fugitive fugitive.txt /*fugitive* +fugitive#statusline() fugitive.txt /*fugitive#statusline()* +fugitive-:Gblame fugitive.txt /*fugitive-:Gblame* +fugitive-:Gbrowse fugitive.txt /*fugitive-:Gbrowse* +fugitive-:Gcd fugitive.txt /*fugitive-:Gcd* +fugitive-:Gcommit fugitive.txt /*fugitive-:Gcommit* +fugitive-:Gdiff fugitive.txt /*fugitive-:Gdiff* +fugitive-:Ge fugitive.txt /*fugitive-:Ge* +fugitive-:Gedit fugitive.txt /*fugitive-:Gedit* +fugitive-:Ggrep fugitive.txt /*fugitive-:Ggrep* +fugitive-:Git fugitive.txt /*fugitive-:Git* +fugitive-:Git! fugitive.txt /*fugitive-:Git!* +fugitive-:Glcd fugitive.txt /*fugitive-:Glcd* +fugitive-:Glog fugitive.txt /*fugitive-:Glog* +fugitive-:Gmove fugitive.txt /*fugitive-:Gmove* +fugitive-:Gpedit fugitive.txt /*fugitive-:Gpedit* +fugitive-:Gpedit! fugitive.txt /*fugitive-:Gpedit!* +fugitive-:Gread fugitive.txt /*fugitive-:Gread* +fugitive-:Gread! fugitive.txt /*fugitive-:Gread!* +fugitive-:Gremove fugitive.txt /*fugitive-:Gremove* +fugitive-:Gsdiff fugitive.txt /*fugitive-:Gsdiff* +fugitive-:Gsplit fugitive.txt /*fugitive-:Gsplit* +fugitive-:Gsplit! fugitive.txt /*fugitive-:Gsplit!* +fugitive-:Gstatus fugitive.txt /*fugitive-:Gstatus* +fugitive-:Gtabedit fugitive.txt /*fugitive-:Gtabedit* +fugitive-:Gtabedit! fugitive.txt /*fugitive-:Gtabedit!* +fugitive-:Gvdiff fugitive.txt /*fugitive-:Gvdiff* +fugitive-:Gvsplit fugitive.txt /*fugitive-:Gvsplit* +fugitive-:Gvsplit! fugitive.txt /*fugitive-:Gvsplit!* +fugitive-:Gwq fugitive.txt /*fugitive-:Gwq* +fugitive-:Gwrite fugitive.txt /*fugitive-:Gwrite* +fugitive-<CR> fugitive.txt /*fugitive-<CR>* +fugitive-C fugitive.txt /*fugitive-C* +fugitive-O fugitive.txt /*fugitive-O* +fugitive-P fugitive.txt /*fugitive-P* +fugitive-a fugitive.txt /*fugitive-a* +fugitive-about fugitive.txt /*fugitive-about* +fugitive-commands fugitive.txt /*fugitive-commands* +fugitive-mappings fugitive.txt /*fugitive-mappings* +fugitive-o fugitive.txt /*fugitive-o* +fugitive-revision fugitive.txt /*fugitive-revision* +fugitive-statusline fugitive.txt /*fugitive-statusline* +fugitive-~ fugitive.txt /*fugitive-~* +fugitive.txt fugitive.txt /*fugitive.txt* +g:CommandTAcceptSelectionMap command-t.txt /*g:CommandTAcceptSelectionMap* +g:CommandTAcceptSelectionSplitMap command-t.txt /*g:CommandTAcceptSelectionSplitMap* +g:CommandTAcceptSelectionTabMap command-t.txt /*g:CommandTAcceptSelectionTabMap* +g:CommandTAcceptSelectionVSplitMap command-t.txt /*g:CommandTAcceptSelectionVSplitMap* +g:CommandTAlwaysShowDotFiles command-t.txt /*g:CommandTAlwaysShowDotFiles* +g:CommandTBackspaceMap command-t.txt /*g:CommandTBackspaceMap* +g:CommandTCancelMap command-t.txt /*g:CommandTCancelMap* +g:CommandTClearMap command-t.txt /*g:CommandTClearMap* +g:CommandTCursorEndMap command-t.txt /*g:CommandTCursorEndMap* +g:CommandTCursorLeftMap command-t.txt /*g:CommandTCursorLeftMap* +g:CommandTCursorRightMap command-t.txt /*g:CommandTCursorRightMap* +g:CommandTCursorStartMap command-t.txt /*g:CommandTCursorStartMap* +g:CommandTDeleteMap command-t.txt /*g:CommandTDeleteMap* +g:CommandTMatchWindowAtTop command-t.txt /*g:CommandTMatchWindowAtTop* +g:CommandTMatchWindowReverse command-t.txt /*g:CommandTMatchWindowReverse* +g:CommandTMaxCachedDirectories command-t.txt /*g:CommandTMaxCachedDirectories* +g:CommandTMaxDepth command-t.txt /*g:CommandTMaxDepth* +g:CommandTMaxFiles command-t.txt /*g:CommandTMaxFiles* +g:CommandTMaxHeight command-t.txt /*g:CommandTMaxHeight* +g:CommandTNeverShowDotFiles command-t.txt /*g:CommandTNeverShowDotFiles* +g:CommandTScanDotDirectories command-t.txt /*g:CommandTScanDotDirectories* +g:CommandTSelectNextMap command-t.txt /*g:CommandTSelectNextMap* +g:CommandTSelectPrevMap command-t.txt /*g:CommandTSelectPrevMap* +g:CommandTToggleFocusMap command-t.txt /*g:CommandTToggleFocusMap* +g:SuperTabCompletionContexts supertab.txt /*g:SuperTabCompletionContexts* +g:SuperTabContextDefaultCompletionType supertab.txt /*g:SuperTabContextDefaultCompletionType* +g:SuperTabCrMapping supertab.txt /*g:SuperTabCrMapping* +g:SuperTabDefaultCompletionType supertab.txt /*g:SuperTabDefaultCompletionType* +g:SuperTabLongestEnhanced supertab.txt /*g:SuperTabLongestEnhanced* +g:SuperTabLongestHighlight supertab.txt /*g:SuperTabLongestHighlight* +g:SuperTabMappingBackward supertab.txt /*g:SuperTabMappingBackward* +g:SuperTabMappingForward supertab.txt /*g:SuperTabMappingForward* +g:SuperTabMappingTabLiteral supertab.txt /*g:SuperTabMappingTabLiteral* +g:SuperTabNoCompleteAfter supertab.txt /*g:SuperTabNoCompleteAfter* +g:SuperTabNoCompleteBefore supertab.txt /*g:SuperTabNoCompleteBefore* +g:SuperTabRetainCompletionDuration supertab.txt /*g:SuperTabRetainCompletionDuration* +g:coffee_make_options coffee-script.txt /*g:coffee_make_options* +g:loaded_luainspect luainspect.txt /*g:loaded_luainspect* +g:loaded_rails rails.txt /*g:loaded_rails* +g:lua_inspect_events luainspect.txt /*g:lua_inspect_events* +g:lua_inspect_internal luainspect.txt /*g:lua_inspect_internal* +g:lua_inspect_warnings luainspect.txt /*g:lua_inspect_warnings* +g:rails_abbreviations rails.txt /*g:rails_abbreviations* +g:rails_ctags_arguments rails.txt /*g:rails_ctags_arguments* +g:rails_default_file rails.txt /*g:rails_default_file* +g:rails_gnu_screen rails.txt /*g:rails_gnu_screen* +g:rails_history_size rails.txt /*g:rails_history_size* +g:rails_mappings rails.txt /*g:rails_mappings* +g:rails_menu rails.txt /*g:rails_menu* +g:rails_modelines rails.txt /*g:rails_modelines* +g:rails_syntax rails.txt /*g:rails_syntax* +g:rails_tabstop rails.txt /*g:rails_tabstop* +g:rails_url rails.txt /*g:rails_url* +g:snippets_dir snipMate.txt /*g:snippets_dir* +g:snips_author snipMate.txt /*g:snips_author* +g:tagbar_autoclose tagbar.txt /*g:tagbar_autoclose* +g:tagbar_autofocus tagbar.txt /*g:tagbar_autofocus* +g:tagbar_autoshowtag tagbar.txt /*g:tagbar_autoshowtag* +g:tagbar_compact tagbar.txt /*g:tagbar_compact* +g:tagbar_ctags_bin tagbar.txt /*g:tagbar_ctags_bin* +g:tagbar_expand tagbar.txt /*g:tagbar_expand* +g:tagbar_foldlevel tagbar.txt /*g:tagbar_foldlevel* +g:tagbar_iconchars tagbar.txt /*g:tagbar_iconchars* +g:tagbar_left tagbar.txt /*g:tagbar_left* +g:tagbar_singleclick tagbar.txt /*g:tagbar_singleclick* +g:tagbar_sort tagbar.txt /*g:tagbar_sort* +g:tagbar_systemenc tagbar.txt /*g:tagbar_systemenc* +g:tagbar_updateonsave_maxlines tagbar.txt /*g:tagbar_updateonsave_maxlines* +g:tagbar_width tagbar.txt /*g:tagbar_width* +gist-vim-install gist-vim.txt /*gist-vim-install* +gist-vim-license gist-vim.txt /*gist-vim-license* +gist-vim-requirements gist-vim.txt /*gist-vim-requirements* +gist-vim-tips gist-vim.txt /*gist-vim-tips* +gist-vim-usage gist-vim.txt /*gist-vim-usage* +iI indent-object.txt /*iI* +i_CTRL-G_S surround.txt /*i_CTRL-G_S* +i_CTRL-G_s surround.txt /*i_CTRL-G_s* +i_CTRL-R_<Tab> snipMate.txt /*i_CTRL-R_<Tab>* +idntobj-about indent-object.txt /*idntobj-about* +idntobj-blanklines indent-object.txt /*idntobj-blanklines* +idntobj-introduction indent-object.txt /*idntobj-introduction* +idntobj-objects indent-object.txt /*idntobj-objects* +ii indent-object.txt /*ii* +indent-object.txt indent-object.txt /*indent-object.txt* +list-snippets snipMate.txt /*list-snippets* +luainspect-contact luainspect.txt /*luainspect-contact* +luainspect-installation luainspect.txt /*luainspect-installation* +luainspect-license luainspect.txt /*luainspect-license* +luainspect-references luainspect.txt /*luainspect-references* +luainspect-usage luainspect.txt /*luainspect-usage* +luainspect.txt luainspect.txt /*luainspect.txt* +macros/rails.vim rails.txt /*macros\/rails.vim* +multi_snip snipMate.txt /*multi_snip* +rails rails.txt /*rails* +rails-'cfu' rails.txt /*rails-'cfu'* +rails-'completefunc' rails.txt /*rails-'completefunc'* +rails-'et' rails.txt /*rails-'et'* +rails-'expandtab' rails.txt /*rails-'expandtab'* +rails-'filetype' rails.txt /*rails-'filetype'* +rails-'ft' rails.txt /*rails-'ft'* +rails-'includeexpr' rails.txt /*rails-'includeexpr'* +rails-'inex' rails.txt /*rails-'inex'* +rails-'pa' rails.txt /*rails-'pa'* +rails-'path' rails.txt /*rails-'path'* +rails-'shiftwidth' rails.txt /*rails-'shiftwidth'* +rails-'softtabstop' rails.txt /*rails-'softtabstop'* +rails-'sts' rails.txt /*rails-'sts'* +rails-'sua' rails.txt /*rails-'sua'* +rails-'suffixesadd' rails.txt /*rails-'suffixesadd'* +rails-'sw' rails.txt /*rails-'sw'* +rails-:A rails.txt /*rails-:A* +rails-:AD rails.txt /*rails-:AD* +rails-:AE rails.txt /*rails-:AE* +rails-:AS rails.txt /*rails-:AS* +rails-:AT rails.txt /*rails-:AT* +rails-:AV rails.txt /*rails-:AV* +rails-:OpenURL rails.txt /*rails-:OpenURL* +rails-:R rails.txt /*rails-:R* +rails-:RD rails.txt /*rails-:RD* +rails-:RE rails.txt /*rails-:RE* +rails-:RS rails.txt /*rails-:RS* +rails-:RT rails.txt /*rails-:RT* +rails-:RV rails.txt /*rails-:RV* +rails-:Rabbrev rails.txt /*rails-:Rabbrev* +rails-:Rabbrev! rails.txt /*rails-:Rabbrev!* +rails-:Rails rails.txt /*rails-:Rails* +rails-:Rake rails.txt /*rails-:Rake* +rails-:Rake! rails.txt /*rails-:Rake!* +rails-:Rcd rails.txt /*rails-:Rcd* +rails-:Rcommand rails.txt /*rails-:Rcommand* +rails-:Rconsole rails.txt /*rails-:Rconsole* +rails-:Rcontroller rails.txt /*rails-:Rcontroller* +rails-:Rdbext rails.txt /*rails-:Rdbext* +rails-:Rdestroy rails.txt /*rails-:Rdestroy* +rails-:Rdoc rails.txt /*rails-:Rdoc* +rails-:Rdoc! rails.txt /*rails-:Rdoc!* +rails-:Redit rails.txt /*rails-:Redit* +rails-:Renvironment rails.txt /*rails-:Renvironment* +rails-:Rextract rails.txt /*rails-:Rextract* +rails-:Rfind rails.txt /*rails-:Rfind* +rails-:Rfixtures rails.txt /*rails-:Rfixtures* +rails-:Rfunctionaltest rails.txt /*rails-:Rfunctionaltest* +rails-:Rgenerate rails.txt /*rails-:Rgenerate* +rails-:Rhelper rails.txt /*rails-:Rhelper* +rails-:Rinitializer rails.txt /*rails-:Rinitializer* +rails-:Rintegrationtest rails.txt /*rails-:Rintegrationtest* +rails-:Rinvert rails.txt /*rails-:Rinvert* +rails-:Rjavascript rails.txt /*rails-:Rjavascript* +rails-:Rlayout rails.txt /*rails-:Rlayout* +rails-:Rlcd rails.txt /*rails-:Rlcd* +rails-:Rlib rails.txt /*rails-:Rlib* +rails-:Rlocale rails.txt /*rails-:Rlocale* +rails-:Rlog rails.txt /*rails-:Rlog* +rails-:Rmailer rails.txt /*rails-:Rmailer* +rails-:Rmetal rails.txt /*rails-:Rmetal* +rails-:Rmigration rails.txt /*rails-:Rmigration* +rails-:Rmodel rails.txt /*rails-:Rmodel* +rails-:Rnavcommand rails.txt /*rails-:Rnavcommand* +rails-:Robserver rails.txt /*rails-:Robserver* +rails-:Rp rails.txt /*rails-:Rp* +rails-:Rpartial rails.txt /*rails-:Rpartial* +rails-:Rplugin rails.txt /*rails-:Rplugin* +rails-:Rpp rails.txt /*rails-:Rpp* +rails-:Rpreview rails.txt /*rails-:Rpreview* +rails-:Rpreview! rails.txt /*rails-:Rpreview!* +rails-:Rrefresh rails.txt /*rails-:Rrefresh* +rails-:Rrefresh! rails.txt /*rails-:Rrefresh!* +rails-:Rrunner rails.txt /*rails-:Rrunner* +rails-:Rscript rails.txt /*rails-:Rscript* +rails-:Rserver rails.txt /*rails-:Rserver* +rails-:Rserver! rails.txt /*rails-:Rserver!* +rails-:Rset rails.txt /*rails-:Rset* +rails-:Rspec rails.txt /*rails-:Rspec* +rails-:Rstylesheet rails.txt /*rails-:Rstylesheet* +rails-:Rtags rails.txt /*rails-:Rtags* +rails-:Rtask rails.txt /*rails-:Rtask* +rails-:Rtree rails.txt /*rails-:Rtree* +rails-:Runittest rails.txt /*rails-:Runittest* +rails-:Rview rails.txt /*rails-:Rview* +rails-:Ry rails.txt /*rails-:Ry* +rails-:autocmd rails.txt /*rails-:autocmd* +rails-abbreviations rails.txt /*rails-abbreviations* +rails-abolish rails.txt /*rails-abolish* +rails-about rails.txt /*rails-about* +rails-alternate rails.txt /*rails-alternate* +rails-alternate-related rails.txt /*rails-alternate-related* +rails-autocommands rails.txt /*rails-autocommands* +rails-commands rails.txt /*rails-commands* +rails-configuration rails.txt /*rails-configuration* +rails-cream rails.txt /*rails-cream* +rails-custom-navigation rails.txt /*rails-custom-navigation* +rails-dbext rails.txt /*rails-dbext* +rails-gf rails.txt /*rails-gf* +rails-global-settings rails.txt /*rails-global-settings* +rails-integration rails.txt /*rails-integration* +rails-introduction rails.txt /*rails-introduction* +rails-license rails.txt /*rails-license* +rails-menu rails.txt /*rails-menu* +rails-migrations rails.txt /*rails-migrations* +rails-modelines rails.txt /*rails-modelines* +rails-navigation rails.txt /*rails-navigation* +rails-options rails.txt /*rails-options* +rails-partials rails.txt /*rails-partials* +rails-plugin-author rails.txt /*rails-plugin-author* +rails-rails-integration rails.txt /*rails-rails-integration* +rails-rake rails.txt /*rails-rake* +rails-rake-defaults rails.txt /*rails-rake-defaults* +rails-refactoring rails.txt /*rails-refactoring* +rails-related rails.txt /*rails-related* +rails-rspec rails.txt /*rails-rspec* +rails-screen rails.txt /*rails-screen* +rails-scripts rails.txt /*rails-scripts* +rails-snippets rails.txt /*rails-snippets* +rails-surround rails.txt /*rails-surround* +rails-syntax rails.txt /*rails-syntax* +rails-syntax-assertions rails.txt /*rails-syntax-assertions* +rails-syntax-classes rails.txt /*rails-syntax-classes* +rails-syntax-keywords rails.txt /*rails-syntax-keywords* +rails-syntax-strings rails.txt /*rails-syntax-strings* +rails-syntax-yaml rails.txt /*rails-syntax-yaml* +rails-tabs rails.txt /*rails-tabs* +rails-template-types rails.txt /*rails-template-types* +rails-type-navigation rails.txt /*rails-type-navigation* +rails-vim-integration rails.txt /*rails-vim-integration* +rails.txt rails.txt /*rails.txt* +showmarks showmarks.txt /*showmarks* +showmarks-changelog showmarks.txt /*showmarks-changelog* +showmarks-commands showmarks.txt /*showmarks-commands* +showmarks-configuration showmarks.txt /*showmarks-configuration* +showmarks-contents showmarks.txt /*showmarks-contents* +showmarks-highlighting showmarks.txt /*showmarks-highlighting* +showmarks-mappings showmarks.txt /*showmarks-mappings* +showmarks.txt showmarks.txt /*showmarks.txt* +snipMate snipMate.txt /*snipMate* +snipMate-$# snipMate.txt /*snipMate-$#* +snipMate-${#:} snipMate.txt /*snipMate-${#:}* +snipMate-${#} snipMate.txt /*snipMate-${#}* +snipMate-author snipMate.txt /*snipMate-author* +snipMate-commands snipMate.txt /*snipMate-commands* +snipMate-contact snipMate.txt /*snipMate-contact* +snipMate-description snipMate.txt /*snipMate-description* +snipMate-disadvantages snipMate.txt /*snipMate-disadvantages* +snipMate-expandtab snipMate.txt /*snipMate-expandtab* +snipMate-features snipMate.txt /*snipMate-features* +snipMate-filename snipMate.txt /*snipMate-filename* +snipMate-indenting snipMate.txt /*snipMate-indenting* +snipMate-license snipMate.txt /*snipMate-license* +snipMate-placeholders snipMate.txt /*snipMate-placeholders* +snipMate-remap snipMate.txt /*snipMate-remap* +snipMate-settings snipMate.txt /*snipMate-settings* +snipMate-usage snipMate.txt /*snipMate-usage* +snipMate.txt snipMate.txt /*snipMate.txt* +snippet snipMate.txt /*snippet* +snippet-syntax snipMate.txt /*snippet-syntax* +snippets snipMate.txt /*snippets* +solarized solarized.txt /*solarized* +solarized-colors solarized.txt /*solarized-colors* +solarized-colorscheme solarized.txt /*solarized-colorscheme* +solarized-help solarized.txt /*solarized-help* +solarized-install solarized.txt /*solarized-install* +solarized-menu solarized.txt /*solarized-menu* +solarized-options solarized.txt /*solarized-options* +solarized-term solarized.txt /*solarized-term* +solarized-togglebg solarized.txt /*solarized-togglebg* +solarized.vim solarized.txt /*solarized.vim* +supertab supertab.txt /*supertab* +supertab-completioncontexts supertab.txt /*supertab-completioncontexts* +supertab-contextdefault supertab.txt /*supertab-contextdefault* +supertab-contextdiscover supertab.txt /*supertab-contextdiscover* +supertab-contextexample supertab.txt /*supertab-contextexample* +supertab-contexttext supertab.txt /*supertab-contexttext* +supertab-crmapping supertab.txt /*supertab-crmapping* +supertab-defaultcompletion supertab.txt /*supertab-defaultcompletion* +supertab-duration supertab.txt /*supertab-duration* +supertab-forwardbackward supertab.txt /*supertab-forwardbackward* +supertab-intro supertab.txt /*supertab-intro* +supertab-longestenhanced supertab.txt /*supertab-longestenhanced* +supertab-longesthighlight supertab.txt /*supertab-longesthighlight* +supertab-mappingtabliteral supertab.txt /*supertab-mappingtabliteral* +supertab-options supertab.txt /*supertab-options* +supertab-preventcomplete supertab.txt /*supertab-preventcomplete* +supertab-usage supertab.txt /*supertab-usage* +supertab.txt supertab.txt /*supertab.txt* +surround surround.txt /*surround* +surround-author surround.txt /*surround-author* +surround-customizing surround.txt /*surround-customizing* +surround-issues surround.txt /*surround-issues* +surround-mappings surround.txt /*surround-mappings* +surround-replacements surround.txt /*surround-replacements* +surround-targets surround.txt /*surround-targets* +surround.txt surround.txt /*surround.txt* +syntastic syntastic.txt /*syntastic* +syntastic-about syntastic.txt /*syntastic-about* +syntastic-changelog syntastic.txt /*syntastic-changelog* +syntastic-commands syntastic.txt /*syntastic-commands* +syntastic-contents syntastic.txt /*syntastic-contents* +syntastic-credits syntastic.txt /*syntastic-credits* +syntastic-error-signs syntastic.txt /*syntastic-error-signs* +syntastic-error-window syntastic.txt /*syntastic-error-window* +syntastic-functionality syntastic.txt /*syntastic-functionality* +syntastic-intro syntastic.txt /*syntastic-intro* +syntastic-license syntastic.txt /*syntastic-license* +syntastic-options syntastic.txt /*syntastic-options* +syntastic-statusline-flag syntastic.txt /*syntastic-statusline-flag* +syntastic-syntax-checkers syntastic.txt /*syntastic-syntax-checkers* +syntastic.txt syntastic.txt /*syntastic.txt* +tagbar tagbar.txt /*tagbar* +tagbar-autoopen tagbar.txt /*tagbar-autoopen* +tagbar-commands tagbar.txt /*tagbar-commands* +tagbar-configuration tagbar.txt /*tagbar-configuration* +tagbar-contents tagbar.txt /*tagbar-contents* +tagbar-credits tagbar.txt /*tagbar-credits* +tagbar-extend tagbar.txt /*tagbar-extend* +tagbar-features tagbar.txt /*tagbar-features* +tagbar-highlight tagbar.txt /*tagbar-highlight* +tagbar-history tagbar.txt /*tagbar-history* +tagbar-installation tagbar.txt /*tagbar-installation* +tagbar-intro tagbar.txt /*tagbar-intro* +tagbar-issues tagbar.txt /*tagbar-issues* +tagbar-keys tagbar.txt /*tagbar-keys* +tagbar-other tagbar.txt /*tagbar-other* +tagbar-pseudotags tagbar.txt /*tagbar-pseudotags* +tagbar-requirements tagbar.txt /*tagbar-requirements* +tagbar-todo tagbar.txt /*tagbar-todo* +tagbar-usage tagbar.txt /*tagbar-usage* +tagbar.txt tagbar.txt /*tagbar.txt* +taglist-commands taglist.txt /*taglist-commands* +taglist-debug taglist.txt /*taglist-debug* +taglist-extend taglist.txt /*taglist-extend* +taglist-faq taglist.txt /*taglist-faq* +taglist-functions taglist.txt /*taglist-functions* +taglist-install taglist.txt /*taglist-install* +taglist-internet taglist.txt /*taglist-internet* +taglist-intro taglist.txt /*taglist-intro* +taglist-keys taglist.txt /*taglist-keys* +taglist-license taglist.txt /*taglist-license* +taglist-menu taglist.txt /*taglist-menu* +taglist-options taglist.txt /*taglist-options* +taglist-requirements taglist.txt /*taglist-requirements* +taglist-session taglist.txt /*taglist-session* +taglist-todo taglist.txt /*taglist-todo* +taglist-using taglist.txt /*taglist-using* +taglist.txt taglist.txt /*taglist.txt* +textile-changelog textile.txt /*textile-changelog* +textile-commands textile.txt /*textile-commands* +textile-config textile.txt /*textile-config* +textile-credits textile.txt /*textile-credits* +textile-requirements textile.txt /*textile-requirements* +textile.txt textile.txt /*textile.txt* +toggle-background solarized.txt /*toggle-background* +toggle-bg solarized.txt /*toggle-bg* +togglebg solarized.txt /*togglebg* +unimpaired unimpaired.txt /*unimpaired* +unimpaired-encoding unimpaired.txt /*unimpaired-encoding* +unimpaired-lines unimpaired.txt /*unimpaired-lines* +unimpaired-next unimpaired.txt /*unimpaired-next* +unimpaired-todo unimpaired.txt /*unimpaired-todo* +unimpaired.txt unimpaired.txt /*unimpaired.txt* +urxvt solarized.txt /*urxvt* +vS surround.txt /*vS* +v_[e unimpaired.txt /*v_[e* +v_[u unimpaired.txt /*v_[u* +v_[x unimpaired.txt /*v_[x* +v_[y unimpaired.txt /*v_[y* +v_]e unimpaired.txt /*v_]e* +v_]u unimpaired.txt /*v_]u* +v_]x unimpaired.txt /*v_]x* +v_]y unimpaired.txt /*v_]y* +vgS surround.txt /*vgS* +vim-colors-solarized solarized.txt /*vim-colors-solarized* +vs surround.txt /*vs* +without solarized.txt /*without* +yS surround.txt /*yS* +ySS surround.txt /*ySS* +ys surround.txt /*ys* +yss surround.txt /*yss* +zoomwin ZoomWin.txt /*zoomwin* +zoomwin-copyright ZoomWin.txt /*zoomwin-copyright* +zoomwin-history ZoomWin.txt /*zoomwin-history* +zoomwin-setup ZoomWin.txt /*zoomwin-setup* +zoomwin-usage ZoomWin.txt /*zoomwin-usage* diff --git a/vim/doc/textile.txt b/vim/doc/textile.txt new file mode 100644 index 0000000..fe96b7f --- /dev/null +++ b/vim/doc/textile.txt @@ -0,0 +1,66 @@ +*textile.txt* Textile for Vim Last Change: November 3, 2008 + +============================================================================== +REQUIREMENTS *textile-requirements* + +- ruby - http://ruby-lang.org/ (seperate executable, not compiled in) +- RedCloth - http://redcloth.org/ + +Files with the extension *.textile will auto-detected. If editing a new file, +or otherwise, run ":setf textile" to enable textile commands. + + +============================================================================== +CHANGELOG *textile-changelog* + +0.3 - Fixed keymappings in the documentation +0.2 - Added multiple colors for headers, and alternating colors for list + items + - Fixed error in the vim script for TextileRenderBufferToFile + - Changed shortcut keys from \tp to \rp (render preview instead of + textile preview, since it's file-type specific anyways) +0.1 - Initial Release + +============================================================================== +COMMANDS *textile-commands* + +:TextilePreview - Render the current buffer to a temp file, and open it in + your web browser (OSX only) + + <Leader>rp + +:TextileRenderTab - ... to a new tab + + <Leader>rt + +:TextileRenderFile - ... to a file + + <Leader>rf + +<Leader> is \ by default, so <Leader>rp == \rp + +============================================================================== +CONFIG *textile-config* + +MAC OS X: + + Optional: + set g:TextileBrowser="Google Chrome" - Open preview in "Google Chrome" + rather than Safari (optional) + +Other: + + Mandatory: + set g:TextileOS="Linux" + set g:TextileBrowser="/path/to/browser_bin" + + +============================================================================== +CREDITS *textile-credits* + +- "Dominic Mitchell":http://happygiraffe.net/: initial syntax highlighting +- "Aaron Bieber":http://blog.aaronbieber.com/: improved syntax highlighting +- "Tim Harper":http://tim.theenchanter.com/ : improved syntax highlighting, + plugin + +vim:tw=78:noet:wrap:ts=2:expandtab:ft=help:norl: diff --git a/vim/doc/unimpaired.txt b/vim/doc/unimpaired.txt new file mode 100644 index 0000000..82d61a9 --- /dev/null +++ b/vim/doc/unimpaired.txt @@ -0,0 +1,103 @@ +*unimpaired.txt* Pairs of handy bracket mappings + +Author: Tim Pope <http://tpo.pe/> +License: Same terms as Vim itself (see |license|) + +This plugin is only available if 'compatible' is not set. + +INTRODUCTION *unimpaired* + +This plugin provides several pairs of bracket maps. + +NEXT AND PREVIOUS *unimpaired-next* + +The following maps all correspond to normal mode commands. If a count is +given, it becomes an argument to the command. A mnemonic for the "a" commands +is "args" and for the "q" commands is "quickfix". + +*[a* |:previous| +*]a* |:next| +*[A* |:first| +*]A* |:last| +*[b* |:bprevious| +*]b* |:bnext| +*[B* |:bfirst| +*]B* |:blast| +*[l* |:lprevious| +*]l* |:lnext| +*[L* |:lfirst| +*]L* |:llast| +*[q* |:cprevious| +*]q* |:cnext| +*[Q* |:cfirst| +*]Q* |:clast| +*[t* |:tprevious| +*]t* |:tnext| +*[T* |:tfirst| +*]T* |:tlast| + + *[o* +[o Go to the file preceding the current one + alphabetically in the current file's directory. + + *]o* +]o Go to the file succeeding the current one + alphabetically in the current file's directory. + +LINE OPERATIONS *unimpaired-lines* + + *[<Space>* +[<Space> Add [count] blank lines above the cursor. + + *]<Space>* +]<Space> Add [count] blank lines below the cursor. + + *[e* *v_[e* +[e Exchange the current line with [count] lines above it. + + *]e* *v_]e* +]e Exchange the current line with [count] lines below it. + +ENCODING AND DECODING *unimpaired-encoding* + +Each of these operations has a map that takes a motion, a map that +targets [count] lines, and a visual mode map. The linewise variant integrates +with repeat.vim. + +Mnenomic: encoding always comes before decoding; "[" always comes before "]". + + *[x* *[xx* *v_[x* +[x{motion} XML encode. +[xx <foo bar="baz"> => <foo bar="baz"> +{Visual}[x + + *]x* *]xx* *v_]x* +]x{motion} XML decode. HTML entities are handled as well. +]xx +{Visual}]x + + *[u* *[uu* *v_[u* +[u{motion} URL encode. +[uu foo bar => foo%20bar +{Visual}[u + + *]u* *]uu* *v_]u* +]u{motion} URL decode. +]uu +{Visual}]u + + *[y* *[yy* *v_[y* +[y{motion} C String encode. Backslash escape control +[yy characters, quotation marks, and backslashes. +{Visual}[y + + *]y* *]yy* *v_]y* +]y{motion} C String decode. +]yy +{Visual}]y + +TODO *unimpaired-todo* + +Avoid munging null characters when encoding and decoding. + + vim:tw=78:et:ft=help:norl: |