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», без необходимости каждый раз заново искать на чём Вы остановились. Поставьте закладку, и сможете в любой момент перейти на страницу, на которой закончили чтение.

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

Интервал:

Закладка:

Сделать

Scrolling happens automatically if you type any motion command that takes you beyond the limits of the text currently displayed. For example, if you are on the last line of the screen and press C-n, Emacs scrolls forward. Similarly, if you are at the top of the screen and press C-p, Emacs scrolls backward.

You often want to move all the way to the beginning or the end of a file. Type M->or press Endto go to the end of a buffer. To go to the beginning, type M-<or press Home. It may help you to remember that > points to the end of the buffer, and < points to the beginning of the buffer.

There are two more ways to move around that may come in handy. M-x goto-line Enter n Entermoves the cursor to line n of the file. Of course, Emacs starts counting lines from the beginning of the file. Likewise, M-x goto-char Enter n Entergoes to the n th character of the file, counting from the beginning. In both cases, n is a number.

For programmers, these commands are useful because many compilers give error messages like Syntax error on line 356. By using these commands, you can move easily to the location of your error. There are some more sophisticated ways to link Emacs with error reports from compilers and other programs. In addition, several other cursor motion commands are applicable only when you are editing programs (see Chapter 9for details).

2.1.3 Repeating Commands

Now let's learn some efficiency tricks. Emacs lets you repeat any command as many times as you want to. First, you can repeat a command any number of times by pressing M- n before the command, where n is the number of times you want to repeat it. This command is called the digit-argumentcommand.

You can give M- n a large argument if you want it to repeat the command many times. For example, let's say you are editing a large file of 1000 lines. If you typed M-500 C-n, the cursor would move down 500 lines, to the halfway point in the file. If you give M- n a larger argument than it can execute, it repeats the command as many times as possible and then stops.

There's another multiplier command you can use, too: C-u(the universal-argumentcommand). You can give C-uan argument just like you do M- n . Typing either M-5or C-u 5repeats the command that follows five times. But unlike M- n , C-udoesn't need an argument to repeat commands. With no argument, C-uexecutes the next command four times. If you type C-u C-u, it executes the command 16 times. In this way, you can stack up C-u's to make commands execute many times: 16, 64, 256, and so on. [11]

2.1.4 Centering the Display

C-l, the recentercommand, puts the current line in the center of the window vertically. This feature is useful if you're typing at the bottom or the top of the display. Typing C-lquickly moves the material that you care about to the middle of the display, where it is easier to see the full context.

C-lalso redraws the display, if for any reason it appears obscured or contains random characters. This doesn't happen as often as it used to when we used terminals, but it can be a handy thing to know about, especially if you find yourself using Emacs remotely in a terminal interface.

Table 2-2lists cursor movement commands. If the command is mnemonic, the word to remember is given in italics .

Table 2-2. Cursor movement commands

Keystrokes Command name Action
C-f forward-char Move forward one character (right).
C-b backward-char Move backward one character (left).
C-p previous-line Move to previous line (up).
C-n next-line Move to next line (down).
M-f forward-word Move one word forward .
M-b backward-word Move one word backward .
C-a beginning-of-line Move to beginning of line.
C-e end-of-line Move to end of line.
M-e forward-sentence Move forward one sentence.
M-a backward-sentence Move backward one sentence.
M-} forward-paragraph Move forward one paragraph.
M-{ backward-paragraph Move backward one paragraph.
C-v scroll-up Move forward one screen.
M-v scroll-down Move backward one screen.
C-x ] forward-page Move forward one page.
C-x [ backward-page Move backward one page.
M-< beginning-of-buffer Move to beginning of file.
M-> end-of-buffer Move to end of file.
( none ) goto-line Go to line n of file.
( none ) goto-char Go to character n of file.
C-l recenter Redraw screen with current line in the center.
M- n digit-argument Repeat the next command n times.
C-u n universal-argument Repeat the next command n times (four times if you omit n ).

2.1.5 Emacs Commands and Your Keyboard

You can access many Emacs commands by pressing standard keys on your keyboard, such as PageDown(to scroll down one screen) or Home(to go to the beginning of a buffer). Figure 2-4shows a sample keyboard layout and what the keys do. Your keys may be in a slightly different place, but if you have a key with the same or a similar name, it should work. We say "should" because there are situations in which the keys won't work—for example, if you use Emacs on a remote machine. We recommend that you also learn the standard Emacs commands; they work on any keyboard, and they are often easier to reach once you learn them.

Figure 2-4. Emacs commands and your keyboard

2.2 Deleting Text

Before you start practicing deletion commands, you might want to know the undo command, which is discussed fully later in this chapter. Typing C-_or C-x uundoes your last edit; typing undoagain undoes the edit before that one, and so on.

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

Интервал:

Закладка:

Сделать

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

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


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

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

x