Lugaru's Epsilon
Editor 14.04

Epsilon User's Manual and Reference
   Commands by Topic
      Buffers and Files
            . . .
            Line Translation
            DOS/OEM Character Set Support
            File Name Prompts
            File Name Case
         File Variables
            Directory-wide File Variables
            Vi/Vim File Variables
         . . .

Previous   Up    Next
DOS/OEM Character Set Support  Commands by Topic   File Name Case

Epsilon User's Manual and Reference > Commands by Topic > Buffers and Files > Files >

File Name Prompts

By default, Epsilon interprets environment variables when you type file names, using the syntax %TEMP% under Windows, and $TEMP or ${TEMP} on macOS, Linux and FreeBSD. Keys like ? and <Space> complete on environment variable names just as they do on file names.

The list of names Epsilon recognizes between % characters also includes Windows shell folder names. Epsilon prefixes these with an @ to prevent collisions with environment variable names.

On all platforms, you can use the name @ecustom as if it were an environment variable name, to refer to Epsilon's customization directory.

You can define your own names to be substituted just like environemnt variable names, by putting them in a text file named subst_vars in your Epsilon customization directory (see The Customization Directory). Each line in the file should have the format varname=value, where varname may contain letters, digits, _, and @. Your variables can name either a directory (which must end with a \ or /) or a specific file. For example:


When such a variable's value is a list of directories, Epsilon converts it into a file pattern, so a pattern like $INCLUDE/std*.h (or, in Windows syntax, %INCLUDE%\std*.h) matches files in any directory on the INCLUDE path. (Actually Epsilon just checks if the value contains the directory separator character: semicolon for Windows and colon elsewhere.) Epsilon transforms such values using extended file pattern syntax, so any file name following matches in any of the listed directories.

Your values can also use extended file patterns directly. For example, say you frequently need to grep or perform text replacements on all .c, .h, and .cpp files in the c:\myprogram hierarchy. You could define a variable as follows, and then just type %@src% at those commands' file pattern prompts.


You can disable such variable substitution by typing " before or within the name, or turn off some or all aspects of it by setting bits in the file-interpret-env-vars variable.

Epsilon caches the list of variable names and values in the -subst-vars buffer. Delete that buffer with the kill-buffer command on Ctrl-x k if you want Epsilon to load changes to your Windows shell folder settings or file of custom variables.

You can customize many other aspects of Epsilon's behavior when prompting for file names.

By default, many commands in the Windows version of Epsilon use the standard Windows common file dialog, but only when you invoke them from a menu or the tool bar. When you invoke these commands using their keyboard bindings, they use the same kind of dialog as other Epsilon prompts.

Set want-common-file-dialog to 2 if you want Epsilon to use the common file dialog whenever it can. Set want-common-file-dialog to 0 to prevent Epsilon from ever using this dialog. The default value of 1 produces the behavior described above. You can use the force-common-file-dialog command to toggle whether Epsilon uses a dialog for the next command only.

The Windows common file dialog includes a list of common file extensions. You can customize this list by editing the file filter.txt, putting your own version in your customization directory (see The Customization Directory). See the comments in that file for more information. You can also customize which directory this dialog uses, and how Epsilon remembers that choice; see the common-open-use-directory variable.

All the remaining features and variables described in this section have no effect when Epsilon uses the standard Windows dialog; they only modify Epsilon's own file dialogs. Similarly, the standard Windows common file dialog cannot interpret environment variables and other names as described above.

The prompt-with-buffer-directory variable controls how Epsilon uses the current directory at file prompts. When this variable is 2, the default, Epsilon inserts the current buffer's directory at many file prompts. This makes it easy to select another file in the same directory. You can edit the directory name, or you can begin typing a new absolute pathname right after the inserted pathname. Epsilon will delete the inserted pathname when it notices your absolute pathname. This behavior is similar to Gnu Emacs's. (See the yank-options variable to modify how Epsilon deletes the inserted pathname.)

A setting of 3 makes Epsilon insert the current buffer's directory in the same way, but prevents Epsilon from automatically deleting the inserted pathname if you type an absolute one.

When prompt-with-buffer-directory is 1, Epsilon temporarily changes to the current buffer's directory while prompting for a file name, and interprets file names relative to the current directory. This behavior is similar to the "pathname.e" extension available for previous versions of Epsilon.

When prompt-with-buffer-directory is 0, Epsilon doesn't do anything special at file prompts. This was Epsilon's default behavior in previous versions.

The grep and file-query-replace commands use a separate variable grep-prompt-with-buffer-directory for their file patterns, with the same meaning as above. By default it's 1.

During file name completion, Epsilon can ignore files with certain extensions. The ignore-file-extensions variable contains a list of extensions to ignore. By default, this variable has the value "|.obj|.exe|.o|.b|", which makes file completion ignore files that end with .obj, .exe, .o, and .b. Each extension must appear between "|" characters. You can augment this list using the set-variable command, described in Variables.

Similarly, the only-file-extensions variable makes completion look only for files with certain extensions. It uses the same format as ignore-file-extensions, a list of extensions surrounded by | characters. If the variable holds a null pointer, Epsilon uses ignore-file-extensions as above.

Completion also restricts its matches using the ignore-file-basename and ignore-file-pattern variables, which use patterns to match the names of files to be excluded. If the pattern the user types doesn't match any files, due to any of the various exclusion variables, Epsilon temporarily removes all exclusions and lists matching files again.

When Epsilon prompts for a file name, the <Space> key performs file name completion on what you've typed. To create a new file with spaces in its name, you must quote the space characters by typing Ctrl-q before each one, while entering the name, or type " characters around the file name (or any part containing spaces).

At any Epsilon prompt (not just file prompts), you can type Alt-e to retrieve your previous response to that prompt. Alt-<Up> or Ctrl-Alt-p show a list of previous responses. See Command History for complete details. Alt-<Down> or Ctrl-Alt-n let you easily copy text from the buffer into the prompt (useful when the buffer contains a file name or URL). See Completion & Defaults for more information. At most file name prompts, Alt-g will retrieve the name of the current buffer's file.

When Epsilon for Windows shows a dialog containing a list of previous responses, or files matching a pattern, the list may be too wide for the dialog. You can generally resize the dialog by simply dragging its border. This works for most Epsilon dialogs. Epsilon will automatically remember the size of each dialog from session to session.

Previous   Up    Next
DOS/OEM Character Set Support  Commands by Topic   File Name Case

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