microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.93k stars 29.18k forks source link

Please add an ability to highlight any extra characters belonging to a word/variable #18258

Closed ArthurZ closed 7 years ago

ArthurZ commented 7 years ago

Please add an ability to highlight (with an intent to copy) any extra characters belonging to a word on double click.

Example is say symbols in Ruby - :user_name the colon in front indicates it is a symbol, presently clicking on the :user_name word highlights only the user_name part which makes a user re-select it using the keyboard+arrow keys which is awkward and time consuming.

Apart from Ruby there are many other languages where special characters form a variable.

PS: I am aware of another editor I used EMEditor which has this capability.

kaiwood commented 7 years ago

There is already a setting for controlling the word boundaries:

    "editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?"

For Ruby, simply remove @ and :.

sandy081 commented 7 years ago

@ArthurZ Please try the above suggestion and let us know if it works for you.