Skip to main content
Known Participant
December 12, 2018
Question

[DW 2019 macOS] How to create a shortcut for "markup as <code>...</code>"?

  • December 12, 2018
  • 2 replies
  • 929 views

In DW 2014 it was possible to markup a selected text e.g. "lorem" via a command/shortcut to "<code>lorem</code>".

It seems, that this in not possible anymore in DW 2019.

I need the function a lot, so I'm looking for a solution.

Do you have an idea? Is there an extension for that?

Can you add the function with adding a special config file?

Thanks.

    This topic has been closed for replies.

    2 replies

    Jon Fritz
    Community Expert
    Community Expert
    December 12, 2018

    Looks like I misread your post.

    To wrap a selection of text in a set of tags in code view, make the selection and hit Ctrl+T.

    Known Participant
    December 12, 2018

    Jon, you missunderstand my question. I should have expressed my issue more precisely, sorry.

    I really look for a true shortcut which does not need to enter anymore code.

    Like the command "Menu Edit > Text > Bold".

    Probably that need's an extension or a script?

    Is it possible to add functionality to DW in that way?

    Jon Fritz
    Community Expert
    Community Expert
    December 12, 2018

    It used to be a very, very simple process using the Snippets Window.

    Prior to CC 2017, you could create a wrapping Snippet with any code you liked, meant to be added in front of and behind the selection. You could also then set a keyboard shortcut to add the code.

    That changed when they introduced Snippet Keywords and removed the majority of links to Snippets in Keyboard Shortcuts. The old Wrapping Snippets are also gone entirely from the program now. There was a time where, if you brought your Snippets over from the older version of DW, they would still wrap (though the shortcuts were still gone, requiring a double click of the Snippet in the Snippets Window) but that has also since been removed.

    The fastest way to wrap a selection a set of tags, right now in CC2019, would be to...

    1. highlight the selection
    2. Hit Ctrl + T
    3. Start typing the tag until DW's hinting shows the right one
    4. hit Enter twice

    I still use CC 2015 for production work, in large part because of the scaling down of the Snippets Window's functionality.


    There's no way I know of to wrap more than a simple tagset around a selection without multiple Snippets and keystrokes being used, in CC 2019.

    Jon Fritz
    Community Expert
    Community Expert
    December 12, 2018

    Using the built in Emmet functionality, you can type "lorem" and hit Tab to get a sentence of Lorem Ipsum. Alternatively, you can type "lorem" and a number, for example "lorem200" and hit Tab to get 200 words of Lorem Ipsum text where you place the cursor.