-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Support command for jumping to word location based on key #10218
Draft
freqmod
wants to merge
1
commit into
fish-shell:master
Choose a base branch
from
freqmod:jump_locations
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
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 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
This file contains 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
This file contains 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.
I think this is definitely a problem we should consider addressing.
The classic use case is if you want to edit
NEEDLE
after pasting this command:Today I usually fall back on Alt+e to open my editor.
Possible alternative approaches are
forward-bigword
andbackward-bigword
by default -- I didn't realize that until today$COLUMNS/2
or similarYour approach sounds reasonable as well and the UI is fairly well known and obvious.
Do you have an example use case?
I briefly tried it and it has some glitches on multiline commands (when using \co twice) and the contrast is bad (light theme).
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.
Thanks for having a look.
I tried using it on multiline commands, and it does not seem to behave in any unexpected way to me, even when pressing ctrl+o twice, however i do agree that the behaviour probably is undesirable, especially replacing the newlines with jump letters, and thus temporarily altering the line breaking.
There are also some challenges with regards to the fact that it skips adding jump characters if a word is too short leading to inconsistent marking of characters depending on the location of the cursor.
I haven't really used this feature much in the context of fish yet, so I am not sure how well it fits for command line editing except for jumping in paths as i mentioned, but as I wrote i find it useful in the context of a programming text editor; for example when jumping in a line of code that consists of an an if-test with lots of brackets, quotes etc.
When it comes to the highlighting colour I agree that the contrast is poor, i just chose the first sensible colour enumeration in the theme I could find. We can change it to something else, or make a completely new color category.