Skip to content

Instantly share code, notes, and snippets.

@trmwzm
Forked from qxcv/spacemacs-cheatsheet.md
Created January 18, 2017 18:22
Show Gist options
  • Save trmwzm/2a154892eaf031428b29a4526cc0f03e to your computer and use it in GitHub Desktop.
Save trmwzm/2a154892eaf031428b29a4526cc0f03e to your computer and use it in GitHub Desktop.
Spacemacs cheatsheet

emacs --daemon to run in the background. emacsclient.emacs24 <filename/dirname> to open in terminal

M-m and SPC can be used interchangeably. I've used Ldr (for "leader") as a compromise.

  • Undo - C-/
  • Redo - C-?
  • Change case: 1. Camel Case : M-c 2. Upper Case : M-u 3. Lower Case : M-l
  • Helm-projectile find file : Ldr p f
  • Helm-projectile-grep : Ldr p s g
  • Toggle Auto complete : Ldr t a
  • Neotree root directory : Ldr p t
  • Linum-relative : Ldr t r
  • Ace-jump mode : Ldr SPC *. Helm-bookmarks : Ldr h b
  • Iedit mode : 1. M-<left>, M-<right> to navigate, 2. C-; to select/deselct all for edit at once
  • Expand Region 1. Expand: Ldr v 2. Contract: Ldr V
  • Winner mode: 1. Undo : C-c <left> 2. Redo : C-c <right>
  • Toggle Aggressive Indent Mode : Ldr t I
  • Open file in new buffer after Ldr p f : C-c o
  • Dired mode : 1. Copy file : C 2. Delete the file : D 3. Rename the file : R 4. Create a new directory : + 5. Reload directory listing : g
  • Search : 1. The last searched query : C-s C-s 2. The string under the cursor : C-s C-w
  • Un-indent by 4 spaces : C-u -4 C-x TAB
  • Open emacs dired mode: Ldr a d
  • Erase contents of buffer: Ldr b e
  • Replace contents of buffer with the contents of the clipboard: Ldr b P
  • Copy contents of the whole buffer: Ldr b Y
  • Open current file directory: Ldr f j
  • Rename current file: Ldr f R
  • Indent region/buffer: Ldr j =
  • Kill all buffers (of current project): Ldr p k
  • Reload spacemacs conf: Ldr f e R
  • Kill all buffers except the current one: Ldr b K
  • Go to conf file (~/.spacemacs): Ldr f e d
  • Toggle display fill-column(column 80): Ldr t f
  • Enable/Disable read-only mode C-x C-q
  • Go one level up in directory: C-x C-j
  • Indent/unindent region by n/-n spaces(n=4,8,... usually): C-u <n> C-x TAB
  • Go to previous cursor position(before ace-jump): `Ldr SPC ``
  • Do ag (code search) inside project : Ldr s a p
  • Narrow to function : Ldr n f (Ldr n w to exit)
  • Enable rainbow mode: Ldr t C c
  • Search selected region or current word through ag in project: Ldr s p
  • Highlight search results in another buffer (helm swoop): Ldr s s (Ldr s s to exit)
  • Toggle current frame transparency: Ldr T T
  • Toggle non-matching lines for iedit mode: C-' when in iedit mode (C-;)
  • Helm-resume background task: Ldr h l
  • Enter .spacemacs diff mode: Ldr f e D
  • Show kill ring history: Ldr r y
  • When in dired mode, press ? to display a list of commands.
  • Search within given buffer (helm-swoop mode): Ldr s s
  • List all functions in the given buffer (imenu): Ldr s l
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment