05.01.2013 Views

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

Mac OS X Leopard - ARCAism

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.

Keystroke Effect<br />

Saving and Quitting<br />

C-x C-w filename Save file as filename<br />

C-x C-s Save file under current file name (will prompt to confirm overwrite of<br />

existing file)<br />

C-x C-c Quit Emacs (will prompt to confirm if current document has changed)<br />

Other Commands<br />

C-x C-f filename Open existing or new file in current buffer<br />

C-h t Start a built-in Emacs tutorial<br />

C-x u Undo<br />

Nano<br />

Nano is another handy command-line text editor in <strong>Leopard</strong>. What makes Nano special is that,<br />

compared to the others, Nano is relatively easy to figure out and use (the trade-off is that it lacks<br />

some of the more advanced (esoteric) features of Vim or Emacs, and while it’s installed by default<br />

with <strong>Mac</strong> <strong>OS</strong> X (since Tiger), it’s not as pervasive as Vim or Emacs.<br />

NOTE Nano is a clone of the Pico text editor, which is part of the fabulous command-line mail<br />

reader Pine. If you’ve used Pine in the past (or still do), you will find Nano immediately understandable.<br />

As an additional bonus, while many UNIX and Linux systems may not have Nano<br />

installed, it’s just possible that they do have Pine installed, which will mean you may find Pico<br />

available where Nano isn’t. Before Tiger, <strong>OS</strong> X included Pico, and today the pico command is<br />

still there, it’s just aliased to nano.<br />

One advantage of Nano is that the most common commands along with the keystrokes to<br />

invoke them are listed at the bottom of the screen (and the ones that aren’t listed are easily<br />

looked up with the short yet concise built-in help). While the keystrokes may seem similar to<br />

Emacs in practice, the actual keys are different. Also, the common shorthand is different—while<br />

in Emacs, Ctrl+X is represented as C-x, in Nano, it’s represented ^x (the ^ [carat] symbol means<br />

Ctrl).<br />

Opening files in Nano is the same as opening them in Vi or Emacs. Just type nano filename<br />

at the cursor, and it will open up. Once again opening our soliloquy, we would see the following:<br />

GNU nano 1.2.4 File: Documents/Shakespeare/macbeth/soliloquy4<br />

Tomorrow, and tomorrow, and tomorrow,<br />

Creeps in this petty pace from day to day<br />

To the last syllable of recorded time,<br />

And all our yesterdays have lighted fools<br />

The way to dusty death. Out, out, brief candle!<br />

Life's but a walking shadow, a poor player<br />

That struts and frets his hour upon the stage<br />

And then is heard no more: it is a tale<br />

CHAPTER 18 INTRODUCING DARWIN AND THE SHELL 319

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

Saved successfully!

Ooh no, something went wrong!