Clipper plugin By André Kaplan akaplan@users.sourceforge.net

About

Clipper provides access to libraries of convenient text clips (e.g. HTML tags, programming constructs, etc.) that can be inserted into a buffer.

Use

The Clipper is enabled and disabled by choosing the toggable menu option "Clipper" on the Plugins menu. Also, Clipper can be docked into jEdit. The docking properties of Clipper are configured from the Global options pane (Utilities -> Global Options... -> Docking).

The Clipper consists of a combobox positioned above a list box. The combobox allows you to select which clip library is displayed in the list box below. In the list box are listed the names of all text clips in the selected clip library. To insert a text clip into the active buffer, either:

Requirements: JDK 1.1, jEdit 3.0

Clip libraries

Clipper is distributed with some clip libraries. New user-defined libraries can also be added quite easily. Clipper searches for clip library files in three places:

  1. The clip libraries distributed with Clipper are loaded from inside the plugin's jar file. All *.cliplibrary files found inside the jar are loaded.
  2. Clip libraries in the directory set with the Plugin Options. (Utilities -> Global Options... -> Plugin Options -> Clipper)
  3. User-defined clip libraries are loaded from directories on the local file system. These directories are specified in Clipper's properties file Clipper.props by the keys plugin.Clipper.clipLibraryDirectory.n where n runs from zero upwards. These can be changed by editing the properties file and rebuilding the jar. All *.cliplibrary files found in these directories are loaded.

Format of clip library files

Clip library files have names that end with .cliplibrary. Their format is essentially the same as a standard Java properties file: a list of key/value pairs in the form key=value. The key is the name of the text clip that will appear in the list. The value is the text that will be inserted into the active buffer.

In addition, the following special keys are recognized:

@title=clip library title
specifies the title of the clip library which will be displayed in the combobox. Note that this must be unique - if the title clashes with the title of another clip library, the second clip library will replace the first.
@sortClips=true
if true, the list of clip names will be sorted.
@caseSensitiveSort=false
if true, the sort order will be case sensitive, i.e. in the order A-Z then a-z.
Multi-line text clips
These can be defined by placing \n where a newline should be inserted.
Cursor marker
The character | is a cursor marker. It indicates where the cursor should be positioned after the text clip has been inserted. If some text was selected when the text clip was inserted, the selected text will appear in this position. This means that, for example,using the HTML tags clip library, you can select some words and then insert an <A> tag to get Clipper to mark those words as a hyperlink.

If you need to use a | character in a clip library, write it twice: ||

Example

The following is an example clip library file

# Example clip library
# (taken from the HTML clip library)

@title=Example
@sortClips=true
@caseSensitiveSort=false

A=<A HREF="">|</A>
ADDRESS=<ADDRESS>|</ADDRESS>
TABLE=<TABLE>\n<TR>\n<TD>|</TD>\n</TR>\n</TABLE>

License

The source code is distributed under the GPL. Please see http://www.fsf.org/copyleft/gpl.html

Credits

Chris Laird <chris.laird@comports.com> is the original author of Clipper.

Feedback

The preferred way to send bug reports or feature requests is to use the Sourceforge Bug Tracker at http://sourceforge.net/bugs/?group_id=588.

Also, you can send any clip libraries you think other people might find useful to:

Changelog