aboutsummaryrefslogtreecommitdiff
path: root/vim/doc
diff options
context:
space:
mode:
authorBen Beltran <ben@freshout.us>2013-06-05 09:34:53 -0500
committerBen Beltran <ben@freshout.us>2013-06-05 09:34:53 -0500
commite23d7a9f7363bdc69e95a1df31e093db15459fcf (patch)
treeca013667439bad6c4fc672b790c1a14d0d71566f /vim/doc
parent547f6d2a3743174ff385ba239665b5de1964a043 (diff)
A whole bunch of new additions to the submodules
Diffstat (limited to 'vim/doc')
-rw-r--r--vim/doc/Align.txt1469
-rw-r--r--vim/doc/NERD_commenter.txt988
-rw-r--r--vim/doc/NERD_tree.txt1226
-rw-r--r--vim/doc/ZoomWin.txt121
-rw-r--r--vim/doc/ack.txt51
-rw-r--r--vim/doc/delimitMate.txt818
6 files changed, 0 insertions, 4673 deletions
diff --git a/vim/doc/Align.txt b/vim/doc/Align.txt
deleted file mode 100644
index c447372..0000000
--- a/vim/doc/Align.txt
+++ /dev/null
@@ -1,1469 +0,0 @@
-*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
deleted file mode 100644
index 5309f61..0000000
--- a/vim/doc/NERD_commenter.txt
+++ /dev/null
@@ -1,988 +0,0 @@
-*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
deleted file mode 100644
index 5ff0651..0000000
--- a/vim/doc/NERD_tree.txt
+++ /dev/null
@@ -1,1226 +0,0 @@
-*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
deleted file mode 100644
index a691a60..0000000
--- a/vim/doc/ZoomWin.txt
+++ /dev/null
@@ -1,121 +0,0 @@
-*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
deleted file mode 100644
index bbe4299..0000000
--- a/vim/doc/ack.txt
+++ /dev/null
@@ -1,51 +0,0 @@
-*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/delimitMate.txt b/vim/doc/delimitMate.txt
deleted file mode 100644
index 8067cf2..0000000
--- a/vim/doc/delimitMate.txt
+++ /dev/null
@@ -1,818 +0,0 @@
-*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: