Dance uses VS Code keybindings to define command key-bindings. As such, its key-bindings must be configured differently depending on the keyboard layout. The following layouts will be* supported:
*: pending a future update; right now, only the default qwerty is supported.
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')Shift+` (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')Alt+` (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')Shift+O (editorTextFocus && dance.mode == 'select') | |
edit.newLine.below.insert | Insert new line below and switch to insert | O (editorTextFocus && dance.mode == 'normal')O (editorTextFocus && dance.mode == 'select') | |
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') | |
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')Shift+R (editorTextFocus && dance.mode == 'normal') | |
edit.join | Join lines | Alt+J (editorTextFocus && dance.mode == 'normal')Shift+J (editorTextFocus && dance.mode == 'normal')Shift+J (editorTextFocus && dance.mode == 'select') | |
edit.join.select | Join lines and select inserted separators | Shift+Alt+J (editorTextFocus && dance.mode == 'normal')Shift+Alt+J (editorTextFocus && dance.mode == 'select') | |
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')Alt+. (editorTextFocus && dance.mode == 'select') |
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')A (editorTextFocus && dance.mode == 'select') |
modes.insert.before | Insert before | I (editorTextFocus && dance.mode == 'normal')I (editorTextFocus && dance.mode == 'select') | |
modes.insert.lineEnd | Insert at line end | Shift+A (editorTextFocus && dance.mode == 'normal')Shift+A (editorTextFocus && dance.mode == 'select') | |
modes.insert.lineStart | Insert at line start | Shift+I (editorTextFocus && dance.mode == 'normal')Shift+I (editorTextFocus && dance.mode == 'select') | |
modes.set.insert | Set mode to Insert | ||
modes.set.normal | Set mode to Normal | Escape (editorTextFocus && dance.mode == 'insert')Escape (editorTextFocus && dance.mode == 'select')V (editorTextFocus && dance.mode == 'select') | |
modes.set.select | Set mode to Select | V (editorTextFocus && dance.mode == 'normal') | |
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')Shift+/ (editorTextFocus && dance.mode == 'normal') | |
search.backward.extend | Search backward (extend) | Shift+Alt+/ (editorTextFocus && dance.mode == 'normal')Shift+/ (editorTextFocus && dance.mode == 'select') | |
search.extend | Search (extend) | Shift+/ (editorTextFocus && dance.mode == 'normal')/ (editorTextFocus && dance.mode == 'select') | |
search.next.add | Add next match | Shift+N (editorTextFocus && dance.mode == 'normal')N (editorTextFocus && dance.mode == 'select') | |
search.previous | Select previous match | Alt+N (editorTextFocus && dance.mode == 'normal')Shift+N (editorTextFocus && dance.mode == 'normal') | |
search.previous.add | Add previous match | Shift+Alt+N (editorTextFocus && dance.mode == 'normal')Shift+N (editorTextFocus && dance.mode == 'select') | |
search.selection.smart | Search current selection (smart) | Shift+8 (editorTextFocus && dance.mode == 'normal')Shift+8 (editorTextFocus && dance.mode == 'select')NumPad_Multiply (editorTextFocus && dance.mode == 'normal')NumPad_Multiply (editorTextFocus && dance.mode == 'select') | |
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')Shift+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')Shift+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')Shift+W (editorTextFocus && dance.mode == 'normal') | |
seek.word.ws.backward | Select to previous non-whitespace word start | Alt+B (editorTextFocus && dance.mode == 'normal')Shift+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')Shift+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.wordLabel.extend | Leap to word (extend) | ||
seek.syntax.experimental | Select syntax object | ||
seek.word | Select to next word start | W (editorTextFocus && dance.mode == 'normal') | |
seek.wordLabel | Leap to word | ||
select | select.buffer | Select whole buffer | Shift+5 (editorTextFocus && dance.mode == 'normal')Shift+5 (editorTextFocus && dance.mode == 'select') |
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 | X (editorTextFocus && dance.mode == 'normal')X (editorTextFocus && dance.mode == 'select') | |
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')End (editorTextFocus && dance.mode == 'select') | |
select.lineStart.extend | Extend to line start | Shift+Alt+H (editorTextFocus && dance.mode == 'normal')Shift+Home (editorTextFocus && dance.mode == 'normal')Home (editorTextFocus && dance.mode == 'select') | |
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')Alt+; (editorTextFocus && dance.mode == 'select') |
selections.changeOrder | Reverse selections | ||
selections.clear.main | Clear main selection | Alt+, (editorTextFocus && dance.mode == 'normal')Alt+, (editorTextFocus && dance.mode == 'select') | |
selections.clear.secondary | Clear all secondary selections | , (editorTextFocus && dance.mode == 'normal'), (editorTextFocus && dance.mode == 'select') | |
selections.copy | Copy selections below | Shift+C (editorTextFocus && dance.mode == 'normal')Shift+C (editorTextFocus && dance.mode == 'select') | |
selections.expandToLines | Expand to lines | X (editorTextFocus && dance.mode == 'normal')Shift+X (editorTextFocus && dance.mode == 'normal')Shift+X (editorTextFocus && dance.mode == 'select') | |
selections.filter | Filter selections | Shift+4 (editorTextFocus && dance.mode == 'normal')Shift+4 (editorTextFocus && dance.mode == 'select') | |
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')Shift+Alt+\ (editorTextFocus && dance.mode == 'select') | |
selections.reduce | Reduce selections to their cursor | ; (editorTextFocus && dance.mode == 'normal'); (editorTextFocus && dance.mode == 'select') | |
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.copy.above | Copy selections above | Shift+Alt+C (editorTextFocus && dance.mode == 'normal')Shift+Alt+C (editorTextFocus && dance.mode == 'select') | |
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')Alt+K (editorTextFocus && dance.mode == 'select') | |
selections.filter.regexp.inverse | Clear matching selections | Shift+Alt+K (editorTextFocus && dance.mode == 'normal')Shift+Alt+K (editorTextFocus && dance.mode == 'select') | |
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')Shift+1 (editorTextFocus && dance.mode == 'select') | |
selections.pipe.prepend | Pipe and prepend | Shift+Alt+1 (editorTextFocus && dance.mode == 'normal')Shift+Alt+1 (editorTextFocus && dance.mode == 'select') | |
selections.pipe.replace | Pipe and replace | Shift+\ (editorTextFocus && dance.mode == 'normal')Shift+\ (editorTextFocus && dance.mode == 'select') | |
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')S (editorTextFocus && dance.mode == 'select') | |
selections.showIndices | Show selection indices | ||
selections.splitLines.orLeap.backward | Leap or select backward | Alt+S (editorTextFocus && dance.mode == 'normal')Alt+S (editorTextFocus && dance.mode == 'select') | |
selections.sort | Sort selections | ||
selections.split | Split selections | Shift+S (editorTextFocus && dance.mode == 'normal')Shift+S (editorTextFocus && dance.mode == 'select') | |
selections.splitLines | Split selections at line boundaries | ||
selections.toggleIndices | Toggle selection indices | Enter (editorTextFocus && dance.mode == 'normal')Enter (editorTextFocus && dance.mode == 'select') | |
selections.trimLines | Trim lines | Alt+X (editorTextFocus && dance.mode == 'normal')Alt+X (editorTextFocus && dance.mode == 'select') | |
selections.trimWhitespace | Trim whitespace | Shift+- (editorTextFocus && dance.mode == 'normal')Shift+- (editorTextFocus && dance.mode == 'select') | |
selections.rotate | selections.rotate.both | Rotate selections clockwise | Shift+Alt+0 (editorTextFocus && dance.mode == 'normal') |
selections.rotate.contents | Rotate selections clockwise (contents only) | Shift+Alt+0 (editorTextFocus && dance.mode == 'normal')Shift+Alt+0 (editorTextFocus && dance.mode == 'select') | |
selections.rotate.selections | Rotate selections clockwise (selections only) | Shift+0 (editorTextFocus && dance.mode == 'normal')Shift+0 (editorTextFocus && dance.mode == 'select') | |
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) | Shift+Alt+9 (editorTextFocus && dance.mode == 'normal')Shift+Alt+9 (editorTextFocus && dance.mode == 'select') | |
selections.rotate.selections.reverse | Rotate selections counter-clockwise (selections only) | Shift+9 (editorTextFocus && dance.mode == 'normal')Shift+9 (editorTextFocus && dance.mode == 'select') | |
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
modeof typestring. - takes an argument
valueof 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 (core: normal) |
[".edit.insert", { handleNewLine: true, where: "start", shift: "select", ... }] |
| Paste after and select | paste.after.select |
p (core: 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 (core: 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 (core: normal) |
[".selections.saveText", { +register }], [".edit.insert", { register: "_", ... }] |
| Copy, delete and switch to Insert | yank-delete-insert |
c (core: normal; 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", ... }] |
s-r (helix: select) |
[".edit.insert"], [".modes.set.normal"] |
||
a-d (helix: select) |
[".edit.delete"], [".modes.set.normal"] |
||
d (helix: select) |
[".edit.yank-delete"], [".modes.set.normal"] |
||
s-p (helix: select) |
[".edit.paste.before"], [".modes.set.normal"] |
||
p (helix: select) |
[".edit.paste.after"], [".modes.set.normal"] |
This command:
- accepts a register (by default, it uses
dquote). - may be repeated with a given number of repetitions.
- takes an argument
adjustof typeboolean. - takes an argument
allof typeboolean. - takes an argument
handleNewLineof typeboolean. - takes an argument
shiftof typeShift. - takes an argument
textof typestring. - takes an argument
whereof type"active" | "anchor" | "start" | "end" | undefined.
Default keybinding: s-a-r (kakoune: normal)
s-r (helix: normal)
Join lines.
This command:
- takes an argument
separatorof typestring.
Default keybinding: a-j (kakoune: normal)
s-j (helix: normal; helix: select)
Join lines and select inserted separators.
This command:
- takes an argument
separatorof typestring.
Default keybinding: s-a-j (core: normal; helix: select)
Indent selected lines.
| Keybindings | Commands |
|---|---|
> (helix: select) |
[".edit.indent"], [".modes.set.normal"] |
This command:
- may be repeated with a given number of repetitions.
Default keybinding: > (core: 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).
| Keybindings | Commands |
|---|---|
< (helix: select) |
[".edit.deindent"], [".modes.set.normal"] |
This command:
- may be repeated with a given number of repetitions.
Default keybinding: < (core: normal)
Transform to lower case.
| Keybindings | Commands |
|---|---|
` (helix: select) |
[".edit.case.toLower"], [".modes.set.normal"] |
Default keybinding: ` (core: normal)
Transform to upper case.
| Keybindings | Commands |
|---|---|
a-` (helix: select) |
[".edit.case.toUpper"], [".modes.set.normal"] |
Default keybinding: s-` (kakoune: normal)
a-` (helix: normal)
Swap case.
| Keybindings | Commands |
|---|---|
s-` (helix: select) |
[".edit.case.swap"], [".modes.set.normal"] |
Default keybinding: a-` (kakoune: normal)
s-` (helix: normal)
Replace characters.
| Keybindings | Commands |
|---|---|
r (helix: select) |
[".edit.replaceCharacters"], [".modes.set.normal"] |
This command:
- may be repeated with a given number of repetitions.
- takes an input
inputof typestring.
Default keybinding: r (core: 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
fillof typestring.
Default keybinding: & (core: 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 (core: normal; helix: select) |
[".edit.newLine.above", { shift: "select" }], [".modes.insert.before", { ... }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
shiftof 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 (core: normal; helix: select) |
[".edit.newLine.below", { shift: "select" }], [".modes.insert.before", { ... }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
shiftof typeShift.
Default keybinding: a-o (kakoune: normal)
Interact with history.
Undo.
This command:
- does not require an active text editor.
Default keybinding: u (core: normal; helix: select)
Redo.
This command:
- does not require an active text editor.
Default keybinding: s-u (core: normal; 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-. (core: normal; helix: select) |
[".history.repeat", { filter: "dance\\.seek", +count }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
filterof typestring | RegExp.
Repeat last edit without a command.
This command:
- may be repeated with a given number of repetitions.
Default keybinding: . (core: normal)
NumPad_Decimal (core: 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
commandsof typecommand.Any[]. - takes an input
codeof 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
registerof typestring | Register.
Default keybinding: " (core: normal)
Update the contents of a register.
This command:
- accepts a register (by default, it uses
dquote). - takes an input
inputof 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; helix: select), NumPad0 (core: normal; helix: select) |
[".updateCount", { addDigits: 0 }] |
| Add the digit 1 to the counter | 1 (core: normal; helix: select), NumPad1 (core: normal; helix: select) |
[".updateCount", { addDigits: 1 }] |
| Add the digit 2 to the counter | 2 (core: normal; helix: select), NumPad2 (core: normal; helix: select) |
[".updateCount", { addDigits: 2 }] |
| Add the digit 3 to the counter | 3 (core: normal; helix: select), NumPad3 (core: normal; helix: select) |
[".updateCount", { addDigits: 3 }] |
| Add the digit 4 to the counter | 4 (core: normal; helix: select), NumPad4 (core: normal; helix: select) |
[".updateCount", { addDigits: 4 }] |
| Add the digit 5 to the counter | 5 (core: normal; helix: select), NumPad5 (core: normal; helix: select) |
[".updateCount", { addDigits: 5 }] |
| Add the digit 6 to the counter | 6 (core: normal; helix: select), NumPad6 (core: normal; helix: select) |
[".updateCount", { addDigits: 6 }] |
| Add the digit 7 to the counter | 7 (core: normal; helix: select), NumPad7 (core: normal; helix: select) |
[".updateCount", { addDigits: 7 }] |
| Add the digit 8 to the counter | 8 (core: normal; helix: select), NumPad8 (core: normal; helix: select) |
[".updateCount", { addDigits: 8 }] |
| Add the digit 9 to the counter | 9 (core: normal; helix: select), NumPad9 (core: normal; helix: select) |
[".updateCount", { addDigits: 9 }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
addDigitsof typenumber. - takes an input
countof 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.
| Title | Keybinding | Command |
|---|---|---|
| Left bracket | [ (helix: normal) |
[".openMenu", { menu: "leftBracket", pass: [ { shift: "select" } ] }] |
| Left bracket | [ (helix: select) |
[".openMenu", { menu: "leftBracket", pass: [ { shift: "extend" } ] }] |
| Right bracket | ] (helix: normal) |
[".openMenu", { menu: "rightBracket", pass: [ { shift: "select" } ] }] |
| Right bracket | ] (helix: select) |
[".openMenu", { menu: "rightBracket", pass: [ { shift: "extend" } ] }] |
| Space | space (helix: normal; helix: select) |
[".openMenu", { menu: "space" }] |
This command:
- does not require an active text editor.
- takes an argument
delayof typenumber. - takes an argument
lockedof typeboolean. - takes an argument
passof typeany[]. - takes an argument
prefixof typestring. - takes an argument
titleof typestring. - takes an input
menuof 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
otherwiseof typecommand.Any[]. - takes an argument
thenof typecommand.Any[].
Set modes.
Set Dance mode.
| Title | Identifier | Keybinding | Command |
|---|---|---|---|
| Set mode to Normal | set.normal |
escape (core: insert; helix: select), v (helix: select) |
[".modes.set", { mode: "normal" }], ["hideSuggestWidget"] |
| Set mode to Insert | set.insert |
[".modes.set", { mode: "insert" }] |
|
| Set mode to Select | set.select |
v (helix: normal) |
[".modes.set", { mode: "select" }] |
Other variants are provided to switch to insert mode:
| Title | Identifier | Keybinding | Commands |
|---|---|---|---|
| Insert before | insert.before |
i (core: normal; helix: select) |
[".selections.faceBackward", { record: false }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "start", record: false, empty: true, ... }] |
| Insert after | insert.after |
a (core: normal; helix: select) |
[".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 (core: normal; helix: select) |
[".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 (core: normal; helix: select) |
[".select.lineEnd" , { shift: "jump" }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "end" , record: false, empty: true, ... }] |
This command:
- takes an input
modeof 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
modeof typestring.
Search for patterns and replace or add selections.
Search.
| Title | Identifier | Keybinding | Command |
|---|---|---|---|
| Search (extend) | extend |
? (kakoune: normal), / (helix: select) |
[".search", { shift: "extend", ... }] |
| Search backward | backward |
a-/ (kakoune: normal), ? (helix: normal) |
[".search", { direction: -1 , ... }] |
| Search backward (extend) | backward.extend |
a-? (kakoune: normal), ? (helix: select) |
[".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
addof typeboolean. - takes an argument
interactiveof typeboolean.
Default keybinding: / (core: normal)
NumPad_Divide (core: normal)
Search current selection.
| Title | Identifier | Keybinding | Command |
|---|---|---|---|
| Search current selection (smart) | selection.smart |
* (core: normal; helix: select), NumPad_Multiply (core: normal; helix: select) |
[".search.selection", { smart: true, +register }] |
This command:
- accepts a register (by default, it uses
slash). - takes an argument
smartof typeboolean.
Default keybinding: a-* (core: normal)
a-NumPad_Multiply (core: normal)
Select next match.
| Title | Identifier | Keybinding | Command |
|---|---|---|---|
| Add next match | next.add |
s-n (kakoune: normal), n (helix: select) |
[".search.next", { add: true, ... }] |
| Select previous match | previous |
a-n (kakoune: normal), s-n (helix: normal) |
[".search.next", { direction: -1 , ... }] |
| Add previous match | previous.add |
s-a-n (kakoune: normal), s-n (helix: select) |
[".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
addof typeboolean.
Default keybinding: n (core: normal)
Update selections based on the text surrounding them.
| Title | Keybinding | Command |
|---|---|---|
| Open match menu | m (helix: normal) |
[".openMenu", { menu: "match" }] |
| Open match menu with extend | m (helix: select) |
[".openMenu", { menu: "match", pass: [{ shift: "extend" }] }] |
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), s-t (helix: 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 (core: 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), s-f (helix: 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
includeof typeboolean. - takes an input
inputof typestring.
Default keybinding: t (core: 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
openof typeboolean. - takes an argument
pairsof 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 (core: 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), s-w (helix: 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), s-b (helix: 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 (core: 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), s-e (helix: 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
stopAtEndof typeboolean. - takes an argument
wsof typeboolean.
Default keybinding: w (core: 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
innerof typeboolean. - takes an argument
whereof type"start" | "end". - takes an input
inputof 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
whereof 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
labelsof typestring.
Leap to word.
This is the same as goto word (gw) in helix.
| Title | Identifier | Command |
|---|---|---|
| Leap to word (extend) | wordLabel.extend |
[".seek.wordLabel", { shift: "extend", ... }] |
This command:
- takes an argument
labelCharsof typestring.
Update selections based on their position in the document.
Select whole buffer.
Default keybinding: % (core: normal; helix: select)
Select vertically.
| Title | Identifier | Keybinding | Command |
|---|---|---|---|
| Jump down | down.jump |
j (core: normal) , down (core: 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 (core: normal) , up (core: 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 (core: normal; core: insert) |
[".select.vertically", { direction: 1, by: "page" , shift: "jump" }] |
c-d (core: normal; core: insert) |
[".select.vertically", { direction: 1, by: "halfPage", shift: "jump" }] |
c-b (core: normal; core: insert) |
[".select.vertically", { direction: -1, by: "page" , shift: "jump" }] |
c-u (core: normal; core: insert) |
[".select.vertically", { direction: -1, by: "halfPage", shift: "jump" }] |
c-f (helix: select) |
[".select.vertically", { direction: 1, by: "page" , shift: "extend" }] |
c-d (helix: select) |
[".select.vertically", { direction: 1, by: "halfPage", shift: "extend" }] |
c-b (helix: select) |
[".select.vertically", { direction: -1, by: "page" , shift: "extend" }] |
c-u (helix: select) |
[".select.vertically", { direction: -1, by: "halfPage", shift: "extend" }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
avoidEolof typeboolean. - takes an argument
byof type"page" | "halfPage".
Select horizontally.
| Title | Identifier | Keybinding | Command |
|---|---|---|---|
| Jump right | right.jump |
l (core: normal) , right (core: 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 (core: normal) , left (core: 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
avoidEolof 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 (core: 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.
Default keybinding: x (helix: normal; helix: select)
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), home (helix: select) |
[".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
skipBlankof typeboolean.
Default keybinding: a-h (kakoune: normal)
home (core: normal)
Select to line end.
| Title | Identifier | Keybinding | Command |
|---|---|---|---|
| Extend to line end | lineEnd.extend |
s-a-l (kakoune: normal), s-end (kakoune: normal), end (helix: select) |
[".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
lineBreakof typeboolean.
Default keybinding: a-l (kakoune: normal)
end (core: 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.
| Keybindings | Commands |
|---|---|
y (helix: select) |
[".selections.saveText"], [".modes.set.normal"] |
This command:
- accepts a register (by default, it uses
dquote).
Default keybinding: y (core: normal)
Save selections.
This command:
- accepts a register (by default, it uses
caret). - takes an argument
styleof typeobject. - takes an argument
untilDelayof typenumber. - takes an argument
untilof 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
actionof type"a" | "u" | "i" | "<" | ">" | "+" | "-". - takes an argument
reverseof 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 |
| (core: normal; helix: select) |
[".selections.pipe", { +expression,register }], [".edit.insert", { register: "|", ... }] |
| Pipe and append | pipe.append |
! (core: normal; helix: select) |
[".selections.pipe", { +expression,register }], [".edit.insert", { register: "|", where: "end" , shift: "select", ... }] |
| Pipe and prepend | pipe.prepend |
a-! (core: normal; helix: select) |
[".selections.pipe", { +expression,register }], [".edit.insert", { register: "|", where: "start", shift: "select", ... }] |
This command:
- accepts a register (by default, it uses
pipe). - takes an input
expressionof typestring.
Default keybinding: a-| (core: normal; helix: select)
Filter selections.
| Title | Identifier | Keybinding | Commands |
|---|---|---|---|
| Keep matching selections | filter.regexp |
a-k (core: normal; helix: select) |
[".selections.filter", { defaultExpression: "/" , ... }] |
| Clear matching selections | filter.regexp.inverse |
s-a-k (core: normal; helix: select) |
[".selections.filter", { defaultExpression: "/", inverse: true, ... }] |
This command:
- accepts an argument of type
{ expression?: string }. - may be repeated with a given number of repetitions.
- takes an argument
defaultExpressionof typestring. - takes an argument
interactiveof typeboolean. - takes an argument
inverseof typeboolean.
Default keybinding: $ (core: normal; helix: select)
Clear all secondary selections.
Default keybinding: , (core: normal; helix: select)
Clear main selection.
Default keybinding: a-, (core: normal; helix: select)
Select within selections.
| Title | Identifier | Keybinding | Command |
|---|---|---|---|
| Leap or select | select.orLeap |
s (core: normal; helix: select) |
[".ifEmpty", { then: [[".seek.leap", { ... }]], otherwise: [[".selections.select", { ... }]] }] |
This command:
- accepts a register (by default, it uses
slash). - accepts an argument of type
{ re?: string | RegExp & { originalSource?: string } }. - takes an argument
interactiveof typeboolean.
Split selections.
This command:
- accepts a register (by default, it uses
slash). - accepts an argument of type
{ re?: string | RegExp & { originalSource?: string } }. - takes an argument
excludeEmptyof typeboolean. - takes an argument
interactiveof typeboolean.
Default keybinding: s-s (core: normal; helix: select)
Split selections at line boundaries.
| Title | Identifier | Keybinding | Command |
|---|---|---|---|
| Leap or select backward | splitLines.orLeap.backward |
a-s (core: normal; helix: select) |
[".ifEmpty", { then: [[".seek.leap", { direction: -1, ... }]], otherwise: [[".selections.splitLines", { ... }]] }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
excludeEolof typeboolean.
Expand to lines.
Expand selections to contain full lines (including end-of-line characters).
Default keybinding: x (kakoune: normal)
s-x (helix: normal; helix: select)
Trim lines.
Trim selections to only contain full lines (from start to line break).
Default keybinding: a-x (core: normal; helix: select)
Trim whitespace.
Trim whitespace at beginning and end of selections.
Default keybinding: _ (core: normal; helix: select)
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
emptyof typeboolean. - takes an argument
whereof type"active" | "anchor" | "start" | "end" | "both".
Default keybinding: ; (core: normal; helix: select)
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-; (core: normal; helix: select)
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
expressionof typestring.
Copy selections below.
| Title | Identifier | Keybinding | Command |
|---|---|---|---|
| Copy selections above | copy.above |
s-a-c (core: normal; helix: select) |
[".selections.copy", { direction: -1 }] |
This command:
- may be repeated with a given number of repetitions.
Default keybinding: s-c (core: normal; helix: select)
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
displayof typeboolean | undefined. - takes an argument
untilof typeAutoDisposable.Event[].
Default keybinding: enter (core: normal; helix: select)
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
reverseof typeboolean.
Default keybinding: a-) (kakoune: normal)
Rotate selections clockwise (contents only).
The following command is also available:
| Title | Identifier | Keybinding | Command |
|---|---|---|---|
| Rotate selections counter-clockwise (contents only) | contents.reverse |
a-( (helix: normal; helix: select) |
[".selections.rotate.contents", { reverse: true }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
reverseof typeboolean.
Default keybinding: a-) (helix: normal; helix: select)
Rotate selections clockwise (selections only).
The following keybinding is also available:
| Title | Identifier | Keybinding | Command |
|---|---|---|---|
| Rotate selections counter-clockwise (selections only) | selections.reverse |
( (core: normal; helix: select) |
[".selections.rotate.selections", { reverse: true }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
reverseof typeboolean.
Default keybinding: ) (core: normal; helix: select)
Moving the editor view.
| Title | Keybinding | Command |
|---|---|---|
| Show view menu | v (kakoune: normal), z (helix: normal; helix: select) |
[".openMenu", { menu: "view", ... }] |
| Show view menu (locked) | s-v (kakoune: normal), s-z (helix: normal; helix: select) |
[".openMenu", { menu: "view", locked: true, ... }] |
Reveals a position based on the main cursor.
This command:
- takes an argument
atof type"top" | "center" | "bottom".