Try to line up tab header with columns.
[profile.git] / .vim / doc / NERD_tree.txt
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 filesystem menu...............|NERDTreeFilesysMenu|
31     3.Options.................................|NERDTreeOptions|
32         3.1.Option summary....................|NERDTreeOptionSummary|
33         3.2.Option details....................|NERDTreeOptionDetails|
34     4.Hacking the NERD tree...................|NERDTreeHacking|
35     5.About...................................|NERDTreeAbout|
36     6.Changelog...............................|NERDTreeChangelog|
37     7.Credits.................................|NERDTreeCredits|
38     8.License.................................|NERDTreeLicense|
39
40 ==============================================================================
41 1. Intro                                                            *NERDTree*
42
43 What is this "NERD tree"??
44
45 The NERD tree allows you to explore your filesystem and to open files and
46 directories. It presents the filesystem to you in the form of a tree which you
47 manipulate with the keyboard and/or mouse. It also allows you to perform
48 simple filesystem operations.
49
50 The following features and functionality are provided by the NERD tree:
51     * Files and directories are displayed in a hierarchical tree structure
52     * Different highlighting is provided for the following types of nodes:
53         * files
54         * directories
55         * sym-links
56         * windows .lnk files
57         * read-only files
58         * executable files
59     * Many (customisable) mappings are provided to manipulate the tree:
60         * Mappings to open/close/explore directory nodes
61         * Mappings to open files in new/existing windows/tabs
62         * Mappings to change the current root of the tree
63         * Mappings to navigate around the tree
64         * ...
65     * Directories and files can be bookmarked.
66     * Most NERD tree navigation can also be done with the mouse
67     * Filtering of tree content (can be toggled at runtime)
68         * custom file filters to prevent e.g. vim backup files being displayed
69         * optional displaying of hidden files (. files)
70         * files can be "turned off" so that only directories are displayed
71     * A textual filesystem menu is provided which allows you to
72       create/delete/move file and directory nodes as well as copy (for
73       supported OSs)
74     * The position and size of the NERD tree window can be customised
75     * The order in which the nodes in the tree are listed can be customised.
76     * A model of your filesystem is created/maintained as you explore it. This
77       has several advantages:
78         * All filesystem information is cached and is only re-read on demand
79         * If you revisit a part of the tree that you left earlier in your
80           session, the directory nodes will be opened/closed as you left them
81     * The script remembers the cursor position and window position in the NERD
82       tree so you can toggle it off (or just close the tree window) and then
83       reopen it (with NERDTreeToggle) the NERD tree window will appear exactly
84       as you left it
85     * You can have a separate NERD tree for each tab, share trees across tabs,
86       or a mix of both.
87     * By default the script overrides the default file browser (netw), so if
88       you :edit a directory a (slighly modified) NERD tree will appear in the
89       current window
90
91 ==============================================================================
92 2. Functionality provided                              *NERDTreeFunctionality*
93
94 ------------------------------------------------------------------------------
95 2.1. Global Commands                                  *NERDTreeGlobalCommands*
96
97 :NERDTree [<start-directory> | <bookmark>]                         *:NERDTree*
98     Opens a fresh NERD tree. The root of the tree depends on the argument
99     given. There are 3 cases: If no argument is given, the current directory
100     will be used.  If a directory is given, that will be used. If a bookmark
101     name is given, the corresponding directory will be used.  For example: >
102         :NERDTree /home/marty/vim7/src
103         :NERDTree foo   (foo is the name of a bookmark)
104 <
105 :NERDTreeFromBookmark <bookmark>                       *:NERDTreeFromBookmark*
106     Opens a fresh NERD tree with the root initialized to the dir for
107     <bookmark>.  This only reason to use this command over :NERDTree is for
108     the completion (which is for bookmarks rather than directories).
109
110 :NERDTreeToggle [<start-directory> | <bookmark>]             *:NERDTreeToggle*
111     If a NERD tree already exists for this tab, it is reopened and rendered
112     again.  If no NERD tree exists for this tab then this command acts the
113     same as the |:NERDTree| command.
114
115 :NERDTreeMirror                                              *:NERDTreeMirror*
116     Shares an existing NERD tree, from another tab, in the current tab.
117     Changes made to one tree are reflected in both as they are actually the
118     same buffer.
119
120     If only one other NERD tree exists, that tree is automatically mirrored. If
121     more than one exists, the script will ask which tree to mirror.
122
123 :NERDTreeClose                                                *:NERDTreeClose*
124     Close the NERD tree in this tab.
125
126 ------------------------------------------------------------------------------
127 2.2. Bookmarks                                             *NERDTreeBookmarks*
128
129 Bookmarks in the NERD tree are a way to tag files or directories of interest.
130 For example, you could use bookmarks to tag all of your project directories.
131
132 ------------------------------------------------------------------------------
133 2.2.1. The Bookmark Table                              *NERDTreeBookmarkTable*
134
135 If the bookmark table is active (see |NERDTree-B| and
136 |'NERDTreeShowBookmarks'|), it will be rendered above the tree. You can double
137 click bookmarks or use the |NERDTree-o| mapping to activate them. See also,
138 |NERDTree-t| and |NERDTree-T|
139
140 ------------------------------------------------------------------------------
141 2.2.2. Bookmark commands                            *NERDTreeBookmarkCommands*
142
143 Note that the following commands are only available in the NERD tree buffer.
144
145 :Bookmark <name>
146     Bookmark the current node as <name>. If there is already a <name>
147     bookmark, it is overwritten. <name> must not contain spaces.
148
149 :BookmarkToRoot <bookmark>
150     Make the directory corresponding to <bookmark> the new root. If a treenode
151     corresponding to <bookmark> is already cached somewhere in the tree then
152     the current tree will be used, otherwise a fresh tree will be opened.
153     Note that if <bookmark> points to a file then its parent will be used
154     instead.
155
156 :RevealBookmark <bookmark>
157     If the node is cached under the current root then it will be revealed
158     (i.e. directory nodes above it will be opened) and the cursor will be
159     placed on it.
160
161 :OpenBookmark <bookmark>
162     <bookmark> must point to a file. The file is opened as though |NERDTree-o|
163     was applied. If the node is cached under the current root then it will be
164     revealed and the cursor will be placed on it.
165
166 :ClearBookmarks [<bookmarks>]
167     Remove all the given bookmarks. If no bookmarks are given then remove all
168     bookmarks on the current node.
169
170 :ClearAllBookmarks
171     Remove all bookmarks.
172
173 :ReadBookmarks
174     Re-read the bookmarks in the |'NERDTreeBookmarksFile'|.
175
176 See also |:NERDTree| and |:NERDTreeFromBookmark|.
177
178 ------------------------------------------------------------------------------
179 2.2.3. Invalid Bookmarks                            *NERDTreeInvalidBookmarks*
180
181 If invalid bookmarks are detected, the script will issue an error message and
182 the invalid bookmarks will become unavailable for use.
183
184 These bookmarks will still be stored in the bookmarks file (see
185 |'NERDTreeBookmarksFile'|), down the bottom. There will always be a blank line
186 after the valid bookmarks but before the invalid ones.
187
188 Each line in the bookmarks file represents one bookmark. The proper format is:
189 <bookmark name><space><full path to the bookmark location>
190
191 After you have corrected any invalid bookmarks, either restart vim, or go
192 :ReadBookmarks from the NERD tree window.
193
194 ------------------------------------------------------------------------------
195 2.3. NERD tree Mappings                                     *NERDTreeMappings*
196
197 Default  Description~                                             help-tag~
198 Key~
199
200 o.......Open files, directories and bookmarks....................|NERDTree-o|
201 go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
202 t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
203 T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
204 i.......Open selected file in a split window.....................|NERDTree-i|
205 gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
206 s.......Open selected file in a new vsplit.......................|NERDTree-s|
207 gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|
208 !.......Execute the current file.................................|NERDTree-!|
209 O.......Recursively open the selected directory..................|NERDTree-O|
210 x.......Close the current nodes parent...........................|NERDTree-x|
211 X.......Recursively close all children of the current node.......|NERDTree-X|
212 e.......Edit the current dif.....................................|NERDTree-e|
213
214 <CR>...............same as |NERDTree-o|.
215 double-click.......same as the |NERDTree-o| map.
216 middle-click.......same as |NERDTree-i| for files, same as
217                    |NERDTree-e| for dirs.
218
219 D.......Delete the current bookmark .............................|NERDTree-D|
220
221 P.......Jump to the root node....................................|NERDTree-P|
222 p.......Jump to current nodes parent.............................|NERDTree-p|
223 K.......Jump up inside directories at the current tree depth.....|NERDTree-K|
224 J.......Jump down inside directories at the current tree depth...|NERDTree-J|
225 <C-J>...Jump down to the next sibling of the current directory...|NERDTree-C-J|
226 <C-K>...Jump up to the previous sibling of the current directory.|NERDTree-C-K|
227
228 C.......Change the tree root to the selected dir.................|NERDTree-C|
229 u.......Move the tree root up one directory......................|NERDTree-u|
230 U.......Same as 'u' except the old root node is left open........|NERDTree-U|
231 r.......Recursively refresh the current directory................|NERDTree-r|
232 R.......Recursively refresh the current root.....................|NERDTree-R|
233 m.......Display the filesystem menu..............................|NERDTree-m|
234 cd......Change the CWD to the dir of the selected node...........|NERDTree-cd|
235
236 I.......Toggle whether hidden files displayed....................|NERDTree-I|
237 f.......Toggle whether the file filters are used.................|NERDTree-f|
238 F.......Toggle whether files are displayed.......................|NERDTree-F|
239 B.......Toggle whether the bookmark table is displayed...........|NERDTree-B|
240
241 q.......Close the NERDTree window................................|NERDTree-q|
242 ?.......Toggle the display of the quick help.....................|NERDTree-?|
243
244 ------------------------------------------------------------------------------
245                                                                   *NERDTree-o*
246 Default key: o
247 Map option: NERDTreeMapActivateNode
248 Applies to: files and directories.
249
250 If a file node is selected, it is opened in the previous window.
251
252 If a directory is selected it is opened or closed depending on its current
253 state.
254
255 If a bookmark that links to a directory is selected then that directory
256 becomes the new root.
257
258 If a bookmark that links to a file is selected then that file is opened in the
259 previous window.
260
261 ------------------------------------------------------------------------------
262                                                                  *NERDTree-go*
263 Default key: go
264 Map option: None
265 Applies to: files.
266
267 If a file node is selected, it is opened in the previous window, but the
268 cursor does not move.
269
270 The key combo for this mapping is always "g" + NERDTreeMapActivateNode (see
271 |NERDTree-o|).
272
273 ------------------------------------------------------------------------------
274                                                                   *NERDTree-t*
275 Default key: t
276 Map option: NERDTreeMapOpenInTab
277 Applies to: files and directories.
278
279 Opens the selected file in a new tab. If a directory is selected, a fresh
280 NERD Tree for that directory is opened in a new tab.
281
282 If a bookmark which points to a directory is selected, open a NERD tree for
283 that directory in a new tab. If the bookmark points to a file, open that file
284 in a new tab.
285
286 ------------------------------------------------------------------------------
287                                                                   *NERDTree-T*
288 Default key: T
289 Map option: NERDTreeMapOpenInTabSilent
290 Applies to: files and directories.
291
292 The same as |NERDTree-t| except that the focus is kept in the current tab.
293
294 ------------------------------------------------------------------------------
295                                                                   *NERDTree-i*
296 Default key: i
297 Map option: NERDTreeMapOpenSplit
298 Applies to: files.
299
300 Opens the selected file in a new split window and puts the cursor in the new
301 window.
302
303 ------------------------------------------------------------------------------
304                                                                  *NERDTree-gi*
305 Default key: gi
306 Map option: None
307 Applies to: files.
308
309 The same as |NERDTree-i| except that the cursor is not moved.
310
311 The key combo for this mapping is always "g" + NERDTreeMapOpenSplit (see
312 |NERDTree-i|).
313
314 ------------------------------------------------------------------------------
315                                                                   *NERDTree-s*
316 Default key: s
317 Map option: NERDTreeMapOpenVSplit
318 Applies to: files.
319
320 Opens the selected file in a new vertically split window and puts the cursor in
321 the new window.
322
323 ------------------------------------------------------------------------------
324                                                                  *NERDTree-gs*
325 Default key: gs
326 Map option: None
327 Applies to: files.
328
329 The same as |NERDTree-s| except that the cursor is not moved.
330
331 The key combo for this mapping is always "g" + NERDTreeMapOpenVSplit (see
332 |NERDTree-s|).
333
334 ------------------------------------------------------------------------------
335                                                                   *NERDTree-!*
336 Default key: !
337 Map option: NERDTreeMapExecute
338 Applies to: files.
339
340 Executes the selected file, prompting for arguments first.
341
342 ------------------------------------------------------------------------------
343                                                                   *NERDTree-O*
344 Default key: O
345 Map option: NERDTreeMapOpenRecursively
346 Applies to: directories.
347
348 Recursively opens the selelected directory.
349
350 All files and directories are cached, but if a directory would not be
351 displayed due to file filters (see |'NERDTreeIgnore'| |NERDTree-f|) or the
352 hidden file filter (see |'NERDTreeShowHidden'|) then its contents are not
353 cached. This is handy, especially if you have .svn directories.
354
355 ------------------------------------------------------------------------------
356                                                                   *NERDTree-x*
357 Default key: x
358 Map option: NERDTreeMapCloseDir
359 Applies to: files and directories.
360
361 Closes the parent of the selected node.
362
363 ------------------------------------------------------------------------------
364                                                                   *NERDTree-X*
365 Default key: X
366 Map option: NERDTreeMapCloseChildren
367 Applies to: directories.
368
369 Recursively closes all children of the selected directory.
370
371 Tip: To quickly "reset" the tree, use |NERDTree-P| with this mapping.
372
373 ------------------------------------------------------------------------------
374                                                                   *NERDTree-e*
375 Default key: e
376 Map option: NERDTreeMapOpenExpl
377 Applies to: files and directories.
378
379 |:edit|s the selected directory, or the selected file's directory. This could
380 result in a NERD tree or a netrw being opened, depending on
381 |'NERDTreeHijackNetrw'|.
382
383 ------------------------------------------------------------------------------
384                                                                   *NERDTree-D*
385 Default key: D
386 Map option: NERDTreeMapDeleteBookmark
387 Applies to: lines in the bookmarks table
388
389 Deletes the currently selected bookmark.
390
391 ------------------------------------------------------------------------------
392                                                                   *NERDTree-P*
393 Default key: P
394 Map option: NERDTreeMapJumpRoot
395 Applies to: no restrictions.
396
397 Jump to the tree root.
398
399 ------------------------------------------------------------------------------
400                                                                   *NERDTree-p*
401 Default key: p
402 Map option: NERDTreeMapJumpParent
403 Applies to: files and directories.
404
405 Jump to the parent node of the selected node.
406
407 ------------------------------------------------------------------------------
408                                                                   *NERDTree-K*
409 Default key: K
410 Map option: NERDTreeMapJumpFirstChild
411 Applies to: files and directories.
412
413 Jump to the first child of the current nodes parent.
414
415 If the cursor is already on the first node then do the following:
416     * loop back thru the siblings of the current nodes parent until we find an
417       open dir with children
418     * go to the first child of that node
419
420 ------------------------------------------------------------------------------
421                                                                   *NERDTree-J*
422 Default key: J
423 Map option: NERDTreeMapJumpLastChild
424 Applies to: files and directories.
425
426 Jump to the last child of the current nodes parent.
427
428 If the cursor is already on the last node then do the following:
429     * loop forward thru the siblings of the current nodes parent until we find
430       an open dir with children
431     * go to the last child of that node
432
433 ------------------------------------------------------------------------------
434                                                                 *NERDTree-C-J*
435 Default key: <C-J>
436 Map option: NERDTreeMapJumpNextSibling
437 Applies to: files and directories.
438
439 Jump to the next sibling of the selected node.
440
441 ------------------------------------------------------------------------------
442                                                                 *NERDTree-C-K*
443 Default key: <C-K>
444 Map option: NERDTreeMapJumpPrevSibling
445 Applies to: files and directories.
446
447 Jump to the previous sibling of the selected node.
448
449 ------------------------------------------------------------------------------
450                                                                   *NERDTree-C*
451 Default key: C
452 Map option: NERDTreeMapChdir
453 Applies to: directories.
454
455 Make the selected directory node the new tree root. If a file is selected, its
456 parent is used.
457
458 ------------------------------------------------------------------------------
459                                                                   *NERDTree-u*
460 Default key: u
461 Map option: NERDTreeMapUpdir
462 Applies to: no restrictions.
463
464 Move the tree root up a dir (like doing a "cd ..").
465
466 ------------------------------------------------------------------------------
467                                                                   *NERDTree-U*
468 Default key: U
469 Map option: NERDTreeMapUpdirKeepOpen
470 Applies to: no restrictions.
471
472 Like |NERDTree-u| except that the old tree root is kept open.
473
474 ------------------------------------------------------------------------------
475                                                                   *NERDTree-r*
476 Default key: r
477 Map option: NERDTreeMapRefresh
478 Applies to: files and directories.
479
480 If a dir is selected, recursively refresh that dir, i.e. scan the filesystem
481 for changes and represent them in the tree.
482
483 If a file node is selected then the above is done on it's parent.
484
485 ------------------------------------------------------------------------------
486                                                                   *NERDTree-R*
487 Default key: R
488 Map option: NERDTreeMapRefreshRoot
489 Applies to: no restrictions.
490
491 Recursively refresh the tree root.
492
493 ------------------------------------------------------------------------------
494                                                                   *NERDTree-m*
495 Default key: m
496 Map option: NERDTreeMapFilesystemMenu
497 Applies to: files and directories.
498
499 Display the filesystem menu. See |NERDTreeFilesysMenu| for details.
500
501 ------------------------------------------------------------------------------
502                                                                  *NERDTree-cd*
503 Default key: cd
504 Map option: NERDTreeMapChdir
505 Applies to: files and directories.
506
507 Change vims current working directory to that of the selected node.
508
509 ------------------------------------------------------------------------------
510                                                                   *NERDTree-I*
511 Default key: I
512 Map option: NERDTreeMapToggleHidden
513 Applies to: no restrictions.
514
515 Toggles whether hidden files (i.e. "dot files") are displayed.
516
517 ------------------------------------------------------------------------------
518                                                                   *NERDTree-f*
519 Default key: f
520 Map option: NERDTreeMapToggleFilters
521 Applies to: no restrictions.
522
523 Toggles whether file filters are used. See |'NERDTreeIgnore'| for details.
524
525 ------------------------------------------------------------------------------
526                                                                   *NERDTree-F*
527 Default key: F
528 Map option: NERDTreeMapToggleFiles
529 Applies to: no restrictions.
530
531 Toggles whether file nodes are displayed.
532
533 ------------------------------------------------------------------------------
534                                                                   *NERDTree-B*
535 Default key: B
536 Map option: NERDTreeMapToggleBookmarks
537 Applies to: no restrictions.
538
539 Toggles whether the bookmarks table is displayed.
540
541 ------------------------------------------------------------------------------
542                                                                   *NERDTree-q*
543 Default key: q
544 Map option: NERDTreeMapQuit
545 Applies to: no restrictions.
546
547 Closes the NERDtree window.
548
549 ------------------------------------------------------------------------------
550                                                                   *NERDTree-?*
551 Default key: ?
552 Map option: NERDTreeMapHelp
553 Applies to: no restrictions.
554
555 Toggles whether the quickhelp is displayed.
556
557 ------------------------------------------------------------------------------
558 2.3. The filesystem menu                                 *NERDTreeFilesysMenu*
559
560 The purpose of the filesystem menu is to allow you to perform basic filesystem
561 operations quickly from the NERD tree rather than the console.
562
563 The filesystem menu can be accessed with 'm' mapping and has four supported
564 operations: >
565     1. Adding nodes.
566     2. Move nodes.
567     3. Deleting nodes.
568     3. Copying nodes.
569 <
570 1. Adding nodes:
571 To add a node move the cursor onto (or anywhere inside) the directory you wish
572 to create the new node inside. Select the 'add node' option from the
573 filesystem menu and type a filename. If the filename you type ends with a '/'
574 character then a directory will be created. Once the operation is completed,
575 the cursor is placed on the new node.
576
577 2. Move nodes:
578 To move/rename a node, put the cursor on it and select the 'move' option from
579 the filesystem menu.  Enter the new location for the node and it will be
580 moved.  If the old file is open in a buffer, you will be asked if you wish to
581 delete that buffer. Once the operation is complete the cursor will be placed
582 on the renamed node.
583
584 3. Deleting nodes:
585 To delete a node put the cursor on it and select the 'delete' option from the
586 filesystem menu. After confirmation the node will be deleted. If a file is
587 deleted but still exists as a buffer you will be given the option to delete
588 that buffer.
589
590 4. Copying nodes:
591 To copy a node put the cursor on it and select the 'copy' option from the
592 filesystem menu. Enter the new location and you're done. Note: copying is
593 currently only supported for *nix operating systems. If someone knows a
594 one line copying command for windows that doesnt require user confirmation
595 then id be grateful if you'd email me.
596
597 ==============================================================================
598 3. Customisation                                             *NERDTreeOptions*
599
600
601 ------------------------------------------------------------------------------
602 3.1. Customisation summary                             *NERDTreeOptionSummary*
603
604 The script provides the following options that can customise the behaviour the
605 NERD tree. These options should be set in your vimrc.
606
607 |'loaded_nerd_tree'|            Turns off the script.
608
609 |'NERDChristmasTree'|           Tells the NERD tree to make itself colourful
610                                 and pretty.
611
612 |'NERDTreeAutoCenter'|          Controls whether the NERD tree window centers
613                                 when the cursor moves within a specified
614                                 distance to the top/bottom of the window.
615 |'NERDTreeAutoCenterThreshold'| Controls the sensitivity of autocentering.
616
617 |'NERDTreeCaseSensitiveSort'|   Tells the NERD tree whether to be case
618                                 sensitive or not when sorting nodes.
619
620 |'NERDTreeChDirMode'|           Tells the NERD tree if/when it should change
621                                 vim's current working directory.
622
623 |'NERDTreeHighlightCursorline'| Tell the NERD tree whether to highlight the
624                                 current cursor line.
625
626 |'NERDTreeHijackNetrw'|         Tell the NERD tree whether to replace the netrw
627                                 autocommands for exploring local directories.
628
629 |'NERDTreeIgnore'|              Tells the NERD tree which files to ignore.
630
631 |'NERDTreeBookmarksFile'|       Where the bookmarks are stored.
632
633 |'NERDTreeMouseMode'|           Tells the NERD tree how to handle mouse
634                                 clicks.
635
636 |'NERDTreeQuitOnOpen'|          Closes the tree window after opening a file.
637
638 |'NERDTreeShowBookmarks'|       Tells the NERD tree whether to display the
639                                 bookmarks table on startup.
640
641 |'NERDTreeShowFiles'|           Tells the NERD tree whether to display files
642                                 in the tree on startup.
643
644 |'NERDTreeShowHidden'|          Tells the NERD tree whether to display hidden
645                                 files on startup.
646
647 |'NERDTreeShowLineNumbers'|     Tells the NERD tree whether to display line
648                                 numbers in the tree window.
649
650 |'NERDTreeSortOrder'|           Tell the NERD tree how to sort the nodes in
651                                 the tree.
652
653 |'NERDTreeStatusline'|          Set a statusline for NERD tree windows.
654
655 |'NERDTreeWinPos'|              Tells the script where to put the NERD tree
656                                 window.
657
658 |'NERDTreeWinSize'|             Sets the window size when the NERD tree is
659                                 opened.
660
661 ------------------------------------------------------------------------------
662 3.2. Customisation details                             *NERDTreeOptionDetails*
663
664 To enable any of the below options you should put the given line in your
665 ~/.vimrc
666
667                                                           *'loaded_nerd_tree'*
668 If this plugin is making you feel homicidal, it may be a good idea to turn it
669 off with this line in your vimrc: >
670     let loaded_nerd_tree=1
671 <
672 ------------------------------------------------------------------------------
673                                                          *'NERDChristmasTree'*
674 Values: 0 or 1.
675 Default: 1.
676
677 If this option is set to 1 then some extra syntax highlighting elements are
678 added to the nerd tree to make it more colourful.
679
680 Set it to 0 for a more vanilla looking tree.
681
682 ------------------------------------------------------------------------------
683                                                         *'NERDTreeAutoCenter'*
684 Values: 0 or 1.
685 Default: 1
686
687 If set to 1, the NERD tree window will center around the cursor if it moves to
688 within |'NERDTreeAutoCenterThreshold'| lines of the top/bottom of the window.
689
690 This is ONLY done in response to tree navigation mappings,
691 i.e. |NERDTree-J| |NERDTree-K| |NERDTree-C-J| |NERDTree-C-K| |NERDTree-p|
692 |NERDTree-P|
693
694 The centering is done with a |zz| operation.
695
696 ------------------------------------------------------------------------------
697                                                *'NERDTreeAutoCenterThreshold'*
698 Values: Any natural number.
699 Default: 3
700
701 This option controls the "sensitivity" of the NERD tree auto centering. See
702 |'NERDTreeAutoCenter'| for details.
703
704 ------------------------------------------------------------------------------
705                                                  *'NERDTreeCaseSensitiveSort'*
706 Values: 0 or 1.
707 Default: 0.
708
709 By default the NERD tree does not sort nodes case sensitively, i.e. nodes
710 could appear like this: >
711     bar.c
712     Baz.c
713     blarg.c
714     boner.c
715     Foo.c
716 <
717 But, if you set this option to 1 then the case of the nodes will be taken into
718 account. The above nodes would then be sorted like this: >
719     Baz.c
720     Foo.c
721     bar.c
722     blarg.c
723     boner.c
724 <
725 ------------------------------------------------------------------------------
726                                                          *'NERDTreeChDirMode'*
727
728 Values: 0, 1 or 2.
729 Default: 0.
730
731 Use this option to tell the script when (if at all) to change the current
732 working directory (CWD) for vim.
733
734 If it is set to 0 then the CWD is never changed by the NERD tree.
735
736 If set to 1 then the CWD is changed when the NERD tree is first loaded to the
737 directory it is initialized in. For example, if you start the NERD tree with >
738     :NERDTree /home/marty/foobar
739 <
740 then the CWD will be changed to /home/marty/foobar and will not be changed
741 again unless you init another NERD tree with a similar command.
742
743 If the option is set to 2 then it behaves the same as if set to 1 except that
744 the CWD is changed whenever the tree root is changed. For example, if the CWD
745 is /home/marty/foobar and you make the node for /home/marty/foobar/baz the new
746 root then the CWD will become /home/marty/foobar/baz.
747
748 ------------------------------------------------------------------------------
749                                                *'NERDTreeHighlightCursorline'*
750 Values: 0 or 1.
751 Default: 1.
752
753 If set to 1, the current cursor line in the NERD tree buffer will be
754 highlighted. This is done using the |'cursorline'| option.
755
756 ------------------------------------------------------------------------------
757                                                        *'NERDTreeHijackNetrw'*
758 Values: 0 or 1.
759 Default: 1.
760
761 If set to 1, doing a >
762     :edit <some directory>
763 <
764 will open up a "secondary" NERD tree instead of a netrw in the target window.
765
766 Secondary NERD trees behaves slighly different from a regular trees in the
767 following respects:
768     1. 'o' will open the selected file in the same window as the tree,
769        replacing it.
770     2. you can have as many secondary tree as you want in the same tab.
771
772 ------------------------------------------------------------------------------
773                                                             *'NERDTreeIgnore'*
774 Values: a list of regular expressions.
775 Default: ['\~$'].
776
777 This option is used to specify which files the NERD tree should ignore.  It
778 must be a list of regular expressions. When the NERD tree is rendered, any
779 files/dirs that match any of the regex's in 'NERDTreeIgnore' wont be
780 displayed.
781
782 For example if you put the following line in your vimrc: >
783     let NERDTreeIgnore=['\.vim$', '\~$']
784 <
785 then all files ending in .vim or ~ will be ignored.
786
787 Note: to tell the NERD tree not to ignore any files you must use the following
788 line: >
789     let NERDTreeIgnore=[]
790 <
791
792 The file filters can be turned on and off dynamically with the |NERDTree-f|
793 mapping.
794
795 ------------------------------------------------------------------------------
796                                                      *'NERDTreeBookmarksFile'*
797 Values: a path
798 Default: $HOME/.NERDTreeBookmarks
799
800 This is where bookmarks are saved. See |NERDTreeBookmarkCommands|.
801
802 ------------------------------------------------------------------------------
803                                                        *'NERDTreeMouseMode'*
804 Values: 1, 2 or 3.
805 Default: 1.
806
807 If set to 1 then a double click on a node is required to open it.
808 If set to 2 then a single click will open directory nodes, while a double
809 click will still be required for file nodes.
810 If set to 3 then a single click will open any node.
811
812 Note: a double click anywhere on a line that a tree node is on will
813 activate it, but all single-click activations must be done on name of the node
814 itself. For example, if you have the following node: >
815     | | |-application.rb
816 <
817 then (to single click activate it) you must click somewhere in
818 'application.rb'.
819
820 ------------------------------------------------------------------------------
821                                                         *'NERDTreeQuitOnOpen'*
822
823 Values: 0 or 1.
824 Default: 0
825
826 If set to 1, the NERD tree window will close after opening a file with the
827 |NERDTree-o| or |NERDTree-i| mappings.
828
829 ------------------------------------------------------------------------------
830                                                      *'NERDTreeShowBookmarks'*
831 Values: 0 or 1.
832 Default: 0.
833
834 If this option is set to 1 then the bookmarks table will be displayed.
835
836 This option can be toggled dynamically, per tree, with the |NERDTree-B|
837 mapping.
838
839 ------------------------------------------------------------------------------
840                                                          *'NERDTreeShowFiles'*
841 Values: 0 or 1.
842 Default: 1.
843
844 If this option is set to 1 then files are displayed in the NERD tree. If it is
845 set to 0 then only directories are displayed.
846
847 This option can be toggled dynamically, per tree, with the |NERDTree-F|
848 mapping and is useful for drastically shrinking the tree when you are
849 navigating to a different part of the tree.
850
851 ------------------------------------------------------------------------------
852                                                         *'NERDTreeShowHidden'*
853 Values: 0 or 1.
854 Default: 0.
855
856 This option tells vim whether to display hidden files by default. This option
857 can be dynamically toggled, per tree, with the |NERDTree-I| mapping.  Use one
858 of the follow lines to set this option: >
859     let NERDTreeShowHidden=0
860     let NERDTreeShowHidden=1
861 <
862
863 ------------------------------------------------------------------------------
864                                                    *'NERDTreeShowLineNumbers'*
865 Values: 0 or 1.
866 Default: 0.
867
868 This option tells vim whether to display line numbers for the NERD tree
869 window.  Use one of the follow lines to set this option: >
870     let NERDTreeShowLineNumbers=0
871     let NERDTreeShowLineNumbers=1
872 <
873
874 ------------------------------------------------------------------------------
875                                                          *'NERDTreeSortOrder'*
876 Values: a list of regular expressions.
877 Default: ['\/$', '*', '\.swp$',  '\.bak$', '\~$']
878
879 This option is set to a list of regular expressions which are used to
880 specify the order of nodes under their parent.
881
882 For example, if the option is set to: >
883     ['\.vim$', '\.c$', '\.h$', '*', 'foobar']
884 <
885 then all .vim files will be placed at the top, followed by all .c files then
886 all .h files. All files containing the string 'foobar' will be placed at the
887 end.  The star is a special flag: it tells the script that every node that
888 doesnt match any of the other regexps should be placed here.
889
890 If no star is present in 'NERDTreeSortOrder' then one is automatically
891 appended to the array.
892
893 The regex '\/$' should be used to match directory nodes.
894
895 After this sorting is done, the files in each group are sorted alphabetically.
896
897 Other examples: >
898     (1) ['*', '\/$']
899     (2) []
900     (3) ['\/$', '\.rb$', '\.php$', '*', '\.swp$',  '\.bak$', '\~$']
901 <
902 1. Directories will appear last, everything else will appear above.
903 2. Everything will simply appear in alphabetical order.
904 3. Dirs will appear first, then ruby and php. Swap files, bak files and vim
905    backup files will appear last with everything else preceding them.
906
907 ------------------------------------------------------------------------------
908                                                         *'NERDTreeStatusline'*
909 Values: Any valid statusline setting.
910 Default: %{b:NERDTreeRoot.path.strForOS(0)}
911
912 Tells the script what to use as the |'statusline'| setting for NERD tree
913 windows.
914
915 Note that the statusline is set using |:let-&| not |:set| so escaping spaces
916 isn't necessary.
917
918 Setting this option to -1 will will deactivate it so that your global
919 statusline setting is used instead.
920
921 ------------------------------------------------------------------------------
922                                                             *'NERDTreeWinPos'*
923 Values: "left" or "right"
924 Default: "left".
925
926 This option is used to determine where NERD tree window is placed on the
927 screen.
928
929 This option makes it possible to use two different explorer plugins
930 simultaneously. For example, you could have the taglist plugin on the left of
931 the window and the NERD tree on the right.
932
933 ------------------------------------------------------------------------------
934                                                            *'NERDTreeWinSize'*
935 Values: a positive integer.
936 Default: 31.
937
938 This option is used to change the size of the NERD tree when it is loaded.
939
940 ==============================================================================
941 4. Hacking the NERD tree                                     *NERDTreeHacking*
942
943 Public functions ~
944
945 The script provides 2 public functions for your hacking pleasure. Their
946 signatures are: >
947     function! NERDTreeGetCurrentNode()
948     function! NERDTreeGetCurrentPath()
949 <
950 The first returns the node object that the cursor is currently on, while the
951 second returns the corresponding path object.
952
953 This is probably a good time to mention that the script implements prototype
954 style OO. To see the functions that each class provides you can read look at
955 the code.
956
957 Use the node objects to manipulate the structure of the tree. Use the path
958 objects to access the files/directories the tree nodes represent.
959
960 The NERD tree filetype ~
961
962 NERD tree buffers have a filetype of "nerdtree". You can use this to hack the
963 NERD tree via autocommands (on |FileType|) or via an ftplugin.
964
965 For example, putting this code in ~/.vim/ftplugin/nerdtree.vim would override
966 the o mapping, making it open the selected node in a new gvim instance. >
967
968     nnoremap <silent> <buffer> o :call <sid>openInNewVimInstance()<cr>
969     function! s:openInNewVimInstance()
970         let p = NERDTreeGetCurrentPath()
971         if p != {}
972             silent exec "!gvim " . p.strForOS(1) . "&"
973         endif
974     endfunction
975 <
976 This way you can add new mappings or :commands or override any existing
977 mapping.
978
979 ==============================================================================
980 5. About                                                       *NERDTreeAbout*
981
982 The author of the NERD tree is a terrible terrible monster called Martyzilla
983 who gobbles up small children with milk and sugar for breakfast.
984
985 He can be reached at martin_grenfell at msn.com. He would love to hear from
986 you, so feel free to send him suggestions and/or comments about this plugin.
987 Don't be shy --- the worst he can do is slaughter you and stuff you in the
988 fridge for later ;)
989
990 The latest stable versions can be found at
991     http://www.vim.org/scripts/script.php?script_id=1658
992
993 The latest dev versions are on github
994     http://github.com/scrooloose/nerdtree
995
996
997 ==============================================================================
998 6. Changelog                                               *NERDTreeChangelog*
999
1000 3.1.1
1001     - fix a bug where a non-listed no-name buffer was getting created every
1002       time the tree windows was created, thanks to Derek Wyatt and owen1
1003     - make <CR> behave the same as the 'o' mapping
1004     - some helptag fixes in the doc, thanks strull
1005     - fix a bug when using :set nohidden and opening a file where the previous
1006       buf was modified. Thanks iElectric
1007     - other minor fixes
1008
1009 3.1.0
1010     New features:
1011     - add mappings to open files in a vsplit, see :help NERDTree-s and :help
1012       NERDTree-gs
1013     - make the statusline for the nerd tree window default to something
1014       hopefully more useful. See :help 'NERDTreeStatusline'
1015     Bugfixes:
1016     - make the hijack netrw functionality work when vim is started with "vim
1017       <some dir>" (thanks to Alf Mikula for the patch).
1018     - fix a bug where the CWD wasnt being changed for some operations even when
1019       NERDTreeChDirMode==2 (thanks to Lucas S. Buchala)
1020     - add -bar to all the nerd tree :commands so they can chain with other
1021       :commands (thanks to tpope)
1022     - fix bugs when ignorecase was set (thanks to nach)
1023     - fix a bug with the relative path code (thanks to nach)
1024     - fix a bug where doing a :cd would cause :NERDTreeToggle to fail (thanks nach)
1025
1026
1027 3.0.1
1028     Bugfixes:
1029     - fix bugs with :NERDTreeToggle and :NERDTreeMirror when 'hidden
1030       was not set
1031     - fix a bug where :NERDTree <path> would fail if <path> was relative and
1032       didnt start with a ./ or ../  Thanks to James Kanze.
1033     - make the q mapping work with secondary (:e <dir>  style) trees,
1034       thanks to jamessan
1035     - fix a bunch of small bugs with secondary trees
1036
1037     More insane refactoring.
1038
1039 3.0.0
1040     - hijack netrw so that doing an :edit <directory>  will put a NERD tree in
1041       the window rather than a netrw browser. See :help 'NERDTreeHijackNetrw'
1042     - allow sharing of trees across tabs, see :help :NERDTreeMirror
1043     - remove "top" and "bottom" as valid settings for NERDTreeWinPos
1044     - change the '<tab>' mapping to 'i'
1045     - change the 'H' mapping to 'I'
1046     - lots of refactoring
1047
1048 ==============================================================================
1049 7. Credits                                                   *NERDTreeCredits*
1050
1051 Thanks to the following people for testing, bug reports, ideas etc. Without
1052 you I probably would have got bored of the hacking the NERD tree and
1053 just downloaded pr0n instead.
1054
1055     Tim Carey-Smith (halorgium)
1056     Vigil
1057     Nick Brettell
1058     Thomas Scott Urban
1059     Terrance Cohen
1060     Yegappan Lakshmanan
1061     Jason Mills
1062     Michael Geddes (frogonwheels)
1063     Yu Jun
1064     Michael Madsen
1065     AOYAMA Shotaro
1066     Zhang Weiwu
1067     Niels Aan de Brugh
1068     Olivier Yiptong
1069     Zhang Shuhan
1070     Cory Echols
1071     Piotr Czachur
1072     Yuan Jiang
1073     Matan Nassau
1074     Maxim Kim
1075     Charlton Wang
1076     Matt Wozniski (godlygeek)
1077     knekk
1078     Sean Chou
1079     Ryan Penn
1080     Simon Peter Nicholls
1081     Michael Foobar
1082     Tomasz Chomiuk
1083     Denis Pokataev
1084     Tim Pope (tpope)
1085     James Kanze
1086     James Vega (jamessan)
1087     Frederic Chanal (nach)
1088     Alf Mikula
1089     Lucas S. Buchala
1090
1091 ==============================================================================
1092 8. License                                                   *NERDTreeLicense*
1093
1094 The NERD tree is released under the wtfpl.
1095 See http://sam.zoy.org/wtfpl/COPYING.