Text Clips
What are Text Clips?
Text clips are text fragments that are easily inserted into your
code. Programmer's Notepad ships with a variety of text clips representing
common programming languages such as C or ASP.NET, or common character
sets such as the symbols associated with HTML. Text Clips are easily
extensible so you may modify any existing Text Clip library or extend the
model to create your own Text Clip files.
To create a text clips file use the Text Clip
Creator application.
Click the link above to download this useful tool. Note that it
requires the Microsoft .NET Framework to run.
Text Clips are stored as .clips files. These files are located in
the Clips folder beneath the folder where the Programmer's Notepad
executable is installed (generally \Program Files\Programmer's Notepad).
The files are standard XML documents and may be manipulated using any
text or XML editor.
Any properly formatted XML file with a .clips extension which is
located in the Clips folder will load into the Text Clips window
whenever Programmer's Notepad is started.
Manually Create a Text Clip File
There are at minimum three steps to create a custom Text
Clip.
Use Programmer's Notepad to create an XML document.
Ensure that the document contains the following XML
tags:
<?xml version="1.0"?> <clips name=”Name for custom
clips file”> <clip name=”Name of your first text clip”>
<![CDATA[ first text clip content ]]> </clip>
</clips>
Save the file and ensure that it has the .clips
extension.
Restart Programmer's Notepad and test your new Text Clips
library.
To Extend an Existing Text Clip File
To add a new clip to an existing library:
Open the desired Text Clip file in Programmer's Notepad.
Create a new line following one of the </clip> tags.
Note that clips appear in the same order in which they exist in the
Text Clips file.
Insert a new <clip> tag and use the name attribute to
identify your new text clip. Example: <clip name=”my first
clip”>
Although not mandatory, to ensure proper parsing of your clip
you should embed your text clip inside a <![CDATA[ ]]> tag.
Your text clip is inserted between of the inner square brackets and
may include line feeds, tabs, angle brackets, and other formatting
characters. Example: <![CDATA[This is my first text
clip!]]>
Complete the text clip by including the closing </clip>
tag.
Save the file. You must restart Programmer's Notepad before
your edit will take effect.