diff --git a/extensions/helix/package.json b/extensions/helix/package.json index e8841247..d65e9378 100644 --- a/extensions/helix/package.json +++ b/extensions/helix/package.json @@ -487,6 +487,18 @@ "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+R", + "when": "editorTextFocus && dance.mode == 'helix/select'", + "title": "Insert contents of register", + "command": "dance.edit.insert" + }, { "key": "Shift+J", "when": "editorTextFocus && dance.mode == 'helix/normal'", @@ -1786,11 +1798,6 @@ "command": "dance.ignore", "when": "editorTextFocus && dance.mode == 'helix/normal'" }, - { - "key": "Shift+R", - "command": "dance.ignore", - "when": "editorTextFocus && dance.mode == 'helix/normal'" - }, { "key": "Shift+V", "command": "dance.ignore", @@ -1971,11 +1978,6 @@ "command": "dance.ignore", "when": "editorTextFocus && dance.mode == 'helix/select'" }, - { - "key": "Shift+R", - "command": "dance.ignore", - "when": "editorTextFocus && dance.mode == 'helix/select'" - }, { "key": "Shift+V", "command": "dance.ignore", diff --git a/src/api/data/commands.yaml b/src/api/data/commands.yaml index da3cbc88..b53500eb 100644 --- a/src/api/data/commands.yaml +++ b/src/api/data/commands.yaml @@ -193,6 +193,8 @@ edit.insert: keys: qwerty: |- `s-a-r` (kakoune: normal) + `s-r` (helix: normal) + `s-r` (helix: select) doc: en: | @@ -214,7 +216,7 @@ edit.insert: | Title | Identifier | Keybinding | Commands | | ---------------------------------- | ------------------------ | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | | Pick register and replace | `selectRegister-insert` | `c-r` (kakoune: normal), `c-r` (kakoune: insert) | `[".selectRegister", { +register }], [".edit.insert", { ... }]` | - | Paste before | `paste.before` | `s-p` (helix: select) | `[".edit.insert", { handleNewLine: true, where: "start", ... }]` | + | Paste before | `paste.before` | `s-p` (helix: select) | `[".edit.insert", { handleNewLine: true, where: "start", ... }]` | | Paste after | `paste.after` | `p` (helix: select) | `[".edit.insert", { handleNewLine: true, where: "end" , ... }]` | | Paste before and select | `paste.before.select` | `s-p` (core: normal) | `[".edit.insert", { handleNewLine: true, where: "start", shift: "select", ... }]` | | Paste after and select | `paste.after.select` | `p` (core: normal) | `[".edit.insert", { handleNewLine: true, where: "end" , shift: "select", ... }]` | diff --git a/src/commands/README.md b/src/commands/README.md index 8e44ea11..a4c4f366 100644 --- a/src/commands/README.md +++ b/src/commands/README.md @@ -51,7 +51,7 @@ depending on the keyboard layout. The following layouts _will be_\* supported: edit.yank-replaceCopy and replaceShift+R (editorTextFocus && dance.mode == 'normal') edit.indentIndent selected linesShift+. (editorTextFocus && dance.mode == 'normal')Shift+. (editorTextFocus && dance.mode == 'select') 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.insertInsert contents of registerShift+Alt+R (editorTextFocus && dance.mode == 'normal')Shift+R (editorTextFocus && dance.mode == 'normal')Shift+R (editorTextFocus && dance.mode == 'select') 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') @@ -283,7 +283,7 @@ Specify `all` to paste all contents next to each selection. | Title | Identifier | Keybinding | Commands | | ---------------------------------- | ------------------------ | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | | Pick register and replace | `selectRegister-insert` | `c-r` (kakoune: normal), `c-r` (kakoune: insert) | `[".selectRegister", { +register }], [".edit.insert", { ... }]` | -| Paste before | `paste.before` | `s-p` (helix: select) | `[".edit.insert", { handleNewLine: true, where: "start", ... }]` | +| Paste before | `paste.before` | `s-p` (helix: select) | `[".edit.insert", { handleNewLine: true, where: "start", ... }]` | | Paste after | `paste.after` | `p` (helix: select) | `[".edit.insert", { handleNewLine: true, where: "end" , ... }]` | | Paste before and select | `paste.before.select` | `s-p` (core: normal) | `[".edit.insert", { handleNewLine: true, where: "start", shift: "select", ... }]` | | Paste after and select | `paste.after.select` | `p` (core: normal) | `[".edit.insert", { handleNewLine: true, where: "end" , shift: "select", ... }]` | @@ -308,6 +308,8 @@ This command: - takes an argument `where` of type `"active" | "anchor" | "start" | "end" | undefined`. Default keybinding: `s-a-r` (kakoune: normal) +`s-r` (helix: normal) +`s-r` (helix: select) diff --git a/src/commands/edit.ts b/src/commands/edit.ts index db2d4d72..46474bf2 100644 --- a/src/commands/edit.ts +++ b/src/commands/edit.ts @@ -25,14 +25,14 @@ 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), `s-r` (helix: select) * * #### Additional commands * * | Title | Identifier | Keybinding | Commands | * | ---------------------------------- | ------------------------ | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | * | Pick register and replace | `selectRegister-insert` | `c-r` (kakoune: normal), `c-r` (kakoune: insert) | `[".selectRegister", { +register }], [".edit.insert", { ... }]` | - * | Paste before | `paste.before` | `s-p` (helix: select) | `[".edit.insert", { handleNewLine: true, where: "start", ... }]` | + * | Paste before | `paste.before` | `s-p` (helix: select) | `[".edit.insert", { handleNewLine: true, where: "start", ... }]` | * | Paste after | `paste.after` | `p` (helix: select) | `[".edit.insert", { handleNewLine: true, where: "end" , ... }]` | * | Paste before and select | `paste.before.select` | `s-p` (core: normal) | `[".edit.insert", { handleNewLine: true, where: "start", shift: "select", ... }]` | * | Paste after and select | `paste.after.select` | `p` (core: normal) | `[".edit.insert", { handleNewLine: true, where: "end" , shift: "select", ... }]` | diff --git a/src/commands/layouts/azerty.fr.md b/src/commands/layouts/azerty.fr.md index ef625ea5..fe995d8d 100644 --- a/src/commands/layouts/azerty.fr.md +++ b/src/commands/layouts/azerty.fr.md @@ -36,7 +36,7 @@ edit.yank-replaceCopy and replaceShift+R (editorTextFocus && dance.mode == 'normal') edit.indentIndent selected linesShift+. (editorTextFocus && dance.mode == 'normal')Shift+. (editorTextFocus && dance.mode == 'select') 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.insertInsert contents of registerShift+Alt+R (editorTextFocus && dance.mode == 'normal')Shift+R (editorTextFocus && dance.mode == 'normal')Shift+R (editorTextFocus && dance.mode == 'select') 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') @@ -268,7 +268,7 @@ Specify `all` to paste all contents next to each selection. | Title | Identifier | Keybinding | Commands | | ---------------------------------- | ------------------------ | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | | Pick register and replace | `selectRegister-insert` | `c-r` (kakoune: normal), `c-r` (kakoune: insert) | `[".selectRegister", { +register }], [".edit.insert", { ... }]` | -| Paste before | `paste.before` | `s-p` (helix: select) | `[".edit.insert", { handleNewLine: true, where: "start", ... }]` | +| Paste before | `paste.before` | `s-p` (helix: select) | `[".edit.insert", { handleNewLine: true, where: "start", ... }]` | | Paste after | `paste.after` | `p` (helix: select) | `[".edit.insert", { handleNewLine: true, where: "end" , ... }]` | | Paste before and select | `paste.before.select` | `s-p` (core: normal) | `[".edit.insert", { handleNewLine: true, where: "start", shift: "select", ... }]` | | Paste after and select | `paste.after.select` | `p` (core: normal) | `[".edit.insert", { handleNewLine: true, where: "end" , shift: "select", ... }]` | @@ -293,6 +293,8 @@ This command: - takes an argument `where` of type `"active" | "anchor" | "start" | "end" | undefined`. Default keybinding: `s-a-r` (kakoune: normal) +`s-r` (helix: normal) +`s-r` (helix: select) diff --git a/src/commands/layouts/qwerty.md b/src/commands/layouts/qwerty.md index 73c43bc8..223f97eb 100644 --- a/src/commands/layouts/qwerty.md +++ b/src/commands/layouts/qwerty.md @@ -36,7 +36,7 @@ edit.yank-replaceCopy and replaceShift+R (editorTextFocus && dance.mode == 'normal') edit.indentIndent selected linesShift+. (editorTextFocus && dance.mode == 'normal')Shift+. (editorTextFocus && dance.mode == 'select') 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.insertInsert contents of registerShift+Alt+R (editorTextFocus && dance.mode == 'normal')Shift+R (editorTextFocus && dance.mode == 'normal')Shift+R (editorTextFocus && dance.mode == 'select') 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') @@ -268,7 +268,7 @@ Specify `all` to paste all contents next to each selection. | Title | Identifier | Keybinding | Commands | | ---------------------------------- | ------------------------ | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | | Pick register and replace | `selectRegister-insert` | `c-r` (kakoune: normal), `c-r` (kakoune: insert) | `[".selectRegister", { +register }], [".edit.insert", { ... }]` | -| Paste before | `paste.before` | `s-p` (helix: select) | `[".edit.insert", { handleNewLine: true, where: "start", ... }]` | +| Paste before | `paste.before` | `s-p` (helix: select) | `[".edit.insert", { handleNewLine: true, where: "start", ... }]` | | Paste after | `paste.after` | `p` (helix: select) | `[".edit.insert", { handleNewLine: true, where: "end" , ... }]` | | Paste before and select | `paste.before.select` | `s-p` (core: normal) | `[".edit.insert", { handleNewLine: true, where: "start", shift: "select", ... }]` | | Paste after and select | `paste.after.select` | `p` (core: normal) | `[".edit.insert", { handleNewLine: true, where: "end" , shift: "select", ... }]` | @@ -293,6 +293,8 @@ This command: - takes an argument `where` of type `"active" | "anchor" | "start" | "end" | undefined`. Default keybinding: `s-a-r` (kakoune: normal) +`s-r` (helix: normal) +`s-r` (helix: select)