Remove NERDTree and use netrw instead.
David Blume

David Blume commited on 2020-07-08 11:39:03
Showing 8 changed files, with 4 additions and 6309 deletions.

... ...
@@ -1,3 +0,0 @@
1
-*~
2
-*.swp
3
-tags
... ...
@@ -1,104 +0,0 @@
1
-The NERD Tree
2
-=============
3
-
4
-Intro
5
------
6
-
7
-The NERD tree allows you to explore your filesystem and to open files and
8
-directories. It presents the filesystem to you in the form of a tree which you
9
-manipulate with the keyboard and/or mouse. It also allows you to perform
10
-simple filesystem operations.
11
-
12
-The following features and functionality are provided by the NERD tree:
13
-
14
-  * Files and directories are displayed in a hierarchical tree structure
15
-  * Different highlighting is provided for the following types of nodes:
16
-    * files
17
-    * directories
18
-    * sym-links
19
-    * windows .lnk files
20
-    * read-only files
21
-    * executable files
22
-  * Many (customisable) mappings are provided to manipulate the tree:
23
-    * Mappings to open/close/explore directory nodes
24
-    * Mappings to open files in new/existing windows/tabs
25
-    * Mappings to change the current root of the tree
26
-    * Mappings to navigate around the tree
27
-    * ...
28
-  * Directories and files can be bookmarked.
29
-  * Most NERD tree navigation can also be done with the mouse
30
-  * Filtering of tree content (can be toggled at runtime)
31
-    * custom file filters to prevent e.g. vim backup files being displayed
32
-    * optional displaying of hidden files (. files)
33
-    * files can be "turned off" so that only directories are displayed
34
-  * The position and size of the NERD tree window can be customised
35
-  * The order in which the nodes in the tree are listed can be customised.
36
-  * A model of your filesystem is created/maintained as you explore it. This
37
-    has several advantages:
38
-    * All filesystem information is cached and is only re-read on demand
39
-    * If you revisit a part of the tree that you left earlier in your
40
-      session, the directory nodes will be opened/closed as you left them
41
-  * The script remembers the cursor position and window position in the NERD
42
-    tree so you can toggle it off (or just close the tree window) and then
43
-    reopen it (with NERDTreeToggle) the NERD tree window will appear exactly
44
-    as you left it
45
-  * You can have a separate NERD tree for each tab, share trees across tabs,
46
-    or a mix of both.
47
-  * By default the script overrides the default file browser (netw), so if
48
-    you :edit a directory a (slighly modified) NERD tree will appear in the
49
-    current window
50
-  * A programmable menu system is provided (simulates right clicking on a node)
51
-    * one default menu plugin is provided to perform basic filesytem
52
-      operations (create/delete/move/copy files/directories)
53
-  * There's an API for adding your own keymappings
54
-
55
-Installation
56
-------------
57
-
58
-[pathogen.vim](https://github.com/tpope/vim-pathogen) is the recommended way to install nerdtree.
59
-
60
-    cd ~/.vim/bundle
61
-    git clone https://github.com/scrooloose/nerdtree.git
62
-
63
-Then reload vim, run `:helptags`, and check out `:help NERD_tree.txt`.
64
-
65
-
66
-Faq
67
----
68
-
69
-__Q. Can I have the nerdtree on every tab automatically?__
70
-
71
-A. Nope. If this is something you want then chances are you aren't using tabs
72
-   and buffers as they were intended to be used. Read this
73
-   http://stackoverflow.com/questions/102384/using-vims-tabs-like-buffers
74
-
75
-   If you are interested in this behaviour then consider [vim-nerdtree-tabs](https://github.com/jistr/vim-nerdtree-tabs)
76
-
77
-__Q. How can I open a NERDTree automatically when vim starts up?__
78
-
79
-A. Stick this in your vimrc: `autocmd vimenter * NERDTree`
80
-
81
-__Q. How can I open a NERDTree automatically when vim starts up if no files were specified?__
82
-
83
-A. Stick this in your vimrc `autocmd vimenter * if !argc() | NERDTree | endif`
84
-
85
-__Q. How can I close vim if the only window left open is a NERDTree?__
86
-
87
-A. Stick this in your vimrc:
88
-
89
-   `autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif`
90
-
91
-
92
-Changelog
93
----------
94
-
95
-4.2.0 (2011-12-28)
96
-
97
- * Add NERDTreeDirArrows option to make the UI use pretty arrow chars instead of the old +~| chars to define the tree structure (sickill)
98
- * shift the syntax highlighting out into its own syntax file (gnap) * add some mac specific options to the filesystem menu - for macvim only (andersonfreitas)
99
- * Add NERDTreeMinimalUI option to remove some non functional parts of the nerdtree ui (camthompson)
100
- * tweak the behaviour of :NERDTreeFind - see :help :NERDTreeFind for the new behaviour (benjamingeiger)
101
- * if no name is given to :Bookmark, make it default to the name of the target file/dir (minyoung)
102
- * use 'file' completion when doing copying, create, and move operations (EvanDotPro)
103
- * lots of misc bug fixes (paddyoloughlin, sdewald, camthompson, Vitaly Bogdanov, AndrewRadev, mathias, scottstvnsn, kml, wycats, me RAWR!)
104
-
... ...
@@ -1,1362 +0,0 @@
1
-*NERD_tree.txt*   A tree explorer plugin that owns your momma!
2
-
3
-
4
-
5
-    omg its ... ~
6
-
7
-    ________  ________   _   ____________  ____     __________  ____________~
8
-   /_  __/ / / / ____/  / | / / ____/ __ \/ __ \   /_  __/ __ \/ ____/ ____/~
9
-    / / / /_/ / __/    /  |/ / __/ / /_/ / / / /    / / / /_/ / __/ / __/   ~
10
-   / / / __  / /___   / /|  / /___/ _, _/ /_/ /    / / / _, _/ /___/ /___   ~
11
-  /_/ /_/ /_/_____/  /_/ |_/_____/_/ |_/_____/    /_/ /_/ |_/_____/_____/   ~
12
-
13
-
14
-                              Reference Manual~
15
-
16
-
17
-
18
-
19
-==============================================================================
20
-CONTENTS                                                   *NERDTree-contents*
21
-
22
-    1.Intro...................................|NERDTree|
23
-    2.Functionality provided..................|NERDTreeFunctionality|
24
-        2.1.Global commands...................|NERDTreeGlobalCommands|
25
-        2.2.Bookmarks.........................|NERDTreeBookmarks|
26
-            2.2.1.The bookmark table..........|NERDTreeBookmarkTable|
27
-            2.2.2.Bookmark commands...........|NERDTreeBookmarkCommands|
28
-            2.2.3.Invalid bookmarks...........|NERDTreeInvalidBookmarks|
29
-        2.3.NERD tree mappings................|NERDTreeMappings|
30
-        2.4.The NERD tree menu................|NERDTreeMenu|
31
-    3.Options.................................|NERDTreeOptions|
32
-        3.1.Option summary....................|NERDTreeOptionSummary|
33
-        3.2.Option details....................|NERDTreeOptionDetails|
34
-    4.The NERD tree API.......................|NERDTreeAPI|
35
-        4.1.Key map API.......................|NERDTreeKeymapAPI|
36
-        4.2.Menu API..........................|NERDTreeMenuAPI|
37
-    5.About...................................|NERDTreeAbout|
38
-    6.Changelog...............................|NERDTreeChangelog|
39
-    7.Credits.................................|NERDTreeCredits|
40
-    8.License.................................|NERDTreeLicense|
41
-
42
-==============================================================================
43
-1. Intro                                                            *NERDTree*
44
-
45
-What is this "NERD tree"??
46
-
47
-The NERD tree allows you to explore your filesystem and to open files and
48
-directories. It presents the filesystem to you in the form of a tree which you
49
-manipulate with the keyboard and/or mouse. It also allows you to perform
50
-simple filesystem operations.
51
-
52
-The following features and functionality are provided by the NERD tree:
53
-    * Files and directories are displayed in a hierarchical tree structure
54
-    * Different highlighting is provided for the following types of nodes:
55
-        * files
56
-        * directories
57
-        * sym-links
58
-        * windows .lnk files
59
-        * read-only files
60
-        * executable files
61
-    * Many (customisable) mappings are provided to manipulate the tree:
62
-        * Mappings to open/close/explore directory nodes
63
-        * Mappings to open files in new/existing windows/tabs
64
-        * Mappings to change the current root of the tree
65
-        * Mappings to navigate around the tree
66
-        * ...
67
-    * Directories and files can be bookmarked.
68
-    * Most NERD tree navigation can also be done with the mouse
69
-    * Filtering of tree content (can be toggled at runtime)
70
-        * custom file filters to prevent e.g. vim backup files being displayed
71
-        * optional displaying of hidden files (. files)
72
-        * files can be "turned off" so that only directories are displayed
73
-    * The position and size of the NERD tree window can be customised
74
-    * The order in which the nodes in the tree are listed can be customised.
75
-    * A model of your filesystem is created/maintained as you explore it. This
76
-      has several advantages:
77
-        * All filesystem information is cached and is only re-read on demand
78
-        * If you revisit a part of the tree that you left earlier in your
79
-          session, the directory nodes will be opened/closed as you left them
80
-    * The script remembers the cursor position and window position in the NERD
81
-      tree so you can toggle it off (or just close the tree window) and then
82
-      reopen it (with NERDTreeToggle) the NERD tree window will appear exactly
83
-      as you left it
84
-    * You can have a separate NERD tree for each tab, share trees across tabs,
85
-      or a mix of both.
86
-    * By default the script overrides the default file browser (netw), so if
87
-      you :edit a directory a (slighly modified) NERD tree will appear in the
88
-      current window
89
-    * A programmable menu system is provided (simulates right clicking on a
90
-      node)
91
-        * one default menu plugin is provided to perform basic filesytem
92
-          operations (create/delete/move/copy files/directories)
93
-    * There's an API for adding your own keymappings
94
-
95
-
96
-==============================================================================
97
-2. Functionality provided                              *NERDTreeFunctionality*
98
-
99
-------------------------------------------------------------------------------
100
-2.1. Global Commands                                  *NERDTreeGlobalCommands*
101
-
102
-:NERDTree [<start-directory> | <bookmark>]                         *:NERDTree*
103
-    Opens a fresh NERD tree. The root of the tree depends on the argument
104
-    given. There are 3 cases: If no argument is given, the current directory
105
-    will be used.  If a directory is given, that will be used. If a bookmark
106
-    name is given, the corresponding directory will be used.  For example: >
107
-        :NERDTree /home/marty/vim7/src
108
-        :NERDTree foo   (foo is the name of a bookmark)
109
-<
110
-:NERDTreeFromBookmark <bookmark>                       *:NERDTreeFromBookmark*
111
-    Opens a fresh NERD tree with the root initialized to the dir for
112
-    <bookmark>.  This only reason to use this command over :NERDTree is for
113
-    the completion (which is for bookmarks rather than directories).
114
-
115
-:NERDTreeToggle [<start-directory> | <bookmark>]             *:NERDTreeToggle*
116
-    If a NERD tree already exists for this tab, it is reopened and rendered
117
-    again.  If no NERD tree exists for this tab then this command acts the
118
-    same as the |:NERDTree| command.
119
-
120
-:NERDTreeMirror                                              *:NERDTreeMirror*
121
-    Shares an existing NERD tree, from another tab, in the current tab.
122
-    Changes made to one tree are reflected in both as they are actually the
123
-    same buffer.
124
-
125
-    If only one other NERD tree exists, that tree is automatically mirrored. If
126
-    more than one exists, the script will ask which tree to mirror.
127
-
128
-:NERDTreeClose                                                *:NERDTreeClose*
129
-    Close the NERD tree in this tab.
130
-
131
-:NERDTreeFind                                                  *:NERDTreeFind*
132
-    Find the current file in the tree.
133
-
134
-    If not tree exists and the current file is under vim's CWD, then init a
135
-    tree at the CWD and reveal the file. Otherwise init a tree in the current
136
-    file's directory.
137
-
138
-    In any case, the current file is revealed and the cursor is placed on it.
139
-
140
-:NERDTreeCWD                                                    *:NERDTreeCWD*
141
-    Change tree root to current directory. If no NERD tree exists for this
142
-    tab, a new tree will be opened.
143
-
144
-------------------------------------------------------------------------------
145
-2.2. Bookmarks                                             *NERDTreeBookmarks*
146
-
147
-Bookmarks in the NERD tree are a way to tag files or directories of interest.
148
-For example, you could use bookmarks to tag all of your project directories.
149
-
150
-------------------------------------------------------------------------------
151
-2.2.1. The Bookmark Table                              *NERDTreeBookmarkTable*
152
-
153
-If the bookmark table is active (see |NERDTree-B| and
154
-|'NERDTreeShowBookmarks'|), it will be rendered above the tree. You can double
155
-click bookmarks or use the |NERDTree-o| mapping to activate them. See also,
156
-|NERDTree-t| and |NERDTree-T|
157
-
158
-------------------------------------------------------------------------------
159
-2.2.2. Bookmark commands                            *NERDTreeBookmarkCommands*
160
-
161
-Note that the following commands are only available in the NERD tree buffer.
162
-
163
-:Bookmark <name>
164
-    Bookmark the current node as <name>. If there is already a <name>
165
-    bookmark, it is overwritten. <name> must not contain spaces.
166
-    If <name> is not provided, it defaults to the file or directory name.
167
-    For directories, a trailing slash is present.
168
-
169
-:BookmarkToRoot <bookmark>
170
-    Make the directory corresponding to <bookmark> the new root. If a treenode
171
-    corresponding to <bookmark> is already cached somewhere in the tree then
172
-    the current tree will be used, otherwise a fresh tree will be opened.
173
-    Note that if <bookmark> points to a file then its parent will be used
174
-    instead.
175
-
176
-:RevealBookmark <bookmark>
177
-    If the node is cached under the current root then it will be revealed
178
-    (i.e. directory nodes above it will be opened) and the cursor will be
179
-    placed on it.
180
-
181
-:OpenBookmark <bookmark>
182
-    <bookmark> must point to a file. The file is opened as though |NERDTree-o|
183
-    was applied. If the node is cached under the current root then it will be
184
-    revealed and the cursor will be placed on it.
185
-
186
-:ClearBookmarks [<bookmarks>]
187
-    Remove all the given bookmarks. If no bookmarks are given then remove all
188
-    bookmarks on the current node.
189
-
190
-:ClearAllBookmarks
191
-    Remove all bookmarks.
192
-
193
-:ReadBookmarks
194
-    Re-read the bookmarks in the |'NERDTreeBookmarksFile'|.
195
-
196
-See also |:NERDTree| and |:NERDTreeFromBookmark|.
197
-
198
-------------------------------------------------------------------------------
199
-2.2.3. Invalid Bookmarks                            *NERDTreeInvalidBookmarks*
200
-
201
-If invalid bookmarks are detected, the script will issue an error message and
202
-the invalid bookmarks will become unavailable for use.
203
-
204
-These bookmarks will still be stored in the bookmarks file (see
205
-|'NERDTreeBookmarksFile'|), down the bottom. There will always be a blank line
206
-after the valid bookmarks but before the invalid ones.
207
-
208
-Each line in the bookmarks file represents one bookmark. The proper format is:
209
-<bookmark name><space><full path to the bookmark location>
210
-
211
-After you have corrected any invalid bookmarks, either restart vim, or go
212
-:ReadBookmarks from the NERD tree window.
213
-
214
-------------------------------------------------------------------------------
215
-2.3. NERD tree Mappings                                     *NERDTreeMappings*
216
-
217
-Default  Description~                                             help-tag~
218
-Key~
219
-
220
-o.......Open files, directories and bookmarks....................|NERDTree-o|
221
-go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
222
-t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
223
-T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
224
-i.......Open selected file in a split window.....................|NERDTree-i|
225
-gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
226
-s.......Open selected file in a new vsplit.......................|NERDTree-s|
227
-gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|
228
-O.......Recursively open the selected directory..................|NERDTree-O|
229
-x.......Close the current nodes parent...........................|NERDTree-x|
230
-X.......Recursively close all children of the current node.......|NERDTree-X|
231
-e.......Edit the current dif.....................................|NERDTree-e|
232
-
233
-<CR>...............same as |NERDTree-o|.
234
-double-click.......same as the |NERDTree-o| map.
235
-middle-click.......same as |NERDTree-i| for files, same as
236
-                   |NERDTree-e| for dirs.
237
-
238
-D.......Delete the current bookmark .............................|NERDTree-D|
239
-
240
-P.......Jump to the root node....................................|NERDTree-P|
241
-p.......Jump to current nodes parent.............................|NERDTree-p|
242
-K.......Jump up inside directories at the current tree depth.....|NERDTree-K|
243
-J.......Jump down inside directories at the current tree depth...|NERDTree-J|
244
-<C-J>...Jump down to the next sibling of the current directory...|NERDTree-C-J|
245
-<C-K>...Jump up to the previous sibling of the current directory.|NERDTree-C-K|
246
-
247
-C.......Change the tree root to the selected dir.................|NERDTree-C|
248
-u.......Move the tree root up one directory......................|NERDTree-u|
249
-U.......Same as 'u' except the old root node is left open........|NERDTree-U|
250
-r.......Recursively refresh the current directory................|NERDTree-r|
251
-R.......Recursively refresh the current root.....................|NERDTree-R|
252
-m.......Display the NERD tree menu...............................|NERDTree-m|
253
-cd......Change the CWD to the dir of the selected node...........|NERDTree-cd|
254
-CD......Change tree root to the CWD..............................|NERDTree-CD|
255
-
256
-I.......Toggle whether hidden files displayed....................|NERDTree-I|
257
-f.......Toggle whether the file filters are used.................|NERDTree-f|
258
-F.......Toggle whether files are displayed.......................|NERDTree-F|
259
-B.......Toggle whether the bookmark table is displayed...........|NERDTree-B|
260
-
261
-q.......Close the NERDTree window................................|NERDTree-q|
262
-A.......Zoom (maximize/minimize) the NERDTree window.............|NERDTree-A|
263
-?.......Toggle the display of the quick help.....................|NERDTree-?|
264
-
265
-------------------------------------------------------------------------------
266
-                                                                  *NERDTree-o*
267
-Default key: o
268
-Map option: NERDTreeMapActivateNode
269
-Applies to: files and directories.
270
-
271
-If a file node is selected, it is opened in the previous window.
272
-
273
-If a directory is selected it is opened or closed depending on its current
274
-state.
275
-
276
-If a bookmark that links to a directory is selected then that directory
277
-becomes the new root.
278
-
279
-If a bookmark that links to a file is selected then that file is opened in the
280
-previous window.
281
-
282
-------------------------------------------------------------------------------
283
-                                                                 *NERDTree-go*
284
-Default key: go
285
-Map option: None
286
-Applies to: files.
287
-
288
-If a file node is selected, it is opened in the previous window, but the
289
-cursor does not move.
290
-
291
-The key combo for this mapping is always "g" + NERDTreeMapActivateNode (see
292
-|NERDTree-o|).
293
-
294
-------------------------------------------------------------------------------
295
-                                                                  *NERDTree-t*
296
-Default key: t
297
-Map option: NERDTreeMapOpenInTab
298
-Applies to: files and directories.
299
-
300
-Opens the selected file in a new tab. If a directory is selected, a fresh
301
-NERD Tree for that directory is opened in a new tab.
302
-
303
-If a bookmark which points to a directory is selected, open a NERD tree for
304
-that directory in a new tab. If the bookmark points to a file, open that file
305
-in a new tab.
306
-
307
-------------------------------------------------------------------------------
308
-                                                                  *NERDTree-T*
309
-Default key: T
310
-Map option: NERDTreeMapOpenInTabSilent
311
-Applies to: files and directories.
312
-
313
-The same as |NERDTree-t| except that the focus is kept in the current tab.
314
-
315
-------------------------------------------------------------------------------
316
-                                                                  *NERDTree-i*
317
-Default key: i
318
-Map option: NERDTreeMapOpenSplit
319
-Applies to: files.
320
-
321
-Opens the selected file in a new split window and puts the cursor in the new
322
-window.
323
-
324
-------------------------------------------------------------------------------
325
-                                                                 *NERDTree-gi*
326
-Default key: gi
327
-Map option: None
328
-Applies to: files.
329
-
330
-The same as |NERDTree-i| except that the cursor is not moved.
331
-
332
-The key combo for this mapping is always "g" + NERDTreeMapOpenSplit (see
333
-|NERDTree-i|).
334
-
335
-------------------------------------------------------------------------------
336
-                                                                  *NERDTree-s*
337
-Default key: s
338
-Map option: NERDTreeMapOpenVSplit
339
-Applies to: files.
340
-
341
-Opens the selected file in a new vertically split window and puts the cursor in
342
-the new window.
343
-
344
-------------------------------------------------------------------------------
345
-                                                                 *NERDTree-gs*
346
-Default key: gs
347
-Map option: None
348
-Applies to: files.
349
-
350
-The same as |NERDTree-s| except that the cursor is not moved.
351
-
352
-The key combo for this mapping is always "g" + NERDTreeMapOpenVSplit (see
353
-|NERDTree-s|).
354
-
355
-------------------------------------------------------------------------------
356
-                                                                  *NERDTree-O*
357
-Default key: O
358
-Map option: NERDTreeMapOpenRecursively
359
-Applies to: directories.
360
-
361
-Recursively opens the selelected directory.
362
-
363
-All files and directories are cached, but if a directory would not be
364
-displayed due to file filters (see |'NERDTreeIgnore'| |NERDTree-f|) or the
365
-hidden file filter (see |'NERDTreeShowHidden'|) then its contents are not
366
-cached. This is handy, especially if you have .svn directories.
367
-
368
-------------------------------------------------------------------------------
369
-                                                                  *NERDTree-x*
370
-Default key: x
371
-Map option: NERDTreeMapCloseDir
372
-Applies to: files and directories.
373
-
374
-Closes the parent of the selected node.
375
-
376
-------------------------------------------------------------------------------
377
-                                                                  *NERDTree-X*
378
-Default key: X
379
-Map option: NERDTreeMapCloseChildren
380
-Applies to: directories.
381
-
382
-Recursively closes all children of the selected directory.
383
-
384
-Tip: To quickly "reset" the tree, use |NERDTree-P| with this mapping.
385
-
386
-------------------------------------------------------------------------------
387
-                                                                  *NERDTree-e*
388
-Default key: e
389
-Map option: NERDTreeMapOpenExpl
390
-Applies to: files and directories.
391
-
392
-|:edit|s the selected directory, or the selected file's directory. This could
393
-result in a NERD tree or a netrw being opened, depending on
394
-|'NERDTreeHijackNetrw'|.
395
-
396
-------------------------------------------------------------------------------
397
-                                                                  *NERDTree-D*
398
-Default key: D
399
-Map option: NERDTreeMapDeleteBookmark
400
-Applies to: lines in the bookmarks table
401
-
402
-Deletes the currently selected bookmark.
403
-
404
-------------------------------------------------------------------------------
405
-                                                                  *NERDTree-P*
406
-Default key: P
407
-Map option: NERDTreeMapJumpRoot
408
-Applies to: no restrictions.
409
-
410
-Jump to the tree root.
411
-
412
-------------------------------------------------------------------------------
413
-                                                                  *NERDTree-p*
414
-Default key: p
415
-Map option: NERDTreeMapJumpParent
416
-Applies to: files and directories.
417
-
418
-Jump to the parent node of the selected node.
419
-
420
-------------------------------------------------------------------------------
421
-                                                                  *NERDTree-K*
422
-Default key: K
423
-Map option: NERDTreeMapJumpFirstChild
424
-Applies to: files and directories.
425
-
426
-Jump to the first child of the current nodes parent.
427
-
428
-If the cursor is already on the first node then do the following:
429
-    * loop back thru the siblings of the current nodes parent until we find an
430
-      open dir with children
431
-    * go to the first child of that node
432
-
433
-------------------------------------------------------------------------------
434
-                                                                  *NERDTree-J*
435
-Default key: J
436
-Map option: NERDTreeMapJumpLastChild
437
-Applies to: files and directories.
438
-
439
-Jump to the last child of the current nodes parent.
440
-
441
-If the cursor is already on the last node then do the following:
442
-    * loop forward thru the siblings of the current nodes parent until we find
443
-      an open dir with children
444
-    * go to the last child of that node
445
-
446
-------------------------------------------------------------------------------
447
-                                                                *NERDTree-C-J*
448
-Default key: <C-J>
449
-Map option: NERDTreeMapJumpNextSibling
450
-Applies to: files and directories.
451
-
452
-Jump to the next sibling of the selected node.
453
-
454
-------------------------------------------------------------------------------
455
-                                                                *NERDTree-C-K*
456
-Default key: <C-K>
457
-Map option: NERDTreeMapJumpPrevSibling
458
-Applies to: files and directories.
459
-
460
-Jump to the previous sibling of the selected node.
461
-
462
-------------------------------------------------------------------------------
463
-                                                                  *NERDTree-C*
464
-Default key: C
465
-Map option: NERDTreeMapChdir
466
-Applies to: directories.
467
-
468
-Make the selected directory node the new tree root. If a file is selected, its
469
-parent is used.
470
-
471
-------------------------------------------------------------------------------
472
-                                                                  *NERDTree-u*
473
-Default key: u
474
-Map option: NERDTreeMapUpdir
475
-Applies to: no restrictions.
476
-
477
-Move the tree root up a dir (like doing a "cd ..").
478
-
479
-------------------------------------------------------------------------------
480
-                                                                  *NERDTree-U*
481
-Default key: U
482
-Map option: NERDTreeMapUpdirKeepOpen
483
-Applies to: no restrictions.
484
-
485
-Like |NERDTree-u| except that the old tree root is kept open.
486
-
487
-------------------------------------------------------------------------------
488
-                                                                  *NERDTree-r*
489
-Default key: r
490
-Map option: NERDTreeMapRefresh
491
-Applies to: files and directories.
492
-
493
-If a dir is selected, recursively refresh that dir, i.e. scan the filesystem
494
-for changes and represent them in the tree.
495
-
496
-If a file node is selected then the above is done on it's parent.
497
-
498
-------------------------------------------------------------------------------
499
-                                                                  *NERDTree-R*
500
-Default key: R
501
-Map option: NERDTreeMapRefreshRoot
502
-Applies to: no restrictions.
503
-
504
-Recursively refresh the tree root.
505
-
506
-------------------------------------------------------------------------------
507
-                                                                  *NERDTree-m*
508
-Default key: m
509
-Map option: NERDTreeMapMenu
510
-Applies to: files and directories.
511
-
512
-Display the NERD tree menu. See |NERDTreeMenu| for details.
513
-
514
-------------------------------------------------------------------------------
515
-                                                                 *NERDTree-cd*
516
-Default key: cd
517
-Map option: NERDTreeMapChdir
518
-Applies to: files and directories.
519
-
520
-Change vims current working directory to that of the selected node.
521
-
522
-------------------------------------------------------------------------------
523
-                                                                 *NERDTree-CD*
524
-Default key: CD
525
-Map option: NERDTreeMapCWD
526
-Applies to: no restrictions.
527
-
528
-Change tree root to vims current working directory.
529
-
530
-------------------------------------------------------------------------------
531
-                                                                  *NERDTree-I*
532
-Default key: I
533
-Map option: NERDTreeMapToggleHidden
534
-Applies to: no restrictions.
535
-
536
-Toggles whether hidden files (i.e. "dot files") are displayed.
537
-
538
-------------------------------------------------------------------------------
539
-                                                                  *NERDTree-f*
540
-Default key: f
541
-Map option: NERDTreeMapToggleFilters
542
-Applies to: no restrictions.
543
-
544
-Toggles whether file filters are used. See |'NERDTreeIgnore'| for details.
545
-
546
-------------------------------------------------------------------------------
547
-                                                                  *NERDTree-F*
548
-Default key: F
549
-Map option: NERDTreeMapToggleFiles
550
-Applies to: no restrictions.
551
-
552
-Toggles whether file nodes are displayed.
553
-
554
-------------------------------------------------------------------------------
555
-                                                                  *NERDTree-B*
556
-Default key: B
557
-Map option: NERDTreeMapToggleBookmarks
558
-Applies to: no restrictions.
559
-
560
-Toggles whether the bookmarks table is displayed.
561
-
562
-------------------------------------------------------------------------------
563
-                                                                  *NERDTree-q*
564
-Default key: q
565
-Map option: NERDTreeMapQuit
566
-Applies to: no restrictions.
567
-
568
-Closes the NERDtree window.
569
-
570
-------------------------------------------------------------------------------
571
-                                                                  *NERDTree-A*
572
-Default key: A
573
-Map option: NERDTreeMapToggleZoom
574
-Applies to: no restrictions.
575
-
576
-Maximize (zoom) and minimize the NERDtree window.
577
-
578
-------------------------------------------------------------------------------
579
-                                                                  *NERDTree-?*
580
-Default key: ?
581
-Map option: NERDTreeMapHelp
582
-Applies to: no restrictions.
583
-
584
-Toggles whether the quickhelp is displayed.
585
-
586
-------------------------------------------------------------------------------
587
-2.3. The NERD tree menu                                         *NERDTreeMenu*
588
-
589
-The NERD tree has a menu that can be programmed via the an API (see
590
-|NERDTreeMenuAPI|). The idea is to simulate the "right click" menus that most
591
-file explorers have.
592
-
593
-The script comes with two default menu plugins: exec_menuitem.vim and
594
-fs_menu.vim. fs_menu.vim adds some basic filesystem operations to the menu for
595
-creating/deleting/moving/copying files and dirs. exec_menuitem.vim provides a
596
-menu item to execute executable files.
597
-
598
-Related tags: |NERDTree-m| |NERDTreeApi|
599
-
600
-==============================================================================
601
-3. Customisation                                             *NERDTreeOptions*
602
-
603
-
604
-------------------------------------------------------------------------------
605
-3.1. Customisation summary                             *NERDTreeOptionSummary*
606
-
607
-The script provides the following options that can customise the behaviour the
608
-NERD tree. These options should be set in your vimrc.
609
-
610
-|'loaded_nerd_tree'|            Turns off the script.
611
-
612
-|'NERDChristmasTree'|           Tells the NERD tree to make itself colourful
613
-                                and pretty.
614
-
615
-|'NERDTreeAutoCenter'|          Controls whether the NERD tree window centers
616
-                                when the cursor moves within a specified
617
-                                distance to the top/bottom of the window.
618
-|'NERDTreeAutoCenterThreshold'| Controls the sensitivity of autocentering.
619
-
620
-|'NERDTreeCaseSensitiveSort'|   Tells the NERD tree whether to be case
621
-                                sensitive or not when sorting nodes.
622
-
623
-|'NERDTreeChDirMode'|           Tells the NERD tree if/when it should change
624
-                                vim's current working directory.
625
-
626
-|'NERDTreeHighlightCursorline'| Tell the NERD tree whether to highlight the
627
-                                current cursor line.
628
-
629
-|'NERDTreeHijackNetrw'|         Tell the NERD tree whether to replace the netrw
630
-                                autocommands for exploring local directories.
631
-
632
-|'NERDTreeIgnore'|              Tells the NERD tree which files to ignore.
633
-
634
-|'NERDTreeBookmarksFile'|       Where the bookmarks are stored.
635
-
636
-|'NERDTreeMouseMode'|           Tells the NERD tree how to handle mouse
637
-                                clicks.
638
-
639
-|'NERDTreeQuitOnOpen'|          Closes the tree window after opening a file.
640
-
641
-|'NERDTreeShowBookmarks'|       Tells the NERD tree whether to display the
642
-                                bookmarks table on startup.
643
-
644
-|'NERDTreeShowFiles'|           Tells the NERD tree whether to display files
645
-                                in the tree on startup.
646
-
647
-|'NERDTreeShowHidden'|          Tells the NERD tree whether to display hidden
648
-                                files on startup.
649
-
650
-|'NERDTreeShowLineNumbers'|     Tells the NERD tree whether to display line
651
-                                numbers in the tree window.
652
-
653
-|'NERDTreeSortOrder'|           Tell the NERD tree how to sort the nodes in
654
-                                the tree.
655
-
656
-|'NERDTreeStatusline'|          Set a statusline for NERD tree windows.
657
-
658
-|'NERDTreeWinPos'|              Tells the script where to put the NERD tree
659
-                                window.
660
-
661
-|'NERDTreeWinSize'|             Sets the window size when the NERD tree is
662
-                                opened.
663
-
664
-|'NERDTreeMinimalUI'|           Disables display of the 'Bookmarks' label and 
665
-                                'Press ? for help' text.
666
-
667
-|'NERDTreeDirArrows'|           Tells the NERD tree to use arrows instead of
668
-                                + ~ chars when displaying directories.
669
-
670
-|'NERDTreeCasadeOpenSingleChildDir'|
671
-                                Casade open while selected directory has only
672
-                                one child that also is a directory.
673
-
674
-|'NERDTreeAutoDeleteBuffer'|    Tells the NERD tree to automatically remove 
675
-                                a buffer when a file is being deleted or renamed
676
-                                via a context menu command.
677
-
678
-------------------------------------------------------------------------------
679
-3.2. Customisation details                             *NERDTreeOptionDetails*
680
-
681
-To enable any of the below options you should put the given line in your
682
-~/.vimrc
683
-
684
-                                                          *'loaded_nerd_tree'*
685
-If this plugin is making you feel homicidal, it may be a good idea to turn it
686
-off with this line in your vimrc: >
687
-    let loaded_nerd_tree=1
688
-<
689
-------------------------------------------------------------------------------
690
-                                                         *'NERDChristmasTree'*
691
-Values: 0 or 1.
692
-Default: 1.
693
-
694
-If this option is set to 1 then some extra syntax highlighting elements are
695
-added to the nerd tree to make it more colourful.
696
-
697
-Set it to 0 for a more vanilla looking tree.
698
-
699
-------------------------------------------------------------------------------
700
-                                                        *'NERDTreeAutoCenter'*
701
-Values: 0 or 1.
702
-Default: 1
703
-
704
-If set to 1, the NERD tree window will center around the cursor if it moves to
705
-within |'NERDTreeAutoCenterThreshold'| lines of the top/bottom of the window.
706
-
707
-This is ONLY done in response to tree navigation mappings,
708
-i.e. |NERDTree-J| |NERDTree-K| |NERDTree-C-J| |NERDTree-C-K| |NERDTree-p|
709
-|NERDTree-P|
710
-
711
-The centering is done with a |zz| operation.
712
-
713
-------------------------------------------------------------------------------
714
-                                               *'NERDTreeAutoCenterThreshold'*
715
-Values: Any natural number.
716
-Default: 3
717
-
718
-This option controls the "sensitivity" of the NERD tree auto centering. See
719
-|'NERDTreeAutoCenter'| for details.
720
-
721
-------------------------------------------------------------------------------
722
-                                                 *'NERDTreeCaseSensitiveSort'*
723
-Values: 0 or 1.
724
-Default: 0.
725
-
726
-By default the NERD tree does not sort nodes case sensitively, i.e. nodes
727
-could appear like this: >
728
-    bar.c
729
-    Baz.c
730
-    blarg.c
731
-    boner.c
732
-    Foo.c
733
-<
734
-But, if you set this option to 1 then the case of the nodes will be taken into
735
-account. The above nodes would then be sorted like this: >
736
-    Baz.c
737
-    Foo.c
738
-    bar.c
739
-    blarg.c
740
-    boner.c
741
-<
742
-------------------------------------------------------------------------------
743
-                                                         *'NERDTreeChDirMode'*
744
-
745
-Values: 0, 1 or 2.
746
-Default: 0.
747
-
748
-Use this option to tell the script when (if at all) to change the current
749
-working directory (CWD) for vim.
750
-
751
-If it is set to 0 then the CWD is never changed by the NERD tree.
752
-
753
-If set to 1 then the CWD is changed when the NERD tree is first loaded to the
754
-directory it is initialized in. For example, if you start the NERD tree with >
755
-    :NERDTree /home/marty/foobar
756
-<
757
-then the CWD will be changed to /home/marty/foobar and will not be changed
758
-again unless you init another NERD tree with a similar command.
759
-
760
-If the option is set to 2 then it behaves the same as if set to 1 except that
761
-the CWD is changed whenever the tree root is changed. For example, if the CWD
762
-is /home/marty/foobar and you make the node for /home/marty/foobar/baz the new
763
-root then the CWD will become /home/marty/foobar/baz.
764
-
765
-------------------------------------------------------------------------------
766
-                                               *'NERDTreeHighlightCursorline'*
767
-Values: 0 or 1.
768
-Default: 1.
769
-
770
-If set to 1, the current cursor line in the NERD tree buffer will be
771
-highlighted. This is done using the |'cursorline'| option.
772
-
773
-------------------------------------------------------------------------------
774
-                                                       *'NERDTreeHijackNetrw'*
775
-Values: 0 or 1.
776
-Default: 1.
777
-
778
-If set to 1, doing a >
779
-    :edit <some directory>
780
-<
781
-will open up a "secondary" NERD tree instead of a netrw in the target window.
782
-
783
-Secondary NERD trees behaves slighly different from a regular trees in the
784
-following respects:
785
-    1. 'o' will open the selected file in the same window as the tree,
786
-       replacing it.
787
-    2. you can have as many secondary tree as you want in the same tab.
788
-
789
-------------------------------------------------------------------------------
790
-                                                            *'NERDTreeIgnore'*
791
-Values: a list of regular expressions.
792
-Default: ['\~$'].
793
-
794
-This option is used to specify which files the NERD tree should ignore.  It
795
-must be a list of regular expressions. When the NERD tree is rendered, any
796
-files/dirs that match any of the regex's in 'NERDTreeIgnore' wont be
797
-displayed.
798
-
799
-For example if you put the following line in your vimrc: >
800
-    let NERDTreeIgnore=['\.vim$', '\~$']
801
-<
802
-then all files ending in .vim or ~ will be ignored.
803
-
804
-There are 2 magic flags that can be appended to the end of each regular
805
-expression to specify that the regex should match only files or only dirs.
806
-These flags are "[[dir]]" and "[[file]]". Example: >
807
-    let NERDTreeIgnore=['.d$[[dir]]', '.o$[[file]]']
808
-<
809
-This will cause all dirs ending in ".d" to be ignored and all files ending in
810
-".o" to be ignored.
811
-
812
-Note: to tell the NERD tree not to ignore any files you must use the following
813
-line: >
814
-    let NERDTreeIgnore=[]
815
-<
816
-
817
-The file filters can be turned on and off dynamically with the |NERDTree-f|
818
-mapping.
819
-
820
-------------------------------------------------------------------------------
821
-                                                     *'NERDTreeBookmarksFile'*
822
-Values: a path
823
-Default: $HOME/.NERDTreeBookmarks
824
-
825
-This is where bookmarks are saved. See |NERDTreeBookmarkCommands|.
826
-
827
-------------------------------------------------------------------------------
828
-                                                       *'NERDTreeMouseMode'*
829
-Values: 1, 2 or 3.
830
-Default: 1.
831
-
832
-If set to 1 then a double click on a node is required to open it.
833
-If set to 2 then a single click will open directory nodes, while a double
834
-click will still be required for file nodes.
835
-If set to 3 then a single click will open any node.
836
-
837
-Note: a double click anywhere on a line that a tree node is on will
838
-activate it, but all single-click activations must be done on name of the node
839
-itself. For example, if you have the following node: >
840
-    | | |-application.rb
841
-<
842
-then (to single click activate it) you must click somewhere in
843
-'application.rb'.
844
-
845
-------------------------------------------------------------------------------
846
-                                                        *'NERDTreeQuitOnOpen'*
847
-
848
-Values: 0 or 1.
849
-Default: 0
850
-
851
-If set to 1, the NERD tree window will close after opening a file with the
852
-|NERDTree-o|, |NERDTree-i|, |NERDTree-t| and |NERDTree-T| mappings.
853
-
854
-------------------------------------------------------------------------------
855
-                                                     *'NERDTreeShowBookmarks'*
856
-Values: 0 or 1.
857
-Default: 0.
858
-
859
-If this option is set to 1 then the bookmarks table will be displayed.
860
-
861
-This option can be toggled dynamically, per tree, with the |NERDTree-B|
862
-mapping.
863
-
864
-------------------------------------------------------------------------------
865
-                                                         *'NERDTreeShowFiles'*
866
-Values: 0 or 1.
867
-Default: 1.
868
-
869
-If this option is set to 1 then files are displayed in the NERD tree. If it is
870
-set to 0 then only directories are displayed.
871
-
872
-This option can be toggled dynamically, per tree, with the |NERDTree-F|
873
-mapping and is useful for drastically shrinking the tree when you are
874
-navigating to a different part of the tree.
875
-
876
-------------------------------------------------------------------------------
877
-                                                        *'NERDTreeShowHidden'*
878
-Values: 0 or 1.
879
-Default: 0.
880
-
881
-This option tells vim whether to display hidden files by default. This option
882
-can be dynamically toggled, per tree, with the |NERDTree-I| mapping.  Use one
883
-of the follow lines to set this option: >
884
-    let NERDTreeShowHidden=0
885
-    let NERDTreeShowHidden=1
886
-<
887
-
888
-------------------------------------------------------------------------------
889
-                                                   *'NERDTreeShowLineNumbers'*
890
-Values: 0 or 1.
891
-Default: 0.
892
-
893
-This option tells vim whether to display line numbers for the NERD tree
894
-window.  Use one of the follow lines to set this option: >
895
-    let NERDTreeShowLineNumbers=0
896
-    let NERDTreeShowLineNumbers=1
897
-<
898
-
899
-------------------------------------------------------------------------------
900
-                                                         *'NERDTreeSortOrder'*
901
-Values: a list of regular expressions.
902
-Default: ['\/$', '*', '\.swp$',  '\.bak$', '\~$']
903
-
904
-This option is set to a list of regular expressions which are used to
905
-specify the order of nodes under their parent.
906
-
907
-For example, if the option is set to: >
908
-    ['\.vim$', '\.c$', '\.h$', '*', 'foobar']
909
-<
910
-then all .vim files will be placed at the top, followed by all .c files then
911
-all .h files. All files containing the string 'foobar' will be placed at the
912
-end.  The star is a special flag: it tells the script that every node that
913
-doesnt match any of the other regexps should be placed here.
914
-
915
-If no star is present in 'NERDTreeSortOrder' then one is automatically
916
-appended to the array.
917
-
918
-The regex '\/$' should be used to match directory nodes.
919
-
920
-After this sorting is done, the files in each group are sorted alphabetically.
921
-
922
-Other examples: >
923
-    (1) ['*', '\/$']
924
-    (2) []
925
-    (3) ['\/$', '\.rb$', '\.php$', '*', '\.swp$',  '\.bak$', '\~$']
926
-<
927
-1. Directories will appear last, everything else will appear above.
928
-2. Everything will simply appear in alphabetical order.
929
-3. Dirs will appear first, then ruby and php. Swap files, bak files and vim
930
-   backup files will appear last with everything else preceding them.
931
-
932
-------------------------------------------------------------------------------
933
-                                                        *'NERDTreeStatusline'*
934
-Values: Any valid statusline setting.
935
-Default: %{b:NERDTreeRoot.path.strForOS(0)}
936
-
937
-Tells the script what to use as the |'statusline'| setting for NERD tree
938
-windows.
939
-
940
-Note that the statusline is set using |:let-&| not |:set| so escaping spaces
941
-isn't necessary.
942
-
943
-Setting this option to -1 will will deactivate it so that your global
944
-statusline setting is used instead.
945
-
946
-------------------------------------------------------------------------------
947
-                                                            *'NERDTreeWinPos'*
948
-Values: "left" or "right"
949
-Default: "left".
950
-
951
-This option is used to determine where NERD tree window is placed on the
952
-screen.
953
-
954
-This option makes it possible to use two different explorer plugins
955
-simultaneously. For example, you could have the taglist plugin on the left of
956
-the window and the NERD tree on the right.
957
-
958
-------------------------------------------------------------------------------
959
-                                                           *'NERDTreeWinSize'*
960
-Values: a positive integer.
961
-Default: 31.
962
-
963
-This option is used to change the size of the NERD tree when it is loaded.
964
-
965
-------------------------------------------------------------------------------
966
-                                                         *'NERDTreeMinimalUI'*
967
-Values: 0 or 1
968
-Default: 0
969
-
970
-This options disables the 'Bookmarks' label 'Press ? for help' text. Use one
971
-of the following lines to set this option: >
972
-    let NERDTreeMinimalUI=0
973
-    let NERDTreeMinimalUI=1
974
-<
975
-
976
-------------------------------------------------------------------------------
977
-                                                           *'NERDTreeDirArrows'*
978
-Values: 0 or 1
979
-Default: 0.
980
-
981
-This option is used to change the default look of directory nodes displayed in
982
-the tree. When set to 0 it shows old-school bars (|), + and ~ chars. If set to
983
-1 it shows right and down arrows.  Use one of the follow lines to set this
984
-option: >
985
-    let NERDTreeDirArrows=0
986
-    let NERDTreeDirArrows=1
987
-<
988
-
989
-------------------------------------------------------------------------------
990
-                                          *'NERDTreeCasadeOpenSingleChildDir'*
991
-Values: 0 or 1
992
-Default: 1.
993
-
994
-When opening dir nodes, this option tells NERDTree to recursively open dirs
995
-that have only one child which is also a dir. NERDTree will stop when it finds
996
-a dir that contains anything but another single dir. This option may be useful
997
-for Java projects.  Use one of the follow lines to set this option: >
998
-    let NERDTreeCasadeOpenSingleChildDir=0
999
-    let NERDTreeCasadeOpenSingleChildDir=1
1000
-<
1001
-
1002
-------------------------------------------------------------------------------
1003
-                                          *'NERDTreeAutoDeleteBuffer'*
1004
-Values: 0 or 1
1005
-Default: 0.
1006
-
1007
-When using a context menu to delete or rename a file you may also want to delete
1008
-the buffer which is no more valid. If the option is not set you will see a
1009
-confirmation if you really want to delete an old buffer. If you always press 'y'
1010
-then it worths to set this option to 1. Use one of the follow lines to set this
1011
-option: >
1012
-    let NERDTreeAutoDeleteBuffer=0
1013
-    let NERDTreeAutoDeleteBuffer=1
1014
-<
1015
-
1016
-==============================================================================
1017
-4. The NERD tree API                                             *NERDTreeAPI*
1018
-
1019
-The NERD tree script allows you to add custom key mappings and menu items via
1020
-a set of API calls. Any scripts that use this API should be placed in
1021
-~/.vim/nerdtree_plugin/ (*nix) or ~/vimfiles/nerdtree_plugin (windows).
1022
-
1023
-The script exposes some prototype objects that can be used to manipulate the
1024
-tree and/or get information from it: >
1025
-    g:NERDTreePath
1026
-    g:NERDTreeDirNode
1027
-    g:NERDTreeFileNode
1028
-    g:NERDTreeBookmark
1029
-<
1030
-See the code/comments in NERD_tree.vim to find how to use these objects. The
1031
-following code conventions are used:
1032
-    * class members start with a capital letter
1033
-    * instance members start with a lower case letter
1034
-    * private members start with an underscore
1035
-
1036
-See this blog post for more details:
1037
- http://got-ravings.blogspot.com/2008/09/vim-pr0n-prototype-based-objects.html
1038
-
1039
-------------------------------------------------------------------------------
1040
-4.1. Key map API                                           *NERDTreeKeymapAPI*
1041
-
1042
-NERDTreeAddKeyMap({options})                             *NERDTreeAddKeyMap()*
1043
-    Adds a new keymapping for all NERD tree buffers.
1044
-    {options} must be a dictionary, and must contain the following keys:
1045
-    "key" - the trigger key for the new mapping
1046
-    "callback" - the function the new mapping will be bound to
1047
-    "quickhelpText" - the text that will appear in the quickhelp (see
1048
-    |NERDTree-?|)
1049
-
1050
-    Additionally, a "scope" argument may be supplied. This constrains the
1051
-    mapping so that it is only activated if the cursor is on a certain object.
1052
-    That object is then passed into the handling method. Possible values are:
1053
-        "FileNode" - a file node
1054
-        "DirNode" - a directory node
1055
-        "Node" - a file or directory node
1056
-        "Bookmark" - A bookmark
1057
-        "all" - the keymap is not constrained to any scope (default). When
1058
-        thei is used, the handling function is not passed any arguments.
1059
-
1060
-
1061
-    Example: >
1062
-        call NERDTreeAddKeyMap({
1063
-               \ 'key': 'foo',
1064
-               \ 'callback': 'NERDTreeCDHandler',
1065
-               \ 'quickhelpText': 'echo full path of current node' })
1066
-               \ 'scope': 'DirNode'
1067
-
1068
-        function! NERDTreeCDHandler(dirnode)
1069
-            call a:dirnode.changeToDir()
1070
-        endfunction
1071
-<
1072
-    This code should sit in a file like ~/.vim/nerdtree_plugin/mymapping.vim.
1073
-    It adds a (redundant) mapping on 'foo' which changes vim's CWD to that of
1074
-    the current dir node. Note this mapping will only fire when the cursor is
1075
-    on a directory node.
1076
-
1077
-------------------------------------------------------------------------------
1078
-4.2. Menu API                                                *NERDTreeMenuAPI*
1079
-
1080
-NERDTreeAddSubmenu({options})                           *NERDTreeAddSubmenu()*
1081
-    Creates and returns a new submenu.
1082
-
1083
-    {options} must be a dictionary and must contain the following keys:
1084
-    "text" - the text of the submenu that the user will see
1085
-    "shortcut" - a shortcut key for the submenu (need not be unique)
1086
-
1087
-    The following keys are optional:
1088
-    "isActiveCallback" - a function that will be called to determine whether
1089
-    this submenu item will be displayed or not. The callback function must return
1090
-    0 or 1.
1091
-    "parent" - the parent submenu of the new submenu (returned from a previous
1092
-    invocation of NERDTreeAddSubmenu()). If this key is left out then the new
1093
-    submenu will sit under the top level menu.
1094
-
1095
-    See below for an example.
1096
-
1097
-NERDTreeAddMenuItem({options})                         *NERDTreeAddMenuItem()*
1098
-    Adds a new menu item to the NERD tree menu (see |NERDTreeMenu|).
1099
-
1100
-    {options} must be a dictionary and must contain the
1101
-    following keys:
1102
-    "text" - the text of the menu item which the user will see
1103
-    "shortcut" - a shortcut key for the menu item (need not be unique)
1104
-    "callback" - the function that will be called when the user activates the
1105
-    menu item.
1106
-
1107
-    The following keys are optional:
1108
-    "isActiveCallback" - a function that will be called to determine whether
1109
-    this menu item will be displayed or not. The callback function must return
1110
-    0 or 1.
1111
-    "parent" - if the menu item belongs under a submenu then this key must be
1112
-    specified. This value for this key will be the object that
1113
-    was returned when the submenu was created with |NERDTreeAddSubmenu()|.
1114
-
1115
-    See below for an example.
1116
-
1117
-NERDTreeAddMenuSeparator([{options}])             *NERDTreeAddMenuSeparator()*
1118
-    Adds a menu separator (a row of dashes).
1119
-
1120
-    {options} is an optional dictionary that may contain the following keys:
1121
-    "isActiveCallback" - see description in |NERDTreeAddMenuItem()|.
1122
-
1123
-Below is an example of the menu API in action. >
1124
-    call NERDTreeAddMenuSeparator()
1125
-
1126
-    call NERDTreeAddMenuItem({
1127
-                \ 'text': 'a (t)op level menu item',
1128
-                \ 'shortcut': 't',
1129
-                \ 'callback': 'SomeFunction' })
1130
-
1131
-    let submenu = NERDTreeAddSubmenu({
1132
-                \ 'text': 'a (s)ub menu',
1133
-                \ 'shortcut': 's' })
1134
-
1135
-    call NERDTreeAddMenuItem({
1136
-                \ 'text': '(n)ested item 1',
1137
-                \ 'shortcut': 'n',
1138
-                \ 'callback': 'SomeFunction',
1139
-                \ 'parent': submenu })
1140
-
1141
-    call NERDTreeAddMenuItem({
1142
-                \ 'text': '(n)ested item 2',
1143
-                \ 'shortcut': 'n',
1144
-                \ 'callback': 'SomeFunction',
1145
-                \ 'parent': submenu })
1146
-<
1147
-This will create the following menu: >
1148
-  --------------------
1149
-  a (t)op level menu item
1150
-  a (s)ub menu
1151
-<
1152
-Where selecting "a (s)ub menu" will lead to a second menu: >
1153
-  (n)ested item 1
1154
-  (n)ested item 2
1155
-<
1156
-When any of the 3 concrete menu items are selected the function "SomeFunction"
1157
-will be called.
1158
-
1159
-------------------------------------------------------------------------------
1160
-NERDTreeRender()                                            *NERDTreeRender()*
1161
-    Re-renders the NERD tree buffer. Useful if you change the state of the
1162
-    tree and you want to it to be reflected in the UI.
1163
-
1164
-==============================================================================
1165
-5. About                                                       *NERDTreeAbout*
1166
-
1167
-The author of the NERD tree is a terrible terrible monster called Martyzilla
1168
-who gobbles up small children with milk and sugar for breakfast.
1169
-
1170
-He can be reached at martin.grenfell at gmail dot com. He would love to hear
1171
-from you, so feel free to send him suggestions and/or comments about this
1172
-plugin.  Don't be shy --- the worst he can do is slaughter you and stuff you in
1173
-the fridge for later ;)
1174
-
1175
-The latest stable versions can be found at
1176
-    http://www.vim.org/scripts/script.php?script_id=1658
1177
-
1178
-The latest dev versions are on github
1179
-    http://github.com/scrooloose/nerdtree
1180
-
1181
-
1182
-==============================================================================
1183
-6. Changelog                                               *NERDTreeChangelog*
1184
-
1185
-Next
1186
-    - add 'scope' argument to the key map API
1187
-    - add NERDTreeCustomIgnoreFilter hook - needs doc
1188
-    - add magic [[dir]] and [[file]] flags to NERDTreeIgnore
1189
-
1190
-4.2.0
1191
-    - Add NERDTreeDirArrows option to make the UI use pretty arrow chars
1192
-      instead of the old +~| chars to define the tree structure (sickill)
1193
-    - shift the syntax highlighting out into its own syntax file (gnap)
1194
-    - add some mac specific options to the filesystem menu - for macvim
1195
-      only (andersonfreitas)
1196
-    - Add NERDTreeMinimalUI option to remove some non functional parts of the
1197
-      nerdtree ui (camthompson)
1198
-    - tweak the behaviour of :NERDTreeFind - see :help :NERDTreeFind for the
1199
-      new behaviour (benjamingeiger)
1200
-    - if no name is given to :Bookmark, make it default to the name of the
1201
-      target file/dir (minyoung)
1202
-    - use 'file' completion when doing copying, create, and move
1203
-      operations (EvanDotPro)
1204
-    - lots of misc bug fixes (paddyoloughlin, sdewald, camthompson, Vitaly
1205
-      Bogdanov, AndrewRadev, mathias, scottstvnsn, kml, wycats, me RAWR!)
1206
-
1207
-4.1.0
1208
-    features:
1209
-    - NERDTreeFind to reveal the node for the current buffer in the tree,
1210
-      see |NERDTreeFind|. This effectively merges the FindInNERDTree plugin (by
1211
-      Doug McInnes) into the script.
1212
-    - make NERDTreeQuitOnOpen apply to the t/T keymaps too. Thanks to Stefan
1213
-      Ritter and Rémi Prévost.
1214
-    - truncate the root node if wider than the tree window. Thanks to Victor
1215
-      Gonzalez.
1216
-
1217
-    bugfixes:
1218
-    - really fix window state restoring
1219
-    - fix some win32 path escaping issues. Thanks to Stephan Baumeister, Ricky,
1220
-      jfilip1024, and Chris Chambers
1221
-
1222
-4.0.0
1223
-    - add a new programmable menu system (see :help NERDTreeMenu).
1224
-    - add new APIs to add menus/menu-items to the menu system as well as
1225
-      custom key mappings to the NERD tree buffer (see :help NERDTreeAPI).
1226
-    - removed the old API functions
1227
-    - added a mapping to maximize/restore the size of nerd tree window, thanks
1228
-      to Guillaume Duranceau for the patch. See :help NERDTree-A for details.
1229
-
1230
-    - fix a bug where secondary nerd trees (netrw hijacked trees) and
1231
-      NERDTreeQuitOnOpen didnt play nicely, thanks to Curtis Harvey.
1232
-    - fix a bug where the script ignored directories whose name ended in a dot,
1233
-      thanks to Aggelos Orfanakos for the patch.
1234
-    - fix a bug when using the x mapping on the tree root, thanks to Bryan
1235
-      Venteicher for the patch.
1236
-    - fix a bug where the cursor position/window size of the nerd tree buffer
1237
-      wasnt being stored on closing the window, thanks to Richard Hart.
1238
-    - fix a bug where NERDTreeMirror would mirror the wrong tree
1239
-
1240
-3.1.1
1241
-    - fix a bug where a non-listed no-name buffer was getting created every
1242
-      time the tree windows was created, thanks to Derek Wyatt and owen1
1243
-    - make <CR> behave the same as the 'o' mapping
1244
-    - some helptag fixes in the doc, thanks strull
1245
-    - fix a bug when using :set nohidden and opening a file where the previous
1246
-      buf was modified. Thanks iElectric
1247
-    - other minor fixes
1248
-
1249
-3.1.0
1250
-    New features:
1251
-    - add mappings to open files in a vsplit, see :help NERDTree-s and :help
1252
-      NERDTree-gs
1253
-    - make the statusline for the nerd tree window default to something
1254
-      hopefully more useful. See :help 'NERDTreeStatusline'
1255
-    Bugfixes:
1256
-    - make the hijack netrw functionality work when vim is started with "vim
1257
-      <some dir>" (thanks to Alf Mikula for the patch).
1258
-    - fix a bug where the CWD wasnt being changed for some operations even when
1259
-      NERDTreeChDirMode==2 (thanks to Lucas S. Buchala)
1260
-    - add -bar to all the nerd tree :commands so they can chain with other
1261
-      :commands (thanks to tpope)
1262
-    - fix bugs when ignorecase was set (thanks to nach)
1263
-    - fix a bug with the relative path code (thanks to nach)
1264
-    - fix a bug where doing a :cd would cause :NERDTreeToggle to fail (thanks nach)
1265
-
1266
-
1267
-3.0.1
1268
-    Bugfixes:
1269
-    - fix bugs with :NERDTreeToggle and :NERDTreeMirror when 'hidden
1270
-      was not set
1271
-    - fix a bug where :NERDTree <path> would fail if <path> was relative and
1272
-      didnt start with a ./ or ../  Thanks to James Kanze.
1273
-    - make the q mapping work with secondary (:e <dir>  style) trees,
1274
-      thanks to jamessan
1275
-    - fix a bunch of small bugs with secondary trees
1276
-
1277
-    More insane refactoring.
1278
-
1279
-3.0.0
1280
-    - hijack netrw so that doing an :edit <directory>  will put a NERD tree in
1281
-      the window rather than a netrw browser. See :help 'NERDTreeHijackNetrw'
1282
-    - allow sharing of trees across tabs, see :help :NERDTreeMirror
1283
-    - remove "top" and "bottom" as valid settings for NERDTreeWinPos
1284
-    - change the '<tab>' mapping to 'i'
1285
-    - change the 'H' mapping to 'I'
1286
-    - lots of refactoring
1287
-
1288
-==============================================================================
1289
-7. Credits                                                   *NERDTreeCredits*
1290
-
1291
-Thanks to the following people for testing, bug reports, ideas etc. Without
1292
-you I probably would have got bored of the hacking the NERD tree and
1293
-just downloaded pr0n instead.
1294
-
1295
-    Tim Carey-Smith (halorgium)
1296
-    Vigil
1297
-    Nick Brettell
1298
-    Thomas Scott Urban
1299
-    Terrance Cohen
1300
-    Yegappan Lakshmanan
1301
-    Jason Mills
1302
-    Michael Geddes (frogonwheels)
1303
-    Yu Jun
1304
-    Michael Madsen
1305
-    AOYAMA Shotaro
1306
-    Zhang Weiwu
1307
-    Niels Aan de Brugh
1308
-    Olivier Yiptong
1309
-    Zhang Shuhan
1310
-    Cory Echols
1311
-    Piotr Czachur
1312
-    Yuan Jiang
1313
-    Matan Nassau
1314
-    Maxim Kim
1315
-    Charlton Wang
1316
-    Matt Wozniski (godlygeek)
1317
-    knekk
1318
-    Sean Chou
1319
-    Ryan Penn
1320
-    Simon Peter Nicholls
1321
-    Michael Foobar
1322
-    Tomasz Chomiuk
1323
-    Denis Pokataev
1324
-    Tim Pope (tpope)
1325
-    James Kanze
1326
-    James Vega (jamessan)
1327
-    Frederic Chanal (nach)
1328
-    Alf Mikula
1329
-    Lucas S. Buchala
1330
-    Curtis Harvey
1331
-    Guillaume Duranceau
1332
-    Richard Hart (hates)
1333
-    Doug McInnes
1334
-    Stefan Ritter
1335
-    Rémi Prévost
1336
-    Victor Gonzalez
1337
-    Stephan Baumeister
1338
-    Ricky
1339
-    jfilip1024
1340
-    Chris Chambers
1341
-    Vitaly Bogdanov
1342
-    Patrick O'Loughlin (paddyoloughlin)
1343
-    Cam Thompson (camthompson)
1344
-    Marcin Kulik (sickill)
1345
-    Steve DeWald (sdewald)
1346
-    Ivan Necas (iNecas)
1347
-    George Ang (gnap)
1348
-    Evan Coury (EvanDotPro)
1349
-    Andrew Radev (AndrewRadev)
1350
-    Matt Gauger (mathias)
1351
-    Scott Stevenson (scottstvnsn)
1352
-    Anderson Freitas (andersonfreitas)
1353
-    Kamil K. Lemański (kml)
1354
-    Yehuda Katz (wycats)
1355
-    Min-Young Wu (minyoung)
1356
-    Benjamin Geiger (benjamingeiger)
1357
-
1358
-==============================================================================
1359
-8. License                                                   *NERDTreeLicense*
1360
-
1361
-The NERD tree is released under the wtfpl.
1362
-See http://sam.zoy.org/wtfpl/COPYING.
... ...
@@ -1,41 +0,0 @@
1
-" ============================================================================
2
-" File:        exec_menuitem.vim
3
-" Description: plugin for NERD Tree that provides an execute file menu item
4
-" Maintainer:  Martin Grenfell <martin.grenfell at gmail dot com>
5
-" Last Change: 22 July, 2009
6
-" License:     This program is free software. It comes without any warranty,
7
-"              to the extent permitted by applicable law. You can redistribute
8
-"              it and/or modify it under the terms of the Do What The Fuck You
9
-"              Want To Public License, Version 2, as published by Sam Hocevar.
10
-"              See http://sam.zoy.org/wtfpl/COPYING for more details.
11
-"
12
-" ============================================================================
13
-if exists("g:loaded_nerdtree_exec_menuitem")
14
-    finish
15
-endif
16
-let g:loaded_nerdtree_exec_menuitem = 1
17
-
18
-call NERDTreeAddMenuItem({
19
-            \ 'text': '(!)Execute file',
20
-            \ 'shortcut': '!',
21
-            \ 'callback': 'NERDTreeExecFile',
22
-            \ 'isActiveCallback': 'NERDTreeExecFileActive' })
23
-
24
-function! NERDTreeExecFileActive()
25
-    let node = g:NERDTreeFileNode.GetSelected()
26
-    return !node.path.isDirectory && node.path.isExecutable
27
-endfunction
28
-
29
-function! NERDTreeExecFile()
30
-    let treenode = g:NERDTreeFileNode.GetSelected()
31
-    echo "==========================================================\n"
32
-    echo "Complete the command to execute (add arguments etc):\n"
33
-    let cmd = treenode.path.str({'escape': 1})
34
-    let cmd = input(':!', cmd . ' ')
35
-
36
-    if cmd != ''
37
-        exec ':!' . cmd
38
-    else
39
-        echo "Aborted"
40
-    endif
41
-endfunction
... ...
@@ -1,262 +0,0 @@
1
-" ============================================================================
2
-" File:        fs_menu.vim
3
-" Description: plugin for the NERD Tree that provides a file system menu
4
-" Maintainer:  Martin Grenfell <martin.grenfell at gmail dot com>
5
-" Last Change: 17 July, 2009
6
-" License:     This program is free software. It comes without any warranty,
7
-"              to the extent permitted by applicable law. You can redistribute
8
-"              it and/or modify it under the terms of the Do What The Fuck You
9
-"              Want To Public License, Version 2, as published by Sam Hocevar.
10
-"              See http://sam.zoy.org/wtfpl/COPYING for more details.
11
-"
12
-" ============================================================================
13
-if exists("g:loaded_nerdtree_fs_menu")
14
-    finish
15
-endif
16
-let g:loaded_nerdtree_fs_menu = 1
17
-
18
-"Automatically delete the buffer after deleting or renaming a file
19
-if !exists("g:NERDTreeAutoDeleteBuffer")
20
-    let g:NERDTreeAutoDeleteBuffer = 0
21
-endif
22
-
23
-call NERDTreeAddMenuItem({'text': '(a)dd a childnode', 'shortcut': 'a', 'callback': 'NERDTreeAddNode'})
24
-call NERDTreeAddMenuItem({'text': '(m)ove the current node', 'shortcut': 'm', 'callback': 'NERDTreeMoveNode'})
25
-call NERDTreeAddMenuItem({'text': '(d)elete the current node', 'shortcut': 'd', 'callback': 'NERDTreeDeleteNode'})
26
-
27
-if has("gui_mac") || has("gui_macvim") 
28
-    call NERDTreeAddMenuItem({'text': '(r)eveal in Finder the current node', 'shortcut': 'r', 'callback': 'NERDTreeRevealInFinder'})
29
-    call NERDTreeAddMenuItem({'text': '(o)pen the current node with system editor', 'shortcut': 'o', 'callback': 'NERDTreeExecuteFile'})
30
-    call NERDTreeAddMenuItem({'text': '(q)uicklook the current node', 'shortcut': 'q', 'callback': 'NERDTreeQuickLook'})
31
-endif
32
-
33
-if g:NERDTreePath.CopyingSupported()
34
-    call NERDTreeAddMenuItem({'text': '(c)opy the current node', 'shortcut': 'c', 'callback': 'NERDTreeCopyNode'})
35
-endif
36
-
37
-"FUNCTION: s:echo(msg){{{1
38
-function! s:echo(msg)
39
-    redraw
40
-    echomsg "NERDTree: " . a:msg
41
-endfunction
42
-
43
-"FUNCTION: s:echoWarning(msg){{{1
44
-function! s:echoWarning(msg)
45
-    echohl warningmsg
46
-    call s:echo(a:msg)
47
-    echohl normal
48
-endfunction
49
-
50
-"FUNCTION: s:promptToDelBuffer(bufnum, msg){{{1
51
-"prints out the given msg and, if the user responds by pushing 'y' then the
52
-"buffer with the given bufnum is deleted
53
-"
54
-"Args:
55
-"bufnum: the buffer that may be deleted
56
-"msg: a message that will be echoed to the user asking them if they wish to
57
-"     del the buffer
58
-function! s:promptToDelBuffer(bufnum, msg)
59
-    echo a:msg
60
-    if g:NERDTreeAutoDeleteBuffer || nr2char(getchar()) ==# 'y'
61
-        " 1. ensure that all windows which display the just deleted filename
62
-        " now display an empty buffer (so a layout is preserved).
63
-        " Is not it better to close single tabs with this file only ?
64
-        let s:originalTabNumber = tabpagenr()
65
-        let s:originalWindowNumber = winnr()
66
-        exec "tabdo windo if winbufnr(0) == " . a:bufnum . " | exec ':enew! ' | endif"
67
-        exec "tabnext " . s:originalTabNumber
68
-        exec s:originalWindowNumber . "wincmd w"
69
-        " 3. We don't need a previous buffer anymore
70
-        exec "bwipeout! " . a:bufnum
71
-    endif
72
-endfunction
73
-
74
-"FUNCTION: s:promptToRenameBuffer(bufnum, msg){{{1
75
-"prints out the given msg and, if the user responds by pushing 'y' then the
76
-"buffer with the given bufnum is replaced with a new one
77
-"
78
-"Args:
79
-"bufnum: the buffer that may be deleted
80
-"msg: a message that will be echoed to the user asking them if they wish to
81
-"     del the buffer
82
-function! s:promptToRenameBuffer(bufnum, msg, newFileName)
83
-    echo a:msg
84
-    if g:NERDTreeAutoDeleteBuffer || nr2char(getchar()) ==# 'y'
85
-        " 1. ensure that a new buffer is loaded
86
-        exec "badd " . a:newFileName
87
-        " 2. ensure that all windows which display the just deleted filename
88
-        " display a buffer for a new filename. 
89
-        let s:originalTabNumber = tabpagenr()
90
-        let s:originalWindowNumber = winnr()
91
-        exec "tabdo windo if winbufnr(0) == " . a:bufnum . " | exec ':e! " . a:newFileName . "' | endif"
92
-        exec "tabnext " . s:originalTabNumber
93
-        exec s:originalWindowNumber . "wincmd w"
94
-        " 3. We don't need a previous buffer anymore
95
-        exec "bwipeout! " . a:bufnum
96
-    endif
97
-endfunction
98
-"FUNCTION: NERDTreeAddNode(){{{1
99
-function! NERDTreeAddNode()
100
-    let curDirNode = g:NERDTreeDirNode.GetSelected()
101
-
102
-    let newNodeName = input("Add a childnode\n".
103
-                          \ "==========================================================\n".
104
-                          \ "Enter the dir/file name to be created. Dirs end with a '/'\n" .
105
-                          \ "", curDirNode.path.str() . g:NERDTreePath.Slash(), "file")
106
-
107
-    if newNodeName ==# ''
108
-        call s:echo("Node Creation Aborted.")
109
-        return
110
-    endif
111
-
112
-    try
113
-        let newPath = g:NERDTreePath.Create(newNodeName)
114
-        let parentNode = b:NERDTreeRoot.findNode(newPath.getParent())
115
-
116
-        let newTreeNode = g:NERDTreeFileNode.New(newPath)
117
-        if parentNode.isOpen || !empty(parentNode.children)
118
-            call parentNode.addChild(newTreeNode, 1)
119
-            call NERDTreeRender()
120
-            call newTreeNode.putCursorHere(1, 0)
121
-        endif
122
-    catch /^NERDTree/
123
-        call s:echoWarning("Node Not Created.")
124
-    endtry
125
-endfunction
126
-
127
-"FUNCTION: NERDTreeMoveNode(){{{1
128
-function! NERDTreeMoveNode()
129
-    let curNode = g:NERDTreeFileNode.GetSelected()
130
-    let newNodePath = input("Rename the current node\n" .
131
-                          \ "==========================================================\n" .
132
-                          \ "Enter the new path for the node:                          \n" .
133
-                          \ "", curNode.path.str(), "file")
134
-
135
-    if newNodePath ==# ''
136
-        call s:echo("Node Renaming Aborted.")
137
-        return
138
-    endif
139
-
140
-    try
141
-        let bufnum = bufnr(curNode.path.str())
142
-
143
-        call curNode.rename(newNodePath)
144
-        call NERDTreeRender()
145
-
146
-        "if the node is open in a buffer, ask the user if they want to
147
-        "close that buffer
148
-        if bufnum != -1
149
-            let prompt = "\nNode renamed.\n\nThe old file is open in buffer ". bufnum . (bufwinnr(bufnum) ==# -1 ? " (hidden)" : "") .". Replace this buffer with a new file? (yN)"
150
-            call s:promptToRenameBuffer(bufnum,  prompt, newNodePath)
151
-        endif
152
-
153
-        call curNode.putCursorHere(1, 0)
154
-
155
-        redraw
156
-    catch /^NERDTree/
157
-        call s:echoWarning("Node Not Renamed.")
158
-    endtry
159
-endfunction
160
-
161
-" FUNCTION: NERDTreeDeleteNode() {{{1
162
-function! NERDTreeDeleteNode()
163
-    let currentNode = g:NERDTreeFileNode.GetSelected()
164
-    let confirmed = 0
165
-
166
-    if currentNode.path.isDirectory
167
-        let choice =input("Delete the current node\n" .
168
-                         \ "==========================================================\n" .
169
-                         \ "STOP! To delete this entire directory, type 'yes'\n" .
170
-                         \ "" . currentNode.path.str() . ": ")
171
-        let confirmed = choice ==# 'yes'
172
-    else
173
-        echo "Delete the current node\n" .
174
-           \ "==========================================================\n".
175
-           \ "Are you sure you wish to delete the node:\n" .
176
-           \ "" . currentNode.path.str() . " (yN):"
177
-        let choice = nr2char(getchar())
178
-        let confirmed = choice ==# 'y'
179
-    endif
180
-
181
-
182
-    if confirmed
183
-        try
184
-            call currentNode.delete()
185
-            call NERDTreeRender()
186
-
187
-            "if the node is open in a buffer, ask the user if they want to
188
-            "close that buffer
189
-            let bufnum = bufnr(currentNode.path.str())
190
-            if buflisted(bufnum)
191
-                let prompt = "\nNode deleted.\n\nThe file is open in buffer ". bufnum . (bufwinnr(bufnum) ==# -1 ? " (hidden)" : "") .". Delete this buffer? (yN)"
192
-                call s:promptToDelBuffer(bufnum, prompt)
193
-            endif
194
-
195
-            redraw
196
-        catch /^NERDTree/
197
-            call s:echoWarning("Could not remove node")
198
-        endtry
199
-    else
200
-        call s:echo("delete aborted")
201
-    endif
202
-
203
-endfunction
204
-
205
-" FUNCTION: NERDTreeCopyNode() {{{1
206
-function! NERDTreeCopyNode()
207
-    let currentNode = g:NERDTreeFileNode.GetSelected()
208
-    let newNodePath = input("Copy the current node\n" .
209
-                          \ "==========================================================\n" .
210
-                          \ "Enter the new path to copy the node to:                   \n" .
211
-                          \ "", currentNode.path.str(), "file")
212
-
213
-    if newNodePath != ""
214
-        "strip trailing slash
215
-        let newNodePath = substitute(newNodePath, '\/$', '', '')
216
-
217
-        let confirmed = 1
218
-        if currentNode.path.copyingWillOverwrite(newNodePath)
219
-            call s:echo("Warning: copying may overwrite files! Continue? (yN)")
220
-            let choice = nr2char(getchar())
221
-            let confirmed = choice ==# 'y'
222
-        endif
223
-
224
-        if confirmed
225
-            try
226
-                let newNode = currentNode.copy(newNodePath)
227
-                if !empty(newNode)
228
-                    call NERDTreeRender()
229
-                    call newNode.putCursorHere(0, 0)
230
-                endif
231
-            catch /^NERDTree/
232
-                call s:echoWarning("Could not copy node")
233
-            endtry
234
-        endif
235
-    else
236
-        call s:echo("Copy aborted.")
237
-    endif
238
-    redraw
239
-endfunction
240
-
241
-function! NERDTreeQuickLook()
242
-    let treenode = g:NERDTreeFileNode.GetSelected()
243
-    if treenode != {}
244
-        call system("qlmanage -p 2>/dev/null '" . treenode.path.str() . "'")
245
-    endif
246
-endfunction
247
-
248
-function! NERDTreeRevealInFinder()
249
-    let treenode = g:NERDTreeFileNode.GetSelected()
250
-    if treenode != {}
251
-        let x = system("open -R '" . treenode.path.str() . "'")
252
-    endif
253
-endfunction
254
-
255
-function! NERDTreeExecuteFile()
256
-    let treenode = g:NERDTreeFileNode.GetSelected()
257
-    if treenode != {}
258
-        let x = system("open '" . treenode.path.str() . "'")
259
-    endif
260
-endfunction
261
-
262
-" vim: set sw=4 sts=4 et fdm=marker:
... ...
@@ -1,4444 +0,0 @@
1
-" ============================================================================
2
-" File:        NERD_tree.vim
3
-" Description: vim global plugin that provides a nice tree explorer
4
-" Maintainer:  Martin Grenfell <martin.grenfell at gmail dot com>
5
-" Last Change: 28 December, 2011
6
-" License:     This program is free software. It comes without any warranty,
7
-"              to the extent permitted by applicable law. You can redistribute
8
-"              it and/or modify it under the terms of the Do What The Fuck You
9
-"              Want To Public License, Version 2, as published by Sam Hocevar.
10
-"              See http://sam.zoy.org/wtfpl/COPYING for more details.
11
-"
12
-" ============================================================================
13
-let s:NERD_tree_version = '4.2.0'
14
-
15
-" SECTION: Script init stuff {{{1
16
-"============================================================
17
-if exists("loaded_nerd_tree")
18
-    finish
19
-endif
20
-if v:version < 700
21
-    echoerr "NERDTree: this plugin requires vim >= 7. DOWNLOAD IT! You'll thank me later!"
22
-    finish
23
-endif
24
-let loaded_nerd_tree = 1
25
-
26
-"for line continuation - i.e dont want C in &cpo
27
-let s:old_cpo = &cpo
28
-set cpo&vim
29
-
30
-let s:running_windows = has("win16") || has("win32") || has("win64")
31
-
32
-"Function: s:initVariable() function {{{2
33
-"This function is used to initialise a given variable to a given value. The
34
-"variable is only initialised if it does not exist prior
35
-"
36
-"Args:
37
-"var: the name of the var to be initialised
38
-"value: the value to initialise var to
39
-"
40
-"Returns:
41
-"1 if the var is set, 0 otherwise