You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Multiple sets of word delimiters for double-click selection #7173
Currently, users can configure a single set of word delimiters (wordDelimiters) to be used for word boundary detection.
Depending on the context users need different sets of word delimiters.
For example (>< marks the double-click selection)
selecting a full path Text before >/home/user-name/file< text after
selecting a directory Text before /home/>user-name</file text after
Having a possibility to define multiple sets of word delimiters and to dynamically switch between them would support the user in quickly selecting what he intends to.
Proposed technical implementation details
Assuming that multiple sets of word delimiters could be defined then one possibility to provide a dynamic selection would be to use CTRL and ALT to toggle between the sets.
This way a user could double-click for the standard word delimiter selection, ALT-double-click for a set that only breaks on spaces to select full paths and CTRL-double-click to select path elements by using a set that breaks only on slash.
Reacted by Gordon P. Hemsley, Eoghan Lawless, Bryan Drewery and BCE
Huh, that's really interesting. So, we're almost set up for something like this. We followed PuTTY's system of "character classes"[1], which if we exposed would allow users to configure different levels of delimiters. Perhaps the right way to model this is... (open to discussion, I am not making a ruling here 😄)
perhaps multiple-click could just be a class delta transition -- double-click is "select codepoints where Δ(class) <= 0", triple-click is "select codepoints where Δ(class) <= 1" and so on.
This would mean that triple-click would be required to select the classes "[normal characters] + [things that might exist in paths]" where double-click would still select all "[normal characters]"?
Thoughts? Is this way off-base, undiscoverable, or something?
As a user I wouldn't mind a double-click vs. triple-click differentiation or even a double-click on an existing selection to expand it. All versions, including the modifiers I proposed, are similarly hard to discover.
BTW: While reading up on the PuTTY docs I realized that ALT is already connected to rectangular selection and using ALT to toggle word delimiters for double-click selection might be misleading. This leaves only CTRL for this solution.
I don't think it would be too confusing if Alt+single-click selects a rectangle but Alt+double-click selects words with alternative word boundaries.
However, if the user has already selected some words and then extends the selection with Alt+Shift+double-click, and the first click makes the selection rectangular but the second click makes it word-based again, then that will look odd.
Triple-click selects a line / paragraph in line-based / flow-based layouts respectively — very common shortcut shared by a lot of software. I think it might be ok if triple-click on a path selected the path instead, and an additional click was required to expand to the rest of the line, but making that behaviour non-surprising would be hard, especially given that multi-click chords rely heavily on muscle memory: you can't exactly "see" the result and just add an extra click. Also, requiring 5 clicks to select a line (with the 4 classes listed above) is silly territory. Perhaps if it auto-skipped through classes that would not change the selection?
A modifier key is more consistent in any case I think.
There is also #574, and the possibility of tying smart double-click selection to it (double-click on an identified path/url selects the path instead of a single word, but in all other contexts continues to work as it does today).
#3196 would resolve a lot of this ask as well. I suggested there implementing it on a quadruple-click instead of modifying existing behavior or using a modifier, but it could also be a bound action on a modifier key as well.
Activity
zadjii-msft commentedon Aug 4, 2020
This isn't the craziest request I've heard - I'll tag this up as a part of "mouse bindings" in general. Thanks!
KalleOlaviNiemitalo commentedon Aug 4, 2020
On a related note…
mintty in Git Bash has asymmetric word delimiters for double-click selection.
Assuming there is
abc:def:ghi:jklon the screen:e, then it selectsabc:def.g, then it selectsabc:def:ghi.fandg, then it selectsabc:def:.I'm not currently requesting that feature, just wanted to mention it.
DHowett commentedon Aug 6, 2020
Huh, that's really interesting. So, we're almost set up for something like this. We followed PuTTY's system of "character classes"[1], which if we exposed would allow users to configure different levels of delimiters. Perhaps the right way to model this is... (open to discussion, I am not making a ruling here 😄)
[1] a "word" is actually a contiguous region of codepoints in the same class! thanks Carlos Zamora (@carlos-zamora)!
perhaps multiple-click could just be a class delta transition -- double-click is "select codepoints where
Δ(class) <= 0", triple-click is "select codepoints whereΔ(class) <= 1" and so on.This would mean that triple-click would be required to select the classes "[normal characters] + [things that might exist in paths]" where double-click would still select all "[normal characters]"?
Thoughts? Is this way off-base, undiscoverable, or something?
rbaradari commentedon Aug 6, 2020
As a user I wouldn't mind a double-click vs. triple-click differentiation or even a double-click on an existing selection to expand it. All versions, including the modifiers I proposed, are similarly hard to discover.
BTW: While reading up on the PuTTY docs I realized that ALT is already connected to rectangular selection and using ALT to toggle word delimiters for double-click selection might be misleading. This leaves only CTRL for this solution.
KalleOlaviNiemitalo commentedon Aug 6, 2020
I don't think it would be too confusing if Alt+single-click selects a rectangle but Alt+double-click selects words with alternative word boundaries.
However, if the user has already selected some words and then extends the selection with Alt+Shift+double-click, and the first click makes the selection rectangular but the second click makes it word-based again, then that will look odd.
simonratner commentedon Aug 15, 2020
Triple-click selects a line / paragraph in line-based / flow-based layouts respectively — very common shortcut shared by a lot of software. I think it might be ok if triple-click on a path selected the path instead, and an additional click was required to expand to the rest of the line, but making that behaviour non-surprising would be hard, especially given that multi-click chords rely heavily on muscle memory: you can't exactly "see" the result and just add an extra click. Also, requiring 5 clicks to select a line (with the 4 classes listed above) is silly territory. Perhaps if it auto-skipped through classes that would not change the selection?
A modifier key is more consistent in any case I think.
There is also #574, and the possibility of tying smart double-click selection to it (double-click on an identified path/url selects the path instead of a single word, but in all other contexts continues to work as it does today).
phealy commentedon Aug 24, 2020
#3196 would resolve a lot of this ask as well. I suggested there implementing it on a quadruple-click instead of modifying existing behavior or using a modifier, but it could also be a bound action on a modifier key as well.