VSCode (Visual Studio code) mark dollar sign $ on double click

Visual Studio Code is my new IDE love. It's simple, lightweight but brings great functionality.

One little problem was that when double-clicking a variable with a dollar-sighn ("$") (for example in PHP or JavaScript) not the whole $variable was marked, but only the text without the $.


The solution is quite simple thanks to VSCode configuration:

Simply add
"editor.wordSeparators": "`~!@#%^&*()-=+[{]}\\|;:'
to your custom configuration and restart the IDE. That's it.

I found it in this comment:

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

Happy coding!


Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.

Weitere Informationen über Formatierungsoptionen