开发者

Assigning often used code blocks to Keyboard Shortcut (DreamWeaver)

have any of you dreamweaver users had cases in which you are programming and finding yourself to use a particular piece of code over and over...

and over? See, I use all day the following pieces of code:

<?=__("

&

")?>

Question: Is there anyway you programmers have found out a way to assign your favourite/most used code into a keyboard shortcut? I would love to put a开发者_StackOverflow社区ssign my two things to something like

Ctr+Shift+Num7 = [whatever programming code]
Ctr+Shift+Num9 = [whatever programming code]  

Any suggestions would be very awesome as I know this is very specific...

I have tagged this question ad dreamweaver & adobe-dreamweaver only, this way hoping to find folks who have programming experience and have come across this real-world issue.


Dreamweaver allows you to assign keyboard shortcuts to Snippets.

  1. Window -> Snippets
  2. Create a snippet (click + button at bottom of the panel, or right click within the panel and choose New Snippet), in this case it appears that you want to have "wrap selection". Place the snippet content into the appropriate areas, give it a name an option description.
  3. Edit -> Keyboard Shortcuts (or right-click in the Snippets panel select Edit Keyboard shortcuts.
  4. Create a new keyboard shortcut set if have don't already have a custom set.
  5. In the short cuts editor, make sure to select Snippets in the Commands list.
  6. Select your snippet (it may be nested within a "folder", so drill in to the snippets locations).
  7. Click + by Shortcuts
  8. Enter your keyboard combination by hitting the key combo you want to use for this snippet.
  9. Click OK
  10. test your new snippet keyboard combo.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜