generated from amazon-archives/__template_Custom
-
Notifications
You must be signed in to change notification settings - Fork 304
Change autocomplete shortcut from ctrl-f to ctrl-g #2825
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have precedent to make shortcuts customizable. We should probably follow suit there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that feels like a separate feature request. Looking at the "TangentModeKey" code below we already have a mechanism to configure the key. My goal in this PR is to just make ctrl-f available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah we can just copy the mechanism there and the whole debate about the right key ends. We had the same discussion during tangent mode.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the problem of setting up a good default value will not go away though, even when user can configure everything in the future. I am trying to solve the default value problem here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://fishshell.com/docs/current/interactive.html
Arguably the shortcut comment here is no longer accurate, as a
fish
user would expect Ctrl+f. Rather than just change the default key, I think we may want to just spend the time to build the config feature.If we're strongly set on changing the key, we should remove that comment on L482, as it's not accurate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the latest PR I am allowing user to configure the key for autocompletion through:
This is following the existing config system built for tangent mode, fuzzy search, etc.
I am also changing the default from f to g
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think the issue is that Ctrl+f is a bad default, the issue is that Ctrl-f incorrectly attempts to autocomplete when an autocomplete suggestion isn't available. fish doesn't shadow the ability to move forward under normal circumstances. So the fundamental issue is a bug in the way Ctrl+f autocomplete behavior is implemented, not the default key.