nvim-neo-tree / neo-tree.nvim

Neovim plugin to manage the file system and other tree like structures.
MIT License
3.72k stars 218 forks source link

FEATURE: Find nodes and jump to it #1142

Closed s1n7ax closed 7 months ago

s1n7ax commented 1 year ago

Did you check 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.

Describe alternatives you've considered.

No response

Additional Context

No response

chrisisler commented 11 months ago

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.

cseickel commented 11 months ago

@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

chrisisler commented 11 months ago

@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.

miversen33 commented 10 months ago

@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.

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

workflow_2x.png

Thus the workaround that was provided is probably our best option here.

pysan3 commented 7 months ago

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.