Skip to content

Instantly share code, notes, and snippets.

@timjstewart
Last active February 8, 2018 18:36
Show Gist options
  • Save timjstewart/37830da04f8830805d764bb52225ddc3 to your computer and use it in GitHub Desktop.
Save timjstewart/37830da04f8830805d764bb52225ddc3 to your computer and use it in GitHub Desktop.
Spacemacs Keys I want to learn

Emacs

Buffers

KeyDescriptionStatus
SPC b C-dKill buffers using a regular expression.

Navigation

KeyDescriptionStatus
SPC j winitiate avy jump word
SPC j iJump to definition in buffer (imenu)
SPC j Ijump to a definition in any buffer (imenu)

Clipboard

KeyDescriptionStatus
SPC b Pcopy clipboard and replace buffer (useful when pasting from a browser)
SPC b Ycopy whole buffer to clipboard (useful when copying to a browser)
SPC r yshow kill ring (you can yank from this window)

Directory

KeyDescriptionStatus
SPC f fOpens a buffer to search for files in the current directory.
SPC f rRecent files
] fGo to next file in directory
[ fGo to previous file in directory

Errors

KeyDescriptionStatus
SPC e nGo to next error
SPC e pGo to previous error

Expand Region Mode

KeyDescriptionStatus
SPC vinitiate expand-region mode
vincrease region one semantic unit
Vdecrease region one semantic unit
rreset region to initial selection
ESCleave Expand Region mode

Files

KeyDescriptionStatus
SPC f bBookmarks Window
SPC f cCopy current file to location
SPC f RRename the current file
SPC f DDelete current file (with confirmation)
SPC f EOpen file with elevated priviliges.
SPC f fOpen file with Helm
SPC f jjump to the current buffer file in dired
SPC f tToggle NeoTree
SPC f yCopy current filename and display in minibuffer.

Frames

KeyDescriptionStatus
SPC w ocycle and focus between frames
SPC w Fcreate new frame

Helm Files

KeyDescriptionStatus
C-hgo to parent directory
C-lgo to selected directory

Help

KeyDescriptionStatus
SPC h SPCList layers, documentation, and toggles
SPC ?List all key bindings

Layouts/Workspaces

KeyDescriptionStatus
g tGo to next workspace
g TGo to previous workspace
SPC l LLoad layout from file
SPC l lSave layout to file

Narrowing

KeyDescriptionStatus
SPC n fnarrow the buffer to the current function
SPC n pnarrow the buffer to the visible page
SPC n rnarrow the buffer to the selected text
SPC n wwiden, i.e show the whole buffer again

NeoTree

KeyDescriptionStatus
hcollapse expanded directory or go to parent node
Hselect previous sibling
jselect next file or directory
Jselect next expanded directory on level down
kselect previous file or directory
Kselect parent directory, when reaching the root change it to parent directory
l or RETexpand directory
Lselect next sibling
Rmake a directory the root directory
¦open file in an vertically split window
-open file in an horizontally split window
Quick look
cCreate node
dDelete a node
rRename a node
grRefresh

Org Mode

KeyDescriptionStatus

Project

KeyDescriptionStatus
SPC p tOpen NeoTree to project root directory
SPC p aToggle between implementation and test

Renaming files in a directory

  • browse for a directory using SPC f f
  • enter wdired with C-c C-e
  • edit the file names and use C-c C-c to confirm the changes
  • use C-c C-k to abort any changes

Replacing Text in Several Files

  • initiate a search with SPC /
  • enter in edit mode with C-c C-e
  • go to the occurrence and enter in iedit state with SPC s e
  • edit the occurrences then leave the iedit state
  • press C-c C-c

Search

KeyDescriptionStatus
SPC s cClear search highlight
SPC s eedit all occurrences of the current symbol
SPC s sHelm Swoop
SPC p RReplace a string in all files in project

Shell

KeyDescriptionStatus
SPC p ’Open shell in project root

Source Code

KeyDescriptionStatus
z fMake current function or comments visible in buffer as much as possible

TRAMP

KeyDescriptionStatus
SPC f f /ssh:<hostname>:/path/to/fileEdit a file using TRAMP

Transient States

KeyTransient StateStatus
SPC b .Buffer
SPC w .Window
SPC lLayouts
S-M-SPCHelm (while in helm mode)
SPC e .Errors

User Interface

KeyDescriptionStatus
SPC T FToggle full screen

Version Control

KeyDescriptionStatus

Windows

KeyDescriptionStatus
SPC w h/j/k/lNavigate between windows
SPC w H/J/K/Lmove windows
SPC w =balance split windows
SPC w rrotate windows forward
SPC w Rrotate windows backward
SPC w shorizontal split
SPC w Shorizontal split and focus new window
SPC w vvertical split
SPC w Vvertical split and focus new window

CIDER

Org Mode

Source

KeyTransient StateStatus
SPC a o aAgenda List
SPC a o cCapture
SPC a o oAgenda Menu
SPC a o tTodo List
SPC C cCapture
C-c RETInsert Heading
SPC m ^Sort
SPC m dDeadline
SPC m sSchedule
SPC m fSet Effort
SPC m lOpen Link at Point
SPC m S lDemote Subtree
SPC m S hDemote Subtree
SPC m S jMove Subtree Up
SPC m S jMove Subtree Down
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment