15 Productivity Keyboard Shortcuts in Visual Studio 2022

15 Productivity Keyboard Shortcuts in Visual Studio 2022

Last Updated on August 26, 2023 by Aram

In this article I will share with you the 15+ Productivity Keyboard Shortcuts in Visual Studio 2022, using these shortcuts can definitely improve your coding speed and efficiency.

Once you get used to applying these keyboard shortcuts, you will notice a massive boost in your development and overall productivity.

These keyboard shortcuts include performing many highly productive tasks such as quick actions, refactorings, formatting, searching and many others.

Let’s get started with the 15 Productivity Keyboard Shortcuts in Visual Studio 2022.

Ctrl k + Ctrl d

Format code / markup / xml / json

From

Unformatted Class

To

Formatted Class using Ctrl k + Ctrl d

JSON Structures:

From

Unformatted JSON

To

Formatted JSON using Ctrl k + Ctrl d

Ctrl k + Ctrl c

Comment selected code / markup / XML / JSON

Ctrl k + Ctrl u

Uncomment selected code / markup / XML / JSON

Ctrl + .

Quick Actions, includes refactoring code, adding using namespace, generate class methods, new language features suggestions, code optimizations and a lot more

Ctrl r + Ctrl r

Rename variable, object, class, interface, method and more with refactoring to rename it everywhere including a physical file name

Shift + Enter (Rename Mode)

Preview Changes that will be affected by the rename, you can exclude selected lines from the rename

Shift + F12

Find usage references in Entire solution

Can be applied to variables, objects, method calls, properties and more

Ctrl r + Ctrl m

Extract method from expression

Ctrl r + Ctrl i

Extract interface

Ctrl + space

Auto Complete drop down

Single Tab

Apply grayed auto-complete code

Double Tab

Apply auto-complete suggested snippet

Ctrl + d

Duplicate the current line of code

Ctrl + Shift + v

Display Clipboard (History of Copy)

Ctrl + ,

Search in Code

More Keyboard Shortcuts in Visual Studio 2022

F5 — Run Project with debugging (host-based)

Ctrl + F5 — Run Project without debugging (host-based)

Ctrl r + t — Run tests

Ctrl r + Ctrl t — Debug tests

Ctrl t + e — Show test explorer

Ctrl + b — build project

Ctrl + Shift + b — build Solution

F12 — Go to definition

Ctrl + F12 — Go to Implementation

Ctrl + f — Find in file

Ctrl + Shift + f — Find in Entire Solution

Ctrl + h — find and replace in file

Ctrl + Shift + h — find and replace in entire solution

Ctrl + n — New File

Ctrl + Shit + n — New Project

Ctrl + ` — Show Terminal Panel

Ctrl + a — Select All

Ctrl + x — Cut

Ctrl + c — Copy

Ctrl + v — Paste

Shift + home — Select line (right-to-left)

Shift + end — Select line (left-to-right)

Shift + delete — remove whole line

Ctrl + Left-Click – Go to Definition

Alt + Mouse Drag – Custom area selection

Ctrl + Left-Click drag – Duplicate selected code

Learning

Check the official Microsoft Documentation to read more about the Keyboard Shortcuts in Visual Studio 2022

Check my other tutorials to learn more about ASP.NET Core Web API

Sponsorships and Collaborations

With a growing blog traffic and increasingly expanding followers and subscribers, I can offer you a lot of potential opportunities.

Interested?

Follow this link to learn more.

Bonus

Here is a lovely piece of music by the genius Mozart

One Comment on “15 Productivity Keyboard Shortcuts in Visual Studio 2022”

Leave a Reply