Change variable name in a method


I saw a video on youtube where it was shown how to change a variable name in a method and replace all occurrences. But I can not find it again. How to do it?


If I understand you correctly, you can use the standard Find-and-replace package (Ctrl-F):

The difficulty is to distinguish semantically between variable names and other mentions of the same word.


I found it, it id Ctrl + D


You can also give a chance to the Refactor package
It works much better than the standard Ctrl+D


I tried it, it didn’t work at all. Found this comment by looking for a different option. Ctrl + D does the trick.

I have a bunch of snippets on Alfred that I use to create react components, require packages, etc. Ctrl + D is perfect for replacing placeholder names in those snippets.