How can I comment/uncomment the code with a shortcut in DW CS5? IS there ashortcut? If no how can I create for both of them? (It would be nice if both operations were done with the same key combination.)
3 Answers
It's been a while since I used Dreamweaver (defected to Expression Web) but from my understanding there is no pre-set shortcut(s) for commenting code. You may be able to tie you're own to one via Edit > Keyboard Shortcuts > Snippets > Comments > (Comment Single Line or Comment Multi Line). I'm not sure if there's a way to have it remove them.
Info found on help.adobe.com (for Dreamweaver CS5)...
Generate a list of current shortcuts:
A reference sheet is a record of the current shortcut set. The information is stored in HTML table format. You can view the reference sheet in a web browser or print it.
- Select Edit > Keyboard Shortcuts (Windows) or Dreamweaver > Keyboard Shortcuts (Macintosh).
- Click the Export Set As HTML button, which is the third button in the set of four at the top of the dialog box.
- In the Save dialog box that appears, enter the name for the reference sheet, and select the appropriate location for saving the file.
Create your own shortcut keys, edit existing shortcuts, or select a predetermined set of shortcuts.
- Select Edit > Keyboard Shortcuts (Windows) or Dreamweaver > Keyboard Shortcuts (Macintosh).
- Set any of the following options and click OK:
- Current Set Allows you to choose a set of predetermined shortcuts included with Dreamweaver, or any custom set you’ve defined. The predetermined sets are listed at the top of the menu. For example, if you are familiar with the shortcuts found in HomeSite or BBEdit, you can use those shortcuts by choosing the corresponding predetermined set.
- Commands Allows you to select a category of commands to edit. For example, you can edit menu commands, such as the Open command, or code editing commands, such as Balance Braces.
- The command list Displays the commands associated with the category you selected from the Commands pop‑up menu, along with the assigned shortcuts. The Menu Commands category displays this list as a tree view that replicates the structure of the menus. The other categories list the commands by name (such as Quit Application), in a flat list.
- Shortcuts Displays all shortcuts assigned to the selected command.
- Add Item (+) Adds a new shortcut to the current command. Click this button to add a new blank line to the Shortcuts. Enter a new key combination and click Change to add a new keyboard shortcut for this command. You can assign two different keyboard shortcuts for each command; if there are already two shortcuts assigned to a command, the Add Item button does nothing.
- Remove Item (-) Removes the selected shortcut from the list of shortcuts.
- Press Key Displays the key combination you enter when you’re adding or changing a shortcut.
- Change Adds the key combination shown in the Press Key to the list of shortcuts, or changes the selected shortcut to the specified key combination.
- Duplicate Set Duplicates the current set. Give the new set a name; the default name is the current set’s name with the word copy appended.
- Rename Set Renames the current set.
- Export as HTML File Saves the current set in an HTML table format for easy viewing and printing. You can open the HTML file in your browser and print the shortcuts for easy reference.
- Delete Set Deletes a set. (You cannot delete the active set.)
- 113,841
HTML comment = Ctrl-Alt-a
CSS comment = Ctrl-Alt-z
Remove comment = Ctrl-Alt-x
For more visit
Edit > Keyboard Shortcuts > Code Editing (Scroll all the way down)
- 6,408
- 21
Under Edit --> KeyBoard ShortCuts --> Current Set Drop Down : Dreamweaver Standard Copy Commands Dropdown : Code Editing
Scrolldown till you see "Remove Comment" and select this.
Click on "Change" button and enter what keys you want to use and then press ok.
- 11
- 1