Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Ctrl + u for discarding line in Picker? #6508

Closed
grantshandy opened this issue Mar 31, 2023 · 5 comments
Closed

Ctrl + u for discarding line in Picker? #6508

grantshandy opened this issue Mar 31, 2023 · 5 comments
Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements

Comments

@grantshandy
Copy link

Ctrl + u is a common keyboard shortcut for clearing the current input throughout shell environments and command lines. Helix uses Ctrl + u to clear the input for : commands, could it be added to the symbol viewer/global search/file picker/LSP references?

I keep reaching for the keyboard shortcut when I want to reset my query, instead I have to hold the backspace key. Does this sound like something that should be added? If it seems like a feature that would be added I can try to make a PR.

@grantshandy grantshandy added the C-enhancement Category: Improvements label Mar 31, 2023
@grantshandy
Copy link
Author

Ah, I see. Ctrl + u/d is for Page Up/Down in the list as added in #1612.

After more research, I've found that Ctrl + u is commonly called "unix-line-discard". Now my main question is why shouldn't this common (arguably canonical) shortcut not be used in Picker when it is already used in the command entry?

@grantshandy grantshandy changed the title Add C-u for clearing query in file picker/global search? Ctrl + u for discarding line in Picker? Mar 31, 2023
@d2weber
Copy link

d2weber commented Aug 9, 2023

Duplicate of #1593

@gabydd
Copy link
Member

gabydd commented Aug 9, 2023

This is different then that issue it happens because the picker and the prompt have a conflicting key in common so Ctrl-u gets consumed by the picker before it reaches the prompt

@d2weber
Copy link

d2weber commented Aug 9, 2023

This is different then that issue it happens because the picker and the prompt have a conflicting key in common so Ctrl-u gets consumed by the picker before it reaches the prompt

I see, you are right

@david-amirault
Copy link

david-amirault commented Oct 2, 2023

+1. Unix-line-discard is much more useful than page up/page down in picker. If you need to scroll pages in picker, then you are likely using it wrong, and your fuzzy-matching text should be more specific. Unix-line-discard works in all other helix text-entry modes, so it is quite unintuitive that it does not work in picker.

Even once we gain the ability to remap keys in picker, I feel strongly that unix-line-discard should be the default for Ctrl-u in picker

@kirawi kirawi added the A-helix-term Area: Helix term improvements label Apr 13, 2024
@helix-editor helix-editor locked and limited conversation to collaborators Apr 14, 2024
@pascalkuthe pascalkuthe converted this issue into discussion #10429 Apr 14, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
A-helix-term Area: Helix term improvements C-enhancement Category: Improvements
Projects
None yet
Development

No branches or pull requests

5 participants