mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-09 11:53:48 -05:00
Compare commits
109 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95ee07c9d3 | ||
|
|
b58ccce913 | ||
|
|
b60bcb6cb2 | ||
|
|
f7e8c453ea | ||
|
|
58ccd230fa | ||
|
|
866df769b5 | ||
|
|
bd3b03fd79 | ||
|
|
9030ff0312 | ||
|
|
5172efc976 | ||
|
|
b252a1250a | ||
|
|
dae5c93fec | ||
|
|
004b4fc9dd | ||
|
|
7614f745ae | ||
|
|
585b5f1579 | ||
|
|
bc41c51f93 | ||
|
|
0888f6c011 | ||
|
|
df8f132d6e | ||
|
|
d7a319c3a6 | ||
|
|
5a45ea08c4 | ||
|
|
ec7e013150 | ||
|
|
5b35d0bb31 | ||
|
|
40ccf3cd45 | ||
|
|
1b17f945a3 | ||
|
|
421431b5df | ||
|
|
26983f1921 | ||
|
|
1571274aec | ||
|
|
a111af5361 | ||
|
|
64514e3ceb | ||
|
|
bcc690a141 | ||
|
|
397dee5cb1 | ||
|
|
dbb0677749 | ||
|
|
0fed73d83a | ||
|
|
3a437b402a | ||
|
|
1d9564db54 | ||
|
|
c63e183acf | ||
|
|
6334e99192 | ||
|
|
776aeef26f | ||
|
|
1d6516b96d | ||
|
|
995f7faec3 | ||
|
|
140deac284 | ||
|
|
6e24eed04a | ||
|
|
82c1fece9f | ||
|
|
371379a860 | ||
|
|
0a91f3511e | ||
|
|
192424429d | ||
|
|
3092355648 | ||
|
|
ae50662943 | ||
|
|
8529b6f0e3 | ||
|
|
d718f1098c | ||
|
|
0501fc825c | ||
|
|
05ce3ab896 | ||
|
|
642c2b76fc | ||
|
|
6b7760e6e4 | ||
|
|
5cafc7018d | ||
|
|
332756282a | ||
|
|
bcc1180510 | ||
|
|
2ecd6ebd63 | ||
|
|
5a4ef66db2 | ||
|
|
a537e1535c | ||
|
|
44e8534f1f | ||
|
|
c108a19881 | ||
|
|
5685fa7af4 | ||
|
|
990706b725 | ||
|
|
6e60ecfee1 | ||
|
|
219d16f61a | ||
|
|
5fd7441dbe | ||
|
|
a5f86e1a8f | ||
|
|
782e60efc9 | ||
|
|
7b26dac959 | ||
|
|
600f2cac14 | ||
|
|
fb3c4f9212 | ||
|
|
24c1f6beab | ||
|
|
3e507620fe | ||
|
|
a520080cc3 | ||
|
|
b747086137 | ||
|
|
7a1dbcbdb0 | ||
|
|
ce9fece626 | ||
|
|
90fd47bd00 | ||
|
|
80e0bca4dc | ||
|
|
04ea2eb0f7 | ||
|
|
25aaaaae42 | ||
|
|
8a32f5851f | ||
|
|
6018625170 | ||
|
|
c36aaf55f8 | ||
|
|
6e7960ba94 | ||
|
|
f1a9bd3c89 | ||
|
|
191dcc4068 | ||
|
|
0d62ffd5db | ||
|
|
510f890ee1 | ||
|
|
06db1cdf2c | ||
|
|
0eaaf6842c | ||
|
|
2ed6524b9d | ||
|
|
fb7f66dc47 | ||
|
|
dcf9e956a7 | ||
|
|
8aafa66eac | ||
|
|
f2ce7390b8 | ||
|
|
7275d89a35 | ||
|
|
e6479c36f3 | ||
|
|
da76bafaef | ||
|
|
ec76876a74 | ||
|
|
ef1a466342 | ||
|
|
56dd5f05ab | ||
|
|
92a006f51c | ||
|
|
7d1cc4ecec | ||
|
|
c008fb3983 | ||
|
|
8654b98b09 | ||
|
|
5e3e95d168 | ||
|
|
faabc8c47d | ||
|
|
91d5a52c39 |
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
*~
|
||||
*.swp
|
||||
tags
|
||||
18
Rakefile
Normal file
18
Rakefile
Normal file
@@ -0,0 +1,18 @@
|
||||
desc "Copy the vim/doc files into ~/.vim"
|
||||
task :deploy_local do
|
||||
run "cp plugin/NERD_tree.vim ~/.vim/plugin"
|
||||
run "cp doc/NERD_tree.txt ~/.vim/doc"
|
||||
end
|
||||
|
||||
|
||||
desc "Create a zip archive for release to vim.org"
|
||||
task :zip do
|
||||
abort "NERD_tree.zip already exists, aborting" if File.exist?("NERD_tree.zip")
|
||||
run "zip NERD_tree.zip plugin/NERD_tree.vim doc/NERD_tree.txt"
|
||||
end
|
||||
|
||||
def run(cmd)
|
||||
puts "Executing: #{cmd}"
|
||||
system cmd
|
||||
end
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
omg its ... ~
|
||||
|
||||
________ ________ _ ____________ ____ __________ ____________~
|
||||
/_ __/ / / / ____/ / | / / ____/ __ \/ __ \ /_ __/ __ \/ ____/ ____/~
|
||||
@@ -21,9 +21,10 @@ CONTENTS *NERDTree-contents*
|
||||
|
||||
1.Intro...................................|NERDTree|
|
||||
2.Functionality provided..................|NERDTreeFunctionality|
|
||||
2.1 Commands..........................|NERDTreeCommands|
|
||||
2.2 NERD tree mappings................|NERDTreeMappings|
|
||||
2.3 The filesystem menu...............|NERDTreeFilesysMenu|
|
||||
2.1 Global commands...................|NERDTreeGlobalCommands|
|
||||
2.2 Bookmark commands.................|NERDTreeBookmarkCommands|
|
||||
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|
|
||||
@@ -57,13 +58,15 @@ The following features and functionality are provided by the NERD tree:
|
||||
* Mappings to change the current root of the tree
|
||||
* Mappings to navigate around the tree
|
||||
* ...
|
||||
* Directories and files can be bookmarked.
|
||||
* Most NERD tree navigation can also be done with the mouse
|
||||
* Dynamic customisation of tree content
|
||||
* 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
|
||||
* A textual filesystem menu is provided which allows you to
|
||||
create/delete/rename file and directory nodes
|
||||
create/delete/rename file and directory nodes as well as copy (for
|
||||
supported OSs)
|
||||
* The position and size of the NERD tree window can be customised
|
||||
* The order in which the nodes in the tree are listed can be customised.
|
||||
* A model of your filesystem is created/maintained as you explore it. This
|
||||
@@ -81,22 +84,69 @@ The following features and functionality are provided by the NERD tree:
|
||||
2. Functionality provided *NERDTreeFunctionality*
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
2.1. Commands *NERDTreeCommands*
|
||||
2.1. Global Commands *NERDTreeGlobalCommands*
|
||||
|
||||
:NERDTree [start-directory] *:NERDTree*
|
||||
Opens a fresh NERD tree in [start-directory] or the current
|
||||
directory if [start-directory] isn't specified.
|
||||
For example: >
|
||||
:NERDTree [<start-directory> | <bookmark>] *:NERDTree*
|
||||
Opens a fresh NERD tree. The root of the tree depends on the argument
|
||||
given. There are 3 cases: If no argument is given, the current directory
|
||||
will be used. If a directory is given, that will be used. If a bookmark
|
||||
name is given, the corresponding directory will be used. For example: >
|
||||
:NERDTree /home/marty/vim7/src
|
||||
< will open a NERD tree in /home/marty/vim7/src.
|
||||
:NERDTree foo (foo is the name of a bookmark)
|
||||
<
|
||||
:NERDTreeFromBookmark <bookmark> *:NERDTreeFromBookmark*
|
||||
Opens a fresh NERD tree with the root initialized to the dir for
|
||||
<bookmark>. This only reason to use this command over :NERDTree is for
|
||||
the completion (which is for bookmarks rather than directories).
|
||||
|
||||
:NERDTreeToggle [start-directory] *:NERDTreeToggle*
|
||||
If a NERD tree already exists for this tab, it is reopened and
|
||||
rendered again. If no NERD tree exists for this tab then this
|
||||
command acts the same as the |:NERDTree| command.
|
||||
:NERDTreeToggle [<start-directory> | <bookmark>] *:NERDTreeToggle*
|
||||
If a NERD tree already exists for this tab, it is reopened and rendered
|
||||
again. If no NERD tree exists for this tab then this command acts the
|
||||
same as the |:NERDTree| command.
|
||||
|
||||
:NERDTreeClose
|
||||
Close the NERD tree in this tab.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
2.2. NERD tree Mappings *NERDTreeMappings*
|
||||
2.2. Bookmark Commands *NERDTreeBookmarkCommands*
|
||||
|
||||
Bookmarks in the NERD tree are a way to tag files or directories of interest.
|
||||
For example, you could use bookmarks to tag all of your project directories.
|
||||
See also |:NERDTree| and |:NERDTreeFromBookmark|.
|
||||
|
||||
Note that the following commands are only available in the NERD tree buffer.
|
||||
|
||||
:Bookmark <name>
|
||||
Bookmark the current node as <name>. If there is already a <name>
|
||||
bookmark, it is overwritten. <name> must consist of alphanumeric
|
||||
characters and underscores.
|
||||
|
||||
:BookmarkToRoot <bookmark>
|
||||
Make the directory corresponding to <bookmark> the new root. If a treenode
|
||||
corresponding to <bookmark> is already cached somewhere in the tree then
|
||||
the current tree will be used, otherwise a fresh tree will be opened.
|
||||
Note that if <bookmark> points to a file then its parent will be used
|
||||
instead.
|
||||
|
||||
:RevealBookmark <bookmark>
|
||||
If the node is cached under the current root then it will be revealed
|
||||
(i.e. directory nodes above it will be opened) and the cursor will be
|
||||
placed on it.
|
||||
|
||||
:OpenBookmark <bookmark>
|
||||
<bookmark> must point to a file. The file is opened as though |NERDTree-o|
|
||||
was applied. If the node is cached under the current root then it will be
|
||||
revealed and the cursor will be placed on it.
|
||||
|
||||
:ClearBookmarks [<bookmarks>]
|
||||
Remove all the given bookmarks. If no bookmarks are given then remove all
|
||||
bookmarks on the current node.
|
||||
|
||||
:ClearAllBookmarks
|
||||
Remove all bookmarks.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
2.3. NERD tree Mappings *NERDTreeMappings*
|
||||
|
||||
Default Description~ help-tag~
|
||||
Key~
|
||||
@@ -311,7 +361,8 @@ Default key: C
|
||||
Map option: NERDTreeMapChdir
|
||||
Applies to: directories.
|
||||
|
||||
Made the selected directory node the new tree root.
|
||||
Make the selected directory node the new tree root. If a file is selected, its
|
||||
parent is used.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*NERDTree-u*
|
||||
@@ -468,6 +519,8 @@ NERD tree. These options should be set in your vimrc.
|
||||
|
||||
|NERDTreeIgnore| Tells the NERD tree which files to ignore.
|
||||
|
||||
|NERDTreeBookmarksFile| Where the bookmarks are stored.
|
||||
|
||||
|NERDTreeMouseMode| Tells the NERD tree how to handle mouse
|
||||
clicks.
|
||||
|
||||
@@ -477,6 +530,9 @@ NERD tree. These options should be set in your vimrc.
|
||||
|NERDTreeShowHidden| Tells the NERD tree whether to display hidden
|
||||
files on startup.
|
||||
|
||||
|NERDTreeShowLineNumbers| Tells the NERD tree whether to display line
|
||||
numbers in the tree window.
|
||||
|
||||
|NERDTreeSortOrder| Tell the NERD tree how to sort the nodes in
|
||||
the tree.
|
||||
|
||||
@@ -578,10 +634,6 @@ the CWD is changed whenever the tree root is changed. For example, if the CWD
|
||||
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.
|
||||
|
||||
Note to windows users: it is highly recommended that you have this option set
|
||||
to either 1 or 2 or else the script wont function properly if you attempt to
|
||||
open a NERD tree on a different drive to the one vim is currently in.
|
||||
|
||||
Authors note: at work i have this option set to 1 because i have a giant ctags
|
||||
file in the root dir of my project. This way i can initialise the NERD tree
|
||||
with the root dir of my project and always have ctags available to me --- no
|
||||
@@ -617,6 +669,13 @@ line: >
|
||||
The file filters can be turned on and off dynamically with the |NERDTree-f|
|
||||
mapping.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*NERDTreeBookmarksFile*
|
||||
Values: a path
|
||||
Default: $HOME/.NERDTreeBookmarks
|
||||
|
||||
This is where bookmarks are saved. See |NERDTreeBookmarkCommands|.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*NERDTreeMouseMode*
|
||||
Values: 1, 2 or 3.
|
||||
@@ -659,6 +718,17 @@ Use one of the follow lines to set this option: >
|
||||
let NERDTreeShowHidden=1
|
||||
<
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*NERDTreeShowLineNumbers*
|
||||
Values: 0 or 1.
|
||||
Default: 0.
|
||||
|
||||
This option tells vim whether to display line numbers for the NERD tree
|
||||
window. Use one of the follow lines to set this option: >
|
||||
let NERDTreeShowLineNumbers=0
|
||||
let NERDTreeShowLineNumbers=1
|
||||
<
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*NERDTreeSortOrder*
|
||||
Values: a list of regular expressions.
|
||||
@@ -688,7 +758,7 @@ Other examples: >
|
||||
(3) ['\/$', '\.rb$', '\.php$', '*', '\.swp$', '\.bak$', '\~$']
|
||||
<
|
||||
1. Directories will appear last, everything else will appear above.
|
||||
2. Every will simply appear in alphabetical order.
|
||||
2. Everything will simply appear in alphabetical order.
|
||||
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.
|
||||
|
||||
@@ -770,6 +840,29 @@ fridge for later ;)
|
||||
==============================================================================
|
||||
7. Changelog *NERDTreeChangelog*
|
||||
|
||||
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
|
||||
|
||||
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"
|
||||
|
||||
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
|
||||
@@ -978,3 +1071,15 @@ 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 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.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user