132 lines
5.0 KiB
Plaintext
132 lines
5.0 KiB
Plaintext
emg keybindings (July 7, 2014)
|
|
Based on Ersatz Emacs (2000/09/14)
|
|
|
|
M- means to use the <ESC> key prior to using another key
|
|
^A means to use the control key at the same time as the 'A' key
|
|
|
|
------------------------------------------------------------------------------
|
|
MOVING THE CURSOR
|
|
|
|
^F Forward character M-F Forward word
|
|
^B Backward character M-B Backward word
|
|
^N Next line M-P Front of paragraph
|
|
^P Previous line M-N End of paragraph
|
|
^A Front of line M-< or [HOME] Start of file
|
|
^E End of line M-> or [END] End of file
|
|
^V or [PgDn] Scroll down M-V or [PgUp] Scroll up
|
|
M-G Go to line Arrow keys are active
|
|
|
|
------------------------------------------------------------------------------
|
|
DELETING & INSERTING
|
|
|
|
<- Delete previous character M-<- Delete previous word
|
|
^D Delete next character M-D Delete next word
|
|
^K Delete to end of line ^O Insert line
|
|
|
|
------------------------------------------------------------------------------
|
|
FORMATTING & TRANSPOSING
|
|
|
|
^Q Quote next key, so that control codes may be entered into text. (or ^X Q)
|
|
|
|
------------------------------------------------------------------------------
|
|
SEARCHING
|
|
|
|
^S Search forward from cursor position. Type in a string and end it with
|
|
ENTER. Either case matches. (or M-S)
|
|
^R As above, but reverse search from cursor position.
|
|
|
|
------------------------------------------------------------------------------
|
|
COPYING AND MOVING
|
|
|
|
M-. Set mark at current position.
|
|
^W Delete region.
|
|
M-W Copy region to kill buffer.
|
|
^Y Yank back kill buffer at cursor.
|
|
|
|
A region is defined as the area between this mark and the current cursor
|
|
position. The kill buffer is the text which has been most recently deleted or
|
|
copied.
|
|
|
|
Generally, the procedure for copying or moving text is:
|
|
1) Mark out region using M-. at the beginning and move the cursor to
|
|
the end.
|
|
2) Delete it (with ^W) or copy it (with M-W) into the kill buffer.
|
|
3) Move the cursor to the desired location and yank it back (with ^Y).
|
|
|
|
------------------------------------------------------------------------------
|
|
MULTIPLE BUFFERS
|
|
|
|
A buffer contains a COPY of a document being edited, and must be saved for
|
|
changes to be kept. Many buffers may be activated at once.
|
|
|
|
^X B Switch to another buffer.
|
|
^X ^B Show buffer directory in a window (^X 1 to remove).
|
|
^X K Delete a non-displayed buffer.
|
|
^X X Switch to next buffer in buffer list.
|
|
^X N Change the filename associated with the buffer.
|
|
M-^N Change the name of the buffer.
|
|
|
|
------------------------------------------------------------------------------
|
|
READING FROM DISK
|
|
|
|
^X^F Find file; read into a new buffer created from filename.
|
|
(This is the usual way to edit a new file.)
|
|
^X^R Read file into current buffer, erasing its previous contents.
|
|
No new buffer will be created.
|
|
^X^I Insert file into current buffer at cursor's location.
|
|
|
|
------------------------------------------------------------------------------
|
|
SAVING TO DISK
|
|
|
|
^X^S Save current buffer to disk, using the buffer's filename as the name of
|
|
the disk file. Any disk file of that name will be overwritten. (or ^X S)
|
|
^X^W Write current buffer to disk. Type in a new filename at the prompt to
|
|
write to; it will also become the current buffer's filename.
|
|
|
|
------------------------------------------------------------------------------
|
|
MULTIPLE WINDOWS
|
|
|
|
Many windows may be visible at once on the screen. Windows may show different
|
|
parts of the same buffer, or each may display a different one.
|
|
|
|
^X 2 Split the current window in two ^X 1 Show only current window
|
|
^X O Move cursor to next window ^X ^ Enlarge current window
|
|
M-^V Scroll other window down M-^Z Scroll other window up
|
|
|
|
------------------------------------------------------------------------------
|
|
EXITING
|
|
|
|
^X^C Exit. Any unsaved files will require confirmation.
|
|
|
|
------------------------------------------------------------------------------
|
|
MACROS
|
|
|
|
^X ( Start recording a keyboard macro. Typing ^G or an error aborts.
|
|
^X ) Stop recording macro.
|
|
^X E Execute macro.
|
|
|
|
------------------------------------------------------------------------------
|
|
REPEAT & NUMBER PREFIX
|
|
|
|
^U<number> or M-<number>
|
|
Number prefix and universal repeat. May be followed by an integer
|
|
(default = 4) and repeats the next command that many times.
|
|
Exceptions follow.
|
|
^U<number>^L
|
|
Reposition the cursor to a particular screen row; i.e., ^U0^L moves the
|
|
cursor and the line it is on to the top of the screen. Negative numbers
|
|
are from the bottom of the screen.
|
|
^U<number>^X F
|
|
Set the right margin to column <number> for paragraph formatting.
|
|
^U<number>^X^
|
|
Enlarge a split window by <number> rows. A negative number shrinks the
|
|
window.
|
|
|
|
------------------------------------------------------------------------------
|
|
SPECIAL KEYS
|
|
|
|
^G Cancel current command.
|
|
^L Redraws the screen completely.
|
|
|
|
------------------------------------------------------------------------------
|