What is the equivalent shortcut for CTRL + D ("add selection to next location match") of VSCode in Visual Studio? - visual-studio

VSCode has a very useful shortcut: CTRL + D - Add Selection To Next Find Match.
What is the equivalent in Visual Studio?
Below an example:

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.
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
Multiple select in Visual Studio?
Highlight all occurrences of a selected object with ReSharper

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.

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.

Related

Visual studio 'Ctrl + Alt + Click' goes to implementation

I used resharper and there has been a very useful thing .
'Ctrl + click' - goes to definition
'Ctrl + Alt + click' - goes to implementation
If there are more than one implementation the list of all implementations shows up and you can choose a necessary implementation
Is there a way to make it in the visual studio 2019.
PS: I know about visual studio Ctrl + F12 .But I'm interested particularly in ctrl + alt + click
If you are using ReSharper, then you can enable this in the Options -> Search And Navigation but I don't think VS offers this out of the box.
And if you are using JetBrains Rider, then you can go to File -> Settings, search for implementation and right click on Implementation(s) and select Add Mouse Shortcut and then do Ctrl Alt Click

VsVim and visual mode in visual studio 2013

when i select a text with shift + arrows or shift + ctrl + arrows (simple select a text..) then I have visual mode in vsVim. I'm anry and i can't delete text by del, but must to use d (to remove text). How can I disable visual mode when i'm push a shift on keyboard?
You can fix this by adding the following to your ยจ/_vsvimrc file:
:vmap <Del> d
(Another question is why you would want to use shift+arrows after having installed VsVim. I never use those key combinations when the more efficient Vim commands are available.)

Resharper equivalent of CodeRush's "Tab" shortcut (go to next/prev usage)

I'm trying to switch to Resharper from CodeRush and really struggling with this one.
In CodeRush when you are over a variable/method etc. if you press "Tab" it will jump to the next usage of it. Similar to VS.NET's Ctrl + Shift + Down/up
Is there anyway to do this in Resharper? Is there any plugin or a way for me to assign Tab to similar command in Resharper?
ReSharper has this functionality, but only after you have either found or highlighted the usages of a variable/method/etc...
The keyboard shortcuts depend on whether you are using the Visual Studio or IDEA keyboard mappings (set in ReSharper -> Options -> Visual Studio Integration -> Keybarod Shortcuts).
To find the usages, press Shift + F12 (Visual Studio) or Alt + F7 (IDEA).
To highlight usages, press Shift + Alt + F11 (Visual Studio) or Ctrl + Shift + F7 (IDEA).
Once you have done either of the above, you can move to the next usage using Ctrl + Alt + FPgDn (Visual Studio) or Ctrl + Alt + Down (IDEA).
This ReSharper help page has a more complete set of shortcuts.

In visual studio how to select word in text editor using keyboard

In earlier version of Microsoft Visual Studio products if user in text editor hit CTRL+W editor will do select the word where is pointer. Does that keyboard shortcut exists still in Visual Studio 2010?
In Tools | Options | Environment | Keyboard enter "Word" into "Show commands containing" and see all commands associated with words.
Here the command Edit.SelectCurrentWord is assigned to Ctrl + W, but your setup might be different. Ctrl + Shift + W is another common setting.
When using Resharper 'Shift + Ctrl + W' shortcut may be overriden and not working. Create new shortcut for Edit.SelectCurrentWord as 'Ctrl + W, Ctrl + W'. It works fine so you may use this and resharper shortcuts.
In Visual Studio 2019 the default keypress to select a word is:
Ctrl + Shift + W
The path i have to use is Debbugen (Debug), Optionen... (Options), Umgebung (Environment), Tastatur (Keyboard) and the first menu to expand to chose (Standard)([maybe]default).
I have no defined version control.
With version
Microsoft Visual Studio Community 2019
Version 16.10.1
Microsoft .NET Framework
Version 4.8.04.084

Key shortcut (hotkey) in Visual Studio to open a file inside your solution?

Is there a key shortcut in Visual Studio to find & open a file inside your solution without using Resharper or any other tools?
The accepted solution doesn't work on the newer versions.
For Visual Studio 2022, and 2019, 2017 do the following:
Update 1:
Now, pressing Ctrl + Shift + T and typing the file name works!
Update 2:
Since Visual Studio 2019 now it's possible to do a similar search via Ctrl + Q.
But it works slightly sloppy since it shows VS-related stuff as well.
Original answer:
Press these keys to open the "Go to" popup:
Ctrl +
,
Type there:
f Space Filename
Press Enter
Notes:
We are writing f to make VS search only on files. We can
also, use other letters. For more info type ? in the "Go to" popup.
For more keys and for Visual Studio 2012 to 2015 take a look at this
answer.
This answer is outdated; see here for latest information.
Not a single keystroke, but yes: `Ctrl+D > o f filename` (so that's five keystrokes before you start typing the filename). It then autocompletes the filename for you.
You need the Find box in the toolbar for this to work.
(If you change your mind about addins, SonicFileFinder is for this very purpose, and free.)
You can also use Ctrl + /, which puts the > in place for you automatically.
Similar to Just Shadow's answer I discover that, on Visual Studio 2017, you can do the following:
Press Ctrl + 1, then f
Or you could go to Tools -> Options -> Keyboard
and change the shortcut of Edit.GoToFile for whatever you like.
I replaced mine with: Ctrl + O

Resources