01.09.2014 Views

The Linux Development Platform Configuring, Using, and ... - Classes

The Linux Development Platform Configuring, Using, and ... - Classes

The Linux Development Platform Configuring, Using, and ... - Classes

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CH02.fm Page 22 Monday, October 7, 2002 8:09 PM<br />

22 Chapter 2 • Working With Editors<br />

File Operations<br />

Editing within Emacs is done through a series of buffers. Each buffer may be edited separately<br />

<strong>and</strong> the changes saved back to the disk. Files may also be opened into new or existing<br />

buffers as shown in Table 2-4.<br />

Table 2-4 File Comm<strong>and</strong>s<br />

Action<br />

^X ^F<br />

^X k<br />

^X i<br />

^X ^S<br />

^X w<br />

^X b<br />

Comm<strong>and</strong><br />

Open File<br />

Close File<br />

Insert File<br />

Save File<br />

Save File As<br />

Change Buffer<br />

Search <strong>and</strong> Replace<br />

<strong>The</strong>re are two search <strong>and</strong> replace functions within Emacs. <strong>The</strong> first one simply does a simple<br />

search (case insensitive by default) for the character string provided by the user. <strong>The</strong> second,<br />

more complex search function does a search <strong>and</strong> replace on regular expressions. See Table 2-5<br />

for a list of these comm<strong>and</strong>s.<br />

Table 2-5 Search <strong>and</strong> Replace Comm<strong>and</strong>s<br />

Action<br />

Comm<strong>and</strong><br />

^S ENTER<br />

^S<br />

^R ENTER<br />

^R<br />

M-%<br />

M-X query-replace-regexp<br />

M-X occur<br />

Search<br />

Continue Forward Search<br />

Search Backwards<br />

Continue Backwards Search<br />

Search & Replace<br />

Regular Expression (regex) Search & Replace<br />

Find occurrences of a string in the current buffer

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!