I wanted to present my list of features of Visual Studio (and PowerShell/Windows Explorer) that may increase productivity or
just reduce the amount of clicks needed to acomplish simple tasks.
I believe that majority of them is pretty well known / trivial, but maybe somebody can find something nice.
Order is kinda random.
1: CTRL+Tab - Quick File Navigation
This is probably my favourite one, very handy combination when you want to jump between files quickly.
It shows you all opened files on a simple interface that allows you to keep CTRL+Tabing, use arrows or even use mouse to select desired file.
Way faster than using Solution Explorer, great tool for rapid cruding.
2: Special Paste - JSON/XML class generation
No need to use external sites or tools for json class generation, the built into the VS tool works fine.
I said json only because I believe that XML generates too big classes in compare to external tools, but remember to be careful when pasting stuff there cuz you may leak something
3: Watch Window
Watch window helps to save time when having to perform non-trivial debug scenerios, put your code into some specific state or just to retrive some data.
It's not perfect tool, it has some limitations, sometimes your expression can just fail or throw time out and you'll not see the result, sometimes after trying once again it will not time out, but when it works, then it's nice.
4: Edit code at fly
Editing code at fly is yet another sometimes helpful tool when debugging stuff.
Unfortunely it has limitations and will not always work - definitely when it comes to COMs, but very often it does, so it's worth trying.
Here are more details from MS Docs about its limitations
Supported code changes C#
5: CTRL+SHIFT+A - Add New Item
Instead of clicking on the project, then going to "Add" and then "New Item..."
You can just use CTRL+SHIFT+A which will open the "Add New Item" Window
6: Define shortcut for folder creation
Instead of clicking on the project, then going to "Add" and then "New Item..."
or using CTRL+ALT+L + ALT+P+D, you can just define your own shortcut like, for me it is e.g "CTRL+SHIFT+F; F"
7: SHIFT+Right Click in File Explorer
Instead of opening CMD/PowerShell and typing cd... to some location, you can just use SHIFT+Right Click and select e.g "Open PowerShell window here"
8: ii .
When you type "ii ." (that's short for "Invoke-Item .") in PowerShell it will open File Explorer (Folder) in this place
9: CTRL+SHIFT+V - Clipboard History
10: Task / Todo List
You can find all of yours "// TODO: " and similar by using "Task List"
which for code like that:
| var test = GetValue(5); |
| Console.WriteLine(test); |
| |
| |
| int GetValue(int a) |
| { |
| Console.WriteLine("Test"); |
| return a + 5; |
| } |
| |
| int GetValue2(int a) |
| { |
| return a * 5; |
| } |
| |
| |
| |
| |
will show (damn, off by one again!)
Personally I use 8 of them very often, Task List rarely and Clipboard is something that I've just recently found.