Author:

I am a web developer. I work on JavaScript, PHP, ASP.NET, jQuery, ActionScript, AJAX and Facebook application, as well as interested in social networking and daily active user on Twitter, Facebook and Google+

Mostly we apply so many things in every project, our fingers accept all things during code-behind but sometime I feel really fed-up when I write same things in every project or application. Finally, I have read some snippet tricks that how do people use snippets in projects and how they save time and shows his better performance.

Okay, Lets take a look in below steps and video that how to create a snippet in Adobe Dreamweaver CS5.

Why?

Snippet is use for saving your code into library. Some of code, script or commands we use regularly, snippet save your codes and scripts. (e.g. script tag, functions, core classes). Dreamweaver has built-in snippets (e.g. Javascript regular functions, html codes, textfield functions)

Usage:

Open Window menu and select Snippets (Shift+F9)

Figure 1

In the Snippets window right click and you will find other options.

  1. New Snippet (This option helps you to create a new snippet)
  2. New Folder (By creating a folder you can keep you snippet in separate folder)
  3. Edit (Modify the snippet which had been created by you or Dreamweaver)
  4. Insert (Double click to add snippet into open document where your pointer is)
  5. Rename (To rename a snippet)
  6. Edit Keyboard Shortcuts (Setup a keyboard shortcut to each snippet)

Figure 2

Select the “New Snippet” in the snippet menu and write your tag which you use mostly in the project, in the below figure I created a jQuery Starter + Script Starter snippet for using a <script> tag with the jQuery document.ready method.

Figure 3

After the creating a snippet you can define a Keyboard shortcut. It is a very simple procedure to create a snippet, please check the screencast where I define all the snippet procedures and how will you setup keyboard shortcut.

Thank you for reading! You can comment below to share tips and you can help me to make it better and easiest.


Kick It on DotNetKicks.com   Shout it  

Popularity: 4%

Comments on this entry (4 comments)

Did you like this post? You can share your opinion with us! Simply click here.

Can tell me about we can export snippets easily but i have problem how can import snippets..

Reply

Before your comment I didn’t know about snippets import/export. But I have found one article Sharing Snippets in Dreamweaver CS5.

I tried following procedure to import/export Dreamweaver snippets.
The path for the directory on a Windows OS would be: C:\Users\[YOUR ACCOUNT NAME]\AppData\Roaming\Adobe\Dreamweaver CS5\en_US\Configuration\Snippets, where you’d substitute[YOUR ACCOUNT NAME]” for your actual account name.

All of your snippet will be saved in the above path, you can save and load easily without any Dreamweaver Extensions.

Thank you,

aoobtds

Thank you for your complement.

Add Your Comment