Intro

I've been using Borland Delphi since when it was released, whereas I didn't start using Visual Studio (C#) until around 2005, so from time to time I mix up the shortcuts between the two IDE's (Integrated Development Environment). Not that its a big deal, and whether I work in Delphi or in Visual Studio normally is on a per project basis, so I usually stop hitting F9 in order to debug within Visual Studio (F9 is the key to run/debug your project in Delphi), after the third time, and likewise stop writing "=" in Delphi when I know it should be":=". I come from a Turbo Pascal background and some of the Delphi shortcuts date back to the editor of that time, hence I seldom try to use the wrong shortcuts in Delphi's IDE.

Anyhow beside these small hick-ups that are bound to happen, when you switch between 2 difference IDE's, there are a lot of shortcuts you only use every now and then, and at some point you recall there is a keycode that does exactly what you need, but for the sake of god you can't remember what is. Most shortcuts are well documented, but others are not mentioned anywhere, so you just need to "know them" - hence this page on my web.


Back to Top
»

Visual Studio 2008 (SP)

The following shortcuts are all for Visual Studio 2008 (Service Pack 1). For VS2008(SP) you can freely download the "Express edition" of CodeRush by DevExpress. However as I am a subscriber to their DXperience package, I got the full versions of Refactor Pro and CodeRush, which again result in MANY MORE shortcuts to remember. The following shortcuts therefore will be aimed at this setup, so if you don't got these products as well, some of the shortcuts might not work for you. Also note it won't be a complete list of all shortcuts (don't care to type till my fingers bleed <G>), so only those I considered most important/hardest to remember made it to the list. On top of everything, some shortcuts require you got a US keyboard layout to function. I therefore also alter between running my keyboard with the (for me) normal Danish layout or the US layout (simply hitting Left-Alt-Shift in Windows lets me toggle between those 2 layouts). On a side note, I do think its faster to type source code using the US layout, however it does take some time getting used to (I still remember all those different keyboard layouts we had to work with when I was employed at the EU - any of your ever typed on a Greek keyboard? <G>).

Basic Operation (these you should know by heart)
CTRL+O
Open File
CTRL+S
Save File
CTRL+SHIFT+S
Save All Files
CTRL+SHIFT+.
Show Recent Files (start typing and the list of files will be filtered)
CTRL+F
Quick Find
CTRL+H
Quick Replace
CTRL+SHIFT+F
Find in Files
CTRL+SHIFT+H
Replace in Files
CTRL+I
Incremental Search
CTRL+E+C
Comment Selection
CTRL+E+U
Un-Comment Selection
F5
Start Debugging
CTRL+F5
Start without Debugging
SHIFT+F5
Stop Debugging
CTRL+SHIFT+F5
Restart
F11
Step Into
F10
Step Over
F9
Toggle Breakpoint
ALT+SHIFT+ENTER
Toggle Source Editor as Full Screen
CTRL+TAB
Show all open windows/files (let you pick one to focus)
CTRL+HOME/END
Jump to Beginning/End-of-file (within the Source Editor).

 

IntelliSense / Snippets
CTRL+K+M
Generate Method Stub (place cursor on a call to an new/undefined method)
CTRL+K+L
List Members (lists all members for the class at the cursor)
CTRL+K+P
Parameter Info (lists the different parameter options for a method)
CTRL+K+I
Quick Info (regarding Class/Methods)
CTRL+K+X
Insert Snippet ("opens a window" that lets you pick the snippet to insert)
CTRL+K+S
Surround With (Lets you "surround" the selected text)
TAB+TAB
Enter the name of a Snippet and hit TAB+TAB (to "expand" that snippet)

 

Additional (some of these requires CodeRush/CodeRush Express)
F12
Go to definition (place cursor on an object)
CTRL+SHIFT+8
Go back in definition stack (use after having used F12)
CTRL+SHIFT+7
Go forward in definition stack (use after having used CTRL+SHIFT+8)
SHIFT+F12
Find all References
CTRL+SHIFT+Q
Quick Navigation (opens a dialog that holds every class, method, var in the project. While the Quick Navigation is open pressing CTRL will jump to the line in the code identified by the highlighted line in the Quick Navigation window)
CTRL+ALT+U
Show all the places an Identifier is used (Hitting TAB and SHIFT+TAB you can jump between those places)
CTRL+ALT+F
Quick File Navigation (opens a dialog will all the fills in the project)
ALT+LEFT/RIGHT
Jump CamelCase Left/Right
CTRL+ALT+UP/DOWN
Jump to Parent/Child level
NUM+ / NUM-
Expand/Retract Selection
CTRL+Æ
Refactor (DevExpress Refactor Pro)
ALT+HOME
Drop Marker (drops a marker at the current location)
ALT+SHIFT+HOME
Swap Marker (drops a marker at the current location and jump to prev marker)
ESC
Pick up Marker (go back to the last dropped marker)

 

CodeRush Embedding
F
Embed in Try..Finally (select the lines to Embed and simply hit F)
C
Embed in Try..Catch (select the lines to Embed and simply hit C)
T
Embed in Try..Catch..Finally (select the lines to Embed and simply hit T)
B
Embed in a Block (select the lines to Embed and simply hit B)
U
Embed in a Using (select the lines to Embed and simply hit U)
CTRL+3
Embed in a Region (select the lines to Embed and simply hit CTRL+3)
L
Embed in a Lock (select the lines to Embed and simply hit L)
SHIFT+0
Embed in Parentheses (select the lines to Embed and simply hit SHIT+0)
SHIFT+1
Embed in Not-Parentheses (select the lines to Embed and simply hit SHIT+1)
SHIFT+Ø
Embed in a String (select the lines to Embed and simply hit SHIT+Ø)
'
Embed in a Comment (select the lines to Embed and simply hit ')
W
Embed in a Wait Cursor(select the lines to Embed and simply hit W)

 

CR_Commenter v1.9, free Addon for CodeRush(Requires DXCore)
}
Automatically add comments after closing blocks with } (at least 5 line blocks)
CTRL+1
Comment current Classes/Method
CTRL+3
Autogenerate region arround current/selected block
CTRL+SHIFT+3
Autogenerate region for the whole file (all Classes/Methods)
CTRL+4
Toggle collapsing and expanding current selection
CTRL+5
Toggle collapsing and expanding everything at top-level
CTRL+6
Update all comments and XML-comments for the whole file
CTRL+8
Force updating the header comment
CTRL+9
Generate xUint or NUnit tests
CTRL+0
Remove all comment - will only remove generated comments after }