diff --git a/.gitattributes b/.gitattributes index 7f37cd42..62cf7aed 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3,5 +3,6 @@ /src/commands/load-all.ts linguist-generated /src/commands/README.md linguist-generated /package.json linguist-generated +/extensions/helix/package.json linguist-generated /test/suite/api.test.ts linguist-generated /test/suite/commands/*.test.ts linguist-generated diff --git a/.vscode/launch.json b/.vscode/launch.json index 59779fbf..49dead84 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,6 +9,17 @@ "args": ["--extensionDevelopmentPath=${workspaceFolder}"], "outFiles": ["${workspaceFolder}/out/**/*.js"], }, + { + "name": "Launch extension with Helix keybindings", + "type": "extensionHost", + "request": "launch", + "runtimeExecutable": "${execPath}", + "args": [ + "--extensionDevelopmentPath=${workspaceFolder}", + "--extensionDevelopmentPath=${workspaceFolder}/extensions/helix/", + ], + "outFiles": ["${workspaceFolder}/out/**/*.js"], + }, { "name": "Run all tests", "type": "extensionHost", diff --git a/LICENSE b/LICENSE index 3155ccf3..827ae984 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright 2020-2021 Grégoire Geis +Copyright 2020-2025 Grégoire Geis Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. diff --git a/extensions/helix/LICENSE b/extensions/helix/LICENSE new file mode 100644 index 00000000..827ae984 --- /dev/null +++ b/extensions/helix/LICENSE @@ -0,0 +1,5 @@ +Copyright 2020-2025 Grégoire Geis + +Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/extensions/helix/README.md b/extensions/helix/README.md new file mode 100644 index 00000000..7cec1dcd --- /dev/null +++ b/extensions/helix/README.md @@ -0,0 +1,3 @@ +# Dance - Helix keybindings + +Helix keybindings for VS Code based on [Dance](https://github.com/71/dance). diff --git a/extensions/helix/assets/dance.png b/extensions/helix/assets/dance.png new file mode 100644 index 00000000..7a9cd74c Binary files /dev/null and b/extensions/helix/assets/dance.png differ diff --git a/extensions/helix/package.build.ts b/extensions/helix/package.build.ts new file mode 100644 index 00000000..762702c9 --- /dev/null +++ b/extensions/helix/package.build.ts @@ -0,0 +1,207 @@ +// Save to package.json +// ============================================================================ + +import { Builder, generateIgnoredKeybinds } from "../../meta"; +import * as fs from "fs/promises"; +import { extensionId } from "../../src/utils/constants"; + +const version = "0.1.0", + preRelease = 1, + preReleaseVersion = `${version}-pre${preRelease}`; + +export const pkg = (modules: Builder.ParsedModule[]) => ({ + + // Common package.json properties. + // ========================================================================== + + name: "dance-helix-keybindings", + description: "Helix keybindings for Dance", + version, + license: "ISC", + extensionDependencies: [extensionId], + author: { + name: "Grégoire Geis", + email: "opensource@gregoirege.is", + }, + + contributors: [ + { + name: "Rémi Lavergne", + url: "https://github.com/Strackeror", + }, + ], + + repository: { + type: "git", + url: "https://github.com/71/dance.git", + }, + + engines: { + vscode: "^1.63.0", + }, + + displayName: "Dance (Helix keybindings)", + publisher: "gregoire", + categories: ["Keymaps", "Other"], + readme: "README.md", + icon: "assets/dance.png", + extensionKind: ["ui", "workspace"], + + scripts: { + "package": "vsce package --allow-star-activation", + "publish": "vsce publish --allow-star-activation", + "package:pre": `vsce package --allow-star-activation --pre-release --no-git-tag-version --no-update-package-json ${preReleaseVersion}`, + "publish:pre": `vsce publish --allow-star-activation --pre-release --no-git-tag-version --no-update-package-json ${preReleaseVersion}`, + }, + + contributes: { + configurationDefaults: { + "dance.defaultMode": "helix/normal", + "dance.modes": { + "helix/insert": { + onLeaveMode: [ + [".selections.save", { + register: " insert", + }], + ], + }, + "helix/select": { + cursorStyle: "block", + selectionBehavior: "character", + }, + "helix/normal": { + cursorStyle: "block", + selectionBehavior: "character", + decorations: { + applyTo: "main", + backgroundColor: "$editor.hoverHighlightBackground", + isWholeLine: true, + }, + onEnterMode: [ + [".selections.restore", { register: " ^", try: true }], + ], + onLeaveMode: [ + [".selections.save", { + register: " ^", + style: { + borderColor: "$editor.selectionBackground", + borderStyle: "solid", + borderWidth: "2px", + borderRadius: "1px", + }, + until: [ + ["mode-did-change", { include: "normal" }], + ["selections-did-change"], + ], + }], + ], + }, + }, + + "dance.menus": { + match: { + title: "Match", + items: { + // Should be jump in normal mode, extend in select mode, but jump for seek.enclosing is not implemented + "m": { command: "dance.seek.enclosing", text: "Goto matching bracket" }, + "a": { command: "dance.openMenu", args: [{ menu: "object", title: "Match around" }], text: "Select around object" }, + "i": { command: "dance.openMenu", args: [{ menu: "object", title: "Match inside", pass: [{ inner: true }] }], text: "Select inside object" }, + }, + }, + + object: { + title: "Select object...", + items: ((command = "dance.seek.object") => ({ + "()": { command, args: [{ input: "\\((?#inner)\\)" }], text: "parenthesis block" }, + "{}": { command, args: [{ input: "\\{(?#inner)\\}" }], text: "braces block" }, + "[]": { command, args: [{ input: "\\[(?#inner)\\]" }], text: "brackets block" }, + "<>": { command, args: [{ input: "<(?#inner)>" }], text: "angle block" }, + '"': { command, args: [{ input: "(?#noescape)\"(?#inner)(?#noescape)\"" }], text: "double quote string" }, + "'": { command, args: [{ input: "(?#noescape)'(?#inner)(?#noescape)'" }], text: "single quote string" }, + "`": { command, args: [{ input: "(?#noescape)`(?#inner)(?#noescape)`" }], text: "grave quote string" }, + "w": { command, args: [{ input: "[\\p{L}_\\d]+(?[^\\S\\n]+)" }], text: "word" }, + "W": { command, args: [{ input: "[\\S]+(?[^\\S\\n]+)" }], text: "WORD" }, + "p": { command, args: [{ input: "(?#predefined=paragraph)" }], text: "paragraph" }, + "a": { command, args: [{ input: "(?#predefined=argument)" }], text: "argument" }, + "!": { command, text: "custom object desc" }, + }))(), + }, + + view: { + "title": "View", + "items": { + "cz": { text: "Align view center", command: "dance.view.line", args: [{ "at": "center" }] }, + "t": { text: "Align view top", command: "dance.view.line", args: [{ "at": "top" }] }, + "b": { text: "Align view bottom", command: "dance.view.line", args: [{ "at": "bottom" }] }, + "k": { text: "Scroll view up", command: "editorScroll", args: [{ "by": "line", "revealCursor": true, "to": "up" }] }, + "j": { text: "Scroll view down", command: "editorScroll", args: [{ "by": "line", "revealCursor": true, "to": "down" }] }, + "/": { text: "Search for regex pattern", command: "dance.search" }, + "?": { text: "Reverse search for regex pattern", command: "dance.search.backward" }, + "n": { text: "Select next search match", command: "dance.search.next" }, + "N": { text: "Select previous search match", command: "dance.search.previous" }, + }, + }, + + goto: { + title: "Goto", + items: { + "g": { text: "to line number else file start", command: "dance.select.lineStart", "args": [{ "count": 1 }] }, + "e": { text: "to last line", command: "dance.select.lineEnd", args: [{ count: 2 ** 31 - 1 }] }, + "f": { text: "to file/URLs in selections", command: "dance.selections.open" }, + "h": { text: "to line start", command: "dance.select.lineStart" }, + "l": { text: "to line end", command: "dance.select.lineEnd" }, + "s": { text: "to first non-blank in line", command: "dance.select.lineStart", args: [{ skipBlank: true }] }, + "d": { text: "to definition", command: "editor.action.revealDefinition" }, + "r": { text: "to references", command: "editor.action.goToReferences" }, + "j": { text: "to last line", command: "dance.select.lastLine" }, + "t": { text: "to window top", command: "dance.select.firstVisibleLine" }, + "c": { text: "to window center", command: "dance.select.middleVisibleLine" }, + "b": { text: "to window bottom", command: "dance.select.lastVisibleLine" }, + "a": { text: "to last buffer", command: "workbench.action.openPreviousRecentlyUsedEditorInGroup" }, + "A": { text: "to last buffer...", command: "workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup" }, + "n": { text: "to next buffer", command: "workbench.action.nextEditor" }, + "p": { text: "to previous buffer", command: "workbench.action.previousEditor" }, + ".": { text: "to last buffer modification position", command: "dance.selections.restore", args: [{ register: " insert" }], + }, + }, + }, + }, + }, + + keybindings: (() => { + const ignoredKeybindings = [], + keybindings = modules + .flatMap((module) => module.keybindings) + .filter((keybinding) => ["core", "helix", undefined].includes(keybinding.category)) + .map(({ category, ...kb }) => kb); + + for (const mode of ["normal", "select", "insert"]) { + for (const keybind of keybindings) { + keybind.when = keybind.when.replace(`dance.mode == '${mode}'`, `dance.mode == 'helix/${mode}'`); + } + } + + for (const mode of ["normal", "select"]) { + const whenMode = `editorTextFocus && dance.mode == 'helix/${mode}'`; + ignoredKeybindings.push(...generateIgnoredKeybinds( + keybindings.filter(key => key.when.includes(whenMode)), + whenMode, + )); + } + + return [ + ...keybindings, + ...ignoredKeybindings, + ]; + })(), + }, +}); + + +export async function build(builder: Builder) { + await fs.writeFile( + `${__dirname}/package.json`, + JSON.stringify(pkg(await builder.getCommandModules()), undefined, 2) + "\n", + "utf-8", + ); +} diff --git a/extensions/helix/package.json b/extensions/helix/package.json new file mode 100644 index 00000000..8196ed9a --- /dev/null +++ b/extensions/helix/package.json @@ -0,0 +1,2349 @@ +{ + "name": "dance-helix-keybindings", + "description": "Helix keybindings for Dance", + "version": "0.1.0", + "license": "ISC", + "extensionDependencies": [ + "gregoire.dance" + ], + "author": { + "name": "Grégoire Geis", + "email": "opensource@gregoirege.is" + }, + "contributors": [ + { + "name": "Rémi Lavergne", + "url": "https://github.com/Strackeror" + } + ], + "repository": { + "type": "git", + "url": "https://github.com/71/dance.git" + }, + "engines": { + "vscode": "^1.63.0" + }, + "displayName": "Dance (Helix keybindings)", + "publisher": "gregoire", + "categories": [ + "Keymaps", + "Other" + ], + "readme": "README.md", + "icon": "assets/dance.png", + "extensionKind": [ + "ui", + "workspace" + ], + "scripts": { + "package": "vsce package --allow-star-activation", + "publish": "vsce publish --allow-star-activation", + "package:pre": "vsce package --allow-star-activation --pre-release --no-git-tag-version --no-update-package-json 0.1.0-pre1", + "publish:pre": "vsce publish --allow-star-activation --pre-release --no-git-tag-version --no-update-package-json 0.1.0-pre1" + }, + "contributes": { + "configurationDefaults": { + "dance.defaultMode": "helix/normal", + "dance.modes": { + "helix/insert": { + "onLeaveMode": [ + [ + ".selections.save", + { + "register": " insert" + } + ] + ] + }, + "helix/select": { + "cursorStyle": "block", + "selectionBehavior": "character" + }, + "helix/normal": { + "cursorStyle": "block", + "selectionBehavior": "character", + "decorations": { + "applyTo": "main", + "backgroundColor": "$editor.hoverHighlightBackground", + "isWholeLine": true + }, + "onEnterMode": [ + [ + ".selections.restore", + { + "register": " ^", + "try": true + } + ] + ], + "onLeaveMode": [ + [ + ".selections.save", + { + "register": " ^", + "style": { + "borderColor": "$editor.selectionBackground", + "borderStyle": "solid", + "borderWidth": "2px", + "borderRadius": "1px" + }, + "until": [ + [ + "mode-did-change", + { + "include": "normal" + } + ], + [ + "selections-did-change" + ] + ] + } + ] + ] + } + }, + "dance.menus": { + "match": { + "title": "Match", + "items": { + "m": { + "command": "dance.seek.enclosing", + "text": "Goto matching bracket" + }, + "a": { + "command": "dance.openMenu", + "args": [ + { + "menu": "object", + "title": "Match around" + } + ], + "text": "Select around object" + }, + "i": { + "command": "dance.openMenu", + "args": [ + { + "menu": "object", + "title": "Match inside", + "pass": [ + { + "inner": true + } + ] + } + ], + "text": "Select inside object" + } + } + }, + "object": { + "title": "Select object...", + "items": { + "()": { + "command": "dance.seek.object", + "args": [ + { + "input": "\\((?#inner)\\)" + } + ], + "text": "parenthesis block" + }, + "{}": { + "command": "dance.seek.object", + "args": [ + { + "input": "\\{(?#inner)\\}" + } + ], + "text": "braces block" + }, + "[]": { + "command": "dance.seek.object", + "args": [ + { + "input": "\\[(?#inner)\\]" + } + ], + "text": "brackets block" + }, + "<>": { + "command": "dance.seek.object", + "args": [ + { + "input": "<(?#inner)>" + } + ], + "text": "angle block" + }, + "\"": { + "command": "dance.seek.object", + "args": [ + { + "input": "(?#noescape)\"(?#inner)(?#noescape)\"" + } + ], + "text": "double quote string" + }, + "'": { + "command": "dance.seek.object", + "args": [ + { + "input": "(?#noescape)'(?#inner)(?#noescape)'" + } + ], + "text": "single quote string" + }, + "`": { + "command": "dance.seek.object", + "args": [ + { + "input": "(?#noescape)`(?#inner)(?#noescape)`" + } + ], + "text": "grave quote string" + }, + "w": { + "command": "dance.seek.object", + "args": [ + { + "input": "[\\p{L}_\\d]+(?[^\\S\\n]+)" + } + ], + "text": "word" + }, + "W": { + "command": "dance.seek.object", + "args": [ + { + "input": "[\\S]+(?[^\\S\\n]+)" + } + ], + "text": "WORD" + }, + "p": { + "command": "dance.seek.object", + "args": [ + { + "input": "(?#predefined=paragraph)" + } + ], + "text": "paragraph" + }, + "a": { + "command": "dance.seek.object", + "args": [ + { + "input": "(?#predefined=argument)" + } + ], + "text": "argument" + }, + "!": { + "command": "dance.seek.object", + "text": "custom object desc" + } + } + }, + "view": { + "title": "View", + "items": { + "cz": { + "text": "Align view center", + "command": "dance.view.line", + "args": [ + { + "at": "center" + } + ] + }, + "t": { + "text": "Align view top", + "command": "dance.view.line", + "args": [ + { + "at": "top" + } + ] + }, + "b": { + "text": "Align view bottom", + "command": "dance.view.line", + "args": [ + { + "at": "bottom" + } + ] + }, + "k": { + "text": "Scroll view up", + "command": "editorScroll", + "args": [ + { + "by": "line", + "revealCursor": true, + "to": "up" + } + ] + }, + "j": { + "text": "Scroll view down", + "command": "editorScroll", + "args": [ + { + "by": "line", + "revealCursor": true, + "to": "down" + } + ] + }, + "/": { + "text": "Search for regex pattern", + "command": "dance.search" + }, + "?": { + "text": "Reverse search for regex pattern", + "command": "dance.search.backward" + }, + "n": { + "text": "Select next search match", + "command": "dance.search.next" + }, + "N": { + "text": "Select previous search match", + "command": "dance.search.previous" + } + } + }, + "goto": { + "title": "Goto", + "items": { + "g": { + "text": "to line number else file start", + "command": "dance.select.lineStart", + "args": [ + { + "count": 1 + } + ] + }, + "e": { + "text": "to last line", + "command": "dance.select.lineEnd", + "args": [ + { + "count": 2147483647 + } + ] + }, + "f": { + "text": "to file/URLs in selections", + "command": "dance.selections.open" + }, + "h": { + "text": "to line start", + "command": "dance.select.lineStart" + }, + "l": { + "text": "to line end", + "command": "dance.select.lineEnd" + }, + "s": { + "text": "to first non-blank in line", + "command": "dance.select.lineStart", + "args": [ + { + "skipBlank": true + } + ] + }, + "d": { + "text": "to definition", + "command": "editor.action.revealDefinition" + }, + "r": { + "text": "to references", + "command": "editor.action.goToReferences" + }, + "j": { + "text": "to last line", + "command": "dance.select.lastLine" + }, + "t": { + "text": "to window top", + "command": "dance.select.firstVisibleLine" + }, + "c": { + "text": "to window center", + "command": "dance.select.middleVisibleLine" + }, + "b": { + "text": "to window bottom", + "command": "dance.select.lastVisibleLine" + }, + "a": { + "text": "to last buffer", + "command": "workbench.action.openPreviousRecentlyUsedEditorInGroup" + }, + "A": { + "text": "to last buffer...", + "command": "workbench.action.quickOpenPreviousRecentlyUsedEditorInGroup" + }, + "n": { + "text": "to next buffer", + "command": "workbench.action.nextEditor" + }, + "p": { + "text": "to previous buffer", + "command": "workbench.action.previousEditor" + }, + ".": { + "text": "to last buffer modification position", + "command": "dance.selections.restore", + "args": [ + { + "register": " insert" + } + ] + } + } + } + } + }, + "keybindings": [ + { + "key": "Shift+7", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Align selections", + "command": "dance.edit.align" + }, + { + "key": "Shift+`", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Swap case", + "command": "dance.edit.case.swap" + }, + { + "key": "`", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Transform to lower case", + "command": "dance.edit.case.toLower" + }, + { + "key": "Alt+`", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Transform to upper case", + "command": "dance.edit.case.toUpper" + }, + { + "key": "Shift+,", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Deindent selected lines (including incomplete indent)", + "command": "dance.edit.deindent.withIncomplete" + }, + { + "key": "Alt+D", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Delete", + "command": "dance.edit.delete" + }, + { + "key": "Shift+.", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Indent selected lines", + "command": "dance.edit.indent" + }, + { + "key": "Shift+R", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Insert contents of register", + "command": "dance.edit.insert" + }, + { + "key": "Shift+J", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Join lines", + "command": "dance.edit.join" + }, + { + "key": "Shift+J", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Join lines", + "command": "dance.edit.join" + }, + { + "key": "Shift+Alt+J", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Join lines and select inserted separators", + "command": "dance.edit.join.select" + }, + { + "key": "Shift+Alt+J", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Join lines and select inserted separators", + "command": "dance.edit.join.select" + }, + { + "key": "Shift+O", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Insert new line above and switch to insert", + "command": "dance.edit.newLine.above.insert" + }, + { + "key": "Shift+O", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Insert new line above and switch to insert", + "command": "dance.edit.newLine.above.insert" + }, + { + "key": "O", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Insert new line below and switch to insert", + "command": "dance.edit.newLine.below.insert" + }, + { + "key": "O", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Insert new line below and switch to insert", + "command": "dance.edit.newLine.below.insert" + }, + { + "key": "P", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Paste after and select", + "command": "dance.edit.paste.after.select" + }, + { + "key": "Shift+P", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Paste before and select", + "command": "dance.edit.paste.before.select" + }, + { + "key": "R", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Replace characters", + "command": "dance.edit.replaceCharacters" + }, + { + "key": "D", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Copy and delete", + "command": "dance.edit.yank-delete" + }, + { + "key": "C", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Copy, delete and switch to Insert", + "command": "dance.edit.yank-delete-insert" + }, + { + "key": "C", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Copy, delete and switch to Insert", + "command": "dance.edit.yank-delete-insert" + }, + { + "key": "Shift+R", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "command": "dance.run", + "args": { + "commands": [ + [ + ".edit.insert" + ], + [ + ".modes.set.normal" + ] + ] + } + }, + { + "key": "Alt+D", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "command": "dance.run", + "args": { + "commands": [ + [ + ".edit.delete" + ], + [ + ".modes.set.normal" + ] + ] + } + }, + { + "key": "D", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "command": "dance.run", + "args": { + "commands": [ + [ + ".edit.yank-delete" + ], + [ + ".modes.set.normal" + ] + ] + } + }, + { + "key": "Shift+P", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "command": "dance.run", + "args": { + "commands": [ + [ + ".edit.paste.before" + ], + [ + ".modes.set.normal" + ] + ] + } + }, + { + "key": "P", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "command": "dance.run", + "args": { + "commands": [ + [ + ".edit.paste.after" + ], + [ + ".modes.set.normal" + ] + ] + } + }, + { + "key": "Shift+.", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "command": "dance.run", + "args": { + "commands": [ + [ + ".edit.indent" + ], + [ + ".modes.set.normal" + ] + ] + } + }, + { + "key": "Shift+,", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "command": "dance.run", + "args": { + "commands": [ + [ + ".edit.deindent" + ], + [ + ".modes.set.normal" + ] + ] + } + }, + { + "key": "`", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "command": "dance.run", + "args": { + "commands": [ + [ + ".edit.case.toLower" + ], + [ + ".modes.set.normal" + ] + ] + } + }, + { + "key": "Alt+`", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "command": "dance.run", + "args": { + "commands": [ + [ + ".edit.case.toUpper" + ], + [ + ".modes.set.normal" + ] + ] + } + }, + { + "key": "Shift+`", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "command": "dance.run", + "args": { + "commands": [ + [ + ".edit.case.swap" + ], + [ + ".modes.set.normal" + ] + ] + } + }, + { + "key": "R", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "command": "dance.run", + "args": { + "commands": [ + [ + ".edit.replaceCharacters" + ], + [ + ".modes.set.normal" + ] + ] + } + }, + { + "key": "Shift+U", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Redo", + "command": "dance.history.redo" + }, + { + "key": "Shift+U", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Redo", + "command": "dance.history.redo" + }, + { + "key": ".", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Repeat last edit without a command", + "command": "dance.history.repeat.edit" + }, + { + "key": "NumPad_Decimal", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Repeat last edit without a command", + "command": "dance.history.repeat.edit" + }, + { + "key": "Alt+.", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Repeat last seek", + "command": "dance.history.repeat.seek" + }, + { + "key": "Alt+.", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Repeat last seek", + "command": "dance.history.repeat.seek" + }, + { + "key": "U", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Undo", + "command": "dance.history.undo" + }, + { + "key": "U", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Undo", + "command": "dance.history.undo" + }, + { + "key": "Escape", + "when": "editorTextFocus && dance.mode == 'helix/normal' && !dance.isRecording && !markersNavigationVisible", + "title": "Cancel Dance operation", + "command": "dance.cancel" + }, + { + "key": "Escape", + "when": "editorTextFocus && dance.mode == 'input'", + "title": "Cancel Dance operation", + "command": "dance.cancel" + }, + { + "key": "Up", + "when": "inputFocus && dance.inPrompt", + "command": "dance.changeInput", + "args": { + "action": "previous" + } + }, + { + "key": "Down", + "when": "inputFocus && dance.inPrompt", + "command": "dance.changeInput", + "args": { + "action": "next" + } + }, + { + "key": "Shift+'", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Select register for next command", + "command": "dance.selectRegister" + }, + { + "key": "0", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Add the digit 0 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 0 + } + }, + { + "key": "0", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add the digit 0 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 0 + } + }, + { + "key": "NumPad0", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Add the digit 0 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 0 + } + }, + { + "key": "NumPad0", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add the digit 0 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 0 + } + }, + { + "key": "1", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Add the digit 1 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 1 + } + }, + { + "key": "1", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add the digit 1 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 1 + } + }, + { + "key": "NumPad1", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Add the digit 1 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 1 + } + }, + { + "key": "NumPad1", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add the digit 1 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 1 + } + }, + { + "key": "2", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Add the digit 2 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 2 + } + }, + { + "key": "2", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add the digit 2 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 2 + } + }, + { + "key": "NumPad2", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Add the digit 2 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 2 + } + }, + { + "key": "NumPad2", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add the digit 2 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 2 + } + }, + { + "key": "3", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Add the digit 3 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 3 + } + }, + { + "key": "3", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add the digit 3 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 3 + } + }, + { + "key": "NumPad3", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Add the digit 3 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 3 + } + }, + { + "key": "NumPad3", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add the digit 3 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 3 + } + }, + { + "key": "4", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Add the digit 4 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 4 + } + }, + { + "key": "4", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add the digit 4 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 4 + } + }, + { + "key": "NumPad4", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Add the digit 4 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 4 + } + }, + { + "key": "NumPad4", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add the digit 4 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 4 + } + }, + { + "key": "5", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Add the digit 5 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 5 + } + }, + { + "key": "5", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add the digit 5 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 5 + } + }, + { + "key": "NumPad5", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Add the digit 5 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 5 + } + }, + { + "key": "NumPad5", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add the digit 5 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 5 + } + }, + { + "key": "6", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Add the digit 6 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 6 + } + }, + { + "key": "6", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add the digit 6 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 6 + } + }, + { + "key": "NumPad6", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Add the digit 6 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 6 + } + }, + { + "key": "NumPad6", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add the digit 6 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 6 + } + }, + { + "key": "7", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Add the digit 7 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 7 + } + }, + { + "key": "7", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add the digit 7 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 7 + } + }, + { + "key": "NumPad7", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Add the digit 7 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 7 + } + }, + { + "key": "NumPad7", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add the digit 7 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 7 + } + }, + { + "key": "8", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Add the digit 8 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 8 + } + }, + { + "key": "8", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add the digit 8 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 8 + } + }, + { + "key": "NumPad8", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Add the digit 8 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 8 + } + }, + { + "key": "NumPad8", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add the digit 8 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 8 + } + }, + { + "key": "9", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Add the digit 9 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 9 + } + }, + { + "key": "9", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add the digit 9 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 9 + } + }, + { + "key": "NumPad9", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Add the digit 9 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 9 + } + }, + { + "key": "NumPad9", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add the digit 9 to the counter", + "command": "dance.updateCount", + "args": { + "addDigits": 9 + } + }, + { + "key": "Shift+;", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "command": "workbench.action.showCommands", + "args": { + "$exclude": [] + } + }, + { + "key": "A", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Insert after", + "command": "dance.modes.insert.after" + }, + { + "key": "A", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Insert after", + "command": "dance.modes.insert.after" + }, + { + "key": "I", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Insert before", + "command": "dance.modes.insert.before" + }, + { + "key": "I", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Insert before", + "command": "dance.modes.insert.before" + }, + { + "key": "Shift+A", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Insert at line end", + "command": "dance.modes.insert.lineEnd" + }, + { + "key": "Shift+A", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Insert at line end", + "command": "dance.modes.insert.lineEnd" + }, + { + "key": "Shift+I", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Insert at line start", + "command": "dance.modes.insert.lineStart" + }, + { + "key": "Shift+I", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Insert at line start", + "command": "dance.modes.insert.lineStart" + }, + { + "key": "Escape", + "when": "editorTextFocus && dance.mode == 'helix/insert'", + "title": "Set mode to Normal", + "command": "dance.modes.set.normal" + }, + { + "key": "Escape", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Set mode to Normal", + "command": "dance.modes.set.normal" + }, + { + "key": "V", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Set mode to Normal", + "command": "dance.modes.set.normal" + }, + { + "key": "V", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Set mode to Select", + "command": "dance.modes.set.select" + }, + { + "key": "/", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Search", + "command": "dance.search" + }, + { + "key": "NumPad_Divide", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Search", + "command": "dance.search" + }, + { + "key": "Shift+/", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Search backward", + "command": "dance.search.backward" + }, + { + "key": "Shift+/", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Search backward (extend)", + "command": "dance.search.backward.extend" + }, + { + "key": "/", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Search (extend)", + "command": "dance.search.extend" + }, + { + "key": "N", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Select next match", + "command": "dance.search.next" + }, + { + "key": "N", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add next match", + "command": "dance.search.next.add" + }, + { + "key": "Shift+N", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Select previous match", + "command": "dance.search.previous" + }, + { + "key": "Shift+N", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Add previous match", + "command": "dance.search.previous.add" + }, + { + "key": "Shift+Alt+8", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Search current selection", + "command": "dance.search.selection" + }, + { + "key": "Alt+NumPad_Multiply", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Search current selection", + "command": "dance.search.selection" + }, + { + "key": "Shift+8", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Search current selection (smart)", + "command": "dance.search.selection.smart" + }, + { + "key": "NumPad_Multiply", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Search current selection (smart)", + "command": "dance.search.selection.smart" + }, + { + "key": "M", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Open match menu", + "command": "dance.openMenu", + "args": { + "menu": "match" + } + }, + { + "key": "M", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Open match menu with extend", + "command": "dance.openMenu", + "args": { + "menu": "match", + "pass": [ + { + "shift": "extend" + } + ] + } + }, + { + "key": "T", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Select to character (excluded)", + "command": "dance.seek" + }, + { + "key": "Shift+T", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Select to character (excluded, backward)", + "command": "dance.seek.backward" + }, + { + "key": "T", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend to character (excluded)", + "command": "dance.seek.extend" + }, + { + "key": "Shift+T", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend to character (excluded, backward)", + "command": "dance.seek.extend.backward" + }, + { + "key": "F", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Select to character (included)", + "command": "dance.seek.included" + }, + { + "key": "Shift+F", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Select to character (included, backward)", + "command": "dance.seek.included.backward" + }, + { + "key": "F", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend to character (included)", + "command": "dance.seek.included.extend" + }, + { + "key": "Shift+F", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend to character (included, backward)", + "command": "dance.seek.included.extend.backward" + }, + { + "key": "W", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Select to next word start", + "command": "dance.seek.word" + }, + { + "key": "B", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Select to previous word start", + "command": "dance.seek.word.backward" + }, + { + "key": "W", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend to next word start", + "command": "dance.seek.word.extend" + }, + { + "key": "B", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend to previous word start", + "command": "dance.seek.word.extend.backward" + }, + { + "key": "Shift+W", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Select to next non-whitespace word start", + "command": "dance.seek.word.ws" + }, + { + "key": "Shift+B", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Select to previous non-whitespace word start", + "command": "dance.seek.word.ws.backward" + }, + { + "key": "Shift+W", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend to next non-whitespace word start", + "command": "dance.seek.word.ws.extend" + }, + { + "key": "Shift+B", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend to previous non-whitespace word start", + "command": "dance.seek.word.ws.extend.backward" + }, + { + "key": "E", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Select to next word end", + "command": "dance.seek.wordEnd" + }, + { + "key": "E", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend to next word end", + "command": "dance.seek.wordEnd.extend" + }, + { + "key": "Shift+E", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Select to next non-whitespace word end", + "command": "dance.seek.wordEnd.ws" + }, + { + "key": "Shift+E", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend to next non-whitespace word end", + "command": "dance.seek.wordEnd.ws.extend" + }, + { + "key": "Shift+5", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Select whole buffer", + "command": "dance.select.buffer" + }, + { + "key": "Shift+5", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Select whole buffer", + "command": "dance.select.buffer" + }, + { + "key": "J", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend down", + "command": "dance.select.down.extend" + }, + { + "key": "Down", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend down", + "command": "dance.select.down.extend" + }, + { + "key": "J", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Jump down", + "command": "dance.select.down.jump" + }, + { + "key": "Down", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Jump down", + "command": "dance.select.down.jump" + }, + { + "key": "H", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend left", + "command": "dance.select.left.extend" + }, + { + "key": "Left", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend left", + "command": "dance.select.left.extend" + }, + { + "key": "H", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Jump left", + "command": "dance.select.left.jump" + }, + { + "key": "Left", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Jump left", + "command": "dance.select.left.jump" + }, + { + "key": "X", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Extend to line below", + "command": "dance.select.line.below.extend" + }, + { + "key": "X", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend to line below", + "command": "dance.select.line.below.extend" + }, + { + "key": "End", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Select to line end", + "command": "dance.select.lineEnd" + }, + { + "key": "End", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend to line end", + "command": "dance.select.lineEnd.extend" + }, + { + "key": "Home", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Select to line start", + "command": "dance.select.lineStart" + }, + { + "key": "Home", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend to line start", + "command": "dance.select.lineStart.extend" + }, + { + "key": "L", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend right", + "command": "dance.select.right.extend" + }, + { + "key": "Right", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend right", + "command": "dance.select.right.extend" + }, + { + "key": "L", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Jump right", + "command": "dance.select.right.jump" + }, + { + "key": "Right", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Jump right", + "command": "dance.select.right.jump" + }, + { + "key": "G", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend to", + "command": "dance.select.to.extend" + }, + { + "key": "G", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Go to", + "command": "dance.select.to.jump" + }, + { + "key": "K", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend up", + "command": "dance.select.up.extend" + }, + { + "key": "Up", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Extend up", + "command": "dance.select.up.extend" + }, + { + "key": "K", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Jump up", + "command": "dance.select.up.jump" + }, + { + "key": "Up", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Jump up", + "command": "dance.select.up.jump" + }, + { + "key": "Ctrl+F", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "command": "dance.select.vertically", + "args": { + "direction": 1, + "by": "page", + "shift": "jump" + } + }, + { + "key": "Ctrl+F", + "when": "editorTextFocus && dance.mode == 'helix/insert'", + "command": "dance.select.vertically", + "args": { + "direction": 1, + "by": "page", + "shift": "jump" + } + }, + { + "key": "Ctrl+D", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "command": "dance.select.vertically", + "args": { + "direction": 1, + "by": "halfPage", + "shift": "jump" + } + }, + { + "key": "Ctrl+D", + "when": "editorTextFocus && dance.mode == 'helix/insert'", + "command": "dance.select.vertically", + "args": { + "direction": 1, + "by": "halfPage", + "shift": "jump" + } + }, + { + "key": "Ctrl+B", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "command": "dance.select.vertically", + "args": { + "direction": -1, + "by": "page", + "shift": "jump" + } + }, + { + "key": "Ctrl+B", + "when": "editorTextFocus && dance.mode == 'helix/insert'", + "command": "dance.select.vertically", + "args": { + "direction": -1, + "by": "page", + "shift": "jump" + } + }, + { + "key": "Ctrl+U", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "command": "dance.select.vertically", + "args": { + "direction": -1, + "by": "halfPage", + "shift": "jump" + } + }, + { + "key": "Ctrl+U", + "when": "editorTextFocus && dance.mode == 'helix/insert'", + "command": "dance.select.vertically", + "args": { + "direction": -1, + "by": "halfPage", + "shift": "jump" + } + }, + { + "key": "Ctrl+F", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "command": "dance.select.vertically", + "args": { + "direction": 1, + "by": "page", + "shift": "extend" + } + }, + { + "key": "Ctrl+D", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "command": "dance.select.vertically", + "args": { + "direction": 1, + "by": "halfPage", + "shift": "extend" + } + }, + { + "key": "Ctrl+B", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "command": "dance.select.vertically", + "args": { + "direction": -1, + "by": "page", + "shift": "extend" + } + }, + { + "key": "Ctrl+U", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "command": "dance.select.vertically", + "args": { + "direction": -1, + "by": "halfPage", + "shift": "extend" + } + }, + { + "key": "Y", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "command": "dance.run", + "args": { + "commands": [ + [ + ".selections.saveText" + ], + [ + ".modes.set.normal" + ] + ] + } + }, + { + "key": "Alt+;", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Change direction of selections", + "command": "dance.selections.changeDirection" + }, + { + "key": "Alt+;", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Change direction of selections", + "command": "dance.selections.changeDirection" + }, + { + "key": "Alt+,", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Clear main selections", + "command": "dance.selections.clear.main" + }, + { + "key": "Alt+,", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Clear main selections", + "command": "dance.selections.clear.main" + }, + { + "key": ",", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Clear secondary selections", + "command": "dance.selections.clear.secondary" + }, + { + "key": ",", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Clear secondary selections", + "command": "dance.selections.clear.secondary" + }, + { + "key": "Shift+C", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Copy selections below", + "command": "dance.selections.copy" + }, + { + "key": "Shift+C", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Copy selections below", + "command": "dance.selections.copy" + }, + { + "key": "Shift+Alt+C", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Copy selections above", + "command": "dance.selections.copy.above" + }, + { + "key": "Shift+Alt+C", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Copy selections above", + "command": "dance.selections.copy.above" + }, + { + "key": "Shift+X", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Expand to lines", + "command": "dance.selections.expandToLines" + }, + { + "key": "Shift+X", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Expand to lines", + "command": "dance.selections.expandToLines" + }, + { + "key": "Shift+4", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Filter selections", + "command": "dance.selections.filter" + }, + { + "key": "Shift+4", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Filter selections", + "command": "dance.selections.filter" + }, + { + "key": "Alt+K", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Keep matching selections", + "command": "dance.selections.filter.regexp" + }, + { + "key": "Alt+K", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Keep matching selections", + "command": "dance.selections.filter.regexp" + }, + { + "key": "Shift+Alt+K", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Clear matching selections", + "command": "dance.selections.filter.regexp.inverse" + }, + { + "key": "Shift+Alt+K", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Clear matching selections", + "command": "dance.selections.filter.regexp.inverse" + }, + { + "key": "Shift+Alt+\\", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Pipe selections", + "command": "dance.selections.pipe" + }, + { + "key": "Shift+Alt+\\", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Pipe selections", + "command": "dance.selections.pipe" + }, + { + "key": "Shift+1", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Pipe and append", + "command": "dance.selections.pipe.append" + }, + { + "key": "Shift+1", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Pipe and append", + "command": "dance.selections.pipe.append" + }, + { + "key": "Shift+Alt+1", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Pipe and prepend", + "command": "dance.selections.pipe.prepend" + }, + { + "key": "Shift+Alt+1", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Pipe and prepend", + "command": "dance.selections.pipe.prepend" + }, + { + "key": "Shift+\\", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Pipe and replace", + "command": "dance.selections.pipe.replace" + }, + { + "key": "Shift+\\", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Pipe and replace", + "command": "dance.selections.pipe.replace" + }, + { + "key": ";", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Reduce selections to their cursor", + "command": "dance.selections.reduce" + }, + { + "key": ";", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Reduce selections to their cursor", + "command": "dance.selections.reduce" + }, + { + "key": "Y", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Copy selections text", + "command": "dance.selections.saveText" + }, + { + "key": "S", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Leap or select", + "command": "dance.selections.select.orLeap" + }, + { + "key": "S", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Leap or select", + "command": "dance.selections.select.orLeap" + }, + { + "key": "Shift+S", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Split selections", + "command": "dance.selections.split" + }, + { + "key": "Shift+S", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Split selections", + "command": "dance.selections.split" + }, + { + "key": "Alt+S", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Leap or select backward", + "command": "dance.selections.splitLines.orLeap.backward" + }, + { + "key": "Alt+S", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Leap or select backward", + "command": "dance.selections.splitLines.orLeap.backward" + }, + { + "key": "Enter", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Toggle selection indices", + "command": "dance.selections.toggleIndices" + }, + { + "key": "Enter", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Toggle selection indices", + "command": "dance.selections.toggleIndices" + }, + { + "key": "Alt+X", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Trim lines", + "command": "dance.selections.trimLines" + }, + { + "key": "Alt+X", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Trim lines", + "command": "dance.selections.trimLines" + }, + { + "key": "Shift+-", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Trim whitespace", + "command": "dance.selections.trimWhitespace" + }, + { + "key": "Shift+-", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Trim whitespace", + "command": "dance.selections.trimWhitespace" + }, + { + "key": "Shift+Alt+0", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Rotate selections clockwise (contents only)", + "command": "dance.selections.rotate.contents" + }, + { + "key": "Shift+Alt+0", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Rotate selections clockwise (contents only)", + "command": "dance.selections.rotate.contents" + }, + { + "key": "Shift+Alt+9", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Rotate selections counter-clockwise (contents only)", + "command": "dance.selections.rotate.contents.reverse" + }, + { + "key": "Shift+Alt+9", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Rotate selections counter-clockwise (contents only)", + "command": "dance.selections.rotate.contents.reverse" + }, + { + "key": "Shift+0", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Rotate selections clockwise (selections only)", + "command": "dance.selections.rotate.selections" + }, + { + "key": "Shift+0", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Rotate selections clockwise (selections only)", + "command": "dance.selections.rotate.selections" + }, + { + "key": "Shift+9", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Rotate selections counter-clockwise (selections only)", + "command": "dance.selections.rotate.selections.reverse" + }, + { + "key": "Shift+9", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Rotate selections counter-clockwise (selections only)", + "command": "dance.selections.rotate.selections.reverse" + }, + { + "key": "Z", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Show view menu", + "command": "dance.openMenu", + "args": { + "menu": "view", + "$exclude": [] + } + }, + { + "key": "Z", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Show view menu", + "command": "dance.openMenu", + "args": { + "menu": "view", + "$exclude": [] + } + }, + { + "key": "Shift+Z", + "when": "editorTextFocus && dance.mode == 'helix/normal'", + "title": "Show view menu (locked)", + "command": "dance.openMenu", + "args": { + "menu": "view", + "locked": true, + "$exclude": [] + } + }, + { + "key": "Shift+Z", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Show view menu (locked)", + "command": "dance.openMenu", + "args": { + "menu": "view", + "locked": true, + "$exclude": [] + } + }, + { + "key": "Q", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "Shift+D", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "Shift+G", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "Shift+H", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "Shift+K", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "Shift+L", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "Shift+M", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "Shift+Q", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "Shift+V", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "Shift+Y", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "Shift+2", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "Shift+3", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "Shift+6", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "'", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "-", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "=", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "Tab", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "Space", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "NumPad_Add", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "NumPad_Subtract", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "Shift+=", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "Shift+Tab", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "Shift+Space", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "Shift+NumPad_Add", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "Shift+NumPad_Subtract", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/normal'" + }, + { + "key": "Q", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Shift+D", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Shift+G", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Shift+H", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Shift+K", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Shift+L", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Shift+M", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Shift+Q", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Shift+V", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Shift+Y", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Shift+2", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Shift+3", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Shift+6", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Shift+7", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Shift+8", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "'", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "-", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "=", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Tab", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Space", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "NumPad_Add", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "NumPad_Subtract", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Shift+'", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Shift+=", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Shift+Tab", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Shift+Space", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Shift+NumPad_Add", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + }, + { + "key": "Shift+NumPad_Subtract", + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'helix/select'" + } + ] + } +} diff --git a/meta.ts b/meta.ts index 5b0dfbbc..46c1b541 100644 --- a/meta.ts +++ b/meta.ts @@ -114,7 +114,9 @@ function parseAdditional(qualificationPrefix: string, text: string, textStartLin const key = keys[j], value = valueConverter[key](values[j].trim()); - (obj as Record)[key] = value; + if (value.length !== 0) { + (obj as Record)[key] = value; + } } if ("identifier" in obj) { @@ -460,6 +462,15 @@ export declare namespace Builder { line: number; } + export interface Keybinding { + readonly title?: string; + readonly key: string; + readonly when: string; + readonly command: string; + readonly category?: string; + readonly args?: any; + } + export interface ParsedModule { readonly path: string; readonly name: string; @@ -476,13 +487,7 @@ export declare namespace Builder { readonly enablement?: string; }[]; - readonly keybindings: { - readonly title?: string; - readonly key: string; - readonly when: string; - readonly command: string; - readonly args?: any; - }[]; + readonly keybindings: Keybinding[]; } } @@ -494,74 +499,76 @@ export function parseKeys(keys: string) { if (keys.length === 0) { return []; } - - return keys.replace(/\n/g, ", ").split(/ *, (?=`)/g).map((keyString) => { + return keys.replace(/\n/g, ", ").split(/ *, (?=`)/g).flatMap((keyString) => { const [,, rawKeybinding, rawMetadata] = /^(`+)(.+?)\1 \((.+?)\)$/.exec(keyString)!, - keybinding = rawKeybinding.trim().replace( - specialCharacterRegExp, (m) => (specialCharacterMapping as Record)[m]), - [, category, tags] = /(\w+): (.+)/.exec(rawMetadata)!; + keybinding = rawKeybinding + .trim().replace( + specialCharacterRegExp, (m) => (specialCharacterMapping as Record)[m], + ); + return rawMetadata.split(";").map((metadata) => { + const [, category, tags] = /(\w+): (.+)/.exec(metadata)!; + + // Reorder to match Ctrl+Shift+Alt+_ + let key = ""; + + if (keybinding.includes("c-")) { + key += "Ctrl+"; + } - // Reorder to match Ctrl+Shift+Alt+_ - let key = ""; + if (keybinding.includes("s-")) { + key += "Shift+"; + } - if (keybinding.includes("c-")) { - key += "Ctrl+"; - } + if (keybinding.includes("a-")) { + key += "Alt+"; + } - if (keybinding.includes("s-")) { - key += "Shift+"; - } + const remainingKeybinding = keybinding.replace(/[csa]-/g, ""), + whenClauses = ["editorTextFocus"]; + for (let tag of tags.split(", ")) { + const negate = tag.startsWith("!"); + if (negate) { + tag = tag.slice(1); + } + switch (tag) { + case "normal": + case "insert": + case "input": + case "select": + whenClauses.push(`dance.mode ${negate ? "!=" : "=="} '${tag}'`); + break; - if (keybinding.includes("a-")) { - key += "Alt+"; - } + case "recording": + whenClauses.push(`${negate ? "!" : ""}dance.isRecording`); + break; - const remainingKeybinding = keybinding.replace(/[csa]-/g, ""), - whenClauses = ["editorTextFocus"]; + case "prompt": + assert(!negate); + whenClauses.splice(whenClauses.indexOf("editorTextFocus"), 1); + whenClauses.push("inputFocus && dance.inPrompt"); + break; - for (let tag of tags.split(", ")) { - const negate = tag.startsWith("!"); - if (negate) { - tag = tag.slice(1); - } - switch (tag) { - case "normal": - case "insert": - case "input": - case "select": - whenClauses.push(`dance.mode ${negate ? "!=" : "=="} '${tag}'`); - break; - - case "recording": - whenClauses.push(`${negate ? "!" : ""}dance.isRecording`); - break; - - case "prompt": - assert(!negate); - whenClauses.splice(whenClauses.indexOf("editorTextFocus"), 1); - whenClauses.push("inputFocus && dance.inPrompt"); - break; - - default: { - const match = /^"(!?\w+)"$/.exec(tag); - - if (match === null) { - throw new Error("unknown keybinding tag " + tag); - } + default: { + const match = /^"(!?\w+)"$/.exec(tag); - whenClauses.push((negate ? "!" : "") + match[1]); - break; - } + if (match === null) { + throw new Error("unknown keybinding tag " + tag); + } + + whenClauses.push((negate ? "!" : "") + match[1]); + break; + } + } } - } - key += remainingKeybinding[0].toUpperCase() + remainingKeybinding.slice(1); + key += remainingKeybinding[0].toUpperCase() + remainingKeybinding.slice(1); - return { - category, - key, - when: whenClauses.join(" && "), - }; + return { + category, + key, + when: whenClauses.join(" && "), + }; + }); }); } @@ -600,11 +607,10 @@ function getCommands(module: Omit) { /** * Returns all defined keybindings in the given module. */ -function getKeybindings(module: Omit) { +function getKeybindings(module: Omit): Builder.Keybinding[] { return [ ...module.functions.flatMap((f) => parseKeys(f.properties["keys"] ?? "").map((key) => ({ - key: key.key, - when: key.when, + ...key, title: f.summary, command: `dance.${f.qualifiedName}`, }))), @@ -616,8 +622,7 @@ function getKeybindings(module: Omit) { if (qualifiedIdentifier !== undefined) { return parsedKeys.map((key) => ({ - key: key.key, - when: key.when, + ...key, title, command: `dance.${qualifiedIdentifier}`, })); @@ -634,8 +639,7 @@ function getKeybindings(module: Omit) { } return parsedKeys.map((key) => ({ - key: key.key, - when: key.when, + ...key, title, command, args: parsedCommands[0][1], @@ -643,8 +647,7 @@ function getKeybindings(module: Omit) { } return parsedKeys.map((key) => ({ - key: key.key, - when: key.when, + ...key, title, command: "dance.run", args: { @@ -655,6 +658,41 @@ function getKeybindings(module: Omit) { ].sort((a, b) => a.command.localeCompare(b.command)); } +/** + * Takes a list of keybindings and generates `dance.ignore` keybindings for + * common keys that are unused. This is used for modes where we don't want the + * user to be able to type + */ +export function generateIgnoredKeybinds( + currentKeybindings: readonly Builder.Keybinding[], + when: string, +): Builder.Keybinding[] { + const alphanum = [..."ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"], + symbols = [...",'-=", "Tab", "Space", "NumPad_Add", "NumPad_Subtract"], + keysToAssign = new Set([ + ...alphanum, + ...alphanum.map((x) => `Shift+${x}`), + ...symbols, + ...symbols.map((x) => `Shift+${x}`), + ]), + ignoredKeybindings: Builder.Keybinding[] = []; + + const unassignedKeys = new Set(keysToAssign); + for (const keybinding of currentKeybindings) { + unassignedKeys.delete(keybinding.key); + } + + for (const unassignedKey of unassignedKeys) { + ignoredKeybindings.push({ + key: unassignedKey, + command: "dance.ignore", + when, + }); + } + + return ignoredKeybindings; +} + /** * Given a multiline string, returns the same string with all lines starting * with an indentation `>= by` reduced by `by` spaces. diff --git a/package.build.ts b/package.build.ts index 1bb2577c..ff16e1ee 100644 --- a/package.build.ts +++ b/package.build.ts @@ -1,4 +1,4 @@ -import type { Builder } from "./meta"; +import { type Builder, generateIgnoredKeybinds } from "./meta"; import { availableClipboardRegisters } from "./src/utils/constants"; // Shared values @@ -22,7 +22,7 @@ const builtinModesAreDeprecatedMessage = "Built-in modes are deprecated. Use `#dance.modes#` instead."; const modeNamePattern = { - pattern: /^[a-zA-Z]\w*$/.source, + pattern: /^[a-zA-Z]\w*(\/\w+)?$/.source, patternErrorMessage: "", }; @@ -129,6 +129,9 @@ export const pkg = (modules: Builder.ParsedModule[]) => ({ "publish": "vsce publish --allow-star-activation", "package:pre": `vsce package --allow-star-activation --pre-release --no-git-tag-version --no-update-package-json ${version.replace(/\d+$/, "$&" + preRelease.toString().padStart(3, "0"))}`, "publish:pre": `vsce publish --allow-star-activation --pre-release --no-git-tag-version --no-update-package-json ${version.replace(/\d+$/, "$&" + preRelease.toString().padStart(3, "0"))}`, + + "package-helix:pre": `cd extensions/helix && yarn run package:pre`, + "publish-helix:pre": `cd extensions/helix && yarn run publish:pre`, }, devDependencies: { @@ -585,13 +588,13 @@ export const pkg = (modules: Builder.ParsedModule[]) => ({ }, }, } as Record}>, + { items: Record }>, }, "dance.systemClipboardRegister": { enum: ["dquote", null, ...availableClipboardRegisters], enumItemLabels: ['"', "None"], - enumDescriptions:["The default yank register", "Disables using the system clipboard"], + enumDescriptions: ["The default yank register", "Disables using the system clipboard"], default: "dquote", description: "Controls which register maps to the system clipboard.", }, @@ -755,46 +758,17 @@ export const pkg = (modules: Builder.ParsedModule[]) => ({ // TODO: unassign default keybindings, and force the user to explicitly set // them up. keybindings: (() => { - const keybindings = modules.flatMap((module) => module.keybindings), - alphanum = [..."ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"], - symbols = [...",'-=", "Tab", "Space", "NumPad_Add", "NumPad_Subtract"], - keysToAssign = new Set([ - ...alphanum, - ...alphanum.map((x) => `Shift+${x}`), - ...symbols, - ...symbols.map((x) => `Shift+${x}`), - ]); - - const keysToAssignForNormal = new Set(keysToAssign); - const keysToAssignForVisual = new Set(keysToAssign); - - for (const keybinding of keybindings) { - if (keybinding.when.includes("dance.mode == 'normal'")) { - keysToAssignForNormal.delete(keybinding.key); - } - if (keybinding.when.includes("dance.mode == 'select'")) { - keysToAssignForVisual.delete(keybinding.key); - } - } - - for (const keyToAssign of keysToAssignForNormal) { - keybindings.push({ - command: "dance.ignore", - key: keyToAssign, - when: "editorTextFocus && dance.mode == 'normal'", - }); - } - - for (const keyToAssign of keysToAssignForVisual) { - keybindings.push({ - command: "dance.ignore", - key: keyToAssign, - when: "editorTextFocus && dance.mode == 'select'", - }); - } - - return keybindings; + const keybindings = modules + .flatMap((module) => module.keybindings) + .filter((keybinding) => ["core", "kakoune", undefined].includes(keybinding.category)) + .map(({ category, ...kb }) => kb); + + return [ + ...keybindings, + ...generateIgnoredKeybinds(keybindings, `editorTextFocus && dance.mode == 'normal'`), + ]; })(), + }, }); diff --git a/package.json b/package.json index e705a67b..31ee9cd5 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,9 @@ "package": "vsce package --allow-star-activation", "publish": "vsce publish --allow-star-activation", "package:pre": "vsce package --allow-star-activation --pre-release --no-git-tag-version --no-update-package-json 0.5.15001", - "publish:pre": "vsce publish --allow-star-activation --pre-release --no-git-tag-version --no-update-package-json 0.5.15001" + "publish:pre": "vsce publish --allow-star-activation --pre-release --no-git-tag-version --no-update-package-json 0.5.15001", + "package-helix:pre": "cd extensions/helix && yarn run package:pre", + "publish-helix:pre": "cd extensions/helix && yarn run publish:pre" }, "devDependencies": { "@types/glob": "^7.2.0", @@ -93,7 +95,7 @@ "scope": "language-overridable", "default": "normal", "description": "Controls which mode is set by default when an editor is opened.", - "pattern": "^[a-zA-Z]\\w*$", + "pattern": "^[a-zA-Z]\\w*(\\/\\w+)?$", "patternErrorMessage": "" }, "dance.modes": { @@ -102,7 +104,7 @@ "additionalProperties": { "type": "object", "propertyNames": { - "pattern": "^[a-zA-Z]\\w*$", + "pattern": "^[a-zA-Z]\\w*(\\/\\w+)?$", "patternErrorMessage": "" }, "properties": { @@ -112,7 +114,7 @@ "null" ], "description": "Controls how default configuration options are obtained for this mode. Specify a string to inherit from the mode with the given name, and null to inherit from the VS Code configuration.", - "pattern": "^[a-zA-Z]\\w*$", + "pattern": "^[a-zA-Z]\\w*(\\/\\w+)?$", "patternErrorMessage": "" }, "cursorStyle": { @@ -2931,24 +2933,12 @@ "title": "Copy and delete", "command": "dance.edit.yank-delete" }, - { - "key": "D", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Copy and delete", - "command": "dance.edit.yank-delete" - }, { "key": "C", "when": "editorTextFocus && dance.mode == 'normal'", "title": "Copy, delete and switch to Insert", "command": "dance.edit.yank-delete-insert" }, - { - "key": "C", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Copy, delete and switch to Insert", - "command": "dance.edit.yank-delete-insert" - }, { "key": "Shift+R", "when": "editorTextFocus && dance.mode == 'normal'", @@ -2985,12 +2975,6 @@ "title": "Redo", "command": "dance.history.redo" }, - { - "key": "Shift+U", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Redo", - "command": "dance.history.redo" - }, { "key": "Shift+Alt+U", "when": "editorTextFocus && dance.mode == 'normal'", @@ -3021,12 +3005,6 @@ "title": "Undo", "command": "dance.history.undo" }, - { - "key": "U", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Undo", - "command": "dance.history.undo" - }, { "key": "Alt+U", "when": "editorTextFocus && dance.mode == 'normal'", @@ -3285,12 +3263,6 @@ "title": "Set mode to Normal", "command": "dance.modes.set.normal" }, - { - "key": "Escape", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Set mode to Normal", - "command": "dance.modes.set.normal" - }, { "key": "Ctrl+V", "when": "editorTextFocus && dance.mode == 'normal'", @@ -3495,24 +3467,12 @@ "title": "Extend to character (excluded)", "command": "dance.seek.extend" }, - { - "key": "T", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Extend to character (excluded)", - "command": "dance.seek.extend" - }, { "key": "Shift+Alt+T", "when": "editorTextFocus && dance.mode == 'normal'", "title": "Extend to character (excluded, backward)", "command": "dance.seek.extend.backward" }, - { - "key": "Shift+T", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Extend to character (excluded, backward)", - "command": "dance.seek.extend.backward" - }, { "key": "F", "when": "editorTextFocus && dance.mode == 'normal'", @@ -3531,24 +3491,12 @@ "title": "Extend to character (included)", "command": "dance.seek.included.extend" }, - { - "key": "F", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Extend to character (included)", - "command": "dance.seek.included.extend" - }, { "key": "Shift+Alt+F", "when": "editorTextFocus && dance.mode == 'normal'", "title": "Extend to character (included, backward)", "command": "dance.seek.included.extend.backward" }, - { - "key": "Shift+F", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Extend to character (included, backward)", - "command": "dance.seek.included.extend.backward" - }, { "key": "W", "when": "editorTextFocus && dance.mode == 'normal'", @@ -3567,24 +3515,12 @@ "title": "Extend to next word start", "command": "dance.seek.word.extend" }, - { - "key": "W", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Extend to next word start", - "command": "dance.seek.word.extend" - }, { "key": "Shift+B", "when": "editorTextFocus && dance.mode == 'normal'", "title": "Extend to previous word start", "command": "dance.seek.word.extend.backward" }, - { - "key": "B", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Extend to previous word start", - "command": "dance.seek.word.extend.backward" - }, { "key": "Alt+W", "when": "editorTextFocus && dance.mode == 'normal'", @@ -3603,24 +3539,12 @@ "title": "Extend to next non-whitespace word start", "command": "dance.seek.word.ws.extend" }, - { - "key": "Shift+W", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Extend to next non-whitespace word start", - "command": "dance.seek.word.ws.extend" - }, { "key": "Shift+Alt+B", "when": "editorTextFocus && dance.mode == 'normal'", "title": "Extend to previous non-whitespace word start", "command": "dance.seek.word.ws.extend.backward" }, - { - "key": "Shift+B", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Extend to previous non-whitespace word start", - "command": "dance.seek.word.ws.extend.backward" - }, { "key": "E", "when": "editorTextFocus && dance.mode == 'normal'", @@ -3633,12 +3557,6 @@ "title": "Extend to next word end", "command": "dance.seek.wordEnd.extend" }, - { - "key": "E", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Extend to next word end", - "command": "dance.seek.wordEnd.extend" - }, { "key": "Alt+E", "when": "editorTextFocus && dance.mode == 'normal'", @@ -3651,12 +3569,6 @@ "title": "Extend to next non-whitespace word end", "command": "dance.seek.wordEnd.ws.extend" }, - { - "key": "Shift+E", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Extend to next non-whitespace word end", - "command": "dance.seek.wordEnd.ws.extend" - }, { "key": "Shift+5", "when": "editorTextFocus && dance.mode == 'normal'", @@ -3675,18 +3587,6 @@ "title": "Extend down", "command": "dance.select.down.extend" }, - { - "key": "J", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Extend down", - "command": "dance.select.down.extend" - }, - { - "key": "Down", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Extend down", - "command": "dance.select.down.extend" - }, { "key": "J", "when": "editorTextFocus && dance.mode == 'normal'", @@ -3711,18 +3611,6 @@ "title": "Extend left", "command": "dance.select.left.extend" }, - { - "key": "H", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Extend left", - "command": "dance.select.left.extend" - }, - { - "key": "Left", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Extend left", - "command": "dance.select.left.extend" - }, { "key": "H", "when": "editorTextFocus && dance.mode == 'normal'", @@ -3795,18 +3683,6 @@ "title": "Extend right", "command": "dance.select.right.extend" }, - { - "key": "L", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Extend right", - "command": "dance.select.right.extend" - }, - { - "key": "Right", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Extend right", - "command": "dance.select.right.extend" - }, { "key": "L", "when": "editorTextFocus && dance.mode == 'normal'", @@ -3825,12 +3701,6 @@ "title": "Extend to", "command": "dance.select.to.extend" }, - { - "key": "G", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Extend to", - "command": "dance.select.to.extend" - }, { "key": "G", "when": "editorTextFocus && dance.mode == 'normal'", @@ -3849,18 +3719,6 @@ "title": "Extend up", "command": "dance.select.up.extend" }, - { - "key": "K", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Extend up", - "command": "dance.select.up.extend" - }, - { - "key": "Up", - "when": "editorTextFocus && dance.mode == 'select'", - "title": "Extend up", - "command": "dance.select.up.extend" - }, { "key": "K", "when": "editorTextFocus && dance.mode == 'normal'", @@ -4170,439 +4028,94 @@ } }, { - "command": "dance.ignore", "key": "Shift+D", - "when": "editorTextFocus && dance.mode == 'normal'" - }, - { "command": "dance.ignore", - "key": "Shift+X", "when": "editorTextFocus && dance.mode == 'normal'" }, { + "key": "Shift+X", "command": "dance.ignore", - "key": "Shift+Y", "when": "editorTextFocus && dance.mode == 'normal'" }, { + "key": "Shift+Y", "command": "dance.ignore", - "key": "Shift+2", "when": "editorTextFocus && dance.mode == 'normal'" }, { + "key": "Shift+2", "command": "dance.ignore", - "key": "Shift+3", "when": "editorTextFocus && dance.mode == 'normal'" }, { + "key": "Shift+3", "command": "dance.ignore", - "key": "Shift+6", "when": "editorTextFocus && dance.mode == 'normal'" }, { + "key": "Shift+6", "command": "dance.ignore", - "key": "'", "when": "editorTextFocus && dance.mode == 'normal'" }, { + "key": "'", "command": "dance.ignore", - "key": "-", "when": "editorTextFocus && dance.mode == 'normal'" }, { + "key": "-", "command": "dance.ignore", - "key": "=", "when": "editorTextFocus && dance.mode == 'normal'" }, { + "key": "=", "command": "dance.ignore", - "key": "Tab", "when": "editorTextFocus && dance.mode == 'normal'" }, { + "key": "Tab", "command": "dance.ignore", - "key": "Space", "when": "editorTextFocus && dance.mode == 'normal'" }, { + "key": "Space", "command": "dance.ignore", - "key": "NumPad_Add", "when": "editorTextFocus && dance.mode == 'normal'" }, { + "key": "NumPad_Add", "command": "dance.ignore", - "key": "NumPad_Subtract", "when": "editorTextFocus && dance.mode == 'normal'" }, { + "key": "NumPad_Subtract", "command": "dance.ignore", - "key": "Shift+=", "when": "editorTextFocus && dance.mode == 'normal'" }, { + "key": "Shift+=", "command": "dance.ignore", - "key": "Shift+Tab", "when": "editorTextFocus && dance.mode == 'normal'" }, { + "key": "Shift+Tab", "command": "dance.ignore", - "key": "Shift+Space", "when": "editorTextFocus && dance.mode == 'normal'" }, { + "key": "Shift+Space", "command": "dance.ignore", - "key": "Shift+NumPad_Add", "when": "editorTextFocus && dance.mode == 'normal'" }, { + "key": "Shift+NumPad_Add", "command": "dance.ignore", - "key": "Shift+NumPad_Subtract", "when": "editorTextFocus && dance.mode == 'normal'" }, { - "command": "dance.ignore", - "key": "A", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "I", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "M", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "N", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "O", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "P", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Q", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "R", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "S", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "V", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "X", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Y", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Z", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "0", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "1", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "2", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "3", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "4", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "5", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "6", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "7", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "8", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "9", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+A", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+C", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+D", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+G", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+H", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+I", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+J", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+K", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+L", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+M", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+N", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+O", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+P", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+Q", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+R", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+S", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+V", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+X", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+Y", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+Z", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+0", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+1", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+2", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+3", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+4", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+5", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+6", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+7", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+8", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+9", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": ",", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "'", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "-", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "=", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Tab", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Space", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "NumPad_Add", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "NumPad_Subtract", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+,", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+'", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+-", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+=", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+Tab", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+Space", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", - "key": "Shift+NumPad_Add", - "when": "editorTextFocus && dance.mode == 'select'" - }, - { - "command": "dance.ignore", "key": "Shift+NumPad_Subtract", - "when": "editorTextFocus && dance.mode == 'select'" + "command": "dance.ignore", + "when": "editorTextFocus && dance.mode == 'normal'" } ] } diff --git a/src/api/data/commands.yaml b/src/api/data/commands.yaml index 17f6d0f1..e4fbbb3f 100644 --- a/src/api/data/commands.yaml +++ b/src/api/data/commands.yaml @@ -48,7 +48,7 @@ edit.align: keys: qwerty: |- - `&` (kakoune: normal) + `&` (core: normal) doc: en: |+ @@ -64,23 +64,32 @@ edit.case.swap: keys: qwerty: |- `` a-` `` (kakoune: normal) + `` s-` `` (helix: normal) doc: - en: |+ + en: | Swap case. + | Keybindings | Commands | + | ----------- | -------- | + | `` s-` `` (helix: select) | `[".edit.case.swap"], [".modes.set.normal"]` | + edit.case.toLower: title: en: Transform to lower case keys: qwerty: |- - `` ` `` (kakoune: normal) + `` ` `` (core: normal) doc: - en: |+ + en: | Transform to lower case. + | Keybindings | Commands | + | ----------- | -------- | + | `` ` `` (helix: select) | `[".edit.case.toLower"], [".modes.set.normal"]` | + edit.case.toUpper: title: en: Transform to upper case @@ -88,11 +97,16 @@ edit.case.toUpper: keys: qwerty: |- `` s-` `` (kakoune: normal) + `` a-` `` (helix: normal) doc: - en: |+ + en: | Transform to upper case. + | Keybindings | Commands | + | ----------- | -------- | + | `` a-` `` (helix: select) | `[".edit.case.toUpper"], [".modes.set.normal"]` | + edit.copyIndentation: title: en: Copy indentation @@ -126,12 +140,16 @@ edit.deindent.withIncomplete: keys: qwerty: |- - `<` (kakoune: normal) + `<` (core: normal) doc: - en: |+ + en: | Deindent selected lines (including incomplete indent). + | Keybindings | Commands | + | ----------- | -------- | + | `<` (helix: select) | `[".edit.deindent"], [".modes.set.normal"]` | + edit.delete: title: en: Delete @@ -141,7 +159,7 @@ edit.delete: keys: qwerty: |- - `a-d` (kakoune: normal) + `a-d` (core: normal) edit.delete-insert: title: @@ -160,12 +178,16 @@ edit.indent: keys: qwerty: |- - `>` (kakoune: normal) + `>` (core: normal) doc: - en: |+ + en: | Indent selected lines. + | Keybindings | Commands | + | ----------- | -------- | + | `>` (helix: select) | `[".edit.indent"], [".modes.set.normal"]` | + edit.indent.withEmpty: title: en: Indent selected lines (including empty lines) @@ -185,6 +207,7 @@ edit.insert: keys: qwerty: |- `s-a-r` (kakoune: normal) + `s-r` (helix: normal) doc: en: | @@ -208,17 +231,22 @@ edit.insert: | Pick register and replace | `selectRegister-insert` | `c-r` (kakoune: normal), `c-r` (kakoune: insert) | `[".selectRegister", { +register }], [".edit.insert", { ... }]` | | Paste before | `paste.before` | | `[".edit.insert", { handleNewLine: true, where: "start", ... }]` | | Paste after | `paste.after` | | `[".edit.insert", { handleNewLine: true, where: "end" , ... }]` | - | Paste before and select | `paste.before.select` | `s-p` (kakoune: normal) | `[".edit.insert", { handleNewLine: true, where: "start", shift: "select", ... }]` | - | Paste after and select | `paste.after.select` | `p` (kakoune: normal) | `[".edit.insert", { handleNewLine: true, where: "end" , shift: "select", ... }]` | + | Paste 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` (kakoune: normal) | `[".edit.insert", { register: "_", ... }]` | + | 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` (kakoune: normal), `d` (helix: select) | `[".selections.saveText", { +register }], [".edit.insert", { register: "_", ... }]` | - | Copy, delete and switch to Insert | `yank-delete-insert` | `c` (kakoune: normal), `c` (helix: select) | `[".selections.saveText", { +register }], [".modes.set", { mode: "insert", +mode }], [".edit.insert", { register: "_", ... }]` | + | Copy and 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"]` | edit.join: title: @@ -227,6 +255,7 @@ edit.join: keys: qwerty: |- `a-j` (kakoune: normal) + `s-j` (helix: normal; helix: select) doc: en: |+ @@ -238,7 +267,7 @@ edit.join.select: keys: qwerty: |- - `s-a-j` (kakoune: normal) + `s-a-j` (core: normal; helix: select) doc: en: |+ @@ -262,9 +291,9 @@ edit.newLine.above: #### Additional keybindings - | Title | Identifier | Keybinding | Commands | - | ------------------------------------------ | ---------------------- | ----------------------- | --------------------------------------------------------------------------------- | - | Insert new line above and switch to insert | `newLine.above.insert` | `s-o` (kakoune: normal) | `[".edit.newLine.above", { shift: "select" }], [".modes.insert.before", { ... }]` | + | 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", { ... }]` | edit.newLine.above.insert: title: @@ -275,7 +304,7 @@ edit.newLine.above.insert: keys: qwerty: |- - `s-o` (kakoune: normal) + `s-o` (core: normal; helix: select) edit.newLine.below: title: @@ -295,9 +324,9 @@ edit.newLine.below: #### Additional keybindings - | Title | Identifier | Keybinding | Commands | - | ------------------------------------------ | ---------------------- | --------------------- | --------------------------------------------------------------------------------- | - | Insert new line below and switch to insert | `newLine.below.insert` | `o` (kakoune: normal) | `[".edit.newLine.below", { shift: "select" }], [".modes.insert.before", { ... }]` | + | 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", { ... }]` | edit.newLine.below.insert: title: @@ -308,7 +337,7 @@ edit.newLine.below.insert: keys: qwerty: |- - `o` (kakoune: normal) + `o` (core: normal; helix: select) edit.paste.after: title: @@ -317,9 +346,6 @@ edit.paste.after: commands: |- [".edit.insert", { handleNewLine: true, where: "end" , $exclude: [] }] - keys: - qwerty: "" - edit.paste.after.select: title: en: Paste after and select @@ -329,7 +355,7 @@ edit.paste.after.select: keys: qwerty: |- - `p` (kakoune: normal) + `p` (core: normal) edit.paste.before: title: @@ -338,9 +364,6 @@ edit.paste.before: commands: |- [".edit.insert", { handleNewLine: true, where: "start", $exclude: [] }] - keys: - qwerty: "" - edit.paste.before.select: title: en: Paste before and select @@ -350,7 +373,7 @@ edit.paste.before.select: keys: qwerty: |- - `s-p` (kakoune: normal) + `s-p` (core: normal) edit.pasteAll.after: title: @@ -359,9 +382,6 @@ edit.pasteAll.after: commands: |- [".edit.insert", { handleNewLine: true, where: "end" , all: true, $exclude: [] }] - keys: - qwerty: "" - edit.pasteAll.after.select: title: en: Paste all after and select @@ -380,9 +400,6 @@ edit.pasteAll.before: commands: |- [".edit.insert", { handleNewLine: true, where: "start", all: true, $exclude: [] }] - keys: - qwerty: "" - edit.pasteAll.before.select: title: en: Paste all before and select @@ -400,12 +417,16 @@ edit.replaceCharacters: keys: qwerty: |- - `r` (kakoune: normal) + `r` (core: normal) doc: - en: |+ + en: | Replace characters. + | Keybindings | Commands | + | ----------- | -------- | + | `r` (helix: select) | `[".edit.replaceCharacters"], [".modes.set.normal"]` | + edit.selectRegister-insert: title: en: Pick register and replace @@ -420,15 +441,14 @@ edit.selectRegister-insert: edit.yank-delete: title: - en: Copy and delete + en: "Copy and delete" commands: |- [".selections.saveText", { $include: ["register"] }], [".edit.insert", { register: "_", $exclude: ["register"] }] keys: qwerty: |- - `d` (kakoune: normal) - `d` (helix: select) + `d` (core: normal) edit.yank-delete-insert: title: @@ -439,8 +459,7 @@ edit.yank-delete-insert: keys: qwerty: |- - `c` (kakoune: normal) - `c` (helix: select) + `c` (core: normal; helix: select) edit.yank-replace: title: @@ -496,8 +515,7 @@ history.redo: keys: qwerty: |- - `s-u` (kakoune: normal) - `s-u` (helix: select) + `s-u` (core: normal; helix: select) doc: en: |+ @@ -524,10 +542,10 @@ history.repeat: 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 }]` | + | 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 }]` | history.repeat.edit: title: @@ -535,8 +553,8 @@ history.repeat.edit: keys: qwerty: |- - `.` (kakoune: normal) - `NumPad_Decimal` (kakoune: normal) + `.` (core: normal) + `NumPad_Decimal` (core: normal) doc: en: |+ @@ -551,7 +569,7 @@ history.repeat.seek: keys: qwerty: |- - `a-.` (kakoune: normal) + `a-.` (core: normal; helix: select) history.repeat.selection: title: @@ -560,17 +578,13 @@ history.repeat.selection: commands: |- [".history.repeat", { filter: "dance\\.(seek|select|selections)", $include: ["count"] }] - keys: - qwerty: "" - history.undo: title: en: Undo keys: qwerty: |- - `u` (kakoune: normal) - `u` (helix: select) + `u` (core: normal; helix: select) doc: en: |+ @@ -624,7 +638,7 @@ modes.insert.after: keys: qwerty: |- - `a` (kakoune: normal) + `a` (core: normal; helix: select) modes.insert.before: title: @@ -635,7 +649,7 @@ modes.insert.before: keys: qwerty: |- - `i` (kakoune: normal) + `i` (core: normal; helix: select) modes.insert.lineEnd: title: @@ -646,7 +660,7 @@ modes.insert.lineEnd: keys: qwerty: |- - `s-a` (kakoune: normal) + `s-a` (core: normal; helix: select) modes.insert.lineStart: title: @@ -657,7 +671,7 @@ modes.insert.lineStart: keys: qwerty: |- - `s-i` (kakoune: normal) + `s-i` (core: normal; helix: select) modes.set: title: @@ -669,20 +683,20 @@ modes.set: #### Variants - | Title | Identifier | Keybinding | Command | - | ------------------ | ------------ | ---------------------------------------------------- | ----------------------------------------------------------- | - | Set mode to Normal | `set.normal` | `escape` (kakoune: insert), `escape` (helix: select) | `[".modes.set", { mode: "normal" }], ["hideSuggestWidget"]` | - | Set mode to Insert | `set.insert` | | `[".modes.set", { mode: "insert" }]` | - | Set mode to Select | `set.select` | | `[".modes.set", { mode: "select" }]` | + | 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` (kakoune: normal) | `[".selections.faceBackward", { record: false }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "start", record: false, empty: true, ... }]` | - | Insert after | `insert.after` | `a` (kakoune: normal) | `[".selections.faceForward" , { record: false }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "end" , record: false, empty: true, ... }]` | - | Insert at line start | `insert.lineStart` | `s-i` (kakoune: normal) | `[".select.lineStart", { shift: "jump", skipBlank: true }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "start", record: false, empty: true, ... }]` | - | Insert at line end | `insert.lineEnd` | `s-a` (kakoune: normal) | `[".select.lineEnd" , { shift: "jump" }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "end" , record: false, empty: true, ... }]` | + | 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, ... }]` | modes.set.insert: title: @@ -691,20 +705,17 @@ modes.set.insert: commands: |- [".modes.set", { mode: "insert" }] - keys: - qwerty: "" - modes.set.normal: title: en: Set mode to Normal - commands: |- - [".modes.set", { mode: "normal" }], ["hideSuggestWidget"] - keys: qwerty: |- - `escape` (kakoune: insert) - `escape` (helix: select) + `escape` (core: insert; helix: select) + `v` (helix: select) + + commands: |- + [".modes.set", { mode: "normal" }], ["hideSuggestWidget"] modes.set.select: title: @@ -714,7 +725,8 @@ modes.set.select: [".modes.set", { mode: "select" }] keys: - qwerty: "" + qwerty: |- + `v` (helix: normal) modes.set.temporarily: title: @@ -879,19 +891,19 @@ search: keys: qwerty: |- - `/` (kakoune: normal) - `NumPad_Divide` (kakoune: normal) + `/` (core: normal) + `NumPad_Divide` (core: normal) doc: en: | Search. - | Title | Identifier | Keybinding | Command | - | ------------------------ | ----------------- | ----------------------- | ------------------------------------------------------ | - | Search (extend) | `extend` | `?` (kakoune: normal) | `[".search", { shift: "extend", ... }]` | - | Search backward | `backward` | `a-/` (kakoune: normal) | `[".search", { direction: -1 , ... }]` | - | Search backward (extend) | `backward.extend` | `a-?` (kakoune: normal) | `[".search", { direction: -1, shift: "extend", ... }]` | + | 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", ... }]` | search.backward: title: @@ -903,6 +915,7 @@ search.backward: keys: qwerty: |- `a-/` (kakoune: normal) + `?` (helix: normal) search.backward.extend: title: @@ -914,6 +927,7 @@ search.backward.extend: keys: qwerty: |- `a-?` (kakoune: normal) + `?` (helix: select) search.extend: title: @@ -925,6 +939,7 @@ search.extend: keys: qwerty: |- `?` (kakoune: normal) + `/` (helix: select) search.next: title: @@ -932,18 +947,18 @@ search.next: keys: qwerty: |- - `n` (kakoune: normal) + `n` (core: normal) doc: en: | Select next match. - | Title | Identifier | Keybinding | Command | - | --------------------- | -------------- | ------------------------- | ----------------------------------------------------- | - | Add next match | `next.add` | `s-n` (kakoune: normal) | `[".search.next", { add: true, ... }]` | - | Select previous match | `previous` | `a-n` (kakoune: normal) | `[".search.next", { direction: -1 , ... }]` | - | Add previous match | `previous.add` | `s-a-n` (kakoune: normal) | `[".search.next", { direction: -1, add: true, ... }]` | + | 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, ... }]` | search.next.add: title: @@ -955,6 +970,7 @@ search.next.add: keys: qwerty: |- `s-n` (kakoune: normal) + `n` (helix: select) search.previous: title: @@ -966,6 +982,7 @@ search.previous: keys: qwerty: |- `a-n` (kakoune: normal) + `s-n` (helix: normal) search.previous.add: title: @@ -977,6 +994,7 @@ search.previous.add: keys: qwerty: |- `s-a-n` (kakoune: normal) + `s-n` (helix: select) search.selection: title: @@ -984,17 +1002,17 @@ search.selection: keys: qwerty: |- - `a-*` (kakoune: normal) - `a-NumPad_Multiply` (kakoune: normal) + `a-*` (core: normal) + `a-NumPad_Multiply` (core: normal) doc: en: | Search current selection. - | Title | Identifier | Keybinding | Command | - | -------------------------------- | ----------------- | ---------------------------------------------------------- | --------------------------------------------------- | - | Search current selection (smart) | `selection.smart` | `*` (kakoune: normal), `NumPad_Multiply` (kakoune: normal) | `[".search.selection", { smart: true, +register }]` | + | Title | Identifier | Keybinding | Command | + | -------------------------------- | ----------------- | ---------------------------------------------------- | --------------------------------------------------- | + | Search current selection (smart) | `selection.smart` | `*` (core: normal), `NumPad_Multiply` (core: normal) | `[".search.selection", { smart: true, +register }]` | search.selection.smart: title: @@ -1005,8 +1023,8 @@ search.selection.smart: keys: qwerty: |- - `*` (kakoune: normal) - `NumPad_Multiply` (kakoune: normal) + `*` (core: normal) + `NumPad_Multiply` (core: normal) seek: title: @@ -1014,7 +1032,7 @@ seek: keys: qwerty: |- - `t` (kakoune: normal) + `t` (core: normal) doc: en: | @@ -1026,11 +1044,11 @@ seek: | Title | Identifier | Keybinding | Command | | ---------------------------------------- | -------------------------- | ------------------------------------------------ | ------------------------------------------------------------------- | | Extend to character (excluded) | `extend` | `s-t` (kakoune: normal), `t` (helix: select) | `[".seek", { shift: "extend" , ... }]` | - | Select to character (excluded, backward) | `backward` | `a-t` (kakoune: normal) | `[".seek", { direction: -1, ... }]` | + | 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` (kakoune: normal) | `[".seek", { include: true , ... }]` | + | 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) | `[".seek", { include: true, direction: -1, ... }]` | + | 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, ... }]` | seek.askObject: @@ -1155,6 +1173,7 @@ seek.backward: keys: qwerty: |- `a-t` (kakoune: normal) + `s-t` (helix: normal) seek.enclosing: title: @@ -1243,7 +1262,7 @@ seek.included: keys: qwerty: |- - `f` (kakoune: normal) + `f` (core: normal) seek.included.backward: title: @@ -1255,6 +1274,7 @@ seek.included.backward: keys: qwerty: |- `a-f` (kakoune: normal) + `s-f` (helix: normal) seek.included.extend: title: @@ -1391,7 +1411,7 @@ seek.word: keys: qwerty: |- - `w` (kakoune: normal) + `w` (core: normal) doc: en: | @@ -1405,15 +1425,15 @@ seek.word: | Title | Identifier | Keybinding | Command | | -------------------------------------------- | ------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------- | | Extend to next word start | `word.extend` | `s-w` (kakoune: normal), `w` (helix: select) | `[".seek.word", { shift: "extend" , ... }]` | - | Select to previous word start | `word.backward` | `b` (kakoune: normal) | `[".seek.word", { direction: -1, ... }]` | + | 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) | `[".seek.word", { ws: true , ... }]` | + | 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) | `[".seek.word", { ws: true, direction: -1, ... }]` | + | 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` (kakoune: normal) | `[".seek.word", { stopAtEnd: true , ... }]` | + | 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) | `[".seek.word", { stopAtEnd: true , ws: true , ... }]` | + | 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" , ... }]` | seek.word.backward: @@ -1425,7 +1445,7 @@ seek.word.backward: keys: qwerty: |- - `b` (kakoune: normal) + `b` (core: normal) seek.word.extend: title: @@ -1461,6 +1481,7 @@ seek.word.ws: keys: qwerty: |- `a-w` (kakoune: normal) + `s-w` (helix: normal) seek.word.ws.backward: title: @@ -1472,6 +1493,7 @@ seek.word.ws.backward: keys: qwerty: |- `a-b` (kakoune: normal) + `s-b` (helix: normal) seek.word.ws.extend: title: @@ -1506,7 +1528,7 @@ seek.wordEnd: keys: qwerty: |- - `e` (kakoune: normal) + `e` (core: normal) seek.wordEnd.extend: title: @@ -1530,6 +1552,7 @@ seek.wordEnd.ws: keys: qwerty: |- `a-e` (kakoune: normal) + `s-e` (helix: normal) seek.wordEnd.ws.extend: title: @@ -1549,7 +1572,7 @@ select.buffer: keys: qwerty: |- - `%` (kakoune: normal) + `%` (core: normal; helix: select) doc: en: |+ @@ -1562,9 +1585,6 @@ select.documentEnd.extend: commands: |- [".select.lineEnd", { count: 2147483647, shift: "extend", $exclude: [] }] - keys: - qwerty: "" - select.documentEnd.jump: title: en: Jump to last character @@ -1572,9 +1592,6 @@ select.documentEnd.jump: commands: |- [".select.lineEnd", { count: 2147483647, shift: "jump" , $exclude: [] }] - keys: - qwerty: "" - select.down.extend: title: en: Extend down @@ -1598,7 +1615,7 @@ select.down.jump: keys: qwerty: |- - `j` (kakoune: normal) , `down` (kakoune: normal) + `j` (core: normal) , `down` (core: normal) select.firstLine.extend: title: @@ -1607,9 +1624,6 @@ select.firstLine.extend: commands: |- [".select.lineStart", { count: 0, shift: "extend", $exclude: [] }] - keys: - qwerty: "" - select.firstLine.jump: title: en: Jump to first line @@ -1617,9 +1631,6 @@ select.firstLine.jump: commands: |- [".select.lineStart", { count: 0, shift: "jump" , $exclude: [] }] - keys: - qwerty: "" - select.firstVisibleLine: title: en: Select to first visible line @@ -1662,9 +1673,9 @@ select.horizontally: | Title | Identifier | Keybinding | Command | | ------------ | -------------- | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | - | Jump right | `right.jump` | `l` (kakoune: normal) , `right` (kakoune: normal) | `[".select.horizontally", { direction: 1, shift: "jump" , ... }]` | + | 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` (kakoune: normal) , `left` (kakoune: normal) | `[".select.horizontally", { direction: -1, shift: "jump" , ... }]` | + | 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", ... }]` | select.lastLine: @@ -1748,7 +1759,7 @@ select.left.jump: keys: qwerty: |- - `h` (kakoune: normal) , `left` (kakoune: normal) + `h` (core: normal) , `left` (core: normal) select.line.above: title: @@ -1778,8 +1789,12 @@ select.line.below.extend: title: en: Extend to line below + keys: + qwerty: |- + `x` (helix: normal; helix: select) + doc: - en: | + en: |+ Extend to line below. select.lineEnd: @@ -1789,7 +1804,7 @@ select.lineEnd: keys: qwerty: |- `a-l` (kakoune: normal) - `end` (kakoune: normal) + `end` (core: normal) doc: en: | @@ -1799,11 +1814,11 @@ select.lineEnd: #### Variants - | 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", ... }]` | + | 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", ... }]` | select.lineEnd.extend: title: @@ -1816,6 +1831,7 @@ select.lineEnd.extend: qwerty: |- `s-a-l` (kakoune: normal) `s-end` (kakoune: normal) + `end` (helix: select) select.lineStart: title: @@ -1824,7 +1840,7 @@ select.lineStart: keys: qwerty: |- `a-h` (kakoune: normal) - `home` (kakoune: normal) + `home` (core: normal) doc: en: | @@ -1833,14 +1849,14 @@ select.lineStart: #### Variants - | Title | Identifier | Keybinding | Command | - | -------------------- | ------------------ | ----------------------------------------------------- | ------------------------------------------------------------------ | - | Jump to line start | `lineStart.jump` | | `[".select.lineStart", { shift: "jump" , ... }]` | - | Extend to line start | `lineStart.extend` | `s-a-h` (kakoune: normal), `s-home` (kakoune: normal) | `[".select.lineStart", { shift: "extend", ... }]` | - | Jump to line start (skip blank) | `lineStart.skipBlank.jump` | | `[".select.lineStart", { skipBlank: true, shift: "jump" , ... }]` | - | Extend to line start (skip blank) | `lineStart.skipBlank.extend` | | `[".select.lineStart", { skipBlank: true, shift: "extend", ... }]` | - | Jump to first line | `firstLine.jump` | | `[".select.lineStart", { count: 0, shift: "jump" , ... }]` | - | Extend to first line | `firstLine.extend` | | `[".select.lineStart", { count: 0, shift: "extend", ... }]` | + | 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", ... }]` | select.lineStart.extend: title: @@ -1853,6 +1869,7 @@ select.lineStart.extend: qwerty: |- `s-a-h` (kakoune: normal) `s-home` (kakoune: normal) + `home` (helix: select) select.lineStart.jump: title: @@ -1861,9 +1878,6 @@ select.lineStart.jump: commands: |- [".select.lineStart", { shift: "jump" , $exclude: [] }] - keys: - qwerty: "" - select.lineStart.skipBlank.extend: title: en: Extend to line start (skip blank) @@ -1871,9 +1885,6 @@ select.lineStart.skipBlank.extend: commands: |- [".select.lineStart", { skipBlank: true, shift: "extend", $exclude: [] }] - keys: - qwerty: "" - select.lineStart.skipBlank.jump: title: en: Jump to line start (skip blank) @@ -1881,9 +1892,6 @@ select.lineStart.skipBlank.jump: commands: |- [".select.lineStart", { skipBlank: true, shift: "jump" , $exclude: [] }] - keys: - qwerty: "" - select.middleVisibleLine: title: en: Select to middle visible line @@ -1936,7 +1944,7 @@ select.right.jump: keys: qwerty: |- - `l` (kakoune: normal) , `right` (kakoune: normal) + `l` (core: normal) , `right` (core: normal) select.to: title: @@ -1953,7 +1961,7 @@ select.to: | Title | Identifier | Keybinding | Command | | --------- | ----------- | -------------------------------------------- | ------------------------------------------ | - | Go to | `to.jump` | `g` (kakoune: normal) | `[".select.to", { shift: "jump" , ... }]` | + | 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", ... }]` | select.to.extend: @@ -1977,7 +1985,7 @@ select.to.jump: keys: qwerty: |- - `g` (kakoune: normal) + `g` (core: normal) select.up.extend: title: @@ -2001,7 +2009,7 @@ select.up.jump: keys: qwerty: |- - `k` (kakoune: normal) , `up` (kakoune: normal) + `k` (core: normal) , `up` (core: normal) select.vertically: title: @@ -2014,21 +2022,25 @@ select.vertically: #### Variants - | Title | Identifier | Keybinding | Command | + | Title | Identifier | Keybinding | Command | | ----------- | ------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | - | Jump down | `down.jump` | `j` (kakoune: normal) , `down` (kakoune: normal) | `[".select.vertically", { direction: 1, shift: "jump" , ... }]` | + | 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` (kakoune: normal) , `up` (kakoune: normal) | `[".select.vertically", { direction: -1, shift: "jump" , ... }]` | + | 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` (kakoune: normal), `c-f` (kakoune: insert) | `[".select.vertically", { direction: 1, by: "page" , shift: "jump" }]` | - | `c-d` (kakoune: normal), `c-d` (kakoune: insert) | `[".select.vertically", { direction: 1, by: "halfPage", shift: "jump" }]` | - | `c-b` (kakoune: normal), `c-b` (kakoune: insert) | `[".select.vertically", { direction: -1, by: "page" , shift: "jump" }]` | - | `c-u` (kakoune: normal), `c-u` (kakoune: insert) | `[".select.vertically", { direction: -1, by: "halfPage", shift: "jump" }]` | + | 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" }]` | selections.changeDirection: title: @@ -2036,7 +2048,7 @@ selections.changeDirection: keys: qwerty: |- - `a-;` (kakoune: normal) + `a-;` (core: normal; helix: select) doc: en: | @@ -2076,7 +2088,7 @@ selections.clear.main: keys: qwerty: |- - `a-,` (kakoune: normal) + `a-,` (core: normal; helix: select) selections.clear.secondary: title: @@ -2087,7 +2099,7 @@ selections.clear.secondary: keys: qwerty: |- - `,` (kakoune: normal) + `,` (core: normal; helix: select) selections.copy: title: @@ -2095,7 +2107,7 @@ selections.copy: keys: qwerty: |- - `s-c` (kakoune: normal) + `s-c` (core: normal; helix: select) doc: en: | @@ -2104,9 +2116,9 @@ selections.copy: #### Variant - | Title | Identifier | Keybinding | Command | - | --------------------- | ------------ | ------------------------- | ----------------------------------------- | - | Copy selections above | `copy.above` | `s-a-c` (kakoune: normal) | `[".selections.copy", { direction: -1 }]` | + | Title | Identifier | Keybinding | Command | + | --------------------- | ------------ | ------------------------------------- | ----------------------------------------- | + | Copy selections above | `copy.above` | `s-a-c` (core: normal; helix: select) | `[".selections.copy", { direction: -1 }]` | selections.copy.above: title: @@ -2117,7 +2129,7 @@ selections.copy.above: keys: qwerty: |- - `s-a-c` (kakoune: normal) + `s-a-c` (core: normal; helix: select) selections.expandToLines: title: @@ -2126,6 +2138,7 @@ selections.expandToLines: keys: qwerty: |- `x` (kakoune: normal) + `s-x` (helix: normal; helix: select) doc: en: |+ @@ -2140,9 +2153,6 @@ selections.faceBackward: commands: |- [".selections.changeDirection", { direction: -1 }] - keys: - qwerty: "" - selections.faceForward: title: en: Forward selections @@ -2160,21 +2170,20 @@ selections.filter: keys: qwerty: |- - `$` (kakoune: normal) + `$` (core: normal; helix: select) doc: en: | Filter selections. - #### Variants - | Title | Identifier | Keybinding | Commands | - | -------------------------- | ----------------------- | --------------------------| ------------------------------------------------------------------------ | - | Keep matching selections | `filter.regexp` | `a-k` (kakoune: normal) | `[".selections.filter", { defaultExpression: "/" , ... }]` | - | Clear matching selections | `filter.regexp.inverse` | `s-a-k` (kakoune: normal) | `[".selections.filter", { defaultExpression: "/", inverse: true, ... }]` | - | Clear secondary selections | `clear.secondary` | `,` (kakoune: normal) | `[".selections.filter", { expression: "i === count" , ... }]` | - | Clear main selections | `clear.main` | `a-,` (kakoune: normal) | `[".selections.filter", { expression: "i !== count" , ... }]` | + | 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, ... }]` | + | Clear secondary selections | `clear.secondary` | `,` (core: normal; helix: select) | `[".selections.filter", { expression: "i === count" , ... }]` | + | Clear main selections | `clear.main` | `a-,` (core: normal; helix: select) | `[".selections.filter", { expression: "i !== count" , ... }]` | selections.filter.regexp: title: @@ -2185,18 +2194,18 @@ selections.filter.regexp: keys: qwerty: |- - `a-k` (kakoune: normal) + `a-k` (core: normal; helix: select) selections.filter.regexp.inverse: title: en: Clear matching selections - commands: |- - [".selections.filter", { defaultExpression: "/", inverse: true, $exclude: [] }] - keys: qwerty: |- - `s-a-k` (kakoune: normal) + `s-a-k` (core: normal; helix: select) + + commands: |- + [".selections.filter", { defaultExpression: "/", inverse: true, $exclude: [] }] selections.hideIndices: title: @@ -2245,7 +2254,7 @@ selections.pipe: keys: qwerty: |- - `a-|` (kakoune: normal) + `a-|` (core: normal; helix: select) doc: en: | @@ -2254,16 +2263,15 @@ selections.pipe: Run the specified command or code with the contents of each selection, and save the result to a register. - See https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc#changes-through-external-programs #### Additional commands - | 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", ... }]` | + | 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", ... }]` | selections.pipe.append: title: @@ -2274,7 +2282,7 @@ selections.pipe.append: keys: qwerty: |- - `!` (kakoune: normal) + `!` (core: normal; helix: select) selections.pipe.prepend: title: @@ -2285,7 +2293,7 @@ selections.pipe.prepend: keys: qwerty: |- - `a-!` (kakoune: normal) + `a-!` (core: normal; helix: select) selections.pipe.replace: title: @@ -2296,7 +2304,7 @@ selections.pipe.replace: keys: qwerty: |- - `|` (kakoune: normal) + `|` (core: normal; helix: select) selections.reduce: title: @@ -2304,7 +2312,7 @@ selections.reduce: keys: qwerty: |- - `;` (kakoune: normal) + `;` (core: normal; helix: select) doc: en: | @@ -2400,16 +2408,25 @@ selections.rotate.contents: en: | 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 }]` | + | Title | Identifier | Keybinding | Command | + | --------------------------------------------------- | ------------------ | ------------------------------------ | ---------------------------------------------------- | + | Rotate selections counter-clockwise (contents only) | `contents.reverse` | `a-(` (helix: normal; helix: select) | `[".selections.rotate.contents", { reverse: true }]` | + + keys: + qwerty: |- + `a-)` (helix: normal; helix: select) selections.rotate.contents.reverse: title: en: Rotate selections counter-clockwise (contents only) + keys: + qwerty: |- + `a-(` (helix: normal; helix: select) + commands: |- [".selections.rotate.contents", { reverse: true }] @@ -2419,7 +2436,7 @@ selections.rotate.selections: keys: qwerty: |- - `)` (kakoune: normal) + `)` (core: normal; helix: select) doc: en: | @@ -2428,9 +2445,9 @@ selections.rotate.selections: The following keybinding is also available: - | Title | Identifier | Keybinding | Command | - | ----------------------------------------------------- | -------------------- | --------------------- | ------------------------------------------------------ | - | Rotate selections counter-clockwise (selections only) | `selections.reverse` | `(` (kakoune: normal) | `[".selections.rotate.selections", { reverse: true }]` | + | Title | Identifier | Keybinding | Command | + | ----------------------------------------------------- | -------------------- | --------------------------------- | ------------------------------------------------------ | + | Rotate selections counter-clockwise (selections only) | `selections.reverse` | `(` (core: normal; helix: select) | `[".selections.rotate.selections", { reverse: true }]` | selections.rotate.selections.reverse: title: @@ -2441,7 +2458,7 @@ selections.rotate.selections.reverse: keys: qwerty: |- - `(` (kakoune: normal) + `(` (core: normal; helix: select) selections.save: title: @@ -2461,12 +2478,16 @@ selections.saveText: keys: qwerty: |- - `y` (kakoune: normal) + `y` (core: normal) doc: - en: |+ + en: | Copy selections text. + | Keybindings | Commands | + | ----------- | -------- | + | `y` (helix: select) | `[".selections.saveText"], [".modes.set.normal"]` | + selections.select: title: en: Select within selections @@ -2477,9 +2498,9 @@ selections.select: #### Variants - | Title | Identifier | Keybinding | Command | - | -------------- | --------------- | --------------------- | ------------------------------------------------------------------------------------------------- | - | Leap or select | `select.orLeap` | `s` (kakoune: normal) | `[".ifEmpty", { then: [[".seek.leap", { ... }]], otherwise: [[".selections.select", { ... }]] }]` | + | Title | Identifier | Keybinding | Command | + | -------------- | --------------- | --------------------------------- | ------------------------------------------------------------------------------------------------- | + | Leap or select | `select.orLeap` | `s` (core: normal; helix: select) | `[".ifEmpty", { then: [[".seek.leap", { ... }]], otherwise: [[".selections.select", { ... }]] }]` | selections.select.orLeap: title: @@ -2490,7 +2511,7 @@ selections.select.orLeap: keys: qwerty: |- - `s` (kakoune: normal) + `s` (core: normal; helix: select) selections.showIndices: title: @@ -2514,7 +2535,7 @@ selections.split: keys: qwerty: |- - `s-s` (kakoune: normal) + `s-s` (core: normal; helix: select) doc: en: |+ @@ -2530,9 +2551,9 @@ selections.splitLines: #### Variants - | Title | Identifier | Keybinding | Command | - | ----------------------- | ---------------------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------- | - | Leap or select backward | `splitLines.orLeap.backward` | `a-s` (kakoune: normal) | `[".ifEmpty", { then: [[".seek.leap", { direction: -1, ... }]], otherwise: [[".selections.splitLines", { ... }]] }]` | + | 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", { ... }]] }]` | selections.splitLines.orLeap.backward: title: @@ -2543,7 +2564,7 @@ selections.splitLines.orLeap.backward: keys: qwerty: |- - `a-s` (kakoune: normal) + `a-s` (core: normal; helix: select) selections.toggleIndices: title: @@ -2551,7 +2572,7 @@ selections.toggleIndices: keys: qwerty: |- - `enter` (dance: normal) + `enter` (core: normal; helix: select) doc: en: | @@ -2571,7 +2592,7 @@ selections.trimLines: keys: qwerty: |- - `a-x` (kakoune: normal) + `a-x` (core: normal; helix: select) doc: en: |+ @@ -2585,7 +2606,7 @@ selections.trimWhitespace: keys: qwerty: |- - `_` (kakoune: normal) + `_` (core: normal; helix: select) doc: en: |+ @@ -2599,7 +2620,7 @@ selectRegister: keys: qwerty: |- - `"` (kakoune: normal) + `"` (core: normal) doc: en: |+ @@ -2622,18 +2643,18 @@ updateCount: #### Additional keybindings - | Title | Keybinding | Command | - | ------------------------------ | -------------------------------------------- | ------------------------------------ | - | Add the digit 0 to the counter | `0` (core: normal), `NumPad0` (core: normal) | `[".updateCount", { addDigits: 0 }]` | - | Add the digit 1 to the counter | `1` (core: normal), `NumPad1` (core: normal) | `[".updateCount", { addDigits: 1 }]` | - | Add the digit 2 to the counter | `2` (core: normal), `NumPad2` (core: normal) | `[".updateCount", { addDigits: 2 }]` | - | Add the digit 3 to the counter | `3` (core: normal), `NumPad3` (core: normal) | `[".updateCount", { addDigits: 3 }]` | - | Add the digit 4 to the counter | `4` (core: normal), `NumPad4` (core: normal) | `[".updateCount", { addDigits: 4 }]` | - | Add the digit 5 to the counter | `5` (core: normal), `NumPad5` (core: normal) | `[".updateCount", { addDigits: 5 }]` | - | Add the digit 6 to the counter | `6` (core: normal), `NumPad6` (core: normal) | `[".updateCount", { addDigits: 6 }]` | - | Add the digit 7 to the counter | `7` (core: normal), `NumPad7` (core: normal) | `[".updateCount", { addDigits: 7 }]` | - | Add the digit 8 to the counter | `8` (core: normal), `NumPad8` (core: normal) | `[".updateCount", { addDigits: 8 }]` | - | Add the digit 9 to the counter | `9` (core: normal), `NumPad9` (core: normal) | `[".updateCount", { addDigits: 9 }]` | + | 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 }]` | updateRegister: title: @@ -2667,6 +2688,103 @@ anonymous: qwerty: |- `up` (core: prompt) + - commands: |- + [".edit.case.swap"], [".modes.set.normal"] + + keys: + qwerty: |- + `` s-` `` (helix: select) + + - commands: |- + [".edit.case.toLower"], [".modes.set.normal"] + + keys: + qwerty: |- + `` ` `` (helix: select) + + - commands: |- + [".edit.case.toUpper"], [".modes.set.normal"] + + keys: + qwerty: |- + `` a-` `` (helix: select) + + - commands: |- + [".edit.deindent"], [".modes.set.normal"] + + keys: + qwerty: |- + `<` (helix: select) + + - commands: |- + [".edit.delete"], [".modes.set.normal"] + + keys: + qwerty: |- + `a-d` (helix: select) + + - commands: |- + [".edit.indent"], [".modes.set.normal"] + + keys: + qwerty: |- + `>` (helix: select) + + - commands: |- + [".edit.insert"], [".modes.set.normal"] + + keys: + qwerty: |- + `s-r` (helix: select) + + - commands: |- + [".edit.paste.after"], [".modes.set.normal"] + + keys: + qwerty: |- + `p` (helix: select) + + - commands: |- + [".edit.paste.before"], [".modes.set.normal"] + + keys: + qwerty: |- + `s-p` (helix: select) + + - commands: |- + [".edit.replaceCharacters"], [".modes.set.normal"] + + keys: + qwerty: |- + `r` (helix: select) + + - commands: |- + [".edit.yank-delete"], [".modes.set.normal"] + + keys: + qwerty: |- + `d` (helix: select) + + - title: + en: Open match menu + + commands: |- + [".openMenu", { menu: "match" }] + + keys: + qwerty: |- + `m` (helix: normal) + + - title: + en: Open match menu with extend + + commands: |- + [".openMenu", { menu: "match", pass: [{ shift: "extend" }] }] + + keys: + qwerty: |- + `m` (helix: select) + - title: en: Show view menu @@ -2676,6 +2794,7 @@ anonymous: keys: qwerty: |- `v` (kakoune: normal) + `z` (helix: normal; helix: select) - title: en: Show view menu (locked) @@ -2686,38 +2805,63 @@ anonymous: keys: qwerty: |- `s-v` (kakoune: normal) + `s-z` (helix: normal; helix: select) + + - commands: |- + [".select.vertically", { direction: -1, by: "halfPage", shift: "extend" }] + + keys: + qwerty: |- + `c-u` (helix: select) - commands: |- [".select.vertically", { direction: -1, by: "halfPage", shift: "jump" }] keys: qwerty: |- - `c-u` (kakoune: normal) - `c-u` (kakoune: insert) + `c-u` (core: normal; core: insert) + + - commands: |- + [".select.vertically", { direction: -1, by: "page" , shift: "extend" }] + + keys: + qwerty: |- + `c-b` (helix: select) - commands: |- [".select.vertically", { direction: -1, by: "page" , shift: "jump" }] keys: qwerty: |- - `c-b` (kakoune: normal) - `c-b` (kakoune: insert) + `c-b` (core: normal; core: insert) + + - commands: |- + [".select.vertically", { direction: 1, by: "halfPage", shift: "extend" }] + + keys: + qwerty: |- + `c-d` (helix: select) - commands: |- [".select.vertically", { direction: 1, by: "halfPage", shift: "jump" }] keys: qwerty: |- - `c-d` (kakoune: normal) - `c-d` (kakoune: insert) + `c-d` (core: normal; core: insert) + + - commands: |- + [".select.vertically", { direction: 1, by: "page" , shift: "extend" }] + + keys: + qwerty: |- + `c-f` (helix: select) - commands: |- [".select.vertically", { direction: 1, by: "page" , shift: "jump" }] keys: qwerty: |- - `c-f` (kakoune: normal) - `c-f` (kakoune: insert) + `c-f` (core: normal; core: insert) - commands: |- [".selections.restore.withCurrent", { reverse: true, $exclude: [] }] @@ -2726,6 +2870,13 @@ anonymous: qwerty: |- `s-a-z` (kakoune: normal) + - commands: |- + [".selections.saveText"], [".modes.set.normal"] + + keys: + qwerty: |- + `y` (helix: select) + - title: en: Add the digit 0 to the counter @@ -2737,8 +2888,8 @@ anonymous: `s-0` (core: normal) `NumPad0` (core: normal) qwerty: |- - `0` (core: normal) - `NumPad0` (core: normal) + `0` (core: normal; helix: select) + `NumPad0` (core: normal; helix: select) - title: en: Add the digit 1 to the counter @@ -2751,8 +2902,8 @@ anonymous: `s-1` (core: normal) `NumPad1` (core: normal) qwerty: |- - `1` (core: normal) - `NumPad1` (core: normal) + `1` (core: normal; helix: select) + `NumPad1` (core: normal; helix: select) - title: en: Add the digit 2 to the counter @@ -2765,8 +2916,8 @@ anonymous: `s-2` (core: normal) `NumPad2` (core: normal) qwerty: |- - `2` (core: normal) - `NumPad2` (core: normal) + `2` (core: normal; helix: select) + `NumPad2` (core: normal; helix: select) - title: en: Add the digit 3 to the counter @@ -2779,8 +2930,8 @@ anonymous: `s-3` (core: normal) `NumPad3` (core: normal) qwerty: |- - `3` (core: normal) - `NumPad3` (core: normal) + `3` (core: normal; helix: select) + `NumPad3` (core: normal; helix: select) - title: en: Add the digit 4 to the counter @@ -2793,8 +2944,8 @@ anonymous: `s-4` (core: normal) `NumPad4` (core: normal) qwerty: |- - `4` (core: normal) - `NumPad4` (core: normal) + `4` (core: normal; helix: select) + `NumPad4` (core: normal; helix: select) - title: en: Add the digit 5 to the counter @@ -2807,8 +2958,8 @@ anonymous: `s-5` (core: normal) `NumPad5` (core: normal) qwerty: |- - `5` (core: normal) - `NumPad5` (core: normal) + `5` (core: normal; helix: select) + `NumPad5` (core: normal; helix: select) - title: en: Add the digit 6 to the counter @@ -2821,8 +2972,8 @@ anonymous: `s-6` (core: normal) `NumPad6` (core: normal) qwerty: |- - `6` (core: normal) - `NumPad6` (core: normal) + `6` (core: normal; helix: select) + `NumPad6` (core: normal; helix: select) - title: en: Add the digit 7 to the counter @@ -2835,8 +2986,8 @@ anonymous: `s-7` (core: normal) `NumPad7` (core: normal) qwerty: |- - `7` (core: normal) - `NumPad7` (core: normal) + `7` (core: normal; helix: select) + `NumPad7` (core: normal; helix: select) - title: en: Add the digit 8 to the counter @@ -2849,8 +3000,8 @@ anonymous: `s-8` (core: normal) `NumPad8` (core: normal) qwerty: |- - `8` (core: normal) - `NumPad8` (core: normal) + `8` (core: normal; helix: select) + `NumPad8` (core: normal; helix: select) - title: en: Add the digit 9 to the counter @@ -2863,8 +3014,8 @@ anonymous: `s-9` (core: normal) `NumPad9` (core: normal) qwerty: |- - `9` (core: normal) - `NumPad9` (core: normal) + `9` (core: normal; helix: select) + `NumPad9` (core: normal; helix: select) - commands: |- ["workbench.action.showCommands", { $exclude: [] }] diff --git a/src/api/modes.ts b/src/api/modes.ts index 23e4404b..139205f8 100644 --- a/src/api/modes.ts +++ b/src/api/modes.ts @@ -13,8 +13,7 @@ export function toMode(modeName: string, count: number): Thenable; export async function toMode(modeName: string, count?: number) { const context = Context.current, extension = context.extension, - mode = extension.modes.get(modeName); - + mode = findMode(modeName, context); if (mode === undefined || mode.isPendingDeletion) { throw new Error(`mode ${JSON.stringify(modeName)} does not exist`); } @@ -62,3 +61,22 @@ export async function toMode(modeName: string, count?: number) { })); }, 0); } + +/** + * Returns the {@link Mode} with the given name, prioritizing one that's within the name "namespace" + * as the current mode. + */ +function findMode(modeName: string, context?: Context) { + context = context ?? Context.current; + + const currentMode = context.mode, + split = currentMode.name.split("/"); + if (split.length === 2) { + const namespacedMode = context.extension.modes.get(`${split[0]}/${modeName}`); + if (namespacedMode !== undefined) { + return namespacedMode; + } + } + + return context.extension.modes.get(modeName); +} diff --git a/src/commands/README.md b/src/commands/README.md index 823a062c..227c38bd 100644 --- a/src/commands/README.md +++ b/src/commands/README.md @@ -27,16 +27,16 @@ depending on the keyboard layout. The following layouts _will be_\* supported: devdev.copyLastErrorMessageCopies the last encountered error message dev.setSelectionBehaviorSet the selection behavior of the specified mode editedit.alignAlign selectionsShift+7 (editorTextFocus && dance.mode == 'normal') -edit.case.swapSwap caseAlt+` (editorTextFocus && dance.mode == 'normal') +edit.case.swapSwap caseAlt+` (editorTextFocus && dance.mode == 'normal')Shift+` (editorTextFocus && dance.mode == 'normal') edit.case.toLowerTransform to lower case` (editorTextFocus && dance.mode == 'normal') -edit.case.toUpperTransform to upper caseShift+` (editorTextFocus && dance.mode == 'normal') +edit.case.toUpperTransform to upper caseShift+` (editorTextFocus && dance.mode == 'normal')Alt+` (editorTextFocus && dance.mode == 'normal') edit.copyIndentationCopy indentationShift+Alt+7 (editorTextFocus && dance.mode == 'normal') edit.deindentDeindent selected linesShift+Alt+, (editorTextFocus && dance.mode == 'normal') edit.deindent.withIncompleteDeindent selected lines (including incomplete indent)Shift+, (editorTextFocus && dance.mode == 'normal') edit.deleteDeleteAlt+D (editorTextFocus && dance.mode == 'normal') edit.delete-insertDelete and switch to InsertAlt+C (editorTextFocus && dance.mode == 'normal') -edit.newLine.above.insertInsert new line above and switch to insertShift+O (editorTextFocus && dance.mode == 'normal') -edit.newLine.below.insertInsert new line below and switch to insertO (editorTextFocus && dance.mode == 'normal') +edit.newLine.above.insertInsert new line above and switch to insertShift+O (editorTextFocus && dance.mode == 'normal')Shift+O (editorTextFocus && dance.mode == 'select') +edit.newLine.below.insertInsert new line below and switch to insertO (editorTextFocus && dance.mode == 'normal')O (editorTextFocus && dance.mode == 'select') edit.paste.afterPaste after edit.paste.after.selectPaste after and selectP (editorTextFocus && dance.mode == 'normal') edit.paste.beforePaste before @@ -46,18 +46,18 @@ depending on the keyboard layout. The following layouts _will be_\* supported: edit.pasteAll.beforePaste all before edit.pasteAll.before.selectPaste all before and selectShift+Alt+P (editorTextFocus && dance.mode == 'normal') edit.selectRegister-insertPick register and replaceCtrl+R (editorTextFocus && dance.mode == 'normal')Ctrl+R (editorTextFocus && dance.mode == 'insert') -edit.yank-deleteCopy and deleteD (editorTextFocus && dance.mode == 'normal')D (editorTextFocus && dance.mode == 'select') +edit.yank-deleteCopy and deleteD (editorTextFocus && dance.mode == 'normal') edit.yank-delete-insertCopy, delete and switch to InsertC (editorTextFocus && dance.mode == 'normal')C (editorTextFocus && dance.mode == 'select') edit.yank-replaceCopy and replaceShift+R (editorTextFocus && dance.mode == 'normal') edit.indentIndent selected linesShift+. (editorTextFocus && dance.mode == 'normal') edit.indent.withEmptyIndent selected lines (including empty lines)Shift+Alt+. (editorTextFocus && dance.mode == 'normal') -edit.insertInsert contents of registerShift+Alt+R (editorTextFocus && dance.mode == 'normal') -edit.joinJoin linesAlt+J (editorTextFocus && dance.mode == 'normal') -edit.join.selectJoin lines and select inserted separatorsShift+Alt+J (editorTextFocus && dance.mode == 'normal') +edit.insertInsert contents of registerShift+Alt+R (editorTextFocus && dance.mode == 'normal')Shift+R (editorTextFocus && dance.mode == 'normal') +edit.joinJoin linesAlt+J (editorTextFocus && dance.mode == 'normal')Shift+J (editorTextFocus && dance.mode == 'normal')Shift+J (editorTextFocus && dance.mode == 'select') +edit.join.selectJoin lines and select inserted separatorsShift+Alt+J (editorTextFocus && dance.mode == 'normal')Shift+Alt+J (editorTextFocus && dance.mode == 'select') edit.newLine.aboveInsert new line above each selectionShift+Alt+O (editorTextFocus && dance.mode == 'normal') edit.newLine.belowInsert new line below each selectionAlt+O (editorTextFocus && dance.mode == 'normal') edit.replaceCharactersReplace charactersR (editorTextFocus && dance.mode == 'normal') -historyhistory.repeat.seekRepeat last seekAlt+. (editorTextFocus && dance.mode == 'normal') +historyhistory.repeat.seekRepeat last seekAlt+. (editorTextFocus && dance.mode == 'normal')Alt+. (editorTextFocus && dance.mode == 'select') history.repeat.selectionRepeat last selection change history.recording.playReplay recordingQ (editorTextFocus && dance.mode == 'normal') history.recording.startStart recordingShift+Q (editorTextFocus && dance.mode == 'normal' && !dance.isRecording) @@ -79,70 +79,70 @@ selections are empty selectRegisterSelect register for next commandShift+' (editorTextFocus && dance.mode == 'normal') updateCountUpdate Dance count updateRegisterUpdate the contents of a register -modesmodes.insert.afterInsert afterA (editorTextFocus && dance.mode == 'normal') -modes.insert.beforeInsert beforeI (editorTextFocus && dance.mode == 'normal') -modes.insert.lineEndInsert at line endShift+A (editorTextFocus && dance.mode == 'normal') -modes.insert.lineStartInsert at line startShift+I (editorTextFocus && dance.mode == 'normal') +modesmodes.insert.afterInsert afterA (editorTextFocus && dance.mode == 'normal')A (editorTextFocus && dance.mode == 'select') +modes.insert.beforeInsert beforeI (editorTextFocus && dance.mode == 'normal')I (editorTextFocus && dance.mode == 'select') +modes.insert.lineEndInsert at line endShift+A (editorTextFocus && dance.mode == 'normal')Shift+A (editorTextFocus && dance.mode == 'select') +modes.insert.lineStartInsert at line startShift+I (editorTextFocus && dance.mode == 'normal')Shift+I (editorTextFocus && dance.mode == 'select') modes.set.insertSet mode to Insert -modes.set.normalSet mode to NormalEscape (editorTextFocus && dance.mode == 'insert')Escape (editorTextFocus && dance.mode == 'select') -modes.set.selectSet mode to Select +modes.set.normalSet mode to NormalEscape (editorTextFocus && dance.mode == 'insert')Escape (editorTextFocus && dance.mode == 'select')V (editorTextFocus && dance.mode == 'select') +modes.set.selectSet mode to SelectV (editorTextFocus && dance.mode == 'normal') modes.set.temporarily.insertTemporary Insert modeCtrl+V (editorTextFocus && dance.mode == 'normal') modes.set.temporarily.normalTemporary Normal modeCtrl+V (editorTextFocus && dance.mode == 'insert') modes.setSet Dance mode modes.set.temporarilySet Dance mode temporarily searchsearch.nextSelect next matchN (editorTextFocus && dance.mode == 'normal') search.searchSearch/ (editorTextFocus && dance.mode == 'normal')NumPad_Divide (editorTextFocus && dance.mode == 'normal') -search.backwardSearch backwardAlt+/ (editorTextFocus && dance.mode == 'normal') -search.backward.extendSearch backward (extend)Shift+Alt+/ (editorTextFocus && dance.mode == 'normal') -search.extendSearch (extend)Shift+/ (editorTextFocus && dance.mode == 'normal') -search.next.addAdd next matchShift+N (editorTextFocus && dance.mode == 'normal') -search.previousSelect previous matchAlt+N (editorTextFocus && dance.mode == 'normal') -search.previous.addAdd previous matchShift+Alt+N (editorTextFocus && dance.mode == 'normal') +search.backwardSearch backwardAlt+/ (editorTextFocus && dance.mode == 'normal')Shift+/ (editorTextFocus && dance.mode == 'normal') +search.backward.extendSearch backward (extend)Shift+Alt+/ (editorTextFocus && dance.mode == 'normal')Shift+/ (editorTextFocus && dance.mode == 'select') +search.extendSearch (extend)Shift+/ (editorTextFocus && dance.mode == 'normal')/ (editorTextFocus && dance.mode == 'select') +search.next.addAdd next matchShift+N (editorTextFocus && dance.mode == 'normal')N (editorTextFocus && dance.mode == 'select') +search.previousSelect previous matchAlt+N (editorTextFocus && dance.mode == 'normal')Shift+N (editorTextFocus && dance.mode == 'normal') +search.previous.addAdd previous matchShift+Alt+N (editorTextFocus && dance.mode == 'normal')Shift+N (editorTextFocus && dance.mode == 'select') search.selection.smartSearch current selection (smart)Shift+8 (editorTextFocus && dance.mode == 'normal')NumPad_Multiply (editorTextFocus && dance.mode == 'normal') search.selectionSearch current selectionShift+Alt+8 (editorTextFocus && dance.mode == 'normal')Alt+NumPad_Multiply (editorTextFocus && dance.mode == 'normal') seekseek.enclosingSelect to next enclosing characterM (editorTextFocus && dance.mode == 'normal') seek.leapLeap forward seek.objectSelect object seek.seekSelect to character (excluded)T (editorTextFocus && dance.mode == 'normal') -seek.askObjectSelect whole objectAlt+A (editorTextFocus && dance.mode == 'normal')Alt+A (editorTextFocus && dance.mode == 'insert') -seek.askObject.endSelect to whole object end] (editorTextFocus && dance.mode == 'normal') -seek.askObject.end.extendExtend to whole object endShift+] (editorTextFocus && dance.mode == 'normal') -seek.askObject.innerSelect inner objectAlt+I (editorTextFocus && dance.mode == 'normal')Alt+I (editorTextFocus && dance.mode == 'insert') -seek.askObject.inner.endSelect to inner object endAlt+] (editorTextFocus && dance.mode == 'normal') -seek.askObject.inner.end.extendExtend to inner object endShift+Alt+] (editorTextFocus && dance.mode == 'normal') -seek.askObject.inner.startSelect to inner object startAlt+[ (editorTextFocus && dance.mode == 'normal') -seek.askObject.inner.start.extendExtend to inner object startShift+Alt+[ (editorTextFocus && dance.mode == 'normal') -seek.askObject.startSelect to whole object start[ (editorTextFocus && dance.mode == 'normal') -seek.askObject.start.extendExtend to whole object startShift+[ (editorTextFocus && dance.mode == 'normal') -seek.backwardSelect to character (excluded, backward)Alt+T (editorTextFocus && dance.mode == 'normal') -seek.enclosing.backwardSelect to previous enclosing characterAlt+M (editorTextFocus && dance.mode == 'normal') -seek.enclosing.extendExtend to next enclosing characterShift+M (editorTextFocus && dance.mode == 'normal') -seek.enclosing.extend.backwardExtend to previous enclosing characterShift+Alt+M (editorTextFocus && dance.mode == 'normal') -seek.extendExtend to character (excluded)Shift+T (editorTextFocus && dance.mode == 'normal')T (editorTextFocus && dance.mode == 'select') -seek.extend.backwardExtend to character (excluded, backward)Shift+Alt+T (editorTextFocus && dance.mode == 'normal')Shift+T (editorTextFocus && dance.mode == 'select') -seek.includedSelect to character (included)F (editorTextFocus && dance.mode == 'normal') -seek.included.backwardSelect to character (included, backward)Alt+F (editorTextFocus && dance.mode == 'normal') -seek.included.extendExtend to character (included)Shift+F (editorTextFocus && dance.mode == 'normal')F (editorTextFocus && dance.mode == 'select') -seek.included.extend.backwardExtend to character (included, backward)Shift+Alt+F (editorTextFocus && dance.mode == 'normal')Shift+F (editorTextFocus && dance.mode == 'select') -seek.leap.backwardLeap backward -seek.syntax.child.experimentalSelect child syntax object -seek.syntax.next.experimentalSelect next syntax object -seek.syntax.parent.experimentalSelect parent syntax object -seek.syntax.previous.experimentalSelect previous syntax object -seek.word.backwardSelect to previous word startB (editorTextFocus && dance.mode == 'normal') -seek.word.extendExtend to next word startShift+W (editorTextFocus && dance.mode == 'normal')W (editorTextFocus && dance.mode == 'select') -seek.word.extend.backwardExtend to previous word startShift+B (editorTextFocus && dance.mode == 'normal')B (editorTextFocus && dance.mode == 'select') -seek.word.wsSelect to next non-whitespace word startAlt+W (editorTextFocus && dance.mode == 'normal') -seek.word.ws.backwardSelect to previous non-whitespace word startAlt+B (editorTextFocus && dance.mode == 'normal') -seek.word.ws.extendExtend to next non-whitespace word startShift+Alt+W (editorTextFocus && dance.mode == 'normal')Shift+W (editorTextFocus && dance.mode == 'select') -seek.word.ws.extend.backwardExtend to previous non-whitespace word startShift+Alt+B (editorTextFocus && dance.mode == 'normal')Shift+B (editorTextFocus && dance.mode == 'select') -seek.wordEndSelect to next word endE (editorTextFocus && dance.mode == 'normal') -seek.wordEnd.extendExtend to next word endShift+E (editorTextFocus && dance.mode == 'normal')E (editorTextFocus && dance.mode == 'select') -seek.wordEnd.wsSelect to next non-whitespace word endAlt+E (editorTextFocus && dance.mode == 'normal') -seek.wordEnd.ws.extendExtend to next non-whitespace word endShift+Alt+E (editorTextFocus && dance.mode == 'normal')Shift+E (editorTextFocus && dance.mode == 'select') +seek.askObjectSelect whole objectAlt+A (editorTextFocus && dance.mode == 'normal')Alt+A (editorTextFocus && dance.mode == 'insert') +seek.askObject.endSelect to whole object end] (editorTextFocus && dance.mode == 'normal') +seek.askObject.end.extendExtend to whole object endShift+] (editorTextFocus && dance.mode == 'normal') +seek.askObject.innerSelect inner objectAlt+I (editorTextFocus && dance.mode == 'normal')Alt+I (editorTextFocus && dance.mode == 'insert') +seek.askObject.inner.endSelect to inner object endAlt+] (editorTextFocus && dance.mode == 'normal') +seek.askObject.inner.end.extendExtend to inner object endShift+Alt+] (editorTextFocus && dance.mode == 'normal') +seek.askObject.inner.startSelect to inner object startAlt+[ (editorTextFocus && dance.mode == 'normal') +seek.askObject.inner.start.extendExtend to inner object startShift+Alt+[ (editorTextFocus && dance.mode == 'normal') +seek.askObject.startSelect to whole object start[ (editorTextFocus && dance.mode == 'normal') +seek.askObject.start.extendExtend to whole object startShift+[ (editorTextFocus && dance.mode == 'normal') +seek.backwardSelect to character (excluded, backward)Alt+T (editorTextFocus && dance.mode == 'normal')Shift+T (editorTextFocus && dance.mode == 'normal') +seek.enclosing.backwardSelect to previous enclosing characterAlt+M (editorTextFocus && dance.mode == 'normal') +seek.enclosing.extendExtend to next enclosing characterShift+M (editorTextFocus && dance.mode == 'normal') +seek.enclosing.extend.backwardExtend to previous enclosing characterShift+Alt+M (editorTextFocus && dance.mode == 'normal') +seek.extendExtend to character (excluded)Shift+T (editorTextFocus && dance.mode == 'normal')T (editorTextFocus && dance.mode == 'select') +seek.extend.backwardExtend to character (excluded, backward)Shift+Alt+T (editorTextFocus && dance.mode == 'normal')Shift+T (editorTextFocus && dance.mode == 'select') +seek.includedSelect to character (included)F (editorTextFocus && dance.mode == 'normal') +seek.included.backwardSelect to character (included, backward)Alt+F (editorTextFocus && dance.mode == 'normal')Shift+F (editorTextFocus && dance.mode == 'normal') +seek.included.extendExtend to character (included)Shift+F (editorTextFocus && dance.mode == 'normal')F (editorTextFocus && dance.mode == 'select') +seek.included.extend.backwardExtend to character (included, backward)Shift+Alt+F (editorTextFocus && dance.mode == 'normal')Shift+F (editorTextFocus && dance.mode == 'select') +seek.leap.backwardLeap backward +seek.syntax.child.experimentalSelect child syntax object +seek.syntax.next.experimentalSelect next syntax object +seek.syntax.parent.experimentalSelect parent syntax object +seek.syntax.previous.experimentalSelect previous syntax object +seek.word.backwardSelect to previous word startB (editorTextFocus && dance.mode == 'normal') +seek.word.extendExtend to next word startShift+W (editorTextFocus && dance.mode == 'normal')W (editorTextFocus && dance.mode == 'select') +seek.word.extend.backwardExtend to previous word startShift+B (editorTextFocus && dance.mode == 'normal')B (editorTextFocus && dance.mode == 'select') +seek.word.wsSelect to next non-whitespace word startAlt+W (editorTextFocus && dance.mode == 'normal')Shift+W (editorTextFocus && dance.mode == 'normal') +seek.word.ws.backwardSelect to previous non-whitespace word startAlt+B (editorTextFocus && dance.mode == 'normal')Shift+B (editorTextFocus && dance.mode == 'normal') +seek.word.ws.extendExtend to next non-whitespace word startShift+Alt+W (editorTextFocus && dance.mode == 'normal')Shift+W (editorTextFocus && dance.mode == 'select') +seek.word.ws.extend.backwardExtend to previous non-whitespace word startShift+Alt+B (editorTextFocus && dance.mode == 'normal')Shift+B (editorTextFocus && dance.mode == 'select') +seek.wordEndSelect to next word endE (editorTextFocus && dance.mode == 'normal') +seek.wordEnd.extendExtend to next word endShift+E (editorTextFocus && dance.mode == 'normal')E (editorTextFocus && dance.mode == 'select') +seek.wordEnd.wsSelect to next non-whitespace word endAlt+E (editorTextFocus && dance.mode == 'normal')Shift+E (editorTextFocus && dance.mode == 'normal') +seek.wordEnd.ws.extendExtend to next non-whitespace word endShift+Alt+E (editorTextFocus && dance.mode == 'normal')Shift+E (editorTextFocus && dance.mode == 'select') seek.syntax.experimentalSelect syntax object seek.wordSelect to next word startW (editorTextFocus && dance.mode == 'normal') -selectselect.bufferSelect whole bufferShift+5 (editorTextFocus && dance.mode == 'normal') +selectselect.bufferSelect whole bufferShift+5 (editorTextFocus && dance.mode == 'normal')Shift+5 (editorTextFocus && dance.mode == 'select') select.firstVisibleLineSelect to first visible line select.horizontallySelect horizontally select.lastLineSelect to last line @@ -150,82 +150,82 @@ selections are empty select.line.aboveSelect line above select.line.above.extendExtend to line above select.line.belowSelect line below -select.line.below.extendExtend to line below +select.line.below.extendExtend to line belowX (editorTextFocus && dance.mode == 'normal')X (editorTextFocus && dance.mode == 'select') select.lineEndSelect to line endAlt+L (editorTextFocus && dance.mode == 'normal')End (editorTextFocus && dance.mode == 'normal') select.lineStartSelect to line startAlt+H (editorTextFocus && dance.mode == 'normal')Home (editorTextFocus && dance.mode == 'normal') select.middleVisibleLineSelect to middle visible line -select.documentEnd.extendExtend to last character -select.documentEnd.jumpJump to last character +select.documentEnd.extendExtend to last character +select.documentEnd.jumpJump to last character select.down.extendExtend downShift+J (editorTextFocus && dance.mode == 'normal')Shift+Down (editorTextFocus && dance.mode == 'normal')J (editorTextFocus && dance.mode == 'select')Down (editorTextFocus && dance.mode == 'select') select.down.jumpJump downJ (editorTextFocus && dance.mode == 'normal')Down (editorTextFocus && dance.mode == 'normal') -select.firstLine.extendExtend to first line -select.firstLine.jumpJump to first line -select.firstVisibleLine.extendExtend to first visible line -select.firstVisibleLine.jumpJump to first visible line -select.lastLine.extendExtend to last line -select.lastLine.jumpJump to last line -select.lastVisibleLine.extendExtend to last visible line -select.lastVisibleLine.jumpJump to last visible line -select.left.extendExtend leftShift+H (editorTextFocus && dance.mode == 'normal')Shift+Left (editorTextFocus && dance.mode == 'normal')H (editorTextFocus && dance.mode == 'select')Left (editorTextFocus && dance.mode == 'select') -select.left.jumpJump leftH (editorTextFocus && dance.mode == 'normal')Left (editorTextFocus && dance.mode == 'normal') -select.lineEnd.extendExtend to line endShift+Alt+L (editorTextFocus && dance.mode == 'normal')Shift+End (editorTextFocus && dance.mode == 'normal') -select.lineStart.extendExtend to line startShift+Alt+H (editorTextFocus && dance.mode == 'normal')Shift+Home (editorTextFocus && dance.mode == 'normal') -select.lineStart.jumpJump to line start -select.lineStart.skipBlank.extendExtend to line start (skip blank) -select.lineStart.skipBlank.jumpJump to line start (skip blank) -select.middleVisibleLine.extendExtend to middle visible line -select.middleVisibleLine.jumpJump to middle visible line -select.right.extendExtend rightShift+L (editorTextFocus && dance.mode == 'normal')Shift+Right (editorTextFocus && dance.mode == 'normal')L (editorTextFocus && dance.mode == 'select')Right (editorTextFocus && dance.mode == 'select') -select.right.jumpJump rightL (editorTextFocus && dance.mode == 'normal')Right (editorTextFocus && dance.mode == 'normal') -select.to.extendExtend toShift+G (editorTextFocus && dance.mode == 'normal')G (editorTextFocus && dance.mode == 'select') -select.to.jumpGo toG (editorTextFocus && dance.mode == 'normal') +select.firstLine.extendExtend to first line +select.firstLine.jumpJump to first line +select.firstVisibleLine.extendExtend to first visible line +select.firstVisibleLine.jumpJump to first visible line +select.lastLine.extendExtend to last line +select.lastLine.jumpJump to last line +select.lastVisibleLine.extendExtend to last visible line +select.lastVisibleLine.jumpJump to last visible line +select.left.extendExtend leftShift+H (editorTextFocus && dance.mode == 'normal')Shift+Left (editorTextFocus && dance.mode == 'normal')H (editorTextFocus && dance.mode == 'select')Left (editorTextFocus && dance.mode == 'select') +select.left.jumpJump leftH (editorTextFocus && dance.mode == 'normal')Left (editorTextFocus && dance.mode == 'normal') +select.lineEnd.extendExtend to line endShift+Alt+L (editorTextFocus && dance.mode == 'normal')Shift+End (editorTextFocus && dance.mode == 'normal')End (editorTextFocus && dance.mode == 'select') +select.lineStart.extendExtend to line startShift+Alt+H (editorTextFocus && dance.mode == 'normal')Shift+Home (editorTextFocus && dance.mode == 'normal')Home (editorTextFocus && dance.mode == 'select') +select.lineStart.jumpJump to line start +select.lineStart.skipBlank.extendExtend to line start (skip blank) +select.lineStart.skipBlank.jumpJump to line start (skip blank) +select.middleVisibleLine.extendExtend to middle visible line +select.middleVisibleLine.jumpJump to middle visible line +select.right.extendExtend rightShift+L (editorTextFocus && dance.mode == 'normal')Shift+Right (editorTextFocus && dance.mode == 'normal')L (editorTextFocus && dance.mode == 'select')Right (editorTextFocus && dance.mode == 'select') +select.right.jumpJump rightL (editorTextFocus && dance.mode == 'normal')Right (editorTextFocus && dance.mode == 'normal') +select.to.extendExtend toShift+G (editorTextFocus && dance.mode == 'normal')G (editorTextFocus && dance.mode == 'select') +select.to.jumpGo toG (editorTextFocus && dance.mode == 'normal') select.up.extendExtend upShift+K (editorTextFocus && dance.mode == 'normal')Shift+Up (editorTextFocus && dance.mode == 'normal')K (editorTextFocus && dance.mode == 'select')Up (editorTextFocus && dance.mode == 'select') select.up.jumpJump upK (editorTextFocus && dance.mode == 'normal')Up (editorTextFocus && dance.mode == 'normal') select.toSelect to select.verticallySelect vertically -selectionsselections.changeDirectionChange direction of selectionsAlt+; (editorTextFocus && dance.mode == 'normal') +selectionsselections.changeDirectionChange direction of selectionsAlt+; (editorTextFocus && dance.mode == 'normal')Alt+; (editorTextFocus && dance.mode == 'select') selections.changeOrderReverse selections -selections.copyCopy selections belowShift+C (editorTextFocus && dance.mode == 'normal') -selections.expandToLinesExpand to linesX (editorTextFocus && dance.mode == 'normal') -selections.filterFilter selectionsShift+4 (editorTextFocus && dance.mode == 'normal') +selections.copyCopy selections belowShift+C (editorTextFocus && dance.mode == 'normal')Shift+C (editorTextFocus && dance.mode == 'select') +selections.expandToLinesExpand to linesX (editorTextFocus && dance.mode == 'normal')Shift+X (editorTextFocus && dance.mode == 'normal')Shift+X (editorTextFocus && dance.mode == 'select') +selections.filterFilter selectionsShift+4 (editorTextFocus && dance.mode == 'normal')Shift+4 (editorTextFocus && dance.mode == 'select') selections.mergeMerge contiguous selectionsShift+Alt+- (editorTextFocus && dance.mode == 'normal') selections.openOpen selected file -selections.pipePipe selectionsShift+Alt+\ (editorTextFocus && dance.mode == 'normal') -selections.reduceReduce selections to their cursor; (editorTextFocus && dance.mode == 'normal') +selections.pipePipe selectionsShift+Alt+\ (editorTextFocus && dance.mode == 'normal')Shift+Alt+\ (editorTextFocus && dance.mode == 'select') +selections.reduceReduce selections to their cursor; (editorTextFocus && dance.mode == 'normal'); (editorTextFocus && dance.mode == 'select') selections.restoreRestore selectionsZ (editorTextFocus && dance.mode == 'normal') selections.restore.withCurrentCombine register selections with current onesAlt+Z (editorTextFocus && dance.mode == 'normal') selections.saveSave selectionsShift+Z (editorTextFocus && dance.mode == 'normal') selections.saveTextCopy selections textY (editorTextFocus && dance.mode == 'normal') selections.selectSelect within selections -selections.clear.mainClear main selectionsAlt+, (editorTextFocus && dance.mode == 'normal') -selections.clear.secondaryClear secondary selections, (editorTextFocus && dance.mode == 'normal') -selections.copy.aboveCopy selections aboveShift+Alt+C (editorTextFocus && dance.mode == 'normal') -selections.faceBackwardBackward selections -selections.faceForwardForward selectionsShift+Alt+; (editorTextFocus && dance.mode == 'normal') -selections.filter.regexpKeep matching selectionsAlt+K (editorTextFocus && dance.mode == 'normal') -selections.filter.regexp.inverseClear matching selectionsShift+Alt+K (editorTextFocus && dance.mode == 'normal') -selections.hideIndicesHide selection indices -selections.orderAscendingOrder selections ascending -selections.orderDescendingOrder selections descending -selections.pipe.appendPipe and appendShift+1 (editorTextFocus && dance.mode == 'normal') -selections.pipe.prependPipe and prependShift+Alt+1 (editorTextFocus && dance.mode == 'normal') -selections.pipe.replacePipe and replaceShift+\ (editorTextFocus && dance.mode == 'normal') -selections.reduce.edgesReduce selections to their endsShift+Alt+S (editorTextFocus && dance.mode == 'normal') -selections.select.orLeapLeap or selectS (editorTextFocus && dance.mode == 'normal') -selections.showIndicesShow selection indices -selections.splitLines.orLeap.backwardLeap or select backwardAlt+S (editorTextFocus && dance.mode == 'normal') +selections.clear.mainClear main selectionsAlt+, (editorTextFocus && dance.mode == 'normal')Alt+, (editorTextFocus && dance.mode == 'select') +selections.clear.secondaryClear secondary selections, (editorTextFocus && dance.mode == 'normal'), (editorTextFocus && dance.mode == 'select') +selections.copy.aboveCopy selections aboveShift+Alt+C (editorTextFocus && dance.mode == 'normal')Shift+Alt+C (editorTextFocus && dance.mode == 'select') +selections.faceBackwardBackward selections +selections.faceForwardForward selectionsShift+Alt+; (editorTextFocus && dance.mode == 'normal') +selections.filter.regexpKeep matching selectionsAlt+K (editorTextFocus && dance.mode == 'normal')Alt+K (editorTextFocus && dance.mode == 'select') +selections.filter.regexp.inverseClear matching selectionsShift+Alt+K (editorTextFocus && dance.mode == 'normal')Shift+Alt+K (editorTextFocus && dance.mode == 'select') +selections.hideIndicesHide selection indices +selections.orderAscendingOrder selections ascending +selections.orderDescendingOrder selections descending +selections.pipe.appendPipe and appendShift+1 (editorTextFocus && dance.mode == 'normal')Shift+1 (editorTextFocus && dance.mode == 'select') +selections.pipe.prependPipe and prependShift+Alt+1 (editorTextFocus && dance.mode == 'normal')Shift+Alt+1 (editorTextFocus && dance.mode == 'select') +selections.pipe.replacePipe and replaceShift+\ (editorTextFocus && dance.mode == 'normal')Shift+\ (editorTextFocus && dance.mode == 'select') +selections.reduce.edgesReduce selections to their endsShift+Alt+S (editorTextFocus && dance.mode == 'normal') +selections.select.orLeapLeap or selectS (editorTextFocus && dance.mode == 'normal')S (editorTextFocus && dance.mode == 'select') +selections.showIndicesShow selection indices +selections.splitLines.orLeap.backwardLeap or select backwardAlt+S (editorTextFocus && dance.mode == 'normal')Alt+S (editorTextFocus && dance.mode == 'select') selections.sortSort selections -selections.splitSplit selectionsShift+S (editorTextFocus && dance.mode == 'normal') +selections.splitSplit selectionsShift+S (editorTextFocus && dance.mode == 'normal')Shift+S (editorTextFocus && dance.mode == 'select') selections.splitLinesSplit selections at line boundaries -selections.toggleIndicesToggle selection indicesEnter (editorTextFocus && dance.mode == 'normal') -selections.trimLinesTrim linesAlt+X (editorTextFocus && dance.mode == 'normal') -selections.trimWhitespaceTrim whitespaceShift+- (editorTextFocus && dance.mode == 'normal') +selections.toggleIndicesToggle selection indicesEnter (editorTextFocus && dance.mode == 'normal')Enter (editorTextFocus && dance.mode == 'select') +selections.trimLinesTrim linesAlt+X (editorTextFocus && dance.mode == 'normal')Alt+X (editorTextFocus && dance.mode == 'select') +selections.trimWhitespaceTrim whitespaceShift+- (editorTextFocus && dance.mode == 'normal')Shift+- (editorTextFocus && dance.mode == 'select') selections.rotateselections.rotate.bothRotate selections clockwiseShift+Alt+0 (editorTextFocus && dance.mode == 'normal') -selections.rotate.contentsRotate selections clockwise (contents only) -selections.rotate.selectionsRotate selections clockwise (selections only)Shift+0 (editorTextFocus && dance.mode == 'normal') +selections.rotate.contentsRotate selections clockwise (contents only)Shift+Alt+0 (editorTextFocus && dance.mode == 'normal')Shift+Alt+0 (editorTextFocus && dance.mode == 'select') +selections.rotate.selectionsRotate selections clockwise (selections only)Shift+0 (editorTextFocus && dance.mode == 'normal')Shift+0 (editorTextFocus && dance.mode == 'select') selections.rotate.both.reverseRotate selections counter-clockwiseShift+Alt+9 (editorTextFocus && dance.mode == 'normal') -selections.rotate.contents.reverseRotate selections counter-clockwise (contents only) -selections.rotate.selections.reverseRotate selections counter-clockwise (selections only)Shift+9 (editorTextFocus && dance.mode == 'normal') +selections.rotate.contents.reverseRotate selections counter-clockwise (contents only)Shift+Alt+9 (editorTextFocus && dance.mode == 'normal')Shift+Alt+9 (editorTextFocus && dance.mode == 'select') +selections.rotate.selections.reverseRotate selections counter-clockwise (selections only)Shift+9 (editorTextFocus && dance.mode == 'normal')Shift+9 (editorTextFocus && dance.mode == 'select') viewview.lineReveals a position based on the main cursor @@ -263,7 +263,7 @@ See https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc#changes -### [`edit.insert`](./edit.ts#L15-L61) +### [`edit.insert`](./edit.ts#L15-L66) Insert contents of register. @@ -285,17 +285,22 @@ Specify `all` to paste all contents next to each selection. | Pick register and replace | `selectRegister-insert` | `c-r` (kakoune: normal), `c-r` (kakoune: insert) | `[".selectRegister", { +register }], [".edit.insert", { ... }]` | | Paste before | `paste.before` | | `[".edit.insert", { handleNewLine: true, where: "start", ... }]` | | Paste after | `paste.after` | | `[".edit.insert", { handleNewLine: true, where: "end" , ... }]` | -| Paste before and select | `paste.before.select` | `s-p` (kakoune: normal) | `[".edit.insert", { handleNewLine: true, where: "start", shift: "select", ... }]` | -| Paste after and select | `paste.after.select` | `p` (kakoune: normal) | `[".edit.insert", { handleNewLine: true, where: "end" , shift: "select", ... }]` | +| Paste 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` (kakoune: normal) | `[".edit.insert", { register: "_", ... }]` | +| 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` (kakoune: normal), `d` (helix: select) | `[".selections.saveText", { +register }], [".edit.insert", { register: "_", ... }]` | -| Copy, delete and switch to Insert | `yank-delete-insert` | `c` (kakoune: normal), `c` (helix: select) | `[".selections.saveText", { +register }], [".modes.set", { mode: "insert", +mode }], [".edit.insert", { register: "_", ... }]` | +| Copy and 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`). @@ -308,10 +313,11 @@ This command: - takes an argument `where` of type `"active" | "anchor" | "start" | "end" | undefined`. Default keybinding: `s-a-r` (kakoune: normal) +`s-r` (helix: normal) -### [`edit.join`](./edit.ts#L133-L138) +### [`edit.join`](./edit.ts#L138-L143) Join lines. @@ -320,10 +326,11 @@ This command: - takes an argument `separator` of type `string`. Default keybinding: `a-j` (kakoune: normal) +`s-j` (helix: normal; helix: select) -### [`edit.join.select`](./edit.ts#L142-L147) +### [`edit.join.select`](./edit.ts#L147-L152) Join lines and select inserted separators. @@ -331,23 +338,26 @@ Join lines and select inserted separators. This command: - takes an argument `separator` of type `string`. -Default keybinding: `s-a-j` (kakoune: normal) +Default keybinding: `s-a-j` (core: normal; helix: select) -### [`edit.indent`](./edit.ts#L151-L156) +### [`edit.indent`](./edit.ts#L156-L164) 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: `>` (kakoune: normal) +Default keybinding: `>` (core: normal) -### [`edit.indent.withEmpty`](./edit.ts#L160-L165) +### [`edit.indent.withEmpty`](./edit.ts#L168-L173) Indent selected lines (including empty lines). @@ -359,7 +369,7 @@ Default keybinding: `a->` (kakoune: normal) -### [`edit.deindent`](./edit.ts#L169-L174) +### [`edit.deindent`](./edit.ts#L177-L182) Deindent selected lines. @@ -371,62 +381,79 @@ Default keybinding: `a-<` (kakoune: normal) -### [`edit.deindent.withIncomplete`](./edit.ts#L178-L183) +### [`edit.deindent.withIncomplete`](./edit.ts#L186-L194) 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: `<` (kakoune: normal) +Default keybinding: `<` (core: normal) -### [`edit.case.toLower`](./edit.ts#L187-L192) +### [`edit.case.toLower`](./edit.ts#L198-L206) Transform to lower case. +| Keybindings | Commands | +| ----------- | -------- | +| `` ` `` (helix: select) | `[".edit.case.toLower"], [".modes.set.normal"]` | -Default keybinding: `` ` `` (kakoune: normal) +Default keybinding: `` ` `` (core: normal) -### [`edit.case.toUpper`](./edit.ts#L196-L201) +### [`edit.case.toUpper`](./edit.ts#L210-L218) Transform to upper case. +| Keybindings | Commands | +| ----------- | -------- | +| `` a-` `` (helix: select) | `[".edit.case.toUpper"], [".modes.set.normal"]` | Default keybinding: `` s-` `` (kakoune: normal) +`` a-` `` (helix: normal) -### [`edit.case.swap`](./edit.ts#L205-L210) +### [`edit.case.swap`](./edit.ts#L222-L230) Swap case. +| Keybindings | Commands | +| ----------- | -------- | +| `` s-` `` (helix: select) | `[".edit.case.swap"], [".modes.set.normal"]` | Default keybinding: `` a-` `` (kakoune: normal) +`` s-` `` (helix: normal) -### [`edit.replaceCharacters`](./edit.ts#L225-L234) +### [`edit.replaceCharacters`](./edit.ts#L245-L257) 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 `input` of type `string`. -Default keybinding: `r` (kakoune: normal) +Default keybinding: `r` (core: normal) -### [`edit.align`](./edit.ts#L277-L285) +### [`edit.align`](./edit.ts#L300-L308) Align selections. @@ -437,11 +464,11 @@ before the first character of each selection. This command: - takes an argument `fill` of type `string`. -Default keybinding: `&` (kakoune: normal) +Default keybinding: `&` (core: normal) -### [`edit.copyIndentation`](./edit.ts#L335-L348) +### [`edit.copyIndentation`](./edit.ts#L358-L371) Copy indentation. @@ -456,7 +483,7 @@ Default keybinding: `a-&` (kakoune: normal) -### [`edit.newLine.above`](./edit.ts#L377-L395) +### [`edit.newLine.above`](./edit.ts#L400-L418) Insert new line above each selection. @@ -466,9 +493,9 @@ keep the current selections. #### Additional keybindings -| Title | Identifier | Keybinding | Commands | -| ------------------------------------------ | ---------------------- | ----------------------- | --------------------------------------------------------------------------------- | -| Insert new line above and switch to insert | `newLine.above.insert` | `s-o` (kakoune: normal) | `[".edit.newLine.above", { shift: "select" }], [".modes.insert.before", { ... }]` | +| 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. @@ -478,7 +505,7 @@ Default keybinding: `s-a-o` (kakoune: normal) -### [`edit.newLine.below`](./edit.ts#L415-L433) +### [`edit.newLine.below`](./edit.ts#L438-L456) Insert new line below each selection. @@ -488,9 +515,9 @@ keep the current selections. #### Additional keybindings -| Title | Identifier | Keybinding | Commands | -| ------------------------------------------ | ---------------------- | --------------------- | --------------------------------------------------------------------------------- | -| Insert new line below and switch to insert | `newLine.below.insert` | `o` (kakoune: normal) | `[".edit.newLine.below", { shift: "select" }], [".modes.insert.before", { ... }]` | +| 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. @@ -512,8 +539,7 @@ Undo. This command: - does not require an active text editor. -Default keybinding: `u` (kakoune: normal) -`u` (helix: select) +Default keybinding: `u` (core: normal; helix: select) @@ -525,8 +551,7 @@ Redo. This command: - does not require an active text editor. -Default keybinding: `s-u` (kakoune: normal) -`s-u` (helix: select) +Default keybinding: `s-u` (core: normal; helix: select) @@ -559,10 +584,10 @@ 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 }]` | +| 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. @@ -578,8 +603,8 @@ Repeat last edit without a command. This command: - may be repeated with a given number of repetitions. -Default keybinding: `.` (kakoune: normal) -`NumPad_Decimal` (kakoune: normal) +Default keybinding: `.` (core: normal) +`NumPad_Decimal` (core: normal) @@ -791,7 +816,7 @@ current document. This command: - takes an input `register` of type `string | Register`. -Default keybinding: `"` (kakoune: normal) +Default keybinding: `"` (core: normal) @@ -814,18 +839,18 @@ Update the current counter used to repeat the next command. #### Additional keybindings -| Title | Keybinding | Command | -| ------------------------------ | -------------------------------------------- | ------------------------------------ | -| Add the digit 0 to the counter | `0` (core: normal), `NumPad0` (core: normal) | `[".updateCount", { addDigits: 0 }]` | -| Add the digit 1 to the counter | `1` (core: normal), `NumPad1` (core: normal) | `[".updateCount", { addDigits: 1 }]` | -| Add the digit 2 to the counter | `2` (core: normal), `NumPad2` (core: normal) | `[".updateCount", { addDigits: 2 }]` | -| Add the digit 3 to the counter | `3` (core: normal), `NumPad3` (core: normal) | `[".updateCount", { addDigits: 3 }]` | -| Add the digit 4 to the counter | `4` (core: normal), `NumPad4` (core: normal) | `[".updateCount", { addDigits: 4 }]` | -| Add the digit 5 to the counter | `5` (core: normal), `NumPad5` (core: normal) | `[".updateCount", { addDigits: 5 }]` | -| Add the digit 6 to the counter | `6` (core: normal), `NumPad6` (core: normal) | `[".updateCount", { addDigits: 6 }]` | -| Add the digit 7 to the counter | `7` (core: normal), `NumPad7` (core: normal) | `[".updateCount", { addDigits: 7 }]` | -| Add the digit 8 to the counter | `8` (core: normal), `NumPad8` (core: normal) | `[".updateCount", { addDigits: 8 }]` | -| Add the digit 9 to the counter | `9` (core: normal), `NumPad9` (core: normal) | `[".updateCount", { addDigits: 9 }]` | +| 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: @@ -898,20 +923,20 @@ Set Dance mode. #### Variants -| Title | Identifier | Keybinding | Command | -| ------------------ | ------------ | ---------------------------------------------------- | ----------------------------------------------------------- | -| Set mode to Normal | `set.normal` | `escape` (kakoune: insert), `escape` (helix: select) | `[".modes.set", { mode: "normal" }], ["hideSuggestWidget"]` | -| Set mode to Insert | `set.insert` | | `[".modes.set", { mode: "insert" }]` | -| Set mode to Select | `set.select` | | `[".modes.set", { mode: "select" }]` | +| 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` (kakoune: normal) | `[".selections.faceBackward", { record: false }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "start", record: false, empty: true, ... }]` | -| Insert after | `insert.after` | `a` (kakoune: normal) | `[".selections.faceForward" , { record: false }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "end" , record: false, empty: true, ... }]` | -| Insert at line start | `insert.lineStart` | `s-i` (kakoune: normal) | `[".select.lineStart", { shift: "jump", skipBlank: true }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "start", record: false, empty: true, ... }]` | -| Insert at line end | `insert.lineEnd` | `s-a` (kakoune: normal) | `[".select.lineEnd" , { shift: "jump" }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "end" , record: false, empty: true, ... }]` | +| 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: @@ -946,11 +971,11 @@ Search for patterns and replace or add selections. Search. -| Title | Identifier | Keybinding | Command | -| ------------------------ | ----------------- | ----------------------- | ------------------------------------------------------ | -| Search (extend) | `extend` | `?` (kakoune: normal) | `[".search", { shift: "extend", ... }]` | -| Search backward | `backward` | `a-/` (kakoune: normal) | `[".search", { direction: -1 , ... }]` | -| Search backward (extend) | `backward.extend` | `a-?` (kakoune: normal) | `[".search", { direction: -1, shift: "extend", ... }]` | +| 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`). @@ -959,8 +984,8 @@ This command: - takes an argument `add` of type `boolean`. - takes an argument `interactive` of type `boolean`. -Default keybinding: `/` (kakoune: normal) -`NumPad_Divide` (kakoune: normal) +Default keybinding: `/` (core: normal) +`NumPad_Divide` (core: normal) @@ -969,16 +994,16 @@ Default keybinding: `/` (kakoune: normal) Search current selection. -| Title | Identifier | Keybinding | Command | -| -------------------------------- | ----------------- | ---------------------------------------------------------- | --------------------------------------------------- | -| Search current selection (smart) | `selection.smart` | `*` (kakoune: normal), `NumPad_Multiply` (kakoune: normal) | `[".search.selection", { smart: true, +register }]` | +| Title | Identifier | Keybinding | Command | +| -------------------------------- | ----------------- | ---------------------------------------------------- | --------------------------------------------------- | +| Search current selection (smart) | `selection.smart` | `*` (core: normal), `NumPad_Multiply` (core: normal) | `[".search.selection", { smart: true, +register }]` | This command: - accepts a register (by default, it uses `slash`). - takes an argument `smart` of type `boolean`. -Default keybinding: `a-*` (kakoune: normal) -`a-NumPad_Multiply` (kakoune: normal) +Default keybinding: `a-*` (core: normal) +`a-NumPad_Multiply` (core: normal) @@ -987,26 +1012,33 @@ Default keybinding: `a-*` (kakoune: normal) Select next match. -| Title | Identifier | Keybinding | Command | -| --------------------- | -------------- | ------------------------- | ----------------------------------------------------- | -| Add next match | `next.add` | `s-n` (kakoune: normal) | `[".search.next", { add: true, ... }]` | -| Select previous match | `previous` | `a-n` (kakoune: normal) | `[".search.next", { direction: -1 , ... }]` | -| Add previous match | `previous.add` | `s-a-n` (kakoune: normal) | `[".search.next", { direction: -1, add: true, ... }]` | +| 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 `add` of type `boolean`. -Default keybinding: `n` (kakoune: normal) +Default keybinding: `n` (core: normal) ## [`seek`](./seek.ts) Update selections based on the text surrounding them. +#### Predefined keybindings + +| 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" }] }]` | + -### [`seek.seek`](./seek.ts#L16-L41) +### [`seek.seek`](./seek.ts#L23-L48) Select to character (excluded). @@ -1016,11 +1048,11 @@ Select to character (excluded). | Title | Identifier | Keybinding | Command | | ---------------------------------------- | -------------------------- | ------------------------------------------------ | ------------------------------------------------------------------- | | Extend to character (excluded) | `extend` | `s-t` (kakoune: normal), `t` (helix: select) | `[".seek", { shift: "extend" , ... }]` | -| Select to character (excluded, backward) | `backward` | `a-t` (kakoune: normal) | `[".seek", { direction: -1, ... }]` | +| 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` (kakoune: normal) | `[".seek", { include: true , ... }]` | +| 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) | `[".seek", { include: true, direction: -1, ... }]` | +| 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: @@ -1028,11 +1060,11 @@ This command: - takes an argument `include` of type `boolean`. - takes an input `input` of type `string`. -Default keybinding: `t` (kakoune: normal) +Default keybinding: `t` (core: normal) -### [`seek.enclosing`](./seek.ts#L81-L101) +### [`seek.enclosing`](./seek.ts#L88-L108) Select to next enclosing character. @@ -1053,7 +1085,7 @@ Default keybinding: `m` (kakoune: normal) -### [`seek.word`](./seek.ts#L174-L205) +### [`seek.word`](./seek.ts#L181-L212) Select to next word start. @@ -1065,15 +1097,15 @@ Select the word and following whitespaces on the right of the end of each select | Title | Identifier | Keybinding | Command | | -------------------------------------------- | ------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------- | | Extend to next word start | `word.extend` | `s-w` (kakoune: normal), `w` (helix: select) | `[".seek.word", { shift: "extend" , ... }]` | -| Select to previous word start | `word.backward` | `b` (kakoune: normal) | `[".seek.word", { direction: -1, ... }]` | +| 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) | `[".seek.word", { ws: true , ... }]` | +| 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) | `[".seek.word", { ws: true, direction: -1, ... }]` | +| 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` (kakoune: normal) | `[".seek.word", { stopAtEnd: true , ... }]` | +| 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) | `[".seek.word", { stopAtEnd: true , ws: true , ... }]` | +| 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: @@ -1081,11 +1113,11 @@ This command: - takes an argument `stopAtEnd` of type `boolean`. - takes an argument `ws` of type `boolean`. -Default keybinding: `w` (kakoune: normal) +Default keybinding: `w` (core: normal) -### [`seek.object`](./seek.ts#L249-L291) +### [`seek.object`](./seek.ts#L256-L298) Select object. @@ -1125,7 +1157,7 @@ This command: -### [`seek.syntax.experimental`](./seek.ts#L564-L583) +### [`seek.syntax.experimental`](./seek.ts#L571-L590) Select syntax object. @@ -1143,7 +1175,7 @@ This command: -### [`seek.leap`](./seek.ts#L617-L633) +### [`seek.leap`](./seek.ts#L624-L640) Leap forward. @@ -1170,32 +1202,36 @@ Select whole buffer. -Default keybinding: `%` (kakoune: normal) +Default keybinding: `%` (core: normal; helix: select) -### [`select.vertically`](./select.ts#L31-L64) +### [`select.vertically`](./select.ts#L31-L68) Select vertically. #### Variants -| Title | Identifier | Keybinding | Command | +| Title | Identifier | Keybinding | Command | | ----------- | ------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | -| Jump down | `down.jump` | `j` (kakoune: normal) , `down` (kakoune: normal) | `[".select.vertically", { direction: 1, shift: "jump" , ... }]` | +| 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` (kakoune: normal) , `up` (kakoune: normal) | `[".select.vertically", { direction: -1, shift: "jump" , ... }]` | +| 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` (kakoune: normal), `c-f` (kakoune: insert) | `[".select.vertically", { direction: 1, by: "page" , shift: "jump" }]` | -| `c-d` (kakoune: normal), `c-d` (kakoune: insert) | `[".select.vertically", { direction: 1, by: "halfPage", shift: "jump" }]` | -| `c-b` (kakoune: normal), `c-b` (kakoune: insert) | `[".select.vertically", { direction: -1, by: "page" , shift: "jump" }]` | -| `c-u` (kakoune: normal), `c-u` (kakoune: insert) | `[".select.vertically", { direction: -1, by: "halfPage", shift: "jump" }]` | +| 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. @@ -1204,7 +1240,7 @@ This command: -### [`select.horizontally`](./select.ts#L217-L239) +### [`select.horizontally`](./select.ts#L221-L243) Select horizontally. @@ -1213,9 +1249,9 @@ Select horizontally. | Title | Identifier | Keybinding | Command | | ------------ | -------------- | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | -| Jump right | `right.jump` | `l` (kakoune: normal) , `right` (kakoune: normal) | `[".select.horizontally", { direction: 1, shift: "jump" , ... }]` | +| 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` (kakoune: normal) , `left` (kakoune: normal) | `[".select.horizontally", { direction: -1, shift: "jump" , ... }]` | +| 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: @@ -1224,7 +1260,7 @@ This command: -### [`select.to`](./select.ts#L286-L304) +### [`select.to`](./select.ts#L290-L308) Select to. @@ -1235,7 +1271,7 @@ line. If no count is specified, this command will shift open the `goto` menu. | Title | Identifier | Keybinding | Command | | --------- | ----------- | -------------------------------------------- | ------------------------------------------ | -| Go to | `to.jump` | `g` (kakoune: normal) | `[".select.to", { shift: "jump" , ... }]` | +| 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: @@ -1244,7 +1280,7 @@ This command: -### [`select.line.below`](./select.ts#L314-L317) +### [`select.line.below`](./select.ts#L318-L321) Select line below. @@ -1253,16 +1289,19 @@ This command: -### [`select.line.below.extend`](./select.ts#L342-L345) +### [`select.line.below.extend`](./select.ts#L346-L351) 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`](./select.ts#L372-L375) +### [`select.line.above`](./select.ts#L378-L381) Select line above. @@ -1271,7 +1310,7 @@ This command: -### [`select.line.above.extend`](./select.ts#L399-L402) +### [`select.line.above.extend`](./select.ts#L405-L408) Extend to line above. @@ -1280,32 +1319,32 @@ This command: -### [`select.lineStart`](./select.ts#L448-L470) +### [`select.lineStart`](./select.ts#L454-L476) Select to line start. #### Variants -| Title | Identifier | Keybinding | Command | -| -------------------- | ------------------ | ----------------------------------------------------- | ------------------------------------------------------------------ | -| Jump to line start | `lineStart.jump` | | `[".select.lineStart", { shift: "jump" , ... }]` | -| Extend to line start | `lineStart.extend` | `s-a-h` (kakoune: normal), `s-home` (kakoune: normal) | `[".select.lineStart", { shift: "extend", ... }]` | -| Jump to line start (skip blank) | `lineStart.skipBlank.jump` | | `[".select.lineStart", { skipBlank: true, shift: "jump" , ... }]` | -| Extend to line start (skip blank) | `lineStart.skipBlank.extend` | | `[".select.lineStart", { skipBlank: true, shift: "extend", ... }]` | -| Jump to first line | `firstLine.jump` | | `[".select.lineStart", { count: 0, shift: "jump" , ... }]` | -| Extend to first line | `firstLine.extend` | | `[".select.lineStart", { count: 0, shift: "extend", ... }]` | +| 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 `skipBlank` of type `boolean`. Default keybinding: `a-h` (kakoune: normal) -`home` (kakoune: normal) +`home` (core: normal) -### [`select.lineEnd`](./select.ts#L495-L517) +### [`select.lineEnd`](./select.ts#L501-L523) Select to line end. @@ -1313,22 +1352,22 @@ Select to line end. #### Variants -| 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", ... }]` | +| 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 `lineBreak` of type `boolean`. Default keybinding: `a-l` (kakoune: normal) -`end` (kakoune: normal) +`end` (core: normal) -### [`select.lastLine`](./select.ts#L545-L555) +### [`select.lastLine`](./select.ts#L551-L561) Select to last line. @@ -1341,7 +1380,7 @@ Select to last line. -### [`select.firstVisibleLine`](./select.ts#L566-L576) +### [`select.firstVisibleLine`](./select.ts#L572-L582) Select to first visible line. @@ -1354,7 +1393,7 @@ Select to first visible line. -### [`select.middleVisibleLine`](./select.ts#L583-L593) +### [`select.middleVisibleLine`](./select.ts#L589-L599) Select to middle visible line. @@ -1367,7 +1406,7 @@ Select to middle visible line. -### [`select.lastVisibleLine`](./select.ts#L600-L610) +### [`select.lastVisibleLine`](./select.ts#L606-L616) Select to last visible line. @@ -1384,19 +1423,22 @@ Interacting with selections. -### [`selections.saveText`](./selections.ts#L21-L30) +### [`selections.saveText`](./selections.ts#L21-L33) 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` (kakoune: normal) +Default keybinding: `y` (core: normal) -### [`selections.save`](./selections.ts#L34-L48) +### [`selections.save`](./selections.ts#L37-L51) Save selections. @@ -1411,7 +1453,7 @@ Default keybinding: `s-z` (kakoune: normal) -### [`selections.restore`](./selections.ts#L95-L103) +### [`selections.restore`](./selections.ts#L98-L106) Restore selections. @@ -1423,7 +1465,7 @@ Default keybinding: `z` (kakoune: normal) -### [`selections.restore.withCurrent`](./selections.ts#L115-L135) +### [`selections.restore.withCurrent`](./selections.ts#L118-L138) Combine register selections with current ones. @@ -1445,45 +1487,43 @@ Default keybinding: `a-z` (kakoune: normal) -### [`selections.pipe`](./selections.ts#L241-L263) +### [`selections.pipe`](./selections.ts#L244-L265) Pipe selections. Run the specified command or code with the contents of each selection, and save the result to a register. - See https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc#changes-through-external-programs #### Additional commands -| 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", ... }]` | +| 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 `expression` of type `string`. -Default keybinding: `a-|` (kakoune: normal) +Default keybinding: `a-|` (core: normal; helix: select) -### [`selections.filter`](./selections.ts#L291-L313) +### [`selections.filter`](./selections.ts#L293-L314) Filter selections. - #### Variants -| Title | Identifier | Keybinding | Commands | -| -------------------------- | ----------------------- | --------------------------| ------------------------------------------------------------------------ | -| Keep matching selections | `filter.regexp` | `a-k` (kakoune: normal) | `[".selections.filter", { defaultExpression: "/" , ... }]` | -| Clear matching selections | `filter.regexp.inverse` | `s-a-k` (kakoune: normal) | `[".selections.filter", { defaultExpression: "/", inverse: true, ... }]` | -| Clear secondary selections | `clear.secondary` | `,` (kakoune: normal) | `[".selections.filter", { expression: "i === count" , ... }]` | -| Clear main selections | `clear.main` | `a-,` (kakoune: normal) | `[".selections.filter", { expression: "i !== count" , ... }]` | +| 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, ... }]` | +| Clear secondary selections | `clear.secondary` | `,` (core: normal; helix: select) | `[".selections.filter", { expression: "i === count" , ... }]` | +| Clear main selections | `clear.main` | `a-,` (core: normal; helix: select) | `[".selections.filter", { expression: "i !== count" , ... }]` | This command: - accepts an argument of type `{ expression?: string }`. @@ -1492,19 +1532,19 @@ This command: - takes an argument `interactive` of type `boolean`. - takes an argument `inverse` of type `boolean`. -Default keybinding: `$` (kakoune: normal) +Default keybinding: `$` (core: normal; helix: select) -### [`selections.select`](./selections.ts#L346-L360) +### [`selections.select`](./selections.ts#L347-L361) Select within selections. #### Variants -| Title | Identifier | Keybinding | Command | -| -------------- | --------------- | --------------------- | ------------------------------------------------------------------------------------------------- | -| Leap or select | `select.orLeap` | `s` (kakoune: normal) | `[".ifEmpty", { then: [[".seek.leap", { ... }]], otherwise: [[".selections.select", { ... }]] }]` | +| Title | Identifier | Keybinding | Command | +| -------------- | --------------- | --------------------------------- | ------------------------------------------------------------------------------------------------- | +| Leap or select | `select.orLeap` | `s` (core: normal; helix: select) | `[".ifEmpty", { then: [[".seek.leap", { ... }]], otherwise: [[".selections.select", { ... }]] }]` | This command: - accepts an argument of type `{ re?: string | RegExp }`. @@ -1512,7 +1552,7 @@ This command: -### [`selections.split`](./selections.ts#L379-L390) +### [`selections.split`](./selections.ts#L380-L391) Split selections. @@ -1522,19 +1562,19 @@ This command: - takes an argument `excludeEmpty` of type `boolean`. - takes an argument `interactive` of type `boolean`. -Default keybinding: `s-s` (kakoune: normal) +Default keybinding: `s-s` (core: normal; helix: select) -### [`selections.splitLines`](./selections.ts#L415-L431) +### [`selections.splitLines`](./selections.ts#L416-L432) Split selections at line boundaries. #### Variants -| Title | Identifier | Keybinding | Command | -| ----------------------- | ---------------------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------- | -| Leap or select backward | `splitLines.orLeap.backward` | `a-s` (kakoune: normal) | `[".ifEmpty", { then: [[".seek.leap", { direction: -1, ... }]], otherwise: [[".selections.splitLines", { ... }]] }]` | +| 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. @@ -1542,7 +1582,7 @@ This command: -### [`selections.expandToLines`](./selections.ts#L474-L481) +### [`selections.expandToLines`](./selections.ts#L475-L482) Expand to lines. @@ -1551,10 +1591,11 @@ Expand selections to contain full lines (including end-of-line characters). Default keybinding: `x` (kakoune: normal) +`s-x` (helix: normal; helix: select) -### [`selections.trimLines`](./selections.ts#L508-L515) +### [`selections.trimLines`](./selections.ts#L509-L516) Trim lines. @@ -1562,11 +1603,11 @@ Trim selections to only contain full lines (from start to line break). -Default keybinding: `a-x` (kakoune: normal) +Default keybinding: `a-x` (core: normal; helix: select) -### [`selections.trimWhitespace`](./selections.ts#L540-L547) +### [`selections.trimWhitespace`](./selections.ts#L541-L548) Trim whitespace. @@ -1574,11 +1615,11 @@ Trim whitespace at beginning and end of selections. -Default keybinding: `_` (kakoune: normal) +Default keybinding: `_` (core: normal; helix: select) -### [`selections.reduce`](./selections.ts#L566-L585) +### [`selections.reduce`](./selections.ts#L567-L586) Reduce selections to their cursor. @@ -1594,11 +1635,11 @@ This command: - takes an argument `empty` of type `boolean`. - takes an argument `where` of type `"active" | "anchor" | "start" | "end" | "both"`. -Default keybinding: `;` (kakoune: normal) +Default keybinding: `;` (core: normal; helix: select) -### [`selections.changeDirection`](./selections.ts#L647-L662) +### [`selections.changeDirection`](./selections.ts#L648-L663) Change direction of selections. @@ -1612,11 +1653,11 @@ Change direction of selections. | Backward selections | `faceBackward` | | `[".selections.changeDirection", { direction: -1 }]` | -Default keybinding: `a-;` (kakoune: normal) +Default keybinding: `a-;` (core: normal; helix: select) -### [`selections.changeOrder`](./selections.ts#L687-L701) +### [`selections.changeOrder`](./selections.ts#L688-L702) Reverse selections. @@ -1630,7 +1671,7 @@ Reverse selections. -### [`selections.sort`](./selections.ts#L714-L726) +### [`selections.sort`](./selections.ts#L715-L727) Sort selections. @@ -1641,25 +1682,25 @@ This command: -### [`selections.copy`](./selections.ts#L799-L817) +### [`selections.copy`](./selections.ts#L800-L818) Copy selections below. #### Variant -| Title | Identifier | Keybinding | Command | -| --------------------- | ------------ | ------------------------- | ----------------------------------------- | -| Copy selections above | `copy.above` | `s-a-c` (kakoune: normal) | `[".selections.copy", { direction: -1 }]` | +| 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` (kakoune: normal) +Default keybinding: `s-c` (core: normal; helix: select) -### [`selections.merge`](./selections.ts#L851-L856) +### [`selections.merge`](./selections.ts#L852-L857) Merge contiguous selections. @@ -1669,13 +1710,13 @@ Default keybinding: `a-_` (kakoune: normal) -### [`selections.open`](./selections.ts#L860-L863) +### [`selections.open`](./selections.ts#L861-L864) Open selected file. -### [`selections.toggleIndices`](./selections.ts#L876-L893) +### [`selections.toggleIndices`](./selections.ts#L877-L894) Toggle selection indices. @@ -1691,7 +1732,7 @@ This command: - takes an argument `display` of type `boolean | undefined`. - takes an argument `until` of type `AutoDisposable.Event[]`. -Default keybinding: `enter` (dance: normal) +Default keybinding: `enter` (core: normal; helix: select) ## [`selections.rotate`](./selections.rotate.ts) @@ -1718,38 +1759,41 @@ Default keybinding: `a-)` (kakoune: normal) -### [`selections.rotate.contents`](./selections.rotate.ts#L28-L37) +### [`selections.rotate.contents`](./selections.rotate.ts#L28-L39) 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 }]` | +| 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 `reverse` of type `boolean`. +Default keybinding: `a-)` (helix: normal; helix: select) + -### [`selections.rotate.selections`](./selections.rotate.ts#L45-L56) +### [`selections.rotate.selections`](./selections.rotate.ts#L47-L58) Rotate selections clockwise (selections only). The following keybinding is also available: -| Title | Identifier | Keybinding | Command | -| ----------------------------------------------------- | -------------------- | --------------------- | ------------------------------------------------------ | -| Rotate selections counter-clockwise (selections only) | `selections.reverse` | `(` (kakoune: normal) | `[".selections.rotate.selections", { reverse: true }]` | +| 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 `reverse` of type `boolean`. -Default keybinding: `)` (kakoune: normal) +Default keybinding: `)` (core: normal; helix: select) ## [`view`](./view.ts) @@ -1757,10 +1801,10 @@ Moving the editor view. #### Predefined keybindings -| Title | Keybinding | Command | -| ----------------------- | ----------------------- | ---------------------------------------------------- | -| Show view menu | `v` (kakoune: normal) | `[".openMenu", { menu: "view", ... }]` | -| Show view menu (locked) | `s-v` (kakoune: normal) | `[".openMenu", { menu: "view", locked: true, ... }]` | +| 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, ... }]` | diff --git a/src/commands/edit.ts b/src/commands/edit.ts index 8e76a36f..f41ce14e 100644 --- a/src/commands/edit.ts +++ b/src/commands/edit.ts @@ -25,7 +25,7 @@ declare module "./edit"; * * Specify `all` to paste all contents next to each selection. * - * @keys `s-a-r` (kakoune: normal) + * @keys `s-a-r` (kakoune: normal), `s-r` (helix: normal) * * #### Additional commands * @@ -34,17 +34,22 @@ declare module "./edit"; * | Pick register and replace | `selectRegister-insert` | `c-r` (kakoune: normal), `c-r` (kakoune: insert) | `[".selectRegister", { +register }], [".edit.insert", { ... }]` | * | Paste before | `paste.before` | | `[".edit.insert", { handleNewLine: true, where: "start", ... }]` | * | Paste after | `paste.after` | | `[".edit.insert", { handleNewLine: true, where: "end" , ... }]` | - * | Paste before and select | `paste.before.select` | `s-p` (kakoune: normal) | `[".edit.insert", { handleNewLine: true, where: "start", shift: "select", ... }]` | - * | Paste after and select | `paste.after.select` | `p` (kakoune: normal) | `[".edit.insert", { handleNewLine: true, where: "end" , shift: "select", ... }]` | + * | Paste 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` (kakoune: normal) | `[".edit.insert", { register: "_", ... }]` | + * | 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` (kakoune: normal), `d` (helix: select) | `[".selections.saveText", { +register }], [".edit.insert", { register: "_", ... }]` | - * | Copy, delete and switch to Insert | `yank-delete-insert` | `c` (kakoune: normal), `c` (helix: select) | `[".selections.saveText", { +register }], [".modes.set", { mode: "insert", +mode }], [".edit.insert", { register: "_", ... }]` | + * | Copy and 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"]` | */ export async function insert( _: Context, @@ -133,7 +138,7 @@ export async function insert( /** * Join lines. * - * @keys `a-j` (kakoune: normal) + * @keys `a-j` (kakoune: normal), `s-j` (helix: normal; helix: select) */ export function join(_: Context, separator?: Argument) { return joinLines(Selections.lines(), separator); @@ -142,7 +147,7 @@ export function join(_: Context, separator?: Argument) { /** * Join lines and select inserted separators. * - * @keys `s-a-j` (kakoune: normal) + * @keys `s-a-j` (core: normal; helix: select) */ export async function join_select(_: Context, separator?: Argument) { Selections.set(await joinLines(Selections.lines(), separator)); @@ -151,7 +156,10 @@ export async function join_select(_: Context, separator?: Argument) { /** * Indent selected lines. * - * @keys `>` (kakoune: normal) + * @keys `>` (core: normal) + * | Keybindings | Commands | + * | ----------- | -------- | + * | `>` (helix: select) | `[".edit.indent"], [".modes.set.normal"]` | */ export function indent(_: Context, repetitions: number) { return indentLines(Selections.lines(), repetitions, /* indentEmpty= */ false); @@ -178,7 +186,10 @@ export function deindent(_: Context, repetitions: number) { /** * Deindent selected lines (including incomplete indent). * - * @keys `<` (kakoune: normal) + * @keys `<` (core: normal) + * | Keybindings | Commands | + * | ----------- | -------- | + * | `<` (helix: select) | `[".edit.deindent"], [".modes.set.normal"]` | */ export function deindent_withIncomplete(_: Context, repetitions: number) { return deindentLines(Selections.lines(), repetitions, /* deindentIncomplete= */ true); @@ -187,7 +198,10 @@ export function deindent_withIncomplete(_: Context, repetitions: number) { /** * Transform to lower case. * - * @keys `` ` `` (kakoune: normal) + * @keys `` ` `` (core: normal) + * | Keybindings | Commands | + * | ----------- | -------- | + * | `` ` `` (helix: select) | `[".edit.case.toLower"], [".modes.set.normal"]` | */ export function case_toLower(_: Context) { return replace((text) => text.toLocaleLowerCase()); @@ -196,7 +210,10 @@ export function case_toLower(_: Context) { /** * Transform to upper case. * - * @keys `` s-` `` (kakoune: normal) + * @keys `` s-` `` (kakoune: normal), `` a-` `` (helix: normal) + * | Keybindings | Commands | + * | ----------- | -------- | + * | `` a-` `` (helix: select) | `[".edit.case.toUpper"], [".modes.set.normal"]` | */ export function case_toUpper(_: Context) { return replace((text) => text.toLocaleUpperCase()); @@ -205,7 +222,10 @@ export function case_toUpper(_: Context) { /** * Swap case. * - * @keys `` a-` `` (kakoune: normal) + * @keys `` a-` `` (kakoune: normal), `` s-` `` (helix: normal) + * | Keybindings | Commands | + * | ----------- | -------- | + * | `` s-` `` (helix: select) | `[".edit.case.swap"], [".modes.set.normal"]` | */ export function case_swap(_: Context) { return replace((text) => { @@ -225,7 +245,10 @@ export function case_swap(_: Context) { /** * Replace characters. * - * @keys `r` (kakoune: normal) + * @keys `r` (core: normal) + * | Keybindings | Commands | + * | ----------- | -------- | + * | `r` (helix: select) | `[".edit.replaceCharacters"], [".modes.set.normal"]` | */ export async function replaceCharacters( _: Context, @@ -280,7 +303,7 @@ export async function replaceCharacters( * Align selections, aligning the cursor of each selection by inserting spaces * before the first character of each selection. * - * @keys `&` (kakoune: normal) + * @keys `&` (core: normal) */ export function align(_: Context, fill: Argument = " ") { return edit((builder, selections) => { @@ -384,9 +407,9 @@ export function copyIndentation( * * #### Additional keybindings * - * | Title | Identifier | Keybinding | Commands | - * | ------------------------------------------ | ---------------------- | ----------------------- | --------------------------------------------------------------------------------- | - * | Insert new line above and switch to insert | `newLine.above.insert` | `s-o` (kakoune: normal) | `[".edit.newLine.above", { shift: "select" }], [".modes.insert.before", { ... }]` | + * | 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", { ... }]` | */ export function newLine_above( _: Context, @@ -422,9 +445,9 @@ export function newLine_above( * * #### Additional keybindings * - * | Title | Identifier | Keybinding | Commands | - * | ------------------------------------------ | ---------------------- | --------------------- | --------------------------------------------------------------------------------- | - * | Insert new line below and switch to insert | `newLine.below.insert` | `o` (kakoune: normal) | `[".edit.newLine.below", { shift: "select" }], [".modes.insert.before", { ... }]` | + * | 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", { ... }]` | */ export function newLine_below( _: Context, diff --git a/src/commands/history.ts b/src/commands/history.ts index 80a6742c..44499dff 100644 --- a/src/commands/history.ts +++ b/src/commands/history.ts @@ -15,7 +15,7 @@ declare module "./history"; /** * Undo. * - * @keys `u` (kakoune: normal), `u` (helix: select) + * @keys `u` (core: normal; helix: select) */ export function undo() { return vscode.commands.executeCommand("undo"); @@ -24,7 +24,7 @@ export function undo() { /** * Redo. * - * @keys `s-u` (kakoune: normal), `s-u` (helix: select) + * @keys `s-u` (core: normal; helix: select) */ export function redo() { return vscode.commands.executeCommand("redo"); @@ -53,10 +53,10 @@ export function redo_selections() { * * @noreplay * - * | 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 }]` | + * | 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 }]` | */ export async function repeat( _: Context, @@ -98,7 +98,7 @@ export async function repeat( /** * Repeat last edit without a command. * - * @keys `.` (kakoune: normal), `NumPad_Decimal` (kakoune: normal) + * @keys `.` (core: normal), `NumPad_Decimal` (core: normal) * @noreplay */ export async function repeat_edit(_: Context, repetitions: number) { diff --git a/src/commands/layouts/azerty.fr.md b/src/commands/layouts/azerty.fr.md index c94c53ba..1d5f48a5 100644 --- a/src/commands/layouts/azerty.fr.md +++ b/src/commands/layouts/azerty.fr.md @@ -12,16 +12,16 @@ devdev.copyLastErrorMessageCopies the last encountered error message dev.setSelectionBehaviorSet the selection behavior of the specified mode editedit.alignAlign selectionsShift+7 (editorTextFocus && dance.mode == 'normal') -edit.case.swapSwap caseAlt+` (editorTextFocus && dance.mode == 'normal') +edit.case.swapSwap caseAlt+` (editorTextFocus && dance.mode == 'normal')Shift+` (editorTextFocus && dance.mode == 'normal') edit.case.toLowerTransform to lower case` (editorTextFocus && dance.mode == 'normal') -edit.case.toUpperTransform to upper caseShift+` (editorTextFocus && dance.mode == 'normal') +edit.case.toUpperTransform to upper caseShift+` (editorTextFocus && dance.mode == 'normal')Alt+` (editorTextFocus && dance.mode == 'normal') edit.copyIndentationCopy indentationShift+Alt+7 (editorTextFocus && dance.mode == 'normal') edit.deindentDeindent selected linesShift+Alt+, (editorTextFocus && dance.mode == 'normal') edit.deindent.withIncompleteDeindent selected lines (including incomplete indent)Shift+, (editorTextFocus && dance.mode == 'normal') edit.deleteDeleteAlt+D (editorTextFocus && dance.mode == 'normal') edit.delete-insertDelete and switch to InsertAlt+C (editorTextFocus && dance.mode == 'normal') -edit.newLine.above.insertInsert new line above and switch to insertShift+O (editorTextFocus && dance.mode == 'normal') -edit.newLine.below.insertInsert new line below and switch to insertO (editorTextFocus && dance.mode == 'normal') +edit.newLine.above.insertInsert new line above and switch to insertShift+O (editorTextFocus && dance.mode == 'normal')Shift+O (editorTextFocus && dance.mode == 'select') +edit.newLine.below.insertInsert new line below and switch to insertO (editorTextFocus && dance.mode == 'normal')O (editorTextFocus && dance.mode == 'select') edit.paste.afterPaste after edit.paste.after.selectPaste after and selectP (editorTextFocus && dance.mode == 'normal') edit.paste.beforePaste before @@ -31,18 +31,18 @@ edit.pasteAll.beforePaste all before edit.pasteAll.before.selectPaste all before and selectShift+Alt+P (editorTextFocus && dance.mode == 'normal') edit.selectRegister-insertPick register and replaceCtrl+R (editorTextFocus && dance.mode == 'normal')Ctrl+R (editorTextFocus && dance.mode == 'insert') -edit.yank-deleteCopy and deleteD (editorTextFocus && dance.mode == 'normal')D (editorTextFocus && dance.mode == 'select') +edit.yank-deleteCopy and deleteD (editorTextFocus && dance.mode == 'normal') edit.yank-delete-insertCopy, delete and switch to InsertC (editorTextFocus && dance.mode == 'normal')C (editorTextFocus && dance.mode == 'select') edit.yank-replaceCopy and replaceShift+R (editorTextFocus && dance.mode == 'normal') edit.indentIndent selected linesShift+. (editorTextFocus && dance.mode == 'normal') edit.indent.withEmptyIndent selected lines (including empty lines)Shift+Alt+. (editorTextFocus && dance.mode == 'normal') -edit.insertInsert contents of registerShift+Alt+R (editorTextFocus && dance.mode == 'normal') -edit.joinJoin linesAlt+J (editorTextFocus && dance.mode == 'normal') -edit.join.selectJoin lines and select inserted separatorsShift+Alt+J (editorTextFocus && dance.mode == 'normal') +edit.insertInsert contents of registerShift+Alt+R (editorTextFocus && dance.mode == 'normal')Shift+R (editorTextFocus && dance.mode == 'normal') +edit.joinJoin linesAlt+J (editorTextFocus && dance.mode == 'normal')Shift+J (editorTextFocus && dance.mode == 'normal')Shift+J (editorTextFocus && dance.mode == 'select') +edit.join.selectJoin lines and select inserted separatorsShift+Alt+J (editorTextFocus && dance.mode == 'normal')Shift+Alt+J (editorTextFocus && dance.mode == 'select') edit.newLine.aboveInsert new line above each selectionShift+Alt+O (editorTextFocus && dance.mode == 'normal') edit.newLine.belowInsert new line below each selectionAlt+O (editorTextFocus && dance.mode == 'normal') edit.replaceCharactersReplace charactersR (editorTextFocus && dance.mode == 'normal') -historyhistory.repeat.seekRepeat last seekAlt+. (editorTextFocus && dance.mode == 'normal') +historyhistory.repeat.seekRepeat last seekAlt+. (editorTextFocus && dance.mode == 'normal')Alt+. (editorTextFocus && dance.mode == 'select') history.repeat.selectionRepeat last selection change history.recording.playReplay recordingQ (editorTextFocus && dance.mode == 'normal') history.recording.startStart recordingShift+Q (editorTextFocus && dance.mode == 'normal' && !dance.isRecording) @@ -64,70 +64,70 @@ selections are empty selectRegisterSelect register for next commandShift+' (editorTextFocus && dance.mode == 'normal') updateCountUpdate Dance count updateRegisterUpdate the contents of a register -modesmodes.insert.afterInsert afterA (editorTextFocus && dance.mode == 'normal') -modes.insert.beforeInsert beforeI (editorTextFocus && dance.mode == 'normal') -modes.insert.lineEndInsert at line endShift+A (editorTextFocus && dance.mode == 'normal') -modes.insert.lineStartInsert at line startShift+I (editorTextFocus && dance.mode == 'normal') +modesmodes.insert.afterInsert afterA (editorTextFocus && dance.mode == 'normal')A (editorTextFocus && dance.mode == 'select') +modes.insert.beforeInsert beforeI (editorTextFocus && dance.mode == 'normal')I (editorTextFocus && dance.mode == 'select') +modes.insert.lineEndInsert at line endShift+A (editorTextFocus && dance.mode == 'normal')Shift+A (editorTextFocus && dance.mode == 'select') +modes.insert.lineStartInsert at line startShift+I (editorTextFocus && dance.mode == 'normal')Shift+I (editorTextFocus && dance.mode == 'select') modes.set.insertSet mode to Insert -modes.set.normalSet mode to NormalEscape (editorTextFocus && dance.mode == 'insert')Escape (editorTextFocus && dance.mode == 'select') -modes.set.selectSet mode to Select +modes.set.normalSet mode to NormalEscape (editorTextFocus && dance.mode == 'insert')Escape (editorTextFocus && dance.mode == 'select')V (editorTextFocus && dance.mode == 'select') +modes.set.selectSet mode to SelectV (editorTextFocus && dance.mode == 'normal') modes.set.temporarily.insertTemporary Insert modeCtrl+V (editorTextFocus && dance.mode == 'normal') modes.set.temporarily.normalTemporary Normal modeCtrl+V (editorTextFocus && dance.mode == 'insert') modes.setSet Dance mode modes.set.temporarilySet Dance mode temporarily searchsearch.nextSelect next matchN (editorTextFocus && dance.mode == 'normal') search.searchSearch/ (editorTextFocus && dance.mode == 'normal')NumPad_Divide (editorTextFocus && dance.mode == 'normal') -search.backwardSearch backwardAlt+/ (editorTextFocus && dance.mode == 'normal') -search.backward.extendSearch backward (extend)Shift+Alt+/ (editorTextFocus && dance.mode == 'normal') -search.extendSearch (extend)Shift+/ (editorTextFocus && dance.mode == 'normal') -search.next.addAdd next matchShift+N (editorTextFocus && dance.mode == 'normal') -search.previousSelect previous matchAlt+N (editorTextFocus && dance.mode == 'normal') -search.previous.addAdd previous matchShift+Alt+N (editorTextFocus && dance.mode == 'normal') +search.backwardSearch backwardAlt+/ (editorTextFocus && dance.mode == 'normal')Shift+/ (editorTextFocus && dance.mode == 'normal') +search.backward.extendSearch backward (extend)Shift+Alt+/ (editorTextFocus && dance.mode == 'normal')Shift+/ (editorTextFocus && dance.mode == 'select') +search.extendSearch (extend)Shift+/ (editorTextFocus && dance.mode == 'normal')/ (editorTextFocus && dance.mode == 'select') +search.next.addAdd next matchShift+N (editorTextFocus && dance.mode == 'normal')N (editorTextFocus && dance.mode == 'select') +search.previousSelect previous matchAlt+N (editorTextFocus && dance.mode == 'normal')Shift+N (editorTextFocus && dance.mode == 'normal') +search.previous.addAdd previous matchShift+Alt+N (editorTextFocus && dance.mode == 'normal')Shift+N (editorTextFocus && dance.mode == 'select') search.selection.smartSearch current selection (smart)Shift+8 (editorTextFocus && dance.mode == 'normal')NumPad_Multiply (editorTextFocus && dance.mode == 'normal') search.selectionSearch current selectionShift+Alt+8 (editorTextFocus && dance.mode == 'normal')Alt+NumPad_Multiply (editorTextFocus && dance.mode == 'normal') seekseek.enclosingSelect to next enclosing characterM (editorTextFocus && dance.mode == 'normal') seek.leapLeap forward seek.objectSelect object seek.seekSelect to character (excluded)T (editorTextFocus && dance.mode == 'normal') -seek.askObjectSelect whole objectAlt+A (editorTextFocus && dance.mode == 'normal')Alt+A (editorTextFocus && dance.mode == 'insert') -seek.askObject.endSelect to whole object end] (editorTextFocus && dance.mode == 'normal') -seek.askObject.end.extendExtend to whole object endShift+] (editorTextFocus && dance.mode == 'normal') -seek.askObject.innerSelect inner objectAlt+I (editorTextFocus && dance.mode == 'normal')Alt+I (editorTextFocus && dance.mode == 'insert') -seek.askObject.inner.endSelect to inner object endAlt+] (editorTextFocus && dance.mode == 'normal') -seek.askObject.inner.end.extendExtend to inner object endShift+Alt+] (editorTextFocus && dance.mode == 'normal') -seek.askObject.inner.startSelect to inner object startAlt+[ (editorTextFocus && dance.mode == 'normal') -seek.askObject.inner.start.extendExtend to inner object startShift+Alt+[ (editorTextFocus && dance.mode == 'normal') -seek.askObject.startSelect to whole object start[ (editorTextFocus && dance.mode == 'normal') -seek.askObject.start.extendExtend to whole object startShift+[ (editorTextFocus && dance.mode == 'normal') -seek.backwardSelect to character (excluded, backward)Alt+T (editorTextFocus && dance.mode == 'normal') -seek.enclosing.backwardSelect to previous enclosing characterAlt+M (editorTextFocus && dance.mode == 'normal') -seek.enclosing.extendExtend to next enclosing characterShift+M (editorTextFocus && dance.mode == 'normal') -seek.enclosing.extend.backwardExtend to previous enclosing characterShift+Alt+M (editorTextFocus && dance.mode == 'normal') -seek.extendExtend to character (excluded)Shift+T (editorTextFocus && dance.mode == 'normal')T (editorTextFocus && dance.mode == 'select') -seek.extend.backwardExtend to character (excluded, backward)Shift+Alt+T (editorTextFocus && dance.mode == 'normal')Shift+T (editorTextFocus && dance.mode == 'select') -seek.includedSelect to character (included)F (editorTextFocus && dance.mode == 'normal') -seek.included.backwardSelect to character (included, backward)Alt+F (editorTextFocus && dance.mode == 'normal') -seek.included.extendExtend to character (included)Shift+F (editorTextFocus && dance.mode == 'normal')F (editorTextFocus && dance.mode == 'select') -seek.included.extend.backwardExtend to character (included, backward)Shift+Alt+F (editorTextFocus && dance.mode == 'normal')Shift+F (editorTextFocus && dance.mode == 'select') -seek.leap.backwardLeap backward -seek.syntax.child.experimentalSelect child syntax object -seek.syntax.next.experimentalSelect next syntax object -seek.syntax.parent.experimentalSelect parent syntax object -seek.syntax.previous.experimentalSelect previous syntax object -seek.word.backwardSelect to previous word startB (editorTextFocus && dance.mode == 'normal') -seek.word.extendExtend to next word startShift+W (editorTextFocus && dance.mode == 'normal')W (editorTextFocus && dance.mode == 'select') -seek.word.extend.backwardExtend to previous word startShift+B (editorTextFocus && dance.mode == 'normal')B (editorTextFocus && dance.mode == 'select') -seek.word.wsSelect to next non-whitespace word startAlt+W (editorTextFocus && dance.mode == 'normal') -seek.word.ws.backwardSelect to previous non-whitespace word startAlt+B (editorTextFocus && dance.mode == 'normal') -seek.word.ws.extendExtend to next non-whitespace word startShift+Alt+W (editorTextFocus && dance.mode == 'normal')Shift+W (editorTextFocus && dance.mode == 'select') -seek.word.ws.extend.backwardExtend to previous non-whitespace word startShift+Alt+B (editorTextFocus && dance.mode == 'normal')Shift+B (editorTextFocus && dance.mode == 'select') -seek.wordEndSelect to next word endE (editorTextFocus && dance.mode == 'normal') -seek.wordEnd.extendExtend to next word endShift+E (editorTextFocus && dance.mode == 'normal')E (editorTextFocus && dance.mode == 'select') -seek.wordEnd.wsSelect to next non-whitespace word endAlt+E (editorTextFocus && dance.mode == 'normal') -seek.wordEnd.ws.extendExtend to next non-whitespace word endShift+Alt+E (editorTextFocus && dance.mode == 'normal')Shift+E (editorTextFocus && dance.mode == 'select') +seek.askObjectSelect whole objectAlt+A (editorTextFocus && dance.mode == 'normal')Alt+A (editorTextFocus && dance.mode == 'insert') +seek.askObject.endSelect to whole object end] (editorTextFocus && dance.mode == 'normal') +seek.askObject.end.extendExtend to whole object endShift+] (editorTextFocus && dance.mode == 'normal') +seek.askObject.innerSelect inner objectAlt+I (editorTextFocus && dance.mode == 'normal')Alt+I (editorTextFocus && dance.mode == 'insert') +seek.askObject.inner.endSelect to inner object endAlt+] (editorTextFocus && dance.mode == 'normal') +seek.askObject.inner.end.extendExtend to inner object endShift+Alt+] (editorTextFocus && dance.mode == 'normal') +seek.askObject.inner.startSelect to inner object startAlt+[ (editorTextFocus && dance.mode == 'normal') +seek.askObject.inner.start.extendExtend to inner object startShift+Alt+[ (editorTextFocus && dance.mode == 'normal') +seek.askObject.startSelect to whole object start[ (editorTextFocus && dance.mode == 'normal') +seek.askObject.start.extendExtend to whole object startShift+[ (editorTextFocus && dance.mode == 'normal') +seek.backwardSelect to character (excluded, backward)Alt+T (editorTextFocus && dance.mode == 'normal')Shift+T (editorTextFocus && dance.mode == 'normal') +seek.enclosing.backwardSelect to previous enclosing characterAlt+M (editorTextFocus && dance.mode == 'normal') +seek.enclosing.extendExtend to next enclosing characterShift+M (editorTextFocus && dance.mode == 'normal') +seek.enclosing.extend.backwardExtend to previous enclosing characterShift+Alt+M (editorTextFocus && dance.mode == 'normal') +seek.extendExtend to character (excluded)Shift+T (editorTextFocus && dance.mode == 'normal')T (editorTextFocus && dance.mode == 'select') +seek.extend.backwardExtend to character (excluded, backward)Shift+Alt+T (editorTextFocus && dance.mode == 'normal')Shift+T (editorTextFocus && dance.mode == 'select') +seek.includedSelect to character (included)F (editorTextFocus && dance.mode == 'normal') +seek.included.backwardSelect to character (included, backward)Alt+F (editorTextFocus && dance.mode == 'normal')Shift+F (editorTextFocus && dance.mode == 'normal') +seek.included.extendExtend to character (included)Shift+F (editorTextFocus && dance.mode == 'normal')F (editorTextFocus && dance.mode == 'select') +seek.included.extend.backwardExtend to character (included, backward)Shift+Alt+F (editorTextFocus && dance.mode == 'normal')Shift+F (editorTextFocus && dance.mode == 'select') +seek.leap.backwardLeap backward +seek.syntax.child.experimentalSelect child syntax object +seek.syntax.next.experimentalSelect next syntax object +seek.syntax.parent.experimentalSelect parent syntax object +seek.syntax.previous.experimentalSelect previous syntax object +seek.word.backwardSelect to previous word startB (editorTextFocus && dance.mode == 'normal') +seek.word.extendExtend to next word startShift+W (editorTextFocus && dance.mode == 'normal')W (editorTextFocus && dance.mode == 'select') +seek.word.extend.backwardExtend to previous word startShift+B (editorTextFocus && dance.mode == 'normal')B (editorTextFocus && dance.mode == 'select') +seek.word.wsSelect to next non-whitespace word startAlt+W (editorTextFocus && dance.mode == 'normal')Shift+W (editorTextFocus && dance.mode == 'normal') +seek.word.ws.backwardSelect to previous non-whitespace word startAlt+B (editorTextFocus && dance.mode == 'normal')Shift+B (editorTextFocus && dance.mode == 'normal') +seek.word.ws.extendExtend to next non-whitespace word startShift+Alt+W (editorTextFocus && dance.mode == 'normal')Shift+W (editorTextFocus && dance.mode == 'select') +seek.word.ws.extend.backwardExtend to previous non-whitespace word startShift+Alt+B (editorTextFocus && dance.mode == 'normal')Shift+B (editorTextFocus && dance.mode == 'select') +seek.wordEndSelect to next word endE (editorTextFocus && dance.mode == 'normal') +seek.wordEnd.extendExtend to next word endShift+E (editorTextFocus && dance.mode == 'normal')E (editorTextFocus && dance.mode == 'select') +seek.wordEnd.wsSelect to next non-whitespace word endAlt+E (editorTextFocus && dance.mode == 'normal')Shift+E (editorTextFocus && dance.mode == 'normal') +seek.wordEnd.ws.extendExtend to next non-whitespace word endShift+Alt+E (editorTextFocus && dance.mode == 'normal')Shift+E (editorTextFocus && dance.mode == 'select') seek.syntax.experimentalSelect syntax object seek.wordSelect to next word startW (editorTextFocus && dance.mode == 'normal') -selectselect.bufferSelect whole bufferShift+5 (editorTextFocus && dance.mode == 'normal') +selectselect.bufferSelect whole bufferShift+5 (editorTextFocus && dance.mode == 'normal')Shift+5 (editorTextFocus && dance.mode == 'select') select.firstVisibleLineSelect to first visible line select.horizontallySelect horizontally select.lastLineSelect to last line @@ -135,82 +135,82 @@ selections are empty select.line.aboveSelect line above select.line.above.extendExtend to line above select.line.belowSelect line below -select.line.below.extendExtend to line below +select.line.below.extendExtend to line belowX (editorTextFocus && dance.mode == 'normal')X (editorTextFocus && dance.mode == 'select') select.lineEndSelect to line endAlt+L (editorTextFocus && dance.mode == 'normal')End (editorTextFocus && dance.mode == 'normal') select.lineStartSelect to line startAlt+H (editorTextFocus && dance.mode == 'normal')Home (editorTextFocus && dance.mode == 'normal') select.middleVisibleLineSelect to middle visible line -select.documentEnd.extendExtend to last character -select.documentEnd.jumpJump to last character +select.documentEnd.extendExtend to last character +select.documentEnd.jumpJump to last character select.down.extendExtend downShift+J (editorTextFocus && dance.mode == 'normal')Shift+Down (editorTextFocus && dance.mode == 'normal')J (editorTextFocus && dance.mode == 'select')Down (editorTextFocus && dance.mode == 'select') select.down.jumpJump downJ (editorTextFocus && dance.mode == 'normal')Down (editorTextFocus && dance.mode == 'normal') -select.firstLine.extendExtend to first line -select.firstLine.jumpJump to first line -select.firstVisibleLine.extendExtend to first visible line -select.firstVisibleLine.jumpJump to first visible line -select.lastLine.extendExtend to last line -select.lastLine.jumpJump to last line -select.lastVisibleLine.extendExtend to last visible line -select.lastVisibleLine.jumpJump to last visible line -select.left.extendExtend leftShift+H (editorTextFocus && dance.mode == 'normal')Shift+Left (editorTextFocus && dance.mode == 'normal')H (editorTextFocus && dance.mode == 'select')Left (editorTextFocus && dance.mode == 'select') -select.left.jumpJump leftH (editorTextFocus && dance.mode == 'normal')Left (editorTextFocus && dance.mode == 'normal') -select.lineEnd.extendExtend to line endShift+Alt+L (editorTextFocus && dance.mode == 'normal')Shift+End (editorTextFocus && dance.mode == 'normal') -select.lineStart.extendExtend to line startShift+Alt+H (editorTextFocus && dance.mode == 'normal')Shift+Home (editorTextFocus && dance.mode == 'normal') -select.lineStart.jumpJump to line start -select.lineStart.skipBlank.extendExtend to line start (skip blank) -select.lineStart.skipBlank.jumpJump to line start (skip blank) -select.middleVisibleLine.extendExtend to middle visible line -select.middleVisibleLine.jumpJump to middle visible line -select.right.extendExtend rightShift+L (editorTextFocus && dance.mode == 'normal')Shift+Right (editorTextFocus && dance.mode == 'normal')L (editorTextFocus && dance.mode == 'select')Right (editorTextFocus && dance.mode == 'select') -select.right.jumpJump rightL (editorTextFocus && dance.mode == 'normal')Right (editorTextFocus && dance.mode == 'normal') -select.to.extendExtend toShift+G (editorTextFocus && dance.mode == 'normal')G (editorTextFocus && dance.mode == 'select') -select.to.jumpGo toG (editorTextFocus && dance.mode == 'normal') +select.firstLine.extendExtend to first line +select.firstLine.jumpJump to first line +select.firstVisibleLine.extendExtend to first visible line +select.firstVisibleLine.jumpJump to first visible line +select.lastLine.extendExtend to last line +select.lastLine.jumpJump to last line +select.lastVisibleLine.extendExtend to last visible line +select.lastVisibleLine.jumpJump to last visible line +select.left.extendExtend leftShift+H (editorTextFocus && dance.mode == 'normal')Shift+Left (editorTextFocus && dance.mode == 'normal')H (editorTextFocus && dance.mode == 'select')Left (editorTextFocus && dance.mode == 'select') +select.left.jumpJump leftH (editorTextFocus && dance.mode == 'normal')Left (editorTextFocus && dance.mode == 'normal') +select.lineEnd.extendExtend to line endShift+Alt+L (editorTextFocus && dance.mode == 'normal')Shift+End (editorTextFocus && dance.mode == 'normal')End (editorTextFocus && dance.mode == 'select') +select.lineStart.extendExtend to line startShift+Alt+H (editorTextFocus && dance.mode == 'normal')Shift+Home (editorTextFocus && dance.mode == 'normal')Home (editorTextFocus && dance.mode == 'select') +select.lineStart.jumpJump to line start +select.lineStart.skipBlank.extendExtend to line start (skip blank) +select.lineStart.skipBlank.jumpJump to line start (skip blank) +select.middleVisibleLine.extendExtend to middle visible line +select.middleVisibleLine.jumpJump to middle visible line +select.right.extendExtend rightShift+L (editorTextFocus && dance.mode == 'normal')Shift+Right (editorTextFocus && dance.mode == 'normal')L (editorTextFocus && dance.mode == 'select')Right (editorTextFocus && dance.mode == 'select') +select.right.jumpJump rightL (editorTextFocus && dance.mode == 'normal')Right (editorTextFocus && dance.mode == 'normal') +select.to.extendExtend toShift+G (editorTextFocus && dance.mode == 'normal')G (editorTextFocus && dance.mode == 'select') +select.to.jumpGo toG (editorTextFocus && dance.mode == 'normal') select.up.extendExtend upShift+K (editorTextFocus && dance.mode == 'normal')Shift+Up (editorTextFocus && dance.mode == 'normal')K (editorTextFocus && dance.mode == 'select')Up (editorTextFocus && dance.mode == 'select') select.up.jumpJump upK (editorTextFocus && dance.mode == 'normal')Up (editorTextFocus && dance.mode == 'normal') select.toSelect to select.verticallySelect vertically -selectionsselections.changeDirectionChange direction of selectionsAlt+; (editorTextFocus && dance.mode == 'normal') +selectionsselections.changeDirectionChange direction of selectionsAlt+; (editorTextFocus && dance.mode == 'normal')Alt+; (editorTextFocus && dance.mode == 'select') selections.changeOrderReverse selections -selections.copyCopy selections belowShift+C (editorTextFocus && dance.mode == 'normal') -selections.expandToLinesExpand to linesX (editorTextFocus && dance.mode == 'normal') -selections.filterFilter selectionsShift+4 (editorTextFocus && dance.mode == 'normal') +selections.copyCopy selections belowShift+C (editorTextFocus && dance.mode == 'normal')Shift+C (editorTextFocus && dance.mode == 'select') +selections.expandToLinesExpand to linesX (editorTextFocus && dance.mode == 'normal')Shift+X (editorTextFocus && dance.mode == 'normal')Shift+X (editorTextFocus && dance.mode == 'select') +selections.filterFilter selectionsShift+4 (editorTextFocus && dance.mode == 'normal')Shift+4 (editorTextFocus && dance.mode == 'select') selections.mergeMerge contiguous selectionsShift+Alt+- (editorTextFocus && dance.mode == 'normal') selections.openOpen selected file -selections.pipePipe selectionsShift+Alt+\ (editorTextFocus && dance.mode == 'normal') -selections.reduceReduce selections to their cursor; (editorTextFocus && dance.mode == 'normal') +selections.pipePipe selectionsShift+Alt+\ (editorTextFocus && dance.mode == 'normal')Shift+Alt+\ (editorTextFocus && dance.mode == 'select') +selections.reduceReduce selections to their cursor; (editorTextFocus && dance.mode == 'normal'); (editorTextFocus && dance.mode == 'select') selections.restoreRestore selectionsZ (editorTextFocus && dance.mode == 'normal') selections.restore.withCurrentCombine register selections with current onesAlt+Z (editorTextFocus && dance.mode == 'normal') selections.saveSave selectionsShift+Z (editorTextFocus && dance.mode == 'normal') selections.saveTextCopy selections textY (editorTextFocus && dance.mode == 'normal') selections.selectSelect within selections -selections.clear.mainClear main selectionsAlt+, (editorTextFocus && dance.mode == 'normal') -selections.clear.secondaryClear secondary selections, (editorTextFocus && dance.mode == 'normal') -selections.copy.aboveCopy selections aboveShift+Alt+C (editorTextFocus && dance.mode == 'normal') -selections.faceBackwardBackward selections -selections.faceForwardForward selectionsShift+Alt+; (editorTextFocus && dance.mode == 'normal') -selections.filter.regexpKeep matching selectionsAlt+K (editorTextFocus && dance.mode == 'normal') -selections.filter.regexp.inverseClear matching selectionsShift+Alt+K (editorTextFocus && dance.mode == 'normal') -selections.hideIndicesHide selection indices -selections.orderAscendingOrder selections ascending -selections.orderDescendingOrder selections descending -selections.pipe.appendPipe and appendShift+1 (editorTextFocus && dance.mode == 'normal') -selections.pipe.prependPipe and prependShift+Alt+1 (editorTextFocus && dance.mode == 'normal') -selections.pipe.replacePipe and replaceShift+\ (editorTextFocus && dance.mode == 'normal') -selections.reduce.edgesReduce selections to their endsShift+Alt+S (editorTextFocus && dance.mode == 'normal') -selections.select.orLeapLeap or selectS (editorTextFocus && dance.mode == 'normal') -selections.showIndicesShow selection indices -selections.splitLines.orLeap.backwardLeap or select backwardAlt+S (editorTextFocus && dance.mode == 'normal') +selections.clear.mainClear main selectionsAlt+, (editorTextFocus && dance.mode == 'normal')Alt+, (editorTextFocus && dance.mode == 'select') +selections.clear.secondaryClear secondary selections, (editorTextFocus && dance.mode == 'normal'), (editorTextFocus && dance.mode == 'select') +selections.copy.aboveCopy selections aboveShift+Alt+C (editorTextFocus && dance.mode == 'normal')Shift+Alt+C (editorTextFocus && dance.mode == 'select') +selections.faceBackwardBackward selections +selections.faceForwardForward selectionsShift+Alt+; (editorTextFocus && dance.mode == 'normal') +selections.filter.regexpKeep matching selectionsAlt+K (editorTextFocus && dance.mode == 'normal')Alt+K (editorTextFocus && dance.mode == 'select') +selections.filter.regexp.inverseClear matching selectionsShift+Alt+K (editorTextFocus && dance.mode == 'normal')Shift+Alt+K (editorTextFocus && dance.mode == 'select') +selections.hideIndicesHide selection indices +selections.orderAscendingOrder selections ascending +selections.orderDescendingOrder selections descending +selections.pipe.appendPipe and appendShift+1 (editorTextFocus && dance.mode == 'normal')Shift+1 (editorTextFocus && dance.mode == 'select') +selections.pipe.prependPipe and prependShift+Alt+1 (editorTextFocus && dance.mode == 'normal')Shift+Alt+1 (editorTextFocus && dance.mode == 'select') +selections.pipe.replacePipe and replaceShift+\ (editorTextFocus && dance.mode == 'normal')Shift+\ (editorTextFocus && dance.mode == 'select') +selections.reduce.edgesReduce selections to their endsShift+Alt+S (editorTextFocus && dance.mode == 'normal') +selections.select.orLeapLeap or selectS (editorTextFocus && dance.mode == 'normal')S (editorTextFocus && dance.mode == 'select') +selections.showIndicesShow selection indices +selections.splitLines.orLeap.backwardLeap or select backwardAlt+S (editorTextFocus && dance.mode == 'normal')Alt+S (editorTextFocus && dance.mode == 'select') selections.sortSort selections -selections.splitSplit selectionsShift+S (editorTextFocus && dance.mode == 'normal') +selections.splitSplit selectionsShift+S (editorTextFocus && dance.mode == 'normal')Shift+S (editorTextFocus && dance.mode == 'select') selections.splitLinesSplit selections at line boundaries -selections.toggleIndicesToggle selection indicesEnter (editorTextFocus && dance.mode == 'normal') -selections.trimLinesTrim linesAlt+X (editorTextFocus && dance.mode == 'normal') -selections.trimWhitespaceTrim whitespaceShift+- (editorTextFocus && dance.mode == 'normal') +selections.toggleIndicesToggle selection indicesEnter (editorTextFocus && dance.mode == 'normal')Enter (editorTextFocus && dance.mode == 'select') +selections.trimLinesTrim linesAlt+X (editorTextFocus && dance.mode == 'normal')Alt+X (editorTextFocus && dance.mode == 'select') +selections.trimWhitespaceTrim whitespaceShift+- (editorTextFocus && dance.mode == 'normal')Shift+- (editorTextFocus && dance.mode == 'select') selections.rotateselections.rotate.bothRotate selections clockwiseShift+Alt+0 (editorTextFocus && dance.mode == 'normal') -selections.rotate.contentsRotate selections clockwise (contents only) -selections.rotate.selectionsRotate selections clockwise (selections only)Shift+0 (editorTextFocus && dance.mode == 'normal') +selections.rotate.contentsRotate selections clockwise (contents only)Shift+Alt+0 (editorTextFocus && dance.mode == 'normal')Shift+Alt+0 (editorTextFocus && dance.mode == 'select') +selections.rotate.selectionsRotate selections clockwise (selections only)Shift+0 (editorTextFocus && dance.mode == 'normal')Shift+0 (editorTextFocus && dance.mode == 'select') selections.rotate.both.reverseRotate selections counter-clockwiseShift+Alt+9 (editorTextFocus && dance.mode == 'normal') -selections.rotate.contents.reverseRotate selections counter-clockwise (contents only) -selections.rotate.selections.reverseRotate selections counter-clockwise (selections only)Shift+9 (editorTextFocus && dance.mode == 'normal') +selections.rotate.contents.reverseRotate selections counter-clockwise (contents only)Shift+Alt+9 (editorTextFocus && dance.mode == 'normal')Shift+Alt+9 (editorTextFocus && dance.mode == 'select') +selections.rotate.selections.reverseRotate selections counter-clockwise (selections only)Shift+9 (editorTextFocus && dance.mode == 'normal')Shift+9 (editorTextFocus && dance.mode == 'select') viewview.lineReveals a position based on the main cursor @@ -248,7 +248,7 @@ See https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc#changes -### [`edit.insert`](../edit.ts#L15-L61) +### [`edit.insert`](../edit.ts#L15-L66) Insert contents of register. @@ -270,17 +270,22 @@ Specify `all` to paste all contents next to each selection. | Pick register and replace | `selectRegister-insert` | `c-r` (kakoune: normal), `c-r` (kakoune: insert) | `[".selectRegister", { +register }], [".edit.insert", { ... }]` | | Paste before | `paste.before` | | `[".edit.insert", { handleNewLine: true, where: "start", ... }]` | | Paste after | `paste.after` | | `[".edit.insert", { handleNewLine: true, where: "end" , ... }]` | -| Paste before and select | `paste.before.select` | `s-p` (kakoune: normal) | `[".edit.insert", { handleNewLine: true, where: "start", shift: "select", ... }]` | -| Paste after and select | `paste.after.select` | `p` (kakoune: normal) | `[".edit.insert", { handleNewLine: true, where: "end" , shift: "select", ... }]` | +| Paste 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` (kakoune: normal) | `[".edit.insert", { register: "_", ... }]` | +| 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` (kakoune: normal), `d` (helix: select) | `[".selections.saveText", { +register }], [".edit.insert", { register: "_", ... }]` | -| Copy, delete and switch to Insert | `yank-delete-insert` | `c` (kakoune: normal), `c` (helix: select) | `[".selections.saveText", { +register }], [".modes.set", { mode: "insert", +mode }], [".edit.insert", { register: "_", ... }]` | +| Copy and 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`). @@ -293,10 +298,11 @@ This command: - takes an argument `where` of type `"active" | "anchor" | "start" | "end" | undefined`. Default keybinding: `s-a-r` (kakoune: normal) +`s-r` (helix: normal) -### [`edit.join`](../edit.ts#L133-L138) +### [`edit.join`](../edit.ts#L138-L143) Join lines. @@ -305,10 +311,11 @@ This command: - takes an argument `separator` of type `string`. Default keybinding: `a-j` (kakoune: normal) +`s-j` (helix: normal; helix: select) -### [`edit.join.select`](../edit.ts#L142-L147) +### [`edit.join.select`](../edit.ts#L147-L152) Join lines and select inserted separators. @@ -316,23 +323,26 @@ Join lines and select inserted separators. This command: - takes an argument `separator` of type `string`. -Default keybinding: `s-a-j` (kakoune: normal) +Default keybinding: `s-a-j` (core: normal; helix: select) -### [`edit.indent`](../edit.ts#L151-L156) +### [`edit.indent`](../edit.ts#L156-L164) 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: `>` (kakoune: normal) +Default keybinding: `>` (core: normal) -### [`edit.indent.withEmpty`](../edit.ts#L160-L165) +### [`edit.indent.withEmpty`](../edit.ts#L168-L173) Indent selected lines (including empty lines). @@ -344,7 +354,7 @@ Default keybinding: `a->` (kakoune: normal) -### [`edit.deindent`](../edit.ts#L169-L174) +### [`edit.deindent`](../edit.ts#L177-L182) Deindent selected lines. @@ -356,62 +366,79 @@ Default keybinding: `a-<` (kakoune: normal) -### [`edit.deindent.withIncomplete`](../edit.ts#L178-L183) +### [`edit.deindent.withIncomplete`](../edit.ts#L186-L194) 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: `<` (kakoune: normal) +Default keybinding: `<` (core: normal) -### [`edit.case.toLower`](../edit.ts#L187-L192) +### [`edit.case.toLower`](../edit.ts#L198-L206) Transform to lower case. +| Keybindings | Commands | +| ----------- | -------- | +| `` ` `` (helix: select) | `[".edit.case.toLower"], [".modes.set.normal"]` | -Default keybinding: `` ` `` (kakoune: normal) +Default keybinding: `` ` `` (core: normal) -### [`edit.case.toUpper`](../edit.ts#L196-L201) +### [`edit.case.toUpper`](../edit.ts#L210-L218) Transform to upper case. +| Keybindings | Commands | +| ----------- | -------- | +| `` a-` `` (helix: select) | `[".edit.case.toUpper"], [".modes.set.normal"]` | Default keybinding: `` s-` `` (kakoune: normal) +`` a-` `` (helix: normal) -### [`edit.case.swap`](../edit.ts#L205-L210) +### [`edit.case.swap`](../edit.ts#L222-L230) Swap case. +| Keybindings | Commands | +| ----------- | -------- | +| `` s-` `` (helix: select) | `[".edit.case.swap"], [".modes.set.normal"]` | Default keybinding: `` a-` `` (kakoune: normal) +`` s-` `` (helix: normal) -### [`edit.replaceCharacters`](../edit.ts#L225-L234) +### [`edit.replaceCharacters`](../edit.ts#L245-L257) 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 `input` of type `string`. -Default keybinding: `r` (kakoune: normal) +Default keybinding: `r` (core: normal) -### [`edit.align`](../edit.ts#L277-L285) +### [`edit.align`](../edit.ts#L300-L308) Align selections. @@ -422,11 +449,11 @@ before the first character of each selection. This command: - takes an argument `fill` of type `string`. -Default keybinding: `&` (kakoune: normal) +Default keybinding: `&` (core: normal) -### [`edit.copyIndentation`](../edit.ts#L335-L348) +### [`edit.copyIndentation`](../edit.ts#L358-L371) Copy indentation. @@ -441,7 +468,7 @@ Default keybinding: `a-&` (kakoune: normal) -### [`edit.newLine.above`](../edit.ts#L377-L395) +### [`edit.newLine.above`](../edit.ts#L400-L418) Insert new line above each selection. @@ -451,9 +478,9 @@ keep the current selections. #### Additional keybindings -| Title | Identifier | Keybinding | Commands | -| ------------------------------------------ | ---------------------- | ----------------------- | --------------------------------------------------------------------------------- | -| Insert new line above and switch to insert | `newLine.above.insert` | `s-o` (kakoune: normal) | `[".edit.newLine.above", { shift: "select" }], [".modes.insert.before", { ... }]` | +| 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. @@ -463,7 +490,7 @@ Default keybinding: `s-a-o` (kakoune: normal) -### [`edit.newLine.below`](../edit.ts#L415-L433) +### [`edit.newLine.below`](../edit.ts#L438-L456) Insert new line below each selection. @@ -473,9 +500,9 @@ keep the current selections. #### Additional keybindings -| Title | Identifier | Keybinding | Commands | -| ------------------------------------------ | ---------------------- | --------------------- | --------------------------------------------------------------------------------- | -| Insert new line below and switch to insert | `newLine.below.insert` | `o` (kakoune: normal) | `[".edit.newLine.below", { shift: "select" }], [".modes.insert.before", { ... }]` | +| 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. @@ -497,8 +524,7 @@ Undo. This command: - does not require an active text editor. -Default keybinding: `u` (kakoune: normal) -`u` (helix: select) +Default keybinding: `u` (core: normal; helix: select) @@ -510,8 +536,7 @@ Redo. This command: - does not require an active text editor. -Default keybinding: `s-u` (kakoune: normal) -`s-u` (helix: select) +Default keybinding: `s-u` (core: normal; helix: select) @@ -544,10 +569,10 @@ 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 }]` | +| 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. @@ -563,8 +588,8 @@ Repeat last edit without a command. This command: - may be repeated with a given number of repetitions. -Default keybinding: `.` (kakoune: normal) -`NumPad_Decimal` (kakoune: normal) +Default keybinding: `.` (core: normal) +`NumPad_Decimal` (core: normal) @@ -776,7 +801,7 @@ current document. This command: - takes an input `register` of type `string | Register`. -Default keybinding: `"` (kakoune: normal) +Default keybinding: `"` (core: normal) @@ -799,18 +824,18 @@ Update the current counter used to repeat the next command. #### Additional keybindings -| Title | Keybinding | Command | -| ------------------------------ | -------------------------------------------- | ------------------------------------ | -| Add the digit 0 to the counter | `0` (core: normal), `NumPad0` (core: normal) | `[".updateCount", { addDigits: 0 }]` | -| Add the digit 1 to the counter | `1` (core: normal), `NumPad1` (core: normal) | `[".updateCount", { addDigits: 1 }]` | -| Add the digit 2 to the counter | `2` (core: normal), `NumPad2` (core: normal) | `[".updateCount", { addDigits: 2 }]` | -| Add the digit 3 to the counter | `3` (core: normal), `NumPad3` (core: normal) | `[".updateCount", { addDigits: 3 }]` | -| Add the digit 4 to the counter | `4` (core: normal), `NumPad4` (core: normal) | `[".updateCount", { addDigits: 4 }]` | -| Add the digit 5 to the counter | `5` (core: normal), `NumPad5` (core: normal) | `[".updateCount", { addDigits: 5 }]` | -| Add the digit 6 to the counter | `6` (core: normal), `NumPad6` (core: normal) | `[".updateCount", { addDigits: 6 }]` | -| Add the digit 7 to the counter | `7` (core: normal), `NumPad7` (core: normal) | `[".updateCount", { addDigits: 7 }]` | -| Add the digit 8 to the counter | `8` (core: normal), `NumPad8` (core: normal) | `[".updateCount", { addDigits: 8 }]` | -| Add the digit 9 to the counter | `9` (core: normal), `NumPad9` (core: normal) | `[".updateCount", { addDigits: 9 }]` | +| 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: @@ -883,20 +908,20 @@ Set Dance mode. #### Variants -| Title | Identifier | Keybinding | Command | -| ------------------ | ------------ | ---------------------------------------------------- | ----------------------------------------------------------- | -| Set mode to Normal | `set.normal` | `escape` (kakoune: insert), `escape` (helix: select) | `[".modes.set", { mode: "normal" }], ["hideSuggestWidget"]` | -| Set mode to Insert | `set.insert` | | `[".modes.set", { mode: "insert" }]` | -| Set mode to Select | `set.select` | | `[".modes.set", { mode: "select" }]` | +| 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` (kakoune: normal) | `[".selections.faceBackward", { record: false }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "start", record: false, empty: true, ... }]` | -| Insert after | `insert.after` | `a` (kakoune: normal) | `[".selections.faceForward" , { record: false }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "end" , record: false, empty: true, ... }]` | -| Insert at line start | `insert.lineStart` | `s-i` (kakoune: normal) | `[".select.lineStart", { shift: "jump", skipBlank: true }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "start", record: false, empty: true, ... }]` | -| Insert at line end | `insert.lineEnd` | `s-a` (kakoune: normal) | `[".select.lineEnd" , { shift: "jump" }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "end" , record: false, empty: true, ... }]` | +| 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: @@ -931,11 +956,11 @@ Search for patterns and replace or add selections. Search. -| Title | Identifier | Keybinding | Command | -| ------------------------ | ----------------- | ----------------------- | ------------------------------------------------------ | -| Search (extend) | `extend` | `?` (kakoune: normal) | `[".search", { shift: "extend", ... }]` | -| Search backward | `backward` | `a-/` (kakoune: normal) | `[".search", { direction: -1 , ... }]` | -| Search backward (extend) | `backward.extend` | `a-?` (kakoune: normal) | `[".search", { direction: -1, shift: "extend", ... }]` | +| 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`). @@ -944,8 +969,8 @@ This command: - takes an argument `add` of type `boolean`. - takes an argument `interactive` of type `boolean`. -Default keybinding: `/` (kakoune: normal) -`NumPad_Divide` (kakoune: normal) +Default keybinding: `/` (core: normal) +`NumPad_Divide` (core: normal) @@ -954,16 +979,16 @@ Default keybinding: `/` (kakoune: normal) Search current selection. -| Title | Identifier | Keybinding | Command | -| -------------------------------- | ----------------- | ---------------------------------------------------------- | --------------------------------------------------- | -| Search current selection (smart) | `selection.smart` | `*` (kakoune: normal), `NumPad_Multiply` (kakoune: normal) | `[".search.selection", { smart: true, +register }]` | +| Title | Identifier | Keybinding | Command | +| -------------------------------- | ----------------- | ---------------------------------------------------- | --------------------------------------------------- | +| Search current selection (smart) | `selection.smart` | `*` (core: normal), `NumPad_Multiply` (core: normal) | `[".search.selection", { smart: true, +register }]` | This command: - accepts a register (by default, it uses `slash`). - takes an argument `smart` of type `boolean`. -Default keybinding: `a-*` (kakoune: normal) -`a-NumPad_Multiply` (kakoune: normal) +Default keybinding: `a-*` (core: normal) +`a-NumPad_Multiply` (core: normal) @@ -972,26 +997,33 @@ Default keybinding: `a-*` (kakoune: normal) Select next match. -| Title | Identifier | Keybinding | Command | -| --------------------- | -------------- | ------------------------- | ----------------------------------------------------- | -| Add next match | `next.add` | `s-n` (kakoune: normal) | `[".search.next", { add: true, ... }]` | -| Select previous match | `previous` | `a-n` (kakoune: normal) | `[".search.next", { direction: -1 , ... }]` | -| Add previous match | `previous.add` | `s-a-n` (kakoune: normal) | `[".search.next", { direction: -1, add: true, ... }]` | +| 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 `add` of type `boolean`. -Default keybinding: `n` (kakoune: normal) +Default keybinding: `n` (core: normal) ## [`seek`](../seek.ts) Update selections based on the text surrounding them. +#### Predefined keybindings + +| 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" }] }]` | + -### [`seek.seek`](../seek.ts#L16-L41) +### [`seek.seek`](../seek.ts#L23-L48) Select to character (excluded). @@ -1001,11 +1033,11 @@ Select to character (excluded). | Title | Identifier | Keybinding | Command | | ---------------------------------------- | -------------------------- | ------------------------------------------------ | ------------------------------------------------------------------- | | Extend to character (excluded) | `extend` | `s-t` (kakoune: normal), `t` (helix: select) | `[".seek", { shift: "extend" , ... }]` | -| Select to character (excluded, backward) | `backward` | `a-t` (kakoune: normal) | `[".seek", { direction: -1, ... }]` | +| 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` (kakoune: normal) | `[".seek", { include: true , ... }]` | +| 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) | `[".seek", { include: true, direction: -1, ... }]` | +| 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: @@ -1013,11 +1045,11 @@ This command: - takes an argument `include` of type `boolean`. - takes an input `input` of type `string`. -Default keybinding: `t` (kakoune: normal) +Default keybinding: `t` (core: normal) -### [`seek.enclosing`](../seek.ts#L81-L101) +### [`seek.enclosing`](../seek.ts#L88-L108) Select to next enclosing character. @@ -1038,7 +1070,7 @@ Default keybinding: `m` (kakoune: normal) -### [`seek.word`](../seek.ts#L174-L205) +### [`seek.word`](../seek.ts#L181-L212) Select to next word start. @@ -1050,15 +1082,15 @@ Select the word and following whitespaces on the right of the end of each select | Title | Identifier | Keybinding | Command | | -------------------------------------------- | ------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------- | | Extend to next word start | `word.extend` | `s-w` (kakoune: normal), `w` (helix: select) | `[".seek.word", { shift: "extend" , ... }]` | -| Select to previous word start | `word.backward` | `b` (kakoune: normal) | `[".seek.word", { direction: -1, ... }]` | +| 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) | `[".seek.word", { ws: true , ... }]` | +| 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) | `[".seek.word", { ws: true, direction: -1, ... }]` | +| 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` (kakoune: normal) | `[".seek.word", { stopAtEnd: true , ... }]` | +| 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) | `[".seek.word", { stopAtEnd: true , ws: true , ... }]` | +| 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: @@ -1066,11 +1098,11 @@ This command: - takes an argument `stopAtEnd` of type `boolean`. - takes an argument `ws` of type `boolean`. -Default keybinding: `w` (kakoune: normal) +Default keybinding: `w` (core: normal) -### [`seek.object`](../seek.ts#L249-L291) +### [`seek.object`](../seek.ts#L256-L298) Select object. @@ -1110,7 +1142,7 @@ This command: -### [`seek.syntax.experimental`](../seek.ts#L564-L583) +### [`seek.syntax.experimental`](../seek.ts#L571-L590) Select syntax object. @@ -1128,7 +1160,7 @@ This command: -### [`seek.leap`](../seek.ts#L617-L633) +### [`seek.leap`](../seek.ts#L624-L640) Leap forward. @@ -1155,32 +1187,36 @@ Select whole buffer. -Default keybinding: `%` (kakoune: normal) +Default keybinding: `%` (core: normal; helix: select) -### [`select.vertically`](../select.ts#L31-L64) +### [`select.vertically`](../select.ts#L31-L68) Select vertically. #### Variants -| Title | Identifier | Keybinding | Command | +| Title | Identifier | Keybinding | Command | | ----------- | ------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | -| Jump down | `down.jump` | `j` (kakoune: normal) , `down` (kakoune: normal) | `[".select.vertically", { direction: 1, shift: "jump" , ... }]` | +| 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` (kakoune: normal) , `up` (kakoune: normal) | `[".select.vertically", { direction: -1, shift: "jump" , ... }]` | +| 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` (kakoune: normal), `c-f` (kakoune: insert) | `[".select.vertically", { direction: 1, by: "page" , shift: "jump" }]` | -| `c-d` (kakoune: normal), `c-d` (kakoune: insert) | `[".select.vertically", { direction: 1, by: "halfPage", shift: "jump" }]` | -| `c-b` (kakoune: normal), `c-b` (kakoune: insert) | `[".select.vertically", { direction: -1, by: "page" , shift: "jump" }]` | -| `c-u` (kakoune: normal), `c-u` (kakoune: insert) | `[".select.vertically", { direction: -1, by: "halfPage", shift: "jump" }]` | +| 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. @@ -1189,7 +1225,7 @@ This command: -### [`select.horizontally`](../select.ts#L217-L239) +### [`select.horizontally`](../select.ts#L221-L243) Select horizontally. @@ -1198,9 +1234,9 @@ Select horizontally. | Title | Identifier | Keybinding | Command | | ------------ | -------------- | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | -| Jump right | `right.jump` | `l` (kakoune: normal) , `right` (kakoune: normal) | `[".select.horizontally", { direction: 1, shift: "jump" , ... }]` | +| 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` (kakoune: normal) , `left` (kakoune: normal) | `[".select.horizontally", { direction: -1, shift: "jump" , ... }]` | +| 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: @@ -1209,7 +1245,7 @@ This command: -### [`select.to`](../select.ts#L286-L304) +### [`select.to`](../select.ts#L290-L308) Select to. @@ -1220,7 +1256,7 @@ line. If no count is specified, this command will shift open the `goto` menu. | Title | Identifier | Keybinding | Command | | --------- | ----------- | -------------------------------------------- | ------------------------------------------ | -| Go to | `to.jump` | `g` (kakoune: normal) | `[".select.to", { shift: "jump" , ... }]` | +| 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: @@ -1229,7 +1265,7 @@ This command: -### [`select.line.below`](../select.ts#L314-L317) +### [`select.line.below`](../select.ts#L318-L321) Select line below. @@ -1238,16 +1274,19 @@ This command: -### [`select.line.below.extend`](../select.ts#L342-L345) +### [`select.line.below.extend`](../select.ts#L346-L351) 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`](../select.ts#L372-L375) +### [`select.line.above`](../select.ts#L378-L381) Select line above. @@ -1256,7 +1295,7 @@ This command: -### [`select.line.above.extend`](../select.ts#L399-L402) +### [`select.line.above.extend`](../select.ts#L405-L408) Extend to line above. @@ -1265,32 +1304,32 @@ This command: -### [`select.lineStart`](../select.ts#L448-L470) +### [`select.lineStart`](../select.ts#L454-L476) Select to line start. #### Variants -| Title | Identifier | Keybinding | Command | -| -------------------- | ------------------ | ----------------------------------------------------- | ------------------------------------------------------------------ | -| Jump to line start | `lineStart.jump` | | `[".select.lineStart", { shift: "jump" , ... }]` | -| Extend to line start | `lineStart.extend` | `s-a-h` (kakoune: normal), `s-home` (kakoune: normal) | `[".select.lineStart", { shift: "extend", ... }]` | -| Jump to line start (skip blank) | `lineStart.skipBlank.jump` | | `[".select.lineStart", { skipBlank: true, shift: "jump" , ... }]` | -| Extend to line start (skip blank) | `lineStart.skipBlank.extend` | | `[".select.lineStart", { skipBlank: true, shift: "extend", ... }]` | -| Jump to first line | `firstLine.jump` | | `[".select.lineStart", { count: 0, shift: "jump" , ... }]` | -| Extend to first line | `firstLine.extend` | | `[".select.lineStart", { count: 0, shift: "extend", ... }]` | +| 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 `skipBlank` of type `boolean`. Default keybinding: `a-h` (kakoune: normal) -`home` (kakoune: normal) +`home` (core: normal) -### [`select.lineEnd`](../select.ts#L495-L517) +### [`select.lineEnd`](../select.ts#L501-L523) Select to line end. @@ -1298,22 +1337,22 @@ Select to line end. #### Variants -| 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", ... }]` | +| 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 `lineBreak` of type `boolean`. Default keybinding: `a-l` (kakoune: normal) -`end` (kakoune: normal) +`end` (core: normal) -### [`select.lastLine`](../select.ts#L545-L555) +### [`select.lastLine`](../select.ts#L551-L561) Select to last line. @@ -1326,7 +1365,7 @@ Select to last line. -### [`select.firstVisibleLine`](../select.ts#L566-L576) +### [`select.firstVisibleLine`](../select.ts#L572-L582) Select to first visible line. @@ -1339,7 +1378,7 @@ Select to first visible line. -### [`select.middleVisibleLine`](../select.ts#L583-L593) +### [`select.middleVisibleLine`](../select.ts#L589-L599) Select to middle visible line. @@ -1352,7 +1391,7 @@ Select to middle visible line. -### [`select.lastVisibleLine`](../select.ts#L600-L610) +### [`select.lastVisibleLine`](../select.ts#L606-L616) Select to last visible line. @@ -1369,19 +1408,22 @@ Interacting with selections. -### [`selections.saveText`](../selections.ts#L21-L30) +### [`selections.saveText`](../selections.ts#L21-L33) 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` (kakoune: normal) +Default keybinding: `y` (core: normal) -### [`selections.save`](../selections.ts#L34-L48) +### [`selections.save`](../selections.ts#L37-L51) Save selections. @@ -1396,7 +1438,7 @@ Default keybinding: `s-z` (kakoune: normal) -### [`selections.restore`](../selections.ts#L95-L103) +### [`selections.restore`](../selections.ts#L98-L106) Restore selections. @@ -1408,7 +1450,7 @@ Default keybinding: `z` (kakoune: normal) -### [`selections.restore.withCurrent`](../selections.ts#L115-L135) +### [`selections.restore.withCurrent`](../selections.ts#L118-L138) Combine register selections with current ones. @@ -1430,45 +1472,43 @@ Default keybinding: `a-z` (kakoune: normal) -### [`selections.pipe`](../selections.ts#L241-L263) +### [`selections.pipe`](../selections.ts#L244-L265) Pipe selections. Run the specified command or code with the contents of each selection, and save the result to a register. - See https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc#changes-through-external-programs #### Additional commands -| 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", ... }]` | +| 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 `expression` of type `string`. -Default keybinding: `a-|` (kakoune: normal) +Default keybinding: `a-|` (core: normal; helix: select) -### [`selections.filter`](../selections.ts#L291-L313) +### [`selections.filter`](../selections.ts#L293-L314) Filter selections. - #### Variants -| Title | Identifier | Keybinding | Commands | -| -------------------------- | ----------------------- | --------------------------| ------------------------------------------------------------------------ | -| Keep matching selections | `filter.regexp` | `a-k` (kakoune: normal) | `[".selections.filter", { defaultExpression: "/" , ... }]` | -| Clear matching selections | `filter.regexp.inverse` | `s-a-k` (kakoune: normal) | `[".selections.filter", { defaultExpression: "/", inverse: true, ... }]` | -| Clear secondary selections | `clear.secondary` | `,` (kakoune: normal) | `[".selections.filter", { expression: "i === count" , ... }]` | -| Clear main selections | `clear.main` | `a-,` (kakoune: normal) | `[".selections.filter", { expression: "i !== count" , ... }]` | +| 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, ... }]` | +| Clear secondary selections | `clear.secondary` | `,` (core: normal; helix: select) | `[".selections.filter", { expression: "i === count" , ... }]` | +| Clear main selections | `clear.main` | `a-,` (core: normal; helix: select) | `[".selections.filter", { expression: "i !== count" , ... }]` | This command: - accepts an argument of type `{ expression?: string }`. @@ -1477,19 +1517,19 @@ This command: - takes an argument `interactive` of type `boolean`. - takes an argument `inverse` of type `boolean`. -Default keybinding: `$` (kakoune: normal) +Default keybinding: `$` (core: normal; helix: select) -### [`selections.select`](../selections.ts#L346-L360) +### [`selections.select`](../selections.ts#L347-L361) Select within selections. #### Variants -| Title | Identifier | Keybinding | Command | -| -------------- | --------------- | --------------------- | ------------------------------------------------------------------------------------------------- | -| Leap or select | `select.orLeap` | `s` (kakoune: normal) | `[".ifEmpty", { then: [[".seek.leap", { ... }]], otherwise: [[".selections.select", { ... }]] }]` | +| Title | Identifier | Keybinding | Command | +| -------------- | --------------- | --------------------------------- | ------------------------------------------------------------------------------------------------- | +| Leap or select | `select.orLeap` | `s` (core: normal; helix: select) | `[".ifEmpty", { then: [[".seek.leap", { ... }]], otherwise: [[".selections.select", { ... }]] }]` | This command: - accepts an argument of type `{ re?: string | RegExp }`. @@ -1497,7 +1537,7 @@ This command: -### [`selections.split`](../selections.ts#L379-L390) +### [`selections.split`](../selections.ts#L380-L391) Split selections. @@ -1507,19 +1547,19 @@ This command: - takes an argument `excludeEmpty` of type `boolean`. - takes an argument `interactive` of type `boolean`. -Default keybinding: `s-s` (kakoune: normal) +Default keybinding: `s-s` (core: normal; helix: select) -### [`selections.splitLines`](../selections.ts#L415-L431) +### [`selections.splitLines`](../selections.ts#L416-L432) Split selections at line boundaries. #### Variants -| Title | Identifier | Keybinding | Command | -| ----------------------- | ---------------------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------- | -| Leap or select backward | `splitLines.orLeap.backward` | `a-s` (kakoune: normal) | `[".ifEmpty", { then: [[".seek.leap", { direction: -1, ... }]], otherwise: [[".selections.splitLines", { ... }]] }]` | +| 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. @@ -1527,7 +1567,7 @@ This command: -### [`selections.expandToLines`](../selections.ts#L474-L481) +### [`selections.expandToLines`](../selections.ts#L475-L482) Expand to lines. @@ -1536,10 +1576,11 @@ Expand selections to contain full lines (including end-of-line characters). Default keybinding: `x` (kakoune: normal) +`s-x` (helix: normal; helix: select) -### [`selections.trimLines`](../selections.ts#L508-L515) +### [`selections.trimLines`](../selections.ts#L509-L516) Trim lines. @@ -1547,11 +1588,11 @@ Trim selections to only contain full lines (from start to line break). -Default keybinding: `a-x` (kakoune: normal) +Default keybinding: `a-x` (core: normal; helix: select) -### [`selections.trimWhitespace`](../selections.ts#L540-L547) +### [`selections.trimWhitespace`](../selections.ts#L541-L548) Trim whitespace. @@ -1559,11 +1600,11 @@ Trim whitespace at beginning and end of selections. -Default keybinding: `_` (kakoune: normal) +Default keybinding: `_` (core: normal; helix: select) -### [`selections.reduce`](../selections.ts#L566-L585) +### [`selections.reduce`](../selections.ts#L567-L586) Reduce selections to their cursor. @@ -1579,11 +1620,11 @@ This command: - takes an argument `empty` of type `boolean`. - takes an argument `where` of type `"active" | "anchor" | "start" | "end" | "both"`. -Default keybinding: `;` (kakoune: normal) +Default keybinding: `;` (core: normal; helix: select) -### [`selections.changeDirection`](../selections.ts#L647-L662) +### [`selections.changeDirection`](../selections.ts#L648-L663) Change direction of selections. @@ -1597,11 +1638,11 @@ Change direction of selections. | Backward selections | `faceBackward` | | `[".selections.changeDirection", { direction: -1 }]` | -Default keybinding: `a-;` (kakoune: normal) +Default keybinding: `a-;` (core: normal; helix: select) -### [`selections.changeOrder`](../selections.ts#L687-L701) +### [`selections.changeOrder`](../selections.ts#L688-L702) Reverse selections. @@ -1615,7 +1656,7 @@ Reverse selections. -### [`selections.sort`](../selections.ts#L714-L726) +### [`selections.sort`](../selections.ts#L715-L727) Sort selections. @@ -1626,25 +1667,25 @@ This command: -### [`selections.copy`](../selections.ts#L799-L817) +### [`selections.copy`](../selections.ts#L800-L818) Copy selections below. #### Variant -| Title | Identifier | Keybinding | Command | -| --------------------- | ------------ | ------------------------- | ----------------------------------------- | -| Copy selections above | `copy.above` | `s-a-c` (kakoune: normal) | `[".selections.copy", { direction: -1 }]` | +| 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` (kakoune: normal) +Default keybinding: `s-c` (core: normal; helix: select) -### [`selections.merge`](../selections.ts#L851-L856) +### [`selections.merge`](../selections.ts#L852-L857) Merge contiguous selections. @@ -1654,13 +1695,13 @@ Default keybinding: `a-_` (kakoune: normal) -### [`selections.open`](../selections.ts#L860-L863) +### [`selections.open`](../selections.ts#L861-L864) Open selected file. -### [`selections.toggleIndices`](../selections.ts#L876-L893) +### [`selections.toggleIndices`](../selections.ts#L877-L894) Toggle selection indices. @@ -1676,7 +1717,7 @@ This command: - takes an argument `display` of type `boolean | undefined`. - takes an argument `until` of type `AutoDisposable.Event[]`. -Default keybinding: `enter` (dance: normal) +Default keybinding: `enter` (core: normal; helix: select) ## [`selections.rotate`](../selections.rotate.ts) @@ -1703,38 +1744,41 @@ Default keybinding: `a-)` (kakoune: normal) -### [`selections.rotate.contents`](../selections.rotate.ts#L28-L37) +### [`selections.rotate.contents`](../selections.rotate.ts#L28-L39) 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 }]` | +| 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 `reverse` of type `boolean`. +Default keybinding: `a-)` (helix: normal; helix: select) + -### [`selections.rotate.selections`](../selections.rotate.ts#L45-L56) +### [`selections.rotate.selections`](../selections.rotate.ts#L47-L58) Rotate selections clockwise (selections only). The following keybinding is also available: -| Title | Identifier | Keybinding | Command | -| ----------------------------------------------------- | -------------------- | --------------------- | ------------------------------------------------------ | -| Rotate selections counter-clockwise (selections only) | `selections.reverse` | `(` (kakoune: normal) | `[".selections.rotate.selections", { reverse: true }]` | +| 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 `reverse` of type `boolean`. -Default keybinding: `)` (kakoune: normal) +Default keybinding: `)` (core: normal; helix: select) ## [`view`](../view.ts) @@ -1742,10 +1786,10 @@ Moving the editor view. #### Predefined keybindings -| Title | Keybinding | Command | -| ----------------------- | ----------------------- | ---------------------------------------------------- | -| Show view menu | `v` (kakoune: normal) | `[".openMenu", { menu: "view", ... }]` | -| Show view menu (locked) | `s-v` (kakoune: normal) | `[".openMenu", { menu: "view", locked: true, ... }]` | +| 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, ... }]` | diff --git a/src/commands/layouts/qwerty.md b/src/commands/layouts/qwerty.md index 1c5830ea..c6d3dc77 100644 --- a/src/commands/layouts/qwerty.md +++ b/src/commands/layouts/qwerty.md @@ -12,16 +12,16 @@ devdev.copyLastErrorMessageCopies the last encountered error message dev.setSelectionBehaviorSet the selection behavior of the specified mode editedit.alignAlign selectionsShift+7 (editorTextFocus && dance.mode == 'normal') -edit.case.swapSwap caseAlt+` (editorTextFocus && dance.mode == 'normal') +edit.case.swapSwap caseAlt+` (editorTextFocus && dance.mode == 'normal')Shift+` (editorTextFocus && dance.mode == 'normal') edit.case.toLowerTransform to lower case` (editorTextFocus && dance.mode == 'normal') -edit.case.toUpperTransform to upper caseShift+` (editorTextFocus && dance.mode == 'normal') +edit.case.toUpperTransform to upper caseShift+` (editorTextFocus && dance.mode == 'normal')Alt+` (editorTextFocus && dance.mode == 'normal') edit.copyIndentationCopy indentationShift+Alt+7 (editorTextFocus && dance.mode == 'normal') edit.deindentDeindent selected linesShift+Alt+, (editorTextFocus && dance.mode == 'normal') edit.deindent.withIncompleteDeindent selected lines (including incomplete indent)Shift+, (editorTextFocus && dance.mode == 'normal') edit.deleteDeleteAlt+D (editorTextFocus && dance.mode == 'normal') edit.delete-insertDelete and switch to InsertAlt+C (editorTextFocus && dance.mode == 'normal') -edit.newLine.above.insertInsert new line above and switch to insertShift+O (editorTextFocus && dance.mode == 'normal') -edit.newLine.below.insertInsert new line below and switch to insertO (editorTextFocus && dance.mode == 'normal') +edit.newLine.above.insertInsert new line above and switch to insertShift+O (editorTextFocus && dance.mode == 'normal')Shift+O (editorTextFocus && dance.mode == 'select') +edit.newLine.below.insertInsert new line below and switch to insertO (editorTextFocus && dance.mode == 'normal')O (editorTextFocus && dance.mode == 'select') edit.paste.afterPaste after edit.paste.after.selectPaste after and selectP (editorTextFocus && dance.mode == 'normal') edit.paste.beforePaste before @@ -31,18 +31,18 @@ edit.pasteAll.beforePaste all before edit.pasteAll.before.selectPaste all before and selectShift+Alt+P (editorTextFocus && dance.mode == 'normal') edit.selectRegister-insertPick register and replaceCtrl+R (editorTextFocus && dance.mode == 'normal')Ctrl+R (editorTextFocus && dance.mode == 'insert') -edit.yank-deleteCopy and deleteD (editorTextFocus && dance.mode == 'normal')D (editorTextFocus && dance.mode == 'select') +edit.yank-deleteCopy and deleteD (editorTextFocus && dance.mode == 'normal') edit.yank-delete-insertCopy, delete and switch to InsertC (editorTextFocus && dance.mode == 'normal')C (editorTextFocus && dance.mode == 'select') edit.yank-replaceCopy and replaceShift+R (editorTextFocus && dance.mode == 'normal') edit.indentIndent selected linesShift+. (editorTextFocus && dance.mode == 'normal') edit.indent.withEmptyIndent selected lines (including empty lines)Shift+Alt+. (editorTextFocus && dance.mode == 'normal') -edit.insertInsert contents of registerShift+Alt+R (editorTextFocus && dance.mode == 'normal') -edit.joinJoin linesAlt+J (editorTextFocus && dance.mode == 'normal') -edit.join.selectJoin lines and select inserted separatorsShift+Alt+J (editorTextFocus && dance.mode == 'normal') +edit.insertInsert contents of registerShift+Alt+R (editorTextFocus && dance.mode == 'normal')Shift+R (editorTextFocus && dance.mode == 'normal') +edit.joinJoin linesAlt+J (editorTextFocus && dance.mode == 'normal')Shift+J (editorTextFocus && dance.mode == 'normal')Shift+J (editorTextFocus && dance.mode == 'select') +edit.join.selectJoin lines and select inserted separatorsShift+Alt+J (editorTextFocus && dance.mode == 'normal')Shift+Alt+J (editorTextFocus && dance.mode == 'select') edit.newLine.aboveInsert new line above each selectionShift+Alt+O (editorTextFocus && dance.mode == 'normal') edit.newLine.belowInsert new line below each selectionAlt+O (editorTextFocus && dance.mode == 'normal') edit.replaceCharactersReplace charactersR (editorTextFocus && dance.mode == 'normal') -historyhistory.repeat.seekRepeat last seekAlt+. (editorTextFocus && dance.mode == 'normal') +historyhistory.repeat.seekRepeat last seekAlt+. (editorTextFocus && dance.mode == 'normal')Alt+. (editorTextFocus && dance.mode == 'select') history.repeat.selectionRepeat last selection change history.recording.playReplay recordingQ (editorTextFocus && dance.mode == 'normal') history.recording.startStart recordingShift+Q (editorTextFocus && dance.mode == 'normal' && !dance.isRecording) @@ -64,70 +64,70 @@ selections are empty selectRegisterSelect register for next commandShift+' (editorTextFocus && dance.mode == 'normal') updateCountUpdate Dance count updateRegisterUpdate the contents of a register -modesmodes.insert.afterInsert afterA (editorTextFocus && dance.mode == 'normal') -modes.insert.beforeInsert beforeI (editorTextFocus && dance.mode == 'normal') -modes.insert.lineEndInsert at line endShift+A (editorTextFocus && dance.mode == 'normal') -modes.insert.lineStartInsert at line startShift+I (editorTextFocus && dance.mode == 'normal') +modesmodes.insert.afterInsert afterA (editorTextFocus && dance.mode == 'normal')A (editorTextFocus && dance.mode == 'select') +modes.insert.beforeInsert beforeI (editorTextFocus && dance.mode == 'normal')I (editorTextFocus && dance.mode == 'select') +modes.insert.lineEndInsert at line endShift+A (editorTextFocus && dance.mode == 'normal')Shift+A (editorTextFocus && dance.mode == 'select') +modes.insert.lineStartInsert at line startShift+I (editorTextFocus && dance.mode == 'normal')Shift+I (editorTextFocus && dance.mode == 'select') modes.set.insertSet mode to Insert -modes.set.normalSet mode to NormalEscape (editorTextFocus && dance.mode == 'insert')Escape (editorTextFocus && dance.mode == 'select') -modes.set.selectSet mode to Select +modes.set.normalSet mode to NormalEscape (editorTextFocus && dance.mode == 'insert')Escape (editorTextFocus && dance.mode == 'select')V (editorTextFocus && dance.mode == 'select') +modes.set.selectSet mode to SelectV (editorTextFocus && dance.mode == 'normal') modes.set.temporarily.insertTemporary Insert modeCtrl+V (editorTextFocus && dance.mode == 'normal') modes.set.temporarily.normalTemporary Normal modeCtrl+V (editorTextFocus && dance.mode == 'insert') modes.setSet Dance mode modes.set.temporarilySet Dance mode temporarily searchsearch.nextSelect next matchN (editorTextFocus && dance.mode == 'normal') search.searchSearch/ (editorTextFocus && dance.mode == 'normal')NumPad_Divide (editorTextFocus && dance.mode == 'normal') -search.backwardSearch backwardAlt+/ (editorTextFocus && dance.mode == 'normal') -search.backward.extendSearch backward (extend)Shift+Alt+/ (editorTextFocus && dance.mode == 'normal') -search.extendSearch (extend)Shift+/ (editorTextFocus && dance.mode == 'normal') -search.next.addAdd next matchShift+N (editorTextFocus && dance.mode == 'normal') -search.previousSelect previous matchAlt+N (editorTextFocus && dance.mode == 'normal') -search.previous.addAdd previous matchShift+Alt+N (editorTextFocus && dance.mode == 'normal') +search.backwardSearch backwardAlt+/ (editorTextFocus && dance.mode == 'normal')Shift+/ (editorTextFocus && dance.mode == 'normal') +search.backward.extendSearch backward (extend)Shift+Alt+/ (editorTextFocus && dance.mode == 'normal')Shift+/ (editorTextFocus && dance.mode == 'select') +search.extendSearch (extend)Shift+/ (editorTextFocus && dance.mode == 'normal')/ (editorTextFocus && dance.mode == 'select') +search.next.addAdd next matchShift+N (editorTextFocus && dance.mode == 'normal')N (editorTextFocus && dance.mode == 'select') +search.previousSelect previous matchAlt+N (editorTextFocus && dance.mode == 'normal')Shift+N (editorTextFocus && dance.mode == 'normal') +search.previous.addAdd previous matchShift+Alt+N (editorTextFocus && dance.mode == 'normal')Shift+N (editorTextFocus && dance.mode == 'select') search.selection.smartSearch current selection (smart)Shift+8 (editorTextFocus && dance.mode == 'normal')NumPad_Multiply (editorTextFocus && dance.mode == 'normal') search.selectionSearch current selectionShift+Alt+8 (editorTextFocus && dance.mode == 'normal')Alt+NumPad_Multiply (editorTextFocus && dance.mode == 'normal') seekseek.enclosingSelect to next enclosing characterM (editorTextFocus && dance.mode == 'normal') seek.leapLeap forward seek.objectSelect object seek.seekSelect to character (excluded)T (editorTextFocus && dance.mode == 'normal') -seek.askObjectSelect whole objectAlt+A (editorTextFocus && dance.mode == 'normal')Alt+A (editorTextFocus && dance.mode == 'insert') -seek.askObject.endSelect to whole object end] (editorTextFocus && dance.mode == 'normal') -seek.askObject.end.extendExtend to whole object endShift+] (editorTextFocus && dance.mode == 'normal') -seek.askObject.innerSelect inner objectAlt+I (editorTextFocus && dance.mode == 'normal')Alt+I (editorTextFocus && dance.mode == 'insert') -seek.askObject.inner.endSelect to inner object endAlt+] (editorTextFocus && dance.mode == 'normal') -seek.askObject.inner.end.extendExtend to inner object endShift+Alt+] (editorTextFocus && dance.mode == 'normal') -seek.askObject.inner.startSelect to inner object startAlt+[ (editorTextFocus && dance.mode == 'normal') -seek.askObject.inner.start.extendExtend to inner object startShift+Alt+[ (editorTextFocus && dance.mode == 'normal') -seek.askObject.startSelect to whole object start[ (editorTextFocus && dance.mode == 'normal') -seek.askObject.start.extendExtend to whole object startShift+[ (editorTextFocus && dance.mode == 'normal') -seek.backwardSelect to character (excluded, backward)Alt+T (editorTextFocus && dance.mode == 'normal') -seek.enclosing.backwardSelect to previous enclosing characterAlt+M (editorTextFocus && dance.mode == 'normal') -seek.enclosing.extendExtend to next enclosing characterShift+M (editorTextFocus && dance.mode == 'normal') -seek.enclosing.extend.backwardExtend to previous enclosing characterShift+Alt+M (editorTextFocus && dance.mode == 'normal') -seek.extendExtend to character (excluded)Shift+T (editorTextFocus && dance.mode == 'normal')T (editorTextFocus && dance.mode == 'select') -seek.extend.backwardExtend to character (excluded, backward)Shift+Alt+T (editorTextFocus && dance.mode == 'normal')Shift+T (editorTextFocus && dance.mode == 'select') -seek.includedSelect to character (included)F (editorTextFocus && dance.mode == 'normal') -seek.included.backwardSelect to character (included, backward)Alt+F (editorTextFocus && dance.mode == 'normal') -seek.included.extendExtend to character (included)Shift+F (editorTextFocus && dance.mode == 'normal')F (editorTextFocus && dance.mode == 'select') -seek.included.extend.backwardExtend to character (included, backward)Shift+Alt+F (editorTextFocus && dance.mode == 'normal')Shift+F (editorTextFocus && dance.mode == 'select') -seek.leap.backwardLeap backward -seek.syntax.child.experimentalSelect child syntax object -seek.syntax.next.experimentalSelect next syntax object -seek.syntax.parent.experimentalSelect parent syntax object -seek.syntax.previous.experimentalSelect previous syntax object -seek.word.backwardSelect to previous word startB (editorTextFocus && dance.mode == 'normal') -seek.word.extendExtend to next word startShift+W (editorTextFocus && dance.mode == 'normal')W (editorTextFocus && dance.mode == 'select') -seek.word.extend.backwardExtend to previous word startShift+B (editorTextFocus && dance.mode == 'normal')B (editorTextFocus && dance.mode == 'select') -seek.word.wsSelect to next non-whitespace word startAlt+W (editorTextFocus && dance.mode == 'normal') -seek.word.ws.backwardSelect to previous non-whitespace word startAlt+B (editorTextFocus && dance.mode == 'normal') -seek.word.ws.extendExtend to next non-whitespace word startShift+Alt+W (editorTextFocus && dance.mode == 'normal')Shift+W (editorTextFocus && dance.mode == 'select') -seek.word.ws.extend.backwardExtend to previous non-whitespace word startShift+Alt+B (editorTextFocus && dance.mode == 'normal')Shift+B (editorTextFocus && dance.mode == 'select') -seek.wordEndSelect to next word endE (editorTextFocus && dance.mode == 'normal') -seek.wordEnd.extendExtend to next word endShift+E (editorTextFocus && dance.mode == 'normal')E (editorTextFocus && dance.mode == 'select') -seek.wordEnd.wsSelect to next non-whitespace word endAlt+E (editorTextFocus && dance.mode == 'normal') -seek.wordEnd.ws.extendExtend to next non-whitespace word endShift+Alt+E (editorTextFocus && dance.mode == 'normal')Shift+E (editorTextFocus && dance.mode == 'select') +seek.askObjectSelect whole objectAlt+A (editorTextFocus && dance.mode == 'normal')Alt+A (editorTextFocus && dance.mode == 'insert') +seek.askObject.endSelect to whole object end] (editorTextFocus && dance.mode == 'normal') +seek.askObject.end.extendExtend to whole object endShift+] (editorTextFocus && dance.mode == 'normal') +seek.askObject.innerSelect inner objectAlt+I (editorTextFocus && dance.mode == 'normal')Alt+I (editorTextFocus && dance.mode == 'insert') +seek.askObject.inner.endSelect to inner object endAlt+] (editorTextFocus && dance.mode == 'normal') +seek.askObject.inner.end.extendExtend to inner object endShift+Alt+] (editorTextFocus && dance.mode == 'normal') +seek.askObject.inner.startSelect to inner object startAlt+[ (editorTextFocus && dance.mode == 'normal') +seek.askObject.inner.start.extendExtend to inner object startShift+Alt+[ (editorTextFocus && dance.mode == 'normal') +seek.askObject.startSelect to whole object start[ (editorTextFocus && dance.mode == 'normal') +seek.askObject.start.extendExtend to whole object startShift+[ (editorTextFocus && dance.mode == 'normal') +seek.backwardSelect to character (excluded, backward)Alt+T (editorTextFocus && dance.mode == 'normal')Shift+T (editorTextFocus && dance.mode == 'normal') +seek.enclosing.backwardSelect to previous enclosing characterAlt+M (editorTextFocus && dance.mode == 'normal') +seek.enclosing.extendExtend to next enclosing characterShift+M (editorTextFocus && dance.mode == 'normal') +seek.enclosing.extend.backwardExtend to previous enclosing characterShift+Alt+M (editorTextFocus && dance.mode == 'normal') +seek.extendExtend to character (excluded)Shift+T (editorTextFocus && dance.mode == 'normal')T (editorTextFocus && dance.mode == 'select') +seek.extend.backwardExtend to character (excluded, backward)Shift+Alt+T (editorTextFocus && dance.mode == 'normal')Shift+T (editorTextFocus && dance.mode == 'select') +seek.includedSelect to character (included)F (editorTextFocus && dance.mode == 'normal') +seek.included.backwardSelect to character (included, backward)Alt+F (editorTextFocus && dance.mode == 'normal')Shift+F (editorTextFocus && dance.mode == 'normal') +seek.included.extendExtend to character (included)Shift+F (editorTextFocus && dance.mode == 'normal')F (editorTextFocus && dance.mode == 'select') +seek.included.extend.backwardExtend to character (included, backward)Shift+Alt+F (editorTextFocus && dance.mode == 'normal')Shift+F (editorTextFocus && dance.mode == 'select') +seek.leap.backwardLeap backward +seek.syntax.child.experimentalSelect child syntax object +seek.syntax.next.experimentalSelect next syntax object +seek.syntax.parent.experimentalSelect parent syntax object +seek.syntax.previous.experimentalSelect previous syntax object +seek.word.backwardSelect to previous word startB (editorTextFocus && dance.mode == 'normal') +seek.word.extendExtend to next word startShift+W (editorTextFocus && dance.mode == 'normal')W (editorTextFocus && dance.mode == 'select') +seek.word.extend.backwardExtend to previous word startShift+B (editorTextFocus && dance.mode == 'normal')B (editorTextFocus && dance.mode == 'select') +seek.word.wsSelect to next non-whitespace word startAlt+W (editorTextFocus && dance.mode == 'normal')Shift+W (editorTextFocus && dance.mode == 'normal') +seek.word.ws.backwardSelect to previous non-whitespace word startAlt+B (editorTextFocus && dance.mode == 'normal')Shift+B (editorTextFocus && dance.mode == 'normal') +seek.word.ws.extendExtend to next non-whitespace word startShift+Alt+W (editorTextFocus && dance.mode == 'normal')Shift+W (editorTextFocus && dance.mode == 'select') +seek.word.ws.extend.backwardExtend to previous non-whitespace word startShift+Alt+B (editorTextFocus && dance.mode == 'normal')Shift+B (editorTextFocus && dance.mode == 'select') +seek.wordEndSelect to next word endE (editorTextFocus && dance.mode == 'normal') +seek.wordEnd.extendExtend to next word endShift+E (editorTextFocus && dance.mode == 'normal')E (editorTextFocus && dance.mode == 'select') +seek.wordEnd.wsSelect to next non-whitespace word endAlt+E (editorTextFocus && dance.mode == 'normal')Shift+E (editorTextFocus && dance.mode == 'normal') +seek.wordEnd.ws.extendExtend to next non-whitespace word endShift+Alt+E (editorTextFocus && dance.mode == 'normal')Shift+E (editorTextFocus && dance.mode == 'select') seek.syntax.experimentalSelect syntax object seek.wordSelect to next word startW (editorTextFocus && dance.mode == 'normal') -selectselect.bufferSelect whole bufferShift+5 (editorTextFocus && dance.mode == 'normal') +selectselect.bufferSelect whole bufferShift+5 (editorTextFocus && dance.mode == 'normal')Shift+5 (editorTextFocus && dance.mode == 'select') select.firstVisibleLineSelect to first visible line select.horizontallySelect horizontally select.lastLineSelect to last line @@ -135,82 +135,82 @@ selections are empty select.line.aboveSelect line above select.line.above.extendExtend to line above select.line.belowSelect line below -select.line.below.extendExtend to line below +select.line.below.extendExtend to line belowX (editorTextFocus && dance.mode == 'normal')X (editorTextFocus && dance.mode == 'select') select.lineEndSelect to line endAlt+L (editorTextFocus && dance.mode == 'normal')End (editorTextFocus && dance.mode == 'normal') select.lineStartSelect to line startAlt+H (editorTextFocus && dance.mode == 'normal')Home (editorTextFocus && dance.mode == 'normal') select.middleVisibleLineSelect to middle visible line -select.documentEnd.extendExtend to last character -select.documentEnd.jumpJump to last character +select.documentEnd.extendExtend to last character +select.documentEnd.jumpJump to last character select.down.extendExtend downShift+J (editorTextFocus && dance.mode == 'normal')Shift+Down (editorTextFocus && dance.mode == 'normal')J (editorTextFocus && dance.mode == 'select')Down (editorTextFocus && dance.mode == 'select') select.down.jumpJump downJ (editorTextFocus && dance.mode == 'normal')Down (editorTextFocus && dance.mode == 'normal') -select.firstLine.extendExtend to first line -select.firstLine.jumpJump to first line -select.firstVisibleLine.extendExtend to first visible line -select.firstVisibleLine.jumpJump to first visible line -select.lastLine.extendExtend to last line -select.lastLine.jumpJump to last line -select.lastVisibleLine.extendExtend to last visible line -select.lastVisibleLine.jumpJump to last visible line -select.left.extendExtend leftShift+H (editorTextFocus && dance.mode == 'normal')Shift+Left (editorTextFocus && dance.mode == 'normal')H (editorTextFocus && dance.mode == 'select')Left (editorTextFocus && dance.mode == 'select') -select.left.jumpJump leftH (editorTextFocus && dance.mode == 'normal')Left (editorTextFocus && dance.mode == 'normal') -select.lineEnd.extendExtend to line endShift+Alt+L (editorTextFocus && dance.mode == 'normal')Shift+End (editorTextFocus && dance.mode == 'normal') -select.lineStart.extendExtend to line startShift+Alt+H (editorTextFocus && dance.mode == 'normal')Shift+Home (editorTextFocus && dance.mode == 'normal') -select.lineStart.jumpJump to line start -select.lineStart.skipBlank.extendExtend to line start (skip blank) -select.lineStart.skipBlank.jumpJump to line start (skip blank) -select.middleVisibleLine.extendExtend to middle visible line -select.middleVisibleLine.jumpJump to middle visible line -select.right.extendExtend rightShift+L (editorTextFocus && dance.mode == 'normal')Shift+Right (editorTextFocus && dance.mode == 'normal')L (editorTextFocus && dance.mode == 'select')Right (editorTextFocus && dance.mode == 'select') -select.right.jumpJump rightL (editorTextFocus && dance.mode == 'normal')Right (editorTextFocus && dance.mode == 'normal') -select.to.extendExtend toShift+G (editorTextFocus && dance.mode == 'normal')G (editorTextFocus && dance.mode == 'select') -select.to.jumpGo toG (editorTextFocus && dance.mode == 'normal') +select.firstLine.extendExtend to first line +select.firstLine.jumpJump to first line +select.firstVisibleLine.extendExtend to first visible line +select.firstVisibleLine.jumpJump to first visible line +select.lastLine.extendExtend to last line +select.lastLine.jumpJump to last line +select.lastVisibleLine.extendExtend to last visible line +select.lastVisibleLine.jumpJump to last visible line +select.left.extendExtend leftShift+H (editorTextFocus && dance.mode == 'normal')Shift+Left (editorTextFocus && dance.mode == 'normal')H (editorTextFocus && dance.mode == 'select')Left (editorTextFocus && dance.mode == 'select') +select.left.jumpJump leftH (editorTextFocus && dance.mode == 'normal')Left (editorTextFocus && dance.mode == 'normal') +select.lineEnd.extendExtend to line endShift+Alt+L (editorTextFocus && dance.mode == 'normal')Shift+End (editorTextFocus && dance.mode == 'normal')End (editorTextFocus && dance.mode == 'select') +select.lineStart.extendExtend to line startShift+Alt+H (editorTextFocus && dance.mode == 'normal')Shift+Home (editorTextFocus && dance.mode == 'normal')Home (editorTextFocus && dance.mode == 'select') +select.lineStart.jumpJump to line start +select.lineStart.skipBlank.extendExtend to line start (skip blank) +select.lineStart.skipBlank.jumpJump to line start (skip blank) +select.middleVisibleLine.extendExtend to middle visible line +select.middleVisibleLine.jumpJump to middle visible line +select.right.extendExtend rightShift+L (editorTextFocus && dance.mode == 'normal')Shift+Right (editorTextFocus && dance.mode == 'normal')L (editorTextFocus && dance.mode == 'select')Right (editorTextFocus && dance.mode == 'select') +select.right.jumpJump rightL (editorTextFocus && dance.mode == 'normal')Right (editorTextFocus && dance.mode == 'normal') +select.to.extendExtend toShift+G (editorTextFocus && dance.mode == 'normal')G (editorTextFocus && dance.mode == 'select') +select.to.jumpGo toG (editorTextFocus && dance.mode == 'normal') select.up.extendExtend upShift+K (editorTextFocus && dance.mode == 'normal')Shift+Up (editorTextFocus && dance.mode == 'normal')K (editorTextFocus && dance.mode == 'select')Up (editorTextFocus && dance.mode == 'select') select.up.jumpJump upK (editorTextFocus && dance.mode == 'normal')Up (editorTextFocus && dance.mode == 'normal') select.toSelect to select.verticallySelect vertically -selectionsselections.changeDirectionChange direction of selectionsAlt+; (editorTextFocus && dance.mode == 'normal') +selectionsselections.changeDirectionChange direction of selectionsAlt+; (editorTextFocus && dance.mode == 'normal')Alt+; (editorTextFocus && dance.mode == 'select') selections.changeOrderReverse selections -selections.copyCopy selections belowShift+C (editorTextFocus && dance.mode == 'normal') -selections.expandToLinesExpand to linesX (editorTextFocus && dance.mode == 'normal') -selections.filterFilter selectionsShift+4 (editorTextFocus && dance.mode == 'normal') +selections.copyCopy selections belowShift+C (editorTextFocus && dance.mode == 'normal')Shift+C (editorTextFocus && dance.mode == 'select') +selections.expandToLinesExpand to linesX (editorTextFocus && dance.mode == 'normal')Shift+X (editorTextFocus && dance.mode == 'normal')Shift+X (editorTextFocus && dance.mode == 'select') +selections.filterFilter selectionsShift+4 (editorTextFocus && dance.mode == 'normal')Shift+4 (editorTextFocus && dance.mode == 'select') selections.mergeMerge contiguous selectionsShift+Alt+- (editorTextFocus && dance.mode == 'normal') selections.openOpen selected file -selections.pipePipe selectionsShift+Alt+\ (editorTextFocus && dance.mode == 'normal') -selections.reduceReduce selections to their cursor; (editorTextFocus && dance.mode == 'normal') +selections.pipePipe selectionsShift+Alt+\ (editorTextFocus && dance.mode == 'normal')Shift+Alt+\ (editorTextFocus && dance.mode == 'select') +selections.reduceReduce selections to their cursor; (editorTextFocus && dance.mode == 'normal'); (editorTextFocus && dance.mode == 'select') selections.restoreRestore selectionsZ (editorTextFocus && dance.mode == 'normal') selections.restore.withCurrentCombine register selections with current onesAlt+Z (editorTextFocus && dance.mode == 'normal') selections.saveSave selectionsShift+Z (editorTextFocus && dance.mode == 'normal') selections.saveTextCopy selections textY (editorTextFocus && dance.mode == 'normal') selections.selectSelect within selections -selections.clear.mainClear main selectionsAlt+, (editorTextFocus && dance.mode == 'normal') -selections.clear.secondaryClear secondary selections, (editorTextFocus && dance.mode == 'normal') -selections.copy.aboveCopy selections aboveShift+Alt+C (editorTextFocus && dance.mode == 'normal') -selections.faceBackwardBackward selections -selections.faceForwardForward selectionsShift+Alt+; (editorTextFocus && dance.mode == 'normal') -selections.filter.regexpKeep matching selectionsAlt+K (editorTextFocus && dance.mode == 'normal') -selections.filter.regexp.inverseClear matching selectionsShift+Alt+K (editorTextFocus && dance.mode == 'normal') -selections.hideIndicesHide selection indices -selections.orderAscendingOrder selections ascending -selections.orderDescendingOrder selections descending -selections.pipe.appendPipe and appendShift+1 (editorTextFocus && dance.mode == 'normal') -selections.pipe.prependPipe and prependShift+Alt+1 (editorTextFocus && dance.mode == 'normal') -selections.pipe.replacePipe and replaceShift+\ (editorTextFocus && dance.mode == 'normal') -selections.reduce.edgesReduce selections to their endsShift+Alt+S (editorTextFocus && dance.mode == 'normal') -selections.select.orLeapLeap or selectS (editorTextFocus && dance.mode == 'normal') -selections.showIndicesShow selection indices -selections.splitLines.orLeap.backwardLeap or select backwardAlt+S (editorTextFocus && dance.mode == 'normal') +selections.clear.mainClear main selectionsAlt+, (editorTextFocus && dance.mode == 'normal')Alt+, (editorTextFocus && dance.mode == 'select') +selections.clear.secondaryClear secondary selections, (editorTextFocus && dance.mode == 'normal'), (editorTextFocus && dance.mode == 'select') +selections.copy.aboveCopy selections aboveShift+Alt+C (editorTextFocus && dance.mode == 'normal')Shift+Alt+C (editorTextFocus && dance.mode == 'select') +selections.faceBackwardBackward selections +selections.faceForwardForward selectionsShift+Alt+; (editorTextFocus && dance.mode == 'normal') +selections.filter.regexpKeep matching selectionsAlt+K (editorTextFocus && dance.mode == 'normal')Alt+K (editorTextFocus && dance.mode == 'select') +selections.filter.regexp.inverseClear matching selectionsShift+Alt+K (editorTextFocus && dance.mode == 'normal')Shift+Alt+K (editorTextFocus && dance.mode == 'select') +selections.hideIndicesHide selection indices +selections.orderAscendingOrder selections ascending +selections.orderDescendingOrder selections descending +selections.pipe.appendPipe and appendShift+1 (editorTextFocus && dance.mode == 'normal')Shift+1 (editorTextFocus && dance.mode == 'select') +selections.pipe.prependPipe and prependShift+Alt+1 (editorTextFocus && dance.mode == 'normal')Shift+Alt+1 (editorTextFocus && dance.mode == 'select') +selections.pipe.replacePipe and replaceShift+\ (editorTextFocus && dance.mode == 'normal')Shift+\ (editorTextFocus && dance.mode == 'select') +selections.reduce.edgesReduce selections to their endsShift+Alt+S (editorTextFocus && dance.mode == 'normal') +selections.select.orLeapLeap or selectS (editorTextFocus && dance.mode == 'normal')S (editorTextFocus && dance.mode == 'select') +selections.showIndicesShow selection indices +selections.splitLines.orLeap.backwardLeap or select backwardAlt+S (editorTextFocus && dance.mode == 'normal')Alt+S (editorTextFocus && dance.mode == 'select') selections.sortSort selections -selections.splitSplit selectionsShift+S (editorTextFocus && dance.mode == 'normal') +selections.splitSplit selectionsShift+S (editorTextFocus && dance.mode == 'normal')Shift+S (editorTextFocus && dance.mode == 'select') selections.splitLinesSplit selections at line boundaries -selections.toggleIndicesToggle selection indicesEnter (editorTextFocus && dance.mode == 'normal') -selections.trimLinesTrim linesAlt+X (editorTextFocus && dance.mode == 'normal') -selections.trimWhitespaceTrim whitespaceShift+- (editorTextFocus && dance.mode == 'normal') +selections.toggleIndicesToggle selection indicesEnter (editorTextFocus && dance.mode == 'normal')Enter (editorTextFocus && dance.mode == 'select') +selections.trimLinesTrim linesAlt+X (editorTextFocus && dance.mode == 'normal')Alt+X (editorTextFocus && dance.mode == 'select') +selections.trimWhitespaceTrim whitespaceShift+- (editorTextFocus && dance.mode == 'normal')Shift+- (editorTextFocus && dance.mode == 'select') selections.rotateselections.rotate.bothRotate selections clockwiseShift+Alt+0 (editorTextFocus && dance.mode == 'normal') -selections.rotate.contentsRotate selections clockwise (contents only) -selections.rotate.selectionsRotate selections clockwise (selections only)Shift+0 (editorTextFocus && dance.mode == 'normal') +selections.rotate.contentsRotate selections clockwise (contents only)Shift+Alt+0 (editorTextFocus && dance.mode == 'normal')Shift+Alt+0 (editorTextFocus && dance.mode == 'select') +selections.rotate.selectionsRotate selections clockwise (selections only)Shift+0 (editorTextFocus && dance.mode == 'normal')Shift+0 (editorTextFocus && dance.mode == 'select') selections.rotate.both.reverseRotate selections counter-clockwiseShift+Alt+9 (editorTextFocus && dance.mode == 'normal') -selections.rotate.contents.reverseRotate selections counter-clockwise (contents only) -selections.rotate.selections.reverseRotate selections counter-clockwise (selections only)Shift+9 (editorTextFocus && dance.mode == 'normal') +selections.rotate.contents.reverseRotate selections counter-clockwise (contents only)Shift+Alt+9 (editorTextFocus && dance.mode == 'normal')Shift+Alt+9 (editorTextFocus && dance.mode == 'select') +selections.rotate.selections.reverseRotate selections counter-clockwise (selections only)Shift+9 (editorTextFocus && dance.mode == 'normal')Shift+9 (editorTextFocus && dance.mode == 'select') viewview.lineReveals a position based on the main cursor @@ -248,7 +248,7 @@ See https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc#changes -### [`edit.insert`](../edit.ts#L15-L61) +### [`edit.insert`](../edit.ts#L15-L66) Insert contents of register. @@ -270,17 +270,22 @@ Specify `all` to paste all contents next to each selection. | Pick register and replace | `selectRegister-insert` | `c-r` (kakoune: normal), `c-r` (kakoune: insert) | `[".selectRegister", { +register }], [".edit.insert", { ... }]` | | Paste before | `paste.before` | | `[".edit.insert", { handleNewLine: true, where: "start", ... }]` | | Paste after | `paste.after` | | `[".edit.insert", { handleNewLine: true, where: "end" , ... }]` | -| Paste before and select | `paste.before.select` | `s-p` (kakoune: normal) | `[".edit.insert", { handleNewLine: true, where: "start", shift: "select", ... }]` | -| Paste after and select | `paste.after.select` | `p` (kakoune: normal) | `[".edit.insert", { handleNewLine: true, where: "end" , shift: "select", ... }]` | +| Paste 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` (kakoune: normal) | `[".edit.insert", { register: "_", ... }]` | +| 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` (kakoune: normal), `d` (helix: select) | `[".selections.saveText", { +register }], [".edit.insert", { register: "_", ... }]` | -| Copy, delete and switch to Insert | `yank-delete-insert` | `c` (kakoune: normal), `c` (helix: select) | `[".selections.saveText", { +register }], [".modes.set", { mode: "insert", +mode }], [".edit.insert", { register: "_", ... }]` | +| Copy and 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`). @@ -293,10 +298,11 @@ This command: - takes an argument `where` of type `"active" | "anchor" | "start" | "end" | undefined`. Default keybinding: `s-a-r` (kakoune: normal) +`s-r` (helix: normal) -### [`edit.join`](../edit.ts#L133-L138) +### [`edit.join`](../edit.ts#L138-L143) Join lines. @@ -305,10 +311,11 @@ This command: - takes an argument `separator` of type `string`. Default keybinding: `a-j` (kakoune: normal) +`s-j` (helix: normal; helix: select) -### [`edit.join.select`](../edit.ts#L142-L147) +### [`edit.join.select`](../edit.ts#L147-L152) Join lines and select inserted separators. @@ -316,23 +323,26 @@ Join lines and select inserted separators. This command: - takes an argument `separator` of type `string`. -Default keybinding: `s-a-j` (kakoune: normal) +Default keybinding: `s-a-j` (core: normal; helix: select) -### [`edit.indent`](../edit.ts#L151-L156) +### [`edit.indent`](../edit.ts#L156-L164) 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: `>` (kakoune: normal) +Default keybinding: `>` (core: normal) -### [`edit.indent.withEmpty`](../edit.ts#L160-L165) +### [`edit.indent.withEmpty`](../edit.ts#L168-L173) Indent selected lines (including empty lines). @@ -344,7 +354,7 @@ Default keybinding: `a->` (kakoune: normal) -### [`edit.deindent`](../edit.ts#L169-L174) +### [`edit.deindent`](../edit.ts#L177-L182) Deindent selected lines. @@ -356,62 +366,79 @@ Default keybinding: `a-<` (kakoune: normal) -### [`edit.deindent.withIncomplete`](../edit.ts#L178-L183) +### [`edit.deindent.withIncomplete`](../edit.ts#L186-L194) 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: `<` (kakoune: normal) +Default keybinding: `<` (core: normal) -### [`edit.case.toLower`](../edit.ts#L187-L192) +### [`edit.case.toLower`](../edit.ts#L198-L206) Transform to lower case. +| Keybindings | Commands | +| ----------- | -------- | +| `` ` `` (helix: select) | `[".edit.case.toLower"], [".modes.set.normal"]` | -Default keybinding: `` ` `` (kakoune: normal) +Default keybinding: `` ` `` (core: normal) -### [`edit.case.toUpper`](../edit.ts#L196-L201) +### [`edit.case.toUpper`](../edit.ts#L210-L218) Transform to upper case. +| Keybindings | Commands | +| ----------- | -------- | +| `` a-` `` (helix: select) | `[".edit.case.toUpper"], [".modes.set.normal"]` | Default keybinding: `` s-` `` (kakoune: normal) +`` a-` `` (helix: normal) -### [`edit.case.swap`](../edit.ts#L205-L210) +### [`edit.case.swap`](../edit.ts#L222-L230) Swap case. +| Keybindings | Commands | +| ----------- | -------- | +| `` s-` `` (helix: select) | `[".edit.case.swap"], [".modes.set.normal"]` | Default keybinding: `` a-` `` (kakoune: normal) +`` s-` `` (helix: normal) -### [`edit.replaceCharacters`](../edit.ts#L225-L234) +### [`edit.replaceCharacters`](../edit.ts#L245-L257) 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 `input` of type `string`. -Default keybinding: `r` (kakoune: normal) +Default keybinding: `r` (core: normal) -### [`edit.align`](../edit.ts#L277-L285) +### [`edit.align`](../edit.ts#L300-L308) Align selections. @@ -422,11 +449,11 @@ before the first character of each selection. This command: - takes an argument `fill` of type `string`. -Default keybinding: `&` (kakoune: normal) +Default keybinding: `&` (core: normal) -### [`edit.copyIndentation`](../edit.ts#L335-L348) +### [`edit.copyIndentation`](../edit.ts#L358-L371) Copy indentation. @@ -441,7 +468,7 @@ Default keybinding: `a-&` (kakoune: normal) -### [`edit.newLine.above`](../edit.ts#L377-L395) +### [`edit.newLine.above`](../edit.ts#L400-L418) Insert new line above each selection. @@ -451,9 +478,9 @@ keep the current selections. #### Additional keybindings -| Title | Identifier | Keybinding | Commands | -| ------------------------------------------ | ---------------------- | ----------------------- | --------------------------------------------------------------------------------- | -| Insert new line above and switch to insert | `newLine.above.insert` | `s-o` (kakoune: normal) | `[".edit.newLine.above", { shift: "select" }], [".modes.insert.before", { ... }]` | +| 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. @@ -463,7 +490,7 @@ Default keybinding: `s-a-o` (kakoune: normal) -### [`edit.newLine.below`](../edit.ts#L415-L433) +### [`edit.newLine.below`](../edit.ts#L438-L456) Insert new line below each selection. @@ -473,9 +500,9 @@ keep the current selections. #### Additional keybindings -| Title | Identifier | Keybinding | Commands | -| ------------------------------------------ | ---------------------- | --------------------- | --------------------------------------------------------------------------------- | -| Insert new line below and switch to insert | `newLine.below.insert` | `o` (kakoune: normal) | `[".edit.newLine.below", { shift: "select" }], [".modes.insert.before", { ... }]` | +| 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. @@ -497,8 +524,7 @@ Undo. This command: - does not require an active text editor. -Default keybinding: `u` (kakoune: normal) -`u` (helix: select) +Default keybinding: `u` (core: normal; helix: select) @@ -510,8 +536,7 @@ Redo. This command: - does not require an active text editor. -Default keybinding: `s-u` (kakoune: normal) -`s-u` (helix: select) +Default keybinding: `s-u` (core: normal; helix: select) @@ -544,10 +569,10 @@ 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 }]` | +| 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. @@ -563,8 +588,8 @@ Repeat last edit without a command. This command: - may be repeated with a given number of repetitions. -Default keybinding: `.` (kakoune: normal) -`NumPad_Decimal` (kakoune: normal) +Default keybinding: `.` (core: normal) +`NumPad_Decimal` (core: normal) @@ -776,7 +801,7 @@ current document. This command: - takes an input `register` of type `string | Register`. -Default keybinding: `"` (kakoune: normal) +Default keybinding: `"` (core: normal) @@ -799,18 +824,18 @@ Update the current counter used to repeat the next command. #### Additional keybindings -| Title | Keybinding | Command | -| ------------------------------ | -------------------------------------------- | ------------------------------------ | -| Add the digit 0 to the counter | `0` (core: normal), `NumPad0` (core: normal) | `[".updateCount", { addDigits: 0 }]` | -| Add the digit 1 to the counter | `1` (core: normal), `NumPad1` (core: normal) | `[".updateCount", { addDigits: 1 }]` | -| Add the digit 2 to the counter | `2` (core: normal), `NumPad2` (core: normal) | `[".updateCount", { addDigits: 2 }]` | -| Add the digit 3 to the counter | `3` (core: normal), `NumPad3` (core: normal) | `[".updateCount", { addDigits: 3 }]` | -| Add the digit 4 to the counter | `4` (core: normal), `NumPad4` (core: normal) | `[".updateCount", { addDigits: 4 }]` | -| Add the digit 5 to the counter | `5` (core: normal), `NumPad5` (core: normal) | `[".updateCount", { addDigits: 5 }]` | -| Add the digit 6 to the counter | `6` (core: normal), `NumPad6` (core: normal) | `[".updateCount", { addDigits: 6 }]` | -| Add the digit 7 to the counter | `7` (core: normal), `NumPad7` (core: normal) | `[".updateCount", { addDigits: 7 }]` | -| Add the digit 8 to the counter | `8` (core: normal), `NumPad8` (core: normal) | `[".updateCount", { addDigits: 8 }]` | -| Add the digit 9 to the counter | `9` (core: normal), `NumPad9` (core: normal) | `[".updateCount", { addDigits: 9 }]` | +| 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: @@ -883,20 +908,20 @@ Set Dance mode. #### Variants -| Title | Identifier | Keybinding | Command | -| ------------------ | ------------ | ---------------------------------------------------- | ----------------------------------------------------------- | -| Set mode to Normal | `set.normal` | `escape` (kakoune: insert), `escape` (helix: select) | `[".modes.set", { mode: "normal" }], ["hideSuggestWidget"]` | -| Set mode to Insert | `set.insert` | | `[".modes.set", { mode: "insert" }]` | -| Set mode to Select | `set.select` | | `[".modes.set", { mode: "select" }]` | +| 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` (kakoune: normal) | `[".selections.faceBackward", { record: false }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "start", record: false, empty: true, ... }]` | -| Insert after | `insert.after` | `a` (kakoune: normal) | `[".selections.faceForward" , { record: false }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "end" , record: false, empty: true, ... }]` | -| Insert at line start | `insert.lineStart` | `s-i` (kakoune: normal) | `[".select.lineStart", { shift: "jump", skipBlank: true }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "start", record: false, empty: true, ... }]` | -| Insert at line end | `insert.lineEnd` | `s-a` (kakoune: normal) | `[".select.lineEnd" , { shift: "jump" }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "end" , record: false, empty: true, ... }]` | +| 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: @@ -931,11 +956,11 @@ Search for patterns and replace or add selections. Search. -| Title | Identifier | Keybinding | Command | -| ------------------------ | ----------------- | ----------------------- | ------------------------------------------------------ | -| Search (extend) | `extend` | `?` (kakoune: normal) | `[".search", { shift: "extend", ... }]` | -| Search backward | `backward` | `a-/` (kakoune: normal) | `[".search", { direction: -1 , ... }]` | -| Search backward (extend) | `backward.extend` | `a-?` (kakoune: normal) | `[".search", { direction: -1, shift: "extend", ... }]` | +| 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`). @@ -944,8 +969,8 @@ This command: - takes an argument `add` of type `boolean`. - takes an argument `interactive` of type `boolean`. -Default keybinding: `/` (kakoune: normal) -`NumPad_Divide` (kakoune: normal) +Default keybinding: `/` (core: normal) +`NumPad_Divide` (core: normal) @@ -954,16 +979,16 @@ Default keybinding: `/` (kakoune: normal) Search current selection. -| Title | Identifier | Keybinding | Command | -| -------------------------------- | ----------------- | ---------------------------------------------------------- | --------------------------------------------------- | -| Search current selection (smart) | `selection.smart` | `*` (kakoune: normal), `NumPad_Multiply` (kakoune: normal) | `[".search.selection", { smart: true, +register }]` | +| Title | Identifier | Keybinding | Command | +| -------------------------------- | ----------------- | ---------------------------------------------------- | --------------------------------------------------- | +| Search current selection (smart) | `selection.smart` | `*` (core: normal), `NumPad_Multiply` (core: normal) | `[".search.selection", { smart: true, +register }]` | This command: - accepts a register (by default, it uses `slash`). - takes an argument `smart` of type `boolean`. -Default keybinding: `a-*` (kakoune: normal) -`a-NumPad_Multiply` (kakoune: normal) +Default keybinding: `a-*` (core: normal) +`a-NumPad_Multiply` (core: normal) @@ -972,26 +997,33 @@ Default keybinding: `a-*` (kakoune: normal) Select next match. -| Title | Identifier | Keybinding | Command | -| --------------------- | -------------- | ------------------------- | ----------------------------------------------------- | -| Add next match | `next.add` | `s-n` (kakoune: normal) | `[".search.next", { add: true, ... }]` | -| Select previous match | `previous` | `a-n` (kakoune: normal) | `[".search.next", { direction: -1 , ... }]` | -| Add previous match | `previous.add` | `s-a-n` (kakoune: normal) | `[".search.next", { direction: -1, add: true, ... }]` | +| 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 `add` of type `boolean`. -Default keybinding: `n` (kakoune: normal) +Default keybinding: `n` (core: normal) ## [`seek`](../seek.ts) Update selections based on the text surrounding them. +#### Predefined keybindings + +| 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" }] }]` | + -### [`seek.seek`](../seek.ts#L16-L41) +### [`seek.seek`](../seek.ts#L23-L48) Select to character (excluded). @@ -1001,11 +1033,11 @@ Select to character (excluded). | Title | Identifier | Keybinding | Command | | ---------------------------------------- | -------------------------- | ------------------------------------------------ | ------------------------------------------------------------------- | | Extend to character (excluded) | `extend` | `s-t` (kakoune: normal), `t` (helix: select) | `[".seek", { shift: "extend" , ... }]` | -| Select to character (excluded, backward) | `backward` | `a-t` (kakoune: normal) | `[".seek", { direction: -1, ... }]` | +| 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` (kakoune: normal) | `[".seek", { include: true , ... }]` | +| 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) | `[".seek", { include: true, direction: -1, ... }]` | +| 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: @@ -1013,11 +1045,11 @@ This command: - takes an argument `include` of type `boolean`. - takes an input `input` of type `string`. -Default keybinding: `t` (kakoune: normal) +Default keybinding: `t` (core: normal) -### [`seek.enclosing`](../seek.ts#L81-L101) +### [`seek.enclosing`](../seek.ts#L88-L108) Select to next enclosing character. @@ -1038,7 +1070,7 @@ Default keybinding: `m` (kakoune: normal) -### [`seek.word`](../seek.ts#L174-L205) +### [`seek.word`](../seek.ts#L181-L212) Select to next word start. @@ -1050,15 +1082,15 @@ Select the word and following whitespaces on the right of the end of each select | Title | Identifier | Keybinding | Command | | -------------------------------------------- | ------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------- | | Extend to next word start | `word.extend` | `s-w` (kakoune: normal), `w` (helix: select) | `[".seek.word", { shift: "extend" , ... }]` | -| Select to previous word start | `word.backward` | `b` (kakoune: normal) | `[".seek.word", { direction: -1, ... }]` | +| 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) | `[".seek.word", { ws: true , ... }]` | +| 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) | `[".seek.word", { ws: true, direction: -1, ... }]` | +| 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` (kakoune: normal) | `[".seek.word", { stopAtEnd: true , ... }]` | +| 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) | `[".seek.word", { stopAtEnd: true , ws: true , ... }]` | +| 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: @@ -1066,11 +1098,11 @@ This command: - takes an argument `stopAtEnd` of type `boolean`. - takes an argument `ws` of type `boolean`. -Default keybinding: `w` (kakoune: normal) +Default keybinding: `w` (core: normal) -### [`seek.object`](../seek.ts#L249-L291) +### [`seek.object`](../seek.ts#L256-L298) Select object. @@ -1110,7 +1142,7 @@ This command: -### [`seek.syntax.experimental`](../seek.ts#L564-L583) +### [`seek.syntax.experimental`](../seek.ts#L571-L590) Select syntax object. @@ -1128,7 +1160,7 @@ This command: -### [`seek.leap`](../seek.ts#L617-L633) +### [`seek.leap`](../seek.ts#L624-L640) Leap forward. @@ -1155,32 +1187,36 @@ Select whole buffer. -Default keybinding: `%` (kakoune: normal) +Default keybinding: `%` (core: normal; helix: select) -### [`select.vertically`](../select.ts#L31-L64) +### [`select.vertically`](../select.ts#L31-L68) Select vertically. #### Variants -| Title | Identifier | Keybinding | Command | +| Title | Identifier | Keybinding | Command | | ----------- | ------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | -| Jump down | `down.jump` | `j` (kakoune: normal) , `down` (kakoune: normal) | `[".select.vertically", { direction: 1, shift: "jump" , ... }]` | +| 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` (kakoune: normal) , `up` (kakoune: normal) | `[".select.vertically", { direction: -1, shift: "jump" , ... }]` | +| 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` (kakoune: normal), `c-f` (kakoune: insert) | `[".select.vertically", { direction: 1, by: "page" , shift: "jump" }]` | -| `c-d` (kakoune: normal), `c-d` (kakoune: insert) | `[".select.vertically", { direction: 1, by: "halfPage", shift: "jump" }]` | -| `c-b` (kakoune: normal), `c-b` (kakoune: insert) | `[".select.vertically", { direction: -1, by: "page" , shift: "jump" }]` | -| `c-u` (kakoune: normal), `c-u` (kakoune: insert) | `[".select.vertically", { direction: -1, by: "halfPage", shift: "jump" }]` | +| 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. @@ -1189,7 +1225,7 @@ This command: -### [`select.horizontally`](../select.ts#L217-L239) +### [`select.horizontally`](../select.ts#L221-L243) Select horizontally. @@ -1198,9 +1234,9 @@ Select horizontally. | Title | Identifier | Keybinding | Command | | ------------ | -------------- | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | -| Jump right | `right.jump` | `l` (kakoune: normal) , `right` (kakoune: normal) | `[".select.horizontally", { direction: 1, shift: "jump" , ... }]` | +| 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` (kakoune: normal) , `left` (kakoune: normal) | `[".select.horizontally", { direction: -1, shift: "jump" , ... }]` | +| 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: @@ -1209,7 +1245,7 @@ This command: -### [`select.to`](../select.ts#L286-L304) +### [`select.to`](../select.ts#L290-L308) Select to. @@ -1220,7 +1256,7 @@ line. If no count is specified, this command will shift open the `goto` menu. | Title | Identifier | Keybinding | Command | | --------- | ----------- | -------------------------------------------- | ------------------------------------------ | -| Go to | `to.jump` | `g` (kakoune: normal) | `[".select.to", { shift: "jump" , ... }]` | +| 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: @@ -1229,7 +1265,7 @@ This command: -### [`select.line.below`](../select.ts#L314-L317) +### [`select.line.below`](../select.ts#L318-L321) Select line below. @@ -1238,16 +1274,19 @@ This command: -### [`select.line.below.extend`](../select.ts#L342-L345) +### [`select.line.below.extend`](../select.ts#L346-L351) 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`](../select.ts#L372-L375) +### [`select.line.above`](../select.ts#L378-L381) Select line above. @@ -1256,7 +1295,7 @@ This command: -### [`select.line.above.extend`](../select.ts#L399-L402) +### [`select.line.above.extend`](../select.ts#L405-L408) Extend to line above. @@ -1265,32 +1304,32 @@ This command: -### [`select.lineStart`](../select.ts#L448-L470) +### [`select.lineStart`](../select.ts#L454-L476) Select to line start. #### Variants -| Title | Identifier | Keybinding | Command | -| -------------------- | ------------------ | ----------------------------------------------------- | ------------------------------------------------------------------ | -| Jump to line start | `lineStart.jump` | | `[".select.lineStart", { shift: "jump" , ... }]` | -| Extend to line start | `lineStart.extend` | `s-a-h` (kakoune: normal), `s-home` (kakoune: normal) | `[".select.lineStart", { shift: "extend", ... }]` | -| Jump to line start (skip blank) | `lineStart.skipBlank.jump` | | `[".select.lineStart", { skipBlank: true, shift: "jump" , ... }]` | -| Extend to line start (skip blank) | `lineStart.skipBlank.extend` | | `[".select.lineStart", { skipBlank: true, shift: "extend", ... }]` | -| Jump to first line | `firstLine.jump` | | `[".select.lineStart", { count: 0, shift: "jump" , ... }]` | -| Extend to first line | `firstLine.extend` | | `[".select.lineStart", { count: 0, shift: "extend", ... }]` | +| 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 `skipBlank` of type `boolean`. Default keybinding: `a-h` (kakoune: normal) -`home` (kakoune: normal) +`home` (core: normal) -### [`select.lineEnd`](../select.ts#L495-L517) +### [`select.lineEnd`](../select.ts#L501-L523) Select to line end. @@ -1298,22 +1337,22 @@ Select to line end. #### Variants -| 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", ... }]` | +| 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 `lineBreak` of type `boolean`. Default keybinding: `a-l` (kakoune: normal) -`end` (kakoune: normal) +`end` (core: normal) -### [`select.lastLine`](../select.ts#L545-L555) +### [`select.lastLine`](../select.ts#L551-L561) Select to last line. @@ -1326,7 +1365,7 @@ Select to last line. -### [`select.firstVisibleLine`](../select.ts#L566-L576) +### [`select.firstVisibleLine`](../select.ts#L572-L582) Select to first visible line. @@ -1339,7 +1378,7 @@ Select to first visible line. -### [`select.middleVisibleLine`](../select.ts#L583-L593) +### [`select.middleVisibleLine`](../select.ts#L589-L599) Select to middle visible line. @@ -1352,7 +1391,7 @@ Select to middle visible line. -### [`select.lastVisibleLine`](../select.ts#L600-L610) +### [`select.lastVisibleLine`](../select.ts#L606-L616) Select to last visible line. @@ -1369,19 +1408,22 @@ Interacting with selections. -### [`selections.saveText`](../selections.ts#L21-L30) +### [`selections.saveText`](../selections.ts#L21-L33) 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` (kakoune: normal) +Default keybinding: `y` (core: normal) -### [`selections.save`](../selections.ts#L34-L48) +### [`selections.save`](../selections.ts#L37-L51) Save selections. @@ -1396,7 +1438,7 @@ Default keybinding: `s-z` (kakoune: normal) -### [`selections.restore`](../selections.ts#L95-L103) +### [`selections.restore`](../selections.ts#L98-L106) Restore selections. @@ -1408,7 +1450,7 @@ Default keybinding: `z` (kakoune: normal) -### [`selections.restore.withCurrent`](../selections.ts#L115-L135) +### [`selections.restore.withCurrent`](../selections.ts#L118-L138) Combine register selections with current ones. @@ -1430,45 +1472,43 @@ Default keybinding: `a-z` (kakoune: normal) -### [`selections.pipe`](../selections.ts#L241-L263) +### [`selections.pipe`](../selections.ts#L244-L265) Pipe selections. Run the specified command or code with the contents of each selection, and save the result to a register. - See https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc#changes-through-external-programs #### Additional commands -| 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", ... }]` | +| 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 `expression` of type `string`. -Default keybinding: `a-|` (kakoune: normal) +Default keybinding: `a-|` (core: normal; helix: select) -### [`selections.filter`](../selections.ts#L291-L313) +### [`selections.filter`](../selections.ts#L293-L314) Filter selections. - #### Variants -| Title | Identifier | Keybinding | Commands | -| -------------------------- | ----------------------- | --------------------------| ------------------------------------------------------------------------ | -| Keep matching selections | `filter.regexp` | `a-k` (kakoune: normal) | `[".selections.filter", { defaultExpression: "/" , ... }]` | -| Clear matching selections | `filter.regexp.inverse` | `s-a-k` (kakoune: normal) | `[".selections.filter", { defaultExpression: "/", inverse: true, ... }]` | -| Clear secondary selections | `clear.secondary` | `,` (kakoune: normal) | `[".selections.filter", { expression: "i === count" , ... }]` | -| Clear main selections | `clear.main` | `a-,` (kakoune: normal) | `[".selections.filter", { expression: "i !== count" , ... }]` | +| 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, ... }]` | +| Clear secondary selections | `clear.secondary` | `,` (core: normal; helix: select) | `[".selections.filter", { expression: "i === count" , ... }]` | +| Clear main selections | `clear.main` | `a-,` (core: normal; helix: select) | `[".selections.filter", { expression: "i !== count" , ... }]` | This command: - accepts an argument of type `{ expression?: string }`. @@ -1477,19 +1517,19 @@ This command: - takes an argument `interactive` of type `boolean`. - takes an argument `inverse` of type `boolean`. -Default keybinding: `$` (kakoune: normal) +Default keybinding: `$` (core: normal; helix: select) -### [`selections.select`](../selections.ts#L346-L360) +### [`selections.select`](../selections.ts#L347-L361) Select within selections. #### Variants -| Title | Identifier | Keybinding | Command | -| -------------- | --------------- | --------------------- | ------------------------------------------------------------------------------------------------- | -| Leap or select | `select.orLeap` | `s` (kakoune: normal) | `[".ifEmpty", { then: [[".seek.leap", { ... }]], otherwise: [[".selections.select", { ... }]] }]` | +| Title | Identifier | Keybinding | Command | +| -------------- | --------------- | --------------------------------- | ------------------------------------------------------------------------------------------------- | +| Leap or select | `select.orLeap` | `s` (core: normal; helix: select) | `[".ifEmpty", { then: [[".seek.leap", { ... }]], otherwise: [[".selections.select", { ... }]] }]` | This command: - accepts an argument of type `{ re?: string | RegExp }`. @@ -1497,7 +1537,7 @@ This command: -### [`selections.split`](../selections.ts#L379-L390) +### [`selections.split`](../selections.ts#L380-L391) Split selections. @@ -1507,19 +1547,19 @@ This command: - takes an argument `excludeEmpty` of type `boolean`. - takes an argument `interactive` of type `boolean`. -Default keybinding: `s-s` (kakoune: normal) +Default keybinding: `s-s` (core: normal; helix: select) -### [`selections.splitLines`](../selections.ts#L415-L431) +### [`selections.splitLines`](../selections.ts#L416-L432) Split selections at line boundaries. #### Variants -| Title | Identifier | Keybinding | Command | -| ----------------------- | ---------------------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------- | -| Leap or select backward | `splitLines.orLeap.backward` | `a-s` (kakoune: normal) | `[".ifEmpty", { then: [[".seek.leap", { direction: -1, ... }]], otherwise: [[".selections.splitLines", { ... }]] }]` | +| 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. @@ -1527,7 +1567,7 @@ This command: -### [`selections.expandToLines`](../selections.ts#L474-L481) +### [`selections.expandToLines`](../selections.ts#L475-L482) Expand to lines. @@ -1536,10 +1576,11 @@ Expand selections to contain full lines (including end-of-line characters). Default keybinding: `x` (kakoune: normal) +`s-x` (helix: normal; helix: select) -### [`selections.trimLines`](../selections.ts#L508-L515) +### [`selections.trimLines`](../selections.ts#L509-L516) Trim lines. @@ -1547,11 +1588,11 @@ Trim selections to only contain full lines (from start to line break). -Default keybinding: `a-x` (kakoune: normal) +Default keybinding: `a-x` (core: normal; helix: select) -### [`selections.trimWhitespace`](../selections.ts#L540-L547) +### [`selections.trimWhitespace`](../selections.ts#L541-L548) Trim whitespace. @@ -1559,11 +1600,11 @@ Trim whitespace at beginning and end of selections. -Default keybinding: `_` (kakoune: normal) +Default keybinding: `_` (core: normal; helix: select) -### [`selections.reduce`](../selections.ts#L566-L585) +### [`selections.reduce`](../selections.ts#L567-L586) Reduce selections to their cursor. @@ -1579,11 +1620,11 @@ This command: - takes an argument `empty` of type `boolean`. - takes an argument `where` of type `"active" | "anchor" | "start" | "end" | "both"`. -Default keybinding: `;` (kakoune: normal) +Default keybinding: `;` (core: normal; helix: select) -### [`selections.changeDirection`](../selections.ts#L647-L662) +### [`selections.changeDirection`](../selections.ts#L648-L663) Change direction of selections. @@ -1597,11 +1638,11 @@ Change direction of selections. | Backward selections | `faceBackward` | | `[".selections.changeDirection", { direction: -1 }]` | -Default keybinding: `a-;` (kakoune: normal) +Default keybinding: `a-;` (core: normal; helix: select) -### [`selections.changeOrder`](../selections.ts#L687-L701) +### [`selections.changeOrder`](../selections.ts#L688-L702) Reverse selections. @@ -1615,7 +1656,7 @@ Reverse selections. -### [`selections.sort`](../selections.ts#L714-L726) +### [`selections.sort`](../selections.ts#L715-L727) Sort selections. @@ -1626,25 +1667,25 @@ This command: -### [`selections.copy`](../selections.ts#L799-L817) +### [`selections.copy`](../selections.ts#L800-L818) Copy selections below. #### Variant -| Title | Identifier | Keybinding | Command | -| --------------------- | ------------ | ------------------------- | ----------------------------------------- | -| Copy selections above | `copy.above` | `s-a-c` (kakoune: normal) | `[".selections.copy", { direction: -1 }]` | +| 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` (kakoune: normal) +Default keybinding: `s-c` (core: normal; helix: select) -### [`selections.merge`](../selections.ts#L851-L856) +### [`selections.merge`](../selections.ts#L852-L857) Merge contiguous selections. @@ -1654,13 +1695,13 @@ Default keybinding: `a-_` (kakoune: normal) -### [`selections.open`](../selections.ts#L860-L863) +### [`selections.open`](../selections.ts#L861-L864) Open selected file. -### [`selections.toggleIndices`](../selections.ts#L876-L893) +### [`selections.toggleIndices`](../selections.ts#L877-L894) Toggle selection indices. @@ -1676,7 +1717,7 @@ This command: - takes an argument `display` of type `boolean | undefined`. - takes an argument `until` of type `AutoDisposable.Event[]`. -Default keybinding: `enter` (dance: normal) +Default keybinding: `enter` (core: normal; helix: select) ## [`selections.rotate`](../selections.rotate.ts) @@ -1703,38 +1744,41 @@ Default keybinding: `a-)` (kakoune: normal) -### [`selections.rotate.contents`](../selections.rotate.ts#L28-L37) +### [`selections.rotate.contents`](../selections.rotate.ts#L28-L39) 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 }]` | +| 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 `reverse` of type `boolean`. +Default keybinding: `a-)` (helix: normal; helix: select) + -### [`selections.rotate.selections`](../selections.rotate.ts#L45-L56) +### [`selections.rotate.selections`](../selections.rotate.ts#L47-L58) Rotate selections clockwise (selections only). The following keybinding is also available: -| Title | Identifier | Keybinding | Command | -| ----------------------------------------------------- | -------------------- | --------------------- | ------------------------------------------------------ | -| Rotate selections counter-clockwise (selections only) | `selections.reverse` | `(` (kakoune: normal) | `[".selections.rotate.selections", { reverse: true }]` | +| 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 `reverse` of type `boolean`. -Default keybinding: `)` (kakoune: normal) +Default keybinding: `)` (core: normal; helix: select) ## [`view`](../view.ts) @@ -1742,10 +1786,10 @@ Moving the editor view. #### Predefined keybindings -| Title | Keybinding | Command | -| ----------------------- | ----------------------- | ---------------------------------------------------- | -| Show view menu | `v` (kakoune: normal) | `[".openMenu", { menu: "view", ... }]` | -| Show view menu (locked) | `s-v` (kakoune: normal) | `[".openMenu", { menu: "view", locked: true, ... }]` | +| 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, ... }]` | diff --git a/src/commands/misc.ts b/src/commands/misc.ts index 1df842e2..dfee5eca 100644 --- a/src/commands/misc.ts +++ b/src/commands/misc.ts @@ -190,7 +190,7 @@ export async function run( * press is awaited again and the returned register will be specific to the * current document. * - * @keys `"` (kakoune: normal) + * @keys `"` (core: normal) * @noreplay */ export async function selectRegister( @@ -256,18 +256,18 @@ export async function updateRegister( * * #### Additional keybindings * - * | Title | Keybinding | Command | - * | ------------------------------ | -------------------------------------------- | ------------------------------------ | - * | Add the digit 0 to the counter | `0` (core: normal), `NumPad0` (core: normal) | `[".updateCount", { addDigits: 0 }]` | - * | Add the digit 1 to the counter | `1` (core: normal), `NumPad1` (core: normal) | `[".updateCount", { addDigits: 1 }]` | - * | Add the digit 2 to the counter | `2` (core: normal), `NumPad2` (core: normal) | `[".updateCount", { addDigits: 2 }]` | - * | Add the digit 3 to the counter | `3` (core: normal), `NumPad3` (core: normal) | `[".updateCount", { addDigits: 3 }]` | - * | Add the digit 4 to the counter | `4` (core: normal), `NumPad4` (core: normal) | `[".updateCount", { addDigits: 4 }]` | - * | Add the digit 5 to the counter | `5` (core: normal), `NumPad5` (core: normal) | `[".updateCount", { addDigits: 5 }]` | - * | Add the digit 6 to the counter | `6` (core: normal), `NumPad6` (core: normal) | `[".updateCount", { addDigits: 6 }]` | - * | Add the digit 7 to the counter | `7` (core: normal), `NumPad7` (core: normal) | `[".updateCount", { addDigits: 7 }]` | - * | Add the digit 8 to the counter | `8` (core: normal), `NumPad8` (core: normal) | `[".updateCount", { addDigits: 8 }]` | - * | Add the digit 9 to the counter | `9` (core: normal), `NumPad9` (core: normal) | `[".updateCount", { addDigits: 9 }]` | + * | 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 }]` | * * @noreplay */ diff --git a/src/commands/modes.ts b/src/commands/modes.ts index 8ee17d7a..9c491e82 100644 --- a/src/commands/modes.ts +++ b/src/commands/modes.ts @@ -11,20 +11,20 @@ declare module "./modes"; * * #### Variants * - * | Title | Identifier | Keybinding | Command | - * | ------------------ | ------------ | ---------------------------------------------------- | ----------------------------------------------------------- | - * | Set mode to Normal | `set.normal` | `escape` (kakoune: insert), `escape` (helix: select) | `[".modes.set", { mode: "normal" }], ["hideSuggestWidget"]` | - * | Set mode to Insert | `set.insert` | | `[".modes.set", { mode: "insert" }]` | - * | Set mode to Select | `set.select` | | `[".modes.set", { mode: "select" }]` | + * | 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` (kakoune: normal) | `[".selections.faceBackward", { record: false }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "start", record: false, empty: true, ... }]` | - * | Insert after | `insert.after` | `a` (kakoune: normal) | `[".selections.faceForward" , { record: false }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "end" , record: false, empty: true, ... }]` | - * | Insert at line start | `insert.lineStart` | `s-i` (kakoune: normal) | `[".select.lineStart", { shift: "jump", skipBlank: true }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "start", record: false, empty: true, ... }]` | - * | Insert at line end | `insert.lineEnd` | `s-a` (kakoune: normal) | `[".select.lineEnd" , { shift: "jump" }], [".modes.set", { mode: "insert", +mode }], [".selections.reduce", { where: "end" , record: false, empty: true, ... }]` | + * | 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, ... }]` | * * @noreplay */ diff --git a/src/commands/search.ts b/src/commands/search.ts index 7b251735..0aa7174c 100644 --- a/src/commands/search.ts +++ b/src/commands/search.ts @@ -14,13 +14,13 @@ declare module "./search"; /** * Search. * - * @keys `/` (kakoune: normal), `NumPad_Divide` (kakoune: normal) + * @keys `/` (core: normal), `NumPad_Divide` (core: normal) * - * | Title | Identifier | Keybinding | Command | - * | ------------------------ | ----------------- | ----------------------- | ------------------------------------------------------ | - * | Search (extend) | `extend` | `?` (kakoune: normal) | `[".search", { shift: "extend", ... }]` | - * | Search backward | `backward` | `a-/` (kakoune: normal) | `[".search", { direction: -1 , ... }]` | - * | Search backward (extend) | `backward.extend` | `a-?` (kakoune: normal) | `[".search", { direction: -1, shift: "extend", ... }]` | + * | 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", ... }]` | */ export async function search( _: Context, @@ -83,11 +83,11 @@ export async function search( /** * Search current selection. * - * @keys `a-*` (kakoune: normal), `a-NumPad_Multiply` (kakoune: normal) + * @keys `a-*` (core: normal), `a-NumPad_Multiply` (core: normal) * - * | Title | Identifier | Keybinding | Command | - * | -------------------------------- | ----------------- | ---------------------------------------------------------- | --------------------------------------------------- | - * | Search current selection (smart) | `selection.smart` | `*` (kakoune: normal), `NumPad_Multiply` (kakoune: normal) | `[".search.selection", { smart: true, +register }]` | + * | Title | Identifier | Keybinding | Command | + * | -------------------------------- | ----------------- | ---------------------------------------------------- | --------------------------------------------------- | + * | Search current selection (smart) | `selection.smart` | `*` (core: normal), `NumPad_Multiply` (core: normal) | `[".search.selection", { smart: true, +register }]` | */ export function selection( document: vscode.TextDocument, @@ -151,13 +151,13 @@ export function selection( /** * Select next match. * - * @keys `n` (kakoune: normal) + * @keys `n` (core: normal) * - * | Title | Identifier | Keybinding | Command | - * | --------------------- | -------------- | ------------------------- | ----------------------------------------------------- | - * | Add next match | `next.add` | `s-n` (kakoune: normal) | `[".search.next", { add: true, ... }]` | - * | Select previous match | `previous` | `a-n` (kakoune: normal) | `[".search.next", { direction: -1 , ... }]` | - * | Add previous match | `previous.add` | `s-a-n` (kakoune: normal) | `[".search.next", { direction: -1, add: true, ... }]` | + * | 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, ... }]` | */ export async function next( _: Context, diff --git a/src/commands/seek.ts b/src/commands/seek.ts index 0fe8e64f..4ab729cb 100644 --- a/src/commands/seek.ts +++ b/src/commands/seek.ts @@ -10,24 +10,31 @@ import { SyntaxNode, Tree, TreeSitter } from "../utils/tree-sitter"; /** * Update selections based on the text surrounding them. + * + * #### Predefined keybindings + * + * | 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" }] }]` | */ declare module "./seek"; /** * Select to character (excluded). * - * @keys `t` (kakoune: normal) + * @keys `t` (core: normal) * * #### Variants * * | Title | Identifier | Keybinding | Command | * | ---------------------------------------- | -------------------------- | ------------------------------------------------ | ------------------------------------------------------------------- | * | Extend to character (excluded) | `extend` | `s-t` (kakoune: normal), `t` (helix: select) | `[".seek", { shift: "extend" , ... }]` | - * | Select to character (excluded, backward) | `backward` | `a-t` (kakoune: normal) | `[".seek", { direction: -1, ... }]` | + * | 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` (kakoune: normal) | `[".seek", { include: true , ... }]` | + * | 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) | `[".seek", { include: true, direction: -1, ... }]` | + * | 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, ... }]` | */ export async function seek( @@ -176,22 +183,22 @@ export function enclosing( * * Select the word and following whitespaces on the right of the end of each selection. * - * @keys `w` (kakoune: normal) + * @keys `w` (core: normal) * * #### Variants * * | Title | Identifier | Keybinding | Command | * | -------------------------------------------- | ------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------- | * | Extend to next word start | `word.extend` | `s-w` (kakoune: normal), `w` (helix: select) | `[".seek.word", { shift: "extend" , ... }]` | - * | Select to previous word start | `word.backward` | `b` (kakoune: normal) | `[".seek.word", { direction: -1, ... }]` | + * | 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) | `[".seek.word", { ws: true , ... }]` | + * | 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) | `[".seek.word", { ws: true, direction: -1, ... }]` | + * | 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` (kakoune: normal) | `[".seek.word", { stopAtEnd: true , ... }]` | + * | 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) | `[".seek.word", { stopAtEnd: true , ws: true , ... }]` | + * | 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" , ... }]` | */ export function word( diff --git a/src/commands/select.ts b/src/commands/select.ts index 70537102..67642c6f 100644 --- a/src/commands/select.ts +++ b/src/commands/select.ts @@ -13,7 +13,7 @@ declare module "./select"; /** * Select whole buffer. * - * @keys `%` (kakoune: normal) + * @keys `%` (core: normal; helix: select) */ export function buffer(_: Context) { Selections.set([Selections.wholeBuffer()]); @@ -36,21 +36,25 @@ const preferredColumnsToken = * * #### Variants * - * | Title | Identifier | Keybinding | Command | + * | Title | Identifier | Keybinding | Command | * | ----------- | ------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | - * | Jump down | `down.jump` | `j` (kakoune: normal) , `down` (kakoune: normal) | `[".select.vertically", { direction: 1, shift: "jump" , ... }]` | + * | 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` (kakoune: normal) , `up` (kakoune: normal) | `[".select.vertically", { direction: -1, shift: "jump" , ... }]` | + * | 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` (kakoune: normal), `c-f` (kakoune: insert) | `[".select.vertically", { direction: 1, by: "page" , shift: "jump" }]` | - * | `c-d` (kakoune: normal), `c-d` (kakoune: insert) | `[".select.vertically", { direction: 1, by: "halfPage", shift: "jump" }]` | - * | `c-b` (kakoune: normal), `c-b` (kakoune: insert) | `[".select.vertically", { direction: -1, by: "page" , shift: "jump" }]` | - * | `c-u` (kakoune: normal), `c-u` (kakoune: insert) | `[".select.vertically", { direction: -1, by: "halfPage", shift: "jump" }]` | + * | 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" }]` | */ export function vertically( _: Context, @@ -224,9 +228,9 @@ export function vertically( * * | Title | Identifier | Keybinding | Command | * | ------------ | -------------- | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | - * | Jump right | `right.jump` | `l` (kakoune: normal) , `right` (kakoune: normal) | `[".select.horizontally", { direction: 1, shift: "jump" , ... }]` | + * | 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` (kakoune: normal) , `left` (kakoune: normal) | `[".select.horizontally", { direction: -1, shift: "jump" , ... }]` | + * | 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", ... }]` | */ export function horizontally( @@ -293,7 +297,7 @@ export function horizontally( * * | Title | Identifier | Keybinding | Command | * | --------- | ----------- | -------------------------------------------- | ------------------------------------------ | - * | Go to | `to.jump` | `g` (kakoune: normal) | `[".select.to", { shift: "jump" , ... }]` | + * | 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", ... }]` | */ export function to( @@ -341,6 +345,8 @@ export function line_below(_: Context, count: number) { /** * Extend to line below. + * + * @keys `x` (helix: normal; helix: select) */ export function line_below_extend(_: Context, count: number) { if (count === 0 || count === 1) { @@ -448,18 +454,18 @@ export function line_above_extend(_: Context, count: number) { /** * Select to line start. * - * @keys `a-h` (kakoune: normal), `home` (kakoune: normal) + * @keys `a-h` (kakoune: normal), `home` (core: normal) * * #### Variants * - * | Title | Identifier | Keybinding | Command | - * | -------------------- | ------------------ | ----------------------------------------------------- | ------------------------------------------------------------------ | - * | Jump to line start | `lineStart.jump` | | `[".select.lineStart", { shift: "jump" , ... }]` | - * | Extend to line start | `lineStart.extend` | `s-a-h` (kakoune: normal), `s-home` (kakoune: normal) | `[".select.lineStart", { shift: "extend", ... }]` | - * | Jump to line start (skip blank) | `lineStart.skipBlank.jump` | | `[".select.lineStart", { skipBlank: true, shift: "jump" , ... }]` | - * | Extend to line start (skip blank) | `lineStart.skipBlank.extend` | | `[".select.lineStart", { skipBlank: true, shift: "extend", ... }]` | - * | Jump to first line | `firstLine.jump` | | `[".select.lineStart", { count: 0, shift: "jump" , ... }]` | - * | Extend to first line | `firstLine.extend` | | `[".select.lineStart", { count: 0, shift: "extend", ... }]` | + * | 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", ... }]` | */ export function lineStart( _: Context, @@ -498,15 +504,15 @@ export function lineStart( * @param lineBreak If `true`, selects the line break in character selection * mode. * - * @keys `a-l` (kakoune: normal), `end` (kakoune: normal) + * @keys `a-l` (kakoune: normal), `end` (core: normal) * * #### Variants * - * | 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", ... }]` | + * | 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", ... }]` | */ export function lineEnd( _: Context, diff --git a/src/commands/selections.rotate.ts b/src/commands/selections.rotate.ts index e6daf188..c7ba01e0 100644 --- a/src/commands/selections.rotate.ts +++ b/src/commands/selections.rotate.ts @@ -28,11 +28,13 @@ export function both(_: Context, repetitions: number, reverse: Argument /** * Rotate selections clockwise (contents only). * + * @keys `a-)` (helix: normal; helix: select) + * * The following command is also available: * - * | Title | Identifier | Command | - * | --------------------------------------------------- | ------------------ | ---------------------------------------------------- | - * | Rotate selections counter-clockwise (contents only) | `contents.reverse` | `[".selections.rotate.contents", { reverse: true }]` | + * | Title | Identifier | Keybinding | Command | + * | --------------------------------------------------- | ------------------ | ------------------------------------ | ---------------------------------------------------- | + * | Rotate selections counter-clockwise (contents only) | `contents.reverse` | `a-(` (helix: normal; helix: select) | `[".selections.rotate.contents", { reverse: true }]` | */ export function contents(_: Context, repetitions: number, reverse: Argument = false) { if (reverse) { @@ -45,13 +47,13 @@ export function contents(_: Context, repetitions: number, reverse: Argument = false) { if (reverse) { diff --git a/src/commands/selections.ts b/src/commands/selections.ts index b5994b12..e2424b38 100644 --- a/src/commands/selections.ts +++ b/src/commands/selections.ts @@ -21,7 +21,10 @@ declare module "./selections"; /** * Copy selections text. * - * @keys `y` (kakoune: normal) + * @keys `y` (core: normal) + * | Keybindings | Commands | + * | ----------- | -------- | + * | `y` (helix: select) | `[".selections.saveText"], [".modes.set.normal"]` | */ export function saveText( document: vscode.TextDocument, @@ -244,17 +247,16 @@ const pipeHistory: string[] = []; * Run the specified command or code with the contents of each selection, and * save the result to a register. * - * @keys `a-|` (kakoune: normal) - * + * @keys `a-|` (core: normal; helix: select) * See https://github.com/mawww/kakoune/blob/master/doc/pages/keys.asciidoc#changes-through-external-programs * * #### Additional commands * - * | 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", ... }]` | + * | 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", ... }]` | */ export async function pipe( _: Context, @@ -291,16 +293,15 @@ const filterHistory: string[] = []; /** * Filter selections. * - * @keys `$` (kakoune: normal) - * + * @keys `$` (core: normal; helix: select) * #### Variants * - * | Title | Identifier | Keybinding | Commands | - * | -------------------------- | ----------------------- | --------------------------| ------------------------------------------------------------------------ | - * | Keep matching selections | `filter.regexp` | `a-k` (kakoune: normal) | `[".selections.filter", { defaultExpression: "/" , ... }]` | - * | Clear matching selections | `filter.regexp.inverse` | `s-a-k` (kakoune: normal) | `[".selections.filter", { defaultExpression: "/", inverse: true, ... }]` | - * | Clear secondary selections | `clear.secondary` | `,` (kakoune: normal) | `[".selections.filter", { expression: "i === count" , ... }]` | - * | Clear main selections | `clear.main` | `a-,` (kakoune: normal) | `[".selections.filter", { expression: "i !== count" , ... }]` | + * | 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, ... }]` | + * | Clear secondary selections | `clear.secondary` | `,` (core: normal; helix: select) | `[".selections.filter", { expression: "i === count" , ... }]` | + * | Clear main selections | `clear.main` | `a-,` (core: normal; helix: select) | `[".selections.filter", { expression: "i !== count" , ... }]` | */ export function filter( _: Context, @@ -348,9 +349,9 @@ export function filter( * * #### Variants * - * | Title | Identifier | Keybinding | Command | - * | -------------- | --------------- | --------------------- | ------------------------------------------------------------------------------------------------- | - * | Leap or select | `select.orLeap` | `s` (kakoune: normal) | `[".ifEmpty", { then: [[".seek.leap", { ... }]], otherwise: [[".selections.select", { ... }]] }]` | + * | Title | Identifier | Keybinding | Command | + * | -------------- | --------------- | --------------------------------- | ------------------------------------------------------------------------------------------------- | + * | Leap or select | `select.orLeap` | `s` (core: normal; helix: select) | `[".ifEmpty", { then: [[".seek.leap", { ... }]], otherwise: [[".selections.select", { ... }]] }]` | */ export function select( _: Context, @@ -379,7 +380,7 @@ export function select( /** * Split selections. * - * @keys `s-s` (kakoune: normal) + * @keys `s-s` (core: normal; helix: select) */ export function split( _: Context, @@ -417,9 +418,9 @@ export function split( * * #### Variants * - * | Title | Identifier | Keybinding | Command | - * | ----------------------- | ---------------------------- | ----------------------- | -------------------------------------------------------------------------------------------------------------------- | - * | Leap or select backward | `splitLines.orLeap.backward` | `a-s` (kakoune: normal) | `[".ifEmpty", { then: [[".seek.leap", { direction: -1, ... }]], otherwise: [[".selections.splitLines", { ... }]] }]` | + * | 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", { ... }]] }]` | */ export function splitLines( _: Context, @@ -476,7 +477,7 @@ export function splitLines( * * Expand selections to contain full lines (including end-of-line characters). * - * @keys `x` (kakoune: normal) + * @keys `x` (kakoune: normal), `s-x` (helix: normal; helix: select) */ export function expandToLines(_: Context) { return Selections.updateByIndex((_i, selection, document) => { @@ -510,7 +511,7 @@ export function expandToLines(_: Context) { * * Trim selections to only contain full lines (from start to line break). * - * @keys `a-x` (kakoune: normal) + * @keys `a-x` (core: normal; helix: select) */ export function trimLines(_: Context) { return Selections.updateByIndex((_, selection) => { @@ -542,7 +543,7 @@ export function trimLines(_: Context) { * * Trim whitespace at beginning and end of selections. * - * @keys `_` (kakoune: normal) + * @keys `_` (core: normal; helix: select) */ export function trimWhitespace(_: Context) { const blank = getCharacters(CharSet.Blank, _.document), @@ -569,7 +570,7 @@ export function trimWhitespace(_: Context) { * @param where Which edge each selection should be reduced to; defaults to * "active". * - * @keys `;` (kakoune: normal) + * @keys `;` (core: normal; helix: select) * * #### Variant * @@ -650,7 +651,7 @@ export function reduce( * @param direction If unspecified, flips each direction. Otherwise, ensures * that all selections face the given direction. * - * @keys `a-;` (kakoune: normal) + * @keys `a-;` (core: normal; helix: select) * * #### Variants * @@ -799,13 +800,13 @@ export async function sort( /** * Copy selections below. * - * @keys `s-c` (kakoune: normal) + * @keys `s-c` (core: normal; helix: select) * * #### Variant * - * | Title | Identifier | Keybinding | Command | - * | --------------------- | ------------ | ------------------------- | ----------------------------------------- | - * | Copy selections above | `copy.above` | `s-a-c` (kakoune: normal) | `[".selections.copy", { direction: -1 }]` | + * | Title | Identifier | Keybinding | Command | + * | --------------------- | ------------ | ------------------------------------- | ----------------------------------------- | + * | Copy selections above | `copy.above` | `s-a-c` (core: normal; helix: select) | `[".selections.copy", { direction: -1 }]` | */ export function copy( _: Context, @@ -876,7 +877,7 @@ const indicesToken = PerEditorState.registerState(/* isDisposabl /** * Toggle selection indices. * - * @keys `enter` (dance: normal) + * @keys `enter` (core: normal; helix: select) * * #### Variants * diff --git a/src/commands/view.ts b/src/commands/view.ts index 26b23200..76c5e3e4 100644 --- a/src/commands/view.ts +++ b/src/commands/view.ts @@ -8,10 +8,10 @@ import { Context, Selections } from "../api"; * * #### Predefined keybindings * - * | Title | Keybinding | Command | - * | ----------------------- | ----------------------- | ---------------------------------------------------- | - * | Show view menu | `v` (kakoune: normal) | `[".openMenu", { menu: "view", ... }]` | - * | Show view menu (locked) | `s-v` (kakoune: normal) | `[".openMenu", { menu: "view", locked: true, ... }]` | + * | 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, ... }]` | */ declare module "./view";