Skip to content

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

Closed

Description

@bgelens

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

Activity

  1. ghost added
    Needs-Triage 🔍It's a new issue that core contributor team needs to triage.
    on Nov 5, 2020
  2. daxian-dbw commented on Nov 5, 2020

    @daxian-dbw
    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

  3. bgelens commented on Nov 5, 2020

    @bgelens
    Author

    Thanks Dongbo Wang (@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?

  4. daxian-dbw commented on Nov 5, 2020

    @daxian-dbw
    Member

    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.

  5. bgelens commented on Nov 5, 2020

    @bgelens
    Author

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

  6. ghost removed
    Needs-Triage 🔍It's a new issue that core contributor team needs to triage.
    on Nov 5, 2020
  7. ghost added
    In-PRA PR is opened targeting the issue
    on Jan 11, 2022
  8. ghost removed
    In-PRA PR is opened targeting the issue
    on Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions