Emacs – Working with Regions

In this weeks segment on Emacs wizardry let’s learn some of the basic commands for working with regions of text so you can move around your Emacs region faster than Blackberry’s are forgotten about.

Keystrokes Command Name Action
C-@ or C-SPACE set-mark-command Mark the beginning (or end) of a region.
C-x C-x exchange-point-and-mark Exchange location of cursor and mark.
C-w or SHIFT-DELETE kill-region Delete the region
C-y or SHIFT-INSERT yank Paste most recently killed or copied text.
ESC-w or C-INSERT kill-ring-save Copy the region.
Esc-h mark-paragraph Mark paragraph.
C-x C-p mark-page Mark page.
C-x h mark-whole-buffer Mark buffer.
ESC-y yank-pop After C-y, pastes earlier deletion.

Emacs Cursor Movements

In this weeks segment on Emacs wizardry let’s learn some of the basic cursor movements so you can move around your Emacs buffer faster than the speed of light.

Keystrokes Command Name Action
C-f forward-char Move forward one character(right).
C-b backward-char Move backward one character(left).
C-p previous-line Move to previous line(up).
C-n next-line Move to next line(down)
ESC-f forward-word Move forward one word.
ESC-b backward-word Move one word backward.
C-a beginning-of-line Move to beginning of line.
C-e end-of-line Move to end of line
ESC-e forward-sentence Move forward one sentence.
ESC-a backward-sentence Move backward one sentence.