Skip to content

Instantly share code, notes, and snippets.

@cassinaj
Forked from davoclavo/spacemacs-cheatsheet.md
Created April 15, 2016 17:59
Show Gist options
  • Select an option

  • Save cassinaj/425f1b6996d5c2af406208ceb3aff6e8 to your computer and use it in GitHub Desktop.

Select an option

Save cassinaj/425f1b6996d5c2af406208ceb3aff6e8 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
1. Undo - `C-/`
2. Redo - `C-?`
3. Change case: 1. Camel Case : `M-c`
2. Upper Case : `M-u`
3. Lower Case : `M-l`
4. Helm-projectile find file : `M-m p f`
5. Helm-projectile-grep : `M-m p s g`
6. Toggle Auto complete : `M-m t a`
7. Neotree root directory : `M-m p t`
8. Open shell in vertical split buffer : `C-!` (Not a predefined function, will have to be added explicitly later)
9. Linum-relative : `M-m t r`
10. Ace-jump mode : `M-m SPC`
11. Helm-bookmarks : `M-m h b`
12. Comment line/region : `M-;` (Not a predefined function, will have to be added explicitly later)
13. Iedit mode : 1. `M-<left>`, `M-<right>` to navigate,
2. `C-;` to select/deselct all for edit at once
14. Expand Region 1. Expand: `M-m v`
2. Contract: `M-m V`
15. Winner mode: 1. Undo : `C-c <left>`
2. Redo : `C-c <right>`
16. Toggle Aggressive Indent Mode : `M-m t I`
17. Open file in new buffer after `M-m p f` : `C-c o`
18. 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`
19. Search : 1. The last searched query : `C-s C-s`
2. The string under the cursor : `C-s C-w`
20. Un-indent by 4 spaces : `C-u -4 C-x TAB`
21. Open emacs dired mode: `M-m a d`
22. Erase contents of buffer: `M-m b e`
23. Replace contents of buffer with the contents of the clipboard: `M-m b P`
24. Copy contents of the whole buffer: `M-m b Y`
25. Open current file directory: `M-m f j`
26. Rename current file: `M-m f R`
27. Indent region/buffer: `M-m j =`
28. Kill all buffers (of current project): `M-m p k`
29. Reload spacemacs conf: `M-m f e R`
30. Yasnippet Expand: `M-m o o` (Add this to keybindings.el):
";; yas -----------------------------------------------------------------
(evil-leader/set-key
"oo" 'yas-insert-snippet)"
31. Kill all buffers except the current one: `M-m b K`
32. Go to conf file (~/.spacemacs): `M-m f e d`
33. Toggle display fill-column(column 80): `M-m t f`
34. Enable/Disable read-only mode `C-x C-q`
35. Go one level up in directory: `C-x C-j`
36. Indent/unindent region by n/-n spaces(n=4,8,... usually): `C-u <n> C-x TAB`
37. Go to previous cursor position(before ace-jump): `M-m SPC ``
38. Do ag (code search) inside project : `M-m s a p`
39. Narrow to function : `M-m n f` (`M-m n w` to exit)
40. Enable rainbow mode: `M-m t C c`
41. Search selected region or current word through ag in project: `M-m s p`
42. Highlight search results in another buffer (helm swoop): `M-m s s` (`M-m s s` to exit)
43. Toggle current frame transparency: `M-m T T`
44. Toggle non-matching lines for iedit mode: `C-'` when in iedit mode (C-;)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment