Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

From Kakoune

What dk keeps

As in Kakoune, you select the text first and then act on the selection. w, b and e select by words, and x selects the lines of each selection. Then d deletes the selection, c deletes it and enters Insert mode, and y yanks it.

dk has multiple selections too. Each selection is a Range, and every key acts on all of them:

  • , keeps only the primary selection.
  • C adds a selection on the line below each one, at the same display column.
  • K keeps the selections whose text matches, and A-K removes them.
  • s opens the select: prompt, and each regex match inside each selection becomes a selection. S splits each selection at the matches.
  • Alt and a click add a cursor.

What differs

Kakoune extends a selection with the capital letter, such as W and H. dk has a Select mode for that. v enters it, and there h, j, k, l, w, b, e, W, B and E extend every selection instead of moving it. Esc or v takes you back to Normal mode. So Kakoune’s W is v w in the table below.

Kakoune spells an Alt key as <a-x>. In dk the key name is A-x, and a Control key is C-x.

Keys

The table lists the Kakoune keys that have a close match in dk. The dk column has only default keys.

KakouneWhat it doesdk
hmove lefth
jmove downj
kmove upk
lmove rightl
Hextend leftv h
Jextend downv j
Kextend upv k
Lextend rightv l
tselect to next charactert
fselect to next character includedf
Textend to next characterv t
Fextend to next character includedv f
<a-t>select to previous characterT
<a-f>select to previous character includedF
<a-T>extend to previous characterv T
<a-F>extend to previous character includedv F
derase selected textd
<a-d>erase selected text, without yankingA-d
cchange selected textc
<a-c>change selected text, without yankingA-c
iinsert before selected texti
Iinsert at line beginI
ainsert after selected texta
Ainsert at line endA
oinsert on new line belowo
Oinsert on new line aboveO
rreplace with characterr
yyank selected texty
ppaste after selected textp
Ppaste before selected textP
Rreplace selected text with yanked textR
sselect regex matches in selected texts
Ssplit selected text on regex matchesS
<a-s>split selected text on line endsA-s
.repeat last insert command.
<a-.>repeat last object select/character findA-.
%select whole buffer%
:enter command prompt:
|pipe each selection through filter and replace with output|
<a-|>pipe each selection through command and ignore outputA-|
!insert command output!
<a-!>append command outputA-!
,remove all selections except main,
<a-,>remove main selectionA-,
;reduce selections to their cursor;
<a-;>swap selections cursor and anchorA-;
<a-_>merge consecutive selectionsA-_
wselect to next word startw
eselect to next word ende
bselect to previous word startb
Wextend to next word startv w
Eextend to next word endv e
Bextend to previous word startv b
<a-w>select to next WORD startW
<a-e>select to next WORD endE
<a-b>select to previous WORD startB
<a-W>extend to next WORD startv W
<a-E>extend to next WORD endv E
<a-B>extend to previous WORD startv B
<a-l>select to line endv g l
<a-h>select to line beginv g h
xextend selections to whole linesx
<a-x>crop selections to whole linesA-x
mselect to matching characterm m
Mextend to matching characterv m m
/select next given regex match/
?extend with next given regex matchv /
<a-/>select previous given regex match?
<a-?>extend with previous given regex matchv ?
nselect next current search pattern matchn
Nextend with next current search pattern matchv n
<a-n>select previous current search pattern matchN
<a-N>extend with previous current search pattern matchv N
*set search pattern to main selection content*
<a-*>set search pattern to main selection content, do not detect wordsA-*
uundou
UredoU
<c-k>move backward in historyA-u
<c-j>move forward in historyA-U
<a-i>select inner objectm i
<a-a>select whole objectm a
<a-j>join linesJ
<a-J>join lines and select spacesA-J
<a-k>keep selections matching given regexK
<a-K>keep selections not matching given regexA-K
<lt>deindent<
<gt>indent>
<c-i>jump forward in jump listC-i
<c-o>jump backward in jump listC-o
<c-s>push current selections in jump listC-s
(rotate main selection backward(
)rotate main selection forward)
<a-(>rotate selections content backwardA-(
<a-)>rotate selections content forwardA-)
`convert to lower case in selections`
~convert to upper case in selectionsA-`
<a-`>swap case in selections~
&align selection cursors&
_trim selections_
Cduplicate selections on the lines that follow them.C
<a-C>duplicate selections on the lines that precede them.A-C
<pageup>scroll one page uppageup
<pagedown>scroll one page downpagedown
<c-b>scroll one page upC-b
<c-f>scroll one page downC-f
<c-u>scroll half a page upC-u
<c-d>scroll half a page downC-d