-
Notifications
You must be signed in to change notification settings - Fork 8.5k
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
Feature Request: Smart Double-click Selection (regeces?) #3196
Comments
Would you be helped by removing |
@DHowett-MSFT Didn't realise delimiter configuration was added. For the most part, that seems to do the trick. I was really thinking more of regex though, because it can be a good starting point for implementing more advanced features like type-specific smart highlighting and hyperlinking of terminal text, not just smart selection. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
In additional to subject - it would be nice to have some alternative word delimiters. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Why are |
@mimi89999 because some people use the Terminal with |
In terminals on GNU/Linux
Normally (in terminal apps on GNU/Linux) the path separator is ignored when selecting. In |
Thanks for sharing! This exact reason is why we provide the |
It is, indeed, good that the wordDelimiters setting is provided. However the earlier question of why / and \ are delimiters by default was never really answered. Defaults matter. There seem to be a lot of people who feel that / and \ should not be delimiters (cmd and terminals on GNU/Linux don't treat it as such) so probably the defaults should be changed. If everybody has to dramatically configure the new terminal to make it usable then that harms interoperability and significantly raises the learning curve. I am repeatedly surprised at how many defaults I have had to change to get the terminal to work well. |
Same issue here ... except I think a simple improvement could be to allow wordDelimiters in the profiles section (Which I see is already handled in #3078). |
Can anybody provide sensible settings for wordDelimiter? Indeed, '/' is a terrible idea. How would you select a full URL? iTerm has a very advanced set of configurable regexs that also implement priority for say selecting a URL over plain text. https://iterm2.com/documentation-smart-selection.html#:~:text=When%20Smart%20Selection%20is%20activated,pool%20of%20%22selection%20candidates%22. |
I personally use: "wordDelimiters" : " ()\"':,;<>~!@#$%^&*|+=[]{}~?\u2502", |
I kept deleting delimiters that annoyed me until I ended up with this set: "wordDelimiters": " ()"';<> I haven't changed it for a month or two so I guess I'm happy with it. I can double-click paths and the URLs I encounter and most of the other things that I routinely encounter. Of course this depends greatly on ones workflow so I'm not sure I can justify my modifications in general. |
I would love to see this implemented like iTerm2 does it - on a quadruple click. This has a few advantages from my perspective:
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment has been minimized.
This comment has been minimized.
I'd like a way to decide on the fly whether I'm selecting a word (just part of a path), a full path, or a full line. Custom word delimiters let you pick whether double clicking selects a word or a path, but it doesn't give you an easy way to do both without dragging. Could we maybe add shift double click to select using alternate word delimiters? |
Description of the new feature/enhancement
The current implementation of mouse double-click in terminal window only selects a word, and triple click selects the entire line.
It is often necessary to select an entire path or other forms of multi-word string (e.g. decimal number, percent value, abbreviated size, email address, ...) when using terminal and it would be nice to have an automatic detection and selection of such multi-word strings.
For example, when using git, typing
![image](https://user-images.githubusercontent.com/11345418/66791469-7c55a600-ef2f-11e9-8395-ee9664476b17.png)
git status
returns the relative paths of the changed files:If I wanted to copy the path of a specific file (e.g. to diff or open), with the current implementation, I would have to manually drag and select the path of the file. With the requested feature, however, I would only need to double click anywhere on the path of the file and this speeds things up by a lot.
GNOME Terminal already implements the behaviour described here, and it is an extremely useful feature that makes everyday tasks so much simpler and speeds things up significantly.
Proposed technical implementation details (optional)
Define a set of regex rules for detecting and selecting commonly used multi-word strings. Maybe these rules can be customisable in the settings file.
The text was updated successfully, but these errors were encountered: