Visual Studio 2019 Search History not in 'table' - visual-studio

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

Related

How to enable visual studio find results window with "advanced features"?

Please refer to this for the 2 types of Find results window I've encountered in VS2019 using the Quick find feature (or the default Ctrl+F).
The first image is a window that seems advanced, in that it has grouping of the results (by project, by file), it has other options like the Keep results, and List view toggles, etc etc.
The second image on the other hand is a really plain results list, without the options/features of the first one.
For the first window, I don't remember anymore how I've done it (I've started using VS2019 early last year), and for the succeeding VS installations, I'm only using this with a settings file exported from VS.
For the second window, I tried to reset VS settings (Tools → Import and Export Settings) and selected C#, and when I use quick find and see its results, it is this kind of find results window that is shown.
I really want to reset VS settings, but I cannot lose the features provided by the first Find result window.
Question: How to enable that window?
Sub question if I may - the reason I want to reset VS settings is that changes I make in Text Editor → C# → Code Style does not take effect and is reset (I make the changes, press OK button, open the options window again, and the values are reverted - even after restarting VS). What may have caused this behavior?
VS Version: Enterprise 2019, 16.6.5
It took me some time to figure out. There isn't a Find Result Window 1 and 2 anymore. After you perform a search, in the "Find" results pane, there is a "Keep Results" button. Click this button to lock the pane so that the next time you search, it will create a new "Find" results pane and keep the locked pane visible.
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.

Navigate to open files / open tabs

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

Visual Studio 2013 - Search Short Cuts (hot keys)

In visual Studio, is there a way I can set up hot keys to quickly switch between searching in all open documents, entire solution or current document?
It is sooooo slow to have to use the mouse to change the option from the ctrl+f or chift+ctrl+f search menu.
...gregory
Please see this
https://msdn.microsoft.com/en-us/library/5zwses53.aspx
On the menu bar, choose Tools, Options.
Expand Environment, and then choose Keyboard.
this is a command for find in files 'Edit.FindinFiles' default hot key is 'Ctrl + Shift + F'.
You add any new short key as you like
Hope this help....

How to actually search all files in Visual Studio

I am using Visual Studio. Say for instance I have a static public method named FooBar() in class Utils. Let's also say that I use this method in a lot of .aspx files. Let's say I change the method signature of FooBar() to FooBar(string), and subsequently I'd like to find all the instances of Utils.FooBar so I can update them.
Now let's say I go to the Solution Explorer search box, select "Search within file contents", and type "Utils". Despite the fact that I make Utils.* method calls everywhere, the only thing that shows up is the Utils.cs file. If I keep typing "Utils.FooBar", nothing shows up.
Right now, I am launching a cygwin window and using grep since normal windows search is pretty useless too. But it seems like there there must be an actual way of searching within all files in Visual Studio. Am I missing something?
I think you are talking about ctrl + shift + F, by default it should be on "look in: entire solution" and there you go.
So the answer seems to be to NOT use the Solution Explorer search box.
Rather, open any file in the solution, then use the control-f search pop-up to search all files by:
selecting "Find All" from the "--> Find Next / <-- Find Previous" selector
selecting "Current Project" or "Entire Solution" from the selector that normally says just "Current Document".
Press Ctrl+,
Then you will see a docked window under name of "Go to all"
This a picture of the "Go to all" in my IDE
One can access the "Find in Files" window via the drop-down menu selection and search all files in the Entire Solution:
Edit > Find and Replace > Find in Files
Other, alternative is to open the "Find in Files" window via the "Standard Toolbars" button as highlighted in the below screen-short:
Preface: As others have said, ctrl+shift+F is the tool, but I am so often frustrated by the fact that the default options don't find everything!
Answer: If you want to search every file then, from the "Find in Files" tab:
Click the ellipses to the right of "Look in" then choose the folder containing your Solution.
Set "File types" to *
Click "Find All" and finally find what you were looking for.
Warning: The search could take a while and it may find occurrences in files that shouldn't be edited.

Is there a keyboard shortcut to quickly find and open a file in Visual Studio 2005/2008 like how they do it in TextMate?

Is there a keyboard shortcut to quickly find and open a file in Visual Studio 2005/2008 like how they do it in TextMate?
In textmate Command + T in Textmate brings up something that you can type a few key which would display all relevant files and allow you to quickly select one, Command + T back and forth also allows you to quickly alternate between 2 files most recently used. This is extremely helpful.
I am aware that there is a Ctrl + Alt + ↓ which shows a list of all open documents which is almost there but not quite.
You can hit Ctrl+D to go to the search box, then type >of filename (with autocomplete).
You can also do this and other commands in the command window or the immediate window.
Or, if you don't mind buying, ReSharper has Go to File which I highly recommend. It's Ctrl+Shift+N and it brings up a nice search dialog that supports wildcards and other shortcuts.
Sonic File Finder is a free VS plugin which is basically the same thing, and quite well-loved by most people who install it.
http://www.jens-schaller.de/sonictools/sonicfilefinder/index.htm
I think the best solution is the following
CTRL + , (comma) then type your file/class/method name
I've made an extension that works exactly like Textmate's "go to file" feature: https://github.com/maxt3r/VS-CmdT
If you go to the search box in visual studio and type ">open " and then start typing, autocomplete will come up for all the files in your solution. This is in 2008, not so sure about 2005.
Out of the box in Visual Studio, Ctrl + Tab will toggle between the two most recent files.
Ctrl+Shift+T in Resharper works just like you describe. It provides a text box in which you type the filename and it generates a live list from which you can pick from. Nice features include wildcarding (e.g. Customer*xaml) and matching on camel case filenames (e.g. SVD will match SingleValueDecomposition.cs). At my work, if people use one feature of Resharper, it will be Ctrl+Shift+T.
If you code in C++ rather than C#, then Visual Assist provides some functionality. And in my opinion, works better than Resharper.
Sara Ford has a blog post about this: Did you know... How to open a file in the solution without using either a tool window or a dialog?
All the previous responses are accurate and are mentioned in her post and the comments. In addition, another approach is to launch the command window using CTRL+ALT+A then typing in "of filename" or "open filename" in the same way mentioned for the search field.
#Adam Neal mentioned ReSharper. Another popular tool is CodeRush/Refactor! Pro and it also has a file navigation window that can be launched (and searched) via the CTRL+ALT+F shortcut.

Resources