From 1b71b257ef8ef37c81694aaaec0d5658553f483f Mon Sep 17 00:00:00 2001 From: Strackeror Date: Mon, 15 Jul 2024 19:27:36 +0200 Subject: [PATCH] Add `%` binding to helix --- extensions/helix/package.json | 22 ++++++++++++---------- src/api/data/commands.yaml | 3 ++- src/commands/README.md | 5 +++-- src/commands/layouts/azerty.fr.md | 5 +++-- src/commands/layouts/qwerty.md | 5 +++-- src/commands/select.ts | 2 +- 6 files changed, 24 insertions(+), 18 deletions(-) diff --git a/extensions/helix/package.json b/extensions/helix/package.json index b8fb8fe1..e8841247 100644 --- a/extensions/helix/package.json +++ b/extensions/helix/package.json @@ -1152,6 +1152,18 @@ "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'", @@ -1799,11 +1811,6 @@ "command": "dance.ignore", "when": "editorTextFocus && dance.mode == 'helix/normal'" }, - { - "key": "Shift+5", - "command": "dance.ignore", - "when": "editorTextFocus && dance.mode == 'helix/normal'" - }, { "key": "Shift+6", "command": "dance.ignore", @@ -1994,11 +2001,6 @@ "command": "dance.ignore", "when": "editorTextFocus && dance.mode == 'helix/select'" }, - { - "key": "Shift+5", - "command": "dance.ignore", - "when": "editorTextFocus && dance.mode == 'helix/select'" - }, { "key": "Shift+6", "command": "dance.ignore", diff --git a/src/api/data/commands.yaml b/src/api/data/commands.yaml index fbdce58f..da3cbc88 100644 --- a/src/api/data/commands.yaml +++ b/src/api/data/commands.yaml @@ -1582,7 +1582,8 @@ select.buffer: keys: qwerty: |- - `%` (kakoune: normal) + `%` (core: normal) + `%` (helix: select) doc: en: |+ diff --git a/src/commands/README.md b/src/commands/README.md index 9aaf83ef..8e44ea11 100644 --- a/src/commands/README.md +++ b/src/commands/README.md @@ -142,7 +142,7 @@ selections are empty 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 @@ -1187,7 +1187,8 @@ Select whole buffer. -Default keybinding: `%` (kakoune: normal) +Default keybinding: `%` (core: normal) +`%` (helix: select) diff --git a/src/commands/layouts/azerty.fr.md b/src/commands/layouts/azerty.fr.md index 700dc652..ef625ea5 100644 --- a/src/commands/layouts/azerty.fr.md +++ b/src/commands/layouts/azerty.fr.md @@ -127,7 +127,7 @@ selections are empty 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 @@ -1172,7 +1172,8 @@ Select whole buffer. -Default keybinding: `%` (kakoune: normal) +Default keybinding: `%` (core: normal) +`%` (helix: select) diff --git a/src/commands/layouts/qwerty.md b/src/commands/layouts/qwerty.md index 03a58812..73c43bc8 100644 --- a/src/commands/layouts/qwerty.md +++ b/src/commands/layouts/qwerty.md @@ -127,7 +127,7 @@ selections are empty 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 @@ -1172,7 +1172,8 @@ Select whole buffer. -Default keybinding: `%` (kakoune: normal) +Default keybinding: `%` (core: normal) +`%` (helix: select) diff --git a/src/commands/select.ts b/src/commands/select.ts index 8888c65a..41d7ed17 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()]);