Compare commits

..

55 Commits

Author SHA1 Message Date
Martin Grenfell
6f24013463 switch to version 3.0.0 2008-12-29 14:55:44 +13:00
Martin Grenfell
d508c231b5 update quickhelp for the 'e' mapping 2008-12-29 14:44:53 +13:00
Martin Grenfell
8f7e2bb98a update changelog for version 3.0.0 2008-12-27 14:43:45 +13:00
Martin Grenfell
39fc42d1cf change the H mapping (toggle hidden files) to I 2008-12-27 11:34:15 +13:00
Martin Grenfell
7f6603ea4a update the doc for the e mapping 2008-12-25 10:23:42 +13:00
Martin Grenfell
3b1289ba40 bugfix for the e mapping
if we were using e on the current dir (or a file in that dir) then we
would end up doing an ":edit" with no target. Now we use "." in
Path#strForEditCmd if it would resolve to an empty string
2008-12-25 10:10:56 +13:00
Martin Grenfell
6464cff113 fix a bug with the gi mapping 2008-12-25 09:51:25 +13:00
Martin Grenfell
4f5599e275 update the 'features' blurb in the doc intro 2008-12-24 18:05:16 +13:00
Martin Grenfell
f98a3f9eab bugfix with :NERDTreeMirror 2008-12-24 14:43:04 +13:00
Martin Grenfell
c9c67b5b67 add a help tag for :NERDTreeClose 2008-12-24 14:23:39 +13:00
Martin Grenfell
3803db5555 add doc for :NERDTreeMirror 2008-12-24 14:09:09 +13:00
Martin Grenfell
a33849ef9b change the way nerd tree buffers are named
Use a sequential numbering system instead of timestamps. This makes the
buffer names shorter and neater and easier on the eye when using
:NERDTreeMirror
2008-12-24 01:12:36 +13:00
Martin Grenfell
b09e0fbfa4 refactor the initNerdTreeMirror function 2008-12-24 01:12:21 +13:00
Martin Grenfell
402fea6902 make the NERDTreeMirror handler smarter 2008-12-24 01:12:05 +13:00
Martin Grenfell
589036f5c9 add NERDTreeMirror command and handler 2008-12-24 01:11:52 +13:00
Martin Grenfell
d3b2258acb update doc for hacking nerd tree 2008-12-22 23:33:38 +13:00
Martin Grenfell
6103a308af set ei=all for all wincmd calls 2008-12-20 00:25:45 +13:00
Martin Grenfell
8d20ae913a adjust the quickhelp for primary vs secondary trees 2008-12-18 23:23:48 +13:00
Martin Grenfell
9fc7fb8d51 make the throw/catch code uniform and consistent 2008-12-18 13:25:30 +13:00
Martin Grenfell
6da7f317a3 when in a secondary tree, just use :split for the 'i' mapping 2008-12-18 12:55:06 +13:00
Martin Grenfell
d0d755ff87 ignore errors when removing netrw autocmds if they dont exist 2008-12-17 23:31:59 +13:00
Martin Grenfell
56b5446eaf change the <tab> mapping to i 2008-12-17 23:28:20 +13:00
Martin Grenfell
88020835d6 make the nerd tree only appear on the left or right
remove "top" and "bottom" as valid settings for NERDTreeWinPos
2008-12-17 23:22:43 +13:00
Martin Grenfell
d4b78be306 doc the NERDTreeHijackNetrw option 2008-12-17 23:13:13 +13:00
Martin Grenfell
5ff836ed26 clean up the netrwhijack code and make an option to disable it 2008-12-17 20:55:50 +13:00
Martin Grenfell
6b4dca7361 put the base nerd tree autocmds in an augroup 2008-12-17 20:24:08 +13:00
Martin Grenfell
7ac998fafc bugfix when creating a fresh tree for a tab 2008-12-14 23:05:43 +13:00
Martin Grenfell
888934a3be make TreeFileNode#isRoot() assume a tree exists for current buf, not tab 2008-12-14 00:43:50 +13:00
Martin Grenfell
fb5ee9fbc2 assume the cursor is already on a tree window when doing an open-split 2008-12-14 00:43:50 +13:00
Martin Grenfell
b2c56e94c9 fix for the preview mappings 2008-12-14 00:43:50 +13:00
Martin Grenfell
3e5faf9c56 hijack netrw 2008-12-14 00:43:50 +13:00
Martin Grenfell
b0297c5c91 use buffer level variables instead of tab lvl 2008-12-14 00:43:50 +13:00
Martin Grenfell
9aba1c17f6 switch to version 2.14.3 2008-12-13 11:29:30 +13:00
Martin Grenfell
0fc5d3f656 update changelog and credits 2008-12-13 11:29:21 +13:00
Martin Grenfell
729abf8e9b bugfix for read only node highlighting
previously, it wasnt highlighting the leading non-alphanumeric bits of RO files like   _foo.bar
2008-12-07 12:05:00 +13:00
Martin Grenfell
96215c5da6 use reletive paths for edit commands if possible 2008-11-30 20:05:54 +13:00
Martin Grenfell
f4c455bc2f fix a typo 2008-11-29 00:11:23 +13:00
Martin Grenfell
22904e41de allow relative paths for :NERDTree commands 2008-11-29 00:07:23 +13:00
Martin Grenfell
d49c742daf use the cwd instead of the dir of the current file for :NERDTree 2008-11-29 00:06:59 +13:00
Martin Grenfell
a59a2f6177 switch to version 2.14.2 2008-10-29 20:19:43 +13:00
Martin Grenfell
2f399b9ba4 update changelog and credits 2008-10-29 20:19:43 +13:00
Martin Grenfell
4b61723952 rename and fix s:windowIsUsable() 2008-10-29 10:07:32 +13:00
Martin Grenfell
00ab690758 bugfix for doing :qa when a nerd tree is open in another tab 2008-10-28 21:03:39 +13:00
Martin Grenfell
d4b4d69469 when opening a file (with o), dont split unless there is no choice 2008-10-27 23:21:39 +13:00
Martin Grenfell
283559bd97 fix a bug where directories starting with + couldnt be opened 2008-10-19 23:06:32 +13:00
Martin Grenfell
38442b06d4 refactor code to find tree indent level 2008-10-19 23:06:09 +13:00
Martin Grenfell
ae0d744357 fix a backwards compatibility bug with maps
Do an unlet <old key> when over riding a method on a prototype object.
Some older versions of vim spaz out otherwise.

Note: i was using these unlets up until a few versions ago when the were
refactored out
2008-10-16 22:55:44 +13:00
Martin Grenfell
094074d8c6 correct version in changelog 2008-10-16 22:34:48 +13:00
Martin Grenfell
9b192b4be4 bump the version 2008-10-12 10:31:00 +13:00
Martin Grenfell
5fcdd03f12 refactor the help page slightly
put all the option help tags in single quotes
2008-10-01 23:17:34 +13:00
Martin Grenfell
d89dbd354a dont clobber &cpo 2008-10-01 23:17:33 +13:00
Martin Grenfell
ed273e108d minor refactor to Bookmark#toRoot() 2008-09-29 11:33:58 +13:00
Martin Grenfell
03dec4cde4 rename TreeFileNode#findOpenDirSiblingWithChildren
to TreeFileNode#findOpenDirSiblingWithVisibleChildren
2008-09-24 12:42:42 +12:00
Martin Grenfell
171c3825fa bug fix for TreeDirNode#hasVisibleChildren() 2008-09-24 12:42:15 +12:00
Martin Grenfell
be2e602efa make path.bookmarkNames private 2008-09-11 12:01:54 +12:00
2 changed files with 640 additions and 335 deletions

View File

@@ -31,7 +31,7 @@ CONTENTS *NERDTree-contents*
3.Options.................................|NERDTreeOptions| 3.Options.................................|NERDTreeOptions|
3.1 Option summary....................|NERDTreeOptionSummary| 3.1 Option summary....................|NERDTreeOptionSummary|
3.2 Option details....................|NERDTreeOptionDetails| 3.2 Option details....................|NERDTreeOptionDetails|
4.Public functions........................|NERDTreePublicFunctions| 4.Hacking the NERD tree...................|NERDTreeHacking|
5.TODO list...............................|NERDTreeTodo| 5.TODO list...............................|NERDTreeTodo|
6.The Author..............................|NERDTreeAuthor| 6.The Author..............................|NERDTreeAuthor|
7.Changelog...............................|NERDTreeChangelog| 7.Changelog...............................|NERDTreeChangelog|
@@ -65,7 +65,7 @@ The following features and functionality are provided by the NERD tree:
* ... * ...
* Directories and files can be bookmarked. * Directories and files can be bookmarked.
* Most NERD tree navigation can also be done with the mouse * Most NERD tree navigation can also be done with the mouse
* Dynamic customisation of tree content * Filtering of tree content (can be toggled at runtime)
* custom file filters to prevent e.g. vim backup files being displayed * custom file filters to prevent e.g. vim backup files being displayed
* optional displaying of hidden files (. files) * optional displaying of hidden files (. files)
* files can be "turned off" so that only directories are displayed * files can be "turned off" so that only directories are displayed
@@ -81,9 +81,13 @@ The following features and functionality are provided by the NERD tree:
session, the directory nodes will be opened/closed as you left them session, the directory nodes will be opened/closed as you left them
* The script remembers the cursor position and window position in the NERD * The script remembers the cursor position and window position in the NERD
tree so you can toggle it off (or just close the tree window) and then tree so you can toggle it off (or just close the tree window) and then
reopen it (with NERDTreeToggle) the NERD tree window will appear EXACTLY reopen it (with NERDTreeToggle) the NERD tree window will appear exactly
as you left it as you left it
* You can have a separate NERD tree for each tab * You can have a separate NERD tree for each tab, share trees across tabs,
or a mix of both.
* By default the script overrides the default file browser (netw), so if
you :edit a directory a (slighly modified) NERD tree will appear in the
current window
============================================================================== ==============================================================================
2. Functionality provided *NERDTreeFunctionality* 2. Functionality provided *NERDTreeFunctionality*
@@ -109,7 +113,15 @@ The following features and functionality are provided by the NERD tree:
again. If no NERD tree exists for this tab then this command acts the again. If no NERD tree exists for this tab then this command acts the
same as the |:NERDTree| command. same as the |:NERDTree| command.
:NERDTreeClose :NERDTreeMirror *:NERDTreeMirror*
Shares an existing NERD tree, from another tab, in the current tab.
Changes made to one tree are reflected in both as they are actually the
same buffer.
If only one other NERD tree exists, that tree is automatically mirrored. If
more than one exists, the script will ask which tree to mirror.
:NERDTreeClose *:NERDTreeClose*
Close the NERD tree in this tab. Close the NERD tree in this tab.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
@@ -122,7 +134,7 @@ For example, you could use bookmarks to tag all of your project directories.
2.2.1. The Bookmark Table *NERDTreeBookmarkTable* 2.2.1. The Bookmark Table *NERDTreeBookmarkTable*
If the bookmark table is active (see |NERDTree-B| and If the bookmark table is active (see |NERDTree-B| and
|NERDTreeShowBookmarks|), it will be rendered above the tree. You can double |'NERDTreeShowBookmarks'|), it will be rendered above the tree. You can double
click bookmarks or use the |NERDTree-o| mapping to activate them. See also, click bookmarks or use the |NERDTree-o| mapping to activate them. See also,
|NERDTree-t| and |NERDTree-T| |NERDTree-t| and |NERDTree-T|
@@ -160,7 +172,7 @@ Note that the following commands are only available in the NERD tree buffer.
Remove all bookmarks. Remove all bookmarks.
:ReadBookmarks :ReadBookmarks
Re-read the bookmarks in the |NERDTreeBookmarksFile|. Re-read the bookmarks in the |'NERDTreeBookmarksFile'|.
See also |:NERDTree| and |:NERDTreeFromBookmark|. See also |:NERDTree| and |:NERDTreeFromBookmark|.
@@ -171,7 +183,7 @@ If invalid bookmarks are detected, the script will issue an error message and
the invalid bookmarks will become unavailable for use. the invalid bookmarks will become unavailable for use.
These bookmarks will still be stored in the bookmarks file (see These bookmarks will still be stored in the bookmarks file (see
|NERDTreeBookmarksFile|), down the bottom. There will always be a blank line |'NERDTreeBookmarksFile'|), down the bottom. There will always be a blank line
after the valid bookmarks but before the invalid ones. after the valid bookmarks but before the invalid ones.
Each line in the bookmarks file represents one bookmark. The proper format is: Each line in the bookmarks file represents one bookmark. The proper format is:
@@ -190,16 +202,16 @@ o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go| go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t| t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T| T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
<tab>...Open selected file in a split window.....................|NERDTree-tab| i.......Open selected file in a split window.....................|NERDTree-i|
g<tab>..Same as <tab>, but leave the cursor on the NERDTree......|NERDTree-gtab| gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-i|
!.......Execute the current file.................................|NERDTree-!| !.......Execute the current file.................................|NERDTree-!|
O.......Recursively open the selected directory..................|NERDTree-O| O.......Recursively open the selected directory..................|NERDTree-O|
x.......Close the current nodes parent...........................|NERDTree-x| x.......Close the current nodes parent...........................|NERDTree-x|
X.......Recursively close all children of the current node.......|NERDTree-X| X.......Recursively close all children of the current node.......|NERDTree-X|
e.......Open a netrw for the current dir.........................|NERDTree-e| e.......Edit the current dif.....................................|NERDTree-e|
double-click.......same as the |NERDTree-o| map. double-click.......same as the |NERDTree-o| map.
middle-click.......same as |NERDTree-tab| for files, same as middle-click.......same as |NERDTree-i| for files, same as
|NERDTree-e| for dirs. |NERDTree-e| for dirs.
D.......Delete the current bookmark .............................|NERDTree-D| D.......Delete the current bookmark .............................|NERDTree-D|
@@ -219,7 +231,7 @@ R.......Recursively refresh the current root.....................|NERDTree-R|
m.......Display the filesystem menu..............................|NERDTree-m| m.......Display the filesystem menu..............................|NERDTree-m|
cd......Change the CWD to the dir of the selected node...........|NERDTree-cd| cd......Change the CWD to the dir of the selected node...........|NERDTree-cd|
H.......Toggle whether hidden files displayed....................|NERDTree-H| I.......Toggle whether hidden files displayed....................|NERDTree-I|
f.......Toggle whether the file filters are used.................|NERDTree-f| f.......Toggle whether the file filters are used.................|NERDTree-f|
F.......Toggle whether files are displayed.......................|NERDTree-F| F.......Toggle whether files are displayed.......................|NERDTree-F|
B.......Toggle whether the bookmark table is displayed...........|NERDTree-B| B.......Toggle whether the bookmark table is displayed...........|NERDTree-B|
@@ -278,8 +290,8 @@ Applies to: files and directories.
The same as |NERDTree-t| except that the focus is kept in the current tab. The same as |NERDTree-t| except that the focus is kept in the current tab.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTree-tab* *NERDTree-i*
Default key: <tab> Default key: i
Map option: NERDTreeMapOpenSplit Map option: NERDTreeMapOpenSplit
Applies to: files. Applies to: files.
@@ -287,15 +299,15 @@ Opens the selected file in a new split window and puts the cursor in the new
window. window.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTree-gtab* *NERDTree-gi*
Default key: g<tab> Default key: gi
Map option: None Map option: None
Applies to: files. Applies to: files.
The same as |NERDTree-tab| except that the cursor is not moved. The same as |NERDTree-i| except that the cursor is not moved.
The key combo for this mapping is always "g" + NERDTreeMapOpenSplit (see The key combo for this mapping is always "g" + NERDTreeMapOpenSplit (see
|NERDTree-tab|). |NERDTree-i|).
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTree-!* *NERDTree-!*
@@ -314,8 +326,8 @@ Applies to: directories.
Recursively opens the selelected directory. Recursively opens the selelected directory.
All files and directories are cached, but if a directory would not be All files and directories are cached, but if a directory would not be
displayed due to file filters (see |NERDTreeIgnore| |NERDTree-f|) or the displayed due to file filters (see |'NERDTreeIgnore'| |NERDTree-f|) or the
hidden file filter (see |NERDTreeShowHidden|) then its contents are not hidden file filter (see |'NERDTreeShowHidden'|) then its contents are not
cached. This is handy, especially if you have .svn directories. cached. This is handy, especially if you have .svn directories.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
@@ -342,7 +354,9 @@ Default key: e
Map option: NERDTreeMapOpenExpl Map option: NERDTreeMapOpenExpl
Applies to: files and directories. Applies to: files and directories.
Opens a netrw on the selected directory, or the selected file's directory. |:edit|s the selected directory, or the selected file's directory. This could
result in a NERD tree or a netrw being opened, depending on
|'NERDTreeHijackNetrw'|.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTree-D* *NERDTree-D*
@@ -463,13 +477,12 @@ Applies to: files and directories.
Display the filesystem menu. See |NERDTreeFilesysMenu| for details. Display the filesystem menu. See |NERDTreeFilesysMenu| for details.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTree-H* *NERDTree-I*
Default key: H Default key: I
Map option: NERDTreeMapToggleHidden Map option: NERDTreeMapToggleHidden
Applies to: no restrictions. Applies to: no restrictions.
Toggles whether hidden files are displayed. Hidden files are any Toggles whether hidden files (i.e. "dot files") are displayed.
file/directory that starts with a "."
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTree-f* *NERDTree-f*
@@ -477,7 +490,7 @@ Default key: f
Map option: NERDTreeMapToggleFilters Map option: NERDTreeMapToggleFilters
Applies to: no restrictions. Applies to: no restrictions.
Toggles whether file filters are used. See |NERDTreeIgnore| for details. Toggles whether file filters are used. See |'NERDTreeIgnore'| for details.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTree-F* *NERDTree-F*
@@ -561,53 +574,56 @@ then id be grateful if you'd email me.
The script provides the following options that can customise the behaviour the The script provides the following options that can customise the behaviour the
NERD tree. These options should be set in your vimrc. NERD tree. These options should be set in your vimrc.
|loaded_nerd_tree| Turns off the script. |'loaded_nerd_tree'| Turns off the script.
|NERDChristmasTree| Tells the NERD tree to make itself colourful |'NERDChristmasTree'| Tells the NERD tree to make itself colourful
and pretty. and pretty.
|NERDTreeAutoCenter| Controls whether the NERD tree window centers |'NERDTreeAutoCenter'| Controls whether the NERD tree window centers
when the cursor moves within a specified when the cursor moves within a specified
distance to the top/bottom of the window. distance to the top/bottom of the window.
|NERDTreeAutoCenterThreshold| Controls the sensitivity of autocentering. |'NERDTreeAutoCenterThreshold'| Controls the sensitivity of autocentering.
|NERDTreeCaseSensitiveSort| Tells the NERD tree whether to be case |'NERDTreeCaseSensitiveSort'| Tells the NERD tree whether to be case
sensitive or not when sorting nodes. sensitive or not when sorting nodes.
|NERDTreeChDirMode| Tells the NERD tree if/when it should change |'NERDTreeChDirMode'| Tells the NERD tree if/when it should change
vim's current working directory. vim's current working directory.
|NERDTreeHighlightCursorline| Tell the NERD tree whether to highlight the |'NERDTreeHighlightCursorline'| Tell the NERD tree whether to highlight the
current cursor line. current cursor line.
|NERDTreeIgnore| Tells the NERD tree which files to ignore. |'NERDTreeHijackNetrw'| Tell the NERD tree whether to replace the netrw
autocommands for exploring local directories.
|NERDTreeBookmarksFile| Where the bookmarks are stored. |'NERDTreeIgnore'| Tells the NERD tree which files to ignore.
|NERDTreeMouseMode| Tells the NERD tree how to handle mouse |'NERDTreeBookmarksFile'| Where the bookmarks are stored.
|'NERDTreeMouseMode'| Tells the NERD tree how to handle mouse
clicks. clicks.
|NERDTreeQuitOnOpen| Closes the tree window after opening a file. |'NERDTreeQuitOnOpen'| Closes the tree window after opening a file.
|NERDTreeShowBookmarks| Tells the NERD tree whether to display the |'NERDTreeShowBookmarks'| Tells the NERD tree whether to display the
bookmarks table on startup. bookmarks table on startup.
|NERDTreeShowFiles| Tells the NERD tree whether to display files |'NERDTreeShowFiles'| Tells the NERD tree whether to display files
in the tree on startup. in the tree on startup.
|NERDTreeShowHidden| Tells the NERD tree whether to display hidden |'NERDTreeShowHidden'| Tells the NERD tree whether to display hidden
files on startup. files on startup.
|NERDTreeShowLineNumbers| Tells the NERD tree whether to display line |'NERDTreeShowLineNumbers'| Tells the NERD tree whether to display line
numbers in the tree window. numbers in the tree window.
|NERDTreeSortOrder| Tell the NERD tree how to sort the nodes in |'NERDTreeSortOrder'| Tell the NERD tree how to sort the nodes in
the tree. the tree.
|NERDTreeWinPos| Tells the script where to put the NERD tree |'NERDTreeWinPos'| Tells the script where to put the NERD tree
window. window.
|NERDTreeWinSize| Sets the window size when the NERD tree is |'NERDTreeWinSize'| Sets the window size when the NERD tree is
opened. opened.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
@@ -616,13 +632,13 @@ NERD tree. These options should be set in your vimrc.
To enable any of the below options you should put the given line in your To enable any of the below options you should put the given line in your
~/.vimrc ~/.vimrc
*loaded_nerd_tree* *'loaded_nerd_tree'*
If this plugin is making you feel homicidal, it may be a good idea to turn it If this plugin is making you feel homicidal, it may be a good idea to turn it
off with this line in your vimrc: > off with this line in your vimrc: >
let loaded_nerd_tree=1 let loaded_nerd_tree=1
< <
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDChristmasTree* *'NERDChristmasTree'*
Values: 0 or 1. Values: 0 or 1.
Default: 1. Default: 1.
@@ -632,12 +648,12 @@ added to the nerd tree to make it more colourful.
Set it to 0 for a more vanilla looking tree. Set it to 0 for a more vanilla looking tree.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTreeAutoCenter* *'NERDTreeAutoCenter'*
Values: 0 or 1. Values: 0 or 1.
Default: 1 Default: 1
If set to 1, the NERD tree window will center around the cursor if it moves to If set to 1, the NERD tree window will center around the cursor if it moves to
within |NERDTreeAutoCenterThreshold| lines of the top/bottom of the window. within |'NERDTreeAutoCenterThreshold'| lines of the top/bottom of the window.
This is ONLY done in response to tree navigation mappings, This is ONLY done in response to tree navigation mappings,
i.e. |NERDTree-J| |NERDTree-K| |NERDTree-C-J| |NERDTree-c-K| |NERDTree-p| i.e. |NERDTree-J| |NERDTree-K| |NERDTree-C-J| |NERDTree-c-K| |NERDTree-p|
@@ -646,15 +662,15 @@ i.e. |NERDTree-J| |NERDTree-K| |NERDTree-C-J| |NERDTree-c-K| |NERDTree-p|
The centering is done with a |zz| operation. The centering is done with a |zz| operation.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTreeAutoCenterThreshold* *'NERDTreeAutoCenterThreshold'*
Values: Any natural number. Values: Any natural number.
Default: 3 Default: 3
This option controls the "sensitivity" of the NERD tree auto centering. See This option controls the "sensitivity" of the NERD tree auto centering. See
|NERDTreeAutoCenter| for details. |'NERDTreeAutoCenter'| for details.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTreeCaseSensitiveSort* *'NERDTreeCaseSensitiveSort'*
Values: 0 or 1. Values: 0 or 1.
Default: 0. Default: 0.
@@ -675,7 +691,7 @@ account. The above nodes would then be sorted like this: >
boner.c boner.c
< <
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTreeChDirMode* *'NERDTreeChDirMode'*
Values: 0, 1 or 2. Values: 0, 1 or 2.
Default: 0. Default: 0.
@@ -698,7 +714,7 @@ is /home/marty/foobar and you make the node for /home/marty/foobar/baz the new
root then the CWD will become /home/marty/foobar/baz. root then the CWD will become /home/marty/foobar/baz.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTreeHighlightCursorline* *'NERDTreeHighlightCursorline'*
Values: 0 or 1. Values: 0 or 1.
Default: 1. Default: 1.
@@ -706,13 +722,30 @@ If set to 1, the current cursor line in the NERD tree buffer will be
highlighted. This is done using the |cursorline| option. highlighted. This is done using the |cursorline| option.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTreeIgnore* *'NERDTreeHijackNetrw'*
Values: 0 or 1.
Default: 1.
If set to 1, doing a >
:edit <some directory>
<
will open up a "secondary" NERD tree instead of a netrw in the target window.
Secondary NERD trees behaves slighly different from a regular trees in the
following respects:
1. 'o' will open the selected file in the same window as the tree,
replacing it.
2. you can have as many secondary tree as you want in the same tab.
------------------------------------------------------------------------------
*'NERDTreeIgnore'*
Values: a list of regular expressions. Values: a list of regular expressions.
Default: ['\~$']. Default: ['\~$'].
This option is used to specify which files the NERD tree should ignore. It This option is used to specify which files the NERD tree should ignore. It
must be a list of regular expressions. When the NERD tree is rendered, any must be a list of regular expressions. When the NERD tree is rendered, any
files/dirs that match any of the regex's in NERDTreeIgnore wont be displayed. files/dirs that match any of the regex's in 'NERDTreeIgnore' wont be
displayed.
For example if you put the following line in your vimrc: > For example if you put the following line in your vimrc: >
let NERDTreeIgnore=['\.vim$', '\~$'] let NERDTreeIgnore=['\.vim$', '\~$']
@@ -728,14 +761,14 @@ The file filters can be turned on and off dynamically with the |NERDTree-f|
mapping. mapping.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTreeBookmarksFile* *'NERDTreeBookmarksFile'*
Values: a path Values: a path
Default: $HOME/.NERDTreeBookmarks Default: $HOME/.NERDTreeBookmarks
This is where bookmarks are saved. See |NERDTreeBookmarkCommands|. This is where bookmarks are saved. See |NERDTreeBookmarkCommands|.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTreeMouseMode* *'NERDTreeMouseMode'*
Values: 1, 2 or 3. Values: 1, 2 or 3.
Default: 1. Default: 1.
@@ -753,25 +786,26 @@ then (to single click activate it) you must click somewhere in
'application.rb'. 'application.rb'.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTreeQuitOnOpen* *'NERDTreeQuitOnOpen'*
Values: 0 or 1. Values: 0 or 1.
Default: 0 Default: 0
If set to 1, the NERD tree window will close after opening a file with the If set to 1, the NERD tree window will close after opening a file with the
|NERDTree-o| or |NERDTree-tab| mappings. |NERDTree-o| or |NERDTree-i| mappings.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTreeShowBookmarks* *'NERDTreeShowBookmarks'*
Values: 0 or 1. Values: 0 or 1.
Default: 0. Default: 0.
If this option is set to 1 then the bookmarks table will be displayed. If this option is set to 1 then the bookmarks table will be displayed.
This option can be toggled dynamically, per tree, with the |NERDTree-B| mapping. This option can be toggled dynamically, per tree, with the |NERDTree-B|
mapping.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTreeShowFiles* *'NERDTreeShowFiles'*
Values: 0 or 1. Values: 0 or 1.
Default: 1. Default: 1.
@@ -783,19 +817,19 @@ mapping and is useful for drastically shrinking the tree when you are
navigating to a different part of the tree. navigating to a different part of the tree.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTreeShowHidden* *'NERDTreeShowHidden'*
Values: 0 or 1. Values: 0 or 1.
Default: 0. Default: 0.
This option tells vim whether to display hidden files by default. This option This option tells vim whether to display hidden files by default. This option
can be dynamically toggled, per tree, with the |NERDTree-H| mapping. Use one can be dynamically toggled, per tree, with the |NERDTree-I| mapping. Use one
of the follow lines to set this option: > of the follow lines to set this option: >
let NERDTreeShowHidden=0 let NERDTreeShowHidden=0
let NERDTreeShowHidden=1 let NERDTreeShowHidden=1
< <
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTreeShowLineNumbers* *'NERDTreeShowLineNumbers'*
Values: 0 or 1. Values: 0 or 1.
Default: 0. Default: 0.
@@ -806,7 +840,7 @@ window. Use one of the follow lines to set this option: >
< <
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTreeSortOrder* *'NERDTreeSortOrder'*
Values: a list of regular expressions. Values: a list of regular expressions.
Default: ['\/$', '*', '\.swp$', '\.bak$', '\~$'] Default: ['\/$', '*', '\.swp$', '\.bak$', '\~$']
@@ -821,8 +855,8 @@ all .h files. All files containing the string 'foobar' will be placed at the
end. The star is a special flag: it tells the script that every node that end. The star is a special flag: it tells the script that every node that
doesnt match any of the other regexps should be placed here. doesnt match any of the other regexps should be placed here.
If no star is present in NERDTreeSortOrder then one is automatically appended If no star is present in 'NERDTreeSortOrder' then one is automatically
to the array. appended to the array.
The regex '\/$' should be used to match directory nodes. The regex '\/$' should be used to match directory nodes.
@@ -839,30 +873,28 @@ Other examples: >
backup files will appear last with everything else preceding them. backup files will appear last with everything else preceding them.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTreeWinPos* *'NERDTreeWinPos'*
Values: "left", "right", "top" or "bottom" Values: "left" or "right"
Default: "left". Default: "left".
This option is used to determine where NERD tree window is placed on the This option is used to determine where NERD tree window is placed on the
screen. screen.
"top" or "bottom", will cause a horizontal split to be created for the tree,
while "left" and "right" will cause a vertical split.
This option is makes it possible to use two different explorer type This option is makes it possible to use two different explorer type
plugins simultaneously. For example, you could have the taglist plugin on the plugins simultaneously. For example, you could have the taglist plugin on the
left of the window and the NERD tree on the right. left of the window and the NERD tree on the right.
------------------------------------------------------------------------------ ------------------------------------------------------------------------------
*NERDTreeWinSize* *'NERDTreeWinSize'*
Values: a positive integer. Values: a positive integer.
Default: 31. Default: 31.
This option is used to change the size of the NERD tree when it is loaded. This option is used to change the size of the NERD tree when it is loaded.
============================================================================== ==============================================================================
*NERDTreePublicFunctions* 4. Hacking the NERD tree *NERDTreeHacking*
5. Public functions ~
Public functions ~
The script provides 2 public functions for your hacking pleasure. Their The script provides 2 public functions for your hacking pleasure. Their
signatures are: > signatures are: >
@@ -877,8 +909,26 @@ style OO. To see the functions that each class provides you can read look at
the code. the code.
Use the node objects to manipulate the structure of the tree. Use the path Use the node objects to manipulate the structure of the tree. Use the path
objects to access the data the tree represents and to make changes to the objects to access the files/directories the tree nodes represent.
filesystem.
The NERD tree filetype ~
NERD tree buffers have a filetype of "nerdtree". You can use this to hack the
NERD tree via autocommands (on |FileType|) or via an ftplugin.
For example, putting this code in ~/.vim/ftplugin/nerdtree.vim would override
the o mapping, making it open the selected node in a new gvim instance. >
nnoremap <silent> <buffer> o :call <sid>openInNewVimInstance()<cr>
function! s:openInNewVimInstance()
let p = NERDTreeGetCurrentPath()
if p != {}
silent exec "!gvim " . p.strForOS(1) . "&"
endif
endfunction
<
This way you can add new mappings or :commands or override any existing
mapping.
============================================================================== ==============================================================================
5. TODO list *NERDTreeTodo* 5. TODO list *NERDTreeTodo*
@@ -899,6 +949,39 @@ fridge for later ;)
============================================================================== ==============================================================================
7. Changelog *NERDTreeChangelog* 7. Changelog *NERDTreeChangelog*
3.0.0
- hijack netrw so that doing an :edit <directory> will put a NERD tree in
the window rather than a netrw browser. See :help 'NERDTreeHijackNetrw'
- allow sharing of trees across tabs, see :help :NERDTreeMirror
- remove "top" and "bottom" as valid settings for NERDTreeWinPos
- change the '<tab>' mapping to 'i'
- change the 'H' mapping to 'I'
- lots of refactoring
2.14.3
Thanks to tpope for the following:
- use relative paths when doing edit commands if possible (useful if you
have %f on your statusline for example)
- allow relative paths for :NERDTree commands, eg ":NERDTree ../foo"
- fix a bug where the script used the directory of the current buffer
instead of vims cwd for the :NERDTree command
- bugfix for read only node highlighting
2.14.2
- when opening a file (with 'o' or double click) dont split the window
unless we absolutely have to. This should make the script work better
with other explorer plugins. Thanks to Ryan Penn, Simon Peter Nicholls
and Michael
- fix a bug where directories starting with a '+' char could not be opened.
Thanks to Tomasz Chomiuk.
- fix a bug where closing vim with :qa with a tree open in another tab
would break, thanks to Denis Pokataev.
- compatibility bugfix for older versions of vim, thanks to knekk for
helping me track it down and to Sean Chou.
2.14.1
- dont clobber &cpo. Thanks to godlygeek for the bug report.
2.14.0 2.14.0
- fix a bug where the <c-w>o mapping would cause the tree window to be - fix a bug where the <c-w>o mapping would cause the tree window to be
incorrectly sized when reopened. incorrectly sized when reopened.
@@ -938,8 +1021,8 @@ fridge for later ;)
- applied a patch from Matan Nassau to add the NERDTreeQuitOnOpen option - applied a patch from Matan Nassau to add the NERDTreeQuitOnOpen option
which closes the tree window after opening a file. See :help which closes the tree window after opening a file. See :help
NERDTreeQuitOnOpen. NERDTreeQuitOnOpen.
- optimised the nerd tree rendering. Now it takes just over 1/3 of the time - optimised the nerd tree rendering. Now it takes just over 1/3 of the
it previously took to render. time it previously took to render.
- now the tree filter mappings toggle the filters "per tree" rather than - now the tree filter mappings toggle the filters "per tree" rather than
globally. The global filter variables are used to set the initial filter globally. The global filter variables are used to set the initial filter
settings for each new NERD tree. settings for each new NERD tree.
@@ -1015,9 +1098,9 @@ fridge for later ;)
and you use <c-j/k> the cursor will jump to its PARENTS next/previous and you use <c-j/k> the cursor will jump to its PARENTS next/previous
sibling. Go :help NERDTree-c-j and :help NERDTree-c-k for info. sibling. Go :help NERDTree-c-j and :help NERDTree-c-k for info.
- Extended the behaviour of the J/K mappings. Now if the cursor is on the - Extended the behaviour of the J/K mappings. Now if the cursor is on the
last child of a node and you push J/K it will jump down to the last child last child of a node and you push J/K it will jump down to the last
of the next/prev of its parents siblings that is open and has children. child of the next/prev of its parents siblings that is open and has
Go :help NERDTree-J and :help NERDTree-K for info. children. Go :help NERDTree-J and :help NERDTree-K for info.
- The goal of these changes is to make tree navigation faster. - The goal of these changes is to make tree navigation faster.
- Reorganised the help page a bit. - Reorganised the help page a bit.
- Removed the E mapping. - Removed the E mapping.
@@ -1057,8 +1140,8 @@ fridge for later ;)
- Tree navigation changes: - Tree navigation changes:
- Added J and K mappings to jump to last/first child of the current dir. - Added J and K mappings to jump to last/first child of the current dir.
Options to customise these mappings have also been added. Options to customise these mappings have also been added.
- Remapped the jump to next/prev sibling commands to be <C-j> and <C-k> by - Remapped the jump to next/prev sibling commands to be <C-j> and <C-k>
default. by default.
These changes should hopefully make tree navigation mappings easier to These changes should hopefully make tree navigation mappings easier to
remember and use as the j and k keys are simply reused 3 times (twice remember and use as the j and k keys are simply reused 3 times (twice
with modifier keys). with modifier keys).
@@ -1220,6 +1303,25 @@ NERDTreeQuitOnOpen was set.
Thanks to Charlton Wang for reporting bugs with the 'o' mapping and with Thanks to Charlton Wang for reporting bugs with the 'o' mapping and with
handling named pipes. handling named pipes.
Chur to godlygeek for reporting a bug where &cpo was getting clobbered.
Cheers to knekk for helping me track down a bug when overwriting dictionary
keys that only occurred in some versions of vim.
Thanks also to Sean Chou for the bug report about the above bug.
Thanks to Ryan Penn, Simon Peter Nicholls and Michael for pointing out an issue
where the script was splitting constantly when using the 'o' mapping while
other explorers were open.
Thanks to Tomasz Chomiuk for the bug report about the script failing when dir
names began with a +.
Thanks to Denis Pokataev for the bug report about the script failing when
closing vim with :qa with a tree open in another tab.
Thanks to tpope for his dope bug reporting.
============================================================================== ==============================================================================
9. License *NERDTreeLicense* 9. License *NERDTreeLicense*

File diff suppressed because it is too large Load Diff