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' )Shift+7 (editorTextFocus && dance.mode == 'visual' ) |
edit.case.swap | Swap case | Shift+` (editorTextFocus && dance.mode == 'normal' )Shift+` (editorTextFocus && dance.mode == 'visual' ) | |
edit.case.toLower | Transform to lower case | ` (editorTextFocus && dance.mode == 'normal' )` (editorTextFocus && dance.mode == 'visual' ) | |
edit.case.toUpper | Transform to upper case | Alt+` (editorTextFocus && dance.mode == 'normal' )Alt+` (editorTextFocus && dance.mode == 'visual' ) | |
edit.copyIndentation | Copy indentation | Shift+Alt+7 (editorTextFocus && dance.mode == 'normal' )Shift+Alt+7 (editorTextFocus && dance.mode == 'visual' ) | |
edit.deindent | Deindent selected lines | Shift+Alt+, (editorTextFocus && dance.mode == 'normal' )Shift+Alt+, (editorTextFocus && dance.mode == 'visual' ) | |
edit.deindent.withIncomplete | Deindent selected lines (including incomplete indent) | Shift+, (editorTextFocus && dance.mode == 'normal' )Shift+, (editorTextFocus && dance.mode == 'visual' ) | |
edit.delete | Delete | Alt+D (editorTextFocus && dance.mode == 'normal' )Alt+D (editorTextFocus && dance.mode == 'visual' ) | |
edit.delete-insert | Delete and switch to Insert | Alt+C (editorTextFocus && dance.mode == 'normal' )Alt+C (editorTextFocus && dance.mode == 'visual' ) | |
edit.newLine.above.insert | Insert new line above and switch to insert | Shift+O (editorTextFocus && dance.mode == 'normal' )Shift+O (editorTextFocus && dance.mode == 'visual' ) | |
edit.newLine.below.insert | Insert new line below and switch to insert | O (editorTextFocus && dance.mode == 'normal' )O (editorTextFocus && dance.mode == 'visual' ) | |
edit.paste.after | Paste after | ||
edit.paste.after.select | Paste after and select | P (editorTextFocus && dance.mode == 'normal' )P (editorTextFocus && dance.mode == 'visual' ) | |
edit.paste.before | Paste before | ||
edit.paste.before.select | Paste before and select | Shift+P (editorTextFocus && dance.mode == 'normal' )Shift+P (editorTextFocus && dance.mode == 'visual' ) | |
edit.pasteAll.after | Paste all after | ||
edit.pasteAll.after.select | Paste all after and select | Alt+P (editorTextFocus && dance.mode == 'normal' )Alt+P (editorTextFocus && dance.mode == 'visual' ) | |
edit.pasteAll.before | Paste all before | ||
edit.pasteAll.before.select | Paste all before and select | Shift+Alt+P (editorTextFocus && dance.mode == 'normal' )Shift+Alt+P (editorTextFocus && dance.mode == 'visual' ) | |
edit.selectRegister-insert | Pick register and replace | Ctrl+R (editorTextFocus && dance.mode == 'normal' )Ctrl+R (editorTextFocus && dance.mode == 'visual' ) | |
edit.yank-delete | Copy and delete | D (editorTextFocus && dance.mode == 'normal' )D (editorTextFocus && dance.mode == 'visual' ) | |
edit.yank-delete-insert | Copy, delete and switch to Insert | C (editorTextFocus && dance.mode == 'normal' )C (editorTextFocus && dance.mode == 'visual' ) | |
edit.yank-replace | Copy and replace | Shift+R (editorTextFocus && dance.mode == 'normal' )Shift+R (editorTextFocus && dance.mode == 'visual' ) | |
edit.indent | Indent selected lines | Shift+. (editorTextFocus && dance.mode == 'normal' )Shift+. (editorTextFocus && dance.mode == 'visual' ) | |
edit.indent.withEmpty | Indent selected lines (including empty lines) | Shift+Alt+. (editorTextFocus && dance.mode == 'normal' )Shift+Alt+. (editorTextFocus && dance.mode == 'visual' ) | |
edit.insert | Insert contents of register | Shift+Alt+R (editorTextFocus && dance.mode == 'normal' ) | |
edit.join | Join lines | Shift+J (editorTextFocus && dance.mode == 'normal' )Shift+J (editorTextFocus && dance.mode == 'visual' ) | |
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 | ||
edit.newLine.below | Insert new line below each selection | ||
edit.replaceCharacters | Replace characters | R (editorTextFocus && dance.mode == 'normal' )R (editorTextFocus && dance.mode == 'visual' ) | |
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' )Q (editorTextFocus && dance.mode == 'visual' ) | |
history.recording.start | Start recording | Shift+Q (editorTextFocus && dance.mode == 'normal' && !dance.isRecording )Shift+Q (editorTextFocus && dance.mode == 'visual' && !dance.isRecording ) | |
history.recording.stop | Stop recording | Escape (editorTextFocus && dance.mode == 'normal' && dance.isRecording )Shift+Q (editorTextFocus && dance.mode == 'normal' && dance.isRecording )Escape (editorTextFocus && dance.mode == 'visual' && dance.isRecording )Shift+Q (editorTextFocus && dance.mode == 'visual' && dance.isRecording ) | |
history.redo | Redo | Shift+U (editorTextFocus && dance.mode == 'normal' )Shift+U (editorTextFocus && dance.mode == 'visual' ) | |
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' ). (editorTextFocus && dance.mode == 'visual' )NumPad_Decimal (editorTextFocus && dance.mode == 'visual' ) | |
history.undo | Undo | U (editorTextFocus && dance.mode == 'normal' )U (editorTextFocus && dance.mode == 'visual' ) | |
history.undo.selections | Undo a change of selections | Alt+U (editorTextFocus && dance.mode == 'normal' ) | |
keybindings | keybindings.setup | Set up Dance keybindings | |
match | match.surround | Add stuff surround | |
match.surrounddelete | Delete stuff surround | ||
match.surroundreplace | Replace stuff surround | ||
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' )Shift+' (editorTextFocus && dance.mode == 'visual' ) | |
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 == 'visual' ) |
modes.insert.before | Insert before | I (editorTextFocus && dance.mode == 'normal' )I (editorTextFocus && dance.mode == 'visual' ) | |
modes.insert.lineEnd | Insert at line end | Shift+A (editorTextFocus && dance.mode == 'normal' )Shift+A (editorTextFocus && dance.mode == 'visual' ) | |
modes.insert.lineStart | Insert at line start | Shift+I (editorTextFocus && dance.mode == 'normal' )Shift+I (editorTextFocus && dance.mode == 'visual' ) | |
modes.set.insert | Set mode to Insert | ||
modes.set.normal | Set mode to Normal | Escape (editorTextFocus && dance.mode == 'insert' )Escape (editorTextFocus && dance.mode == 'visual' )V (editorTextFocus && dance.mode == 'visual' ) | |
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.visual | Set mode to Visual | V (editorTextFocus && dance.mode == 'normal' ) | |
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' )/ (editorTextFocus && dance.mode == 'visual' )NumPad_Divide (editorTextFocus && dance.mode == 'visual' ) | |
search.backward | Search backward | Shift+/ (editorTextFocus && dance.mode == 'normal' ) | |
search.backward.extend | Search backward (extend) | Shift+Alt+/ (editorTextFocus && dance.mode == 'normal' ) | |
search.extend | Search (extend) | Alt+/ (editorTextFocus && dance.mode == 'normal' ) | |
search.next.add | Add next match | Alt+N (editorTextFocus && dance.mode == 'normal' )N (editorTextFocus && dance.mode == 'visual' ) | |
search.previous | Select previous match | Shift+N (editorTextFocus && dance.mode == 'normal' ) | |
search.previous.add | Add previous match | Shift+Alt+N (editorTextFocus && dance.mode == 'normal' )Shift+N (editorTextFocus && dance.mode == 'visual' ) | |
search.selection.smart | Search current selection (smart) | Shift+8 (editorTextFocus && dance.mode == 'normal' )NumPad_Multiply (editorTextFocus && dance.mode == 'normal' )Shift+8 (editorTextFocus && dance.mode == 'visual' )NumPad_Multiply (editorTextFocus && dance.mode == 'visual' ) | |
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 | Shift+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) | 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 == 'visual' ) | |
seek.enclosing.extend.backward | Extend to previous enclosing character | Alt+M (editorTextFocus && dance.mode == 'visual' ) | |
seek.extend | Extend to character (excluded) | T (editorTextFocus && dance.mode == 'visual' ) | |
seek.extend.backward | Extend to character (excluded, backward) | Shift+T (editorTextFocus && dance.mode == 'visual' ) | |
seek.included | Select to character (included) | F (editorTextFocus && dance.mode == 'normal' ) | |
seek.included.backward | Select to character (included, backward) | Shift+F (editorTextFocus && dance.mode == 'normal' ) | |
seek.included.extend | Extend to character (included) | F (editorTextFocus && dance.mode == 'visual' ) | |
seek.included.extend.backward | Extend to character (included, backward) | Shift+F (editorTextFocus && dance.mode == 'visual' ) | |
seek.leap.backward | Leap backward | ||
seek.word.backward | Select to previous word start | B (editorTextFocus && dance.mode == 'normal' ) | |
seek.word.backward.extend | Extend to previous word start | B (editorTextFocus && dance.mode == 'visual' ) | |
seek.word.extend | Extend to next word start | W (editorTextFocus && dance.mode == 'visual' ) | |
seek.word.ws | Select to next WORD start | Shift+W (editorTextFocus && dance.mode == 'normal' ) | |
seek.word.ws.backward | Select to previous WORD start | Shift+B (editorTextFocus && dance.mode == 'normal' ) | |
seek.word.ws.backward.extend | Extend to previous WORD start | Shift+B (editorTextFocus && dance.mode == 'visual' ) | |
seek.word.ws.extend | Extend to next WORD start | Shift+W (editorTextFocus && dance.mode == 'visual' ) | |
seek.wordEnd | Select to next word end | E (editorTextFocus && dance.mode == 'normal' ) | |
seek.wordEnd.extend | Extend to next word end | E (editorTextFocus && dance.mode == 'visual' ) | |
seek.wordEnd.ws | Select to next WORD end | Shift+E (editorTextFocus && dance.mode == 'normal' ) | |
seek.wordEnd.ws.extend | Extend to next WORD end | Shift+E (editorTextFocus && dance.mode == 'visual' ) | |
seek.word | Select to next word start | W (editorTextFocus && dance.mode == 'normal' ) | |
select | select.buffer | Select whole buffer | Shift+5 (editorTextFocus && dance.mode == 'normal' )Shift+5 (editorTextFocus && dance.mode == 'visual' ) |
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 == 'visual' ) | |
select.lineEnd | Select to line end. TODO: helix | 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 == 'visual' )Down (editorTextFocus && dance.mode == 'visual' ) | |
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+Left (editorTextFocus && dance.mode == 'normal' )H (editorTextFocus && dance.mode == 'visual' )Left (editorTextFocus && dance.mode == 'visual' ) | |
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+Right (editorTextFocus && dance.mode == 'normal' )L (editorTextFocus && dance.mode == 'visual' )Right (editorTextFocus && dance.mode == 'visual' ) | |
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 == 'visual' ) | |
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 == 'visual' )Up (editorTextFocus && dance.mode == 'visual' ) | |
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' )Shift+C (editorTextFocus && dance.mode == 'visual' ) | |
selections.expandToLines | Expand to lines | Shift+X (editorTextFocus && dance.mode == 'normal' )Shift+X (editorTextFocus && dance.mode == 'visual' ) | |
selections.filter | Filter selections | Shift+4 (editorTextFocus && dance.mode == 'normal' )Shift+4 (editorTextFocus && dance.mode == 'visual' ) | |
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' ); (editorTextFocus && dance.mode == 'visual' ) | |
selections.restore | Restore selections. TODO: Needed? | Alt+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+Alt+Z (editorTextFocus && dance.mode == 'normal' ) | |
selections.saveText | Copy selections text | Y (editorTextFocus && dance.mode == 'normal' )Y (editorTextFocus && dance.mode == 'visual' ) | |
selections.select | Select within selections | ||
selections.clear.main | Clear main selections | Alt+, (editorTextFocus && dance.mode == 'normal' )Alt+, (editorTextFocus && dance.mode == 'visual' ) | |
selections.clear.secondary | Clear secondary selections | , (editorTextFocus && dance.mode == 'normal' ), (editorTextFocus && dance.mode == 'visual' ) | |
selections.copy.above | Copy selections above | Shift+Alt+C (editorTextFocus && dance.mode == 'normal' )Shift+Alt+C (editorTextFocus && dance.mode == 'visual' ) | |
selections.faceBackward | Backward selections | ||
selections.faceForward | Forward selections | Shift+Alt+; (editorTextFocus && dance.mode == 'normal' ) | |
selections.filter.regexp | Keep matching selections | Shift+K (editorTextFocus && dance.mode == 'normal' )Shift+K (editorTextFocus && dance.mode == 'visual' ) | |
selections.filter.regexp.inverse | Clear matching selections | Shift+Alt+K (editorTextFocus && dance.mode == 'normal' )Shift+Alt+K (editorTextFocus && dance.mode == 'visual' ) | |
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' )S (editorTextFocus && dance.mode == 'visual' ) | |
selections.showIndices | Show selection indices | ||
selections.splitLines.orLeap.backward | Leap or select backward | Alt+S (editorTextFocus && dance.mode == 'normal' )Alt+S (editorTextFocus && dance.mode == 'visual' ) | |
selections.sort | Sort selections | ||
selections.split | Split selections | Shift+S (editorTextFocus && dance.mode == 'normal' )Shift+S (editorTextFocus && dance.mode == 'visual' ) | |
selections.splitLines | Split selections at line boundaries | ||
selections.toggleIndices | Toggle selection indices | Enter (editorTextFocus && dance.mode == 'normal' )Enter (editorTextFocus && dance.mode == 'visual' ) | |
selections.trimLines | Trim lines | Alt+X (editorTextFocus && dance.mode == 'normal' ) | |
selections.trimWhitespace | Trim whitespace | Shift+- (editorTextFocus && dance.mode == 'normal' )Shift+- (editorTextFocus && dance.mode == 'visual' ) | |
selections.rotate | selections.rotate.both | Rotate selections clockwise | Shift+Alt+9 (editorTextFocus && dance.mode == 'normal' ) |
selections.rotate.contents | Rotate selections clockwise (contents only) | ||
selections.rotate.selections | Rotate selections clockwise (selections only) | Shift+9 (editorTextFocus && dance.mode == 'normal' )Shift+9 (editorTextFocus && dance.mode == 'visual' ) | |
selections.rotate.both.reverse | Rotate selections counter-clockwise | Shift+Alt+0 (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+0 (editorTextFocus && dance.mode == 'normal' )Shift+0 (editorTextFocus && dance.mode == 'visual' ) | |
view | view.line | Reveals a position based on the main cursor | |
window | window.windowMenu | Show window menu | Ctrl+W (editorTextFocus && dance.mode == 'normal' )Ctrl+W (editorTextFocus && dance.mode == 'visual' ) |
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 (helix: normal), c-r (helix: visual) |
[".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 (helix: normal), s-p (helix: visual) |
[".edit.insert", { handleNewLine: true, where: "start", shift: "select", ... }] |
Paste after and select | paste.after.select |
p (helix: normal) , p (helix: visual) |
[".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 (helix: normal), s-a-p (helix: visual) |
[".edit.insert", { handleNewLine: true, where: "start", all: true, shift: "select", ... }] |
Paste all after and select | pasteAll.after.select |
a-p (helix: normal) , a-p (helix: visual) |
[".edit.insert", { handleNewLine: true, where: "end" , all: true, shift: "select", ... }] |
Delete | delete |
a-d (helix: normal) , a-d (helix: visual) |
[".edit.insert", { register: "_", ... }] |
Delete and switch to Insert | delete-insert |
a-c (helix: normal) , a-c (helix: visual) |
[".modes.set", { mode: "insert", +mode }], [".edit.insert", { register: "_", ... }] |
Copy and delete | yank-delete |
d (helix: normal) , d (helix: visual) |
[".selections.saveText", { +register }], [".edit.insert", { register: "_", ... }] |
Copy, delete and switch to Insert | yank-delete-insert |
c (helix: normal) , c (helix: visual) |
[".selections.saveText", { +register }], [".modes.set", { mode: "insert", +mode }], [".edit.insert", { register: "_", ... }] |
Copy and replace | yank-replace |
s-r (helix: normal) , s-r (helix: visual) |
[".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: s-j
(helix: normal)
s-j
(helix: visual)
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: >
(helix: normal)
>
(helix: visual)
Indent selected lines (including empty lines).
This command:
- may be repeated with a given number of repetitions.
Default keybinding: a->
(helix: normal)
a->
(helix: visual)
Deindent selected lines.
This command:
- may be repeated with a given number of repetitions.
Default keybinding: a-<
(helix: normal)
a-<
(helix: visual)
Deindent selected lines (including incomplete indent).
This command:
- may be repeated with a given number of repetitions.
Default keybinding: <
(helix: normal)
<
(helix: visual)
Transform to lower case.
Default keybinding: `
(helix: normal)
`
(helix: visual)
Transform to upper case.
Default keybinding: a-`
(helix: normal)
a-`
(helix: visual)
Swap case.
Default keybinding: ~
(helix: normal)
~
(helix: visual)
Replace characters.
This command:
- may be repeated with a given number of repetitions.
- takes an input
input
of typestring
.
Default keybinding: r
(helix: normal)
r
(helix: visual)
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: &
(helix: normal)
&
(helix: visual)
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-&
(helix: normal)
a-&
(helix: visual)
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 (helix: normal), s-o (helix: visual) |
[".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
.
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 (helix: normal), o (helix: visual) |
[".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
.
Interact with history.
Undo.
This command:
- does not require an active text editor.
Default keybinding: u
(helix: normal)
u
(helix: visual)
Redo.
This command:
- does not require an active text editor.
Default keybinding: s-u
(helix: normal)
s-u
(helix: visual)
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: .
(helix: normal) , NumPad_Decimal
(helix: normal) , .
(helix: visual) , NumPad_Decimal
(helix: visual)
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
(helix: normal)
q
(helix: visual)
Start recording.
This command:
- accepts a register (by default, it uses
arobase
).
Default keybinding: s-q
(helix: normal, !recording) , s-q
(helix: visual, !recording)
Stop recording.
This command:
- accepts a register (by default, it uses
arobase
).
Default keybinding: escape
(helix: normal, recording) , s-q
(helix: normal, recording) , escape
(helix: visual, recording) , s-q
(helix: visual, recording)
Utilities for setting up keybindings.
Set up Dance keybindings.
This command:
- accepts a register (by default, it uses
dquote
).
Match menu.
Title | Keybinding | Command |
---|---|---|
Show match menu | m (helix: normal) |
[".openMenu", { menu: "match" }] |
Show match menu | m (helix: visual) |
[".openMenu", { menu: "match" }] |
Replace stuff surround
This command:
- takes an input
input
of typestring
.
Delete stuff surround
This command:
- takes an input
input
of typestring
.
Add stuff surround
This command:
- accepts a register (by default, it uses
dquote
). - takes an input
input
of typestring
.
Miscellaneous commands that don't deserve their own category.
By default, Dance also exports the following keybindings for existing commands:
Keybinding | Command |
---|---|
s-; (helix: normal), s-; (helix: visual) |
["workbench.action.showCommands", { ... }] |
c-c (helix: normal), c-c (helix: visual) |
["editor.action.commentLine", { ... }] |
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: "
(helix: normal)
"
(helix: visual)
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 (helix: normal), NumPad0 (helix: normal), 0 (helix: visual), NumPad0 (helix: visual) |
[".updateCount", { addDigits: 0 }] |
Add the digit 1 to the counter | 1 (helix: normal), NumPad1 (helix: normal), 1 (helix: visual), NumPad1 (helix: visual) |
[".updateCount", { addDigits: 1 }] |
Add the digit 2 to the counter | 2 (helix: normal), NumPad2 (helix: normal), 2 (helix: visual), NumPad2 (helix: visual) |
[".updateCount", { addDigits: 2 }] |
Add the digit 3 to the counter | 3 (helix: normal), NumPad3 (helix: normal), 3 (helix: visual), NumPad3 (helix: visual) |
[".updateCount", { addDigits: 3 }] |
Add the digit 4 to the counter | 4 (helix: normal), NumPad4 (helix: normal), 4 (helix: visual), NumPad4 (helix: visual) |
[".updateCount", { addDigits: 4 }] |
Add the digit 5 to the counter | 5 (helix: normal), NumPad5 (helix: normal), 5 (helix: visual), NumPad5 (helix: visual) |
[".updateCount", { addDigits: 5 }] |
Add the digit 6 to the counter | 6 (helix: normal), NumPad6 (helix: normal), 6 (helix: visual), NumPad6 (helix: visual) |
[".updateCount", { addDigits: 6 }] |
Add the digit 7 to the counter | 7 (helix: normal), NumPad7 (helix: normal), 7 (helix: visual), NumPad7 (helix: visual) |
[".updateCount", { addDigits: 7 }] |
Add the digit 8 to the counter | 8 (helix: normal), NumPad8 (helix: normal), 8 (helix: visual), NumPad8 (helix: visual) |
[".updateCount", { addDigits: 8 }] |
Add the digit 9 to the counter | 9 (helix: normal), NumPad9 (helix: normal), 9 (helix: visual), NumPad9 (helix: visual) |
[".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 (helix: insert) , escape (helix: visual) , v (helix: visual) |
[".modes.set", { mode: "normal" }], ["hideSuggestWidget"] |
Set mode to Insert | set.insert |
[".modes.set", { mode: "insert" }] |
|
Set mode to Visual | set.visual |
v (helix: normal) |
[".modes.set", { mode: "visual" }] |
Other variants are provided to switch to insert mode:
Title | Identifier | Keybinding | Commands |
---|---|---|---|
Insert before | insert.before |
i (helix: normal), i (helix: visual) |
[".selections.faceBackward", { record: false }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "start", record: false, empty: true, ... }] |
Insert after | insert.after |
a (helix: normal), a (helix: visual) |
[".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 (helix: normal), s-i (helix: visual) |
[".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 (helix: normal), s-a (helix: visual) |
[".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 |
a-/ (helix: normal) |
[".search", { shift: "extend", ... }] |
Search backward | backward |
? (helix: normal) |
[".search", { direction: -1 , ... }] |
Search backward (extend) | backward.extend |
a-? (helix: 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: /
(helix: normal) , NumPad_Divide
(helix: normal) , /
(helix: visual) , NumPad_Divide
(helix: visual)
Search current selection.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Search current selection (smart) | selection.smart |
* (helix: normal) , NumPad_Multiply (helix: normal) , * (helix: visual) , NumPad_Multiply (helix: visual) |
[".search.selection", { smart: true, +register }] |
This command:
- accepts a register (by default, it uses
slash
). - takes an argument
smart
of typeboolean
.
Default keybinding: a-*
(helix: normal) , a-NumPad_Multiply
(helix: normal)
Select next match.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Add next match | next.add |
a-n (helix: normal), n (helix: visual) |
[".search.next", { add: true, ... }] |
Select previous match | previous |
s-n (helix: normal) |
[".search.next", { direction: -1 , ... }] |
Add previous match | previous.add |
s-a-n (helix: normal), s-n (helix: visual) |
[".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
(helix: normal)
Update selections based on the text surrounding them.
Select to character (excluded).
Title | Identifier | Keybinding | Command |
---|---|---|---|
Select to character (excluded, backward) | backward |
s-t (helix: normal) |
[".seek", { direction: -1, ... }] |
Select to character (included) | included |
f (helix: normal) |
[".seek", { include: true , ... }] |
Select to character (included, backward) | included.backward |
s-f (helix: normal) |
[".seek", { include: true, direction: -1, ... }] |
Extend to character (excluded) | extend |
t (helix: visual) |
[".seek", { shift: "extend" , ... }] |
Extend to character (excluded, backward) | extend.backward |
s-t (helix: visual) |
[".seek", { shift: "extend", direction: -1, ... }] |
Extend to character (included) | included.extend |
f (helix: visual) |
[".seek", { include: true, shift: "extend" , ... }] |
Extend to character (included, backward) | included.extend.backward |
s-f (helix: visual) |
[".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 (helix: visual) |
[".seek.enclosing", { shift: "extend" , ... }] |
Select to previous enclosing character | enclosing.backward |
a-m (helix: normal) |
[".seek.enclosing", { direction: -1, ... }] |
Extend to previous enclosing character | enclosing.extend.backward |
a-m (helix: visual) |
[".seek.enclosing", { shift: "extend", direction: -1, ... }] |
This command:
- takes an argument
open
of typeboolean
. - takes an argument
pairs
of typereadonly string[]
.
Default keybinding: s-m
(helix: 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 |
---|---|---|---|
Select to next WORD start | word.ws |
s-w (helix: normal) |
[".seek.word", { ws: true , ... }] |
Select to previous word start | word.backward |
b (helix: normal) |
[".seek.word", { direction: -1, ... }] |
Select to previous WORD start | word.ws.backward |
s-b (helix: normal) |
[".seek.word", { ws: true, direction: -1, ... }] |
Select to next word end | wordEnd |
e (helix: normal) |
[".seek.word", { stopAtEnd: true , ... }] |
Select to next WORD end | wordEnd.ws |
s-e (helix: normal) |
[".seek.word", { stopAtEnd: true, ws: true , ... }] |
Extend to next word start | word.extend |
w (helix: visual) |
[".seek.word", { shift: "extend" , ... }] |
Extend to next WORD start | word.ws.extend |
s-w (helix: visual) |
[".seek.word", { ws: true, shift: "extend" , ... }] |
Extend to previous word start | word.backward.extend |
b (helix: visual) |
[".seek.word", { shift: "extend", direction: -1, ... }] |
Extend to previous WORD start | word.ws.backward.extend |
s-b (helix: visual) |
[".seek.word", { ws: true, shift: "extend", direction: -1, ... }] |
Extend to next word end | wordEnd.extend |
e (helix: visual) |
[".seek.word", { stopAtEnd: true, shift: "extend" , ... }] |
Extend to next WORD end | wordEnd.ws.extend |
s-e (helix: visual) |
[".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
(helix: 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
.
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: %
(helix: normal)
%
(helix: visual)
Select vertically.
TODO: Keep s-down and s-up?
Title | Identifier | Keybinding | Command |
---|---|---|---|
Jump down | down.jump |
j (helix: normal) , down (helix: normal) |
[".select.vertically", { direction: 1, shift: "jump" , ... }] |
Extend down | down.extend |
s-j (helix: normal), s-down (helix: normal) , j (helix: visual) , down (helix: visual) |
[".select.vertically", { direction: 1, shift: "extend", ... }] |
Jump up | up.jump |
k (helix: normal) , up (helix: normal) |
[".select.vertically", { direction: -1, shift: "jump" , ... }] |
Extend up | up.extend |
s-k (helix: normal), s-up (helix: normal) , k (helix: visual) , up (helix: visual) |
[".select.vertically", { direction: -1, shift: "extend", ... }] |
The following keybindings are also defined:
Keybinding | Command |
---|---|
c-f (helix: normal), c-f (helix: insert) |
[".select.vertically", { direction: 1, by: "page" , shift: "jump" }] |
c-d (helix: normal), c-d (helix: insert) |
[".select.vertically", { direction: 1, by: "halfPage", shift: "jump" }] |
c-b (helix: normal), c-b (helix: insert) |
[".select.vertically", { direction: -1, by: "page" , shift: "jump" }] |
c-u (helix: normal), c-u (helix: insert) |
[".select.vertically", { direction: -1, by: "halfPage", shift: "jump" }] |
c-f (helix: visual) |
[".select.vertically", { direction: 1, by: "page" , shift: "extend" }] |
c-d (helix: visual) |
[".select.vertically", { direction: 1, by: "halfPage", shift: "extend" }] |
c-b (helix: visual) |
[".select.vertically", { direction: -1, by: "page" , shift: "extend" }] |
c-u (helix: visual) |
[".select.vertically", { direction: -1, by: "halfPage", shift: "extend" }] |
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.
TODO: keep s-left and s-right?
Title | Identifier | Keybinding | Command |
---|---|---|---|
Jump right | right.jump |
l (helix: normal) , right (helix: normal) |
[".select.horizontally", { direction: 1, shift: "jump" , ... }] |
Extend right | right.extend |
s-right (helix: normal), l (helix: visual) , right (helix: visual) |
[".select.horizontally", { direction: 1, shift: "extend", ... }] |
Jump left | left.jump |
h (helix: normal) , left (helix: normal) |
[".select.horizontally", { direction: -1, shift: "jump" , ... }] |
Extend left | left.extend |
s-left (helix: normal) , h (helix: visual) , left (helix: visual) |
[".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 (helix: normal) |
[".select.to", { shift: "jump" , ... }] |
Extend to | to.extend |
s-g (helix: normal), g (helix: visual) |
[".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)
x
(helix: visual)
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 (helix: normal), s-home (helix: 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
(helix: normal)
home
(helix: normal)
Select to line end. TODO: helix
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
(helix: normal)
y
(helix: visual)
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-a-z
(helix: normal)
Restore selections. TODO: Needed?
This command:
- accepts a register (by default, it uses
caret
).
Default keybinding: a-z
(helix: 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 |
s-k (helix: normal) , s-k (helix: visual) |
[".selections.filter", { defaultExpression: "/" , ... }] |
Clear matching selections | filter.regexp.inverse |
s-a-k (helix: normal), s-a-k (helix: visual) |
[".selections.filter", { defaultExpression: "/", inverse: true, ... }] |
Clear secondary selections | clear.secondary |
, (helix: normal) , , (helix: visual) |
[".selections.filter", { expression: "i === count" , ... }] |
Clear main selections | clear.main |
a-, (helix: normal) , a-, (helix: visual) |
[".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: $
(helix: normal)
$
(helix: visual)
Select within selections.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Leap or select | select.orLeap |
s (helix: normal), s (helix: visual) |
[".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
(helix: normal)
s-s
(helix: visual)
Split selections at line boundaries.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Leap or select backward | splitLines.orLeap.backward |
a-s (helix: normal), a-s (helix: visual) |
[".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: s-x
(helix: normal)
s-x
(helix: visual)
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: _
(helix: normal)
_
(helix: visual)
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: ;
(helix: normal)
;
(helix: visual)
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 (helix: normal), s-a-c (helix: visual) |
[".selections.copy", { direction: -1 }] |
This command:
- may be repeated with a given number of repetitions.
Default keybinding: s-c
(helix: normal)
s-c
(helix: visual)
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
(helix: normal)
enter
(helix: visual)
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).
TODO: ( seems to be broken. Fix it...
The following keybinding is also available:
Title | Identifier | Keybinding | Command |
---|---|---|---|
Rotate selections counter-clockwise (selections only) | selections.reverse |
) (helix: normal), ) (helix: visual) |
[".selections.rotate.selections", { reverse: true }] |
This command:
- may be repeated with a given number of repetitions.
- takes an argument
reverse
of typeboolean
.
Default keybinding: (
(helix: normal)
(
(helix: visual)
General purpose space menu.
Title | Keybinding | Command |
---|---|---|
Show space menu | space (helix: normal), space (helix: visual) |
[".openMenu", { menu: "space", ... }] |
Moving the editor view.
Title | Keybinding | Command |
---|---|---|
Show view menu | z (helix: normal), z (helix: visual) |
[".openMenu", { menu: "view", ... }] |
Show view menu (locked) | s-z (helix: normal), s-z (helix: visual) |
[".openMenu", { menu: "view", locked: true, ... }] |
Reveals a position based on the main cursor.
This command:
- takes an argument
at
of type"top" | "center" | "bottom"
.
Window menu.
Title | Identifier | Keybinding | Command |
---|---|---|---|
Show window menu | windowMenu |
c-w (helix: normal), c-w (helix: visual) |
[".openMenu", { menu: "window", ... }] |