Unix Text Editors: vs. Battle To The Death Coming Soon On Pay-Per-View
Unix Text Editors: vs. Battle To The Death Coming Soon On Pay-Per-View
vs. vi
There is a status line (bottom of screen) that
tells you what mode/command you are in.
Saving and Exiting
ZZ save if changes were made, and quit.
:wq Write file and quit
:w Write file
:w file Write to file named file
:q Quit
:q! Really quit (discard edits)
Searching Commands
/text search forward for text
?text search backward for text
n repeat previous search
N repeat search in opposite direction
Other Stuff
Copying and Yanking (Paste)
Remembering positions
Switching files
Repeating commands
Display line numbers
Run Unix commands (for example: emacs)
emacs is every bit as cryptic as vi!
emacs allows you to customize it with new
commands and keyboard shortcuts.
The emacs commands are written in elisp (a
dialect of Lisp), so you need to understand elisp
to do serious customization.
Emacs online help
Emacs has a built-in help system.
Press ^h (Ctrl-h) to get to the help system.
Now Press ? For a list of options
Press "t" for a tutorial!
Emacs meta key
Many emacs commands are invoked with
sequence of keystrokes.
Emacs doesn't have modes like vi – you can
always enter text (at the current cursor
position) or commands.
Many commands start with a special
keystroke called the metakey. (others use the
control key).
The ESC key is (usually) the meta key.
Command List Syntax
The book shows a list of tons of emacs
commands. The syntax used to show this list
looks like this: