Every clip consists of a name, a description and some content. The name and
description is displayed in the clip list that pops up when you call it with
the shortcut Ctrl-Space. The selected clip's content is inserted at the cursor
position. The content of a clip can be an unlimited number of lines and the
structure of the clip in the definition is kept when it is inserted into your
file. The clip definitions are not fixed and you can edit the existing
definitions or add your own.
Note: The .DEF files are usually reinstalled with
each new version of PSPad so if you edit them you should ensure that you have
copies before installing any upgrades.
Pressing Ctrl-Space will produce the entire list of clips in the file. You can scroll up and down the list to find the entry you want and the press Enter or click on it with the mouse to select it. You can also start to type the name of the clip entry you want and the list will scroll to the closest match. If you enter the name of the clip you require, or part of it, before pressing Ctrl- Space the list will open at the closest match. You can also assign a keyboard shortcut or "Hotkey" to a particular clip (see Settings Menu for details). Clips with a keyboard shortcut are also listed under the Settings menu > Clips Hotkeys. If you type the full clip name then pressing Shift+Space will enter the clip's content directly into the file without displaying the clip list.
The clip definition format is very simple: [name |x description]*shortcut
The clip content starts on the line immediately after the definition and continues until the start of the next definition or the end of the file.
The content is entered into your file exactly as it is entered here. There are 2 special characters that you can use in your content; | and § (ALT+167). When your clip is used the cursor will be placed at the position occupied by the | character. If you include this character more than once in your clip content then only the first position will be used. If you have any text highlighted in your file when you call the clip and the clip's content includes the § character then that character will replace the selected text. You can use the § character multiple times; each occurrence will be replaced with the selected text in your file.
You can add comments to the clip definition by starting the line with a semicolon ;. If your clip content needs to include a line that starts with a colon, enter two colons ;;.
Note: You cannot have a line in your clip content that starts with the open square bracket, [ character as this marks the beginning of the next clip definition.
Example:
[Alert Alert]*Ctrl+Alt+A|
alert("§|");