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 $.

Solution

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:
https://github.com/Microsoft/vscode/issues/2036#issuecomment-193873124

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

Happy coding!

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.

More information about formatting options