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

Want a keystroke for wrapping the selection in <code>

Community Beginner ,
Mar 18, 2020 Mar 18, 2020

Copy link to clipboard

Copied

Once-upon-a-time I could type ctl-Q in the design window and the current selection would be wrapped in <code>...</code>. Now in DW 20.1 I cannot find any of these

   A keystroke to wrap the selection in <code>...</code>

   A menu item to do the same

   A way to define a keystroke to wrap the current selection

(I've found snippets, but they just insert a single string.)

 

Can you help? I need <code> a lot.

Fred Hansen

TOPICS
Code , Extensions , How to

Views

841

Translate

Translate

Report

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 Expert , Mar 20, 2020 Mar 20, 2020

I'm not sure who marked it as correct, but you can un-mark it if you feel the answer isn't right. Click the blue "Marked as Correct Answer" under my response to undo it.

It was probably marked as correct because DW CC2020 no longer allows for what you want to do and my answer is as close as you're likely to find.

Unfortunately, the workflow you were used to, has been changed. The last time it was possible to set Ctrl + Q to a Wrapping Snippet of <code></code> was in DW CC2015 (coincidentally, the

...

Votes

Translate

Translate
Community Expert ,
Mar 18, 2020 Mar 18, 2020

Copy link to clipboard

Copied

Select the code you want to wrap

Hit Ctrl + T
Start typing the tag name you want (code hinting will add it)

Hit Enter twice

Wrapping Snippets are back in DW, and could be used, however there's no Keybaord Shortcuts for Snippets like there were in previous versions. Only "Keywords" that act like Emmet Abbreviations, which won't work with Wrapping Snippets.

Votes

Translate

Translate

Report

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 ,
Mar 20, 2020 Mar 20, 2020

Copy link to clipboard

Copied

Ah, now I see. There are wrapping snippets. Although to use them you have to drive the mouse to the snippet window and double click. (Curiously, they do not work from the recent-snippets menu.)

 

Still, I must ask, how is this a correct answer? It calls for seven key presses instead of two. Or disruptive mouse movement.

Votes

Translate

Translate

Report

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 ,
Mar 20, 2020 Mar 20, 2020

Copy link to clipboard

Copied

I'm not sure who marked it as correct, but you can un-mark it if you feel the answer isn't right. Click the blue "Marked as Correct Answer" under my response to undo it.

It was probably marked as correct because DW CC2020 no longer allows for what you want to do and my answer is as close as you're likely to find.

Unfortunately, the workflow you were used to, has been changed. The last time it was possible to set Ctrl + Q to a Wrapping Snippet of <code></code> was in DW CC2015 (coincidentally, the version I still use for production).

Votes

Translate

Translate

Report

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 ,
Mar 20, 2020 Mar 20, 2020

Copy link to clipboard

Copied

LATEST

Thanks, I've redirected the "correct answer" flag.

Votes

Translate

Translate

Report

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