-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a NERDTreeMinimalMenu feature #938
Conversation
Earlier today I opened a pull request on NERD tree to add a minimal menu feature: preservim/nerdtree#938
I like this idea. I'm almost tempted to suggest this be the only way to show the menu. I just merged a PR that caused a conflict to appear in yours. It won't take too much work to resolve it. While you're at it, what do you think of this suggestion? Instead of, or in addition to, an asterisk to mark the current selection, show its full text, something like one of these:
I think it's important to make sure the |
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.
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’.
Hi Phil, thanks for the feedback. I've rebased and updated the menu in this commit. I played with it a bit and I think this might be the cleanest way to present it. See the commit message for my rationale. What do you think? Thanks |
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.
Looks good, @tuzz. Thanks for the addition. |
Hello, thanks for maintaining a plugin I use all the time. ❤️
One thing I've wanted for a while is a more compact menu that reduces the amount of scrolling in Vim. I think a large portion of people who use NERDTree are already familiar with each of the menu items so this might be a nice addition to reduce noise.
Therefore, I've added a new configuration setting
NERDTreeMinimalMenu
for this. When this is set, a single-line menu is presented and the follow-up text for each action is presented as a single line, too.Thanks