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.
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
Miscellaneous bug fixes for Mark Mode #13358
Miscellaneous bug fixes for Mark Mode #13358
Changes from 3 commits
cdbe030
654bb08
0b54345
06a39f8
40ee74e
408fca2
a2a346b
32ca437
0c5a1e9
c78818a
ce6c87e
1a84bc6
b8b2d76
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This is potentially a spicy change 🌶️
I know conhost did this in the past. I feel like we've discissed this in the past on the repl, but I can't find the discussion if we specifically said we'd add this to the defaults or not.
We may also want to consider something like #13115 - what does that even mean? Is that something separate from a text selection?
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.
My vision for #13115 (which isn't even specced tbh), is that it's a way to navigate within mark mode. It might even be something as simple as [shift]+tab to move to the next/previous hyperlink. That 100% needs to be specc'd though.
Yeah, I don't remember the discussion either :/. The paths forward I see are...
copy()
to Enter in defaults.json (configurable)Dustin seemed to be a little confused when using mark mode saying that there's no clear way to copy the selection. I think this stems from him using
copyOnSelect
, which seems fair because you never really had to think about copying your selection before. But we can't copy the selection every time the selection changes in mark mode. That would totally mess up clipboard history for people who use it. :/We could pull this part out and discuss it at sync on Monday? It's a one-liner with no risk. Really just "political" reasons to decide to add it in or not.
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.
Funny enough, now I'm thinking that we don't add this as a keybinding in defaults.json. Maybe we should make it non-configurable to allow for this.
That way, Enter copies when in mark mode, but opens the URL when it's selected/found by tabbing through he buffer in mark mode. It would then go back to copying if the user modified the selection.
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.
Putting it in defaults.json allows the user to unbind it from both behaviors, but still gives us the freedom to change it (as opposed to inserting it in usersettings.json). We don't need to make the decision now, because defaults.json is entirely under our control across app updates.
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.
Have we considered adding a
mode
option to key bindings that would only apply when enabled? They could correspond to this enum #13360 (comment)Alacritty has the same concept (vi mode is mark mode) https://github.com/alacritty/alacritty/blob/master/alacritty/src/config/bindings.rs
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.
Adding modal key bindings has been hotly debated, we just don't have the cycles to do it right now :)