VS keyboard Shortcuts?

BudgiesEye

Member
Joined
Jan 15, 2007
Messages
5
Programming Experience
Beginner
I use ASP comments ie "<%-- --%>"

Is there a keyboard shortcut in Visual Studio that can be used so that when I highlight a block of code, the shortcut can be used to comment it out?

In addition to this, does anyone have a list of other keyboard shortcuts that can be used while hand-codeing?

Hope you can help

cheers:)
 
Thanks Paszt.

Had a look through, its not bad. Think I might be out of luck for an asp comment out shortcut. The comment shortcut in that list seems to do something entirely different, or am I wrong?
 
The entry in the list is Edit.CommentSelection: Text Editor::Ctrl+K, Ctrl+C
Though not intuitive, what this means is you press and hold Ctrl then press K then C. To uncomment, press and hold Ctrl then press K then U.
You can also press Ctrl+K, release Ctrl, then press Ctrl+C; either way works. If you look in the status bar after pressing Ctrl+K you see this message: "(Ctrl+K) was pressed. Waiting for second key of chord..."
This works the text editors in Visual Studio including the markup editor.

The default setup of Visual Studio also displays these shortcut keys in the corresponding menu item. For Comment Selection, the menu path is Edit>Advanced>Comment Selection
 
Last edited:
Thanks, had a play with that. I soon noticed that the "comment section" was not in the "Advanced" menu. Maybe my version is different to yours, or maybe it can't be done while editing HTML?:confused:
 
It is...

Microsoft Development Environment 2003 Version 7.1.3088

Microsoft .NET Framework 1.1 Version 1.1.4322 SP1

FYI,

When i used that command, the task pane said:

"The key combination (Ctrl+K, Ctrl+C) is not a command"

I get similar info with the other keystrokes you suggested.
 
Microsoft Development Environment 2003 Version 7.1.3088

Microsoft .NET Framework 1.1 Version 1.1.4322 SP1
BudgiesEye
user_offline.gif

VB.NET Forum Newbie
Primary Platform: .NET 2.0 (VS 2005)
Maybe it would be a good idea to change your forum profile now so people can give relevant advice to your requests?
 
I'm not sure of the macro capabilities of VS2003 but the link I posted has a macro that will create the current settings of the keyboard shortcut list. Give it a try.
 
Thanks guys, I will have a look and see what happens. I have also updated my profile now so it should show some more information.

Cheers
 
I'm not sure of the macro capabilities of VS2003 but the link I posted has a macro that will create the current settings of the keyboard shortcut list. Give it a try.
I of course meant that the macro will create a list of the current keyboard shortcuts.
 
Back
Top