Configuring Keywords
Choose Words in the Define Element As combo box. Choose Keyword in the Kind combo box. Enable the Whole Word option. Fill out the list of keywords in the Word List edit box. Use new lines to separate keywords.
Configuring Symbols
Choose Words in the Define Element As combo box. Choose Symbol in the Kind combo box. Disable the Whole Word option. Fill out the list of symbols in the Word List edit box. Use new lines to separate symbols.
Configuring Comments
There are two kinds of comments: comments that end at the end of a line and comments that end at an ending marker.
To configure a comment that ends at the end of the line, choose Rest Of Line in the Define Element As combo box. Choose Comment in the Kind combo box. Enter the Start Marker for the comment. If the start marker is an identifier, such as REM, enable the Whole Word option. If the start marker is not an identifier, such as //, disable the Whole Word option.
To configure a comment that ends at an ending comment marker, choose the Range option in the Define Element As combo box. Choose Comment in the Kind combo box. Enter the Start Marker and the End Marker and enable the Span Lines option. Enable the Allow Nesting option if the programming language allows comments to be nested.
Configuring Strings
Choose the Range option in the Define Element As combo box. Choose String in the Kind combo box. Enter the Start Marker and the End Marker for the string.
Languages often use an escape character to provide a way to specify the start and ending marker of the string in the string itself. For example, in a C string whose start and end marker is a ", you can specify a " in the string with \". In this example, \ is an escape character for ". Enter any escape character in the Escape Char field.
A programming language may have other elements that you may want to classify as a keyword, symbol, comment, or string. For instance, if a language has a character data type, you may define a language element for character constants in the same way you define a language element for strings constants.
You may specify a Command without a full path. For example, you may specify a command to launch notepad by using notepad.exe instead of C:\WINDOWS\System32\notepad.exe. If the command does not have an absolute path, Lite Edit searches for the command in the following directories:
You may enter environment variables and any of the following macros for the Command, Paramters, and Initial directory.
Macro | Definition | Example (open file is C:\Folder\File.txt) |
---|---|---|
%FilePath% | The full path of the currently opened file | C:\Folder\File.txt |
%FileDir% | The directory of the currently opened file with trailing backslash | C:\Folder\ |
%FileName% | The file name of the currently opened file without extension | File |
%FileExt% | The file extension of the currently opened file | txt |
%CurDir% | The current windows directory | N/A |
%Prompt:<prompt message>% | Prompts you for input when the command executes | N/A |
When you use the prompt macro, you specify a <prompt message> that will appear in a dialog box when the command prompts you for input. For example, if you specify the macro %Prompt:Enter a number% as the Parameters, when the command executes, a dialog box that says "Enter a number:" will prompt you for input.
Below the Command, Paramters, and Initial directory, Lite Edit gives you a preview of the result of the environment variable and macro substitution for the currently opened file.
When specifying Parameters, if an environment variable or macro expands to a string with spaces, you must enclose the environment variable or macro in quotes (e.g. "%FilePath%") to ensure that it gets passed as one parameter. You should not enclose the Command or Initial directory in quotes.
Sometimes you may need to do more to run an external program than you can do in the Edit Tools dialog box. For example, you want to execute DOS commands such as pause or set when the program executes. You can do this by creating a batch file that runs the program and specifying the batch file as the Command in the Edit Tools dialog box.
Filters
The command can modify the selected text if you enable the Command is a filter option. A filter is a program that reads text from standard input and writes text to standard output. When you enable the Command is a filter option, Lite Edit passes the selected text to the command through standard input. Then Lite Edit replaces the selected text with the text that the command writes to standard output.
Filter Examples:
If you have at least one line selected, you can use Tab or Space to indent all the lines with tabs or spaces. You can use Shift+Tab or Shift+Space to unindent the lines.
The 2nd Clipboard
Lite Edit maintains two clipboards. You can use Edit>>Advanced>>Switch Clipboard or Ctrl+W to switch between the clipbaords. Lite Edit displays the contents of the active clipboard in the status bar.
Copy/Cut Lines Quickly
If there is no selection, copy and cut operate on the entire line.
Insert Files
If you copy a file in windows explorer, you can paste in Lite Edit to insert the contents of that file.
Porting Syntax Coloring Configurations
Most Lite Edit configurations are stored in the LiteEdit.ini file. However, each language you configure in the Options>>Syntax Coloring dialog box is stored in a .lang file which is located in the same directory as Lite Edit. You can port your syntax coloring settings from one computer to another by copying the .lang files from one installation of Lite Edit to another. You can also add or remove .lang files from liteedit.zip to customize which .lang files Lite Edit installs.