Lugaru's Epsilon
Programmer's
Editor 14.00

Context:
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
         Undoing
         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. Modes can 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:

>infofiles
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.

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

!cmdline
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.

=url
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.

&site
runs a web browser using the URL of a search engine, telling it to perform a site-specific search for the keyword at point. The site name follows the & character. The URL is constructed by taking the value of the context-help-site-search variable and replacing the @ in it with the given site name. You can set that variable to change your preferred search provider. The resulting URL is then interpreted as with = above.

@site
runs a web browser using the URL of a search engine, telling it to perform a site-specific search for the keyword at point, and go to the first match. The site name follows the @ character. The URL is constructed by taking the value of the context-help-site-search-lucky variable and replacing the @ in it with the given site name. You can set that variable to change your preferred search provider. The resulting URL is then interpreted as with = above.

$helpfile
looks up the keyword at point in a .hlp file. This rule type is only available under Windows, and only works if you've installed WinHelp (an optional feature through Windows 8.1 only).

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 older development environments in MS-Help2 format, by setting its rule to call the context_help_windows_compilers( ) subroutine. (Microsoft no longer uses this help format in their development environments.) 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 Epsilon Programmer's Editor 14.00 manual. Copyright (C) 1984, 2020 by Lugaru Software Ltd. All rights reserved.