An open API service indexing awesome lists of open source software.

https://github.com/smoeding/emacs-cheat-sheet

My Emacs cheat sheet
https://github.com/smoeding/emacs-cheat-sheet

emacs

Last synced: about 1 month ago
JSON representation

My Emacs cheat sheet

Awesome Lists containing this project

README

          

# Emacs Cheat Sheet

This is a collection of Emacs keybindings that I should use more often.

## Mark Ring

Key | Command
-----------------------|--------------------------------------------------
C-SPC C-SPC | Set the mark, pushing it onto the mark ring, without activating it.
C-u C-SPC | Move point to where the mark was, and restore the mark from the ring of former marks.
C-x C-SPC | Move point to buffer and position of the last entry in the global ring (`pop-global-mark`).

## Moving by Defuns

Key | Command
-----------------|--------------------------------------------------
C-M-a | Move to beginning of current or preceding defun (`beginning-of-defun`)
C-M-e | Move to end of current or following defun (`end-of-defun`)
C-M-h | Put region around whole current or following defun (`mark-defun`)

## Editing with Parentheses

Key | Command
-----------------|--------------------------------------------------
C-M-f | Move forward over a balanced expression (`forward-sexp`)
C-M-b | Move backward over a balanced expression (`backward-sexp`)
C-M-k | Kill balanced expression forward (`kill-sexp`)
C-M-t | Transpose expressions (`transpose-sexps`)
C-M-n | Move forward over a parenthetical group (`forward-list`)
C-M-p | Move backward over a parenthetical group (`backward-list`)
C-M-u | Move up in parenthesis structure (`backward-up-list`)
C-M-d | Move down in parenthesis structure (`down-list`)

## Registers

Key | Command
-----------------------|-----------------------------------------------
C-x r SPC R | Record the position of point and the current buffer in register R (`point-to-register`)
C-x r j R | Jump to the position and buffer saved in register R (`jump-to-register`)
C-x r s R | Copy region into register R (`copy-to-register`)
C-x r i R | Insert text from register R (`insert-register`)
C-x r + | Append text to or increment register (`increment-register`)

## Abbrevs

Key | Command
---------------------|-----------------------------------------------
C-x a g | Define an abbrev, using one or more words before point as its expansion (`add-global-abbrev`)
C-x a l | Similar, but define an abbrev specific to the current major mode (`add-mode-abbrev`)
C-x a i g | Define a word in the buffer as an abbrev (`inverse-add-global-abbrev`)
C-x a i l | Define a word in the buffer as a mode-specific abbrev (`inverse-add-mode-abbrev`)

## Calc

Key | Command
-------------------|-----------------------------------------------
C-x * g | Open Calc and add region as vector (`calc-grab-region`)
v p | Pack stack elements as vector; prefix is length (`calc-pack`)
v u | Unpack vector on the top of the stack (`calc-unpack`)
V S | Sort elements of a vector (`calc-sort`)
I V S | Sort elements of a vector in decreasing order
u # | Count number of values in a vector (`calc-vector-count`)
u + | Sum values in a vector (`calc-vector-sum`)
u * | Multiply values in a vector (`calc-vector-product`)
u M | Compute mean of values in a vector (`calc-vector-mean`)
H u M | Compute median of values in a vector (`calc-vector-median`)
u S | Calculate sample standard deviation (`calc-vector-sdev`)
I u S | Calculate population standard deviation (`calc-vector-pop-sdev`)
t U | Convert between date and Unix time value (`calc-unix-time`)