Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Is there a shortcut in VS 2005 or resharper to close the current file. or "save and close" would be even better

like image 713
leora Avatar asked Apr 28 '09 12:04

leora


People also ask

What is the keyboard shortcut to set ReSharper?

Configure individual keyboard shortcutsChoose Tools | Options from the menu and then go to Environment | Keyboard page. Use the shortcut tables to find the alias of the command, to which you are going to assign a new shortcut.

How do I set keyboard shortcuts in Visual Studio?

Customize a keyboard shortcutOn the menu bar, choose Tools > Options. Expand Environment, and then choose Keyboard.

How do I search everywhere in Visual Studio?

Once the window is open, you can either click between the different tabs, or you can use Ctrl + Tab or the assigned keyboard shortcuts of Ctrl + T and Ctrl + Q to switch between the code search and feature search tabs.


2 Answers

Ctrl + F4

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

like image 87
Gishu Avatar answered Oct 12 '22 12:10

Gishu


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!

like image 42
Flavio Wuensche Avatar answered Oct 12 '22 12:10

Flavio Wuensche