No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
LICENSE
README.md

README.md

My minimal emacs cheat sheet


This document is covered by the GNU General Public License (GNU GPL). If you haven’t read the GPL before, please do so. It explains all the things that you are allowed to do with this documentation.

October 12 2015

©️ Alireza Pazhouhesh

lidora.blog.ir


Key bindings are expressed as follows:

C-a is Ctrl + a

M-a is Meta + a


↔️ BASIC CURSER CONTROL

Keystrokes Action
C-f Move forward a character
C-b Move backward a character
M-f Move forward a word
M-b Move backward a word
C-n Move to next line
C-p Move to previous line
C-a Move to beginning of line
C-e Move to end of line
M-a Move to beginning of sentence
M-e Move to end of sentence
C-l Find the cursor (1:Center, 2:Up, 3:Down)
M-g M-g Go to line

✔️ SELECT AND MARK

Keystrokes Action
C-SPC Select by line
C-x SPC Select by column
C-x C-x Go to other end of marked region
M-h Mark paragraph
C-x C-p Mark the current page
C-x h Mark the whole buffer

INSERTING AND DELETING

Keystrokes Action
C-d Delete one char forward
M-d Cut one word forward
M-DEL Cut one word backward
C-k Cut to the end of line
C-w Cut selected region
M-w Copy selected region
DEL Delete the character just before the cursor
C-y Yanking (Paste)
M-y Choose what to paste from clipboard
C-u 8 * ********
C-u 2 C-k Kill two lines.

UNDO

Keystrokes Action
C-/ Undo
C-x u Undo

📂 FILES

Keystrokes Action
C-x C-f Open file
C-x C-s Save file
C-x C-w Save to file named as

📄 BUFFERS

Keystrokes Action
C-x C-b List buffers
C-x s Save some buffers
C-x b Switch to a buffer
C-x k Kill a buffer

👓 SEARCHING

Keystrokes Action
C-s Search forward
C-r Search backward

🔁 REPEATING

Keystrokes Action
M-n Repeat n times
C-u Repeat 4 times
C-u C-u Repeat 16 times

🔲 MANAGING WINDOWS

Keystrokes Action
C-x 1 kill all but the current window
C-x 2 Split windows horizontally
C-x 3 Split windows vertically
C-x 0 Close the current window
C-x ^ Expand vertically
C-x { Expand horizontally
C-x 4 C-f Find file in a new window
C-M-v Scroll another window
C-X-o Go to another other window

SPELL CHECKING

Keystrokes Action
M-$ ispell check a single word
M-x ispell-region check selected region
M-x ispell_buffer check current buffer
M-x flyspell-mode use flyspell
M-x ispell-change-dictionary Set spelling dictionary

SHELL

Keystrokes Action
M-! Execute shell command
C-u M-! Execute shell command and put output in current buffer
M-x shell Shell mode

#️⃣ SHELL MODE

Keystrokes Action
C-c C-z Equal C-z command
C-c C-d Equal C-d command
C-c C-c Equal C-c command

ℹ️ GETTING HELP

Keystrokes Action
C-h ? Help suggestions
C-h c Basic help
C-h f Describe a function
C-h k Describe a keystroke
C-h a Command apropos
C-h i Read included manuals
C-h r The emacs editor help
q Close Help buffer