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
Upon double-clicking, people have different expectations across various languages.
The ability to define custom highlighting rules based on the selected text would simultaneously solve a lot of highlighting issues and increase the flexibility of the editor.
My motivation for bringing this up comes from my frustration with variable selection in PHP.
When double-clicking 'foo' in '$foo->bar()' you will end up selecting '$foo-', my preference would be 'foo'.
I also noticed another issue regarding double clicking white-space where the user would like it to select all connected white-space.
These kinds of rules would be perfectly suited for on the fly user customisation.
I would love to see that as well. Sometimes I need to replace just part of the string. For example a part of class name in CSS like .block--modifier but the default double click selects whole class. Making the behavior customizable would solve this.
I noticed a change with the recent update with how this behaved. For PHP, could we have this as an editable option or something? As I would personally prefer it grab the preceding '$' character when double-click selecting.
This is great, I removed the dollar for angular coding.
Is there a way to specify this for different languages?
Or do I need to edit my settings file each time I change language?
This is great, I removed '$' from editor.wordSeparators and now I can double click on PowerShell variables and get the entire variable '$var' in my clipboard.
These days I came across this issue of double click behavior. I noticed that most of the time I would like to "select the whole string", but it was annoying me. So, what if I double click on a "-" and the behavior would be something like "select an entire string". If I clicked on a word (as we usually do) would I still have the default behavior?
Activity
vlad-saling commentedon Jan 29, 2016
I would love to see that as well. Sometimes I need to replace just part of the string. For example a part of class name in CSS like
.block--modifierbut the default double click selects whole class. Making the behavior customizable would solve this.luebken commentedon Mar 4, 2016
May I add a simple use case: The first time I select a string via douple-click I would like the selection to exclude the double quotes.
jtarbox commentedon Mar 8, 2016
I noticed a change with the recent update with how this behaved. For PHP, could we have this as an editable option or something? As I would personally prefer it grab the preceding '$' character when double-click selecting.
alexdima commentedon Mar 8, 2016
Jonathan Tarbox (@jtarbox) Yes, please try changing the following setting that now customizes word definitions when doing word operations:
alexdima commentedon Mar 8, 2016
Actually, I think the new option
editor.wordSeparatorsthat just shipped with 0.10.11 resolves this issuejtarbox commentedon Mar 8, 2016
thx, worked perfectly! (still getting used to the text based settings)
vlad-saling commentedon Mar 10, 2016
Thank you! Works great!
ctrulove commentedon Mar 29, 2016
This just made my day. Works like a charm.
RonanCodes commentedon Nov 30, 2016
This is great, I removed the dollar for angular coding.
Is there a way to specify this for different languages?
Or do I need to edit my settings file each time I change language?
Ben-Conrad commentedon Jan 25, 2017
This is great, I removed '$' from editor.wordSeparators and now I can double click on PowerShell variables and get the entire variable '$var' in my clipboard.
dmagician commentedon Feb 23, 2017
Fantastic configuration feature. I have immediatelly removed $ from that ;-) I'm used to $variable being selected ;-)
gstvux commentedon Jun 14, 2017
These days I came across this issue of double click behavior. I noticed that most of the time I would like to "select the whole string", but it was annoying me. So, what if I double click on a "-" and the behavior would be something like "select an entire string". If I clicked on a word (as we usually do) would I still have the default behavior?