Custom key board mapping for Namespace organization in Visual Studio

Visual studio has lot of key board shortcuts for making the things easier. One of the mostly used feature for which IDE doesn’t have key binding is “removing unused namespaces”. I like this feature very much as it makes the code much cleaner. Normally, to make this work we need to right click on the namespaces and navigate to “organize usings ->remove and sort”. We can create a shortcut key with custom key binding as shown below. You can choose any shortcut key as per your convenience but I personally prefer Ctrl+N,O (N-Namespace, O-Organize) as this is the easy one to remember.

To create this, go to Tools->Options->environment->keyboard. By typing “organizeusing” in “Show commands containing” we can see list of IDE commands. Just select the one which ends with “OrganizeUsings.RemoveAndSort” and press the shortcut key you want to assign.

Hope this helps.

Advertisements

2 Comments on “Custom key board mapping for Namespace organization in Visual Studio”

  1. Eagle says:

    U r not really SRK but if you r a fan of hin upload photos

  2. Eagle says:

    Search windows live in google and go a little down u will find a tagline starting with chat go for that


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s