^x^c - close window (exit)
^g - get out (of a command entry) - may be several times
^x u - undo
^x _ - undo
^x / - undo
^h - help
^h^h - Help on help
^h t - tutorial
^h i - info (documentation)
^h k <key> - help on this key
^h k <function> - describe function
Alt-` or ESC` or F10 - menubarAlt-x - switch to minibuffer (^g - out) |
^x^f - open file (press Enter to get file listing)
^x d - open a directory
^x i - insert text from another file.
^x^s - save file
C-x C-c y – exit and save
^x^w - write to another file
^x^v - find alternate file (with ~)
Alt-! - run shell command
Alt-x shell - open shell window |
You can split the main window in several.
Each window can be attached to a buffer (file, scratch, etc.)
^x b - change/create buffer
^x^b - list of buffers
^x k - close buffer
^x o - select "other" window
^x0 - kill current window
^x1 - kill all windows except current
^x2 - split horizontal
^x3 - split vertical
^x40 - kill current window and buffer
Current window resize:
^x^ - taller /
^x- - shorter
^x} - wider /
^x{ - narrower
^x + - make all windows same height
^l ( small L ) - redraw the screen |
usually arrows work, but PgUp/PgDn don't.
^f, ^b, ^n, ^p (forward, back, next, previous)
Move faster:
|
forward |
back |
word |
Alt-f |
Alt-b |
line |
^e |
^a |
sentence |
Alt-e |
Alt-a |
page |
^x ] |
^x [ |
buffer(file) |
Alt-> |
Alt-< |
screen (cursor in mid-screen) |
^Alt-e |
^Alt-a |
screen |
^v |
Alt-v |
Alt-# n - goto line n.
Alt-x goto-line RET 5 RET - goto line 5
|
^d, Del - del char (forw/back)
(note: ^h is for help)
Alt-d, ^Del - word
^k - rest of the line
^k^k^k^k - cut several lines
Alt-k - rest of sentence.
^a^k - delete the line
^SPACE , ^@ - set beginning mark
^x ^x - jump to/from mark point
Alt-@ - select word
Alt-h - select paragraph
^x h - select all (mark-whole-buffer)
^w - cut from current pos. to mark (kill-region - put it on the kill ring)
Alt-w - copy from current pos to mark (kill-ring-save - equivalent to ^w^y)
^y - paste (yank) last killed thing
Alt-y -Yank earlier kills.
|
^u 0 ^k - kill-line
^u -1 ^k - kill-line including preceding newline
^Alt-k - kill-sexp. Kills the sexp after the cursor.
^u -1 ^Alt-k - kill-sexp. Kills the sexp before the cursor.
The command backward-kill-sexp exists, but is not bound to any key by default.
^Alt-@ - mark-sexp. Sets the region around matching parenths.
(the same sexp that C-M-f would move to).
^Alt-h - mark-defun. Mark function definnition.
^x^i - indent-rigidly the region by 1 or more chars (default is 1).
|
^s str RET - isearch-forward (as you type)
^r str RET - isearch-backward
^s RET str RET - regular search
^s - to repeat search
^s^w - search for word
^s^y - search for the rest of the line
^s Alt-y - search for copied text
=====================
If C-s doesn’t work because C-s is “stop output”, do the following:
M-x enable-flow-control
Then use C-\ instead of C-s, and C-^ instead of C-q
auto-fill-mode
C-q C-l – to enter control-l
|
Alt-% oldstr RET newstr RET.
Space, y |
replace oldstr with newstr. |
Delete, n |
skip to the next occurrence
(without replacing this one). |
Enter, Esc, q |
exit without any more replacements. |
. (period) |
replace this occurrence and exit. |
^ |
go back to the location of the
previous occurrence if you changed it. |
! |
replace all remaining occurrences
without asking again. |
|
^x^u, ^x^l - convert region to upper / lower case.
Alt-u, Alt-l - conv. word to upper / lower case.
Alt-c - capitalize the word.
Using debugger:
^x3 - create second window
Alt-x - perldb RET - enter command perldb
n - next
q - quit |