Compare commits

...

86 Commits

Author SHA1 Message Date
Martin Grenfell
e7ebee3084 switch to version 3.1.1 2009-06-07 21:36:59 +12:00
Martin Grenfell
1239f78baf update changelog 2009-06-07 21:36:00 +12:00
Martin Grenfell
5f4c005771 bugfix: :NERDTreeMirror doesnt have tab completion 2009-06-07 20:40:19 +12:00
Martin Grenfell
9e0a0b6a43 fix a bug that was causing no-name bufs to be created 2009-06-02 20:04:10 +12:00
Martin Grenfell
5c85d28285 fix a function description comment 2009-06-02 11:12:36 +12:00
Martin Grenfell
f65bc62fac fix a bug that was occurring with :set nohidden
previously the code didnt take &hidden (it assumed it was set) into
account when determining if splitting was needed when using the o
mapping on a file node
2009-06-02 11:10:03 +12:00
Martin Grenfell
9b12953343 add a help file entry for the cd mapping 2009-06-02 11:09:33 +12:00
Martin Grenfell
84f9793231 fix some help tags 2009-05-29 14:23:58 +12:00
Martin Grenfell
1f46ecf4b8 update changelog 2009-03-12 09:45:18 +13:00
Martin Grenfell
eef90bf320 fix lots of no-name buffers being created
Previously every time the tree window was created a new [no-name] buffer
was being created (visible with :ls!). Avoid this by creating the window
with split,  not new
2009-03-12 09:44:02 +13:00
Martin Grenfell
3796a8799a map '<CR>' to the same as 'o' 2009-03-06 15:57:51 +13:00
Martin Grenfell
c726655d23 Compatibility syntax fix for screwy versions of vim 2009-01-30 23:59:50 +13:00
Martin Grenfell
bdfac3e25c switch to version 3.1.0 2009-01-27 18:58:38 +13:00
Martin Grenfell
faf1459ce5 minor doc fix 2009-01-27 18:58:26 +13:00
Martin Grenfell
02751f4d11 update changelog and credits 2009-01-26 22:52:52 +13:00
Martin Grenfell
992c9f24eb use ==# always instead of ==
this is because of vims fucking stupid functionality where ignorecase
changes the way == behaves. It was causing bugs when the user had
ignorecase set.
2009-01-24 00:06:41 +13:00
Martin Grenfell
8164fa09d3 fix a bug with the Path#strForEditCmd() and relative paths 2009-01-23 23:43:47 +13:00
Martin Grenfell
5e50601788 fix a bug where doing a :cd would cause :NERDTreeToggle to fail 2009-01-23 23:43:00 +13:00
Martin Grenfell
23e79de2c2 make the hijacknetrw functionality work when vim starts up
now we can go   vim  <some dir>   and it loads up a nerd tree instead of
a netrw
2009-01-23 21:27:53 +13:00
Martin Grenfell
4accc8a79c fix a bug when g:NERDTreeChDirMode==2
when the user activate the   ../ (up a dir)   line or hit U or U it
wasnt changing vims CWD when NERDTreeChDirMode==2
2009-01-21 23:03:54 +13:00
Martin Grenfell
7522cbf4f0 add g:NERDTreeStatusline option
allows the statusline to be customised for the nerd tree window
2009-01-21 23:03:45 +13:00
Martin Grenfell
3a25a594ca add -bar to all :commands 2009-01-14 16:24:14 +13:00
Martin Grenfell
40374e5056 add doc for the vertical split maps 2009-01-14 16:18:46 +13:00
Martin Grenfell
4e4fb179e7 correct a help tag 2009-01-14 16:04:26 +13:00
Martin Grenfell
0f2effb049 make the vertical splitting work with secondary trees 2009-01-14 15:54:26 +13:00
Martin Grenfell
63ee15ca6e do the vertical split according to the users settings 2009-01-14 15:37:19 +13:00
Martin Grenfell
f8a105d972 remove a rogue call to s:putCursorInTreeWin() 2009-01-14 14:43:23 +13:00
Martin Grenfell
f2707106bd bugfix: make the vsplit maps work when the tree is on the left 2009-01-14 11:19:47 +13:00
Martin Grenfell
1586cfdb03 add g and gs to the guickhelp 2009-01-14 11:19:43 +13:00
Martin Grenfell
ca8b1d2b34 add mapping options for g and gs 2009-01-14 11:19:38 +13:00
Martin Grenfell
100d8d2a47 add s and gs for vsplitting the current node 2009-01-14 11:19:32 +13:00
Martin Grenfell
efe03d6988 switch to version 3.0.1 2009-01-12 23:39:10 +13:00
Martin Grenfell
7b59186dfe update change log and credits 2009-01-12 22:40:59 +13:00
Martin Grenfell
e9f403ac44 fix a bug where going :NERDTree <relative-path> would fail
Path.New was expecting an absolute path. Now we convert paths to
absolute inside Path.New
2009-01-10 21:45:27 +13:00
Martin Grenfell
2038f38026 unlet TreeDirNode#open because we are overriding it 2009-01-10 21:44:56 +13:00
Martin Grenfell
6e9a5d4cea fixes to secondary nerd trees for the q mapping
make sure we always go back to the right buffer, and if there is no
buffer to go back to, close the window
2009-01-10 17:35:21 +13:00
Martin Grenfell
495e906169 update changelog 2009-01-09 18:14:44 +13:00
Martin Grenfell
2e6cedcad7 fix the q mapping again
since we are now ":edit"ing a new buffer for secondary nerd trees, we
have to store the previous buffer number otherwise we get into an
infinite loop because we go back to a directory buffer which causes
another secondary nerd tree to open etc
2009-01-09 18:11:36 +13:00
Martin Grenfell
d76f936698 remove some trailing whitespace 2009-01-09 17:37:43 +13:00
Martin Grenfell
0e9feaede3 use the s:nextBufferName() helper in s:createTreeWin() 2009-01-09 17:11:18 +13:00
Martin Grenfell
cd55e2d522 ensure all secondary nerd tree buf names are unique 2009-01-09 15:56:43 +13:00
Martin Grenfell
3d2bf2d9ac fix a bug when doing :NERDTreeMirror without 'hidden set 2009-01-09 15:23:57 +13:00
Martin Grenfell
2f4d1b93e8 make the q mapping work with secondary trees 2009-01-09 14:46:49 +13:00
Martin Grenfell
f06d99f7b5 bugfix: use TreeDirNode.GetSelected() instead of getSelectedDir() 2009-01-09 12:17:16 +13:00
Martin Grenfell
1b13fb05ea add a note to the changelog 2009-01-09 11:39:31 +13:00
Martin Grenfell
f90da509e1 updates to the doc
*remove the change log prior to v3.0.0
*remove the todo section
*change "about the author" to "about" and put the github/vim.org project
urls in it
2009-01-09 11:27:41 +13:00
Martin Grenfell
c8afb6d92d fix a bug where :NERDTreeToggle was broken without :set hidden 2009-01-09 09:40:23 +13:00
Martin Grenfell
b0950d1593 move getSelectedNode into TreeFileNode 2009-01-07 21:42:44 +13:00
Martin Grenfell
9f569c61f9 move the drawTree function into TreeFileNode 2009-01-07 11:12:23 +13:00
Martin Grenfell
7874b3c60e move the openFileNode() code into TreeFileNode 2009-01-06 20:40:15 +13:00
Martin Grenfell
99afbe9ec8 move putCursorOnNode into TreeFileNode 2009-01-06 20:30:07 +13:00
Martin Grenfell
78aa2fa1db move the openExplorerFor code into the TreeDirNode 2009-01-06 20:16:33 +13:00
Martin Grenfell
111e309507 move the open(Dir|File)NodeSplit code into TreeFileNode 2009-01-06 13:49:04 +13:00
Martin Grenfell
7a86663128 move findNodeLineNumber/findRootNodeLineNumber into the TreeFileNode model 2009-01-06 13:31:17 +13:00
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
2 changed files with 1096 additions and 1046 deletions

View File

@@ -21,22 +21,21 @@ CONTENTS *NERDTree-contents*
1.Intro...................................|NERDTree|
2.Functionality provided..................|NERDTreeFunctionality|
2.1 Global commands...................|NERDTreeGlobalCommands|
2.2 Bookmarks.........................|NERDTreeBookmarks|
2.2.1 The bookmark table..........|NERDTreeBookmarkTable|
2.2.2 Bookmark commands...........|NERDTreeBookmarkCommands|
2.2.3 Invalid bookmarks...........|NERDTreeInvalidBookmarks|
2.3 NERD tree mappings................|NERDTreeMappings|
2.4 The filesystem menu...............|NERDTreeFilesysMenu|
2.1.Global commands...................|NERDTreeGlobalCommands|
2.2.Bookmarks.........................|NERDTreeBookmarks|
2.2.1.The bookmark table..........|NERDTreeBookmarkTable|
2.2.2.Bookmark commands...........|NERDTreeBookmarkCommands|
2.2.3.Invalid bookmarks...........|NERDTreeInvalidBookmarks|
2.3.NERD tree mappings................|NERDTreeMappings|
2.4.The filesystem menu...............|NERDTreeFilesysMenu|
3.Options.................................|NERDTreeOptions|
3.1 Option summary....................|NERDTreeOptionSummary|
3.2 Option details....................|NERDTreeOptionDetails|
4.Public functions........................|NERDTreePublicFunctions|
5.TODO list...............................|NERDTreeTodo|
6.The Author..............................|NERDTreeAuthor|
7.Changelog...............................|NERDTreeChangelog|
8.Credits.................................|NERDTreeCredits|
9.License.................................|NERDTreeLicense|
3.1.Option summary....................|NERDTreeOptionSummary|
3.2.Option details....................|NERDTreeOptionDetails|
4.Hacking the NERD tree...................|NERDTreeHacking|
5.About...................................|NERDTreeAbout|
6.Changelog...............................|NERDTreeChangelog|
7.Credits.................................|NERDTreeCredits|
8.License.................................|NERDTreeLicense|
==============================================================================
1. Intro *NERDTree*
@@ -65,7 +64,7 @@ The following features and functionality are provided by the NERD tree:
* ...
* Directories and files can be bookmarked.
* 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
* optional displaying of hidden files (. files)
* files can be "turned off" so that only directories are displayed
@@ -81,9 +80,13 @@ The following features and functionality are provided by the NERD tree:
session, the directory nodes will be opened/closed as you left them
* The script remembers the cursor position and window position in the NERD
tree so you can toggle it off (or just close the tree window) and then
reopen it (with NERDTreeToggle) the NERD tree window will appear EXACTLY
reopen it (with NERDTreeToggle) the NERD tree window will appear exactly
as you left it
* You can have a separate NERD tree for each tab
* 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*
@@ -109,7 +112,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
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.
------------------------------------------------------------------------------
@@ -190,16 +201,19 @@ o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
<tab>...Open selected file in a split window.....................|NERDTree-tab|
g<tab>..Same as <tab>, but leave the cursor on the NERDTree......|NERDTree-gtab|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|
!.......Execute the current file.................................|NERDTree-!|
O.......Recursively open the selected directory..................|NERDTree-O|
x.......Close the current nodes parent...........................|NERDTree-x|
X.......Recursively close all children of the current node.......|NERDTree-X|
e.......Open a netrw for the current dir.........................|NERDTree-e|
e.......Edit the current dif.....................................|NERDTree-e|
<CR>...............same as |NERDTree-o|.
double-click.......same as the |NERDTree-o| map.
middle-click.......same as |NERDTree-tab| for files, same as
middle-click.......same as |NERDTree-i| for files, same as
|NERDTree-e| for dirs.
D.......Delete the current bookmark .............................|NERDTree-D|
@@ -208,8 +222,8 @@ P.......Jump to the root node....................................|NERDTree-P|
p.......Jump to current nodes parent.............................|NERDTree-p|
K.......Jump up inside directories at the current tree depth.....|NERDTree-K|
J.......Jump down inside directories at the current tree depth...|NERDTree-J|
<C-j>...Jump down to the next sibling of the current directory...|NERDTree-c-j|
<C-k>...Jump up to the previous sibling of the current directory.|NERDTree-c-k|
<C-J>...Jump down to the next sibling of the current directory...|NERDTree-C-J|
<C-K>...Jump up to the previous sibling of the current directory.|NERDTree-C-K|
C.......Change the tree root to the selected dir.................|NERDTree-C|
u.......Move the tree root up one directory......................|NERDTree-u|
@@ -219,7 +233,7 @@ R.......Recursively refresh the current root.....................|NERDTree-R|
m.......Display the filesystem menu..............................|NERDTree-m|
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 files are displayed.......................|NERDTree-F|
B.......Toggle whether the bookmark table is displayed...........|NERDTree-B|
@@ -278,8 +292,8 @@ Applies to: files and directories.
The same as |NERDTree-t| except that the focus is kept in the current tab.
------------------------------------------------------------------------------
*NERDTree-tab*
Default key: <tab>
*NERDTree-i*
Default key: i
Map option: NERDTreeMapOpenSplit
Applies to: files.
@@ -287,15 +301,35 @@ Opens the selected file in a new split window and puts the cursor in the new
window.
------------------------------------------------------------------------------
*NERDTree-gtab*
Default key: g<tab>
*NERDTree-gi*
Default key: gi
Map option: None
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
|NERDTree-tab|).
|NERDTree-i|).
------------------------------------------------------------------------------
*NERDTree-s*
Default key: s
Map option: NERDTreeMapOpenVSplit
Applies to: files.
Opens the selected file in a new vertically split window and puts the cursor in
the new window.
------------------------------------------------------------------------------
*NERDTree-gs*
Default key: gs
Map option: None
Applies to: files.
The same as |NERDTree-s| except that the cursor is not moved.
The key combo for this mapping is always "g" + NERDTreeMapOpenVSplit (see
|NERDTree-s|).
------------------------------------------------------------------------------
*NERDTree-!*
@@ -342,7 +376,9 @@ Default key: e
Map option: NERDTreeMapOpenExpl
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*
@@ -395,16 +431,16 @@ If the cursor is already on the last node then do the following:
* go to the last child of that node
------------------------------------------------------------------------------
*NERDTree-c-j*
Default key: <C-j>
*NERDTree-C-J*
Default key: <C-J>
Map option: NERDTreeMapJumpNextSibling
Applies to: files and directories.
Jump to the next sibling of the selected node.
------------------------------------------------------------------------------
*NERDTree-c-k*
Default key: <C-k>
*NERDTree-C-K*
Default key: <C-K>
Map option: NERDTreeMapJumpPrevSibling
Applies to: files and directories.
@@ -463,13 +499,20 @@ Applies to: files and directories.
Display the filesystem menu. See |NERDTreeFilesysMenu| for details.
------------------------------------------------------------------------------
*NERDTree-H*
Default key: H
*NERDTree-cd*
Default key: cd
Map option: NERDTreeMapChdir
Applies to: files and directories.
Change vims current working directory to that of the selected node.
------------------------------------------------------------------------------
*NERDTree-I*
Default key: I
Map option: NERDTreeMapToggleHidden
Applies to: no restrictions.
Toggles whether hidden files are displayed. Hidden files are any
file/directory that starts with a "."
Toggles whether hidden files (i.e. "dot files") are displayed.
------------------------------------------------------------------------------
*NERDTree-f*
@@ -580,6 +623,9 @@ NERD tree. These options should be set in your vimrc.
|'NERDTreeHighlightCursorline'| Tell the NERD tree whether to highlight the
current cursor line.
|'NERDTreeHijackNetrw'| Tell the NERD tree whether to replace the netrw
autocommands for exploring local directories.
|'NERDTreeIgnore'| Tells the NERD tree which files to ignore.
|'NERDTreeBookmarksFile'| Where the bookmarks are stored.
@@ -604,6 +650,8 @@ NERD tree. These options should be set in your vimrc.
|'NERDTreeSortOrder'| Tell the NERD tree how to sort the nodes in
the tree.
|'NERDTreeStatusline'| Set a statusline for NERD tree windows.
|'NERDTreeWinPos'| Tells the script where to put the NERD tree
window.
@@ -640,7 +688,7 @@ If set to 1, the NERD tree window will center around the cursor if it moves to
within |'NERDTreeAutoCenterThreshold'| lines of the top/bottom of the window.
This is ONLY done in response to tree navigation mappings,
i.e. |NERDTree-J| |NERDTree-K| |NERDTree-C-J| |NERDTree-c-K| |NERDTree-p|
i.e. |NERDTree-J| |NERDTree-K| |NERDTree-C-J| |NERDTree-C-K| |NERDTree-p|
|NERDTree-P|
The centering is done with a |zz| operation.
@@ -703,7 +751,23 @@ Values: 0 or 1.
Default: 1.
If set to 1, the current cursor line in the NERD tree buffer will be
highlighted. This is done using the |cursorline| option.
highlighted. This is done using the |'cursorline'| option.
------------------------------------------------------------------------------
*'NERDTreeHijackNetrw'*
Values: 0 or 1.
Default: 1.
If set to 1, doing a >
:edit <some directory>
<
will open up a "secondary" NERD tree instead of a netrw in the target window.
Secondary NERD trees behaves slighly different from a regular trees in the
following respects:
1. 'o' will open the selected file in the same window as the tree,
replacing it.
2. you can have as many secondary tree as you want in the same tab.
------------------------------------------------------------------------------
*'NERDTreeIgnore'*
@@ -760,7 +824,7 @@ Values: 0 or 1.
Default: 0
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'*
@@ -790,7 +854,7 @@ Values: 0 or 1.
Default: 0.
This option tells vim whether to display hidden files by default. This option
can be dynamically toggled, per tree, with the |NERDTree-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: >
let NERDTreeShowHidden=0
let NERDTreeShowHidden=1
@@ -840,20 +904,31 @@ Other examples: >
3. Dirs will appear first, then ruby and php. Swap files, bak files and vim
backup files will appear last with everything else preceding them.
------------------------------------------------------------------------------
*'NERDTreeStatusline'*
Values: Any valid statusline setting.
Default: %{b:NERDTreeRoot.path.strForOS(0)}
Tells the script what to use as the |'statusline'| setting for NERD tree
windows.
Note that the statusline is set using |:let-&| not |:set| so escaping spaces
isn't necessary.
Setting this option to -1 will will deactivate it so that your global
statusline setting is used instead.
------------------------------------------------------------------------------
*'NERDTreeWinPos'*
Values: "left", "right", "top" or "bottom"
Values: "left" or "right"
Default: "left".
This option is used to determine where NERD tree window is placed on the
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
plugins simultaneously. For example, you could have the taglist plugin on the
left of the window and the NERD tree on the right.
This option makes it possible to use two different explorer plugins
simultaneously. For example, you could have the taglist plugin on the left of
the window and the NERD tree on the right.
------------------------------------------------------------------------------
*'NERDTreeWinSize'*
@@ -863,8 +938,9 @@ Default: 31.
This option is used to change the size of the NERD tree when it is loaded.
==============================================================================
*NERDTreePublicFunctions*
5. Public functions ~
4. Hacking the NERD tree *NERDTreeHacking*
Public functions ~
The script provides 2 public functions for your hacking pleasure. Their
signatures are: >
@@ -879,16 +955,29 @@ style OO. To see the functions that each class provides you can read look at
the code.
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
filesystem.
objects to access the files/directories the tree nodes represent.
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*
Window manager integration?
==============================================================================
6. The Author *NERDTreeAuthor*
5. About *NERDTreeAbout*
The author of the NERD tree is a terrible terrible monster called Martyzilla
who gobbles up small children with milk and sugar for breakfast.
@@ -898,375 +987,109 @@ you, so feel free to send him suggestions and/or comments about this plugin.
Don't be shy --- the worst he can do is slaughter you and stuff you in the
fridge for later ;)
The latest stable versions can be found at
http://www.vim.org/scripts/script.php?script_id=1658
The latest dev versions are on github
http://github.com/scrooloose/nerdtree
==============================================================================
7. Changelog *NERDTreeChangelog*
6. Changelog *NERDTreeChangelog*
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
- fix a bug where the <c-w>o mapping would cause the tree window to be
incorrectly sized when reopened.
- add keymapping to delete bookmarks from the bookmarks table, see
:help NERDTree-D
- lots of refactoring
2.13.0
- make NERDTreeChDir option default to 0 (i.e. never change vims current
working dir by default)
- when moving/deleting nodes with the filesystem menu, move/delete any
associated bookmarks
- make the t/T on directory nodes open a fresh NERD tree for the selected
dir in a new tab, rather than a netrw.
- place the cursor at the top of the bookmarks table when opening it with B
- make NERDTreeQuitOnOpen option work with the g<tab> and go mappings,
thanks to Maxim Kim for the bug report
- change how invalid bookmarks are handled. Now they are not deleted. If a
bookmark is malformed (in the bookmarks file) or points to an
invalid/nonexisting location then print an error and place the offending
bookmarks at the bottom of the bookmarks file. See :help
|NERDTreeInvalidBookmarks| for info. Thanks to Zhang Shuhan for the
suggestion and the testing.
- fix a bug with the 'o' mapping that occurred when opening a new buffer
for a file whose name was a substring of an already open file. Thanks to
Charlton Wang for the report.
- stop the script from going into an infinite loop when it tries to cache
a named pipe. Thanks to Charlton Wang for the report.
2.12.0
- added a UI for bookmarks. See :help NERDTreeBookmarkTable for details.
Thanks to Zhang Shuhan for testing and bug reports.
- relaxed the restrictions on bookmark names, now the only restriction is
that they cant contain spaces. This allows for e.g. Chinese bookmark
names. Thanks to Zhang Shuhan for the suggestion.
- combined the NERDTreeWinPos and NERDTreeSplitVertical options. See :help
NERDTreeWinPos.
- applied a patch from Matan Nassau to add the NERDTreeQuitOnOpen option
which closes the tree window after opening a file. See :help
NERDTreeQuitOnOpen.
- optimised the nerd tree rendering. Now it takes just over 1/3 of the
time it previously took to render.
- now the tree filter mappings toggle the filters "per tree" rather than
globally. The global filter variables are used to set the initial filter
settings for each new NERD tree.
- fix to window resizing when opening a file when NERD tree is the only
window open
- other fixes
2.11.0
- changes to the 'o' mapping when opening files:
- dont clobber "special" windows (eg taglist/quickfix/etc). This should
make the NERD tree play nicer with other explorer plugins. Thanks to
Yuan Jiang for the suggestion.
- if the file is already open in the current tab, just move the cursor
to that window
- highlight executable files, made some slight changes to other
highlighting
- if the user resizes the tree window, keep that new size. Dont reset to
the default during the <tab> mapping, or :NERDTreeToggle command. Only
reset the size if a fresh tree is started with :NERDTree.
- remove the "magic" functionality from the <c-j>/<c-k> mappings (it was
more confusing than helpful)
3.1.1
- fix a bug where a non-listed no-name buffer was getting created every
time the tree windows was created, thanks to Derek Wyatt and owen1
- make <CR> behave the same as the 'o' mapping
- some helptag fixes in the doc, thanks strull
- fix a bug when using :set nohidden and opening a file where the previous
buf was modified. Thanks iElectric
- other minor fixes
2.10.0
- added bookmarks, see :help NERDTreeBookmarkCommands for details. Thanks
to Piotr Czachur for all his testing and suggestions.
- fixed screen jumping bug with when &scrolloff != 0
- fixed some bugs with copying nodes
- other random fixes
- change license to wtfpl
3.1.0
New features:
- add mappings to open files in a vsplit, see :help NERDTree-s and :help
NERDTree-gs
- make the statusline for the nerd tree window default to something
hopefully more useful. See :help 'NERDTreeStatusline'
Bugfixes:
- make the hijack netrw functionality work when vim is started with "vim
<some dir>" (thanks to Alf Mikula for the patch).
- fix a bug where the CWD wasnt being changed for some operations even when
NERDTreeChDirMode==2 (thanks to Lucas S. Buchala)
- add -bar to all the nerd tree :commands so they can chain with other
:commands (thanks to tpope)
- fix bugs when ignorecase was set (thanks to nach)
- fix a bug with the relative path code (thanks to nach)
- fix a bug where doing a :cd would cause :NERDTreeToggle to fail (thanks nach)
2.9.0
- path handling improvements, thanks to Zhang Shuhan for heaps of
testing/bug reports
* improved how paths are stored, now the script will no longer get
confused about drives on MF Windows
* made the script way better at handling paths with strange characters
in them (eg '$@; etc)
- applied a patch from Cory Echols
* add the command :NERDTreeClose to close the tree for the current tab
* set the filetype for the NERD tree buffer to "nerdtree"
3.0.1
Bugfixes:
- fix bugs with :NERDTreeToggle and :NERDTreeMirror when 'hidden
was not set
- fix a bug where :NERDTree <path> would fail if <path> was relative and
didnt start with a ./ or ../ Thanks to James Kanze.
- make the q mapping work with secondary (:e <dir> style) trees,
thanks to jamessan
- fix a bunch of small bugs with secondary trees
2.8.0
- added an option to enable/disable line numbers in the NERD tree window,
thanks to Olivier Yiptong for the email.
2.7.1
- Changed the keys for the filesystem menu to be mnemonic rather than
arbitrary integers
- Documented the copying functionality in the filesystem menu
2.7.0
- Bug fix: Now when you have the tree on the right and you open it with
multiple windows stacked, it will take up the full height of the vim
window.
- Now line numbers always turned off in the tree by default
- Implemented copying of nodes (via the filesystem menu) for *nix/macosx
- took the help doc out of the script and repackaged the whole thing as a
zip
2.6.2
- Now when you try to open a file node into a window that is modified, the
window is not split if the &hidden option is set. Thanks to Niels Aan
de Brugh for this suggestion.
2.6.1
- Fixed a major bug with the <tab> mapping. Thanks to Zhang Weiwu for
emailing me.
2.6.0
- Extended the behaviour of <c-j/k>. Now if the cursor is on a file node
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.
- 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 of the next/prev of its parents siblings that is open and has
children. Go :help NERDTree-J and :help NERDTree-K for info.
- The goal of these changes is to make tree navigation faster.
- Reorganised the help page a bit.
- Removed the E mapping.
- bugfixes
2.5.0
- Added an option to enforce case sensitivity when sorting tree nodes.
Read :help NERDTreeCaseSensitiveSort for details. (thanks to Michael
Madsen for emailing me about this). Case sensitivity defaults to off.
- Made the script echo a "please wait" style message when opening large
directories. Thanks to AOYAMA Shotaro for this suggestion.
- Added 2 public functions that can be used to retrieve the treenode and
path that the cursor is on. Read :help NERDTreePublicFunctions for
details (thanks again to AOYAMA Shotaro for the idea :).
- added 2 new mappings for file nodes: "g<tab>" and "go". These are the
same as the "<tab>" and "o" maps except that the cursor stays in the
NERDTree. Note: these maps are slaved to the o and <tab> mappings, so if
eg you remap "<tab>" to "i" then the "g<tab>" map will also be changed
to "gi".
- Renamed many of the help tags to be simpler.
- Simplified the ascii "graphics" for the filesystem menu
- Fixed bugs.
- Probably created bugs.
- Refactoring.
2.4.0
- Added the P mapping to jump to the tree root.
- Added window centering functionality that can be triggered when doing
using any of the tree nav mappings. Essentially, if the cursor comes
within a certain distance of the top/bottom of the window then a zz is
done in the window. Two related options were added: NERDTreeAutoCenter
to turn this functionality on/off, and NERDTreeAutoCenterThreshold to
control how close the cursor has to be to the window edge to trigger the
centering.
2.3.0
- Tree navigation changes:
- Added J and K mappings to jump to last/first child of the current dir.
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 default.
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
with modifier keys).
- Made it so that, when any of the tree filters are toggled, the cursor
stays with the selected node (or goes to its parent/grandparent/... if
that node is no longer visible)
- Fixed an error in the doc for the mouse mode option.
- Made the quickhelp correctly display the current single/double click
mappings for opening nodes as specified by the NERDTreeMouseMode option.
- Fixed a bug where the script was spazzing after prompting you to delete
a modified buffer when using the filesystem menu.
- Refactoring
2.2.3
- Refactored the :echo output from the script.
- Fixed some minor typos in the doc.
- Made some minor changes to the output of the 'Tree filtering mappings'
part of the quickhelp
2.2.2
- More bugfixes... doh.
2.2.1
- Bug fix that was causing an exception when closing the nerd tree. Thanks
to Tim carey-smith and Yu Jun for pointing this out.
2.2.0
- Now 'cursorline' is set in the NERD tree buffer by default. See :help
NERDTreeHighlightCursorline for how to disable it.
2.1.2
- Stopped the script from clobbering the 1,2,3 .. 9 registers.
- Made it "silent!"ly delete buffers when renaming/deleting file nodes.
- Minor correction to the doc
- Fixed a bug when refreshing that was occurring when the node you
refreshed had been deleted externally.
- Fixed a bug that was occurring when you open a file that is already open
and modified.
2.1.1
- Added a bit more info about the buffers you are prompted to delete when
renaming/deleting nodes from the filesystem menu that are already loaded
into buffers.
- Refactoring and bugfixes
2.1.0
- Finally removed the blank line that always appears at the top of the
NERDTree buffer
- Added NERDTreeMouseMode option. If set to 1, then a double click is
required to activate all nodes, if set to 2 then a single click will
activate directory nodes, if set to 3 then a single click will activate
all nodes.
- Now if you delete a file node and have it open in a buffer you are given
the option to delete that buffer as well. Similarly if you rename a file
you are given the option to delete any buffers containing the old file
(if any exist)
- When you rename or create a node, the cursor is now put on the new node,
this makes it easy immediately edit the new file.
- Fixed a bug with the ! mapping that was occurring on windows with paths
containing spaces.
- Made all the mappings customisable. See |NERD_tree-mappings| for
details. A side effect is that a lot of the "double mappings" have
disappeared. E.g 'o' is now the key that is used to activate a node,
<CR> is no longer mapped to the same.
- Made the script echo warnings in some places rather than standard echos
- Insane amounts of refactoring all over the place.
2.0.0
- Added two new NERDChristmasTree decorations. First person to spot them
and email me gets a free copy of the NERDTree.
- Made it so that when you jump around the tree (with the p, s and S
mappings) it is counted as a jump by vim. This means if you, eg, push
'p' one too many times then you can go `` or ctrl-o.
- Added a new option called NERDTreeSortOrder which takes an array of
regexs and is used to determine the order that the treenodes are listed
in. Go :help NERDTreeSortOrder for details.
- Removed the NERDTreeSortDirs option because it is consumed by
NERDTreeSortOrder
- Added the 'i' mapping which is the same as <tab> but requires less
effort to reach.
- Added the ! mapping which is used to execute file in the tree (after it
prompts you for arguments etc)
More insane refactoring.
3.0.0
- hijack netrw so that doing an :edit <directory> will put a NERD tree in
the window rather than a netrw browser. See :help 'NERDTreeHijackNetrw'
- allow sharing of trees across tabs, see :help :NERDTreeMirror
- remove "top" and "bottom" as valid settings for NERDTreeWinPos
- change the '<tab>' mapping to 'i'
- change the 'H' mapping to 'I'
- lots of refactoring
==============================================================================
8. Credits *NERDTreeCredits*
7. Credits *NERDTreeCredits*
Thanks to Tim Carey-Smith for testing/using the NERD tree from the first
pre-beta version, for his many suggestions and for his constant stream of bug
complaints.
Thanks to the following people for testing, bug reports, ideas etc. Without
you I probably would have got bored of the hacking the NERD tree and
just downloaded pr0n instead.
Thanks to Vigil for trying it out before the first release :) and suggesting
that mappings to open files in new tabs should be implemented.
Thanks to Nick Brettell for testing, fixing my spelling and suggesting i put a
.. (up a directory)
line in the gui.
Thanks to Thomas Scott Urban - the author of the vtreeexplorer plugin - whose
gui code i borrowed from.
Thanks to Terrance Cohen for pointing out a bug where the script was changing
vims CWD all over the show.
Thanks to Yegappan Lakshmanan (author of Taglist and other orgasmically
wonderful plugins) for telling me how to fix a bug that was causing vim to go
into visual mode everytime you double clicked a node :)
Thanks to Jason Mills for sending me a fix that allows windows paths to use
forward slashes as well as backward.
Thanks to Michael Geddes (frogonwheels on #vim at freenode) for giving me some
tips about syntax highlighting when i was doing highlighting for the
quickhelp.
Thanks to Yu Jun for emailing me about a bug that was occurring when closing
the tree.
Thanks to Michael Madsen for emailing me about making case sensitivity
optional when sorting nodes.
Thanks to AOYAMA Shotaro for suggesting that i echo a "please wait" message
when opening large directories.
Thanks to Michael Madsen for requesting the NERDTreeCaseSensitiveSort option.
Thanks to AOYAMA Shotaro for suggesting that a "please wait" style message be
echoed when opening large directories. Also, thanks for the suggestion of
having public functions in the script to access the internal data :D
Thanks to Zhang Weiwu for emailing me about a bug with the the <tab> mapping
in 2.6.0
Thanks to Niels Aan de Brugh for the suggestion that the script now split the
window if you try to open a file in a window containing a modified buffer when
the &hidden option is set.
Thanks to Olivier Yiptong for prompting me to make line numbers in the
NERD tree window optional.
Thanks to Zhang Shuhan for all of his emails and testing to help improve the
NERD tree path handling. Thanks also for suggesting the bookmarks gui, and for
testing and his many suggestions and bugreports about bookmarks.
Thanks to Cory Echols for sending a patch to add the :NERDTreeClose command and
set the NERD tree buffers filetype to 'nerdtree'
Thanks to Piotr Czachur for all his suggestions and testing for the bookmarks
feature.
Thanks to Yuan Jiang for suggesting the "o" mapping shouldnt clobber "special"
windows, like taglist.
Thanks to Matan Nassau for the patch to add the NERDTreeQuitOnOpen option.
Thanks to Maxim Kim for reporting a bug with g<tab> and go mappings when
NERDTreeQuitOnOpen was set.
Thanks to Charlton Wang for reporting bugs with the 'o' mapping and with
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.
Tim Carey-Smith (halorgium)
Vigil
Nick Brettell
Thomas Scott Urban
Terrance Cohen
Yegappan Lakshmanan
Jason Mills
Michael Geddes (frogonwheels)
Yu Jun
Michael Madsen
AOYAMA Shotaro
Zhang Weiwu
Niels Aan de Brugh
Olivier Yiptong
Zhang Shuhan
Cory Echols
Piotr Czachur
Yuan Jiang
Matan Nassau
Maxim Kim
Charlton Wang
Matt Wozniski (godlygeek)
knekk
Sean Chou
Ryan Penn
Simon Peter Nicholls
Michael Foobar
Tomasz Chomiuk
Denis Pokataev
Tim Pope (tpope)
James Kanze
James Vega (jamessan)
Frederic Chanal (nach)
Alf Mikula
Lucas S. Buchala
==============================================================================
9. License *NERDTreeLicense*
8. License *NERDTreeLicense*
The NERD tree is released under the wtfpl.
See http://sam.zoy.org/wtfpl/COPYING.

File diff suppressed because it is too large Load Diff