Skip to content

Instantly share code, notes, and snippets.

@rpip
Last active August 29, 2015 14:04
Show Gist options
  • Save rpip/f065edaa341be3db14ab to your computer and use it in GitHub Desktop.
Save rpip/f065edaa341be3db14ab to your computer and use it in GitHub Desktop.
Notes on learning Emacs

Notes on learning Emacs

basics

C-x f => open file

C-x s => save file

C-x C-w => save to a new file

M-x => (execute-extended-command)

M-x man => open man's page entry for *NIX command. requires system man command to run

M-x woman => open man's page entry for *NIX command. doesn't require system man command to run

C-h C-h => help section overview

C-h m | f | v | a | w | k => help sections(the current mode | function | variable | search for command | whereis command | keys)

self-insert-command => called for each character input

ibuffer

actions

s => save

v => revert

d => discard

a => view

sorting in ibuffer

s s => size

s m => mode

s i => inverse

s a => alphabet

s f => filename

s v => viewing time

filtering in ibuffer

/ > => size greater than

/ < => size less than

/ / => undo filters

/ m => mode

/ f => filename

/ c => file content

/ n => buffer name

bookmarks

C-x r m => mark

C-x r l => list

C-x r b => visit

dired mode

C-x d => enable dired mode

S => symlink a file

H => hard link a file

C => copy a file

R => rename a file

d => flag file for deletion

registers

C-x r w => save to register

C-x r j => jump to register

C-x r s => save window state to register

C-x r => insert region

macros

Record a series of keyboard steps for use later.

An example, will be to convert the third word of very sentence or line to uppercase.

C-x ( => start recording macro

C-x ) => stop recording macro

C-x e => playback macro

Read the full Emacs tutorial here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment