Using Profiles to Modify Editor Behavior

 
 

A number of profiles are loaded each time you start the Editor or open a file into it. These profiles contain various commands and parameter settings that control how the Editor looks and behaves.

You can directly modify load profiles supplied with the Editor to your own personal preferences, but your modifications may be lost if you later reinstall the software. To avoid losing your load profile modifications, we recommend that you do the following:

  1. Do not directly modify the standard load profiles that come with the Editor.
  2. Instead, create your own load profiles using an lxu filename extension according to the following naming conventions:

    profinit.lxu User profile that runs when the Editor is first initiated.
    profsys.lxu User profile that runs each time a new file is loaded into the Editor.
    xxx.lxu User-defined language profile that runs each time a file of type xxx is loaded into the Editor. For example, if your personalized load profile is to apply to .cpp files, your personalized load macro will be called cpp.lxu.

    Note: When you load the Editor with file type xxx, the Editor loads the xxx.lxu user load profile immediately after the xxx.lxl standard load profile.

Note: Personalized load profiles can be stored in the macros directory, but we recommend that you store them in your own directory.

 

Creating a Personalized Profile
This example shows you how you can create and customize your personal profile in, for example, the profinit.lxu file.

Perform the following steps:

  1. Create a new file in the Editor with the following lines. The first line of the profile must be a comment, as shown. Do not forget the quotation marks around each command line.
    /* profinit.lxu */
    'set blockdefaulttype rectangle'
    'set toolbar.my_button HELP "Add 5 lines to end of file" 5 mult ;bottom ;add 5'
    'set actionbar.~Queries.Class 5 query class'
    'set actionbar.~Queries.F~onts\tCtrl+Z 5 query fonts'
    'set action.c-Z query fonts'
  2. Save the file in the macros directory with a name of profinit.lxu and quit the Editor. Your new Editor customizations take effect the next time you start the Editor.
  3. To cancel your customizations, edit the profinit.lxu file to remove the unwanted Editor commands, or erase the file completely.

 

Storing a Personalized Profile
Personalized profiles should be stored in your own directory. This helps ensure that your profiles are not lost if you later reinstall the Editor. It also simplifies profile management when the Editor is used in a network environment.

To store your profiles in your own directory, do the following:

  1. Create a directory in which to store your personal profiles, for example:
     mkdir d:\my_prof 
     mkdir /u/my_user_id/my_prof
  2. Create your personalized profiles and store them in this directory.
  3. Add the new directory to the LPATH environment variable in your config.sys file. If this environment variable does not already exist, create it. For example:
    set LPATH=d:\my_prof;%LPATH%; 

    Add the new directory to the LPATH environment variable in your environment. If this environment variable does not already exist, create it. For example:

    export LPATH=/u/my_user_id/my_prof:$LPATH
  4. Reboot your system.


Customizing Editor Appearance and Function
Writing Macros for the Editor
Changing Editor Load Profiles