5 Shortcuts that you must absolutely know in Eclipse and Visual Studio

There are many shortcuts to learn but if you want to improve your productivity you must be able to quickly do the following tasks:

  • Quickly open a class by typing a part of its name
  • Quickly add a namespace import/using statement without moving to the header of the file
  • Duplicate a line
  • Go to a method quickly
  • Navigate to the class/method definition

The idea is that you don’t use your mouse , go to menu items etc.. This generates micro distractions that summed up affect your productivity.

In Eclipse

Quickly open a class by typing a part of its name:

  Ctrl+Shift+T ### Quickly add a namespace import/using statement without moving to the header of the file: 
Control+1 when the caret is on the type that needs an import. Control+1 is very useful for other contextual actions too ### Duplicate a line:
 Control+ALT+DownArrow ### Go to a method quickly: 
Control+O and begin typing the name of the method  ### Navigate to the class/method definition
 F3

In Visual Studio

Quickly open a class (Or any file) by typing a part of its name :

I use the extension called Sonic File Finder, there are other ways too
* Install the extension http://www.jens-schaller.de/sonictools/sonicfilefinder/index.
* Press Control+Shift+Y to open the search panel and begin typing

Quickly add a namespace import/using statement without moving to the header of the file:

Alt+Shift+F10 opens the quick actions panel with contextual actions , one of them adds required using statements

Duplicate a line:

I recently discovered that Visual Studio indeed has duplicate line shortcut, however it appears few people know about it
The shortcut:
    Without any selected text press Ctrl+C Control+V

Go to a method quickly:

This works to find any word quickly, you need to install the Visual Studio Productivity Power Tools and just by typing Control+F you can see the results of your search as you type.
F12

I find myself using this shortcuts constantly when developing for Android and .NET (Mostly ASP MVC Web Apps)

Published

10 July 2012


Tags