Lugaru's Epsilon

Epsilon User's Manual and Reference
   Commands by Topic
      . . .
      Language Modes
         Asm Mode
         Batch Mode
         C Mode
         . . .
         Visual Basic Mode
      More Programming Features
         . . .
         Pulling Words
         Accessing Help
         Context-Sensitive Help
         Commenting Commands
      Fixing Mistakes
         Interrupting a Command
      . . .

Previous   Up    Next
Accessing Help  Commands by Topic   Commenting Commands

Epsilon User's Manual and Reference > Commands by Topic > More Programming Features >

Context-Sensitive Help

Pressing Shift-F1 provides help on the keyword at point, using a help rule specific to the current mode. Some modes have rules that consult compiler documentation, man or Info pages, or search on the web at an API reference site. You can change the rules by setting variables.

Each mode has an associated variable whose name is formed by adding the mode name to the end of context-help-rule-. (Characters in the mode name that aren't valid in EEL identifier names are removed first; the rest are changed to lowercase.) So HTML mode, for instance, uses a rule variable named context-help-rule-html.

A mode can define separate rules for Windows and Unix. If a mode named m defines a variable context-help-rule-m-windows or context-help-rule-m-unix, Epsilon will use it instead of the usual variable on that platform.

If there's no variable for the current mode, Epsilon uses the rule in the context-help-default-rule variable.

Instead of, or in addition to, providing a rule variable, a mode can define an EEL function to force a different rule variable. Epsilon calls a function named context_help_override_modename for a mode named modename, if one is defined. That function must fill in its single char * parameter with a replacement mode name; then Epsilon will look up the corresponding variable, as above. C mode uses this to provide a different help rule for EEL buffers than for Java or C++ buffers, even though they all use C mode. HTML mode uses this to provide a different help rule within embedded JavaScript (or other scripting languages) than it does in plain HTML text.

Each rule variable consists of a rule type, which is a single punctuation character, followed by a parameter such as a file name or URL. Here are the rule types:

looks up the keyword at point in the index of the Info file specified by its parameter. You can list multiple comma-separated Info file names, and Epsilon will use the first one that contains the keyword in its index.

runs the specified EEL function func. See below for useful rule functions.

runs an external program, using the specified command line. It appends the keyword at point to the end of the command line. But if the command line contains a * character, Epsilon instead substitutes the keyword at that position. If the program file name contains spaces, quote it with ". A & character at the end of the command line makes the command run asynchronously; use it to run a Windows GUI program. Without &, Epsilon will run the program synchronously, collect its output in a buffer, and display any output it produces.

runs a web browser on the specified URL. A * character in the URL substitutes the keyword at point at that position; otherwise it's added to the end of the URL.

looks up the keyword at point in a .hlp, .chm, or .col file. These are Windows help file formats, and this rule type is only available under Windows.

Here are some functions designed to be used in a context rule. To use one in a rule, put a + before its name in the rule variable.

The context_help_man( ) subroutine runs Epsilon's man command on the word at point. (The _ and - characters are interchangeable in these rules, so you can set a rule to +context-help-man, for instance, to use this subroutine.)

The context_help_perldoc( ) subroutine runs Epsilon's perldoc command on the word at point.

Under Windows, you can set a mode to use help provided by Microsoft's development environment by setting its rule to call the context_help_windows_compilers( ) subroutine. The subroutine tries to locate the appropriate compiler help system automatically. With certain help systems that have multiple help collections, it uses the mshelp2-collection variable.

Standard bindings:

  Shift-F1, F1 t  context-help

Previous   Up    Next
Accessing Help  Commands by Topic   Commenting Commands

Lugaru Copyright (C) 1984, 2020 by Lugaru Software Ltd. All rights reserved.