Visual Studio
Recommended Key Shortcuts

Visual StudioRecommended Key Shortcuts

While I dislike changing applications from default settings, I feel the following shortcuts are must-have — because code reading, navigation, editing are productivity / code learner / debugging helpers.

I hope this helps some of you.

I recommend setting the following bindings for Visual Studio 2019 / 2022 for C#:

  • F2 = Refactor.Rename
  • Ctrl+W = Edit.SelectCurrentWord
  • Alt+Left Arrow = Edit.LineStart
  • Alt+Right Arrow = Edit.LineEnd
  • Ctrl+Left Arrow = View.NavigateBackward
    • delete it from: Edit.WordPrevious
  • Ctrl+Right Arrow = View.NavigateForward
    • delete it from: Edit.WordNext
  • Ctrl+/ = Edit.ToggleLineComment
  • Ctrl+1 = Edit.ToggleLineComment (alternate)
  • Ctrl+Up Arrow = Edit.PageUp (useful on laptop without dedicated Page Up)
  • Ctrl+Down Arrow = Edit.PageDown (useful on laptop without dedicated Page Down)

The following appear to be defaults, with no command name to assign them to. If you do not have them in your IDE, you may wish to set them:

  • Ctrl+Tab = next file tab
  • Ctrl+Shift+Tab = previous file tab

Also, you may also remove some shortcuts that you accidentally type (which you never use). Especially annoying are ones that pop up windows, but pressing again does not undo. Or toggling word-wrap, without any notion of how to undo it without searching through the menus. Therefore — search for these and click “Remove”!

  • F4 = View.PropertiesWindow
  • F6 = Build.BuildSolution
  • Ctrl+E, W = Edit.ToggleWordWrap

Note: You may have to delete existing shortcuts that are using these keys.

Jason Doucette Avatar

Leave a Reply