Contents


Configuring Syntax Coloring

You customize syntax coloring in the Languages tab of the Options>>Syntax Coloring dialog box. Programming languges can be broken up into the following elements: keywords, symbols, comments, and strings. For each language, you add language elements to it using the Add button in the Language Elements group box. Then you configure each language element.

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 //, disanable 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 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 \". Since \" contains a ", but does not mark the end of the string, it is a false end. Enter any false end in the False End 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.


Creating Tools

You create new tools in the Tools>>Edit Tools dialog box.

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:

  1. The directory of LiteEdit.exe.
  2. The 32-bit Windows system directory if one exists. This is typically C:\WINDOWS\system32.
  3. The 16-bit Windows system directory. This is typically C:\WINDOWS\system.
  4. The current Windows directory.
  5. The directories in the PATH environment variable.

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.


Misc. features

Indenting Lines

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. The contents of the active clipboard is displayed in the status bar.

Copy/Cut Lines Quickly

If there is no selection, copy and cut operate on the entire line.

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.