Quick reference
Category | Identifier | Title | Default keybindings |
---|---|---|---|
dev | dev.copyLastErrorMessage | Copies the last encountered error message | |
dev.setSelectionBehavior | Set the selection behavior of the specified mode | ||
edit | edit.align | Align selections | Shift+7 (editorTextFocus && dance.mode == 'normal' ) |
edit.case.swap | Swap case | Alt+` (editorTextFocus && dance.mode == 'normal' ) | |
edit.case.toLower | Transform to lower case | ` (editorTextFocus && dance.mode == 'normal' ) | |
edit.case.toUpper | Transform to upper case | Shift+` (editorTextFocus && dance.mode == 'normal' ) | |
edit.copyIndentation | Copy indentation | Shift+Alt+7 (editorTextFocus && dance.mode == 'normal' ) | |
edit.deindent | Deindent selected lines | Shift+Alt+, (editorTextFocus && dance.mode == 'normal' ) | |
edit.deindent.withIncomplete | Deindent selected lines (including incomplete indent) | Shift+, (editorTextFocus && dance.mode == 'normal' ) | |
edit.delete | Delete | Alt+D (editorTextFocus && dance.mode == 'normal' ) | |
edit.delete-insert | Delete and switch to Insert | Alt+C (editorTextFocus && dance.mode == 'normal' ) | |
edit.newLine.above.insert | Insert new line above and switch to insert | Shift+O (editorTextFocus && dance.mode == 'normal' ) | |
edit.newLine.below.insert | Insert new line below and switch to insert | O (editorTextFocus && dance.mode == 'normal' ) | |
edit.paste.after | Paste after | ||
edit.paste.after.select | Paste after and select | P (editorTextFocus && dance.mode == 'normal' ) | |
edit.paste.before | Paste before | ||
edit.paste.before.select | Paste before and select | Shift+P (editorTextFocus && dance.mode == 'normal' ) | |
edit.pasteAll.after | Paste all after | ||
edit.pasteAll.after.select | Paste all after and select | Alt+P (editorTextFocus && dance.mode == 'normal' ) | |
edit.pasteAll.before | Paste all before | ||
edit.pasteAll.before.select | Paste all before and select | Shift+Alt+P (editorTextFocus && dance.mode == 'normal' ) | |
edit.selectRegister-insert | Pick register and replace | Ctrl+R (editorTextFocus && dance.mode == 'normal' )Ctrl+R (editorTextFocus && dance.mode == 'insert' ) | |
edit.yank-delete | Copy and delete | D (editorTextFocus && dance.mode == 'normal' )D (editorTextFocus && dance.mode == 'select' ) | |
edit.yank-delete-insert | Copy, delete and switch to Insert | C (editorTextFocus && dance.mode == 'normal' )C (editorTextFocus && dance.mode == 'select' ) | |
edit.yank-replace | Copy and replace | Shift+R (editorTextFocus && dance.mode == 'normal' ) | |
edit.indent | Indent selected lines | Shift+. (editorTextFocus && dance.mode == 'normal' ) | |
edit.indent.withEmpty | Indent selected lines (including empty lines) | Shift+Alt+. (editorTextFocus && dance.mode == 'normal' ) | |
edit.insert | Insert contents of register | Shift+Alt+R (editorTextFocus && dance.mode == 'normal' ) | |
edit.join | Join lines | Alt+J (editorTextFocus && dance.mode == 'normal' ) | |
edit.join.select | Join lines and select inserted separators | Shift+Alt+J (editorTextFocus && dance.mode == 'normal' ) | |
edit.newLine.above | Insert new line above each selection | Shift+Alt+O (editorTextFocus && dance.mode == 'normal' ) | |
edit.newLine.below | Insert new line below each selection | Alt+O (editorTextFocus && dance.mode == 'normal' ) | |
edit.replaceCharacters | Replace characters | R (editorTextFocus && dance.mode == 'normal' ) | |
history | history.repeat.seek | Repeat last seek | Alt+. (editorTextFocus && dance.mode == 'normal' ) |
history.repeat.selection | Repeat last selection change | ||
history.recording.play | Replay recording | Q (editorTextFocus && dance.mode == 'normal' ) | |
history.recording.start | Start recording | Shift+Q (editorTextFocus && dance.mode == 'normal' && !dance.isRecording ) | |
history.recording.stop | Stop recording | Escape (editorTextFocus && dance.mode == 'normal' && dance.isRecording )Shift+Q (editorTextFocus && dance.mode == 'normal' && dance.isRecording ) | |
history.redo | Redo | Shift+U (editorTextFocus && dance.mode == 'normal' )Shift+U (editorTextFocus && dance.mode == 'select' ) | |
history.redo.selections | Redo a change of selections | Shift+Alt+U (editorTextFocus && dance.mode == 'normal' ) | |
history.repeat | Repeat last change | ||
history.repeat.edit | Repeat last edit without a command | . (editorTextFocus && dance.mode == 'normal' )NumPad_Decimal (editorTextFocus && dance.mode == 'normal' ) | |
history.undo | Undo | U (editorTextFocus && dance.mode == 'normal' )U (editorTextFocus && dance.mode == 'select' ) | |
history.undo.selections | Undo a change of selections | Alt+U (editorTextFocus && dance.mode == 'normal' ) | |
keybindings | keybindings.setup | Set up Dance keybindings | |
misc | cancel | Cancel Dance operation | Escape (editorTextFocus && dance.mode == 'normal' && !dance.isRecording && !markersNavigationVisible )Escape (editorTextFocus && dance.mode == 'input' ) |
changeInput | Change current input | ||
ifEmpty | Executes one of the specified commands depending on whether the current selections are empty | ||
ignore | Ignore key | ||
openMenu | Open menu | ||
run | Run code | ||
selectRegister | Select register for next command | Shift+' (editorTextFocus && dance.mode == 'normal' ) | |
updateCount | Update Dance count | ||
updateRegister | Update the contents of a register | ||
modes | modes.insert.after | Insert after | A (editorTextFocus && dance.mode == 'normal' ) |
modes.insert.before | Insert before | I (editorTextFocus && dance.mode == 'normal' ) | |
modes.insert.lineEnd | Insert at line end | Shift+A (editorTextFocus && dance.mode == 'normal' ) | |
modes.insert.lineStart | Insert at line start | Shift+I (editorTextFocus && dance.mode == 'normal' ) | |
modes.set.insert | Set mode to Insert | ||
modes.set.normal | Set mode to Normal | Escape (editorTextFocus && dance.mode == 'insert' )Escape (editorTextFocus && dance.mode == 'select' ) | |
modes.set.select | Set mode to Select | ||
modes.set.temporarily.insert | Temporary Insert mode | Ctrl+V (editorTextFocus && dance.mode == 'normal' ) | |
modes.set.temporarily.normal | Temporary Normal mode | Ctrl+V (editorTextFocus && dance.mode == 'insert' ) | |
modes.set | Set Dance mode | ||
modes.set.temporarily | Set Dance mode temporarily | ||
search | search.next | Select next match | N (editorTextFocus && dance.mode == 'normal' ) |
search.search | Search | / (editorTextFocus && dance.mode == 'normal' )NumPad_Divide (editorTextFocus && dance.mode == 'normal' ) | |
search.backward | Search backward | Alt+/ (editorTextFocus && dance.mode == 'normal' ) | |
search.backward.extend | Search backward (extend) | Shift+Alt+/ (editorTextFocus && dance.mode == 'normal' ) | |
search.extend | Search (extend) | Shift+/ (editorTextFocus && dance.mode == 'normal' ) | |
search.next.add | Add next match | Shift+N (editorTextFocus && dance.mode == 'normal' ) | |
search.previous | Select previous match | Alt+N (editorTextFocus && dance.mode == 'normal' ) | |
search.previous.add | Add previous match | Shift+Alt+N (editorTextFocus && dance.mode == 'normal' ) | |
search.selection.smart | Search current selection (smart) | Shift+8 (editorTextFocus && dance.mode == 'normal' )NumPad_Multiply (editorTextFocus && dance.mode == 'normal' ) | |
search.selection | Search current selection | Shift+Alt+8 (editorTextFocus && dance.mode == 'normal' )Alt+NumPad_Multiply (editorTextFocus && dance.mode == 'normal' ) | |
seek | seek.enclosing | Select to next enclosing character | M (editorTextFocus && dance.mode == 'normal' ) |
seek.leap | Leap forward | ||
seek.object | Select object | ||
seek.seek | Select to character (excluded) | T (editorTextFocus && dance.mode == 'normal' ) | |
seek.askObject | Select whole object | Alt+A (editorTextFocus && dance.mode == 'normal' )Alt+A (editorTextFocus && dance.mode == 'insert' ) | |
seek.askObject.end | Select to whole object end | ] (editorTextFocus && dance.mode == 'normal' ) | |
seek.askObject.end.extend | Extend to whole object end | Shift+] (editorTextFocus && dance.mode == 'normal' ) | |
seek.askObject.inner | Select inner object | Alt+I (editorTextFocus && dance.mode == 'normal' )Alt+I (editorTextFocus && dance.mode == 'insert' ) | |
seek.askObject.inner.end | Select to inner object end | Alt+] (editorTextFocus && dance.mode == 'normal' ) | |
seek.askObject.inner.end.extend | Extend to inner object end | Shift+Alt+] (editorTextFocus && dance.mode == 'normal' ) | |
seek.askObject.inner.start | Select to inner object start | Alt+[ (editorTextFocus && dance.mode == 'normal' ) | |
seek.askObject.inner.start.extend | Extend to inner object start | Shift+Alt+[ (editorTextFocus && dance.mode == 'normal' ) | |
seek.askObject.start | Select to whole object start | [ (editorTextFocus && dance.mode == 'normal' ) | |
seek.askObject.start.extend | Extend to whole object start | Shift+[ (editorTextFocus && dance.mode == 'normal' ) | |
seek.backward | Select to character (excluded, backward) | Alt+T (editorTextFocus && dance.mode == 'normal' ) | |
seek.enclosing.backward | Select to previous enclosing character | Alt+M (editorTextFocus && dance.mode == 'normal' ) | |
seek.enclosing.extend | Extend to next enclosing character | Shift+M (editorTextFocus && dance.mode == 'normal' ) | |
seek.enclosing.extend.backward | Extend to previous enclosing character | Shift+Alt+M (editorTextFocus && dance.mode == 'normal' ) | |
seek.extend | Extend to character (excluded) | Shift+T (editorTextFocus && dance.mode == 'normal' )T (editorTextFocus && dance.mode == 'select' ) | |
seek.extend.backward | Extend to character (excluded, backward) | Shift+Alt+T (editorTextFocus && dance.mode == 'normal' )Shift+T (editorTextFocus && dance.mode == 'select' ) | |
seek.included | Select to character (included) | F (editorTextFocus && dance.mode == 'normal' ) | |
seek.included.backward | Select to character (included, backward) | Alt+F (editorTextFocus && dance.mode == 'normal' ) | |
seek.included.extend | Extend to character (included) | Shift+F (editorTextFocus && dance.mode == 'normal' )F (editorTextFocus && dance.mode == 'select' ) | |
seek.included.extend.backward | Extend to character (included, backward) | Shift+Alt+F (editorTextFocus && dance.mode == 'normal' )Shift+F (editorTextFocus && dance.mode == 'select' ) | |
seek.leap.backward | Leap backward | ||
seek.syntax.child.experimental | Select child syntax object | ||
seek.syntax.next.experimental | Select next syntax object | ||
seek.syntax.parent.experimental | Select parent syntax object | ||
seek.syntax.previous.experimental | Select previous syntax object | ||
seek.word.backward | Select to previous word start | B (editorTextFocus && dance.mode == 'normal' ) | |
seek.word.extend | Extend to next word start | Shift+W (editorTextFocus && dance.mode == 'normal' )W (editorTextFocus && dance.mode == 'select' ) | |
seek.word.extend.backward | Extend to previous word start | Shift+B (editorTextFocus && dance.mode == 'normal' )B (editorTextFocus && dance.mode == 'select' ) | |
seek.word.ws | Select to next non-whitespace word start | Alt+W (editorTextFocus && dance.mode == 'normal' ) | |
seek.word.ws.backward | Select to previous non-whitespace word start | Alt+B (editorTextFocus && dance.mode == 'normal' ) | |
seek.word.ws.extend | Extend to next non-whitespace word start | Shift+Alt+W (editorTextFocus && dance.mode == 'normal' )Shift+W (editorTextFocus && dance.mode == 'select' ) | |
seek.word.ws.extend.backward | Extend to previous non-whitespace word start | Shift+Alt+B (editorTextFocus && dance.mode == 'normal' )Shift+B (editorTextFocus && dance.mode == 'select' ) | |
seek.wordEnd | Select to next word end | E (editorTextFocus && dance.mode == 'normal' ) | |
seek.wordEnd.extend | Extend to next word end | Shift+E (editorTextFocus && dance.mode == 'normal' )E (editorTextFocus && dance.mode == 'select' ) | |
seek.wordEnd.ws | Select to next non-whitespace word end | Alt+E (editorTextFocus && dance.mode == 'normal' ) | |
seek.wordEnd.ws.extend | Extend to next non-whitespace word end | Shift+Alt+E (editorTextFocus && dance.mode == 'normal' )Shift+E (editorTextFocus && dance.mode == 'select' ) | |
seek.syntax.experimental | Select syntax object | ||
seek.word | Select to next word start | W (editorTextFocus && dance.mode == 'normal' ) | |
select | select.buffer | Select whole buffer | Shift+5 (editorTextFocus && dance.mode == 'normal' ) |
select.firstVisibleLine | Select to first visible line | ||
select.horizontally | Select horizontally | ||
select.lastLine | Select to last line | ||
select.lastVisibleLine | Select to last visible line | ||
select.line.above | Select line above | ||
select.line.above.extend | Extend to line above | ||
select.line.below | Select line below | ||
select.line.below.extend | Extend to line below | ||
select.lineEnd | Select to line end | Alt+L (editorTextFocus && dance.mode == 'normal' )End (editorTextFocus && dance.mode == 'normal' ) | |
select.lineStart | Select to line start | Alt+H (editorTextFocus && dance.mode == 'normal' )Home (editorTextFocus && dance.mode == 'normal' ) | |
select.middleVisibleLine | Select to middle visible line | ||
select.documentEnd.extend | Extend to last character | ||
select.documentEnd.jump | Jump to last character | ||
select.down.extend | Extend down | Shift+J (editorTextFocus && dance.mode == 'normal' )Shift+Down (editorTextFocus && dance.mode == 'normal' )J (editorTextFocus && dance.mode == 'select' )Down (editorTextFocus && dance.mode == 'select' ) | |
select.down.jump | Jump down | J (editorTextFocus && dance.mode == 'normal' )Down (editorTextFocus && dance.mode == 'normal' ) | |
select.firstLine.extend | Extend to first line | ||
select.firstLine.jump | Jump to first line | ||
select.firstVisibleLine.extend | Extend to first visible line | ||
select.firstVisibleLine.jump | Jump to first visible line | ||
select.lastLine.extend | Extend to last line | ||
select.lastLine.jump | Jump to last line | ||
select.lastVisibleLine.extend | Extend to last visible line | ||
select.lastVisibleLine.jump | Jump to last visible line | ||
select.left.extend | Extend left | Shift+H (editorTextFocus && dance.mode == 'normal' )Shift+Left (editorTextFocus && dance.mode == 'normal' )H (editorTextFocus && dance.mode == 'select' )Left (editorTextFocus && dance.mode == 'select' ) | |
select.left.jump | Jump left | H (editorTextFocus && dance.mode == 'normal' )Left (editorTextFocus && dance.mode == 'normal' ) | |
select.lineEnd.extend | Extend to line end | Shift+Alt+L (editorTextFocus && dance.mode == 'normal' )Shift+End (editorTextFocus && dance.mode == 'normal' ) | |
select.lineStart.extend | Extend to line start | Shift+Alt+H (editorTextFocus && dance.mode == 'normal' )Shift+Home (editorTextFocus && dance.mode == 'normal' ) | |
select.lineStart.jump | Jump to line start | ||
select.lineStart.skipBlank.extend | Extend to line start (skip blank) | ||
select.lineStart.skipBlank.jump | Jump to line start (skip blank) | ||
select.middleVisibleLine.extend | Extend to middle visible line | ||
select.middleVisibleLine.jump | Jump to middle visible line | ||
select.right.extend | Extend right | Shift+L (editorTextFocus && dance.mode == 'normal' )Shift+Right (editorTextFocus && dance.mode == 'normal' )L (editorTextFocus && dance.mode == 'select' )Right (editorTextFocus && dance.mode == 'select' ) | |
select.right.jump | Jump right | L (editorTextFocus && dance.mode == 'normal' )Right (editorTextFocus && dance.mode == 'normal' ) | |
select.to.extend | Extend to | Shift+G (editorTextFocus && dance.mode == 'normal' )G (editorTextFocus && dance.mode == 'select' ) | |
select.to.jump | Go to | G (editorTextFocus && dance.mode == 'normal' ) | |
select.up.extend | Extend up | Shift+K (editorTextFocus && dance.mode == 'normal' )Shift+Up (editorTextFocus && dance.mode == 'normal' )K (editorTextFocus && dance.mode == 'select' )Up (editorTextFocus && dance.mode == 'select' ) | |
select.up.jump | Jump up | K (editorTextFocus && dance.mode == 'normal' )Up (editorTextFocus && dance.mode == 'normal' ) | |
select.to | Select to | ||
select.vertically | Select vertically | ||
selections | selections.changeDirection | Change direction of selections | Alt+; (editorTextFocus && dance.mode == 'normal' ) |
selections.changeOrder | Reverse selections | ||
selections.copy | Copy selections below | Shift+C (editorTextFocus && dance.mode == 'normal' ) | |
selections.expandToLines | Expand to lines | X (editorTextFocus && dance.mode == 'normal' ) | |
selections.filter | Filter selections | Shift+4 (editorTextFocus && dance.mode == 'normal' ) | |
selections.merge | Merge contiguous selections | Shift+Alt+- (editorTextFocus && dance.mode == 'normal' ) | |
selections.open | Open selected file | ||
selections.pipe | Pipe selections | Shift+Alt+\ (editorTextFocus && dance.mode == 'normal' ) | |
selections.reduce | Reduce selections to their cursor | ; (editorTextFocus && dance.mode == 'normal' ) | |
selections.restore | Restore selections | Z (editorTextFocus && dance.mode == 'normal' ) | |
selections.restore.withCurrent | Combine register selections with current ones | Alt+Z (editorTextFocus && dance.mode == 'normal' ) | |
selections.save | Save selections | Shift+Z (editorTextFocus && dance.mode == 'normal' ) | |
selections.saveText | Copy selections text | Y (editorTextFocus && dance.mode == 'normal' ) | |
selections.select | Select within selections | ||
selections.clear.main | Clear main selections | Alt+, (editorTextFocus && dance.mode == 'normal' ) | |
selections.clear.secondary | Clear secondary selections | , (editorTextFocus && dance.mode == 'normal' ) | |
selections.copy.above | Copy selections above | Shift+Alt+C (editorTextFocus && dance.mode == 'normal' ) | |
selections.faceBackward | Backward selections | ||
selections.faceForward | Forward selections | Shift+Alt+; (editorTextFocus && dance.mode == 'normal' ) | |
selections.filter.regexp | Keep matching selections | Alt+K (editorTextFocus && dance.mode == 'normal' ) | |
selections.filter.regexp.inverse | Clear matching selections | Shift+Alt+K (editorTextFocus && dance.mode == 'normal' ) | |
selections.hideIndices | Hide selection indices | ||
selections.orderAscending | Order selections ascending | ||
selections.orderDescending | Order selections descending | ||
selections.pipe.append | Pipe and append | Shift+1 (editorTextFocus && dance.mode == 'normal' ) | |
selections.pipe.prepend | Pipe and prepend | Shift+Alt+1 (editorTextFocus && dance.mode == 'normal' ) | |
selections.pipe.replace | Pipe and replace | Shift+\ (editorTextFocus && dance.mode == 'normal' ) | |
selections.reduce.edges | Reduce selections to their ends | Shift+Alt+S (editorTextFocus && dance.mode == 'normal' ) | |
selections.select.orLeap | Leap or select | S (editorTextFocus && dance.mode == 'normal' ) | |
selections.showIndices | Show selection indices | ||
selections.splitLines.orLeap.backward | Leap or select backward | Alt+S (editorTextFocus && dance.mode == 'normal' ) | |
selections.sort | Sort selections | ||
selections.split | Split selections | Shift+S (editorTextFocus && dance.mode == 'normal' ) | |
selections.splitLines | Split selections at line boundaries | ||
selections.toggleIndices | Toggle selection indices | Enter (editorTextFocus && dance.mode == 'normal' ) | |
selections.trimLines | Trim lines | Alt+X (editorTextFocus && dance.mode == 'normal' ) | |
selections.trimWhitespace | Trim whitespace | Shift+- (editorTextFocus && dance.mode == 'normal' ) | |
selections.rotate | selections.rotate.both | Rotate selections clockwise | Shift+Alt+0 (editorTextFocus && dance.mode == 'normal' ) |
selections.rotate.contents | Rotate selections clockwise (contents only) | ||
selections.rotate.selections | Rotate selections clockwise (selections only) | Shift+0 (editorTextFocus && dance.mode == 'normal' ) | |
selections.rotate.both.reverse | Rotate selections counter-clockwise | Shift+Alt+9 (editorTextFocus && dance.mode == 'normal' ) | |
selections.rotate.contents.reverse | Rotate selections counter-clockwise (contents only) | ||
selections.rotate.selections.reverse | Rotate selections counter-clockwise (selections only) | Shift+9 (editorTextFocus && dance.mode == 'normal' ) | |
view | view.line | Reveals a position based on the main cursor |
Developer utilities for Dance.
Set the selection behavior of the specified mode.
This command:
- takes an argument
mode
of typestring
. - takes an argument
value
of type"caret" | "character"
.
Copies the last encountered error message.
This command:
- does not require an active text editor.
Perform changes on the text content of the document.
See https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc#changes.
Insert contents of register.
A where
argument may be specified to state where the text should be
inserted relative to each selection. If unspecified, each selection will be
replaced by the text.
Specify "shift": "select"
to select the inserted selection,
"shift": "extend"
to extend to the inserted text, and nothing to keep the
current selections.
Specify all
to paste all contents next to each selection.
Title | Identifier | Keybinding | Commands |
---|---|---|---|
Pick register and replace | selectRegister-insert |
c-r (kakoune: normal), c-r (kakoune: insert) |
[".selectRegister", { +register }], [".edit.insert", { ... }] |
Paste before | paste.before |
[".edit.insert", { handleNewLine: true, where: "start", ... }] |
|
Paste after | paste.after |
[".edit.insert", { handleNewLine: true, where: "end" , ... }] |
|
Paste before and select | paste.before.select |
s-p (kakoune: normal) |
[".edit.insert", { handleNewLine: true, where: "start", shift: "select", ... }] |
Paste after and select | paste.after.select |
p (kakoune: normal) |
[".edit.insert", { handleNewLine: true, where: "end" , shift: "select", ... }] |
Paste all before | pasteAll.before |
[".edit.insert", { handleNewLine: true, where: "start", all: true, ... }] |
|
Paste all after | pasteAll.after |
[".edit.insert", { handleNewLine: true, where: "end" , all: true, ... }] |
|
Paste all before and select | pasteAll.before.select |
s-a-p (kakoune: normal) |
[".edit.insert", { handleNewLine: true, where: "start", all: true, shift: "select", ... }] |
Paste all after and select | pasteAll.after.select |
a-p (kakoune: normal) |
[".edit.insert", { handleNewLine: true, where: "end" , all: true, shift: "select", ... }] |
Delete | delete |
a-d (kakoune: normal) |
[".edit.insert", { register: "_", ... }] |
Delete and switch to Insert | delete-insert |
a-c (kakoune: normal) |
[".modes.set", { mode: "insert", +mode }], [".edit.insert", { register: "_", ... }] |
Copy and delete | yank-delete |
d (kakoune: normal), d (helix: select) |
[".selections.saveText", { +register }], [".edit.insert", { register: "_", ... }] |
Copy, delete and switch to Insert | yank-delete-insert |
c (kakoune: normal), c (helix: select) |
[".selections.saveText", { +register }], [".modes.set", { mode: "insert", +mode }], [".edit.insert", { register: "_", ... }] |
Copy and replace | yank-replace |
s-r (kakoune: normal) |
[".selections.saveText", { register: "tmp" }], [".edit.insert"], [".updateRegister", { copyFrom: "tmp", ... }] |
This command:
- accepts a register (by default, it uses
dquote
). - may be repeated with a given number of repetitions.
- takes an argument
adjust
of typeboolean
. - takes an argument
all
of typeboolean
. - takes an argument
handleNewLine
of typeboolean
. - takes an argument
shift
of typeShift
. - takes an argument
text
of typestring
. - takes an argument
where
of type"active" | "anchor" | "start" | "end" | undefined
.
Default keybinding: s-a-r
(kakoune: normal)
Join lines.
This command:
- takes an argument
separator
of typestring
.
Default keybinding: a-j
(kakoune: normal)
Join lines and select inserted separators.
This command:
- takes an argument
separator
of typestring
.
Default keybinding: s-a-j
(kakoune: normal)
Indent selected lines.
This command:
- may be repeated with a given number of repetitions.
Default keybinding: >
(kakoune: normal)
Indent selected lines (including empty lines).
This command:
- may be repeated with a given number of repetitions.
Default keybinding: a->
(kakoune: normal)
Deindent selected lines.
This command:
- may be repeated with a given number of repetitions.
Default keybinding: a-<
(kakoune: normal)
Deindent selected lines (including incomplete indent).
This command:
- may be repeated with a given number of repetitions.
Default keybinding: <
(kakoune: normal)
Transform to lower case.
Default keybinding: `
(kakoune: normal)
Transform to upper case.
Default keybinding: s-`
(kakoune: normal)
Swap case.
Default keybinding: a-`
(kakoune: normal)
Replace characters.
This command:
- may be repeated with a given number of repetitions.
- takes an input
input
of typestring
.
Default keybinding: r
(kakoune: normal)
Align selections.
Align selections, aligning the cursor of each selection by inserting spaces before the first character of each selection.
This command:
- takes an argument
fill
of typestring
.
Default keybinding: &
(kakoune: normal)
Copy indentation.
Copy the indentation of the main selection (or the count one if a count is given) to all other ones.
This command:
- may be repeated with a given number of repetitions.
Default keybinding: a-&
(kakoune: normal)
Insert new line above each selection.
Specify "shift": "select"
to select the inserted selections, and nothing to
keep the current selections.
Title | Identifier | Keybinding | Commands |
---|---|---|---|
Insert new line above and switch to insert | newLine.above.insert |
s-o (kakoune: normal) |
[".edit.newLine.above", { shift: "select" }], [".modes.insert.before", { ... }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
shift
of typeShift
.
Default keybinding: s-a-o
(kakoune: normal)
Insert new line below each selection.
Specify "shift": "select"
to select the inserted selections, and nothing to
keep the current selections.
Title | Identifier | Keybinding | Commands |
---|---|---|---|
Insert new line below and switch to insert | newLine.below.insert |
o (kakoune: normal) |
[".edit.newLine.below", { shift: "select" }], [".modes.insert.before", { ... }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
shift
of typeShift
.
Default keybinding: a-o
(kakoune: normal)
Interact with history.
Undo.
This command:
- does not require an active text editor.
Default keybinding: u
(kakoune: normal)
u
(helix: select)
Redo.
This command:
- does not require an active text editor.
Default keybinding: s-u
(kakoune: normal)
s-u
(helix: select)
Undo a change of selections.
This command:
- does not require an active text editor.
Default keybinding: a-u
(kakoune: normal)
Redo a change of selections.
This command:
- does not require an active text editor.
Default keybinding: s-a-u
(kakoune: normal)
Repeat last change.
Title | Identifier | Keybinding | Commands |
---|---|---|---|
Repeat last selection change | repeat.selection |
[".history.repeat", { filter: "dance\\.(seek|select|selections)", +count }] |
|
Repeat last seek | repeat.seek |
a-. (kakoune: normal) |
[".history.repeat", { filter: "dance\\.seek", +count }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
filter
of typestring | RegExp
.
Repeat last edit without a command.
This command:
- may be repeated with a given number of repetitions.
Default keybinding: .
(kakoune: normal)
NumPad_Decimal
(kakoune: normal)
Replay recording.
This command:
- accepts a register (by default, it uses
arobase
). - does not require an active text editor.
- may be repeated with a given number of repetitions.
Default keybinding: q
(kakoune: normal)
Start recording.
This command:
- accepts a register (by default, it uses
arobase
).
Default keybinding: s-q
(kakoune: normal, !recording)
Stop recording.
This command:
- accepts a register (by default, it uses
arobase
).
Default keybinding: escape
(kakoune: normal, recording)
s-q
(kakoune: normal, recording)
Utilities for setting up keybindings.
Set up Dance keybindings.
This command:
- accepts a register (by default, it uses
dquote
).
Miscellaneous commands that don't deserve their own category.
By default, Dance also exports the following keybindings for existing commands:
Keybinding | Command |
---|---|
s-; (core: normal) |
["workbench.action.showCommands", { ... }] |
Cancel Dance operation.
This command:
- does not require an active text editor.
Default keybinding: escape
(core: normal, !recording, "!markersNavigationVisible")
escape
(core: input)
Ignore key.
This command:
- does not require an active text editor.
Run code.
There are two ways to invoke this command. The first one is to provide an
code
string argument. This code must be a valid JavaScript string, and will
be executed with full access to the Dance API. For
instance,
{
"command": "dance.run",
"args": {
"code": "Selections.set(Selections.filter(text => text.includes('foo')))",
},
},
If no argument is provided, a prompt will be shown asking for an input. Furthermore, an array of strings can be passed to make longer functions easier to read:
{
"command": "dance.run",
"args": {
"code": [
"for (const selection of Selections.current) {",
" console.log(text(selection));",
"}",
],
},
},
The second way to use this command is with the commands
argument. This
argument must be an array of "command-like" values. The simplest
"command-like" value is a string corresponding to the command itself:
{
"command": "dance.run",
"args": {
"commands": [
"dance.modes.set.normal",
],
},
},
But arguments can also be provided by passing an array:
{
"command": "dance.run",
"args": {
"commands": [
["dance.modes.set", { "mode": "normal" }],
],
},
},
Or by passing an object, like regular VS Code key bindings:
{
"command": "dance.run",
"args": {
"commands": [
{
"command": "dance.modes.set",
"args": { "mode": "normal" },
},
],
},
},
These values can be mixed:
{
"command": "dance.run",
"args": {
"commands": [
["dance.selections.saveText", { "register": "^" }],
{
"command": "dance.modes.set",
"args": { "mode": "normal" },
},
"hideSuggestWidget",
],
},
},
If both code
and commands
are given, Dance will use code
if arbitrary
code execution is enabled, or commands
otherwise.
This command:
- accepts a register (by default, it uses
null
). - accepts an argument of type
{ code?: string | readonly string[] }
. - may be repeated with a given number of repetitions.
- may be repeated with a given number of repetitions.
- takes an argument
commands
of typecommand.Any[]
. - takes an input
code
of typestring | readonly string[]
.
Select register for next command.
When selecting a register, the next key press is used to determine what
register is selected. If this key is a space
character, then a new key
press is awaited again and the returned register will be specific to the
current document.
This command:
- takes an input
register
of typestring | Register
.
Default keybinding: "
(kakoune: normal)
Update the contents of a register.
This command:
- accepts a register (by default, it uses
dquote
). - takes an input
input
of typestring
.
Update Dance count.
Update the current counter used to repeat the next command.
Title | Keybinding | Command |
---|---|---|
Add the digit 0 to the counter | 0 (core: normal), NumPad0 (core: normal) |
[".updateCount", { addDigits: 0 }] |
Add the digit 1 to the counter | 1 (core: normal), NumPad1 (core: normal) |
[".updateCount", { addDigits: 1 }] |
Add the digit 2 to the counter | 2 (core: normal), NumPad2 (core: normal) |
[".updateCount", { addDigits: 2 }] |
Add the digit 3 to the counter | 3 (core: normal), NumPad3 (core: normal) |
[".updateCount", { addDigits: 3 }] |
Add the digit 4 to the counter | 4 (core: normal), NumPad4 (core: normal) |
[".updateCount", { addDigits: 4 }] |
Add the digit 5 to the counter | 5 (core: normal), NumPad5 (core: normal) |
[".updateCount", { addDigits: 5 }] |
Add the digit 6 to the counter | 6 (core: normal), NumPad6 (core: normal) |
[".updateCount", { addDigits: 6 }] |
Add the digit 7 to the counter | 7 (core: normal), NumPad7 (core: normal) |
[".updateCount", { addDigits: 7 }] |
Add the digit 8 to the counter | 8 (core: normal), NumPad8 (core: normal) |
[".updateCount", { addDigits: 8 }] |
Add the digit 9 to the counter | 9 (core: normal), NumPad9 (core: normal) |
[".updateCount", { addDigits: 9 }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
addDigits
of typenumber
. - takes an input
count
of typenumber
.
Open menu.
If no menu is specified, a prompt will ask for the name of the menu to open.
Alternatively, a menu
can be inlined in the arguments.
Pass a prefix
argument to insert the prefix string followed by the typed
key if it does not match any menu entry. This can be used to implement chords
like jj
.
This command:
- does not require an active text editor.
- takes an argument
delay
of typenumber
. - takes an argument
locked
of typeboolean
. - takes an argument
pass
of typeany[]
. - takes an argument
prefix
of typestring
. - takes an argument
title
of typestring
. - takes an input
menu
of typestring | Menu
.
Change current input.
When showing some menus, Dance can navigate their history:
Keybinding | Command |
---|---|
up (core: prompt) |
[".changeInput", { action: "previous" }] |
down (core: prompt) |
[".changeInput", { action: "next" }] |
This command:
- does not require an active text editor.
Executes one of the specified commands depending on whether the current selections are empty.
This command:
- accepts an argument of type
{}
. - takes an argument
otherwise
of typecommand.Any[]
. - takes an argument
then
of typecommand.Any[]
.
Set modes.
Set Dance mode.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Set mode to Normal | set.normal |
escape (kakoune: insert), escape (helix: select) |
[".modes.set", { mode: "normal" }], ["hideSuggestWidget"] |
Set mode to Insert | set.insert |
[".modes.set", { mode: "insert" }] |
|
Set mode to Select | set.select |
[".modes.set", { mode: "select" }] |
Other variants are provided to switch to insert mode:
Title | Identifier | Keybinding | Commands |
---|---|---|---|
Insert before | insert.before |
i (kakoune: normal) |
[".selections.faceBackward", { record: false }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "start", record: false, empty: true, ... }] |
Insert after | insert.after |
a (kakoune: normal) |
[".selections.faceForward" , { record: false }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "end" , record: false, empty: true, ... }] |
Insert at line start | insert.lineStart |
s-i (kakoune: normal) |
[".select.lineStart", { shift: "jump", skipBlank: true }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "start", record: false, empty: true, ... }] |
Insert at line end | insert.lineEnd |
s-a (kakoune: normal) |
[".select.lineEnd" , { shift: "jump" }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "end" , record: false, empty: true, ... }] |
This command:
- takes an input
mode
of typestring
.
Set Dance mode temporarily.
Title | Identifier | Keybindings | Commands |
---|---|---|---|
Temporary Normal mode | set.temporarily.normal |
c-v (kakoune: insert) |
[".modes.set.temporarily", { mode: "normal" }] |
Temporary Insert mode | set.temporarily.insert |
c-v (kakoune: normal) |
[".modes.set.temporarily", { mode: "insert" }] |
This command:
- may be repeated with a given number of repetitions.
- takes an input
mode
of typestring
.
Search for patterns and replace or add selections.
Search.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Search (extend) | extend |
? (kakoune: normal) |
[".search", { shift: "extend", ... }] |
Search backward | backward |
a-/ (kakoune: normal) |
[".search", { direction: -1 , ... }] |
Search backward (extend) | backward.extend |
a-? (kakoune: normal) |
[".search", { direction: -1, shift: "extend", ... }] |
This command:
- accepts a register (by default, it uses
slash
). - accepts an argument of type
{ re?: string | (RegExp & { originalSource?: string }) }
. - may be repeated with a given number of repetitions.
- takes an argument
add
of typeboolean
. - takes an argument
interactive
of typeboolean
.
Default keybinding: /
(kakoune: normal)
NumPad_Divide
(kakoune: normal)
Search current selection.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Search current selection (smart) | selection.smart |
* (kakoune: normal), NumPad_Multiply (kakoune: normal) |
[".search.selection", { smart: true, +register }] |
This command:
- accepts a register (by default, it uses
slash
). - takes an argument
smart
of typeboolean
.
Default keybinding: a-*
(kakoune: normal)
a-NumPad_Multiply
(kakoune: normal)
Select next match.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Add next match | next.add |
s-n (kakoune: normal) |
[".search.next", { add: true, ... }] |
Select previous match | previous |
a-n (kakoune: normal) |
[".search.next", { direction: -1 , ... }] |
Add previous match | previous.add |
s-a-n (kakoune: normal) |
[".search.next", { direction: -1, add: true, ... }] |
This command:
- accepts a register (by default, it uses
slash
). - may be repeated with a given number of repetitions.
- takes an argument
add
of typeboolean
.
Default keybinding: n
(kakoune: normal)
Update selections based on the text surrounding them.
Select to character (excluded).
Title | Identifier | Keybinding | Command |
---|---|---|---|
Extend to character (excluded) | extend |
s-t (kakoune: normal), t (helix: select) |
[".seek", { shift: "extend" , ... }] |
Select to character (excluded, backward) | backward |
a-t (kakoune: normal) |
[".seek", { direction: -1, ... }] |
Extend to character (excluded, backward) | extend.backward |
s-a-t (kakoune: normal), s-t (helix: select) |
[".seek", { shift: "extend", direction: -1, ... }] |
Select to character (included) | included |
f (kakoune: normal) |
[".seek", { include: true , ... }] |
Extend to character (included) | included.extend |
s-f (kakoune: normal), f (helix: select) |
[".seek", { include: true, shift: "extend" , ... }] |
Select to character (included, backward) | included.backward |
a-f (kakoune: normal) |
[".seek", { include: true, direction: -1, ... }] |
Extend to character (included, backward) | included.extend.backward |
s-a-f (kakoune: normal), s-f (helix: select) |
[".seek", { include: true, shift: "extend", direction: -1, ... }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
include
of typeboolean
. - takes an input
input
of typestring
.
Default keybinding: t
(kakoune: normal)
Select to next enclosing character.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Extend to next enclosing character | enclosing.extend |
s-m (kakoune: normal) |
[".seek.enclosing", { shift: "extend" , ... }] |
Select to previous enclosing character | enclosing.backward |
a-m (kakoune: normal) |
[".seek.enclosing", { direction: -1, ... }] |
Extend to previous enclosing character | enclosing.extend.backward |
s-a-m (kakoune: normal) |
[".seek.enclosing", { shift: "extend", direction: -1, ... }] |
This command:
- takes an argument
open
of typeboolean
. - takes an argument
pairs
of typereadonly string[]
.
Default keybinding: m
(kakoune: normal)
Select to next word start.
Select the word and following whitespaces on the right of the end of each selection.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Extend to next word start | word.extend |
s-w (kakoune: normal), w (helix: select) |
[".seek.word", { shift: "extend" , ... }] |
Select to previous word start | word.backward |
b (kakoune: normal) |
[".seek.word", { direction: -1, ... }] |
Extend to previous word start | word.extend.backward |
s-b (kakoune: normal), b (helix: select) |
[".seek.word", { shift: "extend", direction: -1, ... }] |
Select to next non-whitespace word start | word.ws |
a-w (kakoune: normal) |
[".seek.word", { ws: true , ... }] |
Extend to next non-whitespace word start | word.ws.extend |
s-a-w (kakoune: normal), s-w (helix: select) |
[".seek.word", { ws: true, shift: "extend" , ... }] |
Select to previous non-whitespace word start | word.ws.backward |
a-b (kakoune: normal) |
[".seek.word", { ws: true, direction: -1, ... }] |
Extend to previous non-whitespace word start | word.ws.extend.backward |
s-a-b (kakoune: normal), s-b (helix: select) |
[".seek.word", { ws: true, shift: "extend", direction: -1, ... }] |
Select to next word end | wordEnd |
e (kakoune: normal) |
[".seek.word", { stopAtEnd: true , ... }] |
Extend to next word end | wordEnd.extend |
s-e (kakoune: normal), e (helix: select) |
[".seek.word", { stopAtEnd: true , shift: "extend" , ... }] |
Select to next non-whitespace word end | wordEnd.ws |
a-e (kakoune: normal) |
[".seek.word", { stopAtEnd: true , ws: true , ... }] |
Extend to next non-whitespace word end | wordEnd.ws.extend |
s-a-e (kakoune: normal), s-e (helix: select) |
[".seek.word", { stopAtEnd: true , ws: true, shift: "extend" , ... }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
stopAtEnd
of typeboolean
. - takes an argument
ws
of typeboolean
.
Default keybinding: w
(kakoune: normal)
Select object.
-
Pairs:
<regexp>(?#inner)<regexp>
. -
Character sets:
[<characters>]+
.- Can be preceded by
(?<before>[<characters>]+)
and followed by(?<after>[<character>]+)
for whole objects.
- Can be preceded by
-
Matches that may only span a single line:
(?#singleline)<regexp>
. -
Predefined:
(?#predefined=<argument | paragraph | sentence>)
.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Select whole object | askObject |
a-a (kakoune: normal), a-a (kakoune: insert) |
[".openMenu", { menu: "object", title: "Select whole object..." }] |
Select inner object | askObject.inner |
a-i (kakoune: normal), a-i (kakoune: insert) |
[".openMenu", { menu: "object", pass: [{ inner: true }], title: "Select inner object..." }] |
Select to whole object start | askObject.start |
[ (kakoune: normal) |
[".openMenu", { menu: "object", pass: [{ where: "start" }] }] |
Extend to whole object start | askObject.start.extend |
{ (kakoune: normal) |
[".openMenu", { menu: "object", pass: [{ where: "start", shift: "extend" }] }] |
Select to inner object start | askObject.inner.start |
a-[ (kakoune: normal) |
[".openMenu", { menu: "object", pass: [{ inner: true, where: "start" }] }] |
Extend to inner object start | askObject.inner.start.extend |
a-{ (kakoune: normal) |
[".openMenu", { menu: "object", pass: [{ inner: true, where: "start", shift: "extend" }] }] |
Select to whole object end | askObject.end |
] (kakoune: normal) |
[".openMenu", { menu: "object", pass: [{ where: "end" }] }] |
Extend to whole object end | askObject.end.extend |
} (kakoune: normal) |
[".openMenu", { menu: "object", pass: [{ where: "end" , shift: "extend" }] }] |
Select to inner object end | askObject.inner.end |
a-] (kakoune: normal) |
[".openMenu", { menu: "object", pass: [{ inner: true, where: "end" }] }] |
Extend to inner object end | askObject.inner.end.extend |
a-} (kakoune: normal) |
[".openMenu", { menu: "object", pass: [{ inner: true, where: "end" , shift: "extend" }] }] |
This command:
- takes an argument
inner
of typeboolean
. - takes an argument
where
of type"start" | "end"
. - takes an input
input
of typestring
.
Select syntax object.
Title | Identifier | Command |
---|---|---|
Select next syntax object | syntax.next.experimental |
[".seek.syntax.experimental", { where: "next" }] |
Select previous syntax object | syntax.previous.experimental |
[".seek.syntax.experimental", { where: "previous" }] |
Select parent syntax object | syntax.parent.experimental |
[".seek.syntax.experimental", { where: "parent" }] |
Select child syntax object | syntax.child.experimental |
[".seek.syntax.experimental", { where: "child" }] |
This command:
- takes an argument
where
of type"next" | "previous" | "parent" | "child"
.
Leap forward.
Inspired by leap.nvim
.
Title | Identifier | Command |
---|---|---|
Leap backward | leap.backward |
[".seek.leap", { direction: -1, ... }] |
This command:
- takes an argument
labels
of typestring
.
Update selections based on their position in the document.
Select whole buffer.
Default keybinding: %
(kakoune: normal)
Select vertically.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Jump down | down.jump |
j (kakoune: normal) , down (kakoune: normal) |
[".select.vertically", { direction: 1, shift: "jump" , ... }] |
Extend down | down.extend |
s-j (kakoune: normal), s-down (kakoune: normal), j (helix: select), down (helix: select) |
[".select.vertically", { direction: 1, shift: "extend", ... }] |
Jump up | up.jump |
k (kakoune: normal) , up (kakoune: normal) |
[".select.vertically", { direction: -1, shift: "jump" , ... }] |
Extend up | up.extend |
s-k (kakoune: normal), s-up (kakoune: normal) , k (helix: select), up (helix: select) |
[".select.vertically", { direction: -1, shift: "extend", ... }] |
The following keybindings are also defined:
Keybinding | Command |
---|---|
c-f (kakoune: normal), c-f (kakoune: insert) |
[".select.vertically", { direction: 1, by: "page" , shift: "jump" }] |
c-d (kakoune: normal), c-d (kakoune: insert) |
[".select.vertically", { direction: 1, by: "halfPage", shift: "jump" }] |
c-b (kakoune: normal), c-b (kakoune: insert) |
[".select.vertically", { direction: -1, by: "page" , shift: "jump" }] |
c-u (kakoune: normal), c-u (kakoune: insert) |
[".select.vertically", { direction: -1, by: "halfPage", shift: "jump" }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
avoidEol
of typeboolean
. - takes an argument
by
of type"page" | "halfPage"
.
Select horizontally.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Jump right | right.jump |
l (kakoune: normal) , right (kakoune: normal) |
[".select.horizontally", { direction: 1, shift: "jump" , ... }] |
Extend right | right.extend |
s-l (kakoune: normal), s-right (kakoune: normal), l (helix: select), right (helix: select) |
[".select.horizontally", { direction: 1, shift: "extend", ... }] |
Jump left | left.jump |
h (kakoune: normal) , left (kakoune: normal) |
[".select.horizontally", { direction: -1, shift: "jump" , ... }] |
Extend left | left.extend |
s-h (kakoune: normal), s-left (kakoune: normal), h (helix: select), left (helix: select) |
[".select.horizontally", { direction: -1, shift: "extend", ... }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
avoidEol
of typeboolean
.
Select to.
If a count is specified, this command will shift to the start of the given
line. If no count is specified, this command will shift open the goto
menu.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Go to | to.jump |
g (kakoune: normal) |
[".select.to", { shift: "jump" , ... }] |
Extend to | to.extend |
s-g (kakoune: normal), g (helix: select) |
[".select.to", { shift: "extend", ... }] |
This command:
- accepts an argument of type
object
. - may be repeated with a given number of repetitions.
Select line below.
This command:
- may be repeated with a given number of repetitions.
Extend to line below.
This command:
- may be repeated with a given number of repetitions.
Select line above.
This command:
- may be repeated with a given number of repetitions.
Extend to line above.
This command:
- may be repeated with a given number of repetitions.
Select to line start.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Jump to line start | lineStart.jump |
[".select.lineStart", { shift: "jump" , ... }] |
|
Extend to line start | lineStart.extend |
s-a-h (kakoune: normal), s-home (kakoune: normal) |
[".select.lineStart", { shift: "extend", ... }] |
Jump to line start (skip blank) | lineStart.skipBlank.jump |
[".select.lineStart", { skipBlank: true, shift: "jump" , ... }] |
|
Extend to line start (skip blank) | lineStart.skipBlank.extend |
[".select.lineStart", { skipBlank: true, shift: "extend", ... }] |
|
Jump to first line | firstLine.jump |
[".select.lineStart", { count: 0, shift: "jump" , ... }] |
|
Extend to first line | firstLine.extend |
[".select.lineStart", { count: 0, shift: "extend", ... }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
skipBlank
of typeboolean
.
Default keybinding: a-h
(kakoune: normal)
home
(kakoune: normal)
Select to line end.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Extend to line end | lineEnd.extend |
s-a-l (kakoune: normal), s-end (kakoune: normal) |
[".select.lineEnd", { shift: "extend", ... }] |
Jump to last character | documentEnd.jump |
[".select.lineEnd", { count: MAX_INT, shift: "jump" , ... }] |
|
Extend to last character | documentEnd.extend |
[".select.lineEnd", { count: MAX_INT, shift: "extend", ... }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
lineBreak
of typeboolean
.
Default keybinding: a-l
(kakoune: normal)
end
(kakoune: normal)
Select to last line.
Title | Identifier | Command |
---|---|---|
Jump to last line | lastLine.jump |
[".select.lastLine", { shift: "jump" }] |
Extend to last line | lastLine.extend |
[".select.lastLine", { shift: "extend" }] |
Select to first visible line.
Title | Identifier | Command |
---|---|---|
Jump to first visible line | firstVisibleLine.jump |
[".select.firstVisibleLine", { shift: "jump" }] |
Extend to first visible line | firstVisibleLine.extend |
[".select.firstVisibleLine", { shift: "extend" }] |
Select to middle visible line.
Title | Identifier | Command |
---|---|---|
Jump to middle visible line | middleVisibleLine.jump |
[".select.middleVisibleLine", { shift: "jump" }] |
Extend to middle visible line | middleVisibleLine.extend |
[".select.middleVisibleLine", { shift: "extend" }] |
Select to last visible line.
Title | Identifier | Command |
---|---|---|
Jump to last visible line | lastVisibleLine.jump |
[".select.lastVisibleLine", { shift: "jump" }] |
Extend to last visible line | lastVisibleLine.extend |
[".select.lastVisibleLine", { shift: "extend" }] |
Interacting with selections.
Copy selections text.
This command:
- accepts a register (by default, it uses
dquote
).
Default keybinding: y
(kakoune: normal)
Save selections.
This command:
- accepts a register (by default, it uses
caret
). - takes an argument
style
of typeobject
. - takes an argument
untilDelay
of typenumber
. - takes an argument
until
of typeAutoDisposable.Event[]
.
Default keybinding: s-z
(kakoune: normal)
Restore selections.
This command:
- accepts a register (by default, it uses
caret
).
Default keybinding: z
(kakoune: normal)
Combine register selections with current ones.
The following keybinding is also available:
Keybinding | Command |
---|---|
s-a-z (kakoune: normal) |
[".selections.restore.withCurrent", { reverse: true, ... }] |
See https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc#marks
This command:
- accepts a register (by default, it uses
caret
). - takes an argument
action
of type"a" | "u" | "i" | "<" | ">" | "+" | "-"
. - takes an argument
reverse
of typeboolean
.
Default keybinding: a-z
(kakoune: normal)
Pipe selections.
Run the specified command or code with the contents of each selection, and save the result to a register.
Title | Identifier | Keybinding | Commands |
---|---|---|---|
Pipe and replace | pipe.replace |
| (kakoune: normal) |
[".selections.pipe", { +expression,register }], [".edit.insert", { register: "|", ... }] |
Pipe and append | pipe.append |
! (kakoune: normal) |
[".selections.pipe", { +expression,register }], [".edit.insert", { register: "|", where: "end" , shift: "select", ... }] |
Pipe and prepend | pipe.prepend |
a-! (kakoune: normal) |
[".selections.pipe", { +expression,register }], [".edit.insert", { register: "|", where: "start", shift: "select", ... }] |
This command:
- accepts a register (by default, it uses
pipe
). - takes an input
expression
of typestring
.
Default keybinding: a-|
(kakoune: normal)
Filter selections.
Title | Identifier | Keybinding | Commands |
---|---|---|---|
Keep matching selections | filter.regexp |
a-k (kakoune: normal) |
[".selections.filter", { defaultExpression: "/" , ... }] |
Clear matching selections | filter.regexp.inverse |
s-a-k (kakoune: normal) |
[".selections.filter", { defaultExpression: "/", inverse: true, ... }] |
Clear secondary selections | clear.secondary |
, (kakoune: normal) |
[".selections.filter", { expression: "i === count" , ... }] |
Clear main selections | clear.main |
a-, (kakoune: normal) |
[".selections.filter", { expression: "i !== count" , ... }] |
This command:
- accepts an argument of type
{ expression?: string }
. - may be repeated with a given number of repetitions.
- takes an argument
defaultExpression
of typestring
. - takes an argument
interactive
of typeboolean
. - takes an argument
inverse
of typeboolean
.
Default keybinding: $
(kakoune: normal)
Select within selections.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Leap or select | select.orLeap |
s (kakoune: normal) |
[".ifEmpty", { then: [[".seek.leap", { ... }]], otherwise: [[".selections.select", { ... }]] }] |
This command:
- accepts an argument of type
{ re?: string | RegExp }
. - takes an argument
interactive
of typeboolean
.
Split selections.
This command:
- accepts an argument of type
{ re?: string | RegExp }
. - takes an argument
excludeEmpty
of typeboolean
. - takes an argument
interactive
of typeboolean
.
Default keybinding: s-s
(kakoune: normal)
Split selections at line boundaries.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Leap or select backward | splitLines.orLeap.backward |
a-s (kakoune: normal) |
[".ifEmpty", { then: [[".seek.leap", { direction: -1, ... }]], otherwise: [[".selections.splitLines", { ... }]] }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
excludeEol
of typeboolean
.
Expand to lines.
Expand selections to contain full lines (including end-of-line characters).
Default keybinding: x
(kakoune: normal)
Trim lines.
Trim selections to only contain full lines (from start to line break).
Default keybinding: a-x
(kakoune: normal)
Trim whitespace.
Trim whitespace at beginning and end of selections.
Default keybinding: _
(kakoune: normal)
Reduce selections to their cursor.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Reduce selections to their ends | reduce.edges |
s-a-s (kakoune: normal) |
[".selections.reduce", { where: "both", empty: false, ... }] |
This command:
- takes an argument
empty
of typeboolean
. - takes an argument
where
of type"active" | "anchor" | "start" | "end" | "both"
.
Default keybinding: ;
(kakoune: normal)
Change direction of selections.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Forward selections | faceForward |
a-: (kakoune: normal) |
[".selections.changeDirection", { direction: 1 }] |
Backward selections | faceBackward |
[".selections.changeDirection", { direction: -1 }] |
Default keybinding: a-;
(kakoune: normal)
Reverse selections.
Title | Identifier | Command |
---|---|---|
Order selections descending | orderDescending |
[".selections.changeOrder", { direction: 1 }] |
Order selections ascending | orderAscending |
[".selections.changeOrder", { direction: -1 }] |
Sort selections.
This command:
- takes an input
expression
of typestring
.
Copy selections below.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Copy selections above | copy.above |
s-a-c (kakoune: normal) |
[".selections.copy", { direction: -1 }] |
This command:
- may be repeated with a given number of repetitions.
Default keybinding: s-c
(kakoune: normal)
Merge contiguous selections.
Default keybinding: a-_
(kakoune: normal)
Open selected file.
Toggle selection indices.
Title | Identifier | Command |
---|---|---|
Show selection indices | showIndices |
[".selections.toggleIndices", { display: true , ... }] |
Hide selection indices | hideIndices |
[".selections.toggleIndices", { display: false, ... }] |
This command:
- takes an argument
display
of typeboolean | undefined
. - takes an argument
until
of typeAutoDisposable.Event[]
.
Default keybinding: enter
(dance: normal)
Rotate selection indices and contents.
Rotate selections clockwise.
The following keybinding is also available:
Title | Identifier | Keybinding | Command |
---|---|---|---|
Rotate selections counter-clockwise | both.reverse |
a-( (kakoune: normal) |
[".selections.rotate.both", { reverse: true }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
reverse
of typeboolean
.
Default keybinding: a-)
(kakoune: normal)
Rotate selections clockwise (contents only).
The following command is also available:
Title | Identifier | Command |
---|---|---|
Rotate selections counter-clockwise (contents only) | contents.reverse |
[".selections.rotate.contents", { reverse: true }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
reverse
of typeboolean
.
Rotate selections clockwise (selections only).
The following keybinding is also available:
Title | Identifier | Keybinding | Command |
---|---|---|---|
Rotate selections counter-clockwise (selections only) | selections.reverse |
( (kakoune: normal) |
[".selections.rotate.selections", { reverse: true }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
reverse
of typeboolean
.
Default keybinding: )
(kakoune: normal)
Moving the editor view.
Title | Keybinding | Command |
---|---|---|
Show view menu | v (kakoune: normal) |
[".openMenu", { menu: "view", ... }] |
Show view menu (locked) | s-v (kakoune: normal) |
[".openMenu", { menu: "view", locked: true, ... }] |
Reveals a position based on the main cursor.
This command:
- takes an argument
at
of type"top" | "center" | "bottom"
.