Moving From Eclipse to Visual Studio 2008

2020-02-17 07:12发布

问题:

After working in Eclipse for the past 3 years and memorizing all of the great shortcut keys and features, my new job has me moving back to Visual Studio. I've found some listings of shortcut keys on VS, but am looking for a comprehensive guide mapping Eclipse features to Visual Studio. Does anyone know of a good tutorial aimed at helping Eclipse users transition to VS?

回答1:

Because of the lack of information out there on this, let's start a community wiki answer. Please add additional information on migration tips to this answer. Please avoid 3rd party plug-ins such as ReSharper in the answer.

Shortcut Keys

+----------------------+---------------------+---------------------+
|   Command            |   Eclipse shortcut  |   VS.NET shortcut   |
+----------------------+---------------------+---------------------+
|   Delete line        |    Ctrl-D           |    Ctrl-L           |
|   Comment line       |    Ctrl-/           |    Ctrl-K-C         |
|   Uncomment line     |    Ctrl-/           |    Ctrl-K-U         |
|   Toggle editor tabs |    Ctrl-F6          |    Ctrl-F6          |
|   Goto Line          |    Ctrl-L           |    Ctrl-G           |
|   Goto Definition    |    Ctrl-Click or F3 |    F12              |
|   Find next          |    Ctrl-K           |    F3               |
|   Find previous      |    Ctrl-Shift-K     |    Shift-F3         |
|   Go backward        |    Alt-LeftArrow    |    Ctrl-minus       |
|   Go forward         |    Alt-RightArrow   |    Ctrl-Shift-minus |
|   Find usage         |    Ctrl-Shift-G     |    Ctrl-K-R         |
|   Rename             |    Alt-Shift-R      |    Ctrl-R-R         |
|   Refactor           |    Alt-Shift-T      |    none             |
|   Open Type          |    Ctrl-Shift-T     |    Ctrl-,           |
|   Navigate To        |    Ctrl-Shift-R     |    Ctrl-,           |
+----------------------+---------------------+---------------------+


回答2:

This will sound flippant, but assuming you're going to be using C#, the most important point is: buy ReSharper. At that point you'll have a lot of what you're used to - integrated unit tests, find resource, find type (with Camel-casing etc), better Intellisense and more.

After that, learn that the most important keyboard shortcuts are Ctrl-. for "give me the list of things you can do for me automatically" and Alt-Enter which is the same but for ReSharper suggestions.

There are various ReSharper and VS shortcut key cheat sheets on the web - I suspect you can find those as quickly as I can :)



回答3:

I've been slowly customizing my Visual Studio 2008 to create a few tricks like when I used Eclipse. I recommend these two as a starting point:

  1. Rock Scroll - Text Highlight with an enhanced scroll bar. Very neat tool to help you visually locate where a variable is used along the code: http://microsoftdev.blogspot.com/2008/05/rock-scroll-visual-studio-plugin.html

  2. Quick Open File - create a shortcut that you like and voila, you can quickly access any file in your project: http://kutny.net/vsopen/

I've blogged about this here: http://www.wagnerdanda.me/2010/08/visual-studio-tips-like-eclipse/