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

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

Интервал:

Закладка:

Сделать

Emacs creates two vertical windows.

When you create multiple vertical windows, Emacs usually doesn't have enough room to display a full line of text. Because vertical windows don't usually show full lines of text, a right arrow (on graphical implementations) or a dollar sign (on terminal-based implementations) at the end of a line tells you the line is continued.

To see the rest of the line, you need to know how to scroll text to the left and right. To push the text currently being displayed to the left (so you can see what's on the right), type C-x <. Left arrows or dollar signs are displayed on the left side of the window to indicate that there is more text to the left. To push the text being displayed to the right (so you can see what's on the left), type C-x >. You can use these commands whenever one of your lines is too wide, which can happen with or without windows.

4.6.2 Navigating Windows

How do you move between windows? As we mentioned earlier, C-x omoves you to the "next" window. But how does Emacs determine what that is?

The best way to express it is to say that Emacs moves through the windows in natural reading order, from left to right, then down, and again from left to right. In Figure 4-4, buffer names are numbered to show you how Emacs moves from one window to the next.

Figure 4-4. Moving between windows (Mac OS X)

Alternatively, you can simply select the window you want using the mouse.

4.6.3 Enlarging and Shrinking Windows

Emacs always splits windows into two equal parts. Such a split is often good enough, but sometimes it's not, particularly if you become a window aficionado. When you have four or five or six windows on your screen at once, controlling each window's size becomes important. Otherwise, the windows you are most interested in will eventually become too small, and useful editing is almost impossible when you can see only five or six lines from a file. If you want to make the window you're working on taller, type C-x ^. Emacs lengthens the current window and makes the one below it smaller, accordingly. To make the current window wider, type C-x }. Emacs makes this window wider, at the expense of the one to the right of it.

To make windows smaller, you can shrink them. To shrink a window vertically, type M-x shrink-window. Emacs shrinks the current window by one line and the other windows on the screen grow accordingly. To shrink a window horizontally, type C-x {. This command makes the window one column narrower and enlarges the other windows on the screen horizontally.

Usually you want to work in larger increments than one line or one column at a time, however. When you type C-upreceding any of these commands, the command works in increments of four lines or columns at a time. For example, with two horizontal windows on the screen, let's use C-u C-x ^to enlarge the jameswindow.

Type: C-u C-x ^

Emacs makes the current window larger As you would expect when you make the - фото 70

Emacs makes the current window larger.

As you would expect, when you make the window larger, it automatically fills with more text from the buffer. There are shortcuts to sizing windows as well. If you have a very small buffer—for example, a one-line buffer containing the vocabulary-building word for the day and its definition—you can shrink the window to the size of the buffer by typing C-x -(for shrink-window-if-larger-than-buffer). If the buffer is larger than the window, this command does nothing. Typing C-x +(for balance-windows) creates windows of equal size again. (This latter command is also useful if you have an odd number of windows; C-x +divides the display equally among them.)

4.6.4 Limits on Window Size

Windows in Emacs can be as big as your screen. There's a limit to how small windows can be, however, and this limit is specified by the variables window-min-height(whose default is four lines) and window-min-width(whose default is ten characters). If you enlarge other windows to the point that their counterparts become less than ten characters wide or four lines high, Emacs deletes the smaller windows. You can set these variables to other values if you want to; more information on setting variables is found in Chapter 10.

4.6.5 Comparing Files Between Windows

Especially if you're looking for minute differences between large files, the compare-windowscommand comes in handy. To use compare-windows, you must first have the buffers you want to compare in two windows, either side by side or horizontally. Go to the beginning of each buffer, then type M-x compare-windows. Emacs scrolls each buffer to the place where the discrepancy is. It places the point in each buffer at the place of the discrepancy, so using C-x oto move the cursor between buffers will show you exactly where the files differ. [24]

Of course, this maneuver finds only the first difference between the two buffers. Finding the second, third, and so on, is a bit tricky. The compare-windowscommand works only if the point in both buffers is in exactly the same place. Therefore, you need to move past the discrepancy in both buffers before you can type M-x compare-windowsagain. The Unix diffcommand provides a more comprehensive (although somewhat awkward looking) way to find the differences between two files. Emacs also provides an interface to Ediff, with options on the Compare menu (a submenu of the Tools menu). Ediff is far more comprehensive; see Chapter 12for details.

Table 4-4summarizes the window commands discussed in this chapter.

Table 4-4. Window commands

Keystrokes Command name Action
C-x 2 FileSplit Window split-window-vertically Divide current window into two windows, one above the other.
C-x 3 split-window-horizontally Divide current window into two side-by-side windows.
C-x > scroll-right Scroll the window right.
C-x < scroll-left Scroll the window left.
C-x o other-window Move to the other window; if there are several, move to the next window (see "Navigating Windows").
C-x 0 delete-window Delete the current window.
C-x 1 FileUnsplit Windows delete-other-windows Delete all windows but this one.
( none ) delete-windows-on Delete all windows on a given buffer.
C-x ^ enlarge-window Make window taller.
( none ) shrink-window Make window shorter.
C-x } enlarge-window-horizontally Make window wider.
C-x { shrink-window-horizontally Make window narrower.
C-x - shrink-window-if-larger-than-buffer Make window smaller if buffer is smaller than window.
C-x + balance-windows Make windows the same size.
C-M-v scroll-other-window Scroll other window.
C-x 4 f find-file-other-window Find a file in the other window.
C-x 4 b switch-to-buffer-other-window Select a buffer in the other window.
( none ) ToolsCompare (Ediff)This Window and Next Window compare-windows Compare this window with the next window and show the first difference.

4.7 Holding Your Place with Bookmarks

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

Интервал:

Закладка:

Сделать

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

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


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

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

x