The NERD tree : A tree explorer plugin for navigating the filesystem

script versions

Click on the package to download.

package script version date Vim version user release notes

NERD_tree.zip 5.0.0 2015-11-13 7.3 Marty Grenfell - Refactor the code significantly:

* Break the classes out into their own files.

* Make the majority of the code OO - previously large parts were

effectively a tangle of "global" methods.

- Add an API to assign flags to nodes. This allows VCS plugins like

https://github.com/Xuyuanp/nerdtree-git-plugin to exist. Thanks to

Xuyuanp for helping design/test/build said API.

- add 'scope' argument to the key map API see :help NERDTreeAddKeyMap()

- add magic [[dir]] and [[file]] flags to NERDTreeIgnore

- add support for custom path filters. See :help NERDTreeAddPathFilter()

- add path listener API. See :help NERDTreePathListenerAPI.

- expand the fs menu functionality to list file properties (PhilRunninger,

apbarrero, JESii)

- make bookmarks work with `~` home shortcuts (hiberabyss)

- show OSX specific fsmenu options in regular vim on mac (evindor)

- make dir arrow icons configurable (PickRelated)

- optimise node sorting performance when opening large dirs (vtsang)

- make the root note render prettier by truncating it at a path slash (gcmt)

- remove NERDChristmasTree option - its always christmas now

- add "cascade" open and closing for dirs containing only another single

dir. See :help NERDTreeCascadeOpenSingleChildDir (pendulm)



Many other fixes, doc updates and contributions from:

actionshrimp

SchDen

egalpin

cperl82 - many small fixes

toiffel

WoLpH

handcraftedbits

devmanhinton

xiaodili

zhangoose

gastropoda

mixvin

alvan

lucascaton

kelaban

shanesmith

staeff

pendulm

stephenprater

franksort

agrussellknives

AndrewRadev

Twinside



nerdtree.zip 4.2.0 2011-12-28 7.0 Marty Grenfell * Add NERDTreeDirArrows option to make the UI use pretty arrow chars instead of the old +~| chars to define the tree structure (sickill)

* shift the syntax highlighting out into its own syntax file (gnap) * add some mac specific options to the filesystem menu - for macvim only (andersonfreitas)

* Add NERDTreeMinimalUI option to remove some non functional parts of the nerdtree ui (camthompson)

* tweak the behaviour of :NERDTreeFind - see :help :NERDTreeFind for the new behaviour (benjamingeiger)

* if no name is given to :Bookmark, make it default to the name of the target file/dir (minyoung)

* use 'file' completion when doing copying, create, and move operations (EvanDotPro)

* lots of misc bug fixes (paddyoloughlin, sdewald, camthompson, Vitaly Bogdanov, AndrewRadev, mathias, scottstvnsn, kml, wycats, me RAWR!)



NERD_tree.zip 4.1.0 2009-12-01 7.0 Marty Grenfell features:

- add NERDTreeFind to reveal the node for the current buffer in

the tree, see |NERDTreeFind|. This effectively merges the

FindInNERDTree plugin (by Doug McInnes) into the script.

- make NERDTreeQuitOnOpen apply to the t/T keymaps too.

Thanks to Stefan Ritter and Rémi Prévost.

- truncate the root node if wider than the tree window.

Thanks to Victor Gonzalez.



bugfixes:

- really fix window state restoring

- fix some win32 path escaping issues. Thanks to Stephan

Baumeister, Ricky, jfilip1024, and Chris Chambers



NERD_tree.zip 4.0.0 2009-10-09 7.0 Marty Grenfell - add a new programmable menu system (see :help

NERDTreeMenu).

- add new APIs to add menus/menu-items to the menu system as

well as custom key mappings to the NERD tree buffer (see

:help NERDTreeAPI).

- removed the old API functions

- added a mapping to maximize/restore the size of nerd tree

window, thanks to Guillaume Duranceau for the patch. See

:help NERDTree-A for details.



- fix a bug where secondary nerd trees (netrw hijacked

trees) and NERDTreeQuitOnOpen didnt play nicely, thanks to

Curtis Harvey.

- fix a bug where the script ignored directories whose name

ended in a dot, thanks to Aggelos Orfanakos for the patch.

- fix a bug when using the x mapping on the tree root,

thanks to Bryan Venteicher for the patch.

- fix a bug where the cursor position/window size of the

nerd tree buffer wasnt being stored on closing the window,

thanks to Richard Hart.

- fix a bug where NERDTreeMirror would mirror the wrong tree



NERD_tree.zip 3.1.1 2009-06-07 7.0 Marty Grenfell - fix a bug where a non-listed no-name buffer was getting created every

time the tree window 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 an error when using :set nohidden and opening a file where the previous

buf was modified. Thanks iElectric

- other minor fixes



NERD_tree.zip 3.1.0 2009-01-27 7.0 Marty Grenfell 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)



NERD_tree.zip 3.0.1 2009-01-12 7.0 Marty Grenfell 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



More insane refactoring.



NERD_tree.zip 3.0.0 2009-01-02 7.0 Marty Grenfell - 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' (capital i)

- lots of refactoring



NERD_tree.zip 2.14.3 2008-12-12 7.0 Marty Grenfell 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

NERD_tree.zip 2.14.2 2008-10-29 7.0 Marty Grenfell - compatibility bugfix for older versions of vim, thanks to

knekk for helping me track it down and to Sean Chou.

- 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.



NERD_tree.zip 2.14.1 2008-10-11 7.0 Marty Grenfell - dont clobber &cpo. Thanks to godlygeek for the bug report

- a bunch of other minor fixes and refactoring



NERD_tree.zip 2.14.0 2008-09-06 7.0 Marty Grenfell - 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



NERD_tree.zip 2.13.0 2008-07-20 7.0 Marty Grenfell - 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.



NERD_tree.zip 2.12.0 2008-07-04 6.0 Marty Grenfell - 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



NERD_tree.zip 2.11.0 2008-06-23 7.0 Marty Grenfell - 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)

- other minor fixes



NERD_tree.zip 2.10.0 2008-06-17 7.0 Marty Grenfell - 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

- changed license to wtfpl



NERD_tree.zip 2.9.0 2008-05-16 7.0 Marty Grenfell - 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"

NERD_tree.zip 2.8.0 2008-03-30 7.0 Marty Grenfell added an option to enable/disable line numbers in the NERD tree window. See :help NERDTreeShowLineNumbers for details. Thanks to Olivier Yiptong for the email.

NERD_tree.zip 2.7.1 2008-01-18 7.0 Marty Grenfell - Changed the keys for the filesystem menu to be mnemonic rather than arbitrary integers

- Documented the copying functionality in the filesystem menu



NERD_tree.zip 2.7.0 2007-11-02 7.0 Marty Grenfell - 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



NERD_tree.vim 2.6.2 2007-08-25 7.0 Marty Grenfell 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.



NERD_tree.vim 2.6.1 2007-07-07 7.0 Marty Grenfell - Fixed a stupid (but major) bug with the <tab> mapping. Thanks to Zhang Weiwu for

emailing me.



NERD_tree.vim 2.6.0 2007-07-06 7.0 Marty Grenfell - 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



NERD_tree.vim 2.5.0 2007-06-25 7.0 Marty Grenfell - 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.



NERD_tree.vim 2.4.0 2007-06-16 7.0 Marty Grenfell - 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. See |NERDTreeAutoCenter| for info.



NERD_tree.vim 2.3.0 2007-05-23 7.0 Marty Grenfell - 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



NERD_tree.vim 2.2.3 2007-05-12 7.0 Marty Grenfell - Fixed some minor typos in the doc.

- Made some minor changes to the output of the 'Tree filtering mappings'

part of the quickhelp

- Some internal refactoring



NERD_tree.vim 2.2.2 2007-04-30 7.0 Marty Grenfell Yet more bugfixes... doh

NERD_tree.vim 2.2.1 2007-04-29 7.0 Marty Grenfell - fixed a bug that was causing an exception when closing the nerd tree. Thanks

to Tim carey-smith and Yu Jun for pointing this out.



NERD_tree.vim 2.2.0 2007-04-28 7.0 Marty Grenfell - Now 'cursorline' is set in the NERD tree buffer by default. See :help

NERDTreeHighlightCursorline for how to disable it.



NERD_tree.vim 2.1.2 2007-04-20 7.0 Marty Grenfell - 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.



NERD_tree.vim 2.1.1 2007-04-06 7.0 Marty Grenfell - 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



NERD_tree.vim 2.1.0 2007-03-28 7.0 Marty Grenfell - 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.

- Finally removed the blank line that always appears at the top of the

NERDTree buffer

NERD_tree.vim 2.0.0 2007-03-21 7.0 Marty Grenfell - 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 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)



NERD_tree.vim 1.4.1 2007-03-11 7.0 Marty Grenfell Fixed a bug that was preventing the script from opening files that contained a space in linux.

Fixed a syntax highlighting bug in the quickhelp.

Some refactoring.

NERD_tree.vim 1.4.0 2007-02-27 7.0 Marty Grenfell *directories can now be renamed via the filesystem menu



*some refactoring and bugfixes



*rewrote the quickhelp that is toggled from the nerd tree window



*added syntax highlighting to the quickhelp - thanks to Michael Geddes (aka frogonwheels) for his syntax highlighting tips on #vim



*added some pretty syntax highlighting to the tree parts and added a new option called NERDChristmasTree to turn the highlighting off if it is driving you insane (go :help NERDChristmasTree for details)



NERD_tree.vim 1.3.1 2007-01-22 6.0 Marty Grenfell *numerous fixes relating to the filesystem menu

*incorporated a fix that allows the NERD tree to handle windows paths separated by either forward slashes OR backslashes... thanks to Jason Mills for emailing me this fix! :D

NERD_tree.vim 1.3 2007-01-18 6.0 Marty Grenfell *Now you can delete directories as well as files from the tree



*The NERDTreeChDirMode option now defaults to 1... setting it to 0 causes a small bug for windows users (see :help NERDTreeChDirMode for details)



*Opening a NERDTree on a different drive will now work for windows users



*now the X mapping recursively closes all the children of the selected node. Previously it didnt recurse into the child nodes.

NERD_tree.vim 1.2 2006-11-13 7.0 Marty Grenfell *added X mapping which closes all the child directory nodes of the current node



*when you create a new node you can backspace etc to type in the full path - before you had to create it in the directory of the current node

*the script now tells you when it has finished a refresh operation (via r and R mappings)

*the script also tells you when it has finished a recursive open operation (via O mapping)

*the filesystem menu now works with single keystrokes where possible (i.e. you dont have to push enter all the time)



*the script doesnt spaz out when you try to edit a ~ in windows anymore

NERD_tree.vim 1.1.1 2006-10-26 7.0 Marty Grenfell Bug fixes:

*now when you open a node by double clicking it, vim doesnt go into visual mode. Thanks to Yegappan Lakshmanan for telling me how to fix this bug :D

*added some "be patient" messages when you doing time consuming operations like recursively opening a directory or refreshing the tree

*fixed a minor bug when moving the tree root up

NERD_tree.vim 1.1.0 2006-10-10 6.0 Marty Grenfell New mappings:

* 'cd' changes vim's current working dir to that of the selected node

* 'q' calls :NERDTreeToggle to close the NERD tree window



*opening a dir node recursively now doesnt open dir nodes if the script is instructed to ignore then via file-filters or the hidden-file filter. This increases performance insanely! Esp. if you have .svn dirs.



*added the NERDTreeChDirMode option which tells the script if/when to change vims current working dir. Go :help NERDTreeChDirMode for details.



*fixed a feature where vim's current working directory was getting changed all over the show. Now it is never changed unless instructed to do so. Via mappings or the NERDTreeChDirMode option. Thanks to Terrance Cohen for emailing me about this :)



*random bug fixes

NERD_tree.vim 1.0.0 2006-10-04 7.0 Marty Grenfell *refreshing a directory now works without closing all the children dir nodes for the refreshed node

*we now have a '.. (up a dir)' line at the top of the tree which moves the root up a dir when you open it.

*added a 'recursively open directory' mapping

*readonly files are now highlighted

*fixed bugs



NERD_tree.vim 1.0beta3 2006-09-27 7.0 Marty Grenfell New mappings:

*'e' and 'middlemouse' open an explorer window of the current dir in the previous window.

*'E' is like 'e' except the explorer is opened in a new split window.

*'F' toggles whether files are displayed in the tree or not (this is handy when moving to a different part of the tree).

*'D' (toggle hidden files) has been changed to 'H'

*'m' brings up the 'filesystem menu' which allows you to do simple filesystem operations: create files/dirs and rename/delete files.



*The position on the NERD tree window is customisable with the new NERDTreeSplitVertical and NERDTreeWinPos options.

*The new NERDTreeShowFiles option allows you to specify whether files are shown on startup. This option, in conjunction with the e/E/middle-mouse mappings allows you to use the NERDTree like windows explorer.



*Now the H and f mappings work without causing the tree root to be refreshed (so all your nodes dont get closed).



*Fixed bugs.