Open Andrew15-5 opened 1 year ago
Not always, you would know at which keystroke the find command will be completed, therefore an auto-open feature will visually notify you that the find command has been completed. I tend to overshoot by keep on typing the characters which may end up being a map
command instead of string provided to find
command. This simple mistake can cause a huge problem if the keys you press are mapped to a destructive command.
Maybe adding an optional delay to input blocking/ignore (which is customizable in milliseconds) after find
command was finished can be a nice little but very helpful feature.
I think this is all the settings I have regarding the find
command:
set incsearch
set anchorfind!
set findlen 0
I want to mimic
ranger
's find command, which will auto open a directory if thefind
command successfully found one. I'm not 100% sure, butranger
haveset incsearch
by default (at least this feature exists). In short, I want to do this:The reason is simple: this way I can press 1 less key after each
find
. Because I do this pretty often, and it became annoying to pressl
after each search pretty quickly (and there is no workaround except maybe changing the code).Right now I can't find any way to do this. If I send
find
andopen
commands, they will be executed "simultaneously" and not "one finished (successfully), next executed".Note: In incremental search (
find
) the selected entry may be changed, and it mustn't triggeron-find
command. OR there could be 2 commands:on-find
(on each entry change)on-find-success
/on-successful-find
and I'm interested only in the last one.As an alternative, I propose an option that controls whether to auto-open (dir and/or file) after a successful search or not.