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.
- Window -> Snippets
- 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.
- Edit -> Keyboard Shortcuts (or right-click in the Snippets panel select Edit Keyboard shortcuts.
- Create a new keyboard shortcut set if have don't already have a custom set.
- In the short cuts editor, make sure to select Snippets in the Commands list.
- Select your snippet (it may be nested within a "folder", so drill in to the snippets locations).
- Click + by Shortcuts
- Enter your keyboard combination by hitting the key combo you want to use for this snippet.
- Click OK
- test your new snippet keyboard combo.
精彩评论