Commit Graph

31 Commits

Author SHA1 Message Date
Phil Runninger
5e77fb2fef
Fix example code for the NERDTreeAddKeyMap function. (#1116)
* Fix example code for the NERDTreeAddKeyMap function.

The quickhelpText didn't match what the statement in the callback
function actually did.

* Update version number in change log.
2020-05-03 01:21:34 -04:00
Phil Runninger
d706f40ae7 Update the documentation/README. 2020-02-06 13:01:04 -05:00
Phil Runninger
e48b5728f9 NERDTree <start-directory> always sets NERDTree root. 2020-01-28 03:55:58 -05:00
Caleb Maclennan
914970157f
Update links to repository with new org namespace 2020-01-02 12:09:02 +03:00
Alejandro Sanchez
a7886fb6c4 Allow use of function references as callbacks (#1067) 2019-12-14 20:25:17 -05:00
William Findlay
82b1649f2e Add a NERDTreeToggleVCS command to the vcs plugin (#1060)
* NERDTreeToggleVCS

* nerdtree toggle vcs documentation

* fix function documentation

* changelog

* Update CHANGELOG.md

* Update CHANGELOG.md

* simplify toggletreevcs

* Update CHANGELOG.md
2019-11-22 11:26:25 -05:00
Phil Runninger
371feb7e54
Support tab-specific CWDs (#1032)
* Change CWD when switching tabs to the tab's NERDTree root.

* Remove commented-out code.

* List the new possible value for NERDTreeChDirMode in doc.

* Add new option to select between `:cd` and `:tcd`.

* Document the new NERDTreeUseTCD option.

* Update version number in change log.
2019-10-16 13:26:20 -04:00
Phil Runninger
c4a7ca084e
Add file extension and size to sorting capabilities (#1029)
* Add ability to sort by extension and file size.

Use the tags [[extension]], [[size]], or [[-size]] in the
g:NERDTreeSortOrder list to accomplish this sorting.

* Prevent metadata tags being misused in getSortOrderIndex().

* Apply metadata tags only to files.

* Update NERDTreeSortOrder in help file.

* Update version number in CHANGELOG.
2019-08-19 03:51:34 -04:00
Phil Runninger
cce6fb373f
Expand functionality of <CR> mapping (#1011)
* 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.
2019-07-01 22:13:20 -04:00
Phil Runninger
288669db1f
Smarter delimiter default (#963)
* 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.
2019-03-07 08:24:17 -05:00
Chris Patuzzo
84737f2ebe Add a NERDTreeMinimalMenu feature (#938)
* 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.
2019-02-24 18:01:12 -05:00
Phil Runninger
b6cde142dd
Preview bookmarks (#956)
* 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.
2019-02-22 08:21:20 -05:00
Phil Runninger
9eda9ce6a1
Add new value to NERDTreeQuitOnOpen to close bookmark table (#955)
* Update documentation for new NERDTreeQuitOnOpen values.

* Modify use of NERDTreeQuitOnOpen, keeping current behavior.

* If applicable, close the bookmarks table before opening the target.
2019-02-21 07:47:15 -05:00
Phil Runninger
2e0b101d57
Add an :EditBookmarks command to edit the bookmarks file (#954)
* 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.
2019-02-20 23:57:51 -05:00
Phil Runninger (mac)
4ef9967e29 Update the documentation to better explain the delimiter character. 2019-02-18 15:52:23 -05:00
Phil Runninger
c05615fd80
Set a maximum window size when zooming. (#950) 2019-02-15 03:10:28 -05:00
Phil Runninger
72c3656799
Add new command to open NERDTree in the root of a VCS repository. (#872)
* 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.
2018-12-12 13:30:13 -05:00
Phil Runninger (mac)
c1876da09c Change things up with the artwork on the "cover" of the help doc. 2018-12-06 19:29:25 -05:00
Phil Runninger (mac)
743b849dcf Add a happy little tree to the "cover" of the help document. 2018-12-06 15:07:13 -05:00
Phil Runninger
ffa8be8aa7
Document NERDTreeNodeDelimiter #912 (#926)
* 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.
2018-12-06 01:08:16 -05:00
Arvid Gerstmann
c905a5d7b8 Allow modification of menu keybindings (#923) 2018-11-29 09:17:39 -05:00
Phil Runninger
388623e702
Support sorting files and directories by modification time. (#901)
* Introduce a flag to to sort by the node's modification time.

This flag is part of the NERDTreeSortOrder list. '[[timestamp]]' sorts
oldest to newest, while '[[-timestamp]]' sorts newest to oldest. Its
position in the array determines whether it is the primary sort (first
position) or secondary sort (any other position). The remaining elements
in the array describe the other sort level following all prior rules. If
needed, a tertiary sort is done alphabetically on the filename.

Examples:

['[[timestamp]]']            - oldest to newest
['\/$','*','[[-timestamp]]'] - dirs, then files, each newest first.

When using this flag, performance is slowed a little because the sortKey
is always recalculated with every sort. Why? Because if a file is saved
(either in vim or by an outside program), NERDTree needs to go back out
to the shell to get the new modification time.

* Update NERDTreeSortOrder documentation.

The new `[[timestamp]]' and '[[-timestamp]]' flags are added to support
sorting by modification time.

* Fix the inequality. Must be >= to force recalculation of _sortKey.

* Move `let path=` closer to where it's used.
2018-10-24 22:18:18 -04:00
Werner Hofstra
5381197747 Add NERDTreeRefreshRoot command (#897)
* Add NERDTreeRefreshRoot command

* Document NERDTreeRefreshRoot
2018-10-16 11:08:23 -04:00
Laurent Voisin
bba4b0087b Fix typo in help file
Remove duplicated word.
2018-10-08 13:17:33 +02:00
Jason Franklin
7c8c811f00 Edit the help file 2018-09-10 08:33:10 -04:00
Phil Runninger (mac)
c726ec7318 Implement PR review comments. 2018-09-10 06:57:39 -04:00
Phil Runninger (mac)
a172d7cfcb Add documentation for the NERDTreeRemoveDirCmd option. 2018-03-13 08:51:33 -04:00
Kutsan Kaplan
9afa6b3828
Add new variable g:NERDTreeRemoveFileCmd 2018-03-13 15:17:10 +03:00
Jason Franklin
6e26222a30 Update the docs for "NERDTreeStatusline" 2018-01-06 10:55:18 -05:00
Jason Franklin
f6dad4796e Update the documentation
The docs for ":NERDTreeFind" are updated.  Some additional
formatting changes are made to other sections.
2017-12-22 09:16:16 -05:00
Jason Franklin
c1b71dcfc5 Rename the help file to "NERDTree.txt"
I thought renaming this file was important so that the NERDTree name
is printed with consistency. Branding is important.
2017-07-04 10:14:35 -04:00