Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PredictionViewStyle allow combined List and Inline or keybinding to adhoc turn use the List view #1933

Closed
bgelens opened this issue Nov 5, 2020 · 5 comments · Fixed by #3144
Labels

Comments

@bgelens
Copy link

bgelens commented Nov 5, 2020

Description of the new feature/enhancement

Although the Listview is awesome, I've already become very accustomed to the Inline style and I'm missing the ctrl+f option to accept next words in the initial predicted text. Also missing in my flow now is the right arrow accept full first completion.

Proposed technical implementation details (optional)

Allow a combined implementation or keybinding initialization of the listview on adhoc basis

@bgelens bgelens added the Issue-Enhancement It's a feature request. label Nov 5, 2020
@ghost ghost added the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Nov 5, 2020
@daxian-dbw
Copy link
Member

The list view could be used as a supplement to the inline view, especially when you know what you want is in the history but not the most recent item in history. In that case, the list view can be very helpful as it shows more candidates.

In the Windows edit more, we introduced F2 as the hotkey to switch between the InlineView and the ListView. You may find it very handy.

demo

@bgelens
Copy link
Author

bgelens commented Nov 5, 2020

Thanks @daxian-dbw f2 was not registered for me (using emacs mode). I registered it manually and the function works fine. This is a nice middleground and has the desired effect. One caveat however is this. I have the following keybinding in case of inlineview:

Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward

Setting these will brick the list view (can not navigate the list). Is there a workaround for this as well?

@daxian-dbw
Copy link
Member

daxian-dbw commented Nov 5, 2020

Is there a workaround for this as well?

Unfortunately, not workaround yet. Thanks for bringing this up! I guess it would be reasonably common for people to re-bind UpArrow and DownArrow to HistorySearchBackward and HistorySearchForward. We will need to improve those 2 functions to make them behave similarly to PreviousHistory and NextHistory -- able to sense a list view is present and navigate in the list instead of history in that case.

@bgelens
Copy link
Author

bgelens commented Nov 5, 2020

I'll close this issue. Thanks for adding this to the improvement list!

@bgelens bgelens closed this as completed Nov 5, 2020
@ghost ghost removed the Needs-Triage 🔍 It's a new issue that core contributor team needs to triage. label Nov 5, 2020
@ghost ghost added In-PR A PR is opened targeting the issue Resolution-Fixed and removed In-PR A PR is opened targeting the issue labels Jan 11, 2022
@ghost
Copy link

ghost commented Jan 28, 2022

🎉 This issue was addressed in 3144, which has now been successfully released in v2.2.1-rc1. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants