Reputation: 5714
Usually in vs2015 and vs2017 (at least) when you select a word, automatically all the references of the word get selected. I would like to know if there is a way to edit all the occurrences using a keyboard shortcut (placing multiple cursors without the searching dialog), as an example, let's say that in the image below i would like to replace the "Some" with "Very".
Upvotes: 2
Views: 2770
Reputation: 2868
Update for VS 2022. You're going to want to make use of VS2022's Multiple Caret functionality if you're not strickly looking to perform a variable/function rename action, which can be done using Ctrl+R+Ctrl+R.
Once you've made the initial selection you can use Edit -> Multiple Carets -> Insert Carets At All Matching
functionality.
By default, this function is mapped to: Shift+Alt+;
This will add a new caret to each of the highlighted/matching sections allowing you to edit them simultaneously.
Multi-caret support in VS2022 is quite extensive. You can explore more options in the official documentation.
Upvotes: 1
Reputation: 19367
There is at least one plug-in, Multi Edit Mode, but you can just modify the function name and use the light bulb/quick actions (Ctrl .
) to rename/refactor all references to the function.
Upvotes: 0