Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
1

Snippets on Dreamweaver CC 2017, missing wrap function

Community Beginner ,
Nov 04, 2016 Nov 04, 2016

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!

5.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Nov 07, 2016 Nov 07, 2016

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

I've created an idea also,

Please help me voting this! Thanks!

Translate
Community Expert ,
Nov 04, 2016 Nov 04, 2016

Yep, it's gone.

I don't understand that decision at all.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 07, 2016 Nov 07, 2016

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 07, 2016 Nov 07, 2016

My guess is that, in their haste to get the program out in time for MAX, they simply forgot to add the function and that an upcoming patch might fix it.

In case that's not the plan, I did create an Idea (vote-able Feature Request) here:

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 07, 2016 Nov 07, 2016

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

I've created an idea also,

Please help me voting this! Thanks!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 11, 2016 Nov 11, 2016

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 11, 2017 Jan 11, 2017

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 24, 2017 Jan 24, 2017

I'm with you garek007​

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 14, 2017 Apr 14, 2017

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Apr 22, 2017 Apr 22, 2017

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>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 27, 2017 Aug 27, 2017

No it's not gone..You can do it with Quick Tag Editor under Edit tab.or by pressing ctrl+T

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 28, 2017 Aug 28, 2017

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 25, 2017 Oct 25, 2017

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Feb 09, 2019 Feb 09, 2019

Why ist the marked answer useful? Still not answered.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 09, 2019 Feb 09, 2019
LATEST

Wrapped snippets are gone.

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines