DEV Community

Cover image for Stop Clicking, Start Coding: The Ultimate Visual Studio Shortcuts Cheatsheet
Prism | Software Developer
Prism | Software Developer

Posted on

Stop Clicking, Start Coding: The Ultimate Visual Studio Shortcuts Cheatsheet

Tired of constantly switching between your keyboard and mouse? Mastering keyboard shortcuts is one of the fastest ways to level up your productivity as a developer. It not only saves you countless clicks but also helps you stay focused and in the flow.

To help you out, I've created a complete cheatsheet with the most essential Visual Studio shortcuts. Whether you're a beginner or an experienced C#/.NET dev, you'll find something useful here.

Let's dive in!


📄 General Editing

  • Ctrl + C: Copy selected text.
  • Ctrl + X: Cut selected text.
  • Ctrl + V: Paste copied text.
  • Ctrl + Z: Undo the last action.
  • Ctrl + Y: Redo the last action.
  • Ctrl + S: Save the current file.
  • Ctrl + Shift + S: Save all files.
  • Ctrl + K, Ctrl + C: Comment selected lines.
  • Ctrl + K, Ctrl + U: Uncomment selected lines.
  • Ctrl + D: Duplicate the current line.
  • Shift + Del: Delete the current line.
  • Ctrl + F: Find in the file.
  • Ctrl + H: Find and replace.

🗺️ Navigation

  • Ctrl + Tab: Switch between open files.
  • Ctrl + ,: Go to any file / type / member.
  • F12: Go to definition.
  • Ctrl + -: Navigate backward.
  • Ctrl + Shift + -: Navigate forward.
  • Ctrl + G: Go to a specific line.
  • Ctrl + ]: Move to matching bracket.
  • Ctrl + M, Ctrl + M: Collapse / Expand code region.
  • Ctrl + M, Ctrl + L: Collapse / Expand all regions.

💻 Code Editing

  • Ctrl + Space: Autocomplete (IntelliSense).
  • Ctrl + K, Ctrl + D: Format the entire document.
  • Ctrl + K, Ctrl + F: Format selection.
  • Ctrl + . or Alt + Enter: Quick Actions and Refactoring.
  • F2: Rename symbol.
  • Ctrl + R, Ctrl + E: Encapsulate field.
  • Ctrl + Shift + Space: Parameter info.
  • Alt + ↑ / ↓: Move line up / down.
  • Shift + Alt + ↑ / ↓: Copy line up / down.

🪟 Window Management

  • Ctrl + Alt + L: Show Solution Explorer.
  • Ctrl + Alt + O: Show Output Window.
  • Ctrl + \ , E: Show Error List.
  • Shift + Esc: Close current tool window.
  • Alt + F7: Move to the next window.
  • Ctrl + W, S: Solution Explorer window.

🐞 Debugging

  • F5: Start debugging.
  • Ctrl + F5: Start without debugging.
  • F9: Set / Remove breakpoint.
  • F10: Step over.
  • F11: Step Into.
  • Shift + F11: Step Out.
  • Shift + F5: Stop debugging.
  • Ctrl + Alt + Q: QuickWatch window.

📂 File Management

  • Ctrl + N: Create a new file.
  • Ctrl + O: Open a file.
  • Ctrl + Shift + N: Create a new project.
  • Ctrl + Shift + O: Open project / solution.
  • Ctrl + F4: Close the current document.

Your Turn!

Bookmark this post for easy access, and try to incorporate one or two new shortcuts into your workflow each day. Before you know it, they'll become second nature.

What are your favorite, lesser-known Visual Studio shortcuts? Share them in the comments below! 👇

Top comments (2)

Collapse
 
gonzaloivan121 profile image
Gonzalo Iván Chaparro Barese

Than you! These Shortcuts are really useful. I will take them into account!

Collapse
 
prismcoder profile image
Prism | Software Developer

I'm glad you found them useful. Happy coding!