Auto-completion file format

From EditPlus Wiki
Jump to: navigation, search

EditPlus uses a simple, plain text auto-completion file format to set up keywords that trigger their auto-completion.

EditPlus comes with three auto-completion (.acp) files (cpp.acp, htmlbar.acp, perl.acp), located in the directory in which EditPlus is installed. These can be opened and easily modified with EditPlus itself. Changes to auto-completion files will take effect after selecting Document > Refresh STX/ACP or after restarting EditPlus. You can create a custom auto-completion file (or use one created by someone else) and configure EditPlus to associate it with a certain file extension by going to Tools > Preferences > Files > Settings & Syntax.

File Format

Comments

You can comment a line by beginning it with a ';' (semicolon). If you need to add a text clip which begins with semicolon, you must prefix it with an escape character '^' (caret).


Header Information

#TITLE= 
The title of auto-completion file.
#CASE= 
Specify case sensitivity. 'y' for yes and 'n' for no. Default value is 'n'.

Text Clips

Each text clip (or auto-completion command) adheres to the following format:

#T=keyword
auto-completion text
#

After the keyword is typed (followed by a whitespace) in a file configured to use auto-completion, the auto-completion text is inserted in its place.

You can define an optional Hot Spot using '^!' (caret-exclamation point) to specify the cursor location when the auto-completion text is inserted. If you want a '^' (caret) in the auto-completion text, you should enter the character twice like this: '^^'. If you want a '#' (pound sign) in the auto-completion text, prefix it a caret: '^#'. The auto-completion text can have multiple lines. An optional '#' sign can be placed in the line after the last line to indicates the end of the auto-completion text. Please note that delimiters are not allowed in the keyword (#T=).

Here is an example of an actual text clip from the perl.acp file:

#T=if
if (^!) {
}

Other File Formats

  • See syntax file format for information on EditPlus's syntax highlighting of different file types
  • See cliptext file format for information on creating a sidebar library of commonly used text chunks