Commit Graph

22 Commits

Author SHA1 Message Date
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