neo-tree.nvim
neo-tree.nvim copied to clipboard
FEATURE: Find nodes and jump to it
Did you check the docs?
- [X] I have read all the docs.
Is your feature request related to a problem? Please describe.
Right now following functions can be used to search nodes.
fuzzy_finder
fuzzy_finder_directory
filter_on_submit
However, none of them jumps to the node. As far as I know, there is no option to jump to the next and prev matches either. This takes extra key presses to navigate to the node.
Describe the solution you'd like.
I would expect it to work as Neovim native search.
- Run
find
command - Enter the search query
- As i'm typing the results will be highlighted.
- Matches inside collapsed folder works similar to collapsed fold
- If the first match is inside a collapsed folder, folder will be expanded and node will be highlighted
- If the first match is visible, text will be highlighted
- Hit enter to submit the query
- Cursor will be navigated to the first matched node on enter
- User can execute
next_match
orprev_match
to jump to the node- On jump, if the node is inside a collapsed folder, folder/s will be expanded
Describe alternatives you've considered.
No response
Additional Context
No response
Moving from preservim/nerdtree
to nvim-neo-tree/neo-tree
unfortunately lost this basic functionality mentioned above.
The fuzzy_finder*
and filter_on_submit
functions appear to work but provide a frustrating and broken experience out-of-the-box compared to the simplicity of typing /
in a NERDTree file explorer window.
Plugins that change/overwrite how Neovim native (search) functionality works raises barrier to entry for having a good time with the plugin.
I appreciate how Neotree offers a floating filesystem feature, that has been enjoyable to use daily. However, the search experience with Neotree's current /
has only added friction in the text editing workflow.
Using :/
in the Neotree window bypasses this issue and provides the desired functionality. However, it also defies years of existing muscle memory, decreasing mental flowstate.
@chrisisler Many people (myself included) change the default mapping so that /
goes back to the native search. This specific use case is right in the help file:
https://github.com/nvim-neo-tree/neo-tree.nvim/blob/936b029e514adc1fa7ab51c6c1a8a2c872a58797/doc/neo-tree.txt#L461-L477
@cseickel Installing a plugin + writing more code to achieve native functionality = I'm uninstalling this.
Going back to NERDTree
or nvim-telescope/telescope-file-browser.nvim
.
The default experience for moving a file via neo-tree
also does not provide expected mv
behavior.
@cseickel Installing a plugin + writing more code to achieve native functionality = I'm uninstalling this.
Going back to
NERDTree
ornvim-telescope/telescope-file-browser.nvim
.The default experience for moving a file via
neo-tree
also does not provide expectedmv
behavior.
I do have to agree, I find the default frustrating too. That said, neo-tree is used by tons of people and thus we cannot just change the default "because". Someone will complain that we broke their spacebar heating
Thus the workaround that was provided is probably our best option here.
These are the default keybinds.
https://github.com/nvim-neo-tree/neo-tree.nvim/blob/5bde916c3f08487b7988893bfaa08dff69124405/lua/neo-tree/defaults.lua#L434-L439
If you cannot see where the cursor is, please turn on :h 'cursorline'
in neo-tree window.