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

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

Интервал:

Закладка:

Сделать

2. Save the .emacs file and reenter Emacs. Abbrevappears on the mode line. You may get an error message saying Emacs can't load your abbrev file (understandable if you haven't created the file yet). Ignore this error message; it won't happen again.

3. Type an abbreviation and type C-x a i gor C-x a -following the abbreviation. These commands create a global abbreviation; if you want to create a local abbreviation instead, type C-x a i l. Emacs asks you for the expansion.

4. Type the definition for the abbreviation and press Enter. Emacs expands the abbreviation and will do so each time you type it followed by a space or punctuation mark. You can define as many abbreviations as you want to by repeating Steps 3 and 4.

5. Type C-x C-cto exit Emacs. Emacs asks if you want to save the abbreviations in .abbrev_defs .

6. Type yto save your abbreviations.

After you define some abbreviations and save them, Emacs loads the abbreviations file automatically. When you define word abbreviations in subsequent sessions, Emacs asks again whether you want to save the abbreviations file. Respond with a yto save the new abbreviations you've defined and have them take effect automatically.

3.4.2.3 Deleting a word abbreviation

If you use word abbreviations frequently, you may define an abbreviation and later change your mind. You can edit the word abbreviation list by typing M-x edit-abbrevs Enter. You can see (but not edit) the list by typing M-x list-abbrevs Enter.

After the list is displayed, use C-k(or any other editing commands) to delete the abbreviations you don't want to use. Because Emacs itself formats this list, don't try to edit lines or add new lines; deleting is about the only operation that's safe. Here's how the abbreviations look when you edit word abbreviations. The file is divided into different sections based on whether the abbreviations are global or local to a particular mode:

(text-mode-abbrev-table)

(lisp-mode-abbrev-table)

(fundamental-mode-abbrev-table)

(global-abbrev-table)

"iwthout" 1 "without"

"prhase" 1 "phrase"

"teh" 1 "the"

"fo" 1 "of"

"eamcs" 2 "Emacs"

"wrok" 1 "work"

"aslo" 1 "also"

"sotred" 1 "stored"

"inforamtion" 1 "information"

"esc" 6 "Esc"

"taht" 1 "that"

"chatper" 1 "chapter"

"adn" 1 "and"

"iwth" 1 "with"

"chpater" 1 "chapter"

"loaction" 1 "location"

"recieve" 1 "receive"

"wart" 1 "World Association for Replicant Technology"

The file is divided into sections by mode. We defined global abbreviations in this case; any abbreviations Flyspell (described earlier in this chapter) creates are local abbreviations and would be listed under the mode in which they were defined.

In this buffer, the first column lists the abbreviations (in this case, mostly misspellings). The second column is for internal record keeping; you don't need to concern yourself with it. The third column provides the definitions of the abbreviations, the word or phrase that Emacs substitutes whenever it sees the abbreviation.

To delete any abbreviation, delete the line for that abbreviation and save the file by typing M-x write-abbrev-file. You can move back to the buffer you were editing before by typing C-x b(a command for working with multiple buffers, discussed in Chapter 4).

3.4.2.4 Disabling word abbreviations

You can get rid of word abbreviations completely in one of two ways. First, you can type M-x kill-all-abbrevs Enter. This command disables word abbreviations for the current session.

Second, you can delete the file the abbreviations are in. If you made word abbreviations part of your startup, delete the read-abbrev-fileline from your .emacs file.

3.4.2.5 Abbreviations and capitalization

Usually, Emacs capitalizes abbreviations exactly the way you want. If you run into special situations with abbreviations and capitalization, however, you may wantl to know what's going on behind the scenes. Here are the rules:

• If the abbreviation's definition contains any uppercase letters, Emacs always inserts the definition without changing anything. For example, if you define ora as an abbreviation for O'Reilly Media , O'Reilly will always be capitalized exactly as shown.

• If the abbreviation's definition is all lowercase, Emacs capitalizes according to the following rules:

- If you type all of the letters of the abbreviation in lowercase, Emacs inserts the definition in lowercase.

- If you type any of the letters of the abbreviation in uppercase, Emacs capitalizes the first letter of the first word.

- If you type all of the letters of the abbreviation in uppercase, Emacs capitalizes the first letter of every word, unless the variable abbrev-all-capsis set to t; in this case, it capitalizes all letters.

Table 3-7shows some examples.

Table 3-7. Word abbreviation capitalization

Abbreviation Definition You type: Expands to: Because:
lc lamb chop lc lamb chop lc is lowercase, so lamb chop is lowercase.
lc lamb chop Lc Lamb chop There's one capital in Lc , so Lamb is capitalized.
lc lamb chop lC Lamb chop There's one capital in lC , so Lamb is capitalized.
lc lamb chop LC Lamb Chop LC is all capitals, so both words are capitalized.
lc Lamb Chop lc Lamb Chop Capitals in the definition are always unchanged.
lc Lamb Chop LC Lamb Chop Capitals in the definition are always unchanged.

You don't need to remember the rules, but looking them over may help you out if you can't understand how Emacs is capitalizing. In our experience, defining abbreviations in lowercase circumvents most capitalization problems.

Table 3-8summarizes word abbreviation commands.

Table 3-8. Word abbreviation commands

Keystrokes Command name Action
M-/ dabbrev-expand Complete this word based on the nearest word that starts with this string (press M-/again if that's not the word you want).
( none ) abbrev-mode Enter (or exit) word abbreviation mode.
C-x a - or C-x a i g inverse-add-global-abbrev After typing the global abbreviation, type the definition.
C-x a i l inverse-add-mode-abbrev After typing the local abbreviation, type the definition.
( none ) unexpand-abbrev Undo the last word abbreviation.
( none ) write-abbrev-file Write the word abbreviation file.
( none ) edit-abbrevs Edit the word abbreviations.
( none ) list-abbrevs View the word abbreviations.
( none ) kill-all-abbrevs Kill abbreviations for this session.

3.4.3 Problems You May Encounter

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

Интервал:

Закладка:

Сделать

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

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


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

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

x