Skip to content

Instantly share code, notes, and snippets.

@SurajGupta
Last active December 6, 2021 15:41
Show Gist options
  • Save SurajGupta/9f2701f455de610d35c0bcfe777fc625 to your computer and use it in GitHub Desktop.
Save SurajGupta/9f2701f455de610d35c0bcfe777fc625 to your computer and use it in GitHub Desktop.
Visual Studio Keyboard Shortcuts

Settings

  1. Extensions | Resharper | Options | Environment | Keyboard | Shortcut Scheme - Set to None, Apply Scheme, Save
  2. Extensions | Resharper | Options | Environment | IntelliSense | General - Set to Visual Studio
  3. Tools | Import and Export Settings... | Reset all settings | No, just reset... | Visual C#
  4. Tools | Options | Text Editor | All Languages | CodeLens | Disable all
  5. Tools | Options | Projects and Solutions | Enable "Track Active Item in Solution Explorer"
  6. Tools | Options | Environment | Keyboard: Set "Apply the following additional..." to ReSharper (Visual Studio)

Unit Test

  1. Run a Unit Test, click Options drop-down, Group By: change to Namespace

Context Menu

  1. Tools | Customize | Commands | Context menu: Project and Solution Context Menus | Project remove all unused items

Keyboard Mappings

Tools | Options | Environment | Keyboard, change the following:

  • Edit.GoToAll: ctrl + comma
  • ReSharper_ShowUnitTestExplorer: ctrl + alt + t
  • ReSharper_UnitTestRunFromContext: ctrl + u, r
  • ReSharper_UnitTestRunFromContext: ctrl + u, d
go to all Ctrl , vs
go to file Ctrl ,    f space vs
go to type Ctrl ,    t space vs
go to member Ctrl ,    m space vs
go to line number Ctrl g vs
collapse all Ctrl m o vs
expand all Ctrl m l vs
toggle selection Ctrl m m vs
scroll up Ctrl vs
scroll down Ctrl vs
jump to previous method Alt r#
jump to next method Alt r#
jump to last edit location Ctrl Shift Backspace r#
find declaration F12 vs
find implementation Ctrl F12 vs
find usages Shift F12 vs
navigate backward Ctrl - vs
navigate forward Ctrl Shift - vs

Editing

duplicate line Ctrl d r#
select word(s) Ctrl w | w w ... vs
select containing declaration Ctrl Shift [ r#
format selection Ctrl k f vs
format comment Ctrl k c vs
format uncomment Ctrl k u vs

Windows

open unit test Ctrl Alt t r#
close file Ctrl F4 vs

Run

run current unit test Ctrl u    r r#
debug current unit test Ctrl u    d r#

Debugging

toggle breakpoint F9 vs
step over F10 vs
step into F11 vs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment