17

VSCode has a very useful shortcut: CTRL + D - Add Selection To Next Find Match.

What is the equivalent in Visual Studio?


Below an example:

CTRL+D VSCode shortcut

Gama11
  • 31,714
  • 9
  • 78
  • 100
Maicon Heck
  • 2,017
  • 1
  • 20
  • 27
  • Do you want go to the next search result? F3 – user1012506 Jun 06 '18 at 18:55
  • I added now an image demonstrating an example of using CTRL + D No, although the "next result search" has a similar effect, "add selection to next find match" allows editing according to the example I put in the image. – Maicon Heck Jun 07 '18 at 15:57

3 Answers3

11

Update Visual Studio 2017+

This is natively available starting in Visual Studio 2017 under the command(s):

  • Shift + Alt + . - Edit.InsertNextMatchingCaret
  • Shift + Alt + ; - Edit.InsertCaretsatAllMatching

You can change the shortcut in keyboard options if you want.

select next

Comparison VS Code and Visual Studio

Visual Studio Code Visual Studio
Ctrl + D

editor.action.addSelectionToNextFindMatch
Add Selection to Next Find Match
Shift + Alt + .

Edit.InsertNextMatchingCaret

Ctrl + Shift + L

editor.action.selectHighlights
Select All Occurrences of Find Match
Shift + Alt + ;

Edit.InsertCaretsAtAllMatching

Further Reading

KyleMit
  • 30,350
  • 66
  • 462
  • 664
4

I figure out that this feature (Multi-Caret Support) was added through an update in Visual Studio 2017.

With Ctrl + Alt + Click you can add multiple insertion points or carets, as shown here here.

Maicon Heck
  • 2,017
  • 1
  • 20
  • 27
2

As far as i know, there is no equivalent directly in Visual Studio, but you can use Select Next Occurrence extension that mimics this behavior.

daywee
  • 36
  • 2