Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Install Vundle

* Set up Vundle in vimrc.
* Delete old copies of vim scripts.
* Bundles are automatically set up as referenced submodules.
* Ignore .netrwhist files given presence of submodules.
* Set up vundle in install script.
  • Loading branch information...
commit 126344c3cb37d31f9c4d882cc9eee751d1d7111e 1 parent d8adb07
Dan Croak authored October 24, 2012

Showing 62 changed files with 44 additions and 14,738 deletions. Show diff stats Hide diff stats

  1. 1  .gitignore
  2. 5  install.sh
  3. 2  vim/after/indent/html.vim
  4. 4,647  vim/autoload/rails.vim
  5. 1  vim/bundle/ctags.vim
  6. 1  vim/bundle/greplace.vim
  7. 1  vim/bundle/html.vim
  8. 1  vim/bundle/tComment
  9. 1  vim/bundle/textile.vim
  10. 1  vim/bundle/treetop.vim
  11. 1  vim/bundle/vim-coffee-script
  12. 1  vim/bundle/vim-cucumber
  13. 1  vim/bundle/vim-endwise
  14. 1  vim/bundle/vim-fugitive
  15. 1  vim/bundle/vim-haml
  16. 1  vim/bundle/vim-markdown
  17. 1  vim/bundle/vim-matchit
  18. 1  vim/bundle/vim-rails
  19. 1  vim/bundle/vim-surround
  20. 1  vim/bundle/vundle
  21. 29  vim/compiler/cucumber.vim
  22. 313  vim/doc/fugitive.txt
  23. 161  vim/doc/greplace.txt
  24. 406  vim/doc/matchit.txt
  25. 1,202  vim/doc/rails.txt
  26. 218  vim/doc/surround.txt
  27. 208  vim/doc/tComment.txt
  28. 52  vim/doc/textile.txt
  29. 7  vim/ftdetect/coffee.vim
  30. 2  vim/ftdetect/cucumber.vim
  31. 1  vim/ftdetect/eco.vim
  32. 3  vim/ftdetect/haml.vim
  33. 233  vim/ftplugin/coffee.vim
  34. 132  vim/ftplugin/cucumber.vim
  35. 67  vim/ftplugin/haml.vim
  36. 22  vim/ftplugin/sass.vim
  37. 12  vim/ftplugin/scss.vim
  38. 51  vim/ftplugin/textile.vim
  39. 322  vim/indent/coffee.vim
  40. 60  vim/indent/cucumber.vim
  41. 73  vim/indent/haml.vim
  42. 39  vim/indent/sass.vim
  43. 12  vim/indent/scss.vim
  44. 10  vim/plugin/ctags.vim
  45. 132  vim/plugin/endwise.vim
  46. 2,532  vim/plugin/fugitive.vim
  47. 310  vim/plugin/greplace.vim
  48. 812  vim/plugin/matchit.vim
  49. 314  vim/plugin/rails.vim
  50. 628  vim/plugin/surround.vim
  51. 849  vim/plugin/tComment.vim
  52. 5  vim/plugin/textile.vim
  53. 237  vim/syntax/coffee.vim
  54. 126  vim/syntax/cucumber.vim
  55. 62  vim/syntax/eco.vim
  56. 109  vim/syntax/haml.vim
  57. 104  vim/syntax/mkd.vim
  58. 90  vim/syntax/sass.vim
  59. 20  vim/syntax/scss.vim
  60. 87  vim/syntax/textile.vim
  61. 35  vim/syntax/treetop.vim
  62. 24  vimrc
1  .gitignore
... ...
@@ -1,2 +1 @@
1  
-vim/.netrwhist
2 1
 !bin
5  install.sh
@@ -8,7 +8,7 @@ for name in *; do
8 8
     if [ ! -L "$target" ]; then
9 9
       cutline=`grep -n -m1 "$cutstring" "$target" | sed "s/:.*//"`
10 10
       if [ -n "$cutline" ]; then
11  
-	cutline=$((cutline-1))
  11
+        cutline=$((cutline-1))
12 12
         echo "Updating $target"
13 13
         head -n $cutline "$target" > update_tmp
14 14
         startline=`sed '1!G;h;$!d' "$name" | grep -n -m1 "$cutstring" | sed "s/:.*//"`
@@ -33,3 +33,6 @@ for name in *; do
33 33
     fi
34 34
   fi
35 35
 done
  36
+
  37
+git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
  38
+vim +BundleInstall +qa
2  vim/after/indent/html.vim
... ...
@@ -1,2 +0,0 @@
1  
-let g:html_indent_tags = g:html_indent_tags . '\|li'
2  
-
4,647  vim/autoload/rails.vim
0 additions, 4647 deletions not shown
1  vim/bundle/ctags.vim
... ...
@@ -0,0 +1 @@
  1
+Subproject commit a438a4f580c9445744c25941185c8cb8fb6b79b9
1  vim/bundle/greplace.vim
... ...
@@ -0,0 +1 @@
  1
+Subproject commit 993631c237f25051327d13ba9d597f77cda7e6e7
1  vim/bundle/html.vim
... ...
@@ -0,0 +1 @@
  1
+Subproject commit dc0dcc66164d0a404be8477ff1d51fa7669b70ea
1  vim/bundle/tComment
... ...
@@ -0,0 +1 @@
  1
+Subproject commit d3523a01c7dfd7eede39a319d419bffae0b4490b
1  vim/bundle/textile.vim
... ...
@@ -0,0 +1 @@
  1
+Subproject commit 02687a578042214b91aec50ac1845a96eb3d9591
1  vim/bundle/treetop.vim
... ...
@@ -0,0 +1 @@
  1
+Subproject commit 9ba73a5f75630e24550fbd8ea600b264e87fedd5
1  vim/bundle/vim-coffee-script
... ...
@@ -0,0 +1 @@
  1
+Subproject commit 089506ed89da1849485fdfcca002a42111759fab
1  vim/bundle/vim-cucumber
... ...
@@ -0,0 +1 @@
  1
+Subproject commit 8112713aaf04192d255761b3d19279f2b9582996
1  vim/bundle/vim-endwise
... ...
@@ -0,0 +1 @@
  1
+Subproject commit 33f9ee05b7e62ba85a20ea38095820cf091b35e3
1  vim/bundle/vim-fugitive
... ...
@@ -0,0 +1 @@
  1
+Subproject commit 003f38c6a4d8e3d527e4e1dfeab6fdf05c8ff149
1  vim/bundle/vim-haml
... ...
@@ -0,0 +1 @@
  1
+Subproject commit 9a891ed78a4b222e8c710e533e0d1f21259c0ef1
1  vim/bundle/vim-markdown
... ...
@@ -0,0 +1 @@
  1
+Subproject commit 9407dae6609ef9751acc8eedc30f52999018eb47
1  vim/bundle/vim-matchit
... ...
@@ -0,0 +1 @@
  1
+Subproject commit 8f8665e04fe377a25bbed29abf13ea66a1a0c129
1  vim/bundle/vim-rails
... ...
@@ -0,0 +1 @@
  1
+Subproject commit 9b6bed029efd733a9870d5383ee04e3b46cef889
1  vim/bundle/vim-surround
... ...
@@ -0,0 +1 @@
  1
+Subproject commit 1a73f607f8f5477d6942df2eb6e7245c4864f4d3
1  vim/bundle/vundle
... ...
@@ -0,0 +1 @@
  1
+Subproject commit 3bf598d169993d703c21115876c36e460a51b100
29  vim/compiler/cucumber.vim
... ...
@@ -1,29 +0,0 @@
1  
-" Vim compiler file
2  
-" Compiler:	Cucumber
3  
-" Maintainer:	Tim Pope <vimNOSPAM@tpope.org>
4  
-" Last Change:	2010 Aug 09
5  
-
6  
-if exists("current_compiler")
7  
-  finish
8  
-endif
9  
-let current_compiler = "cucumber"
10  
-
11  
-if exists(":CompilerSet") != 2		" older Vim always used :setlocal
12  
-  command -nargs=* CompilerSet setlocal <args>
13  
-endif
14  
-
15  
-let s:cpo_save = &cpo
16  
-set cpo-=C
17  
-
18  
-CompilerSet makeprg=cucumber
19  
-
20  
-CompilerSet errorformat=
21  
-      \%W%m\ (Cucumber::Undefined),
22  
-      \%E%m\ (%.%#),
23  
-      \%Z%f:%l,
24  
-      \%Z%f:%l:%.%#
25  
-
26  
-let &cpo = s:cpo_save
27  
-unlet s:cpo_save
28  
-
29  
-" vim:set sw=2 sts=2:
313  vim/doc/fugitive.txt
... ...
@@ -1,313 +0,0 @@
1  
-*fugitive.txt*  A Git wrapper so awesome, it should be illegal
2  
-
3  
-Author:  Tim Pope <http://tpo.pe/>
4  
-License: Same terms as Vim itself (see |license|)
5  
-
6  
-This plugin is only available if 'compatible' is not set.
7  
-
8  
-INTRODUCTION                                    *fugitive*
9  
-
10  
-Whenever you edit a file from a Git repository, a set of commands is defined
11  
-that serve as a gateway to Git.
12  
-
13  
-COMMANDS                                        *fugitive-commands*
14  
-
15  
-These commands are local to the buffers in which they work (generally, buffers
16  
-that are part of Git repositories).
17  
-
18  
-                                                *fugitive-:Git*
19  
-:Git [args]             Run an arbitrary git command. Similar to :!git [args]
20  
-                        but chdir to the repository tree first.
21  
-
22  
-                                                *fugitive-:Git!*
23  
-:Git! [args]            Like |:Git|, but capture the output into a temp file,
24  
-                        and edit that temp file.
25  
-
26  
-                                                *fugitive-:Gcd*
27  
-:Gcd [directory]        |:cd| relative to the repository.
28  
-
29  
-                                                *fugitive-:Glcd*
30  
-:Glcd [directory]       |:lcd| relative to the repository.
31  
-
32  
-                                                *fugitive-:Gstatus*
33  
-:Gstatus                Bring up the output of git-status in the preview
34  
-                        window.  The following maps, which work on the cursor
35  
-                        line file where sensible, are provided:
36  
-
37  
-                        <C-N> next file
38  
-                        <C-P> previous file
39  
-                        <CR>  |:Gedit|
40  
-                        -     |:Git| add
41  
-                        -     |:Git| reset (staged files)
42  
-                        cA    |:Gcommit| --amend --reuse-message=HEAD
43  
-                        ca    |:Gcommit| --amend
44  
-                        cc    |:Gcommit|
45  
-                        cva   |:Gcommit| --amend --verbose
46  
-                        cvc   |:Gcommit| --verbose
47  
-                        D     |:Gdiff|
48  
-                        ds    |:Gsdiff|
49  
-                        dp    |:Git!| diff (p for patch; use :Gw to apply)
50  
-                        dp    |:Git| add --intent-to-add (untracked files)
51  
-                        dv    |:Gvdiff|
52  
-                        O     |:Gtabedit|
53  
-                        o     |:Gsplit|
54  
-                        p     |:Git| add --patch
55  
-                        p     |:Git| reset --patch (staged files)
56  
-                        q     close status
57  
-                        R     reload status
58  
-                        S     |:Gvsplit|
59  
-
60  
-                                                *fugitive-:Gcommit*
61  
-:Gcommit [args]         A wrapper around git-commit.  If there is nothing
62  
-                        to commit, |:Gstatus| is called instead.  Unless the
63  
-                        arguments given would skip the invocation of an editor
64  
-                        (e.g., -m), a split window will be used to obtain a
65  
-                        commit message.  Write and close that window (:wq or
66  
-                        |:Gwrite|) to finish the commit.  Unlike when running
67  
-                        the actual git-commit command, it is possible (but
68  
-                        unadvisable) to muck with the index with commands like
69  
-                        git-add and git-reset while a commit message is
70  
-                        pending.
71  
-
72  
-                                                *fugitive-:Ggrep*
73  
-:Ggrep [args]           |:grep| with git-grep as 'grepprg'.
74  
-
75  
-                                                *fugitive-:Glgrep*
76  
-:Glgrep [args]          |:lgrep| with git-grep as 'grepprg'.
77  
-
78  
-                                                *fugitive-:Glog*
79  
-:Glog [args]            Load all previous revisions of the current file into
80  
-                        the quickfix list.  Additional git-log arguments can
81  
-                        be given (for example, --reverse).  If "--" appears as
82  
-                        an argument, no file specific filtering is done, and
83  
-                        previous commits rather than previous file revisions
84  
-                        are loaded.
85  
-
86  
-                                                *fugitive-:Gllog*
87  
-:Gllog [args]           Like |:Glog|, but use the location list instead of the
88  
-                        quickfix list.
89  
-
90  
-                                        *fugitive-:Gedit* *fugitive-:Ge*
91  
-:Gedit [revision]       |:edit| a |fugitive-revision|.
92  
-
93  
-                                                *fugitive-:Gsplit*
94  
-:Gsplit [revision]      |:split| a |fugitive-revision|.
95  
-
96  
-                                                *fugitive-:Gvsplit*
97  
-:Gvsplit [revision]     |:vsplit| a |fugitive-revision|.
98  
-
99  
-                                                *fugitive-:Gtabedit*
100  
-:Gtabedit [revision]    |:tabedit| a |fugitive-revision|.
101  
-
102  
-                                                *fugitive-:Gpedit*
103  
-:Gpedit [revision]      |:pedit| a |fugitive-revision|.
104  
-
105  
-:Gsplit! [args]                 *fugitive-:Gsplit!* *fugitive-:Gvsplit!*
106  
-:Gvsplit! [args]                *fugitive-:Gtabedit!* *fugitive-:Gpedit!*
107  
-:Gtabedit! [args]       Like |:Git!|, but open the resulting temp file in a
108  
-:Gpedit! [args]         split, tab, or preview window.
109  
-
110  
-                                                *fugitive-:Gread*
111  
-:Gread [revision]       Empty the buffer and |:read| a |fugitive-revision|.
112  
-                        When the argument is omitted, this is similar to
113  
-                        git-checkout on a work tree file or git-add on a stage
114  
-                        file, but without writing anything to disk.
115  
-
116  
-:{range}Gread [revision]
117  
-                        |:read| in a |fugitive-revision| after {range}.
118  
-
119  
-                                                *fugitive-:Gread!*
120  
-:Gread! [args]          Empty the buffer and |:read| the output of a Git
121  
-                        command.  For example, :Gread! show HEAD:%.
122  
-
123  
-:{range}Gread! [args]  |:read| the output of a Git command after {range}.
124  
-
125  
-                                                *fugitive-:Gwrite*
126  
-:Gwrite                 Write to the current file's path and stage the results.
127  
-                        When run in a work tree file, it is effectively git
128  
-                        add.  Elsewhere, it is effectively git-checkout.  A
129  
-                        great deal of effort is expended to behave sensibly
130  
-                        when the work tree or index version of the file is
131  
-                        open in another buffer.
132  
-
133  
-:Gwrite {path}          You can give |:Gwrite| an explicit path of where in
134  
-                        the work tree to write.  You can also give a path like
135  
-                        :0:foo.txt or even :0 to write to just that stage in
136  
-                        the index.
137  
-
138  
-                                                *fugitive-:Gwq*
139  
-:Gwq [path]             Like |:Gwrite| followed by |:quit| if the write
140  
-                        succeeded.
141  
-
142  
-:Gwq! [path]            Like |:Gwrite|! followed by |:quit|! if the write
143  
-                        succeeded.
144  
-
145  
-                                                *fugitive-:Gdiff*
146  
-:Gdiff [revision]       Perform a |vimdiff| against the current file in the
147  
-                        given revision.  With no argument, the version in the
148  
-                        index is used (which means a three-way diff during a
149  
-                        merge conflict, making it a git-mergetool
150  
-                        alternative).  The newer of the two files is placed
151  
-                        to the right.  Use |do| and |dp| and write to the
152  
-                        index file to simulate "git add --patch".
153  
-
154  
-                                                *fugitive-:Gsdiff*
155  
-:Gsdiff [revision]      Like |:Gdiff|, but split horizontally.
156  
-
157  
-                                                *fugitive-:Gvdiff*
158  
-:Gvdiff [revision]      Identical to |:Gdiff|.  For symmetry with |:Gsdiff|.
159  
-
160  
-                                                *fugitive-:Gmove*
161  
-:Gmove {destination}    Wrapper around git-mv that renames the buffer
162  
-                        afterward.  The destination is relative to the current
163  
-                        directory except when started with a /, in which case
164  
-                        it is relative to the work tree.  Add a ! to pass -f.
165  
-
166  
-                                                *fugitive-:Gremove*
167  
-:Gremove                Wrapper around git-rm that deletes the buffer
168  
-                        afterward.  When invoked in an index file, --cached is
169  
-                        passed.  Add a ! to pass -f and forcefully discard the
170  
-                        buffer.
171  
-
172  
-                                                *fugitive-:Gblame*
173  
-:Gblame [flags]         Run git-blame on the file and open the results in a
174  
-                        scroll bound vertical split.  Press enter on a line to
175  
-                        reblame the file as it was in that commit.  You can
176  
-                        give any of ltfnsewMC as flags and they will be passed
177  
-                        along to git-blame.  The following maps, which work on
178  
-                        the cursor line commit where sensible, are provided:
179  
-
180  
-                        A     resize to end of author column
181  
-                        C     resize to end of commit column
182  
-                        D     resize to end of date/time column
183  
-                        q     close blame and return to blamed window
184  
-                        gq    q, then |:Gedit| to return to work tree version
185  
-                        i     q, then open commit
186  
-                        o     open commit in horizontal split
187  
-                        O     open commit in new tab
188  
-                        -     reblame at commit
189  
-                        ~     reblame at [count]th first grandparent
190  
-                        P     reblame at [count]th parent (like HEAD^[count])
191  
-
192  
-:[range]Gblame [flags]  Run git-blame on the given range.
193  
-
194  
-                                                *fugitive-:Gbrowse*
195  
-:[range]Gbrowse         If the remote for the current branch is on GitHub,
196  
-                        open the current file, blob, tree, commit, or tag
197  
-                        (with git-web--browse) on GitHub.  Otherwise, open the
198  
-                        current file, blob, tree, commit, or tag in
199  
-                        git-instaweb (if you have issues, verify you can run
200  
-                        "git instaweb" from a terminal).  If a range is given,
201  
-                        it is appropriately appended to the URL as an anchor.
202  
-
203  
-                        To use with GitHub FI, point g:fugitive_github_domains
204  
-                        at a list of domains:
205  
->
206  
-                        let g:fugitive_github_domains = ['git.example.com']
207  
-~
208  
-:[range]Gbrowse!        Like :Gbrowse, but put the URL on the clipboard rather
209  
-                        than opening it.
210  
-
211  
-:[range]Gbrowse {revision}
212  
-                        Like :Gbrowse, but for a given |fugitive-revision|.  A
213  
-                        useful value here is -, which ties the URL to the
214  
-                        latest commit rather than a volatile branch.
215  
-
216  
-:[range]Gbrowse [...]@{remote}
217  
-                        Force using the given remote rather than the remote
218  
-                        for the current branch.  The remote is used to
219  
-                        determine which GitHub repository to link to.
220  
-
221  
-MAPPINGS                                        *fugitive-mappings*
222  
-
223  
-These maps are available everywhere.
224  
-
225  
-                                                *fugitive-c_CTRL-R_CTRL-G*
226  
-<C-R><C-G>              On the command line, recall the path to the current
227  
-                        object (that is, a representation of the object
228  
-                        recognized by |:Gedit|).
229  
-
230  
-                                                *fugitive-y_CTRL-G*
231  
-["x]y<C-G>              Yank the commit SHA and path to the current object.
232  
-
233  
-These maps are available in Git objects.
234  
-
235  
-                                                *fugitive-<CR>*
236  
-<CR>                    Jump to the revision under the cursor.
237  
-
238  
-                                                *fugitive-o*
239  
-o                       Jump to the revision under the cursor in a new split.
240  
-
241  
-                                                *fugitive-S*
242  
-S                       Jump to the revision under the cursor in a new
243  
-                        vertical split.
244  
-
245  
-                                                *fugitive-O*
246  
-O                       Jump to the revision under the cursor in a new tab.
247  
-
248  
-                                                *fugitive--*
249  
--                       Go to the tree containing the current tree or blob.
250  
-
251  
-                                                *fugitive-~*
252  
-~                       Go to the current file in the [count]th first
253  
-                        ancestor.
254  
-
255  
-                                                *fugitive-P*
256  
-P                       Go to the current file in the [count]th parent.
257  
-
258  
-                                                *fugitive-C*
259  
-C                       Go to the commit containing the current file.
260  
-
261  
-                                                *fugitive-a*
262  
-a                       Show the current tag, commit, or tree in an alternate
263  
-                        format.
264  
-
265  
-SPECIFYING REVISIONS                            *fugitive-revision*
266  
-
267  
-Fugitive revisions are similar to Git revisions as defined in the "SPECIFYING
268  
-REVISIONS" section in the git-rev-parse man page.  For commands that accept an
269  
-optional revision, the default is the file in the index for work tree files
270  
-and the work tree file for everything else.  Example revisions follow.
271  
-
272  
-Revision        Meaning ~
273  
-HEAD            .git/HEAD
274  
-master          .git/refs/heads/master
275  
-HEAD^{}         The commit referenced by HEAD
276  
-HEAD^           The parent of the commit referenced by HEAD
277  
-HEAD:           The tree referenced by HEAD
278  
-/HEAD           The file named HEAD in the work tree
279  
-Makefile        The file named Makefile in the work tree
280  
-HEAD^:Makefile  The file named Makefile in the parent of HEAD
281  
-:Makefile       The file named Makefile in the index (writable)
282  
--               The current file in HEAD
283  
-^               The current file in the previous commit
284  
-~3              The current file 3 commits ago
285  
-:               .git/index (Same as |:Gstatus|)
286  
-:0              The current file in the index
287  
-:1              The current file's common ancestor during a conflict
288  
-:2              The current file in the target branch during a conflict
289  
-:3              The current file in the merged branch during a conflict
290  
-:/foo           The most recent commit with "foo" in the message
291  
-
292  
-STATUSLINE                                      *fugitive-statusline*
293  
-
294  
-                                                *fugitive#statusline()*
295  
-Add %{fugitive#statusline()} to your statusline to get an indicator including
296  
-the current branch and the currently edited file's commit.  If you don't have
297  
-a statusline, this one matches the default when 'ruler' is set:
298  
->
299  
-    set statusline=%<%f\ %h%m%r%{fugitive#statusline()}%=%-14.(%l,%c%V%)\ %P
300  
-<
301  
-                                                *fugitive#head(...)*
302  
-Use fugitive#head() to return the name of the current branch. If the current
303  
-HEAD is detached, fugitive#head() will return the empty string, unless the
304  
-optional argument is given, in which case the hash of the current commit will
305  
-be truncated to the given number of characters.
306  
-
307  
-ABOUT                                           *fugitive-about*
308  
-
309  
-Grab the latest version or report a bug on GitHub:
310  
-
311  
-http://github.com/tpope/vim-fugitive
312  
-
313  
- vim:tw=78:et:ft=help:norl:
161  vim/doc/greplace.txt
... ...
@@ -1,161 +0,0 @@
1  
-*greplace.txt*	Plugin for replacing pattern across multiple files
2  
-
3  
-Author: Yegappan Lakshmanan  (yegappan AT yahoo DOT com)
4  
-For Vim version 7.0 and above
5  
-Last change: 2007 March 2
6  
-
7  
-Overview~
8  
-
9  
-The Global Replace plugin allows you to search and replace a pattern across
10  
-multiple files. The lines containing a specified pattern in multiple files are
11  
-displayed in a buffer. You can edit the lines in this buffer and make the
12  
-desired modifications to them. The plugin can then incorporate these changes
13  
-back into the corresponding files interactively.
14  
-
15  
-==============================================================================
16  
-
17  
-Installation~
18  
-
19  
-1. Download the greplace.vim file and unzip the files into the $HOME/.vim
20  
-   or the $HOME/vimfiles or the $VIM/vimfiles directory.  After this step, you
21  
-   should have the following two files (the directory structure should be
22  
-   preserved):
23  
-
24  
-	plugin/greplace.vim - main global replace plugin file
25  
-	doc/greplace.txt    - documentation (help) file
26  
-
27  
-2. Change to the $HOME/.vim/doc or $HOME/vimfiles/doc or $VIM/vimfiles/doc
28  
-   directory, start Vim and run the ":helptags ." command to process the
29  
-   help file. Without this step, you cannot jump to the help topics.
30  
-3. Restart Vim.
31  
-
32  
-To uninstall the global replace plugin, remove the plugin/greplace.vim and
33  
-doc/greplace.txt files from the $HOME/.vim or $HOME/vimfiles directory.
34  
-
35  
-==============================================================================
36  
-
37  
-The following commands are provided by this plugin:
38  
-
39  
-:Gsearch         Search for a given pattern in the specified group of
40  
-                 files and display the matches in the replace buffer.
41  
-:Gbuffersearch   Search for a given pattern in all the buffers
42  
-                 in the Vim buffer list.
43  
-:Gargsearch      Search for a given pattern in all the files in the
44  
-                 Vim argument list.
45  
-:Gqfopen         Use the results from the quickfix list.
46  
-:Greplace        Incorporate the modifications from the replace buffer
47  
-                 into the corresponding files.
48  
-
49  
-One example sequence of commands for using this plugin is:
50  
-
51  
-    :Gsearch mypattern *.java *.c
52  
-    <The above command will search for mypattern in *.java and *.c
53  
-    files in the current directory and display the matching lines
54  
-    in a buffer.>
55  
-    <You can now use the Vim editing commands to modify the buffer>
56  
-
57  
-    :Greplace
58  
-    <The above command will load each of the buffer which needs to be changed
59  
-    and ask you to confirm whether to make the change or not>
60  
-    
61  
-    :wall
62  
-    <To save all the modified buffers>
63  
-
64  
-In the above sequence, instead of ":Gsearch", you can use ":Gbuffersearch" or
65  
-":Gargsearch" commands to search for a pattern in the files in the Vim buffer
66  
-list or the argument list.
67  
-
68  
-The ":Gsearch" command uses the Vim ":grep" command to search for the pattern
69  
-in the specified files. The ":grep" command uses the program specified by the
70  
-"grepprg" option to search for the pattern. By default, the "grepprg" option
71  
-is set to either grep (on Unix) or findstr (on MS-Windows). By modifying the
72  
-"grepprg" option, you can also use other programs for searching. To use the
73  
-Vim internal grep, set the "grepprg" option to "internal".
74  
-
75  
-The syntax of the ":Gsearch" command is:
76  
->
77  
-    :Gsearch [<grep-option(s)>] [[<pattern>] [<filename(s)>]]
78  
-<
79  
-The arguments to the ":Gsearch" command are optional.
80  
-
81  
-The first set of arguments, if present, specify the options to the grep
82  
-program. These options must start with "-" (for Unix) and "/" (for
83  
-MS-Windows). For example, to ignore case, you can use "-i" for the Unix
84  
-grep program.
85  
-
86  
-The next argument specifies the pattern. You cannot use space characters in
87  
-the pattern. To specify space characters in the pattern, don't specify the
88  
-pattern in the command-line. See below for more information.
89  
-
90  
-The last set of arguments specify the filenames. You can use wildcards in the
91  
-filenames. You can also complete directory and file names by pressing <Tab>.
92  
-
93  
-If the pattern or the filenames is not supplied as argument to the ":Gsearch"
94  
-command, then you will be prompted to enter the pattern and the filenames. The
95  
-default value for the search pattern is the keyword under the cursor. In the
96  
-prompt for entering the pattern, you can enter a pattern with space
97  
-characters. In the prompt for entering the filenames, you can press <Tab> to
98  
-complete the directory and file names.
99  
-
100  
-To search for a pattern in the files in the Vim buffer list, use the
101  
-":Gbuffersearch" command. The syntax of this command is:
102  
->
103  
-    :Gbuffersearch [<grep-option(s)>]
104  
-<
105  
-This command is similar to the ":Gsearch" command.  This command searches for
106  
-the specified pattern in all the files in the buffer list. You cannot specify
107  
-filenames to this command.
108  
-
109  
-To search for a pattern in the files in the Vim argument list, use the
110  
-":Gargsearch" command. The syntax of this command is:
111  
->
112  
-    :Gargsearch [<grep-option(s)>]
113  
-<
114  
-This command is similar to the ":Gsearch" command.  This command will search
115  
-for the specified pattern in all the files in the argument list. You cannot
116  
-specify filenames to this command.
117  
-
118  
-The difference between the ":Gbuffersearch" command and the Vim
119  
-":bufdo %s/pattern/replace/c" command is that the ":Gbuffersearch" command
120  
-allows you to inspect and change the matching lines in a buffer and then
121  
-incorporate the changes. You can also make different changes to different
122  
-lines. With a single ":bufdo" command, you can make only the one type of
123  
-change in all the buffers.  The same difference applies for the ":Gargsearch"
124  
-and the ":argdo" command.
125  
-
126  
-Sometimes, you may have the desired list of filenames and the matching lines
127  
-in them already in the quickfix list. For example, you can run tools like
128  
-cscope, GNU id-utils, GNU global, etc., and get the results into the quickfix
129  
-list. To use this list of files for replacing text, you can use the ":Gqfopen"
130  
-command. This command doesn't take the pattern or filenames arguments. It
131  
-parses the file names and lines in them from the current quickfix list and
132  
-displays it in the replace buffer.
133  
-
134  
-You can edit the contents of the replace buffer using the Vim editing
135  
-commands. You cannot save the contents to a regular file. You should not
136  
-change the filename or line numbers in the replace buffer. You should not add
137  
-additional lines in this buffer. If you don't want to make any changes, you
138  
-can close the replace buffer.
139  
-
140  
-You can use the ":Greplace" command to store the modified lines from the
141  
-replace buffer back to the corresponding files. This command is available only
142  
-in the replace buffer.
143  
-
144  
-The ":Greplace" command will prompt you to confirm each of the changes.  At
145  
-this prompt, you can press 'y' to accept the change, 'n' to reject the change,
146  
-'a' to accept all the changes, 'b' to accept all the changes in the current
147  
-buffer and 'q' or <Escape> to exit the replace prompt and stop making the
148  
-changes.
149  
-
150  
-To incorporate the modifications without the prompt, add "!" to the
151  
-":Greplace" command. This will force the ":Greplace" command to make the
152  
-changes without any prompts for confirmation.
153  
-
154  
-The modified files will not be automatically saved. You can save all of them
155  
-using the ":wall" command or you can individually inspect the buffers for the
156  
-changes and then save the buffer using the ":w" command. You can undo the
157  
-changes individually by using the Vim "u" command.
158  
-
159  
-==============================================================================
160  
-
161  
-vim:tw=78:ts=8:noet:ft=help:
406  vim/doc/matchit.txt
... ...
@@ -1,406 +0,0 @@
1  
-*matchit.txt*   Extended "%" matching
2  
-
3  
-For instructions on installing this file, type
4  
-	:help matchit-install
5  
-inside Vim.
6  
-
7  
-For Vim version 6.3.  Last change:  2007 Aug 29
8  
-
9  
-
10  
-		  VIM REFERENCE MANUAL    by Benji Fisher
11  
-
12  
-*matchit* *matchit.vim*
13  
-
14  
-1. Extended matching with "%"				|matchit-intro|
15  
-2. Activation						|matchit-activate|
16  
-3. Configuration					|matchit-configure|
17  
-4. Supporting a New Language				|matchit-newlang|
18  
-5. Known Bugs and Limitations				|matchit-bugs|
19  
-
20  
-The functionality mentioned here is a plugin, see |add-plugin|.
21  
-This plugin is only available if 'compatible' is not set.
22  
-You can avoid loading this plugin by setting the "loaded_matchit" variable
23  
-in your |vimrc| file: >
24  
-	:let loaded_matchit = 1
25  
-
26  
-{Vi does not have any of this}
27  
-
28  
-==============================================================================
29  
-1. Extended matching with "%"				*matchit-intro*
30  
-
31  
-							*matchit-%*
32  
-%	Cycle forward through matching groups, such as "if", "else", "endif",
33  
-	as specified by |b:match_words|.
34  
-
35  
-							*g%* *v_g%* *o_g%*
36  
-g%	Cycle backwards through matching groups, as specified by
37  
-	|b:match_words|.  For example, go from "if" to "endif" to "else".
38  
-
39  
-							*[%* *v_[%* *o_[%*
40  
-[%	Go to [count] previous unmatched group, as specified by
41  
-	|b:match_words|.  Similar to |[{|.
42  
-
43  
-							*]%* *v_]%* *o_]%*
44  
-]%	Go to [count] next unmatched group, as specified by
45  
-	|b:match_words|.  Similar to |]}|.
46  
-
47  
-							*v_a%*
48  
-a%	In Visual mode, select the matching group, as specified by
49  
-	|b:match_words|, containing the cursor.  Similar to |v_a[|.
50  
-	A [count] is ignored, and only the first character of the closing
51  
-	pattern is selected.
52  
-
53  
-In Vim, as in plain vi, the percent key, |%|, jumps the cursor from a brace,
54  
-bracket, or paren to its match.  This can be configured with the 'matchpairs'
55  
-option.  The matchit plugin extends this in several ways:
56  
-
57  
-	    You can match whole words, such as "if" and "endif", not just
58  
-	single characters.  You can also specify a |regular-expression|.
59  
-	    You can define groups with more than two words, such as "if",
60  
-	"else", "endif".  Banging on the "%" key will cycle from the "if" to
61  
-	the first "else", the next "else", ..., the closing "endif", and back
62  
-	to the opening "if".  Nested structures are skipped.  Using |g%| goes
63  
-	in the reverse direction.
64  
-	    By default, words inside comments and strings are ignored, unless
65  
-	the cursor is inside a comment or string when you type "%".  If the
66  
-	only thing you want to do is modify the behavior of "%" so that it
67  
-	behaves this way, you do not have to define |b:match_words|, since the
68  
-	script uses the 'matchpairs' option as well as this variable.
69  
-
70  
-See |matchit-details| for details on what the script does, and |b:match_words|
71  
-for how to specify matching patterns.
72  
-
73  
-MODES:			*matchit-modes* *matchit-v_%* *matchit-o_%*
74  
-
75  
-Mostly, % and related motions (|g%| and |[%| and |]%|) work just like built-in
76  
-|motion| commands in |Operator-pending| and |Visual| modes.  However, you
77  
-cannot make these motions |linewise| or |characterwise|, since the |:omap|s
78  
-that define them start with "v" in order to make the default behavior
79  
-inclusive.  (See |o_v|.)  In other words, "dV%" will not work.  The
80  
-work-around is to go through Visual mode:  "V%d" will work.
81  
-
82  
-LANGUAGES:					*matchit-languages*
83  
-
84  
-Currently, the following languages are supported:  Ada, ASP with VBS, Csh,
85  
-DTD, Entity, Essbase, Fortran, HTML, JSP (same as HTML), LaTeX, Lua, Pascal,
86  
-SGML, Shell, Tcsh, Vim, XML.  Other languages may already have support via
87  
-the default |filetype-plugin|s in the standard vim distribution.
88  
-
89  
-To support a new language, see |matchit-newlang| below.
90  
-
91  
-DETAILS:				*matchit-details* *matchit-parse*
92  
-
93  
-Here is an outline of what matchit.vim does each time you hit the "%" key.  If
94  
-there are |backref|s in |b:match_words| then the first step is to produce a
95  
-version in which these back references have been eliminated; if there are no
96  
-|backref|s then this step is skipped.  This step is called parsing.  For
97  
-example, "\(foo\|bar\):end\1" is parsed to yield
98  
-"\(foo\|bar\):end\(foo\|bar\)".  This can get tricky, especially if there are
99  
-nested groups.  If debugging is turned on, the parsed version is saved as
100  
-|b:match_pat|.
101  
-
102  
-							*matchit-choose*
103  
-Next, the script looks for a word on the current line that matches the pattern
104  
-just constructed.  It includes the patterns from the 'matchpairs' option.
105  
-The goal is to do what you expect, which turns out to be a little complicated.
106  
-The script follows these rules:
107  
-
108  
-	Insist on a match that ends on or after the cursor.
109  
-	Prefer a match that includes the cursor position (that is, one that
110  
-		starts on or before the cursor).
111  
-	Prefer a match that starts as close to the cursor as possible.
112  
-	If more than one pattern in |b:match_words| matches, choose the one
113  
-		that is listed first.
114  
-
115  
-Examples:
116  
-
117  
-	Suppose you >
118  
-		:let b:match_words = '<:>,<tag>:</tag>'
119  
-<	and hit "%" with the cursor on or before the "<" in "a <tag> is born".
120  
-	The pattern '<' comes first, so it is preferred over '<tag>', which
121  
-	also matches.  If the cursor is on the "t", however, then '<tag>' is
122  
-	preferred, because this matches a bit of text containing the cursor.
123  
-	If the two groups of patterns were reversed then '<' would never be
124  
-	preferred.
125  
-
126  
-	Suppose you >
127  
-		:let b:match_words = 'if:end if'
128  
-<	(Note the space!) and hit "%" with the cursor at the end of "end if".
129  
-	Then "if" matches, which is probably not what you want, but if the
130  
-	cursor starts on the "end " then "end if" is chosen.  (You can avoid
131  
-	this problem by using a more complicated pattern.)
132  
-
133  
-If there is no match, the cursor does not move.  (Before version 1.13 of the
134  
-script, it would fall back on the usual behavior of |%|).  If debugging is
135  
-turned on, the matched bit of text is saved as |b:match_match| and the cursor
136  
-column of the start of the match is saved as |b:match_col|.
137  
-
138  
-Next, the script looks through |b:match_words| (original and parsed versions)
139  
-for the group and pattern that match.  If debugging is turned on, the group is
140  
-saved as |b:match_ini| (the first pattern) and |b:match_tail| (the rest).  If
141  
-there are |backref|s then, in addition, the matching pattern is saved as
142  
-|b:match_word| and a table of translations is saved as |b:match_table|.  If
143  
-there are |backref|s, these are determined from the matching pattern and
144  
-|b:match_match| and substituted into each pattern in the matching group.
145  
-
146  
-The script decides whether to search forwards or backwards and chooses
147  
-arguments for the |searchpair()| function.  Then, the cursor is moved to the
148  
-start of the match, and |searchpair()| is called.  By default, matching
149  
-structures inside strings and comments are ignored.  This can be changed by
150  
-setting |b:match_skip|.
151  
-
152  
-==============================================================================
153  
-2. Activation						*matchit-activate*
154  
-
155  
-You can use this script as a plugin, by copying it to your plugin directory.
156  
-See |add-global-plugin| for instructions.  You can also add a line to your
157  
-|vimrc| file, such as >
158  
-	:source $VIMRUNTIME/macros/matchit.vim
159  
-or >
160  
-	:runtime macros/matchit.vim
161  
-Either way, the script should start working the next time you start up Vim.
162  
-
163  
-(Earlier versions of the script did nothing unless a |buffer-variable| named
164  
-|b:match_words| was defined.  Even earlier versions contained autocommands
165  
-that set this variable for various file types.  Now, |b:match_words| is
166  
-defined in many of the default |filetype-plugin|s instead.)
167  
-
168  
-For a new language, you can add autocommands to the script or to your vimrc
169  
-file, but the recommended method is to add a line such as >
170  
-	let b:match_words = '\<foo\>:\<bar\>'
171  
-to the |filetype-plugin| for your language.  See |b:match_words| below for how
172  
-this variable is interpreted.
173  
-
174  
-TROUBLESHOOTING					*matchit-troubleshoot*
175  
-
176  
-The script should work in most installations of Vim.  It may not work if Vim
177  
-was compiled with a minimal feature set, for example if the |+syntax| option
178  
-was not enabled.  If your Vim has support for syntax compiled in, but you do
179  
-not have |syntax| highlighting turned on, matchit.vim should work, but it may
180  
-fail to skip matching groups in comments and strings.  If the |filetype|
181  
-mechanism is turned off, the |b:match_words| variable will probably not be
182  
-defined automatically.
183  
-
184  
-==============================================================================
185  
-3. Configuration					*matchit-configure*
186  
-
187  
-There are several variables that govern the behavior of matchit.vim.  Note
188  
-that these are variables local to the buffer, not options, so use |:let| to
189  
-define them, not |:set|.  Some of these variables have values that matter; for
190  
-others, it only matters whether the variable has been defined.  All of these
191  
-can be defined in the |filetype-plugin| or autocommand that defines
192  
-|b:match_words| or "on the fly."
193  
-
194  
-The main variable is |b:match_words|.  It is described in the section below on
195  
-supporting a new language.
196  
-
197  
-				*MatchError* *matchit-hl* *matchit-highlight*
198  
-MatchError is the highlight group for error messages from the script.  By
199  
-default, it is linked to WarningMsg.  If you do not want to be bothered by
200  
-error messages, you can define this to be something invisible.  For example,
201  
-if you use the GUI version of Vim and your command line is normally white, you
202  
-can do >
203  
-	:hi MatchError guifg=white guibg=white
204  
-<
205  
-						*b:match_ignorecase*
206  
-If you >
207  
-	:let b:match_ignorecase = 1
208  
-then matchit.vim acts as if 'ignorecase' is set: for example, "end" and "END"
209  
-are equivalent.  If you >
210  
-	:let b:match_ignorecase = 0
211  
-then matchit.vim treats "end" and "END" differently.  (There will be no
212  
-b:match_infercase option unless someone requests it.)
213  
-
214  
-						*b:match_debug*
215  
-Define b:match_debug if you want debugging information to be saved.  See
216  
-|matchit-debug|, below.
217  
-
218  
-						*b:match_skip*
219  
-If b:match_skip is defined, it is passed as the skip argument to
220  
-|searchpair()|.  This controls when matching structures are skipped, or
221  
-ignored.  By default, they are ignored inside comments and strings, as
222  
-determined by the |syntax| mechanism.  (If syntax highlighting is turned off,
223  
-nothing is skipped.)  You can set b:match_skip to a string, which evaluates to
224  
-a non-zero, numerical value if the match is to be skipped or zero if the match
225  
-should not be skipped.  In addition, the following special values are
226  
-supported by matchit.vim:
227  
-	s:foo becomes (current syntax item) =~ foo
228  
-	S:foo becomes (current syntax item) !~ foo
229  
-	r:foo becomes (line before cursor) =~ foo
230  
-	R:foo becomes (line before cursor) !~ foo
231  
-(The "s" is meant to suggest "syntax", and the "r" is meant to suggest
232  
-"regular expression".)
233  
-
234  
-Examples:
235  
-
236  
-	You can get the default behavior with >
237  
-		:let b:match_skip = 's:comment\|string'
238  
-<
239  
-	If you want to skip matching structures unless they are at the start
240  
-	of the line (ignoring whitespace) then you can >
241  
-		:let b:match_skip = 'R:^\s*'
242  
-<	Do not do this if strings or comments can span several lines, since
243  
-	the normal syntax checking will not be done if you set b:match_skip.
244  
-
245  
-	In LaTeX, since "%" is used as the comment character, you can >
246  
-		:let b:match_skip = 'r:%'
247  
-<	Unfortunately, this will skip anything after "\%", an escaped "%".  To
248  
-	allow for this, and also "\\%" (an excaped backslash followed by the
249  
-	comment character) you can >
250  
-		:let b:match_skip = 'r:\(^\|[^\\]\)\(\\\\\)*%'
251  
-<
252  
-	See the $VIMRUNTIME/ftplugin/vim.vim for an example that uses both
253  
-	syntax and a regular expression.
254  
-
255  
-==============================================================================
256  
-4. Supporting a New Language				*matchit-newlang*
257  
-							*b:match_words*
258  
-In order for matchit.vim to support a new language, you must define a suitable
259  
-pattern for |b:match_words|.  You may also want to set some of the
260  
-|matchit-configure| variables, as described above.  If your language has a
261  
-complicated syntax, or many keywords, you will need to know something about
262  
-Vim's |regular-expression|s.
263  
-
264  
-The format for |b:match_words| is similar to that of the 'matchpairs' option:
265  
-it is a comma (,)-separated list of groups; each group is a colon(:)-separated
266  
-list of patterns (regular expressions).  Commas and backslashes that are part
267  
-of a pattern should be escaped with backslashes ('\:' and '\,').  It is OK to
268  
-have only one group; the effect is undefined if a group has only one pattern.
269  
-A simple example is >
270  
-	:let b:match_words = '\<if\>:\<endif\>,'
271  
-		\ . '\<while\>:\<continue\>:\<break\>:\<endwhile\>'
272  
-(In Vim regular expressions, |\<| and |\>| denote word boundaries.  Thus "if"
273  
-matches the end of "endif" but "\<if\>" does not.)  Then banging on the "%"
274  
-key will bounce the cursor between "if" and the matching "endif"; and from
275  
-"while" to any matching "continue" or "break", then to the matching "endwhile"
276  
-and back to the "while".  It is almost always easier to use |literal-string|s
277  
-(single quotes) as above:  '\<if\>' rather than "\\<if\\>" and so on.
278  
-
279  
-Exception:  If the ":" character does not appear in b:match_words, then it is
280  
-treated as an expression to be evaluated.  For example, >
281  
-	:let b:match_words = 'GetMatchWords()'
282  
-allows you to define a function.  This can return a different string depending
283  
-on the current syntax, for example.
284  
-
285  
-Once you have defined the appropriate value of |b:match_words|, you will
286  
-probably want to have this set automatically each time you edit the
287  
-appropriate file type.  The recommended way to do this is by adding the
288  
-definition to a |filetype-plugin| file.
289  
-
290  
-Tips: Be careful that your initial pattern does not match your final pattern.
291  
-See the example above for the use of word-boundary expressions.  It is usually
292  
-better to use ".\{-}" (as many as necessary) instead of ".*" (as many as
293  
-possible).  See |\{-|.  For example, in the string "<tag>label</tag>", "<.*>"
294  
-matches the whole string whereas "<.\{-}>" and "<[^>]*>" match "<tag>" and
295  
-"</tag>".
296  
-
297  
-				*matchit-spaces* *matchit-s:notend*
298  
-If "if" is to be paired with "end if" (Note the space!) then word boundaries
299  
-are not enough.  Instead, define a regular expression s:notend that will match
300  
-anything but "end" and use it as follows: >
301  
-	:let s:notend = '\%(\<end\s\+\)\@<!'
302  
-	:let b:match_words = s:notend . '\<if\>:\<end\s\+if\>'
303  
-<							*matchit-s:sol*
304  
-This is a simplified version of what is done for Ada.  The s:notend is a
305  
-|script-variable|.  Similarly, you may want to define a start-of-line regular
306  
-expression >
307  
-	:let s:sol = '\%(^\|;\)\s*'
308  
-if keywords are only recognized after the start of a line or after a
309  
-semicolon (;), with optional white space.
310  
-
311  
-					*matchit-backref* *matchit-\1*
312  
-In any group, the expressions |\1|, |\2|, ..., |\9| refer to parts of the
313  
-INITIAL pattern enclosed in |\(|escaped parentheses|\)|.  These are referred
314  
-to as back references, or backrefs.  For example, >
315  
-	:let b:match_words = '\<b\(o\+\)\>:\(h\)\1\>'
316  
-means that "bo" pairs with "ho" and "boo" pairs with "hoo" and so on.  Note
317  
-that "\1" does not refer to the "\(h\)" in this example.  If you have
318  
-"\(nested \(parentheses\)\) then "\d" refers to the d-th "\(" and everything
319  
-up to and including the matching "\)":  in "\(nested\(parentheses\)\)", "\1"
320  
-refers to everything and "\2" refers to "\(parentheses\)".  If you use a
321  
-variable such as |s:notend| or |s:sol| in the previous paragraph then remember
322  
-to count any "\(" patterns in this variable.  You do not have to count groups
323  
-defined by |\%(\)|.
324  
-
325  
-It should be possible to resolve back references from any pattern in the
326  
-group.  For example, >
327  
-	:let b:match_words = '\(foo\)\(bar\):more\1:and\2:end\1\2'
328  
-would not work because "\2" cannot be determined from "morefoo" and "\1"
329  
-cannot be determined from "andbar".  On the other hand, >
330  
-	:let b:match_words = '\(\(foo\)\(bar\)\):\3\2:end\1'
331  
-should work (and have the same effect as "foobar:barfoo:endfoobar"), although
332  
-this has not been thoroughly tested.
333  
-
334  
-You can use |zero-width| patterns such as |\@<=| and |\zs|.  (The latter has
335  
-not been thouroughly tested in matchit.vim.)  For example, if the keyword "if"
336  
-must occur at the start of the line, with optional white space, you might use
337  
-the pattern "\(^\s*\)\@<=if" so that the cursor will end on the "i" instead of
338  
-at the start of the line.  For another example, if HTML had only one tag then
339  
-one could >
340  
-	:let b:match_words = '<:>,<\@<=tag>:<\@<=/tag>'
341  
-so that "%" can bounce between matching "<" and ">" pairs or (starting on
342  
-"tag" or "/tag") between matching tags.  Without the |\@<=|, the script would
343  
-bounce from "tag" to the "<" in "</tag>", and another "%" would not take you
344  
-back to where you started.
345  
-
346  
-DEBUGGING				*matchit-debug* *:MatchDebug*
347  
-
348  
-If you are having trouble figuring out the appropriate definition of
349  
-|b:match_words| then you can take advantage of the same information I use when
350  
-debugging the script.  This is especially true if you are not sure whether
351  
-your patterns or my script are at fault!  To make this more convenient, I have
352  
-made the command :MatchDebug, which defines the variable |b:match_debug| and
353  
-creates a Matchit menu.  This menu makes it convenient to check the values of
354  
-the variables described below.  You will probably also want to read
355  
-|matchit-details| above.
356  
-
357  
-Defining the variable |b:match_debug| causes the script to set the following
358  
-variables, each time you hit the "%" key.  Several of these are only defined
359  
-if |b:match_words| includes |backref|s.
360  
-
361  
-							*b:match_pat*
362  
-The b:match_pat variable is set to |b:match_words| with |backref|s parsed.
363  
-							*b:match_match*
364  
-The b:match_match variable is set to the bit of text that is recognized as a
365  
-match.
366  
-							*b:match_col*
367  
-The b:match_col variable is set to the cursor column of the start of the
368  
-matching text.
369  
-							*b:match_wholeBR*
370  
-The b:match_wholeBR variable is set to the comma-separated group of patterns
371  
-that matches, with |backref|s unparsed.
372  
-							*b:match_iniBR*
373  
-The b:match_iniBR variable is set to the first pattern in |b:match_wholeBR|.
374  
-							*b:match_ini*
375  
-The b:match_ini variable is set to the first pattern in |b:match_wholeBR|,
376  
-with |backref|s resolved from |b:match_match|.
377  
-							*b:match_tail*
378  
-The b:match_tail variable is set to the remaining patterns in
379  
-|b:match_wholeBR|, with |backref|s resolved from |b:match_match|.
380  
-							*b:match_word*
381  
-The b:match_word variable is set to the pattern from |b:match_wholeBR| that
382  
-matches |b:match_match|.
383  
-							*b:match_table*
384  
-The back reference '\'.d refers to the same thing as '\'.b:match_table[d] in
385  
-|b:match_word|.
386  
-
387  
-==============================================================================
388  
-5. Known Bugs and Limitations				*matchit-bugs*
389  
-
390  
-Just because I know about a bug does not mean that it is on my todo list.  I
391  
-try to respond to reports of bugs that cause real problems.  If it does not
392  
-cause serious problems, or if there is a work-around, a bug may sit there for
393  
-a while.  Moral:  if a bug (known or not) bothers you, let me know.
394  
-
395  
-The various |:vmap|s defined in the script (%, |g%|, |[%|, |]%|, |a%|) may
396  
-have undesired effects in Select mode |Select-mode-mapping|.  At least, if you
397  
-want to replace the selection with any character in "ag%[]" there will be a
398  
-pause of |'updatetime'| first.
399  
-
400  
-It would be nice if "\0" were recognized as the entire pattern.  That is, it
401  
-would be nice if "foo:\end\0" had the same effect as "\(foo\):\end\1".  I may
402  
-try to implement this in a future version.  (This is not so easy to arrange as
403  
-you might think!)
404  
-
405  
-==============================================================================
406  
-vim:tw=78:fo=tcq2:
1,202  vim/doc/rails.txt
... ...
@@ -1,1202 +0,0 @@
1  
-*rails.txt*	Plugin for working with Ruby on Rails applications
2  
-
3  
-Author: Tim Pope <vimNOSPAM@tpope.info>		|rails-plugin-author|
4  
-
5  
-|rails-introduction|		Introduction and Feature Summary
6  
-|rails-installation|		Installation and Usage
7  
-|rails-install-vim|		    Installing and Configuring Vim
8  
-|rails-install-plugin|		    Installing and Using the Plugin
9  
-|rails-commands|		General Commands
10  
-|rails-navigation|		Navigation
11  
-|rails-gf|			    File Under Cursor - gf
12  
-|rails-alternate-related|	    Alternate and Related Files
13  
-|rails-model-navigation|	    Model Navigation Commands
14  
-|rails-controller-navigation|	    Controller Navigation Commands
15  
-|rails-misc-navigation|		    Miscellaneous Navigation Commands
16  
-|rails-custom-navigation|	    Custom Navigation Commands
17  
-|rails-rake|			Rake
18  
-|rails-scripts|			Script Wrappers
19  
-|rails-refactoring|		Refactoring Helpers
20  
-|rails-partials|		    Partial Extraction
21  
-|rails-migrations|		    Migration Inversion
22  
-|rails-integration|		Integration
23  
-|rails-vim-integration|		    Integration with the Vim Universe
24  
-|rails-rails-integration|	    Integration with the Rails Universe
25  
-|rails-abbreviations|		Abbreviations
26  
-|rails-syntax|			Syntax Highlighting
27  
-|rails-options|			Managed Vim Options
28  
-|rails-configuration|		Configuration
29  
-|rails-global-settings| 	Global Settings
30  
-|rails-about|			About rails.vim
31  
-|rails-license|			    License
32  
-
33  
-This plugin is only available if 'compatible' is not set.
34  
-
35  
-{Vi does not have any of this}
36  
-
37  
-==============================================================================
38  
-INTRODUCTION					*rails-introduction* *rails*
39  
-
40  
-TextMate may be the latest craze for developing Ruby on Rails applications,
41  
-but Vim is forever.  This plugin offers the following features for Ruby on
42  
-Rails application development.
43  
-
44  
-1. Automatically detects buffers containing files from Rails applications,
45  
-   and applies settings to those buffers (and only those buffers).  You can
46  
-   use an autocommand to apply your own custom settings as well.
47  
-   |rails-configuration|
48  
-
49  
-2. Unintrusive.  Only files in a Rails application should be affected; regular
50  
-   Ruby scripts are left untouched.  Even when enabled, the plugin should keep
51  
-   out of your way if you're not using its features.  (If you find a situation
52  
-   where this is not a case, contact the |rails-plugin-author|.)
53  
-
54  
-3. Easy navigation of the Rails directory structure.  |gf| considers context
55  
-   and knows about partials, fixtures, and much more.  There are two commands,
56  
-   :A (alternate) and :R (related) for easy jumping between files, including
57  
-   favorites like model to migration, template to helper, and controller to
58  
-   functional test.  For more advanced usage, :Rmodel, :Rview, :Rcontroller,
59  
-   and several other commands are provided.  |rails-navigation|
60  
-
61  
-4. Enhanced syntax highlighting.  From has_and_belongs_to_many to
62  
-   distance_of_time_in_words, it's here.  For easy completion of these long
63  
-   method names, 'completefunc' is set to enable syntax based completion on
64  
-   |i_CTRL-X_CTRL-U|. |rails-syntax|
65  
-
66  
-5. Interface to rake.  Use :Rake to run the current test, spec, or feature.
67  
-   Use :.Rake to do a focused run of just the method, example, or scenario on
68  
-   the current line.  :Rake can also run arbitrary migrations, load individual
69  
-   fixtures, and more. |rails-rake|
70  
-
71  
-6. Interface to script/*.  Generally, use ":Rscript about" to call
72  
-   "script/about".  Most commands have wrappers with additional features:
73  
-   ":Rgenerate controller Blog" generates a blog controller and edits
74  
-   app/controllers/blog_controller.rb.  |rails-scripts|
75  
-
76  
-7. Partial extraction and migration inversion.  |:Rextract| {file} replaces
77  
-   the desired range (ideally selected in visual line mode) with "render
78  
-   :partial => '{file}'", which is automatically created with your content.
79  
-   The @{file} instance variable is replaced with the {file} local variable.
80  
-   |:Rinvert| takes a self.up migration and writes a self.down.
81  
-   |rails-refactoring|
82  
-
83  
-8. Integration with other plugins.  |:Rtree| spawns NERDTree.vim or creates a
84  
-   new project.vim project.  If dbext.vim is installed, it will be
85  
-   transparently configured to reflect database.yml.  Cream users get some
86  
-   additional mappings, and all GUI users get a menu. |rails-integration|
87  
-
88  
-==============================================================================
89  
-INSTALLATION AND USAGE				*rails-installation*
90  
-
91  
-If you are familiar Vim and have the latest version installed, you may skip
92  
-directly to |rails-install-plugin| below.
93  
-
94  
-Installing and Configuring Vim ~
95  
-						*rails-install-vim*
96  
-Vim 7 or newer is required.  If possible, install a version of Vim with the
97  
-|Ruby| interface compiled in, as a few features will make use of it when
98  
-available.
99  
-
100  
-If you are new to Vim, you need to create a vimrc.  For Windows, this file
101  
-goes in ~\_vimrc (try :e ~\_vimrc if you don't know where this is).  On other
102  
-platforms, use ~/.vimrc.  A very minimal example file is shown below.
103  
->
104  
-	set nocompatible
105  
-	syntax on
106  
-	filetype plugin indent on
107  
->
108  
-Installing and Using the Plugin ~
109  
-						*rails-install-plugin*
110  
-If you have the zip file, extract it to vimfiles (Windows) or ~/.vim
111  
-(everything else).  You should have the following files: >
112  
-	autoload/rails.vim
113  
-	plugin/rails.vim
114  
-	doc/rails.txt
115  
-See |add-local-help| for instructions on enabling the documentation.  In a
116  
-nutshell: >
117  
-	:helptags ~/.vim/doc
118  
-
119  
-Whenever you edit a file in a Rails application, this plugin will be
120  
-automatically activated.  This sets various options and defines a few
121  
-buffer-specific commands.
122  
-
123  
-If you are in a hurry to get started, with a minimal amount of reading, you
124  
-are encouraged to at least skim through the headings and command names in this
125  
-file, to get a better idea of what is offered.  If you only read one thing,
126  
-make sure it is the navigation section: |rails-navigation|.
127  
-
128  
-==============================================================================
129  
-GENERAL COMMANDS				*rails-commands*
130  
-
131  
-All commands are buffer local, unless otherwise stated.  This means you must
132  
-actually edit a file from a Rails application.
133  
-
134  
-						*rails-:Rails*
135  
-:Rails {directory}	The only global command.  Creates a new Rails
136  
-			application in {directory}, and loads the README.
137  
-
138  
-:Rails!			Show the version of rails.vim installed.  If rails.vim
139  
-			is active for the current buffer, also show the type
140  
-			of Rails file detected.
141  
-
142  
-						*rails-:Rcd*
143  
-:Rcd [{directory}]	|:cd| to /path/to/railsapp/{directory}.
144  
-
145  
-						*rails-:Rlcd*
146  
-:Rlcd [{directory}]	|:lcd| to /path/to/railsapp/{directory}.
147  
-
148  
-						*rails-:Rdoc*
149  
-:Rdoc			Browse to the Rails API, either in doc/api in the
150  
-			current Rails application, gem_server if it is
151  
-			running, or http://api.rubyonrails.org/ .  Requires
152  
-			:OpenURL to be defined (see |rails-:OpenURL|).
153  
-
154  
-						*rails-:Rdoc!*
155