Navigate to open files / open tabs - visual-studio

Problem: Some times I have many tabs open and finding a tab is not easy and fast.
Question: Is there any shortcut in visual studio or resharper that allow us to find a tab by typing part of file/tab name?
Example: Something like Navigate-> Recent files... of resharper:

Looking up the ReSharper 2017.2 Help - Navigation and Search I could not find any hint about navigating through active files.
Visual Studio allows you to navigate through all open tabs by using Ctrl + Tab. This allows you to switch trough all open tabs ordered by their latest use. Use Ctrl + Tab again for forward and Ctrl + Shift + Tab for backward navigation. But as you already mentioned with a lots of open tabs it could be slow stepping through all active files.
What I personally do in your situation, when trying to find a open tab or any kind of class/file/member, is to use the Ctrl + T shortcut. This opens the Go to Everything/Type … popup, which allows you to search for anything within you solution.
To find an item in your solution by the item's name
To use the unified access to all search results, press Ctrl+T to display a pop-up where you can start typing and find everything in your solution that matches your input.
If you want to limit your search to types (classes, interfaces, structs or enums), press Ctrl+T twice.
If you want to find anything by a plain textual match, press Ctrl+T three times.
If you want to search symbols (types, methods, properties, fields, and so on) - press Shift+Alt+T.
You can also limit the search to files in your solution by pressing Ctrl+Shift+T.
from ReSharper Help - Navigation by Name
More Shortcuts: Resharper - Default Keyboard Shortcut Schemes

Yoy can try set shortcut to open window with active tabs: Options -> KeyBoard -> Window.Windows
It will look something like this

Related

Closing files with the Visual Studio Popup Navigator Window?

I'm looking for a quicker way to close files in visual studio so I can avoid X'ing out of a file, or hitting ctrl+f4. These are too slow for closing multiple files.
Is it possible to configure the popup navigator window (ctrl+tab) to close files somehow?
Like maybe clicking a file with the middle click on a mouse, or area dragging over a few files and hitting del?
I'd also welcome any other way of closing multiple files in a quick manner.
Works for me by clicking the middle mouse button down anywhere on the tab towards the top of the window.
Perhaps you could remap the keyboard shortcut from 'ctrl + f4' to 'ctrl + w' to mimic typical behavior of other applications? Keyboard shortcuts can be accessed through:
Tools>Options - then look for Keyboard under the Environment tab. To access the shortcut for closing a tab, search for Window.CloseDocumentWindow
Hope that helps - I'm unaware of any means to close multiple windows at once.

Visual Studio 2019 Search History not in 'table'

Alright so I recently did a clean install of visual studio and one thing changed from last time.
With vs2019, I think, came the different looking "Search History". Here are two screens of what exactly I mean with that. New looking history and here is the old one
I'm just not sure why now I only get the old one. I found out that the new one only appears with CTRL + SHIFT + F and the older one with regular CTRL + F. Is there are way so that the default CTRL + F window displays the same output window? (the newest one)
At first I didn't really like it that much, but now I prefer it. I'm running VS2019 Version 16.5.2.
Edit: And also, this is where I used to get the table version if anyone was wondering. Now it's just this old text thing.
In the "Find in Files" tool window, ensure "Find results table" is selected, not "Find results 1 window":
You can customize the keyboard shortcut.
Go to Tools\Options
Navigate to Environment\Keyboard
Under "Show commands containing", type Edit.FindinFiles
Under "Press shortcut keys", press the desired keyboard shortcut (i.e. in your case Ctrl+F)
Click Assign and then OK
See screenshot here
Tools > Options > Environment > Preview Features > Check "Use
Previous Find in Files"
Ctrl+Shift+F > Open Result options > Select
"Find results table"
Close the Find and Replace tool window and
revert the aforementioned "Use Previous Find in Files" setting
(optional)
Perform a search (either Find in Files or simply through
the standard Ctrl+F find prompt) Your results will then appear in
the advanced tabular "Find results table" window.
Presumably this setting is also found elsewhere but I haven't been able to find it without turning off the Find in Files preview feature.
https://stackoverflow.com/a/63789479

Visual Studio: how to make pressing tab key indent the whole line

Is there a way to configure a keyboard shortcut in Visual Studio such that tab (or some other key combo) indent the whole line (rather than insert a tab character/spaces at the cursor)?
Trying to determine whether Visual Studio is the dream editor
EDIT
I'm an experienced VS user, I know about the standard behavior, just curious whether it can be configured with the interesting tab behavior described in the link.
Increase indent:
Select / highlight line(s) or press Home
Press tab
Decrease indent:
Select / highlight line(s) or press Home
Press shift + tab
If you want to add a shortcut to do the same from anywhere in the line without selecting it then you can add a shortcut in Options -> Environment -> Keyboard. There'll be a list of commands including Edit.IncreaseLineIndent and Edit.DecreaseLineIndent. I couldn't find a good key combination for a shortcut though which wasn't already being used for something else. You can't use just tab by itself.

How to sync a code window and solution explorer in Visual Studio?

If a have a code window open in Visual Studio, how can I quickly have the Solution Navigator or Solution Explorer show the current file is open?
Tools -> Options -> Projects and Solutions -> General ->
Track Active Item in Solution Explorer
Resharper?
Alt + Shift + L?
:D
With larger solutions, I find the Track Active Item option annoying as it often rearranges the view in Solution Explorer as I move from one code window to the next.
My preference is to use an extension called Code Maid, which allows you to find the item in the Solution Explorer via a context menu popup or keyboard shortcut. Has other features that you may find useful as well.
http://visualstudiogallery.msdn.microsoft.com/ef4ac3e9-d056-4383-8ca2-11721bd879b4
Here is a plugin which does that. It is also provided with on/off button which makes it comfortable to use.
There is also native shortcut in VS - CTRL + [, CTRL + S by default.
See keyboard shortcut to command SolutionExplorer.SyncWithActiveDocument
No plugins needed since at least VS 2017.

Visual Studio Window Shortcut Wonkyness

I've been diligently memorizing VS 2010 shortcuts based on the cheatsheats on Scott Guthries blog.
The shortcuts in the cheatsheet for WIndows dont match my setup e.g. Ctrl W,C is the cheatsheet shortcut to open the class viewer but mine is Ctrl + SHift, C. Maybe this is because my 08 settings got picked up at some point.
I've changed the shortcuts for viewing windows to match the cheat sheet (Ctrl + W,...) however most of the time Ctrl+W,... isn't working for me, whereas the previously defined shortcuts still work. If I go into the keyboard mappings I can see the shortcuts under global are Ctrl+W.
Anyone got any ideas?
Try going to Tools -> Options -> General -> Keyboard, focus the textbox labelled "Press shortcut keys" and pressing Ctrl+W. The dropdown list beneath it will show all corresponding actions. Action mappings are contextual -- they depend on what has the focus. Furthermore, 'Global' actions only apply if a more localised mapping does not exist. Check for anything applied to 'Text Editor'. If it exists and you don't want it, remove it by digging the action out in the 'Show commands containing' textbox above and clicking 'Remove'.
Also, do you have ReSharper installed? I love R#, but it uses Ctrl+W so the series of shortcuts you're referring to aren't available without being remapped or changing the R# keystroke (which I wouldn't personally, as I use it all the time.)

Resources