Introduction
My primary code editor as of Nov 18 2024. It is great. I will document all the tricks I know here that I may forget due to infrequent use. I use Spacemacs framework so a subset of the shortcuts listed here are from that framework.
- Update (20 November 2024): I switched to my own config, ditching Spacemacs.
- Update (24 November 2024): I switched from Evil Mode to Meow Mode.
- Update (18 November 2024): I switched from Meow Mode to Boon Mode.
General
M-x s d
see the diff of the current buffer and its corresponding fileM-q
wrap the content at the cursorM-x set-fill-column
set max length. 88 recommendedC-x h
select all content of the bufferC-u M-!
insert output of a shell command into buffer
Editing and Surrounding
M-' s
add or remove surrounding textM-' T
apply title case to a regionM-' u u
remove trailing whitespaceM-' u a
align by regular expressionM-' u s
perform a find-and-replaceM-' u S
perform a regex find-and-replace
Navigation
M-' n t
jump to a character pair usingavy
M-' n T
jump with a character timer usingavy
M-' n I
search text usingswiper
M-' n a
search or grep usingcounsel
M-' n i
jump to files usingcounsel
M-' n n
manage bookmarks usingcounsel
M-' n f
open recent files or buffers usingcounsel
File and Buffer Management
M-' f
open file in DiredM-' y
editpost-init.el
fileM-' Y
reload configurationM-' q
quit windowM-' Q
exit EmacsM-' TAB
switch to the previous bufferM-' k p
close current bufferM-' k P
kill another bufferM-' k T
delete a bookmarkM-' k m
open messages bufferM-' k s
switch to scratch buffer
Window Management
M-' w n
move window focus downwardM-' w e
move window focus upwardM-' w h
move window focus rightwardM-' w i
move window focus leftwardM-' w y
delete window
Compilation and Error Navigation
M-' c y
toggle compilation windowM-' c s
switch to compilation bufferM-' c c
compileM-' c n
jump to the next errorM-' c e
jump to the previous errorM-' c k
kill compilation
Language Server Protocol (LSP)
M-' l l
start theeglot
LSP clientM-' l s
stopeglot
M-' l d
show documentation witheldoc
M-' l r
rename usingeglot
M-' l R
reconnecteglot
M-' l f
format buffer witheglot
M-' l i
organize imports witheglot
Custom and Miscellaneous Commands
M-' h t
use custom paging commandsM-' h n
open number editing HydraM-' h T
open TODO management HydraM-' h h
clear search highlights