- 1. Layers
- 2. Config Changes
- 3. Keybindings
- 3.1. Command
- 3.2. Navigation
- 3.2.1. h/j/k/l - cursor up/down/left/right
- 3.2.2. C-u / C-d - move half screen up / down
- 3.2.3. C-f / C-b - move full screen up / down
- 3.2.4. '' - move cursor to last position
- 3.2.5. M l/r (arrows) - move occurances of current word
- 3.2.6. % - move to matching brace
- 3.2.7. { / } - move to prev / next paragraph
- 3.2.8. z t/./b - move screen where cursor is at top/center/bottom
- 3.2.9. m <key> - set mark to <key>
- 3.2.10. ' <key> - jump to mark for <key>
- 3.2.11. [{ - jump to previous open brace (works with braces & parens)
- 3.2.12. [} - jump to next closing brace
- 3.2.13. g d - smart jump to declaration
- 3.3. Editing editing
- 3.3.1. v - visual mode
- 3.3.2. V - linewise visual mode
- 3.3.3. C-v - block visual mode
- 3.3.4. SPC v - enter expand / select region mode
- 3.3.5. SPC s e - iEdit mode
- 3.3.6. e - move to end of word (E - WORD)
- 3.3.7. w - move to next word (W - WORD)
- 3.3.8. b - move back one word (B - WORD)
- 3.3.9. A - append end of line
- 3.3.10. I - insert beginning of line
- 3.3.11. o - new line below / insert
- 3.3.12. O - new line above / insert
- 3.3.13. ea - append at end of word
- 3.3.14. D - delete from cursor to end of line
- 3.3.15. dd - delete line
- 3.3.16. C - change from cursor to end of line
- 3.3.17. cc - change line
- 3.3.18. J - join line with next
- 3.3.19. xp - transpose two letters (delete + paste)
- 3.3.20. <x>,<n> s/^/<txt>/ - Prepend <txt> to lines x through n
- 3.3.21. <x>,<n> s/$/<txt>/ - Append <txt> to lines x through n
- 3.3.22. f <char> - move to next <char>
- 3.3.23. t <char> - move to but not including <char>
- 3.3.24. " _ d - delete without saving to clipboard
- 3.3.25. " _ x - delete char / selection without saving to clipboard
- 3.3.26. g c c - comment current line
- 3.3.27. g c <m> - comment using motion (e.g. gc5j comment current line + 5 below)
- 3.4. Visual Mode
- 3.4.1. sf - surround function
- 3.4.2. s<brace> - surround with <brace> e.g. (,[,{,<,",'
- 3.4.3. cs<brace1><brace2> - change surrounding brace from 1 to 2
- 3.4.4. o - move to other end of marked area
- 3.4.5. y - copy marked text
- 3.4.6. d - delete marked text
- 3.4.7. ~ - switch case
- 3.4.8. < / > - increase / decrease indention
- 3.4.9. aw - mark word
- 3.4.10. ab - mark block ()
- 3.4.11. aB - mark block {}
- 3.4.12. ib - inner block ()
- 3.4.13. iB - inner block {}
- 3.4.14. i<*> - i< i[ i" i' i`
- 3.4.15. a<*> - a< a[ a" a' a`
- 3.4.16. A - append each selection in block
- 3.4.17. I - insert each selection in block
- 3.4.18. R - replace each selection in block
- 3.4.19. u / U - make lowercase / uppercase
- 3.4.20. p - replace selection with paste
- 3.4.21. : s/<find>/replace/ - substitute in visual selection
- 3.5. Search and Replace
- 3.5.1. n - next search result
- 3.5.2. N - prev search result
- 3.5.3. * - search for word under cursor (forward)
- 3.5.4. # - search for word under cursor (backward)
- 3.5.5. /<pattern> - search for pattern
- 3.5.6. ?<pattern> - search backward for pattern
- 3.5.7. :%s/old/new/g - replace all old with new
- 3.5.8. :%s/old/new/gc - replace all w/ confirmation
- 3.5.9. s/S - helm-snipe forward / backward (search two char)
- 3.6. Window Management window
- 3.7. Project Management project
- 3.8. Layout Management layout
- 3.9. Buffer Management buffer
- 3.10. File Management files
- 3.11. Org Mode org
- 3.12. Scala
- 3.13. Rust
- 3.14. Git
- 3.15. Github
Layers are enabled by adding the layer identifier to the dotspacemacs-configuration-layers variable in the .spacemacs file.
Additional variables can be passed to the layout using the following format:
(layer-identifier :variables variable-one value variable-two value)
identifer: spacemacs-layout variables:
-
layouts-enable-autosave (t)
-
layouts-autosave-delay (300)
identifier: git
identifier: github
identifier: org variables:
- org-enable-github-support (t)
identifier: markdown
identifier: evil-snipe variables:
- evil-snipe-enable-alternate-f-and-t-behaviors (t)
identifier: auto-completion
identifier: scala
identifier: rust
- requires racer install
identifier: clojure variables:
- clojure-enable-fancify-symbols (t)
identifier: themes-megapack
Configurations reside in the .spacemacs file.
Set first item in dotspacemacs-themes
: sanityinc-tomorrow-night
dotspacemacs-auto-resume-layouts t
dotspacemacs-line-numbers t
('relative for relative line numbers)
In dotspacemacs/user-init:
(setq-default git-magit-status-fullscreen t)
In dotspacemacs/user-config:
(setq org-todo-keywords
'((sequence "TODO" "IN-PROGRESS" "WAITING" "DONE")))
In dotspacemacs/user-config:
(add-hook 'hack-local-variables-hook (lambda () (setq truncate-lines t)))
In dotspacemacs/user-init:
(setq org-M-RET-may-split-line nil)
-
S - delete / insert mode all occurances
-
U - uppercase all occurances
-
C-U - downcase all occurrances
-
A - insert mode end of all occurances
-
I - insert mode beginning of all occurances
-
L - restrict to current line
-
J - increase editing scope by one line below
-
K - increase editing scope by one line above
-
n - next occurance
-
gg - first occuance
-
G - last occurance
-
D - delete all occurances
-
p - replace occurrances with last yanked text
-
V - toggle visibility of lines with no occurrance
-
SPC m : - tag
-
o - open below
-
O - open above
-
M-RET - open heading below
-
C-RET - open heading below (after content)
-
M-o - open sub-heading below
-
- demote heading
-
< - promote heading
-
SHIFT <-/-> - cyle prev / next todo
-
t - TODO toggle
-
T - new empty TODO
-
SPC m s - schedule task
-
SPC a o o - open agenda
-
SPC : org-agenda-file-to-front - add file to agenda
-
SPC : org-remove-file - remove file from agenda
-
SPC m t n - new table
-
TAB - next field / re-format
-
SHIFT TAB - prev field / re-format
-
SPC m t e - new formula
-
SPC m t r - recalculate row
-
SPC : org-table-iterate - recalculate entire table
-
TAB - show / hide diff
-
c c - commit
-
b b - checkout branch
-
b c - create branch
-
x - discard changes
-
s - stage file
-
S - stage all files
-
u - unstage file
-
U - unstage all files
-
z z - stash changes
-
q - quit
-
P - push