Lugaru's Epsilon
Programmer's
Editor 14.04

Context:
Epsilon User's Manual and Reference
   Commands by Topic
      . . .
      Repeating Commands
         Repeating a Single Command
         Keyboard Macros
      Simple Customizing
         . . .
         Brief Emulation
         CUA Keyboard
         Variables
         Saving Customizations
         Command Files
      Advanced Topics
         Changing Commands with EEL
         Updating from an Old Version
         Keys and their Representation
         Customizing the Mouse
      . . .

Previous   Up    Next
CUA Keyboard  Commands by Topic   Saving Customizations


Epsilon User's Manual and Reference > Commands by Topic > Simple Customizing >

Variables

You can set any user variable with the set-variable command. The variable must have the type byte, char, short, int, array of chars, or pointer to char. The command first asks you for the name of the variable to set. You can use completion. After you select the variable, the command asks you for the new value. Then the command shows you the new value.

Whenever Epsilon asks you for a number, as in the set-variable command, it normally interprets the number you give in base 10. But you can enter a number in hexadecimal (base 16) by beginning the number with "0x", just like EEL integer constants. The prefix "0o" means octal, and "0b" means binary. For example, the numbers "30", "0x1E", "0o36", and "0b11110" all refer to the same number, thirty. You can also specify an ASCII value by enclosing the character in single quotes. For example, you could type 'a' to specify the ASCII value of the character "a" (in this example, 97). Or specify a Unicode character name inside < and > characters. You can also enter an arithmetic expression (anything the eval command can evaluate as a number).

The set-any-variable command is similar to set-variable, but also includes system variables. Epsilon uses system variables to implement its commands; unless you're writing EEL extensions, there's generally no reason to set them. When an EEL program defines a new variable, Epsilon considers it a system variable unless the definition includes the user keyword.

The show-variable command prompts for the name of the variable you want to see, then displays its value in the echo area. The same restrictions on variable types apply here as to set-variable. The command includes both user and system variables when it completes on variable names.

The edit-variables command in the non-GUI versions of Epsilon lets you browse a list of all variables, showing the current setting of each variable and the help text describing it, as you move through the list. You can use the arrow keys or the normal movement keys to move around the list, or begin typing a variable name to have Epsilon jump to that portion of the list. Press <Enter> to set the value of the currently highlighted variable, then edit the value shown using normal Epsilon commands. To exit from edit-variables, press <Esc> or Ctrl-g. With a numeric argument, the command includes system variables in its list.

If Epsilon is set to provide help via a method that permits setting variables directly from the help system (currently just the 32-bit Windows version can do this and only when using WinHelp), the edit-variables command behaves differently. It uses the help system to display a list of variables. After selecting a variable, press the Set button to alter its value.

Some Epsilon variables have a different value in each buffer. These buffer-specific variables take on a potentially different value each time the current buffer changes. Each buffer-specific variable also has a default value. Whenever you create a new buffer, you also automatically create a new copy of the buffer-specific variable as well. The value of this buffer-specific variable is initially this default value. In Epsilon's EEL extension language, you can define a buffer-specific variable by using the buffer storage class specifier, and give it a default value by initializing it like a regular variable.

Just as Epsilon provides buffer-specific variables, it also provides window-specific variables. These have a different value for each window. Whenever you create a new window, you automatically create a new copy of the window-specific variable as well. When you split a window in two, both windows initially have the same values for all their window-specific variables. Each window-specific variable also has a default value. Epsilon uses the default value of a window-specific variable when it creates its first tiled window while starting up, and when it creates pop-up windows. You define a window-specific variable in EEL with the window storage class specifier, and you may give it a default value by initializing it like a regular variable.

If you ask the set-variable command to set a buffer-specific or window-specific variable, it will ask you if you want to set the value for only the current buffer (or window), or the default value, or both. You also can have it set the value in all buffers (or windows).

Variables retain their values until you exit Epsilon, unless you make the change permanent by putting the change in your einit.ecm file or by using the write-state command, described in Saving Customizations. Those methods generally save only the default value for buffer-specific and window-specific variables. They don't save the instantiated values of the variable for each buffer or window, since the buffers and windows themselves aren't listed in an einit.ecm or state file. Session files, which do list individual buffers and windows, also record selected buffer-specific and window-specific variables.

The show-variable command will generally show you both the default and current values of a buffer-specific or window-specific variable. For string variables, though, the command will ask which you want to see.

The create-variable command lets you define a new variable without using the extension language. It asks for the name, the type, and the initial value.

You can delete a variable, command, macro, subroutine, or color scheme with the delete-name command, or rename one with the change-name command. Neither of these commands will affect any command or subroutine in use at the time you try to alter it.

Standard bindings:

  F8  set-variable
 Ctrl-F8  show-variable
   set-any-variable
   edit-variables
   create-variable
   delete-name
   change-name
 



Previous   Up    Next
CUA Keyboard  Commands by Topic   Saving Customizations


Lugaru Epsilon Programmer's Editor 14.04 manual. Copyright (C) 1984, 2021 by Lugaru Software Ltd. All rights reserved.