* Define default values for new variables governing new "Default Open".
"Default Open" means to open a file with the Enter key (which of course
can be changed.) The key can be changed in the vimrc, and there is a
variable for specifying the Opener parameters for opening the node. This
lets the user decide whether Enter (or another key) will open a file in
the current tab or a new one, and whether or not to open the file again
in the tab or jump to a window where the file is already open.
* Remove the old mapping for <CR>, a duplicate of 'o'.
<CR> will be defined like all the other keys, in plugin/NERD_tree.vim
* Assign functions to the new <CR> key mapping.
Three separate functions handle directories, files, and bookmarks.
* Rename variables: NERDTreeCustomOpen and NERDTreeCustomOpenArgs
* Add documentation for NERDTreeCustomOpenArgs and NERDTree-<CR>.
* Make key mapping variables be indexed in the Vim help
* Remove angle brackets from <CR> to see if help navigation improves.
* Rename functions from defaultOpen... to customOpen...
* Use separate options for file and directory nodes.
* Update documentation for separate file/directory options.
* Update version number and change log.
* Change CR to <CR> in help tags.
* Fix missing backtick in patch number.
* Update the quickhelp text.
* Update Pull Request template.
* Update change log with simpler formatting of patch number.
* Get NERDTree version number directly from CHANGELOG.md
* Reformat the lists of contributors in the Change Log.
* Initialize the version text, just in case the while loop finds nothing.
* Fix NERDTree opening with the wrong size.
There were two commands that seemed to be causing the NERDTree window to
open in exactly half the screen width. They are:
- silent! execute 'edit ' . t:NERDTreeBufName in _createTreeWin()
- setlocal nobuflisted in _setCommonBufOptions()
These commands were reseting the width of NERDTree. The solution I chose
was to resize the window after creating the new window, and then to set
winfixwidth before setting the other common buffer options.
* Update change log and version number.
* Update CHANGELOG and change it to Markdown format.
* Add PR template with checklist for advancing the version number.
* Update version number.
* Change PR number in change log and PR template.
* Add menu item to copy the node's path to the clipboard.
It works on Mac. Check Windows later.
* Handle case where clipboard is not a compiled feature of Vim.
* Change menu text if clipboard is unavailable.
* Fix "R doesn't work when doing 'vim <folder>'" a different way.
Instead of assigning a value to t:NERDTreeBufName for a window tree,
which is used to determine if NERDTree is open, simply also look at the
current buffer's name to see if it matches the NERDTree pattern.
* Replace hardcoded buffer name prefix with BufNamePrefix() function.
* Add debugging messages to diagnose issue #931.
* Echo the CWD and NERDTree root too.
* Ensure DirArrows are trimmed to a single character.
Actually, it's up to the user to make sure it's a single character after
leading and trailing spaces are removed. Spaces need to be removed so
that an accurate level of indentation can be calculated.
* Remove debugging statements
* Simplify the algorithm for calculating indentation level.
1. Replace the DirArrows with a single space.
2. Count the leading spaces.
3. Divide by 2.
This allows users to specify multi-character arrows, where a spaces
prevent characters printing on top of each other.
* Better default node delimiter, based on presence of +conceal feature.
* Update documentation for node delimiter.
* Fix IF logic, and remove debug statements.
* Rewrite the NERDTreeNodeDelimiter help text to reflect new behavior.
* Change "NERD tree" to "NERDTree" and fix spacing in doc file.
* Extract the menu action prompts to a function
* Add a NERDTreeMinimalMenu configuration option
If this option is set, Vim’s command line displays
a single-line version of the menu:
Which action? (a*/m/d/r/o/q/c/l):
Pressing ‘a’ will call the ‘add child node’ menu
item as that is its shortcut.
The * denotes the position of the currently
selected menu item which can be changed with
NERDTreeMenuDown and Up in the usual way.
The user may wish to set these to <left>, <right>
or h, l if they prefer.
* Minimise the text once a menu item is chosen
If NERDTreeMinimalMenu is set, then echo a single
line prompt after the menu item is chosen. This
reduces noise for users who are already familiar
with how the menu works and prevents Vim scrolling
down to accommodate the menu text.
If the directory is non-empty we display
‘Delete directory?’ instead of ‘Delete?’ and the
user must still type ‘yes’ to confirm, rather than
just pressing ‘y’.
* Document the new NERDTreeMinimalMenu feature
* Tweak the format for the minimal menu prompt
As per @PhilRunninger’s suggestions:
- The menu now shows the ‘j/k/enter’ help text
- The first word of the selected item is shown*
- Use commas between menu items so that it’s
visually distinct from the ‘j/k/enter’ text
* I tried displaying the full menuItem text, but
this can be quite long, e.g.
> (o)pen the current node with system editor
This causes the menu to jump around a lot. We
could add another minimal versions of these, but
I think the first word seems ok for now.
* Add function to preview bookmarks.
File bookmarks are previewed like regular file nodes.
Directory bookmarks are located with NERDTreeFind in the current tree.
* Update help doc to include the new bookmark preview functionality.
* Update documentation for new NERDTreeQuitOnOpen values.
* Modify use of NERDTreeQuitOnOpen, keeping current behavior.
* If applicable, close the bookmarks table before opening the target.
* Add a new NERDTree buffer command to edit the bookmarks file.
* Update the mini-help panel with missing bookmark commands.
* Update the help file with the new :EditBookmarks command.
* Add new command to open NERDTree in the root of a VCS repository.
* Add another example to the help file.
* Refactor and make NERDTreeVCS work on Windows.
* Don't crash when NERDTreeVCS is given a nonexistent folder.
* Move VCS code to a plugin script.
* Add some documentation to the top of vcs.vim.
This function was added to support a separate plugin:
https://github.com/scrooloose/nerdtree-project-plugin.git. It was
subsequently removed without recognizing its contribution to the
external plugin. This commit restores that function so NERDTree projects
will work.
* Change the default node delimiter to the BELL character, \x07.
* Syntax match by ASCII code, vs. string concatenation.
* Document the NERDTreeNodeDelimiter setting.
* Clean up the documentation markup.
* Remove apostrophes, since the NERDTree settings aren't vim options.
* Use backticks to hot-link the referenced vim options.
* Add a modeline.
* Update the title and the About section of the documentation.
* Fix typo, and clarify branches of code in Github.
* Fix wrapping to 78, and remove colorcolumn setting from modeline.
* Change the ASCI Art title, and give credit for it.
* Change the word option to setting, and redo the word wrapping.
I want to reserve the word 'option' to mean only Vim options that are
changed with the `:set` command. Since we need to use `:let` to
establish the values for the NERDTree variables, I choose to call them
settings instead.
* Realign hot-links with concealed markup tags taken into account.
* Text alignment, typo fixes, and wordsmithing the About section.
* Add two more disqualifications for isCascadable().
A directory that is bookmarked or that is a symlink to another location
has trailing text indicating so. This extra text causes problem when
cascading with a directory underneath it, so disable it in this case.
* Add comments to explain the new exclusions for bookmarks and symlinks.