Show Menu
Cheatography

Spacemacs (by Agevio.com) Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Spacemacs config­uration

SPC f e d
Open .spacemacs file
SPC f e R
Reload config­uration from .spacemacs file

Help

SPC h SPC
Open help
SPC ?
Search bindings
SPC f e h
Help about current layer
SPC h d f
Describe a function
SPC h d v
Describe a variable
SPC h d k
Describe a key
SPC h d p
Describe a package
SPC h m
Search available man page

Toggle features

SPC t a
Toggle auto completion
SPC t c
Toggle camel case motion
SPC t F
Toggle auto fill mode
SPC t n
Toggle line numbers
SPC t r
Toggle relative line numbers
SPC t s
Toggle syntax checking
SPC t l
Toggle line wrap
SPC t S
Toggle spell-­check

Files

SPC f f
Find (open) file
SPC f E
Open with sudo
SPC f s
Save current buffer
SPC f S
Save all buffers
SPC f R
Rename file in current buffer
SPC f t
Toggle neotree

Projects

SPC p p
Open recent project
SPC p f
Find file in current project
SPC p b
Current project's buffers
SPC p t
toggle neotree at project root

Windows

SPC 0
Move focus to neotree window
SPC 1..9
Focus window 1 to 9
SPC w w
Focus next window
SPC w h
Switch to left window
SPC w l
Switch to right window
SPC w k
Switch to up window
SPC w j
Switch to down window
SPC w s
Split window below point
SPC w S
Split below and focus new window
SPC w v
Split window vertically
SPC w V
Split vertically and focus new window
SPC w =
Rebalance current windows
SPC w .
Enter to transition state
SPC w d
Close (delete) window
SPC w m
Maximize window
SPC w u
Undo window layout change

Buffers

SPC b b
List buffers
SPC b n
Switch to next buffer
SPC b p
Switch to previous buffer
SPC b d
Kill current buffer
SPC TAB
Switch to last buffer
SPC b s
Switch to scratch buffer
 

Search

SPC /
Search in current project

Editor - Code folding

z r
Open all folds
z m
Close all folds
z a
Toggle current fold
z o
Open current fold
z c
Close fold

Editor - Code formatting

SPC j k
Indent next line
SPC j =
Indent buffer

Edit - Progra­mming

SPC s j
Show Imenu
SPC d d
Lookup word at point with dash
SPC ;
Comment current visual selection
SPC ; i {
Comment inner { block

Editor - Basic Navigation

k
Go up
j
Go down
h
Go left
l
Go right
C-d
Go down a page
C-u
Go up a page
gg
Go to beginning of bufffer
G
Go to end of buffer
$
Go to end of line
^
Go to beginning of line

Editor - Navigation

w
Go right a word
b
Go left a word
e
Go to the end of word
C-o
Jump back
z z
Center buffer around point
g ;
Go to last place you edited
' '
Go back to last position

Misc

SPC '
Toggle shell
Alt-/
Expand snippet
SPC x c
Word count in region

Edit - Copy/Paste

y w
Copy a word
y l
Copy a line
y $
Copy from point to end of line
p
Paste

Edit - Deleting

x
Delete character
d
Delete highli­ghted text
d w
Delete word
d d
Delete line
d $
Delete to end of line
d f )
Delete until right paren
 

Magit

SPC g >
Open magit blame
SPC g f h
Show file commits history
SPC g H c
Clear highlights
SPC g H h
Highlight regions by age of commits
SPC g H t
Highlight regions by last updated time
SPC g S
Stage current file
SPC g U
Unstage current file
SPC g s
Open magit status window
c c
Commit
b b
Checkout a branch
b c
Create a branch
gr
Refresh
l l
Open log buffer
P u
Push to tracked branch
P m
Push to matching branch (e.g., upstre­am/­develop to origin­/de­velop)
s
On a file or hunk in a diff: stage the file or hunk
S
Stage all
u
On a staged file: unstage
U
Unstage all staged files
z z
Stash changes

Elixir - Help

SPC m h :
Run custom search for help
SPC m h h
Show help of the current expression
SPC m h H
Toggle through search history
SPC m h r
Show help for current region

Elixir - Mix

SPC m m :
Prompt for a mix command
SPC m m c
Compile the whole applic­ation
SPC m m h
Show help for a specific mix command
SPC m m x
Run the given expression in the Elixir applic­ation context

Elixir - Project

SPC m p t
Open project test directory and list all test files
SPC m g t
Toggle between a file and its tests in the current window
SPC m g T
Toggle between a file and its tests in other window

Elixir - Tests

SPC m g t
Open the test file for current buffer
SPC m t a
Run all the tests
SPC m t b
Run all the tests from current buffer
SPC m t r
Rerun the last test
SPC m t t
Run test under point

Agevio

Agevio.com loves Elixir

Elixir - Compile

SPC m c :
Run a custom compile command with elixirc
SPC m c b
Compile the current buffer with elixirc
SPC m c f
Compile the given filename with elixirc

Elixir - Execute

SPC m x :
Run a custom execute command with elixir
SPC m x b
Run the current buffer through elixir
SPC m x f
Run elixir with the given filename

Elixir - Code Definition Jump

SPC m g g
Jump to the elixir expression definition at point
SPC m .
Pop back to where SPC m g g was last invoked

Elixir - REPL intera­ctions

SPC m s c
Compiles the current buffer in the IEx process
SPC m s i
Start an iex inferior process
SPC m s I
Start an IEx process with mix (iex -S mix)
SPC m s l
Send current line to REPL buffer
SPC m s L
Send current line to REPL buffer and focus it in insert state
SPC m s m
Reloads the module in the current buffer in your IEx process
SPC m s r
Send region to REPL buffer
SPC m s R
Send region to REPL buffer and focus it in insert state

Elixir - Evaluation in place

SPC m e b
Evaluate buffer
SPC m e B
Evaluate buffer and insert result
SPC m e l
Evaluate current line
SPC m e L
Evaluate current line and insert result
SPC m e r
Evaluate region
SPC m e R
Evaluate region and insert result