Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Emmet working on Dreamweaver

Emmet now support Dreamweaver and am keen to work with it but it's not working for me, even though I think I have followed instructions here https://github.com/emmetio/dreamweaver

I have already downloaded and installed the extension using Adobe Extension Manager.

One the thing am not sure about is the absolute path to extentions folder that am suppose to put in Commands > Emmet > Emmet Preferences. I have put this in C:\Program Files\Adobe\Adobe Extension Manager CS6

Any help is very much appreciated.

Thanks

like image 475
Andy Avatar asked May 24 '13 09:05

Andy


2 Answers

Got it to work with the Tab. I use DW CS6 in code view to program and was happy to know that it was available for DW. Unfortunately as @Andy says, it doesn't quite work out of the box.

First of all, in DW the Ctrl+E shortcut is used for the "Tag choose" window. The next thing is that Tab doesn't work out of the box like it does with other IDE's.

After a little experimentation focused on making the Tab key work for expanding the abbreviation I did this:

I wrote the word Tab somewhere and I copied it to my clipboard, went to the Edit > Keyboard Shortcuts > Commands > Emmet > Expand Abbreviation preference and I right clicked in the "Press key:" field at the bottom and pasted the word Tab in there, then I clicked on Change and then OK and now my Tab works to Expand Abbreviation.

Lot of people might find it as a big down side that now the Tab key won't really tab anymore, but I think it's ok for me because I like to use Double Space indentation and I don't use the Tab because different IDE's read it with more or less spaces so the code sometimes gets a little crooked when saved from IDE to IDE.

Last but not least... I also tried doing the ASCII code for the Tab which is actually 	 but that didn't seem to work.

Hope this answer is also helpful for anyone who wants to use the Tab and doesn't mind that it will only work to Expand Abbreviation.

like image 177
sulfureous Avatar answered Oct 26 '22 23:10

sulfureous


Create a new Keyboard Shortcut set for Emmet

By default, the Ctrl+E shortcut is set up for Dreamweaver's Tag Chooser, which supercedes Emmet's Ctrl+E shortcut. We'll fix this by removing the keyboard shortcut for the Tag Chooser.

  1. Go to Edit > Keyboard Shortcuts…
  2. Under Current set, choose Dreamweaver Standard (selected by default if you haven't changed it) or another preferred set.
  3. Click on the Duplicate set button on the right. (You can't simply edit the default set).
  4. Rename the set. (ex. "Dreamweaver for Emmet")
  5. In the Commands window, go to Insert > Tag…
  6. Remove Ctrl+E from the Shortcuts window by clicking the - button.
  7. Click OK.

Now the Ctrl+E keyboard shortcut is freed up to work for Emmet's Expand Abbreviation command.

If desired, you may also change the shortcut for Expand Abbreviation:

In the Keyboard Shortcuts edit window, with your newly created set selected, navigate to Commands > Emmet > Expand Abbreviation. Press the key combination you would like to use.

Alternatively, you can type a key or key combination into a text editor (ex. literally type Tab or Ctrl+E), copy it, then paste it in the Press key text field by right-clicking and choosing paste. If you try to paste with Ctrl+V, it will record Ctrl+V as the shortcut.

like image 36
gfullam Avatar answered Oct 27 '22 01:10

gfullam