The previous versions of Dreamweaver allowed me to create a custom snippet, then assign a keyboard shortcut to it so I could insert it into my code on the fly. How can I do this in 2019?
From the Snippets Panel, click on any snippet and Edit it. Where it says Trigger Key, add your keyboard shortcut. The key + TAB will insert your snippet. Hit OK. Repeat for other snippets.
Trigger Keys are not the same as shortcut keys, as they predetermine the shortcut, which is not ideal.
Shortcut keys utilize a more natural approach – i.e. Ctrl + B = bold.
I need custom shortcut key configurations for my coding.
There is no way to add shortcut key strokes, like Ctrl + Alt + Letter, to Snippets in the last few versions of DW. These days, Snippets get Emmet-like abbreviations that are then expanded using the Tab key. The last version I know for sure that still has standard keyboard shortcuts is CC2015, which is no longer available via the CC Desktop App.
You can still get it from ProDesignTools.com though. Their site uses Adobe's actual files for the download, so they're at least legitimate versions of the program. You just need to make sure to follow the directions exactly, otherwise you get a 403 Forbidden error.
Thanks, that's what I figured. Leave it to Adobe to invent the wheel, then change its shape and charge you twice as much.
exhibitorm99666455 wroteI need custom shortcut key configurations for my coding.
Sorry. No-can-do. Custom keyboard shortcuts are reserved for DW menu items.
Code Snippets have Trigger Keys all their own which can be letters or numbers followed by TAB.
And of course there are built-in Emmet shortcuts which are also invoked with the TAB key and save a lot of coding time.
With a `Hotkey`,
1. I select `a piece of code`, and then
2. press the hotkey.
3. Then Snippet will be inserted (wrapped around) before and after that piece of code, nicely.
With a `Trigger key`,
1. I need to write some `Trigger code`
2. then `Tab`
3. then the Snippet is inserted.
4. Then I have to select & copy & paste to move the `piece of code` into the newly inserted Snippet at the *correct position*.
That is not efficient -- the ability of "insert & wrap around `the selected piece of code`" no longer exists
-- because you can't "insert" some `Trigger code` *while* having a piece of code *"selected"*.
Also, the `Trigger code` only works in the "source code view", does not work in "design view" (as a `Hotkey` would/should be).
Did I understand the `Trigger key` wrong? Is there a better approch?
Since 2017 when DW was rebuilt, Snippets have not been able to wrap.
Code Snippets & Trigger Keys explained:
Optionally you may wish to use Emmet short codes.
Thanks for the reply.
If I did not misunderstand the meaning of wrap in Dreamweaver, I do think Snippets are still able to wrap around a piece of code. (Dreamweaver Version 2021).
Just select a piece of code, and then double click a Snippet in the Snippets panel. Then it wraps around that piece of code.
-- as long as that Snippet has the `Wrap Selection` (not `Insert block`) enabled when you first created it.
It just not able to use with Hotkey anymore...
Also, you may want to update the web instruction in:
Note:https://helpx.adobe.com/dreamweaver/using/keyboard-shortcuts.htmlTo add or edit a keyboard shortcut for a code snippet, select Snippet from the Commands pop‑up menu.
to indicate this is for only old versions of Dreamweaver (as mentioned in the accepted answer above).
The misunderstanding of "not able to wrap" could come from my first post
the ability of "insert & wrap around `the selected piece of code`" no longer exists
-- that I refer to only when I use `Trigger key`.
(and its to point out the usefulness of `Hotkey`. )
(Sure, if you double click in the `Snippets panel`, you can still wrap. -- as written in my 2nd post)
Wrapping Snippets were put back into the program a couple of versions ago (the original version this thread is about is CC 2019, a version or two after they had been removed), however the ability to use a real keyboard shortcut with them is still gone. Only the Emmet-like "keyword+Tab" insertion method is available and, as you've found, it doesn't work with Wrapping Snippets since the keyword overwrites what you are trying to wrap.
It's unlikely to ever be changed back though. DW is now in a minimum maintenance/development state with no plans for future bug fixes or new features. Adobe is only planning to make OS compatibility and security updates going forward, for those users who currently have the program and don't wish to change.
DW is essentially dying on the vine. Unless/until Adobe decides to begin development again (they don't tend to change their minds often), it will fall further and further behind current standards until it's no longer useful to active developers. At that point, they'll likely EOL the program.
Copy link to clipboard
There is a software call `lintalist` that can do this => https://github.com/lintalist/lintalist .
And there is a Post talks briefly about how to use it https://www.autohotkey.com/boards/viewtopic.php?f=76&t=85098
The key is to use the `^|` to specify your caret position in your snippet.
And `[[Selected]]` to insert the text you have selected (for wrapping around).
A sample code could be: