Книга: Learning GNU Emacs, 3rd Edition

1.7.2 Letting Emacs Fill in the Blanks

1.7.2 Letting Emacs Fill in the Blanks

Emacs has a very helpful feature known as completion. If you want an existing file, you need only type the first few letters of the name, enough to uniquely identify the filename. Press Tab, and Emacs completes the filename for you. For example, suppose you are trying to find a file called dickens.

Type: C-x C-f di


After C-x C-f, Emacs prompts you for the filename; type the first few letters.

Press: Tab


When you press Tab, Emacs fills in the rest of the filename.

Press: Enter


Emacs reads the file dickens.

If more than one file starts with di, Emacs displays a window with various files that start with that string. You select one by typing a few more characters (enough to identify your file as unique) and pressing Tab again. Or you can select one of the alternatives with the mouse or by pressing PgUp to move to the completions window, moving to the desired option, then pressing Enter.

Completion also works for long command names. It's a wonderful Emacs feature that can save you time—and show you some commands you might not know existed in the process. Chapter 14 provides more details on the glories of completion.

Оглавление книги


Генерация: 0.069. Запросов К БД/Cache: 0 / 0
поделиться
Вверх Вниз