You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[1] In isearch, C-w copies current word into search. C-M-w copies current symbol. So, to
search a symbol, assuming you are at the beginning of it, you can C-s C-M-w which is
surprisingly quick.
Mark
C-SPC
push mark activate
C-M-S-SPC [1]
push mark no activate
C-u C-SPC [2]
pop mark (go back)
C-x C-x
exchange point and mark
M-@
mark to end of word
C-M-.
mark whole symbol
custom
C-M-l
mark whole line
custom
M-h
mark whole paragraph
C-M-SPC
mark expression (also C-M-@)
C-M-h
mark function
C-x h
mark buffer
C-M-y
mark last paste
custom
C-’ [3]
expand region
package
C-”
contract region
package
C-x SPC
rectangle mark mode
[1] This could be a good candidate or C-. which seems very point related. I’ve chosen this
because it is related to C-u C-SPC which you’d use to come back to the mark.
[2] Because set-mark-command-repeat-pop is t, subsequent C-SPC presses (without C-u) will
continue to pop the mark.
[3] Combobulate mode replaces this with its own expand region, so the behavior may be
different between text and programming modes.
Clipboard
C-w
kill region or line [1]
M-w
copy region or line [1]
C-y
yank
M-y
yank-pop or browse kill ring [2]
C-S-Del
kill whole line
can also use C-w
M-k
kill sentence
taken over by combobulate
C-x Del
kill to beginning of sentence
M-z
kill to char
inclusive
M-Z
kill up to char
exclusive
C-c f
file-info-show
file-info - has commands for copying buffer name, etc.
[1] We’re using whole-line-or-region, so C-w and M-w will kill or copy the entire line if
nothing is selected. This is super handy when you get used to it. They also take
numeric arguments, so C-u 3 M-w copies three lines.
[2] M-y after C-y starts cycling through the kill ring. Recent Emacs versions allow you to
press M-y first and browse the kill ring.
Copying the current filename
These copy commands are used in buffers associated with a file. They don’t (yet) work in
dired. They start with ‘y’ like C-y and like Spacemacs, Doom, and our vi keys.
C-c y y
fully qualified path
C-c y n
filename only
C-c y d
directory
C-c y Y
project relative path
C-c y D
project relative directory
Editing
S-return
open below
M-S-return
open above
C-M-S-o or C-x C-o
delete blank lines
M-”
surround
C-x Tab or M-S-i
indent rigidly
iedit
C-M-S-i
iedit
again to complete
C-c f
restrict to function
custom
C-c l
restrict to line
custom
C-’
show only matching lines
Org Mode
Move to Heading
I think we should map the sexp keys to heading movement keys.
up
C-c C-u
prev/next, all levels
C-c C-n/p
back/forward, same level
C-c C-b/f
Working with Subtrees
promote / demote subtree, including children
M-S-left/right
promote / demote node, not children
M-left/right
move
M-S-up/down
mark
C-c @
kill / copy
C-c C-x C-w/M-w
narrow to subtree
C-x n s
archive subtree
C-x C-c C-s
I had to remap something to moving a subtree up and down. M-S-up normally drags a single
line up. That isn’t something I want to do, so I’ve remapped it. I could have used
C-S-up/down which is only for modifying timestamps, but M-S matches the promote / demote so
it will help me remember it.
Tables
re-align table
C-c C-c
SQL
start sql
C-c ns (new sql buffer) - I’m not liking the ‘n’
associate with buffer
C-c s
There is nothing bound to C-c s and C-c C-s is only used in org mode for scheduling. SQL
buffers are important enough to us that we could use either of these.
Miscellaneous
C-h x
describe for command; doesn’t show functions
open url
M-g x
messages buffer
C-h e (echo area messages)
Potential Keys
To help organize keys into mnemonic groups and see what is available, I’m maintaining the
current bindings here.
The custom column is populated if it is not a standard Emacs binding. It has the word
“custom” if it is a custom binding to an existing Emacs function or a custom function in
init.el. Otherwise it is the name of the package the command comes from, whether I bound it
or it is a package default.
Key Bindings By Modifier
C
Key
Bindings
Custom
Available
C-SPC
set mark
C-@
set mark
C-]
abort recursive edit
C-”
contract region
expand-region
C-’
expand region
expand-region
C-.
binky-go
binky
C-,
binky-add
binky
C-< (C-S-,)
<
C- > (C-S-.)
>
C-;
goto change
gotochg
C-/
undo
C-?
redo
C-a - C-h
standard keys
C-i
avy word 2
avy
C-j
newline and indent
j
C-k - C-l
standard keys
C-m
newline
C-n
standard key
C-o
window keymap
C-p - C-y
standard keys
C-z
z
M
Key
Binding
Custom
Available
M-SPC
cycle spacing
M-!
shell command
M-”
surround
surround
M-’
eat (terminal)
eat
M-$
ispell word
M-%
query replace
M-&
async shell command
M-(
insert parens
(
M-)
move past close and re-indent
)
M-,
xref go back
M-.
xref goto def
M-/
dabbrev expand
M-:
eval-expression
M-;
comment
M-?
xref find references
M-@
mark word
M-\
delete horizontal space
M-^
delete indentation
M-`
Is Alt-tab on my keyboard
M-a - M-f
standard keys
M-g
prefix
M-h
mark paragraph
M-i
avy word 2
avy
M-j - M-m
standard keys
M-o
other window
custom
M-p - M-y
standard keys
M-z
zap to char
M-S
Most of these are available.
Key
Bindings
Custom
Available
M-S-RET
open above
custom
M-S-a - M-S-h
a-h
M-S-i
indent rigidly
custom
M-S-j - M-S-w
j-w
M-S-x
extended command for buffer
M-S-y
my-clean-copy
custom
M-S-z
zap up to
custom
[1] This is the same as M-j but seems easier to press. I might migrate to this and free up
M-j.
*** C-S
I’m pretty sure these are available.
Key
Bindings
Custom
Available
C-S-SPC
SPC
C-S-.
C-S-,
C-S-; C-:
flyspell
:
C-S-BS
delete whole line
C-S-a - C-S-r
a-r
C-S-s
consult line
consult
C-S-t - C-S-y
t-y
C-S-z
redo
custom
C-M
I’d like to use these for sexp, point, and marking related functions.
Key
Bindings
Custom
Available
C-M-SPC
mark sexp
C-M-@
mark sexp
C-M-’
’
C-M-”
”
C-M-,
xref go forward
C-M-.
my mark symbol
custom
C-M-/
dabbrev expand all
/ ?
C-M-0 - 9
goto tab bar tab
custom
C-M-a
beginning of function
C-M-b
backward sexp
C-M-c
exit recursive edit
C-M-d
down list
C-M-e
end of function
C-M-f
forward sexp
C-M-g
g
C-M-h
mark function
C-M-i
flyspell
i
C-M-j
default indent new line
j ?
C-M-k
kill sexp
C-M-l
mark line
custom
C-M-m
evilmi-jump-items-native
evil-matchit
C-M-n
forward list
C-M-o
split line
o
C-M-p
backward list
C-M-q
indent-pp-sexp
q
C-M-r
isearch backward regexp
C-M-s
isearch symbol at point
custom
C-M-t
transpose sexps
C-M-u
backward up list
C-M-v
scroll other window
C-M-w
append next kill
C-M-x
eval-defun
C-M-y
mark yank
mark-yank
C-M-z
z
C-M-S
Key
Bindings
Custom
Available
C-M-S-SPC
push mark no activate
custom
C-M-S-a
C-M-s-i
iedit mode
iedit
C-M-S-l
recenter other window
C-M-S-o
delete blank lines
custom
C-M-S-v
scroll other window down
C-c
Key
Bindings
Custom
Available
C-c ’
poporg
C-c a
align & app prefix
custom
C-c i
insert prefix
C-c l
org store link
C-c o
org commands
C-c n
new prefix
C-c t
toggle prefix
C-c y
copy prefix
custom
Align and App
Key
Bindings
Custom
Available
C-c a =
align assignments
custom
C-c a m
app - notmuch (mail)
custom
C-c a w
align whitespace
custom
Insert
Key
Bindings
Custom
Available
C-c i T
insert time
C-c i d
insert date
C-c i r
insert random number
C-c i t
insert timestamp
C-c i u
insert UUID
New
Key
Bindings
Custom
Available
C-c n n
new buffer
custom
C-c n s
new SQL buffer
custom
Toggles
Key
Bindings
Custom
Available
C-c t c
color identifiers mode
custom
C-c t h
auto highlight symbol mode
custom
C-c t n n
toggle line numbers
C-c t n r
toggle relative line numbers
q
Key Bindings By Character
There are some characters that have a ton of bindings, so it helps to see them to keep them
straight.
I
Key
Bindings
Custom
Available
C-i
imenu
custom
M-i
avy goto word 2
avy
C-M-i
flyspell autocorrect word
C-M-i
C-S-i
C-S-i
M-S-i
indent rigidly
custom
C-M-S-i
iedit
custom
The three I set are all mnemonic and are all things I use very often. imenu is a primary
means of navigation for me.
O
Key
Bindings
Custom
Available
C-o
prefix
M-o
other window
custom
C-M-o
splitline
C-M-o ?
C-S-o
C-S-o
M-S-o
M-S-o
C-M-S-o
delete blank lines
custom
I’ve chosen M-o for other window because it is one of the most convenient keys and is
mnemonic with other-window.
Switching buffers (consult buffer) is similar, so it seemed natural to add an easy modifier
shift for it.
I set delete blank lines because it is normally C-x C-o, so some ‘o’ seemed best. The
default key is a bit harder to hit when typing properly and switching hands for control.
And I use it a lot.
Symbols
Symbols on the Planck QWERTY layer: SPC ;’,./
SPC
Key
Bindings
Custom
Available
C-SPC
set mark
M-SPC
cycle spacing
C-M-SPC
mark sexp
C-S-SPC
C-S-SPC
C-M-S-SPC
push mark no activate
custom
1Password registers C-S-SPC as a hotkey at the OS level, but I’ve turned that off.
;
Key
Bindings
Custom
Available
C-;
goto last change
gotochg
M-;
comment dwim
whole line or region
C-S-; C-:
flyspell correct previous
C-M-;
C-M-;
M-S-; M-:
eval expression
custom
C-M-S-; C-M-:
C-M-:
‘
Key
Bindings
Custom
Available
C-’
expand region
expand-region
M-’
eat (terminal)
eat
C-S-’ C-”
contract region
expand-region
C-M-’
C-M-’
M-S-’ M-”
surround
surround
C-M-S-’ C-M-”
C-M-”
,
Key
Bindings
Custom
Available
C-,
binky-add
binky
M-,
xref go back
C-M-,
xref go forward
C-M-,
C-S-, C-<
C-<
M-S-, M-<
beginning of buffer
C-M-S-, C-M-<
C-M-<
.
Key
Bindings
Custom
Available
C-.
binky-go
binky
M-.
xref goto def
C-M-.
my mark symbol
custom
C-S-. C- >
C-S-.
M-S-. M- >
beginning of buffer
C-M-S-. C-M- >
C-M-S-.
The bindings with ‘>’ have a space to keep them from turning into ligature arrows.