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
{{ message }}
Repository navigation
PredictionViewStyle ListView allow escape out of selection in emacs mode #1932
The new ListView for predictions is awesome! One thing I've found a little bit impacting my flow, is the lack of ability to escape out of the list and just return to what I had typed. I've tried a couple of keybindings but none seem to work.
The only option is to arrow up until I'm out of the list view. This will return my original input
Hello Ben Gelens (@bgelens), thanks for trying out this feature!
Which EditMode were you in? The prediction ListView has been mainly tested and enhanced in the Windows edit mode.
Testing in the Emacs and VI edit modes is very minimum as of today, but we will spend more time improving its user experience in these 2 edit modes (Issue to track: #1934).
You can check your edit mode by Get-PSReadLineOption | % EditMode, and switching to Windows by Set-PSReadLineOption -EditMode Windows.
If you are using the Windows edit mode, you will find Escape works as expected -- pressing it will escape out of the list and return to what I had typed. Ctrl+z (undo) will also be handy for you to escape out of a selection. Please see the "Handling of Commonly Used Keys" section in the PR description of #1909 to learn more about the details.
Also, we will have a blog posted next week about this feature, so please stay tuned.
I'm using emacs (running on Mac where this is more natural fit). I did not think about using ctrl+z. I can confirm it has the desired effect for me! I'll use this as a workaround for now (esc will be more natural and getting from your reply it is mend to work)
changed the title [-]PredictionViewStyle ListView allow escape out of selection[/-][+]PredictionViewStyle ListView allow escape out of selection in emacs mode[/+]on Nov 5, 2020
It turns out Escape in Emacs edit mode is already bound to ChordFirstKey and that means it's a special key indicating a chord of keys (e.g Escape,f, Escape,d, or even Escape,Ctrl+y). So we cannot make Escape to work the same as in the Windows edit mode.
A workaround would be to map Escape, Escape to RevertLine, so you can press ESC twice to get the same behavior as in Windows edit mode.
Activity
daxian-dbw commentedon Nov 5, 2020
Hello Ben Gelens (@bgelens), thanks for trying out this feature!
Which
EditModewere you in? The predictionListViewhas been mainly tested and enhanced in theWindowsedit mode.Testing in the
EmacsandVIedit modes is very minimum as of today, but we will spend more time improving its user experience in these 2 edit modes (Issue to track: #1934).You can check your edit mode by
Get-PSReadLineOption | % EditMode, and switching toWindowsbySet-PSReadLineOption -EditMode Windows.daxian-dbw commentedon Nov 5, 2020
If you are using the
Windowsedit mode, you will find Escape works as expected -- pressing it will escape out of the list and return to what I had typed. Ctrl+z (undo) will also be handy for you to escape out of a selection. Please see the "Handling of Commonly Used Keys" section in the PR description of #1909 to learn more about the details.Also, we will have a blog posted next week about this feature, so please stay tuned.
bgelens commentedon Nov 5, 2020
Hey Dongbo Wang (@daxian-dbw). Thanks for the info.
I'm using emacs (running on Mac where this is more natural fit). I did not think about using ctrl+z. I can confirm it has the desired effect for me! I'll use this as a workaround for now (esc will be more natural and getting from your reply it is mend to work)
daxian-dbw commentedon Nov 5, 2020
Yes, Escape in
Emacsedit mode should work the same as in theWindowsedit mode, and we will make that improvement for the next beta release.[-]PredictionViewStyle ListView allow escape out of selection[/-][+]PredictionViewStyle ListView allow escape out of selection in emacs mode[/+]bgelens commentedon Nov 5, 2020
Should I close this issue considering the tracking issue you created? If so please feel free to close yourself :)
daxian-dbw commentedon Nov 5, 2020
I will close this one as a duplicate of #1934. Thanks Ben Gelens (@bgelens)!
daxian-dbw commentedon Jan 11, 2022
It turns out Escape in
Emacsedit mode is already bound toChordFirstKeyand that means it's a special key indicating a chord of keys (e.g Escape,f, Escape,d, or even Escape,Ctrl+y). So we cannot make Escape to work the same as in theWindowsedit mode.A workaround would be to map Escape, Escape to
RevertLine, so you can pressESCtwice to get the same behavior as inWindowsedit mode.