feat(vcs): Accept a diff change from the keyboard and step between diff files (#158)

- Accept Left Side / Accept Right Side copy the change at the caret to the
  other side of a side-by-side diff (⌃⌘→ / ⌃⌘← on macOS, Ctrl+Alt+R /
  Ctrl+Alt+A on Windows).
- Compare Next File / Compare Previous File open the neighbouring file of
  the diff chain directly (⌃⇧→ / ⌃⇧← on macOS, Alt+Shift+→ / ← on Windows).
Цей коміт міститься в:
l0ng-ai authored and GitHub committed 2026-10-29 01:38:22 +08:00
1 джерело cfd2970531
коміт b35035f8d9
9 files changed
+80 -7

No files matched your search

+4
Переглянути файл
@@ -316,6 +316,10 @@ export const intellijMacos: Record<string, string[]> = {
"diff.nextDifference": ["F7"],
"diff.prevDifference": ["Shift+F7"],
"diff.jumpToSource": ["F4"],
"diff.applyLeftSide": ["Ctrl+Meta+Right"],
"diff.applyRightSide": ["Ctrl+Meta+Left"],
"diff.nextFile": ["Ctrl+Shift+Right"],
"diff.prevFile": ["Ctrl+Shift+Left"],
// After Show Diff: ⌘D is Compare With… in the project view.
"project.compareWith": ["Meta+D"],
// Editing extras, image viewer (keyWhen: image focused) and Markdown editor layouts
+4
Переглянути файл
@@ -314,6 +314,10 @@ export const intellijWindows: Record<string, string[]> = {
"diff.nextDifference": ["F7"],
"diff.prevDifference": ["Shift+F7"],
"diff.jumpToSource": ["F4"],
"diff.applyLeftSide": ["Ctrl+Alt+R"],
"diff.applyRightSide": ["Ctrl+Alt+A"],
"diff.nextFile": ["Alt+Shift+Right"],
"diff.prevFile": ["Alt+Shift+Left"],
// After Show Diff: Ctrl+D is Compare With… in the project view.
"project.compareWith": ["Ctrl+D"],
// Editing extras, image viewer (keyWhen: image focused) and Markdown editor layouts
+4
Переглянути файл
@@ -324,6 +324,10 @@ export const vscodeMacos: Record<string, string[]> = {
"markdown.previewOnly": ["Meta+Shift+V"],
// Diff editor (VS Code: workbench.action.compareEditor.nextChange / previousChange)
"diff.nextDifference": ["F7"],
"diff.applyLeftSide": [],
"diff.applyRightSide": [],
"diff.nextFile": [],
"diff.prevFile": [],
"diff.prevDifference": ["Shift+F7"],
"diff.jumpToSource": [],
// HTTP Client / Database console: run the request or statement at the caret.
+7 -1
Переглянути файл
@@ -4599,5 +4599,11 @@
"Add Mouse Shortcut": "添加鼠标快捷键",
"Click here with a mouse side button, holding any modifiers": "按住任意修饰键,用鼠标侧键点击此处",
"Mouse shortcut": "鼠标快捷键",
"Mouse Shortcut: {action}": "鼠标快捷键:{action}"
"Mouse Shortcut: {action}": "鼠标快捷键:{action}",
"Accept Left Side": "接受左侧",
"Accept Right Side": "接受右侧",
"Copies the change at the caret from the left side to the right one": "将光标处的变更从左侧复制到右侧",
"Copies the change at the caret from the right side to the left one": "将光标处的变更从右侧复制到左侧",
"Compare Next File": "比较下一个文件",
"Compare Previous File": "比较上一个文件"
}