Show Menu
Cheatography

Spacemacs (+Clojure) Keyboard Shortcuts by

Useful keybindings for spacemacs (evil mode).

Navigation

Up
k
Down
j
Left
h
Right
l
Down a page
Ctrl-d
Up a page
Ctrl-u
Up to next paragraph
{
Down to next paragraph
}
Previous function
[[
Next function
]]
Up to outer brace
[{
Down to outer brace
]}
Right a word
w
Left a word
b
Beginning of File
gg
End of File
G
End of line
$
First non-wh­ite­space char of line
^
Jump to any word
SPC-SPC <first letter of word>
Jump back
Ctrl-o
Center buffer
zz
Last place you edited
g;
Last file path under your cursor
gf
You can use number­+fu­nction for most, e.g. 5-w = 5 words right

Files

Open a file
SPC-f-f
Save a file
SPC-f-s
Create a file
SPC-f-f
Find a file in your project
SPC-p-f
Edit .spacemacs
SPC-f-e-d
Switch to a file recently opened
SPC-b-b
Switch to last buffer
SPC-TAB
Toggle NeoTree
SPC-f-t

Editor

Quit
SPC-q-q
Restart
SPC-q-r
Increa­se/­dec­rease font size
SPC-z-x
Toggle line numbers
SPC-t-n
Toggle auto completion
SPC-t-a
 

Window Layouts

Split window vertically
SPC-w-v
Split window horizo­ntally
SPC-w-s
Switch window
SPC-<nr. of window>
Switch window (alter­native)
SPC-w-h (left), SPC-w-j (down)...
Show/hide layout help
SPC-l-?
Create a named layout
SPC-l-l
Save a layout by name
SPC-l-S
Switch to layout
SPC-l-­<nr. of layout>

Editing

Enter highli­ghting mode
v
Undo
u
Redo
Ctrl-r
Comment out a line
g-c-c
Comment out highli­ghted text
g-c
Copy 1
y
Paste
p
Paste above
P
Copy/Paste to/from register
"-a-y (yank in to register a), "-a-p
Delete 1
d
Delete char
x
Delete until right parenteses
d-f-)
Replace mode
R
Replace char
r
Change1
c
Change everything between quotes
c-i-"
Show previous things you've copied
SPC-r-y
Indent hightl­ighted text
> and < (you can use 2>,­3<...)
Join lines separated by whitespace
J
Show whitespace
SPC-t-w
Convert spaces to tabs
SPC-:-­tabify
Convert tabs to spaces
SPC-:-­unt­abify
[1]: You can use certain commands with additional options: dd = delete line, 5yy = yank 5 lines, dw = delete word, y$ = yank until end of line...
 

Find Text

Find text in buffer
/-<text to search­>-Enter (n for next result, N for previous)
Find next instance of a word that your cursor is over
*
Find previous instance of a word that your cursor is over
#
Turn off previous search highli­ghting
:nohl-­Enter
Find text in project
SPC-/
Find test under curser in Project
SPC-*
Resume last search
SPC-s-l
Find and replace text in buffer, from current line
:.,$s/­<find text>/­<re­place text>/gc

Clojure

Start REPL (cider­-ja­ck-in)
SPC-m-s-i (use I for clojur­esc­ript)
Switch to REPL
SPC-m-s-s
Send and eval buffer in REPL
SPC-m-s-b
Send and eval last sexp in REPL
SPC-m-s-e
Send and eval function in REPL
SPC-m-s-f
Send and eval ns form in REPL
SPC-m-s-n
Send and eval region in REPL
SPC-m-s-r
Kill REPL
SPC-m-s-q
Cider grimoire
SPC-m-h-g
Cider doc
SPC-m-h-h
Cider javadoc
SPC-m-h-j
Eval buffer­,last sexp,...
SPC-m-e-b, ...
Goto
SPC-m-­g-<­fun­cti­on>
Run all tests in ns
SPC-m-t-a
Re-run test failures for ns
SPC-m-t-r
Run test at point
SPC-m-t-t
Reload ns
SPC-m-d-r
Instrument expression
SPC-m-d-b
Display last stacktrace
SPC-m-d-e
Inspect expression
SPC-m-d-i
Realign current form
SPC-m-f-l
Reformat current buffer
SPC-m-f-b
Refact­oring
SPC-m-­r-<­fun­cti­on>
                           
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          My Emacs Keyboard Shortcuts
          Basic Vim Cheat Sheet