Closed cseickel closed 2 years ago
FYI: My current way of searching the target quickly is via the filter and the vim-builtin /
to search exactly what I want. And this is enough for me. (I also set C-j
, C-k
to move my cursor faster)
The current problem I found with the existing filter is that:
<C-W>
to backward-delete words (which I do a lot in my Terminal) in the input field of the current filter window./
is that it's not a fuzzy finder, so I cannot type lau
in the following demo to search files with extension .lua
.I'm hoping that the new fuzzy finder mode I am about to commit will cut out the second step of using the built in /
after using the Neo-tree filter. What I am unsure about is whether most people would prefer this be the new default or if some people liked the way it worked before, where it just filtered and then stayed filtered. My current thinking is that they can use the normal filter
command when they want the filter to stick, and only use filter_as_you_type
in fuzzy finder mode.
As far as Ctwl-w, the search popup is just a normal buffer and not a terminal, so the usual vim commands apply. If you want C-w to act as a delete word command in insert mode, just add an insert mode mapping. https://stackoverflow.com/questions/32154641/vim-how-to-delete-a-word-in-the-insert-mode
This has been added to main. I decided to add it as a new command called fuzzy_finder
, but make that the default mapping for the /
key. hopefully this strikes the right balance between having a better default while not annoying existing users that may have liked the old functionality. At the very least, it's easy to switch back for people that don't like it.
This is probably related to #116. I find myself naturally wanting to use Up/Down keys when filtering the tree to select files in the search results, and I am annoyed when it doesn't do anything. I am going to change that by adding a "fuzzy finder mode" option which would:
C-j
/C-k
C-p
/C-n
) move the tree's focused node up and down.<enter>
key behavior so that whatever file is currently focused is opened and the filter is clearedThis makes the functionality closer to what Telescope and other fuzzy finders do.
The big question for anyone that reads this is: Should this just be the new default or should it be a new option that is opted into?