Lugaru's Epsilon

Epsilon User's Manual and Reference
   . . .
   Getting Started
      Windows Installation
      Unix Installation
      Mac OS X Installation
      . . .
      File Inventory
   General Concepts
      . . .
      Numeric Arguments
      Viewing Lists
      Completion & Defaults
      Command History
      Mouse Support
      . . .
   Commands by Topic
      Getting Help
      Moving Around
      Changing Text
      . . .
   . . .

Previous   Up    Next
Viewing Lists  General Concepts   Command History

Epsilon User's Manual and Reference > General Concepts >

Completion & Defaults

Whenever Epsilon asks you for some information (for instance, the name of a file you want to edit), you can use normal Epsilon commands to edit your response. For example, Control-A moves to the beginning of the response line. Most commands will work here, as long as the command itself doesn't need to prompt you for more information.

At many prompts, Epsilon will automatically type a default response for you, and highlight it. Editing the response will remove the highlight, while typing a new response will replace the default response. You can set the variable insert-default-response to zero if you don't want Epsilon to type in a response at prompts.

If you type a Control-R or Control-S, Epsilon will type in the default text. This is especially useful if you've told Epsilon not to automatically insert the default response, but it can also come in handy when you've mistakenly deleted or edited the default response, and you want to get it back. It's also convenient at prompts where Epsilon doesn't automatically type the default response, such as search prompts. Epsilon keeps separate defaults for the regular expression and non-regular expression replace commands, and for the regular expression and non-regular expression search commands. Epsilon will never overwrite what you actually type with a default, and indeed will only supply a default if you haven't yet specified any input for the response.

Another way to retrieve a previous response is to type Alt-E. While Ctrl-R and Ctrl-S provide a "suggested response" in many commands, Alt-E always types in exactly what you typed to that prompt last time. For example, at the prompt of the write-file command, Ctrl-S types in the name of the directory associated with the file shown in the current window, while Alt-E types in the last file name you typed at a write-file prompt. See Command History.

Alt-G provides yet another suggested response; it's often the name of the "current thing" for this prompt; in a search-and-replace command, for instance, Alt-G when typing the replacement text inserts the search text. In the write-file example, Alt-G inserts the current name of the file.

Sometimes Epsilon shows you the default in square brackets [ ]. This means that if you just press <Enter> without entering anything, Epsilon will use the value between the square brackets. Often you can use the Ctrl-S or Alt-E keys to pull in that value, perhaps so that you can use regular Epsilon commands to edit the response string.

Epsilon can also retrieve text from the buffer at any prompt. Press the Alt-<Down> key or Alt-Ctrl-N to grab the next word from the buffer and insert it in your response. Press the key again to retrieve successive words. This is handy if there's a file name in the buffer that you now want to edit, for example. The keys Alt-<PageDown> or Alt-Ctrl-V behave similarly, but retrieve from the current position to the end of the line.

You can also use pull completion to retrieve text at a prompt that isn't at the current position, but elsewhere in the buffer. Begin typing the word you want to retrieve; then press Ctrl-<Up> (or Ctrl-<Down>) to grab the previous (or next) word in the buffer that starts with what you've typed. F3 is the same as Ctrl-<Up>. See Pulling Words for details.

Whenever Epsilon asks for the name of something (like the name of a command, file, buffer, or tag), you can save keystrokes by performing completion on what you type. For example, suppose you type Alt-X to invoke a command by name, then type the letter "v". Only one command begins with the letter "v", the visit-file command. Epsilon determines that you mean the visit-file command by examining its list of commands, and fills in the rest of the name. We call this process completion.

To use completion, type a <Space> and Epsilon will fill in as much of the name as possible. The letters Epsilon adds will appear as if you had typed them yourself. You can enter them by typing <Enter>, edit them with normal editing commands, or add more letters. If Epsilon cannot add any letters when you ask for completion, it will pop up a list of items that match what you've typed so far. To disable automatic pop-ups on completion, set the completion-pops-up variable to zero.

For example, four commands begin with the letters "go", goto-beginning, goto-end, goto-line, and goto-tag. If you type "go", and then press <Space>, Epsilon fills in "goto-" and waits for you to type more. Type "b" and another <Space>, to see "goto-beginning". Epsilon moves the cursor one space to the right of the last letter, to indicate a match. Press <Enter> to execute the goto-beginning command.

The <Esc> key works just like the <Space> key, except that if a single match results from the completion, Epsilon takes that as your response. This saves you a keystroke, but you don't have the opportunity to check the name before continuing. The <Tab> key does the same thing. However, inside a dialog under Windows, these two keys perform their usual Windows functions of canceling the dialog, and moving around in the dialog, respectively. They aren't used for completion.

Typing a question mark during completion causes Epsilon to display a list of choices in a pop-up window. Recall that completion works with buffer and file names, as well as with command names. For example, you can get a quick directory listing by giving any file command and typing a question mark when asked for the file name. Press the Ctrl-G key to abort the command, when you've read the listing. (See the dired command in Directory Editing for a more general facility.)

The illustration shows you what Epsilon looks like when you type Alt-X (the named-command command), and then press "?" to see a list of the possible commands. Epsilon shows you all its commands in a pop-up window. Epsilon provides many more commands than could fit in the window, so Epsilon shows you the first window-full. At this point, you could press <Space> or <PgDn> to see the next window-full of commands, or use searching or other Epsilon commands to go to the item you desire. If you want the highlighted item, simply press <Enter> to accept it. If you type Alt-E, Epsilon types in the current item and allows you to edit it. Type any normal character to leave the pop-up window and begin entering a response by hand.

The illustration shows what the screen looks like if you type "w" after the {Alt-X}, then type "?" to see the list of possible completions. Epsilon lists the commands that start with "w".

You can set variables to alter Epsilon's behavior. The menu-width variable contains the width of the pop-up window of matches that Epsilon creates when you press "?". (Unix only. In Windows, drag the dialog's border to change its size.) The search-in-menu variable controls what Epsilon does when you press "?" and then continue typing a response. If it has a value of zero, as it does by default, Epsilon moves from the pop-up window back to the response area, and editing keys like <Left> navigate in the response. If search-in-menu has a nonzero value, Epsilon moves in the pop-up menu of names to the first name that matches what you've typed, and stays in the pop-up window. (If it can't find a match, Epsilon moves back to the prompt as before.)

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. When the pattern the user types doesn't match any files due to such exclusions, Epsilon temporarily removes exclusions and lists matching files again.

Previous   Up    Next
Viewing Lists  General Concepts   Command History

Lugaru Copyright (C) 1984, 2012 Lugaru Software Ltd. All Rights Reserved.