Visual studio or resharper shortcut to close currently selected file in IDE

Visual Studio 2015 + Resharper

The question is a bit old. Just wanted to update it with the current solution.
As you can see below, you can also completely customize your shortcuts:

  • just navigate to Tools > Options

enter image description here

  • on the left pane, go to Environment > Keyboard

enter image description here

  • now use the field Show commands containing to search for file.close

  • select File.Close on the list

  • click the field Press shortcuts keys

  • type your desired shortcut, for example, <Ctrl> + W

  • finally, click Assign

And you're good to go!


Ctrl + F4

Save and close would Ctrl + S followed with Ctrl + F4


Ctrl+S, Ctrl+F4 will save and close the current file.