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

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

Интервал:

Закладка:

Сделать

Therefore, to do justice to picture mode, we have to revisit most of the basic editing concepts. Please bear with us, or skip this section if you aren't interested in pictures. Let's start at the beginning: basic cursor motion.

7.6.2.1 Cursor motion in picture mode

Picture mode makes some small but important changes in the basic cursor commands. There's an easy way to summarize these changes: in picture mode the buffer becomes a grid of rows and columns. For example, consider what C-fdoes in most other modes: it moves forward through the file, one character at a time. Typing C-frepeatedly moves the cursor to the left, then at the end of the line, it jumps to the first character on the next line. picture mode, C-fmeans "move to the right." When you reach the end of the line in picture mode, C-fdoesn't wrap to the next line; it continues adding characters to the current line.

C-pand C-nbecome vertical "up" and "down" commands, respectively. Try editing some sample text, moving to the end of a line, and typing C-p. Normally, as you type C-p, the cursor stays at the end of the line; if the previous line is short, the cursor moves to the left when it goes up. In picture mode, C-pand C-nalways move up (or down) in a straight line.

You can get to every place you need to go with C-f, C-b, C-p, and C-n. The arrow keys work too, but you may want to know the cursor movement commands for moving in the default direction as well, so you can also go sideways when it's faster. C-c C-fmoves you forward in the default direction (so "forward" here could mean to the left, right, up, or down, as well as all directions in between). C-c C-bmoves you backward in the default direction. (Moving "up" or "down" relative to the default direction isn't defined.)

For example, let's say you had drawn the house shown in Figure 7-1and you wanted to move the cursor down the left side of the roof. You would set the default direction to "southwest" by typing C-c /. If the cursor were on the top shingle on the left side of the roof, typing C-c C-fwould move you down the left side of the roof and typing C-fwould move you to the top-right shingle, as shown in Figure 7-5.

Figure 7-5. Using the default direction versus typical cursor movement commands

7.6.2.2 Inserting blank lines

As you continue to work in picture mode, you'll find a few more surprises. Pressing Enterin picture mode moves you to the beginning of the next line, without inserting a blank line—on the assumption that you probably don't want to change the relationship between lines. If you want to insert a new line, type C-o; an empty line appears beneath the current line, and the cursor does not move. For example, the cursor is initially on the 0 in the first line. If we want to open another line between the two, we type C-o.

Initial state:

Initial text the cursor is on the 0 in the first line Type Co Coopens - фото 154

Initial text; the cursor is on the 0 in the first line.

Type: C-o

Coopens a new line but doesnt move the cursor One of the more difficult - фото 155

C-oopens a new line but doesn't move the cursor.

One of the more difficult things to do in picture mode is to type a standard carriage return that breaks a line in the middle. You can move to a point in the middle of a line, type C-kto kill the right-hand portion, type C-oto insert a blank line; type Enterto move to the beginning of this blank line, and type C-yto yank the right-hand part of the line back. Or you can use the split-linecommand ( C-M-o), and then delete the blank space at the beginning of the new line.

Deletion isn't quite the same, either. In picture mode C-c C-dis the delete character command that you're used to: it deletes the character under the cursor and moves the rest of the line to the left. An unadorned C-ddeletes the character under the cursor, replacing it with a space. Deldeletes the character to the left of the cursor, replacing it with a space.

Table 7-6contrasts the picture mode commands with their normal text mode behavior.

Table 7-6. Picture mode v. text mode

Keystrokes In text mode In picture mode Picture mode alternative
Enter Insert a blank line. Move the cursor to the beginning of the next line. C-oinserts blank lines.
C-d Delete the character and move the text to left. Replace the character with Spaceand don't move. C-c C-dis like C-din text mode.
Space Move the text to the right and insert a space. Move the cursor to the right and delete any character you space over. None; go back to text mode to insert blank spaces.
C-k Erase the text on the current line; pressing C-ktwice deletes a line. Erase the text on the current line; it doesn't delete the line. To delete a line, go back to text mode or use delete-rectangle.
Tab Insert tabs and move the remaining text to the right. Move the cursor across the screen but don't affect the underlying text. To insert a tab's worth of space, go back to text mode.
C-n Move to the next line. Move down, staying in the same column. ( none )
C-p Move to the previous line. Move up, staying in the same column. ( none )
C-f Move one character forward in the file. Move one character to the right. ( none )
C-b Move one character backward in the file. Move one character to the left; stop at the beginning of the line. ( none )

If you want to insert a block of blank space, you can use a rectangle command such as open-rectangle. See the discussion of this command earlier in this chapter for more information. Also, if you want to insert blank space at the end of a line, you can use C-f.

To perform some tasks, you may find it easier to switch back temporarily to the mode you're used to. C-c C-cmoves you back to the mode you were in before you entered picture mode. Make any necessary changes, then enter picture mode again by typing M-x picture-mode.

If you want to move something you've drawn, the easiest way is to use rectangles, as described earlier in this chapter.

Tabs are also different in picture mode. By default, picture mode interprets the following characters as tab stops if they appear by themselves on a line: exclamation point (!), hyphen (-) and tilde (~). If these characters appear on a line and the user presses tab on the next line, these characters are presumed to denote tab stops. You can change this behavior by setting the variable picture-tab-charsto other characters. If the characters appear with normal text, they are not interpreted as tab stops. To use these characters as tab stops, press Esc-Tab(for picture-tab-search).

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

Интервал:

Закладка:

Сделать

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

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


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

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

x