Sie sind auf Seite 1von 2

GNU Emacs Reference Card Motion Multiple Windows

(for version 22) When two commands are shown, the second is a similar com-
entity to move over backward forward
mand for a frame instead of a window.
character C-b C-f
Starting Emacs word M-b M-f delete all other windows C-x 1 C-x 5 1
line C-p C-n split window, above and below C-x 2 C-x 5 2
To enter GNU Emacs 22, just type its name: emacs go to line beginning (or end) C-a C-e delete this window C-x 0 C-x 5 0
sentence M-a M-e split window, side by side C-x 3
Leaving Emacs paragraph M-{ M-} scroll other window C-M-v
page C-x [ C-x ] switch cursor to another window C-x o C-x 5 o
suspend Emacs (or iconify it under X) C-z sexp C-M-b C-M-f select buffer in other window C-x 4 b C-x 5 b
exit Emacs permanently C-x C-c function C-M-a C-M-e display buffer in other window C-x 4 C-o C-x 5 C-o
go to buffer beginning (or end) M-< M-> find file in other window C-x 4 f C-x 5 f
Files scroll to next screen C-v find file read-only in other window C-x 4 r C-x 5 r
scroll to previous screen M-v run Dired in other window C-x 4 d C-x 5 d
read a file into Emacs C-x C-f scroll left C-x < find tag in other window C-x 4 . C-x 5 .
save a file back to disk C-x C-s scroll right C-x > grow window taller C-x ^
save all files C-x s scroll current line to center of screen C-u C-l shrink window narrower C-x {
insert contents of another file into this buffer C-x i grow window wider C-x }
replace this file with the file you really want C-x C-v Killing and Deleting
write buffer to a specified file C-x C-w Formatting
toggle read-only status of buffer C-x C-q entity to kill backward forward indent current line (mode-dependent) TAB
character (delete, not kill) DEL C-d indent region (mode-dependent) C-M-\
Getting Help word M-DEL M-d indent sexp (mode-dependent) C-M-q
line (to end of) M-0 C-k C-k indent region rigidly arg columns C-x TAB
The help system is simple. Type C-h (or F1) and follow the di- sentence C-x DEL M-k insert newline after point C-o
rections. If you are a first-time user, type C-h t for a tutorial. sexp M-- C-M-k C-M-k move rest of line vertically down C-M-o
remove help window C-x 1 kill region C-w delete blank lines around point C-x C-o
scroll help window C-M-v copy region to kill ring M-w join line with previous (with arg, next) M-^
kill through next occurrence of char M-z char delete all white space around point M-\
apropos: show commands matching a string C-h a put exactly one space at point M-SPC
describe the function a key runs C-h k yank back last thing killed C-y
replace last yank with previous kill M-y fill paragraph M-q
describe a function C-h f
set fill column C-x f
get mode-specific information C-h m
set prefix each line starts with C-x .
Marking set face M-o
Error Recovery
set mark here C-@ or C-SPC Case Change
abort partially typed or executing command C-g exchange point and mark C-x C-x
recover files lost by a system crash M-x recover-session uppercase word M-u
set mark arg words away M-@ lowercase word M-l
undo an unwanted change C-x u, C-_ or C-/ mark paragraph M-h
restore a buffer to its original contents M-x revert-buffer capitalize word M-c
mark page C-x C-p
redraw garbaged screen C-l uppercase region C-x C-u
mark sexp C-M-@
lowercase region C-x C-l
mark function C-M-h
Incremental Search mark entire buffer C-x h The Minibuffer
search forward C-s Query Replace The following keys are defined in the minibuffer.
search backward C-r complete as much as possible TAB
regular expression search C-M-s interactively replace a text string M-% complete up to one word SPC
reverse regular expression search C-M-r using regular expressions M-x query-replace-regexp complete and execute RET
select previous search string M-p show possible completions ?
Valid responses in query-replace mode are fetch previous minibuffer input M-p
select next later search string M-n
exit incremental search RET replace this one, go on to next SPC fetch later minibuffer input or default M-n
undo effect of last character DEL replace this one, don’t move , regexp search backward through history M-r
abort current search C-g skip to next without replacing DEL regexp search forward through history M-s
replace all remaining matches ! abort command C-g
Use C-s or C-r again to repeat the search in either direction. back up to the previous match ^ Type C-x ESC ESC to edit and repeat the last command that
If Emacs is still searching, C-g cancels only the part not done. exit query-replace RET used the minibuffer. Type F10 to activate the menu bar using
c 2005 Free Software Foundation, Inc. Permissions on back. v2.3
! enter recursive edit (C-M-c to exit) C-r the minibuffer.
GNU Emacs Reference Card Regular Expressions Registers
any single character except a newline . (dot) save region in register C-x r s
Buffers zero or more repeats * insert register contents into buffer C-x r i
one or more repeats + save value of point in register C-x r SPC
select another buffer C-x b zero or one repeat ? jump to point saved in register C-x r j
list all buffers C-x C-b quote regular expression special character c \c
kill a buffer C-x k alternative (“or”) \|
grouping \( . . . \) Keyboard Macros
Transposing same text as nth group \n
at word break \b start defining a keyboard macro C-x (
transpose characters C-t not at word break \B end keyboard macro definition C-x )
transpose words M-t entity match start match end execute last-defined keyboard macro C-x e
transpose lines C-x C-t line ^ $ append to last keyboard macro C-u C-x (
transpose sexps C-M-t word \< \> name last keyboard macro M-x name-last-kbd-macro
buffer \‘ \’ insert Lisp definition in buffer M-x insert-kbd-macro

Spelling Check class of characters match these match others


explicit set [ ... ] [^ . . . ] Commands Dealing with Emacs Lisp
word-syntax character \w \W
check spelling of current word M-$
character with syntax c \sc \Sc eval sexp before point C-x C-e
check spelling of all words in region M-x ispell-region
check spelling of entire buffer M-x ispell-buffer eval current defun C-M-x
International Character Sets eval region M-x eval-region
read and eval minibuffer M-:
Tags specify principal language C-x RET l load from standard system directory M-x load-library
show all input methods M-x list-input-methods
find a tag (a definition) M-.
find next occurrence of tag C-u M-.
enable or disable input method C-\ Simple Customization
set coding system for next command C-x RET c
specify a new tags file M-x visit-tags-table show all coding systems M-x list-coding-systems customize variables and faces M-x customize
regexp search on all files in tags table M-x tags-search choose preferred coding system M-x prefer-coding-system
run query-replace on all the files M-x tags-query-replace Making global key bindings in Emacs Lisp (examples):
continue last tags search or query-replace M-,
Info (global-set-key "\C-cg" ’goto-line)
(global-set-key "\M-#" ’query-replace-regexp)
Shells enter the Info documentation reader C-h i
find specified function or variable in Info C-h S Writing Commands
execute a shell command M-!
Moving within a node:
run a shell command on the region M-| (defun command-name (args)
filter region through a shell command C-u M-| scroll forward SPC "documentation" (interactive "template")
start a shell in window *shell* M-x shell scroll reverse DEL body)
beginning of node . (dot)
An example:
Rectangles Moving between nodes:
(defun this-line-to-top-of-window (line)
next node n "Reposition line point is on to top of window.
copy rectangle to register C-x r r previous node p With ARG, put point on line ARG."
kill rectangle C-x r k move up u (interactive "P")
yank rectangle C-x r y select menu item by name m (recenter (if (null line)
open rectangle, shifting text right C-x r o select nth menu item by number (1–9) n 0
blank out rectangle C-x r c follow cross reference (return with l) f (prefix-numeric-value line))))
prefix each line with a string C-x r t return to last node you saw l
return to directory node d The interactive spec says how to read arguments interac-
tively. Type C-h f interactive for more details.
Abbrevs go to top node of Info file
go to any node by name
t
g c 2005 Free Software Foundation, Inc.
Copyright !
Other: v2.3 for GNU Emacs version 22, 2005
add global abbrev C-x a g designed by Stephen Gildea
add mode-local abbrev C-x a l run Info tutorial h Permission is granted to make and distribute copies of this card pro-
add global expansion for this abbrev C-x a i g quit Info q vided the copyright notice and this permission notice are preserved on
add mode-local expansion for this abbrev C-x a i l search nodes for regexp M-s all copies.
explicitly expand abbrev C-x a e For copies of the GNU Emacs manual, write to the Free Software Foun-
dation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
expand previous word dynamically M-/
USA

Das könnte Ihnen auch gefallen