PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, May 16, 2022

[FIXED] How to select the whole variable name including $ in Visual Studio Code in PHP?

 May 16, 2022     php, visual-studio-code     No comments   

Issue

I am using the latest version of Visual Studio Code and I am using the PHP programming language. I am selecting a variable but it only selects the variable name, not the $ symbol.

By default it selects like this:

Selection of variable name without dollar sign

But I want it like this:

Selection of variable name with dollar sign

Is there any setting that enables this behavior?

Any information on this would be greatly appreciated. Thanks!


Solution

You need to remove the $ symbol from the editor.wordSeparators directive. This is the default value:

// Characters that will be used as word separators when doing word related navigations or operations.
"editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\\|;:'\",.<>/?",

You can make this language specific if you want, so it only applies to PHP.



Answered By - Álvaro González
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing