Understanding the situation:
When you try to edit one variable name on a file, all the other occurrences of the same variable automatically gets renamed.
You might not want that to happen in certain scenario.
You can change this behavior by disabling Linked Editing feature of the VS code editor.
Disable Linked Editing
Follow the steps below to disable the linked editing that solves the problem:
- Open Settings: Hit “Ctrl + ,” or go to File > Preferences > Settings.
- Enter term such as linked editing in the search input.
- You should see results with check box. Depending on the requirement, you need to choose which checkbox to uncheck. For example, if you want to apply this setting to PHP files only, uncheck the checkbox below PHP > Linked Editing: Variables.

Leave a Reply