Visual Studio

Community

Tutorials In This Section


Visual Studio Keyboard Shortcuts

Introduction

In order to be proficient using Visual Studio it's helpful to know the keyboard shortcuts that you can use to help you complete task quickly. This tutorial will help you to learn the keyboard shortcuts that are available in Visual Studio Community.

Keyboard Shortcuts

Code Editing & Formatting

ActionKeyboard Shortcut
Quick Actions / Refactoring (Smart Tag)Ctrl + . (or Alt + Enter)
Format Entire DocumentCtrl + K, Ctrl + D
Format SelectionCtrl + K, Ctrl + F
Comment SelectionCtrl + K, Ctrl + C (or Ctrl + /)
Uncomment SelectionCtrl + K, Ctrl + U (or Ctrl + /)
Move Line(s) Up / DownAlt + ↑ / ↓
Duplicate LineCtrl + D
Delete Line CompletelyCtrl + Shift + L
Trigger IntelliSenseCtrl + Spacebar
Rename Symbol (Everywhere)Ctrl + R, Ctrl + R

Microsoft Learn Shortcut Tables

Keyboard Shortcuts (PDF)