Emacs

字数 354 · 2021-07-21

Quit

C-x C-c

Help

  • C-h help (i, b, a, t, …)
    • k - keybind
    • v - variable
    • f - function
    • m - mode

Exec

  • M-x/Esc x execute-extended-command

Cancel

C-g - Cancel current command

Move

  • C-n/C-p - Next/Previous Line

  • C-f/C-b - Forward/Backword Char

  • M-f/M-b - Forward/Backword Word

  • C-a/C-e - Begin/End of the line

  • M-a/M-e - Begin/End sentence

  • M-}/M-{ - Forward/Backword paragraph

  • M-</M-> - Begin/End of the buffer

  • C-v/M-v - Scroll down/up screen (VERTICAL)

  • C-l - Center current line

  • C-u 3 C-n - Next 3 lines

C-a, C-e, C-f and C-b as same as bash

File

  • C-x C-f - Open a file
  • C-x C-s - Save a file

Buffer

  • C-x C-b - Show buffers
  • C-x k - Kill Buffer

Window

  • C-x 0 - Close Current Window
  • C-x 1 - Close All but Current Window
  • C-x 2 - Split Vertical
  • C-x 3 - Split Horizontal
  • C-x o - Move to other window
  • C-x } - Make Window Wider
  • C-x { - Make Window Narrow

Misc

  • C-x C-+ - Increase text size
  • C-x C-- - Decrease text size

  • M-x linum-mode

elisp

scratch buffer

C-x C-e - run command

init.el

evil-mode

org-mode

Doom

config

  • ~/.config/doom
    • init.el
    • config.el
    • packages.el