Showing posts with label ASP. Show all posts
Showing posts with label ASP. Show all posts

Monday, October 1, 2007

Creating a keyboard shortcuts cheat sheet for Visual Studio 2005

Most people don't know this, but there are actually over 450 keyboard shortcuts in Visual Studio by default. But there is no easy way to find out all the keyboard shortcuts inside Visual Studio. You can find out what all the default keyboard shortcuts are by writing a simple macro to enumerate all of them. The following shows the code for this.

Public Module Module1

Public Sub ListShortcutsInHTML()

'Declare a StreamWriter
Dim sw As System.IO.StreamWriter
sw = New StreamWriter("c:\\demo\\Shortcuts.html")

'Write the beginning HTML
WriteHTMLStart(sw)

' Add a row for each keyboard shortcut
For Each c As Command In DTE.Commands
If c.Name <> "" Then
Dim bindings As System.Array
bindings = CType(c.Bindings, System.Array)
For i As Integer = 0 To bindings.Length - 1
sw.WriteLine("<tr>")
sw.WriteLine("<td>" + c.Name + "</td>")
sw.WriteLine("<td>" + bindings(i) + "</td>")
sw.WriteLine("</tr>")
Next

End If
Next

'Write the end HTML
WriteHTMLEnd(sw)

'Flush and close the stream
sw.Flush()
sw.Close()
End Sub
Public Sub WriteHTMLStart(ByVal sw As System.IO.StreamWriter)
sw.WriteLine("<html>")
sw.WriteLine("<head>")
sw.WriteLine("<title>")

sw.WriteLine("Visual Studio Keyboard Shortcuts")
sw.WriteLine("</title>")
sw.WriteLine("</head>")

sw.WriteLine("<body>")
sw.WriteLine("<h1>Visual Studio 2005 Keyboard Shortcuts</h1>")
sw.WriteLine("<font size=""2"" face=""Verdana"">")
sw.WriteLine("<table border=""1"">")
sw.WriteLine("<tr BGCOLOR=""#018FFF""><td
align=""center""><b>Command</b></td><td
align=""center""><b>Shortcut</b></td></tr>")


End Sub

Public Sub WriteHTMLEnd(ByVal sw As System.IO.StreamWriter)
sw.WriteLine("</table>")
sw.WriteLine("</font>")
sw.WriteLine("</body>")
sw.WriteLine("</html>")
End Sub

End Module



To use this macro, go to Tools, select Macros, and then choose Macros IDE. . . to launch the Macros IDE. Expand the MyMacros project, MyMacros namespace and double-click on Module1. Simply copy Listing 1 to the Macros IDE and run the macro. After running the macro, you would have produced a keyboard shortcuts reference for Visual Studio. Open your output at C:\demo\Shortcuts.html. Figure 1 shows the partial output. Feel free to print it out and post it near your computer as you learn new keyboard shortcuts.

Thursday, September 27, 2007

MacroMedia Dreamweaver MX

Check Links
Shift+F8

Validate Markup...
Shift+F6

Copy HTML
Ctrl+Shift+C


Paste HTML
Ctrl+Shift+V

Select Parent Tag
Ctrl+[

Select Child
Ctrl+]

Show Code Hints
Ctrl+Space

Indent Code
Ctrl+Shift+>

Outdent Code
Ctrl+Shift+<

Balance Braces
Ctrl+'

Toggle Breakpoint
Ctrl+Alt+B

Switch Views
Ctrl+`

Server Debug
Ctrl+Shift+G

Live Data
Ctrl+Shift+R

Head Content
Ctrl+Shift+W

Standard View
Ctrl+Shift+F6

Layout View
Ctrl+F6

Show Rulers
Ctrl+Alt+R

Show Grid
Ctrl+Alt+G

Snap To Grid
Ctrl+Alt+Shift+G

Play Plugins
Ctrl+Alt+P

Stop Plugins
Ctrl+Alt+X

Play All Plugins
Ctrl+Alt+Shift+P

Stop All Plugins
Ctrl+Alt+Shift+X

Show Panels
F4

Insert Tag...
Ctrl+E

Insert Image
Ctrl+Alt+I

Insert Flash
Ctrl+Alt+F

Insert Shockwave
Ctrl+Alt+D

Insert Table
Ctrl+Alt+T

Insert Template Editable Region
Ctrl+Alt+V

Insert Named Anchor
Ctrl+Alt+A

Insert Line Break
Shift+Return

Insert Non-Breaking Space
Ctrl+Shift+Space

Modify Page Properties...
Ctrl+J

Modify Selection Properties
Ctrl+Shift+J

Quick Tag Editor
Ctrl+T

Make Link...
Ctrl+L

Remove Link
Ctrl+Shift+L

Select Table
Ctrl+A

Merge Cells
Ctrl+Alt+M

Split Cell...
Ctrl+Alt+S

Insert Row
Ctrl+M

Insert Column
Ctrl+Shift+A

Delete Row
Ctrl+Shift+M

Delete Column
Ctrl+Shift+-

Increase Column Span
Ctrl+Shift+]

Decrease Column Span
Ctrl+Shift+[

Left Align
Ctrl+Shift+1

Right Align
Ctrl+Shift+3

Top Align
Ctrl+Shift+4

Bottom Align
Ctrl+Shift+6

Make Same Width
Ctrl+Shift+7

Make Same Height
Ctrl+Shift+9

None
Ctrl+0

Paragraph
Ctrl+Shift+P

Heading 1
Ctrl+1

Heading 2
Ctrl+2

Heading 3
Ctrl+3

Heading 4
Ctrl+4

Heading 5
Ctrl+5

Heading 6
Ctrl+6

Left Align
Ctrl+Alt+Shift+L

Center Align
Ctrl+Alt+Shift+C

Right Align
Ctrl+Alt+Shift+R

Justify Align
Ctrl+Alt+Shift+J

Edit Style Sheet...
Ctrl+Shift+E

Check Spelling
Shift+F7

Site Files
F8

Site Map
Alt+F8

Get
Ctrl+Shift+D

Check Out
Ctrl+Alt+Shift+D

Put
Ctrl+Shift+U

Check In
Ctrl+Alt+Shift+U

Code Inspector
F10

Frames
Shift+F2

History
Shift+F10

Layers
F2

Timelines
Alt+F9

Add Object to Library
Ctrl+Shift+B

Text Indent
Ctrl+Alt+]

Text Outdent
Ctrl+Alt+[

Check Links
Shift+F8

Duplicate
Ctrl+D

Show/Hide Link
Ctrl+Shift+Y

View as Root
Ctrl+Shift+R

Show Page Titles
Ctrl+Shift+T

Site Files
F8

Site Map
Alt+F8

Disconnect
Ctrl+Alt+Shift+F5

Get
Ctrl+Shift+D

Check Out
Ctrl+Alt+Shift+D

Put
Ctrl+Shift+U

Check In
Ctrl+Alt+Shift+U

Check Links Sitewide
Ctrl+F8

Link to New File...
Ctrl+Shift+N

Link to Existing File...
Ctrl+Shift+K

Select Parent Tag
Ctrl+[


Balance Braces
Ctrl+'

Redo
Ctrl+Y

Switch To Document
Ctrl+`

Toggle Breakpoint
Ctrl+Alt+B

Snippets
Shift+F9