Debra Cameron - Learning GNU Emacs, 3rd Edition

Здесь есть возможность читать онлайн «Debra Cameron - Learning GNU Emacs, 3rd Edition» весь текст электронной книги совершенно бесплатно (целиком полную версию без сокращений). В некоторых случаях можно слушать аудио, скачать через торрент в формате fb2 и присутствует краткое содержание. Год выпуска: 2004, ISBN: 2004, Издательство: O'Reilly Media, Жанр: Программы, Программирование, на английском языке. Описание произведения, (предисловие) а так же отзывы посетителей доступны на портале библиотеки ЛибКат.

Learning GNU Emacs, 3rd Edition: краткое содержание, описание и аннотация

Предлагаем к чтению аннотацию, описание, краткое содержание или предисловие (зависит от того, что написал сам автор книги «Learning GNU Emacs, 3rd Edition»). Если вы не нашли необходимую информацию о книге — напишите в комментариях, мы постараемся отыскать её.

GNU Emacs is the most popular and widespread of the Emacs family of editors. It is also the most powerful and flexible. Unlike all other text editors, GNU Emacs is a complete working environment—you can stay within Emacs all day without leaving.
, 3rd Edition tells readers how to get started with the GNU Emacs editor. It is a thorough guide that will also "grow" with you: as you become more proficient, this book will help you learn how to use Emacs more effectively. It takes you from basic Emacs usage (simple text editing) to moderately complicated customization and programming.The third edition of
describes Emacs 21.3 from the ground up, including new user interface features such as an icon-based toolbar and an interactive interface to Emacs customization. A new chapter details how to install and run Emacs on Mac OS X, Windows, and Linux, including tips for using Emacs effectively on those platforms.
, third edition, covers:
• How to edit files with Emacs
• Using the operating system shell through Emacs
• How to use multiple buffers, windows, and frames
• Customizing Emacs interactively and through startup files
• Writing macros to circumvent repetitious tasks
• Emacs as a programming environment for Java, C++, and Perl, among others
• Using Emacs as an integrated development environment (IDE)
• Integrating Emacs with CVS, Subversion and other change control systems for projects with multiple developers
• Writing HTML, XHTML, and XML with Emacs
• The basics of Emacs Lisp
The book is aimed at new Emacs users, whether or not they are programmers. Also useful for readers switching from other Emacs implementations to GNU Emacs.

Learning GNU Emacs, 3rd Edition — читать онлайн бесплатно полную книгу (весь текст) целиком

Ниже представлен текст книги, разбитый по страницам. Система сохранения места последней прочитанной страницы, позволяет с удобством читать онлайн бесплатно книгу «Learning GNU Emacs, 3rd Edition», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

The authors of Emacs try to bind the most frequently used commands to the key sequences that are the easiest to reach. Here are the varieties of key sequences you'll encounter:

• The most commonly used commands (such as cursor movement commands) are bound to C- n (where n is any character). To press C- n , press and hold the Ctrlkey and press n , then release both keys.

• Slightly less commonly used commands are bound to M- n . To press M- n , press and hold the Metakey (usually next to the space bar), then press n .

• Other commonly used commands are bound to C-x something ( C-xfollowed by something else—one or more characters or another control sequence). Among other types of commands, file manipulation commands, like the ones you are about to learn, are generally bound to C-x something .

• Some specialized commands are bound to C-c something . These commands often relate to one of the more specialized modes, such as Java mode or HTML mode. You won't encounter them until later in this book.

• This list still doesn't take care of all the possibilities. You can get at the remaining commands by typing M-x long-command-name Enter. (This works for any command really, but the keystrokes are usually easier to learn.)

You can define your own key bindings, too, and you should do so if you find yourself using the long form of a command all the time. More on this topic in Chapter 10.

You can also access common commands through menus, but for maximum productivity, we recommend you learn the keystrokes, often given in parentheses following the menu option.

1.7 Opening a File

You can open a file by specifying the filename when you start Emacs from the command line or by typing C-x C-f(the long command name is find-file).

The paper icon on the toolbar also runs this command. In some applications, a similar icon simply creates a new, unnamed file (e.g., Document1 in Word). Emacs expects you to provide a filename, as we'll see in a moment.

Press: C-x C-f

Emacs prompts you for a filename To press Cx Cf hold down Ctrl press xand - фото 19

Emacs prompts you for a filename.

To press C-x C-f, hold down Ctrl, press xand then press f. Now release Ctrl.

After you press C-x C-f, Emacs uses the minibuffer to ask you for the filename. Whenever Emacs wants input from you, it puts the cursor in the minibuffer. When you're done typing in the minibuffer, press Enter.

Type: newfile Enter

Emacs starts another buffer with the new file in it What if you try to read - фото 20

Emacs starts another buffer with the new file in it.

What if you try to read the same file twice? Instead of creating a new buffer, Emacs just moves you to the buffer the file is in.

You can also open a file in Emacs by dragging and dropping it on an Emacs window or on the Emacs icon.

Now is a good time to try typing if you haven't already done so. You may find yourself wanting to learn more about cursor movement and editing; that's fine. Feel free to skim the rest of this chapter and go on to Chapter 2. We recommend that you read the sections on saving files and exiting Emacs. There's also a table of commands at the end of this chapter for future reference. If you'd like to learn more about working with files as well as some shortcuts, stay with us through the rest of the chapter.

1.7.1 If You Read the Wrong File

If you happen to read the wrong file, an easy way to get the right file is by typing C-x C-v(for find-alternate-file). This command means "Read a different file instead of the one I just read." After typing C-x C-v, Emacs puts the name of the current file in the minibuffer; you can then correct a typo or the path, the most common reasons for finding the wrong file. Make the correction and press Enter. Emacs replaces the buffer's contents with the alternate file.

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 Cx Cf Emacs prompts you for the filename type the first few letters - фото 21

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 - фото 22

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 - фото 23

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 Tabagain. Or you can select one of the alternatives with the mouse or by pressing PgUpto 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 Chapter 14. The Help System Emacs has the most comprehensive help facility of any text editor—and one of the best such facilities of any program at all. In fact, the Emacs help facilities probably cut down the time it took for us to write this book by an order of magnitude, and they can help you immeasurably in your ongoing quest to learn more about Emacs. In this chapter, we describe Emacs help in the following areas: • The tutorial. • The help key ( C-h ) and Help menu, which allow you to get help on a wide variety of topics. • The help facilities of complex commands like query-replace and dired . • Navigating Emacs manuals and using the info documentation reader. • Completion , in which Emacs helps you finish typing names of functions, variables, filenames, and more. Completion not only saves you time and helps you complete names of functions you know about but can help you discover new commands and variables. provides more details on the glories of completion.

1.7.3 Inserting and Appending Files

If you want to insert one file into another, you simply move to the appropriate location in the file and type C-x i. (Yes, we know, we haven't told you how to move around in a file yet. Use the arrow keys for now and we'll teach you the "real" Emacs cursor movement commands in Chapter 2.) To append a file, move to the end of the file ( M->) and type C-x i. As with C-x C-f, Emacs prompts you for the filename in the minibuffer.

Читать дальше
Тёмная тема
Сбросить

Интервал:

Закладка:

Сделать

Похожие книги на «Learning GNU Emacs, 3rd Edition»

Представляем Вашему вниманию похожие книги на «Learning GNU Emacs, 3rd Edition» списком для выбора. Мы отобрали схожую по названию и смыслу литературу в надежде предоставить читателям больше вариантов отыскать новые, интересные, ещё непрочитанные произведения.


Отзывы о книге «Learning GNU Emacs, 3rd Edition»

Обсуждение, отзывы о книге «Learning GNU Emacs, 3rd Edition» и просто собственные мнения читателей. Оставьте ваши комментарии, напишите, что Вы думаете о произведении, его смысле или главных героях. Укажите что конкретно понравилось, а что нет, и почему Вы так считаете.

x