You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue proposes adding a new optional filter --then option that performs an extra action after the user has finished entering filter keywords and confirms by pressing <Enter>.
This helps reduce one or two extra keystrokes (depending on the value of --then), thereby improving efficiency and increasing QoL.
Since Yazi's filter feature is interactive and provides real-time feedback based on the user's keywords, users already have a basic expectation for the filter results when they press <Enter>, making this option even more meaningful.
Available values:
select: Select all filter results, which saves a <C-a> keystroke for selecting all.
select-back: Select all filter results and exit the filter view, which saves both <C-a> and <Esc> keystrokes.
deselect: Deselect all filter results, which saves <C-a> and <C-r> keystrokes (by selecting all first and then inverting the selection).
deselect-back: Deselect all filter results and exit the filter view, which saves the keystrokes for <C-a>, <C-r>, and <Esc>.
toggle: Toggle the selection state of all filter results, which saves a <C-r> keystroke.
toggle-back: Toggle the selection state of all filter results and exit the filter view, which saves <C-r> and <Esc> keystrokes.
Accordingly, a new default key binding F will be added for filter --then=select-back.
2. Interoperability between the filter and find commands
This issue also proposes making the filter and find commands interoperable.
Specifically, the filter keywords entered by the user should be reusable by find, which makes the following workflow possible:
Press F to start filter --then=select-back.
Type keywords and press <Enter>, the filter results that match the keywords are selected and the filter view is exited.
Now, the user can click n or N to use the previous "filter" keywords to "find" and navigate back and forth between (selected) files in the list.
The text was updated successfully, but these errors were encountered:
Nice, though I find repeated filtering workflow (#2385) to be strictly better than find because of the instant feedback (even as a vim user where n and N is natural). With n and N you are still jumping through entries in a semi-filtered list, but with repeated filtering + instant feedback the intended set of files can be arrived quicker.
Besides keystrokes, there's effort and cognitive overhead to consider. Repeated filtering just involves typing substrings with instant feedback (substrings don't need to be long--bigram/trigrams are enough, like with fzf), whereas n and N typically requires an already filtered list to be effective and also tapping these keys a precise number of times to get to the intended item, unless you know ahead of time the string you're looking for is already fairly unique in the list to reduce spamming n/N. The ergonomics of typing familiar sequences of bigrams/trigrams/substrings keep you in the flow and repeated narrowing for instant feedback provide additional context to what you're searching for.
1. New
--then
option for thefilter
commandThis issue proposes adding a new optional
filter --then
option that performs an extra action after the user has finished entering filter keywords and confirms by pressing<Enter>
.This helps reduce one or two extra keystrokes (depending on the value of
--then
), thereby improving efficiency and increasing QoL.Since Yazi's
filter
feature is interactive and provides real-time feedback based on the user's keywords, users already have a basic expectation for the filter results when they press<Enter>
, making this option even more meaningful.Available values:
select
: Select all filter results, which saves a<C-a>
keystroke for selecting all.select-back
: Select all filter results and exit the filter view, which saves both<C-a>
and<Esc>
keystrokes.deselect
: Deselect all filter results, which saves<C-a>
and<C-r>
keystrokes (by selecting all first and then inverting the selection).deselect-back
: Deselect all filter results and exit the filter view, which saves the keystrokes for<C-a>
,<C-r>
, and<Esc>
.toggle
: Toggle the selection state of all filter results, which saves a<C-r>
keystroke.toggle-back
: Toggle the selection state of all filter results and exit the filter view, which saves<C-r>
and<Esc>
keystrokes.Accordingly, a new default key binding
F
will be added forfilter --then=select-back
.2. Interoperability between the
filter
andfind
commandsThis issue also proposes making the
filter
andfind
commands interoperable.Specifically, the
filter
keywords entered by the user should be reusable byfind
, which makes the following workflow possible:F
to startfilter --then=select-back
.<Enter>
, the filter results that match the keywords are selected and the filter view is exited.n
orN
to use the previous "filter" keywords to "find" and navigate back and forth between (selected) files in the list.The text was updated successfully, but these errors were encountered: