Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.)

share|improve this question
add comment

2 Answers 2

up vote 5 down vote accepted

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.

  1. Select Edit > Keyboard Shortcuts (Windows) or Dreamweaver > Keyboard Shortcuts (Macintosh).
  2. Click the Export Set As HTML button, which is the third button in the set of four at the top of the dialog box.
  3. In the Save dialog box that appears, enter the name for the reference sheet, and select the appropriate location for saving the file.

Customize keyboard shortcuts:

Create your own shortcut keys, edit existing shortcuts, or select a predetermined set of shortcuts.

  1. Select Edit > Keyboard Shortcuts (Windows) or Dreamweaver > Keyboard Shortcuts (Macintosh).
  2. 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.)
share|improve this answer
    
+1: I have also defected to Expressions Web. It's come into its own in v4. –  surfasb Oct 23 '11 at 15:20
add comment

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)

share|improve this answer
2  
I have tried, but this does not work. –  Narek Jul 8 '12 at 20:11
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.