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.Cadds a selection on the line below each one, at the same display column.Kkeeps the selections whose text matches, andA-Kremoves them.sopens theselect:prompt, and each regex match inside each selection becomes a selection.Ssplits 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.
| Kakoune | What it does | dk |
|---|---|---|
h | move left | h |
j | move down | j |
k | move up | k |
l | move right | l |
H | extend left | v h |
J | extend down | v j |
K | extend up | v k |
L | extend right | v l |
t | select to next character | t |
f | select to next character included | f |
T | extend to next character | v t |
F | extend to next character included | v f |
<a-t> | select to previous character | T |
<a-f> | select to previous character included | F |
<a-T> | extend to previous character | v T |
<a-F> | extend to previous character included | v F |
d | erase selected text | d |
<a-d> | erase selected text, without yanking | A-d |
c | change selected text | c |
<a-c> | change selected text, without yanking | A-c |
i | insert before selected text | i |
I | insert at line begin | I |
a | insert after selected text | a |
A | insert at line end | A |
o | insert on new line below | o |
O | insert on new line above | O |
r | replace with character | r |
y | yank selected text | y |
p | paste after selected text | p |
P | paste before selected text | P |
R | replace selected text with yanked text | R |
s | select regex matches in selected text | s |
S | split selected text on regex matches | S |
<a-s> | split selected text on line ends | A-s |
. | repeat last insert command | . |
<a-.> | repeat last object select/character find | A-. |
% | select whole buffer | % |
: | enter command prompt | : |
| | pipe each selection through filter and replace with output | | |
<a-|> | pipe each selection through command and ignore output | A-| |
! | insert command output | ! |
<a-!> | append command output | A-! |
, | remove all selections except main | , |
<a-,> | remove main selection | A-, |
; | reduce selections to their cursor | ; |
<a-;> | swap selections cursor and anchor | A-; |
<a-_> | merge consecutive selections | A-_ |
w | select to next word start | w |
e | select to next word end | e |
b | select to previous word start | b |
W | extend to next word start | v w |
E | extend to next word end | v e |
B | extend to previous word start | v b |
<a-w> | select to next WORD start | W |
<a-e> | select to next WORD end | E |
<a-b> | select to previous WORD start | B |
<a-W> | extend to next WORD start | v W |
<a-E> | extend to next WORD end | v E |
<a-B> | extend to previous WORD start | v B |
<a-l> | select to line end | v g l |
<a-h> | select to line begin | v g h |
x | extend selections to whole lines | x |
<a-x> | crop selections to whole lines | A-x |
m | select to matching character | m m |
M | extend to matching character | v m m |
/ | select next given regex match | / |
? | extend with next given regex match | v / |
<a-/> | select previous given regex match | ? |
<a-?> | extend with previous given regex match | v ? |
n | select next current search pattern match | n |
N | extend with next current search pattern match | v n |
<a-n> | select previous current search pattern match | N |
<a-N> | extend with previous current search pattern match | v N |
* | set search pattern to main selection content | * |
<a-*> | set search pattern to main selection content, do not detect words | A-* |
u | undo | u |
U | redo | U |
<c-k> | move backward in history | A-u |
<c-j> | move forward in history | A-U |
<a-i> | select inner object | m i |
<a-a> | select whole object | m a |
<a-j> | join lines | J |
<a-J> | join lines and select spaces | A-J |
<a-k> | keep selections matching given regex | K |
<a-K> | keep selections not matching given regex | A-K |
<lt> | deindent | < |
<gt> | indent | > |
<c-i> | jump forward in jump list | C-i |
<c-o> | jump backward in jump list | C-o |
<c-s> | push current selections in jump list | C-s |
( | rotate main selection backward | ( |
) | rotate main selection forward | ) |
<a-(> | rotate selections content backward | A-( |
<a-)> | rotate selections content forward | A-) |
` | convert to lower case in selections | ` |
~ | convert to upper case in selections | A-` |
<a-`> | swap case in selections | ~ |
& | align selection cursors | & |
_ | trim selections | _ |
C | duplicate selections on the lines that follow them. | C |
<a-C> | duplicate selections on the lines that precede them. | A-C |
<pageup> | scroll one page up | pageup |
<pagedown> | scroll one page down | pagedown |
<c-b> | scroll one page up | C-b |
<c-f> | scroll one page down | C-f |
<c-u> | scroll half a page up | C-u |
<c-d> | scroll half a page down | C-d |