From 25379950679f4d59f8efe44ef9c870bb80d3f08b Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Mon, 25 May 2026 19:15:54 +0200 Subject: [PATCH] Add ``/`` as alternate keybindings for moving commits up/down I like these because they are the same as moving a line of code up or down in Visual Studio Code. --- docs-master/Config.md | 4 ++-- docs-master/keybindings/Keybindings_en.md | 4 ++-- docs-master/keybindings/Keybindings_ja.md | 4 ++-- docs-master/keybindings/Keybindings_ko.md | 4 ++-- docs-master/keybindings/Keybindings_nl.md | 4 ++-- docs-master/keybindings/Keybindings_pl.md | 4 ++-- docs-master/keybindings/Keybindings_pt.md | 4 ++-- docs-master/keybindings/Keybindings_ru.md | 4 ++-- docs-master/keybindings/Keybindings_zh-CN.md | 4 ++-- docs-master/keybindings/Keybindings_zh-TW.md | 4 ++-- pkg/config/user_config.go | 4 ++-- schema-master/config.json | 10 ++++++++-- 12 files changed, 30 insertions(+), 24 deletions(-) diff --git a/docs-master/Config.md b/docs-master/Config.md index 882baec63..9f7921821 100644 --- a/docs-master/Config.md +++ b/docs-master/Config.md @@ -737,8 +737,8 @@ keybinding: setFixupMessage: c createFixupCommit: F squashAboveCommits: S - moveDownCommit: - moveUpCommit: + moveDownCommit: [, ] + moveUpCommit: [, ] amendToCommit: A resetCommitAuthor: a pickCommit: p diff --git a/docs-master/keybindings/Keybindings_en.md b/docs-master/keybindings/Keybindings_en.md index 71ecdae5b..d63058d82 100644 --- a/docs-master/keybindings/Keybindings_en.md +++ b/docs-master/keybindings/Keybindings_en.md @@ -95,8 +95,8 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct | `` p `` | Pick | Mark the selected commit to be picked (when mid-rebase). This means that the commit will be retained upon continuing the rebase. | | `` F `` | Create fixup commit | Create 'fixup!' commit for the selected commit. Later on, you can press `S` on this same commit to apply all above fixup commits. | | `` S `` | Apply fixup commits | Squash all 'fixup!' commits, either above the selected commit, or all in current branch (autosquash). | -| `` `` | Move commit down one | | -| `` `` | Move commit up one | | +| `` , `` | Move commit down one | | +| `` , `` | Move commit up one | | | `` V `` | Paste (cherry-pick) | | | `` B `` | Mark as base commit for rebase | Select a base commit for the next rebase. When you rebase onto a branch, only commits above the base commit will be brought across. This uses the `git rebase --onto` command. | | `` A `` | Amend | Amend commit with staged changes. If the selected commit is the HEAD commit, this will perform `git commit --amend`. Otherwise the commit will be amended via a rebase. | diff --git a/docs-master/keybindings/Keybindings_ja.md b/docs-master/keybindings/Keybindings_ja.md index 5a958f80e..d9b87d747 100644 --- a/docs-master/keybindings/Keybindings_ja.md +++ b/docs-master/keybindings/Keybindings_ja.md @@ -75,8 +75,8 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct | `` p `` | ピック | 選択したコミットをピックするようにマークします(リベース中)。これは、リベースを続行すると、コミットが保持されることを意味します。 | | `` F `` | fixupコミットを作成 | 選択したコミットに対する「fixup!」コミットを作成します。fixupコミットは、選択したコミットの修正用コミットです。後で、同じコミットで `S` を押すと、上記のすべてのfixupコミットが適用されます。 | | `` S `` | fixupコミットを適用 | すべての「fixup!」コミットを、選択したコミットの上部または現在のブランチ内のすべてをスカッシュします(autosquash)。 | -| `` `` | コミットを1つ下に移動 | | -| `` `` | コミットを1つ上に移動 | | +| `` , `` | コミットを1つ下に移動 | | +| `` , `` | コミットを1つ上に移動 | | | `` V `` | ペースト(チェリーピック) | | | `` B `` | リベース用のベースコミットとしてマーク | 次のリベース用のベースコミットを選択します。ブランチにリベースするとき、ベースコミットより上のコミットのみが持ち込まれます。これは `git rebase --onto` コマンドを使用します。 | | `` A `` | 修正 | ステージされた変更でコミットを修正します。選択したコミットがHEADコミットの場合、これは `git commit --amend` を実行します。それ以外の場合、コミットはリベースを通じて修正されます。 | diff --git a/docs-master/keybindings/Keybindings_ko.md b/docs-master/keybindings/Keybindings_ko.md index d6121452b..089543c5f 100644 --- a/docs-master/keybindings/Keybindings_ko.md +++ b/docs-master/keybindings/Keybindings_ko.md @@ -307,8 +307,8 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct | `` p `` | Pick | Pick commit (when mid-rebase) | | `` F `` | Create fixup commit | Create fixup commit for this commit | | `` S `` | Apply fixup commits | Squash all 'fixup!' commits above selected commit (autosquash) | -| `` `` | 커밋을 1개 아래로 이동 | | -| `` `` | 커밋을 1개 위로 이동 | | +| `` , `` | 커밋을 1개 아래로 이동 | | +| `` , `` | 커밋을 1개 위로 이동 | | | `` V `` | 커밋을 붙여넣기 (cherry-pick) | | | `` B `` | Mark as base commit for rebase | Select a base commit for the next rebase. When you rebase onto a branch, only commits above the base commit will be brought across. This uses the `git rebase --onto` command. | | `` A `` | Amend | Amend commit with staged changes | diff --git a/docs-master/keybindings/Keybindings_nl.md b/docs-master/keybindings/Keybindings_nl.md index 23a08aae4..1715c597e 100644 --- a/docs-master/keybindings/Keybindings_nl.md +++ b/docs-master/keybindings/Keybindings_nl.md @@ -167,8 +167,8 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct | `` p `` | Pick | Kies commit (wanneer midden in rebase) | | `` F `` | Creëer fixup commit | Creëer fixup commit | | `` S `` | Apply fixup commits | Squash bovenstaande commits | -| `` `` | Verplaats commit 1 naar beneden | | -| `` `` | Verplaats commit 1 naar boven | | +| `` , `` | Verplaats commit 1 naar beneden | | +| `` , `` | Verplaats commit 1 naar boven | | | `` V `` | Plak commits (cherry-pick) | | | `` B `` | Mark as base commit for rebase | Select a base commit for the next rebase. When you rebase onto a branch, only commits above the base commit will be brought across. This uses the `git rebase --onto` command. | | `` A `` | Amend | Wijzig commit met staged veranderingen | diff --git a/docs-master/keybindings/Keybindings_pl.md b/docs-master/keybindings/Keybindings_pl.md index b233fd6d4..b754d7311 100644 --- a/docs-master/keybindings/Keybindings_pl.md +++ b/docs-master/keybindings/Keybindings_pl.md @@ -68,8 +68,8 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct | `` p `` | Wybierz | Oznacz wybrany commit do wybrania (podczas rebazowania). Oznacza to, że commit zostanie zachowany po kontynuacji rebazowania. | | `` F `` | Utwórz commit fixup | Utwórz commit 'fixup!' dla wybranego commita. Później możesz nacisnąć `S` na tym samym commicie, aby zastosować wszystkie powyższe commity fixup. | | `` S `` | Zastosuj commity fixup | Scal wszystkie commity 'fixup!', albo powyżej wybranego commita, albo wszystkie w bieżącej gałęzi (autosquash). | -| `` `` | Przesuń commit w dół | | -| `` `` | Przesuń commit w górę | | +| `` , `` | Przesuń commit w dół | | +| `` , `` | Przesuń commit w górę | | | `` V `` | Wklej (cherry-pick) | | | `` B `` | Oznacz jako bazowy commit dla rebase | Wybierz bazowy commit dla następnego rebase. Kiedy robisz rebase na branch, tylko commity powyżej bazowego commita zostaną przeniesione. Używa to polecenia `git rebase --onto`. | | `` A `` | Popraw | Popraw commit ze zmianami zatwierdzonymi. Jeśli wybrany commit jest commit HEAD, to wykona `git commit --amend`. W przeciwnym razie commit zostanie poprawiony za pomocą rebazowania. | diff --git a/docs-master/keybindings/Keybindings_pt.md b/docs-master/keybindings/Keybindings_pt.md index 22d5cbb55..c19619191 100644 --- a/docs-master/keybindings/Keybindings_pt.md +++ b/docs-master/keybindings/Keybindings_pt.md @@ -171,8 +171,8 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct | `` p `` | Escolher | Marque o commit selecionado para ser escolhido (quando meados da base). Isso significa que o commit será mantido ao continuar o rebase. | | `` F `` | Criar commit de correção | Crie o commit 'correção!' para o commit selecionado. Mais tarde, você pode pressionar `S` neste mesmo commit para aplicar todas os commits de correção acima. | | `` S `` | Aplicar commits de correções | Aplicar Squash all 'correção!', seja acima do commit selecionado, ou tudo no branch atual (autosquash). | -| `` `` | Mover commit um para baixo | | -| `` `` | Mover o commit um para cima | | +| `` , `` | Mover commit um para baixo | | +| `` , `` | Mover o commit um para cima | | | `` V `` | Colar (cherry-pick) | | | `` B `` | Mark as base commit for rebase | Select a base commit for the next rebase. When you rebase onto a branch, only commits above the base commit will be brought across. This uses the `git rebase --onto` command. | | `` A `` | Modificar | Alterar o commit com mudanças em sted. Se o commit selecionado for o commit HEAD, ele executará o `git commit --amend`. Caso contrário, o compromisso será alterado por meio de uma base de apoio. | diff --git a/docs-master/keybindings/Keybindings_ru.md b/docs-master/keybindings/Keybindings_ru.md index 3b81d2433..c802678b3 100644 --- a/docs-master/keybindings/Keybindings_ru.md +++ b/docs-master/keybindings/Keybindings_ru.md @@ -177,8 +177,8 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct | `` p `` | Pick | Выбрать коммит (в середине перебазирования) | | `` F `` | Создать fixup коммит | Создать fixup коммит для этого коммита | | `` S `` | Apply fixup commits | Объединить все 'fixup!' коммиты выше в выбранный коммит (автосохранение) | -| `` `` | Переместить коммит вниз на один | | -| `` `` | Переместить коммит вверх на один | | +| `` , `` | Переместить коммит вниз на один | | +| `` , `` | Переместить коммит вверх на один | | | `` V `` | Вставить отобранные коммиты (cherry-pick) | | | `` B `` | Mark as base commit for rebase | Select a base commit for the next rebase. When you rebase onto a branch, only commits above the base commit will be brought across. This uses the `git rebase --onto` command. | | `` A `` | Amend | Править последний коммит с проиндексированными изменениями | diff --git a/docs-master/keybindings/Keybindings_zh-CN.md b/docs-master/keybindings/Keybindings_zh-CN.md index 76e378695..0d0cbbab6 100644 --- a/docs-master/keybindings/Keybindings_zh-CN.md +++ b/docs-master/keybindings/Keybindings_zh-CN.md @@ -132,8 +132,8 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct | `` p `` | 拣选(Pick) | 标记选中的提交为 picked(变基过程中)。这意味该提交将在后续的变基中保留。 | | `` F `` | 为此提交创建修正 | 创建修正提交 | | `` S `` | 应用该修复提交 | 压缩所选提交之上或当前分支的所有 “fixup!” 提交(自动压缩)。 | -| `` `` | 下移提交 | | -| `` `` | 上移提交 | | +| `` , `` | 下移提交 | | +| `` , `` | 上移提交 | | | `` V `` | 粘贴提交(拣选) | | | `` B `` | 标记一个主提交用于变基 | 选择下一次变基的主提交。当您变基到一个分支时,只有高于主提交的提交才会被引入。这使用“git rebase --onto”命令。 | | `` A `` | 修补(Amend) | 用已暂存的变更来修补提交 | diff --git a/docs-master/keybindings/Keybindings_zh-TW.md b/docs-master/keybindings/Keybindings_zh-TW.md index 6ebfa5c68..d6526b5b2 100644 --- a/docs-master/keybindings/Keybindings_zh-TW.md +++ b/docs-master/keybindings/Keybindings_zh-TW.md @@ -191,8 +191,8 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct | `` p `` | 挑選 | 挑選提交 (於變基過程中) | | `` F `` | 建立修復提交 | 為此提交建立修復提交 | | `` S `` | 壓縮上方所有「fixup」提交(自動壓縮) | 是否壓縮上方 {{.commit}} 所有「fixup」提交? | -| `` `` | 向下移動提交 | | -| `` `` | 向上移動提交 | | +| `` , `` | 向下移動提交 | | +| `` , `` | 向上移動提交 | | | `` V `` | 貼上提交 (揀選) | | | `` B `` | 為了變基已標注提交為基準提交 | 請為了下一次變基選擇一項基準提交;此將執行 `git rebase --onto`。 | | `` A `` | 修改 | 使用已預存的更改修正提交 | diff --git a/pkg/config/user_config.go b/pkg/config/user_config.go index 0b2dcac0c..cac87ec91 100644 --- a/pkg/config/user_config.go +++ b/pkg/config/user_config.go @@ -1085,8 +1085,8 @@ func GetDefaultConfigForPlatform(platform string) *UserConfig { SetFixupMessage: Keybinding{"c"}, CreateFixupCommit: Keybinding{"F"}, SquashAboveCommits: Keybinding{"S"}, - MoveDownCommit: Keybinding{""}, - MoveUpCommit: Keybinding{""}, + MoveDownCommit: Keybinding{"", ""}, + MoveUpCommit: Keybinding{"", ""}, AmendToCommit: Keybinding{"A"}, ResetCommitAuthor: Keybinding{"a"}, PickCommit: Keybinding{"p"}, diff --git a/schema-master/config.json b/schema-master/config.json index 84fd2220e..2e968ba8f 100644 --- a/schema-master/config.json +++ b/schema-master/config.json @@ -1346,7 +1346,10 @@ "type": "array" } ], - "default": "\u003cctrl+j\u003e" + "default": [ + "\u003cctrl+j\u003e", + "\u003calt-down\u003e" + ] }, "moveUpCommit": { "oneOf": [ @@ -1360,7 +1363,10 @@ "type": "array" } ], - "default": "\u003cctrl+k\u003e" + "default": [ + "\u003cctrl+k\u003e", + "\u003calt-up\u003e" + ] }, "amendToCommit": { "oneOf": [