You are currently viewing Visual Studio Shortcuts: The Complete Guide to Coding Faster in 2026

Visual Studio Shortcuts: The Complete Guide to Coding Faster in 2026

If you spend your days writing C# in Visual Studio, learning Visual Studio shortcuts is one of the best things you can do. Every second you reach for the mouse is a second lost. In fact, once you lock these key combos into muscle memory, your whole workflow speeds up. This guide covers every type of shortcut you need: from moving around your code and editing to debugging and clean-up. Think of it as your one-stop cheat sheet for the IDE.

Table of Contents

Why Visual Studio Shortcuts Matter

We spend hours in Visual Studio every day. So even small speed gains add up over a week or month. With the right shortcut, tasks like building, jumping to a file, or setting a breakpoint take a split second.

Also, keeping both hands on the keyboard helps you stay in the zone. Reaching for the mouse breaks your focus, even if just for a moment. So devs who learn Visual Studio shortcuts say their coding sessions feel smoother. If you have looked at Visual Studio Solution Explorer tips before, you know the IDE hides great tools behind its menus.

Keyboard Settings and Profiles

Visual Studio supports more than one keyboard profile. When you set up the IDE, you pick a profile such as General, Visual C#, or Visual Basic. Because of this, some shortcuts may differ based on your active profile. For example, the General profile uses Ctrl+Shift+B to build.
To check or change your mapping, go to Tools > Options > Environment > Keyboard. Also, if you sign into Visual Studio with a Microsoft account, your settings sync across machines through the cloud. All shortcuts in this guide use the General profile unless noted.

Moving through large code bases fast is key for any dev. Luckily, Visual Studio has strong shortcuts that let you jump between files, classes, and methods without touching the Solution Explorer.

Go to Definition (F12) is likely the most used shortcut for getting around. Put your cursor on any class, method, or property name and press F12. Visual Studio takes you right to where that symbol is defined. In the same way, pressing Ctrl+F12 goes to the declaration or implementation, depending on context.

Peek Definition (Alt+F12) opens an inline preview below your cursor. So you can look at a method’s code without leaving your current file. Press Escape to close the peek window.

Find All References (Shift+F12) shows every spot in your solution where a symbol is used. This is handy when you need to see how a method or property is called across the code base.

For general searching, Ctrl+, (Go to All) opens a search box for files, types, members, and symbols. Also, Ctrl+- moves backward and Ctrl+Shift+- moves forward. Ctrl+Tab cycles through recent files, which helps when you work across many tabs.

Code Editing Shortcuts

These shortcuts handle the tasks you do hundreds of times a day. Learning them cuts the gap between thinking and typing.

Move Line Up/Down (Alt+Up Arrow / Alt+Down Arrow) lets you reorder lines without cut and paste. Hold Alt and press the arrow keys to shift the selected code. This is great for reordering switch cases or method params.

Duplicate Line duplicates the current line. In many newer Visual Studio setups, you can use Ctrl+D. The long-standing documented shortcut is Ctrl+E, V.
Delete Line (Ctrl+Shift+L) wipes the whole line where your cursor sits. You do not need to select it first. In the same vein, Ctrl+L cuts the line to your clipboard.

Comment/Uncomment (Ctrl+K, Ctrl+C / Ctrl+K, Ctrl+U) toggles comments on selected code. Select the block, press Ctrl+K then Ctrl+C. To undo, press Ctrl+K then Ctrl+U. These chord shortcuts (two key presses in a row) are common in Visual Studio.

Collapse/Expand Regions also uses chord shortcuts. Press Ctrl+M, Ctrl+O to fold all methods in a file. This gives you a bird’s-eye view of the class. Press Ctrl+M, Ctrl+L to toggle all outlining (it expands or collapses based on the current state). To toggle one method, press Ctrl+M, Ctrl+M.

Search and Replace

Finding code fast is a core part of coding. Visual Studio has layers of search tools, each one just a shortcut away.

Ctrl+F opens Find in the current file. But the real power comes from Ctrl+Shift+F, which opens Find in Files. This searches your whole solution and shows results in a panel. You can filter by file type, scope to a project, and use regex for complex matching.

For replacing text, Ctrl+H opens Find and Replace in the current file. Ctrl+Shift+H opens Replace in Files for changes across the whole solution. Be careful with this, though. Always check the preview before you confirm.

On top of that, Visual Studio has two search bars worth knowing. Ctrl+Q opens Feature Search, which finds IDE settings and menu items. For example, type “line numbers” to jump right to that display option. Meanwhile, Ctrl+T (same as Ctrl+,) opens Go to All, which searches your code for files, types, and members.

IntelliSense and Code Snippets

IntelliSense is one of the most loved tools in Visual Studio. Knowing how to control it with shortcuts makes a real difference.

Ctrl+J shows the IntelliSense list, and Ctrl+Shift+Space shows parameter info for the method you are calling. In some contexts, Ctrl+Space also triggers completion or brings IntelliSense back after it was dismissed.
Code snippets are another speed boost. Type a snippet prefix and press Tab twice to expand it. For example, type prop then press Tab, Tab to get a full auto property. Here are some of the most handy built-in snippets:

// Type "prop" + Tab + Tab to get:
public int MyProperty { get; set; }

// Type "ctor" + Tab + Tab for a constructor:
public MyClass()
{
}

// Type "for" + Tab + Tab for a for loop:
for (int i = 0; i < length; i++)
{
}

// Type "foreach" + Tab + Tab:
foreach (var item in collection)
{
}

// Type "try" + Tab + Tab:
try
{
}
catch (Exception)
{
    throw;
}

You can open the Insert Snippet picker by pressing Ctrl+K, Ctrl+X. To wrap code in a snippet (like a try-catch block), select the code and press Ctrl+K, Ctrl+S. If you have used Visual Studio code snippets before, you know the time they save.

Refactoring and Quick Actions

This is where Visual Studio truly shines as an IDE. These shortcuts help you reshape code in a safe and fast way.

Quick Actions (Ctrl+.) is perhaps the most useful shortcut in Visual Studio. Put your cursor on any code with a lightbulb icon and press Ctrl+. to see what it can do. Options include adding missing using statements, creating methods, and more. So this one shortcut replaces a lot of menu clicking.

Rename (Ctrl+R, Ctrl+R) renames a symbol across your whole solution. Press Ctrl+R, Ctrl+R on any name, type the new one, and press Enter. Every usage updates at once. This is safer than Find and Replace because the engine knows the code’s structure. Note that F2 also triggers rename in some keyboard profiles.

Extract Method (Ctrl+R, Ctrl+M) takes selected code and moves it into a new method. The IDE works out the right params and return type on its own.

// Before: a long method with shared logic
public void ProcessOrder(Order order)
{
    // Select these lines and press Ctrl+R, Ctrl+M
    decimal subtotal = order.Items.Sum(i => i.Price * i.Quantity);
    decimal tax = subtotal * 0.15m;
    decimal total = subtotal + tax;
    order.Total = total;
}

// After: the extracted method
private static void CalculateOrderTotal(Order order)
{
    decimal subtotal = order.Items.Sum(i => i.Price * i.Quantity);
    decimal tax = subtotal * 0.15m;
    decimal total = subtotal + tax;
    order.Total = total;
}

Debugging Shortcuts

You spend a large chunk of your dev time debugging. So knowing these shortcuts well will pay off big time. If you liked reading about debugging lambda expressions in Visual Studio, you will love how these key combos speed things up.

Toggle Breakpoint (F9) adds or removes a breakpoint on the current line. You do not need to click the margin. Just put your cursor on the line and press F9. To clear all breakpoints at once, press Ctrl+Shift+F9.

Step Over (F10) runs the current line and moves to the next. It does not step into method calls. In contrast, Step Into (F11) drops you inside a method so you can walk through it line by line. When done, press Shift+F11 to Step Out and return to the calling code.

Run to Cursor (Ctrl+F10) is a hidden gem. Put your cursor on a line and press Ctrl+F10. The debugger runs until it hits that line, then stops. This is great when you want to skip past a long loop.

Quick Watch (Shift+F9) lets you check the value of any expression during a debug session. The Immediate Window (Ctrl+Alt+I) goes a step further. It lets you run code and test values without restarting the app.

Bookmarks

Bookmarks let you mark lines of code so you can jump back to them fast. They help a lot when you track a bug across many files.

Ctrl+K, Ctrl+K toggles a bookmark on the current line. Once you set a few, press Ctrl+K, N to go to the next one, or Ctrl+K, P for the last one. To see them all, open the Bookmark Window with Ctrl+K, Ctrl+W.

Bookmarks stick around during your session and survive builds. Bookmark persistence can vary, so don’t rely on unsaved bookmarks across sessions.

Window and Project Management

Keeping your IDE layout clean helps you focus. Visual Studio has shortcuts for this too.

Ctrl+Shift+O opens a solution from disk. Ctrl+Shift+N creates a new project. Ctrl+; puts focus on the Solution Explorer search box. These three cover the most common project-level tasks.

F4 opens the Properties pane. Ctrl+F4 closes the current tab. For tool windows, Ctrl+Alt+L opens the Solution Explorer and Ctrl+\, Ctrl+E opens the Error List.

Build and Run

Building and running your code are things you do all day long. So these shortcuts should be second nature.

Ctrl+Shift+B builds the whole solution. It compiles every project that changed since the last build. In some Visual Studio setups, F6 also builds the solution.

F5 starts debugging. Ctrl+F5 starts without the debugger, which is good for quick test runs. Shift+F5 stops the debugger, and Ctrl+Shift+F5 restarts from scratch. These four combos cover the full debug lifecycle.

Multi-Cursor and Block Editing

Multi-cursor editing lets you type in more than one place at the same time. It is one of the most useful yet least used tools in Visual Studio.

Hold Alt+Shift and press the Up or Down arrow keys to add carets on each line above or below. You can also drag with Alt+Shift held down to place carets across a block. What you type then shows up at every caret at once. This is perfect for adding prefixes or lining up code.

For non-contiguous spots, hold Ctrl+Alt and click where you want each caret. For example, if ten private fields need the readonly keyword, add carets on those lines and type it once.

Code Cleanup and Formatting

Clean code is easy to read. Visual Studio shortcuts help you keep style rules in check with no manual work.

Ctrl+K, Ctrl+D formats the whole file based on your rules. It fixes indents, spacing, and brace style in one press. To format just a selection, use Ctrl+K, Ctrl+F.

Ctrl+K, Ctrl+E runs Code Cleanup, which goes beyond formatting. It strips out unused usings, sorts them, and applies your code style choices. You can set which fixers run via Analyze > Code Cleanup > Configure Code Cleanup. In short, this replaces what many devs once used ReSharper for.

If you use Rainbow Braces in Visual Studio, you care about readable code. Code Cleanup takes that idea further by forcing a clean style across your file.

Making Your Own Shortcuts

Visual Studio lets you create or change shortcuts for almost any command. Go to Tools > Options > Environment > Keyboard, type the command name in the search box, and press the keys you want. The dialog warns you if there is a clash. You can also scope shortcuts to certain contexts, like the text editor or Solution Explorer.

Here are some common custom shortcuts worth setting up:

Close All Documents:     Ctrl+Shift+W (not bound by default)
Toggle Word Wrap:        Ctrl+E, Ctrl+W (default in some profiles)
Duplicate Line/Selection: Ctrl+D (bound in newer builds)
Open Terminal:           Ctrl+` (custom; open via View > Terminal by default)

Also, if you sign into Visual Studio with your Microsoft account, your custom shortcuts sync across devices on their own. You only need to set them up once.

Hidden Gems Most Devs Miss

Beyond the well-known shortcuts, Visual Studio has key combos that even seasoned devs rarely find. Here are some that deserve a spot in your muscle memory.

Ctrl+Shift+V opens the Clipboard Ring. It cycles through your last few clipboard entries. If you copied something five steps ago, you can paste it without going back. Think of it as a built-in clipboard history.

Ctrl+. on a missing type can create a new class file for you. For example, if you type var service = new OrderService(); and OrderService does not exist, press Ctrl+. and choose “Generate class.” Visual Studio makes the file and class stub in one step.

Ctrl+Shift+Space inside a method call shows param info. This helps when you closed IntelliSense but still need to check arg types.

Ctrl+K, Ctrl+I shows Quick Info for the symbol under your cursor. It shows the type, docs, and other data. This works even outside of a debug session.

Alt+Enter on a code issue gives the same quick fixes as Ctrl+., but many devs do not know both exist. Use the one that feels right to you.

Last but not least, Ctrl+Shift+P in Visual Studio 2022 (version 17.11 and later) opens the Command Palette, inspired by VS Code. It gives you search access to every command in the IDE. If you have been using VS Code extensions, you will feel right at home.

What are your go-to Visual Studio shortcuts? Are there hidden gems you use daily that did not make this list? Drop a comment below and share your best key combos with the rest of us. I am always looking to add new ones to my workflow.

Dirk Strauss

As a seasoned software developer with a long-standing career in C# and Visual Studio, I have had the privilege of working with a number of companies and learning from some of the most talented individuals in the industry. In addition to my professional experience, I have authored multiple books on topics such as C#, Visual Studio, and ASP.NET Core. My passion for programming is unwavering, and I am dedicated to staying current with the latest technology and sharing my expertise with others.