Emacs Text Editor: Quick Reference

This FAQ will help refresh the memory of a user who has already had some experience with emacs.

Emacs is set up to insert text or accept commands at all times. Emacs uses <ctrl>, <alt>, and <esc> keys to distinguish text from commands. By default, it also comes up in its own window. The fonts and colors of this window can be changed with command line options or with defaults set in a $HOME/.Xdefaults file. For more information on emacs consult the man pages with man emacs or by using <ctrl> h or <esc> ? within emacs itself.

To invoke emacs type:

emacs filename &

To invoke emacs in an already existing xterm:

emacs -nw filename

cursor positioning

	<esc><		top of the file
<esc>> bottom of the file
<ctrl>v forward screen
<esc>v backward screen
<ctrl>n next line
<ctrl>p previous line
<ctrl>f forward character
<ctrl>b backward character
<esc>f forward word
<esc>b backward word
<ctrl>e end of line
<ctrl>a beginning of line
arrow keys replaces <ctrl> n,p,f,b

changing and copying text

	<backspace>	delete character before cursor
<delete> delete character before cursor
<ctrl>d delete character under cursor
<esc><delete> delete word before cursor
<esc> delete word after cursor
<ctrl>k delete from cursor to end of current line
<ctrl>y puts back text deleted from last series of
<ctrl>k commands used for copying

undoing changes and repeating commands

	<ctrl>g		disregard an unfinished command
<ctrl>x undo previous change (can be repeated)
<esc>#command repeats a command, # of times


	<ctrl>s		searches forward in file for a string
<ctrl>r searches backward in file for a string

saving text and exiting emacs

	<ctrl>x<ctrl>f	find file to load into emacs
<ctrl>x<ctrl>s save to disk and remain in emacs
<ctrl>x<ctrl>w write to disk and change name
<ctrl>x<ctrl>c exit emacs


	<ctrl>h		enter help facility
? list different help facilities
t interactive tutorial
c describe command character or sequence
k complete documentation on commands: a list of all
commands containing keyword.

Last modified: 2007/10/24 13:46:46.454000 GMT-4 by
Created: 2007/10/24 13:46:46.454000 GMT-4 by brian.r.brinegar.1.



Type in a few keywords describing what information you are looking for in the text box below.

Admin Options: Edit this Document