Articles

-What is a Text Editor?
-Large Files
-Encoding
-Syntax Highlighting
-Vertical Selection
-Snippets
-Macros
-Compare Documents
-Find and Replace
-Wrapping
-Code Folding
-Web Preview

-More Resources

Share |

What Are Snippets? How Do I Use Them?

If you spend a lot of time writing or editing, you know that you also spend a lot of time writing the same thing over and over and over again. Maybe you copy and paste, maybe you just type it all out every time. Either way, you still aren't writing as fast or as productively as you could.

Snippets are a simple, yet powerful feature of many text editors that allows you to quickly substitute longer pieces of code (or any other content) for a shorter trigger phrase. For example, if you created a snippet for some HTML code, typing the short phrase: "header" and then hitting a shortcut key could insert an entire predefined header code.

If you're still using Notepad, you won't find a snippets function. However, many third party text editors (available online for download or purchase from different developers) include snippets as a feature of the program. You can create and save snippets, or use snippets that come installed with the software. Often, text editors include snippets for popular programming/markup languages with their snippets function.

In addtion to a default library of snippets and the options to quickly and easily create snippets, text editors often allow users to download additional snippets packages that include more pre-made snippets. A popular snippets tool, Zen Coding (developed by Sergey Chikuyonok) is a revolutionary abbreviation engine that expands expressions into HTML. For anyone who uses HTML regularly, Zen Coding is a must-see.

Even if you don't use a programming or markup language, snippets can still save you time and effort by saving and inserting structures that you use frequently (forms, article format, chunks of information you don't want to type out again and again...).

All in all, snippets are a valuable tool for anyone with a text editor. Learning how to use them can change the way you interact with your writing.


More Information:

-Zen Coding
-Zen Coding Review


© 2010 Text-Editor.org