Catalog / Spacemacs Cheatsheet

Spacemacs Cheatsheet

A comprehensive cheat sheet for Spacemacs, covering essential shortcuts, layers, and configurations to boost your Emacs workflow.

Basic Navigation

Core Keybindings

SPC

Opens the Spacemacs key guide, your primary interface.

SPC h d k

Describe key. Shows what a key does.

SPC h d f

Describe function. Shows information about a function.

SPC h d v

Describe variable. Shows information about a variable.

SPC h t k

Find a key from a string

SPC h SPC

Show all spacemacs commands.

Basic Movement

j

Move cursor down one line.

k

Move cursor up one line.

h

Move cursor left one character.

l

Move cursor right one character.

C-f

Move forward one screen.

C-b

Move backward one screen.

Editing Basics

i

Insert mode: insert before cursor.

a

Insert mode: insert after cursor.

o

Insert mode: open a new line below.

d

Delete under cursor.

x

Delete character under cursor.

u

Undo.

File Management

File Operations

SPC f f

Find file (open file).

SPC f s

Save file.

SPC f S

Save all files.

SPC f c

Copy file.

SPC f D

Delete file.

SPC f r

Rename file.

Buffer Management

SPC b n

Next buffer.

SPC b p

Previous buffer.

SPC b d

Delete buffer (close).

SPC b b

Switch to buffer.

SPC b k

Kill current buffer.

SPC b r

Revert buffer (reload from file).

Configuration Files

SPC f e d

Edit dotfile configuration.

SPC f e R

Reload configuration.

SPC f e s

Open .spacemacs file.

SPC h r r

Reload theme.

Window Management

Window Selection

SPC w h

Select window left.

SPC w j

Select window below.

SPC w k

Select window above.

SPC w l

Select window right.

Window Manipulation

SPC w H

Move window left.

SPC w J

Move window down.

SPC w K

Move window up.

SPC w L

Move window right.

SPC w s

Split window horizontally.

SPC w v

Split window vertically.

Other Window Commands

SPC w c

Close current window.

SPC w o

Only keep current window (delete others).

SPC w =

Balance window sizes.

SPC w t

Toggle window dedicated mode.

Project Management

Project Switching

SPC p l

Switch to last project.

SPC p p

Switch to project (ivy).

SPC p f

Find file in project.

SPC p h

Open files and recent.

Project Tools

SPC p t

Show project tree.

SPC p '

Open project terminal.

SPC p $ t

Open terminal in project root.

SPC p g

Project-related git commands.

Search and Replace

SPC s s

Search in current buffer.

SPC s p

Search in project.

SPC s r

Replace in current buffer.

SPC s R

Replace in project.