Copy link to clipboard
Copied
Hi,
I've read all the documentation about snippets changes on CC 2017. Here https://helpx.adobe.com/dreamweaver/using/reuse-code-with-snippets.html#insert-snippets
It is said that "To wrap existing text in a code snippet, select the text, then insert the snippet, the text is wrapped within the code snippet."
In CC 2015 when creating a snippet you could add "before" and "after" code so when activating the snippet with some code selected, that was wrapped beetween the "before" and "after" code.
Previous snippets imported from 2015 with "after" and "before" still work wrapping as in cc2015, but i'm unable to create new snippets with "after" and "before" while on the help link provided up here, still says the wrap function is available.
So is there a way to keep on using wrapping snippets on CC2017?
By the way, new trigger function is nice but I'd rather prefer the shortcuts the way I could select some text, and trigger a wrapping snippet with a shortcut.
Thank you!
Great, thanks! I've voted that.
With the wrapping snippets, the new shortcuts doesn't have any sense... I was using the wrapping snippets with the old customizable sortcuts, and maybe if wrapping snippets come back, the old custom shortcuts should come back too. What do you thing about it? I've read on the CC2017 changes that this was decided to change firmly, but maybe we should ask also for them to come back...
Please help me voting this! Thanks!
Copy link to clipboard
Copied
Yep, it's gone.
I don't understand that decision at all.
Copy link to clipboard
Copied
But it's weird as you can still use wrapping snippets created on cc2015... there should be a way to keep creating them. Hope somebody could help.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Great, thanks! I've voted that.
With the wrapping snippets, the new shortcuts doesn't have any sense... I was using the wrapping snippets with the old customizable sortcuts, and maybe if wrapping snippets come back, the old custom shortcuts should come back too. What do you thing about it? I've read on the CC2017 changes that this was decided to change firmly, but maybe we should ask also for them to come back...
Please help me voting this! Thanks!
Copy link to clipboard
Copied
I voted for both ideas presented here. It's a real hindrance not being able to select my markup or code and wrap it using a snippet, especially when commenting out blocks for debugging, testing or design mods.
Thanks for getting the ball rolling on this.
Copy link to clipboard
Copied
[Offending language removed by Mod]. You do this with every major release change. Dreamweaver is already a laughingstock amongst developers and now you take away one of the tools I found most useful!!!?? That's it, it's time I found some other tool for developing. I can't believe this. One of the few things you did right and you take it away. great, bang up job Adobe.
Copy link to clipboard
Copied
I'm with you garek007​
Copy link to clipboard
Copied
Wraparound snippets are not gone. If you select a bit of text and then click on your snippet, it will still work as before. The trouble is that wraparound snippets are no longer editable nor can they be created.
...or, can they?
Here's a workaround.
1. Download DW 2015 and open it.
2. Add and/or Edit your snippets there.
3. Close DW 2015.
4. Open DW 2017.
Your new snippets are now available in DW 2017.
Copy link to clipboard
Copied
The Snippits in 2017 have the code in the file that allows code after selection.
Just find your snippit and edit it.
Snippits are stored in the %USERPROFILE%\AppData\Roaming\Adobe\Dreamweaver CC 2017\en_US\Configuration\Snippets\ folder.
Below is an example snippit called 'example'.
The beforeSelection would put out: (quotes not included)
"
Code that you want before selected text goes here.
It can be on multiple lines.
"
The afterSelection would put out: (quotes not included)
"Code you want after goes here and could also be on multiple lines.]"
example.csn file:
<?xml version="1.0" encoding="utf-8"?>
<snippet name="example" description="Default .phpinc file code" preview="code" type="block">
<insertText location="beforeSelection">
<![CDATA[
Code that you want before selected text goes here.
It can be on multiple lines.
]]>
</insertText>
<insertText location="afterSelection"><![CDATA[Code you want after goes here and could also be on multiple lines.]]>
</insertText>
</snippet>
Copy link to clipboard
Copied
No it's not gone..You can do it with Quick Tag Editor under Edit tab.or by pressing ctrl+T
Copy link to clipboard
Copied
Edit > Quick Tag Editor or Ctrl + T is for wrapping the current selection in another tag from a drop down menu.
This discussion is about the partial loss of Wrapping Snippets, a separate item all together. In older versions of DW, you could create a Snippet in your Snippet window that was designed to wrap around a code selection rather than insert where you placed the cursor. The newest versions of DW dropped the ability to create Wrapping Snippets within the interface, presumably to make room for the new "Snippet Keyword Shortcuts" that would have conflicted with them pretty badly.
Though they should have probably just disabled the keyword shortcut field if the snippet was set to wrap, but they went with hiding the option all together. Old wrapping snippets that are ported over will still function as wrapping snippets, and new ones can be made, it's just much more difficult now.
Copy link to clipboard
Copied
Here we are - ADOBE: PAY MORE, GET LESS
I used it every day:
Type 'my text' - hilite it - press shortcut - get: <?php echo 'my text'; ?>
Only people who do not program come to such ideas to remove this function.
Very bad. WE NEED THIS Feature BACK. I need the time savings to among other things the money for your software to earn.
---
A workaround - is to manually copy the snippets from DW2015 to DW2017/18
(as Nancy said: %AppData%\Roaming\Adobe\Dreamweaver CC 2015\[your_lang]\Configuration\Snippets\ )
Since you can not set a keyboard shortcut, you have to insert it with a double-click. This also works with selected text.
Copy link to clipboard
Copied
Why ist the marked answer useful? Still not answered.
Copy link to clipboard
Copied
Wrapped snippets are gone.