Lugaru's Epsilon
Programmer's
Editor 14.04

Context:
Epsilon User's Manual and Reference
   Commands by Topic
      Moving Around
         Simple Movement Commands
         Moving in Larger Units
            . . .
            Sentences
            Paragraphs
            Parenthetic Expressions
         Searching
            Searching Multiple Files
         . . .

Previous   Up    Next
Paragraphs  Commands by Topic   Searching


Epsilon User's Manual and Reference > Commands by Topic > Moving Around > Moving in Larger Units >

Parenthetic Expressions

Epsilon has commands to deal with matching parentheses, square brackets, curly braces, and similar delimiters. We call a pair of these characters with text between them a level. You can use these level commands to manipulate expressions in many programming languages, such as Lisp, C, and Epsilon's own embedded programming language, EEL.

A level can contain other levels, and Epsilon won't get confused by the inner levels. For example, in the text "one (two (three) four) five" the string "(two (three) four)" constitutes a level. Epsilon recognizes that "(three)" also constitutes a level, and so avoids the mistake of perhaps calling "(two (three)" a level. In each level, the text inside the delimiters must contain matched pairs of that delimiter. In many modes, Epsilon knows to ignore delimiters inside strings or comments, when appropriate.

Epsilon typically recognizes the following pairs of enclosures: "(" and ")", "[" and "]", "{" and "}". The command Ctrl-Alt-f moves forward to the end of the next level, by looking forward until it sees the start of a level, and moving to its end. The command Ctrl-Alt-b moves backward by looking back for the end of a level and going to its beginning. The Ctrl-Alt-k command kills the next level by moving over text like Ctrl-Alt-f and killing as it travels, and the Alt-<Del> command moves backward like Ctrl-Alt-b and kills as it travels. A mode may define a different set of grouping characters, such as < and > for HTML mode.

The Alt-) key runs the find-delimiter command. Use it to temporarily display a matching delimiter. The command moves backward like Ctrl-Alt-b and pauses for a moment, showing the screen, then restores the screen as before. The pause normally lasts one half of a second, or one second if the command must temporarily reposition the window to show the matching delimiter. You can specify the number of hundredths of a second to pause by setting the variables near-pause and far-pause. Also, typing any key will immediately restore the original window context, without further pause.

The show-matching-delimiter command inserts the key that invoked it by calling normal-character and then invokes find-delimiter to show its match. The maybe-show-matching-delimiter command is similar, but only invokes find-delimiter if the Matchdelim variable is nonzero. In Fundamental mode, the ")", "]" and "}" keys run maybe-show-matching-delimiter.

In some modes, when the cursor is over or next to a delimiter, Epsilon will automatically seek out its matching delimiter and highlight them both. (The auto-show-adjacent-delimiter variable controls whether highlighting occurs when next to a delimiter, not on it.) See the descriptions of the individual modes for more information.

Standard bindings:

  Alt-)  find-delimiter
 Ctrl-Alt-f  forward-level
 Ctrl-Alt-b  backward-level
 Ctrl-Alt-k  kill-level
 Alt-<Del>  backward-kill-level
   show-matching-delimiter
 



Previous   Up    Next
Paragraphs  Commands by Topic   Searching


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