Lugaru's Epsilon
Programmer's
Editor 14.04

Context:
Epsilon User's Manual and Reference
   Commands by Topic
      Language Modes
         . . .
         Batch Mode
         C Mode
            Other C mode Features
         Configuration File Mode
         . . .

Previous   Up    Next
C Mode  Commands by Topic   Configuration File Mode


Epsilon User's Manual and Reference > Commands by Topic > Language Modes > C Mode >

Other C mode Features

In C mode, the Alt-<Down> and Alt-<Up> keys move to the next or previous #if/#else/#endif preprocessor line. When starting from such a line, Epsilon finds the next/previous matching one, skipping over inner nested preprocessor lines. Alt-] and Alt-[ do the same. Press Alt-i to display a list of the preprocessor conditionals that are in effect for the current line.

When the cursor is on a brace, bracket, or parenthesis, Epsilon will try to locate its matching brace, bracket, or parenthesis, and highlight them both. If the current character has no match, Epsilon will not highlight it. Similarly, when the cursor is at a preprocessor conditional like #if, #else, or #endif, Epsilon will highlight it and its matching lines. Bits in the variable auto-show-c-delimiters enable or modify the rules for both types of highlighting.

C mode colors #if 0 blocks as comments. The c-color-preproc-if-pattern variable determines what counts as an #if 0 block, so you can make other #if-like preprocessor lines also begin comment coloring by customizing this variable.

Press Alt-' to display a list of all functions and global variables defined in the current file. You can move to a definition in the list and press <Enter> and Epsilon will go to that definition, or press Ctrl-g to remain at the starting point. By default, this command skips over external declarations. With a prefix numeric argument, it includes those too. Also see the list-which-definitions variable.

Epsilon normally auto-fills text in block comments as you type, breaking overly long lines. See the c-auto-fill-mode variable. As with normal auto-fill mode (see Formatting Text), use Ctrl-x F to set the right margin for filling. Set the c-fill-column variable to change the default right margin in C mode buffers. Set fill-c-comment-plain nonzero if you want block comments to use only spaces instead of a * on successive lines.

You can manually refill the current paragraph in a block comment (or in a comment that follows a line of code) by pressing Alt-q. If you provide a numeric prefix argument to Alt-q, say by typing Alt-2 Alt-q, it will fill using the current column as the right margin.

Epsilon's tagging facility isn't specific to C mode, so it's described elsewhere (see Tags). But it's one of Epsilon's most useful software development features, so we mention it here too.

Epsilon displays the name of the current function on the mode line as you move through the buffer. See the display-definition variable to disable or customize this. This feature assumes that a right brace character } found at the left margin marks the end of a top-level block (such as a function, class, or structure definition). If you must edit code formatted with the } of inner blocks also on the left margin, set the c-quick-scan variable to zero. (On very large files, this can make updating the function name shown on the mode line much slower.)

Whenever you use the find-file command to read in a file with one of the extensions .c, .h, .e, .y, .cpp, .cxx, .java, .inl, .hpp, .idl, .acf, .cs, .i, .ii, .m, .mi, .mm., .mmi, or .hxx, Epsilon automatically enters C mode. See Language Modes for information on adding new extensions to this list, or preventing Epsilon from automatically entering C mode. For file names without a suffix, Epsilon examines their contents and guesses whether the file is C++, Perl, some other known type, or unrecognizable.

Standard bindings:

  C Mode only: Alt-], Alt-<Down>  forward-ifdef
 C Mode only: Alt-[, Alt-<Up>  backward-ifdef
 C Mode only: Alt-q  fill-comment
 Alt-'  list-definitions
 Alt-i  list-preprocessor-conditionals
 



Previous   Up    Next
C Mode  Commands by Topic   Configuration File Mode


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