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 Helix

Select, then act

As in Helix, 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.
  • v enters Select mode, where 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.

The same keys start a sequence: [, ], C-w, g, m, space and z. After you press one, a box at the bottom right shows the keys that can come next. Keys are spelled the same way too: A-x for Alt, C-x for Control, S-tab for Shift, and names such as space, esc and minus.

What differs

dk has a Block mode. C-v enters it and puts a Range on each line of a rectangle.

Command names in the [keys] table of config.toml are kebab-case, with whole words. Helix’s move_char_left is move-character-left in dk, and goto_prev_function is goto-previous-function. The Manual lists every name.

Where a key in the table below does something different in dk, the note on its row says what dk does.

Keys

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

TaskHelixdkNote
move left one graphemeh or lefth or left
move down one linej or downj or down
move up one linek or upk or up
move right one graphemel or rightl or right
select to before the next match of the next keytt
select to the next match of the next keyff
select back to after the match of the next keyTT
select back to the match of the next keyFF
replace each character of the selection with the next keyrr
put the register in place of each selectionRR
run the last motion againA-.A-.
switch the case of each selection~~
make each selection lower case``
make each selection upper caseA-`A-`
go to the start of the linehomehome
go to the last grapheme of the lineendend
select to the start of the next wordww
select to the start of the previous wordbb
select to the end of the next wordee
select to the start of the next long wordWW
select back to the start of a long wordBB
select to the end of the next long wordEE
enter Select modevv
go to line N with a count, or to the last lineGGWith no count, dk goes to the last line.
go to the first line, or to line N with a countg gg g
go to grapheme N of the lineg |g |
go to the last lineg eg e
open the file named at the cursor or by each selectiong fg f
go to the start of the lineg hg h
go to the last grapheme of the lineg lg l
go to the first character of the line that is not whitespaceg sg s
go to the definition of the symbolg dg d
go to the declaration of the symbolg Dg D
go to the type definition of the symbolg yg y
go to the references of the symbolg rg r
go to the implementation of the symbolg ig i
go to the top of the viewg tHdk puts the cursor on the first character of the line that is not whitespace.
go to the middle of the viewg cMdk puts the cursor on the first character of the line that is not whitespace.
go to the bottom of the viewg bLdk puts the cursor on the first character of the line that is not whitespace.
show the document that the view showed lastg ag a
show the document that the view left last with a changeg mg m
show the next open documentg ng n
show the previous open documentg pg p
move up one text lineg kg k
move down one text lineg jg j
go to the revision position of the current revisiong .g .
go to a two-character labelg wg w
open the prompt::
enter Insert modeii
insert at the first character of the lineII
insert after the selectionaa
insert at the end of the lineAA
add a line below each range, then insertoo
add a line above each range, then insertOO
delete the selectiondd
delete the selection with no yankA-dA-d
delete the selection, then insertcc
delete the selection with no yank, then insertA-cA-c
add a range on the line below each rangeCC
add a range on the line above each rangeA-CA-C
select each regex match inside the selectionsss
split the selections into their linesA-sA-s
merge the selections into oneA-minusA-minus
merge the selections that touchA-_A-_
split the selections at each regex matchSS
make each selection a cursor;;
swap the anchor and the cursor of each selectionA-;A-;
select the parent syntax node of each selectionA-o or A-upA-o or A-up
go back to the selection before A-o, or select the first child nodeA-i or A-downA-i or A-down
select each named child node of each selectionA-I or A-S-downA-I or A-S-down
select the previous named sibling nodeA-p or A-leftA-p or A-left
select the next named sibling nodeA-n or A-rightA-n or A-right
select each named sibling node of each selectionA-aA-a
select the whole text%%
select the line, or add the line belowxx
select the whole lines of each selectionXX
shrink each selection to the whole lines in itA-xA-x
go to the bracket that matches the one at the cursorm mm m
surround each selection with the pair of the next keym sm s
replace the pair of the next key around each selectionm rm r
delete the pair of the next key around each selectionm dm d
select around the object of the next keym am a
select inside the object of the next keym im i
go to the previous change[ g[ g
go to the first change[ G[ G
go to the previous function[ f[ f
go to the previous type definition[ t[ t
go to the previous parameter[ a[ a
go to the previous comment[ c[ c
go to the previous pairing[ e[ e
go to the previous test[ T[ T
go to the previous paragraph[ p[ p
go to the previous (X)HTML element[ x[ x
go to the next change] g] g
go to the last change] G] G
go to the next function] f] f
go to the next type definition] t] t
go to the next parameter] a] a
go to the next comment] c] c
go to the next pairing] e] e
go to the next test] T] T
go to the next paragraph] p] p
go to the next (X)HTML element] x] x
search for a regex//
search back for a regex??
select the next search matchnn
select the previous search matchNN
use the selection as the search pattern, with word boundaries**
use the selection as the search patternA-*A-*
undo the last changeuu
redo the last undone changeUU
move back to the change made beforeA-uA-u
move on to the change made afterA-UA-U
yank the selection to the registeryy
paste the register after each selectionpp
paste the register before each selectionPP
indent the lines of each selection>>
unindent the lines of each selection<<
format the selection with a language server==
join the lines of each selectionJJ
join the lines of each selection and select the spacesA-JA-J
keep the selections that match a regexKK
remove the selections that match a regexA-KA-K
keep only the primary range,,
remove the primary selectionA-,A-,
align the selections of each line in columns&&
trim the whitespace of each selection__
make the previous selection primary((
make the next selection primary))
move the text of each selection to the previous oneA-(A-(
move the text of each selection to the next oneA-)A-)
scroll up one pageC-b or pageupC-b or pageup
scroll down one pageC-f or pagedownC-f or pagedown
scroll and move every range up half a pageC-uC-u
scroll and move every range down half a pageC-dC-d
focus the next viewC-w C-w or C-w wC-w C-w or C-w w
split the view: the new view goes belowC-w C-s or C-w sC-w C-s or C-w s
split the view: the new view goes to the rightC-w C-v or C-w vC-w C-v or C-w v
close the viewC-w C-q or C-w qC-w C-q or C-w q
close every other viewC-w C-o or C-w oC-w C-o or C-w o
focus the view to the leftC-w h or C-w leftC-w h or C-w left
focus the view belowC-w j or C-w downC-w j or C-w down
focus the view aboveC-w k or C-w upC-w k or C-w up
focus the view to the rightC-w l or C-w rightC-w l or C-w right
swap the view with the view to the rightC-w LC-w Ldk moves the view to the far right, with the full height.
swap the view with the view aboveC-w KC-w Kdk moves the view to the top, with the full width.
swap the view with the view to the leftC-w HC-w Hdk moves the view to the far left, with the full height.
swap the view with the view belowC-w JC-w Jdk moves the view to the bottom, with the full width.
comment or uncomment the lines of each selectionC-cC-c
go to the next jump on the jumplistC-i or tabC-i or tab
go back to the jump before on the jumplistC-oC-o
save the selection to the jumplistC-sC-s
pick a file of the workspacespace fspace f
pick a file under the directory of the documentspace Fspace F
pick an open documentspace bspace b
pick a jump of the jumplistsspace jspace j
pick a symbol of the documentspace sspace s
pick a symbol of the workspacespace Sspace S
pick a diagnostic of the documentspace dspace d
pick a diagnostic of an open documentspace Dspace D
pick a file that the working copy changesspace gspace gdk lists the files that the jj working copy changes.
pick a code action of the language serversspace aspace a
open the picker that closed lastspace 'space '
yank the selection to the system clipboardspace yspace y
yank the primary selection to the system clipboardspace Yspace Y
paste the system clipboard after each selectionspace pspace p
paste the system clipboard before each selectionspace Pspace P
put the system clipboard in place of each selectionspace Rspace R
search the working directory for a regexspace /space /
show docs for the item under the cursorspace kspace k
rename the symbol under the cursor with a language serverspace rspace r
select each use of the symbol under the cursorspace hspace h
comment or uncomment the lines of each selectionspace cspace c
pick a command and run itspace ?space ?
show the change of the cursor linespace Bspace B
put the cursor line on the middle row of the viewz z or z cz z or z c
put the cursor line on the first row of the viewz tz t
put the cursor line on the last row of the viewz bz b
put the cursor column in the middle of the viewz mz m
scroll the view up a count of linesz k or z upz k or z up
scroll the view down a count of linesz j or z downz j or z down
scroll up one pagez C-b or z pageupz C-b or z pageup
scroll down one pagez C-f or z pagedownz C-f or z pagedown
scroll and move every range up half a pagez C-u or z backspacez C-u or z backspace
scroll and move every range down half a pagez C-d or z spacez C-d or z space
search for a regexz /z /
search back for a regexz ?z ?
select the next search matchz nz n
select the previous search matchz Nz N
put the cursor line on the middle row of the viewZ z or Z cZ z or Z c
put the cursor line on the first row of the viewZ tZ t
put the cursor line on the last row of the viewZ bZ b
put the cursor column in the middle of the viewZ mZ m
scroll the view up a count of linesZ k or Z upZ k or Z up
scroll the view down a count of linesZ j or Z downZ j or Z down
scroll up one pageZ C-b or Z pageupZ C-b or Z pageup
scroll down one pageZ C-f or Z pagedownZ C-f or Z pagedown
scroll and move every range up half a pageZ C-u or Z backspaceZ C-u or Z backspace
scroll and move every range down half a pageZ C-d or Z spaceZ C-d or Z space
search for a regexZ /Z /
search back for a regexZ ?Z ?
select the next search matchZ nZ n
select the previous search matchZ NZ N
pick the register of the next command""
run the command for each selection, with its text as stdin, and put the output in its place||
run the command for each selection, with its text as stdin, and drop the outputA-|A-|
run the command once, and put its output before each selection!!
run the command once, and put its output after each selectionA-!A-!
stop dk and go back to the shell; fg brings it backC-zC-z
increment item under cursorC-aC-a
decrement item under cursorC-xC-x
extend left one graphemev h or v leftv h or v left
extend down one linev j or v downv j or v down
extend up one linev k or v upv k or v up
extend right one graphemev l or v rightv l or v right
extend to the start of the next wordv wv w
extend to the start of the previous wordv bv b
extend to the end of the next wordv ev e
extend to the start of the next long wordv Wv W
extend back to the start of a long wordv Bv B
extend to the end of the next long wordv Ev E
add the next search match as a selectionv nv n
add the previous search match as a selectionv Nv N
extend to before the next match of the next keyv tv t
extend to the next match of the next keyv fv f
extend back to after the match of the next keyv Tv T
extend back to the match of the next keyv Fv F
extend to the start of the linev homev home
extend to the end of the linev endv end
return to Normal modev escv esc
return to Normal modev vv v
extend to the first line, or to line N with a countv g gv g g
extend to grapheme N of the linev g |v g |
extend to the last linev g ev g e
extend up one text linev g kv g k
extend down one text linev g jv g j
extend to a two-character labelv g wv g w
return to Normal modei esci esc
make an undo step of the text typed so fari C-si C-s
ask the language servers for completionsi C-xi C-x
paste a register at each cursori C-ri C-r
delete back to the start of the wordi C-w or i A-backspacei C-w or i A-backspace
delete to the end of the wordi A-d or i A-deli A-d or i A-del
delete back to the indent, then to the line starti C-ui C-u
delete to the end of the linei C-ki C-k
delete the grapheme before the cursori C-h or i backspace or i S-backspacei C-h or i backspace or i S-backspace
delete the grapheme at the cursori C-d or i deli C-d or i del
add a line breaki C-j or i reti C-j or i ret
select the next tab stop of the snippeti tabi tab
insert a tab, or spaces to the next indent columni S-tabi S-tab
move up one linei upi up
move down one linei downi down
move left one graphemei lefti left
move right one graphemei righti right
scroll up one pagei pageupi pageup
scroll down one pagei pagedowni pagedown
go to the start of the linei homei home
go to the line endingi endi end

Keys without a counterpart

dk has no match for these Helix keys:

  • $, which filters the selections with a shell command.
  • [ d, [ D, ] d and ] D, which go to a diagnostic. Use space d to pick one of the diagnostics in the document.
  • [ space and ] space, which add a newline above and below.
  • A-:, which makes each selection face forward. dk has the command ensure-ranges-forward for this. It has no default key, so bind it in [keys] if you want it.
  • A-b and A-e, which move to the start and the end of the parent syntax node.
  • C-w C-h, C-w C-j, C-w C-k and C-w C-l. Use C-w h, C-w j, C-w k and C-w l to move the focus between views.
  • C-w f, C-w F, C-w n and C-w t.
  • esc in Normal mode.
  • Q and q, which record and replay a macro.
  • space . and space e, which open the file explorer.
  • space A-c and space C, which comment and uncomment lines and blocks. In dk, C-c and space c toggle comments.
  • space G, which starts the debugger keys.
  • space w, which repeats the C-w keys.

Config

dk reads config.toml from ~/.config/ductus/. It has the same theme, keys and editor as a Helix config. A key that dk does not read gets a note on the last row, and the rest of the file still loads.

Helix’s bufferline has no counterpart. dk’s tabline is for tab pages, not buffers.

dk shows a language server’s diagnostics after the text of their line, and [editor] has no option to change that.

Options with a counterpart

These options have the same name and the same place in dk, under [editor]. Where the default differs, the note says how.

OptionNote
auto-completion
auto-format
auto-info
auto-pairs
clipboard-provider
color-modesOff in Helix, on in dk.
completion-replace
completion-timeout
completion-trigger-len
default-yank-register
file-picker.deduplicate-links
file-picker.follow-symlinks
file-picker.git-exclude
file-picker.git-global
file-picker.git-ignore
file-picker.hidden
file-picker.ignore
file-picker.max-depth
file-picker.parents
gutters.layout
gutters.line-numbers.min-width
indent-heuristic
inline-blame.auto-fetch
inline-blame.format{author} and {commit} in Helix, {author-short} and {change} in dk.
inline-blame.show
jump-label-alphabet
line-number
lsp.auto-document-highlightOff in Helix, on in dk.
lsp.auto-signature-help
lsp.display-signature-help-docs
lsp.goto-reference-include-declaration
lsp.snippets
middle-click-paste
mouse
mouse-yank-register
popup-bordernone in Helix, popup in dk.
preview-completion-insert
rainbow-bracketsOff in Helix, on in dk.
rulers
scrolloff
search.smart-case
search.wrap-around
shell
smart-tab.enable
smart-tab.supersede-menu
soft-wrap.enable
soft-wrap.max-indent-retain
soft-wrap.max-wrap
soft-wrap.wrap-at-text-width
soft-wrap.wrap-indicator
statusline.center
statusline.leftdk’s default adds spacer and version-control.
statusline.mode.insert
statusline.mode.normal
statusline.mode.select
statusline.rightdk’s default adds total-line-numbers and file-type.
statusline.separator
text-width

Options without a counterpart

dk does not read these Helix [editor] options:

  • atomic-save
  • auto-save.*
  • buffer-picker.start-position
  • bufferline
  • continue-comments
  • cursor-shape
  • cursorcolumn
  • cursorline
  • default-line-ending
  • editor-config
  • end-of-line-diagnostics
  • file-explorer.*
  • idle-timeout
  • indent-guides.*
  • inline-diagnostics.*
  • insert-final-newline
  • kitty-keyboard-protocol
  • lsp.display-color-swatches
  • lsp.display-inlay-hints
  • lsp.display-messages
  • lsp.display-progress-messages
  • lsp.enable
  • lsp.inlay-hints-length-limit
  • path-completion
  • scroll-lines
  • statusline.diagnostics
  • statusline.workspace-diagnostics
  • terminal.*
  • trim-final-newlines
  • trim-trailing-whitespace
  • true-color
  • undercurl
  • whitespace.*
  • word-completion.*
  • workspace-lsp-roots
  • workspace-trust.*

languages.toml

dk reads languages.toml from the same directory. Your languages and grammars join the shipped ones, and a [[language]] with a shipped name changes only the keys it sets. The tables are the same as in Helix: [[language]], [language-server.<name>], [[grammar]] and use-grammars.

In a [[language]], dk reads these keys: auto-format, auto-pairs, block-comment-tokens, comment-token, comment-tokens, file-types, formatter, grammar, hoist-locals, indent, injection-regex, language-id, language-servers, name, rainbow-brackets, roots, rulers and shebangs. In a [language-server.<name>] it reads args, command, config, environment and timeout, and in a [[grammar]] the name and the source. Helix has no hoist-locals key; that one is dk’s own.

Keys of languages.toml without a counterpart

dk does not read these Helix keys:

  • code-actions-on-save, debugger, diagnostic-severity, path-completion, persistent-diagnostic-sources, scope, soft-wrap, text-width, word-completion and workspace-lsp-roots of a [[language]].
  • language-server.required-root-patterns of a [language-server.<name>].
  • only-features and except-features of an entry of language-servers.