feat(editor): register caret movement and line start/end actions (#7465)

Up, Down, Left, Right, Line Start, Line End and their With Selection variants were handled by the editor's keys only, so they could not be bound in keymapOverrides, imported IDEA keymaps (EditorUp, EditorLineStart, …) or IdeaVim. They are now Editor Actions running the same CodeMirror commands as the keys (smart Home, sticky selection), enabled in text editors and the editable side of a diff, with no default shortcut. A user override now wins over a preset binding on the same keystroke even when the overridden action already appears in the preset. Fixes #7452

Co-authored-by: OnurrUgur <[email protected]>
Цей коміт міститься в:
Onur Ugur authored and GitHub committed 2026-12-02 19:21:42 +08:00
1 джерело 1dd8ea9b3b
коміт 5b24b61b49
10 files changed
+467 -10

No files matched your search

+81 -1
Переглянути файл
@@ -2,7 +2,21 @@
import { writeClipboardText } from "@/platform/clipboard";
import { EditorSelection, type EditorState } from "@codemirror/state";
import { EditorView } from "@codemirror/view";
import { indentSelection, moveLineDown, moveLineUp } from "@codemirror/commands";
import {
cursorCharLeft,
cursorCharRight,
cursorLineBoundaryBackward,
cursorLineBoundaryForward,
cursorLineStart,
indentSelection,
moveLineDown,
moveLineUp,
selectCharLeft,
selectCharRight,
selectLineBoundaryBackward,
selectLineBoundaryForward,
selectLineStart,
} from "@codemirror/commands";
import { foldEffect, syntaxTree, toggleFold } from "@codemirror/language";
import { acceptCompletion, completionStatus } from "@codemirror/autocomplete";
import { executeAction, registerActions, type Action } from "@/platform/actions";
@@ -112,10 +126,14 @@ import { isColumnMode, toggleColumnMode } from "./cm/columnMode";
import {
cloneCaretAbove,
cloneCaretBelow,
cursorLineDown,
cursorLineUp,
moveDownAndScroll,
moveDownAndScrollWithSelection,
moveUpAndScroll,
moveUpAndScrollWithSelection,
selectLineDown,
selectLineUp,
} from "./cm/verticalMotion";
import { pasteAsPlainText, pasteFromHistory, unwrapAtCaret } from "./extras";
import { cyclicExpandWord } from "./wordCompletion";
@@ -885,6 +903,10 @@ export function registerEditorActions(): () => void {
});
const edit = diffText(true);
const caret = diffText(false);
const lineStart = (view: EditorView, select: boolean) => {
if (!editorPrefs().smartKeys.smartHome) return (select ? selectLineStart : cursorLineStart)(view);
return (select ? selectLineBoundaryBackward : cursorLineBoundaryBackward)(view);
};
const activePaneTab = () => {
const s = useTabs.getState();
const pane = s.panes[s.activePane];
@@ -1203,6 +1225,64 @@ export function registerEditorActions(): () => void {
edit("code.startNewLine", "Start New Line", (v) => startNewLine(v)),
edit("code.startNewLineBefore", "Start New Line Before Current", (v) => startNewLineBefore(v)),
edit("code.splitLine", "Split Line", (v) => splitLine(v)),
caret("editor.up", "Move Caret Up", (v) => (isStickySelection(v.state) ? selectLineUp : cursorLineUp)(v), {
category: "Editor Actions",
keywords: ["up", "cursorUp"],
}),
caret("editor.down", "Move Caret Down", (v) => (isStickySelection(v.state) ? selectLineDown : cursorLineDown)(v), {
category: "Editor Actions",
keywords: ["down", "cursorDown"],
}),
caret("editor.left", "Move Caret Left", (v) => (isStickySelection(v.state) ? selectCharLeft : cursorCharLeft)(v), {
category: "Editor Actions",
keywords: ["left", "cursorLeft"],
}),
caret(
"editor.right",
"Move Caret Right",
(v) => (isStickySelection(v.state) ? selectCharRight : cursorCharRight)(v),
{
category: "Editor Actions",
keywords: ["right", "cursorRight"],
},
),
caret("editor.lineStart", "Move Caret to Line Start", (v) => lineStart(v, isStickySelection(v.state)), {
category: "Editor Actions",
keywords: ["line start", "home", "cursorHome"],
}),
caret(
"editor.lineEnd",
"Move Caret to Line End",
(v) => (isStickySelection(v.state) ? selectLineBoundaryForward : cursorLineBoundaryForward)(v),
{
category: "Editor Actions",
keywords: ["line end", "end", "cursorEnd"],
},
),
caret("editor.upWithSelection", "Move Caret Up with Selection", (v) => selectLineUp(v), {
category: "Editor Actions",
keywords: ["up with selection", "cursorUpSelect"],
}),
caret("editor.downWithSelection", "Move Caret Down with Selection", (v) => selectLineDown(v), {
category: "Editor Actions",
keywords: ["down with selection", "cursorDownSelect"],
}),
caret("editor.leftWithSelection", "Move Caret Left with Selection", (v) => selectCharLeft(v), {
category: "Editor Actions",
keywords: ["left with selection", "cursorLeftSelect"],
}),
caret("editor.rightWithSelection", "Move Caret Right with Selection", (v) => selectCharRight(v), {
category: "Editor Actions",
keywords: ["right with selection", "cursorRightSelect"],
}),
caret("editor.lineStartWithSelection", "Move Caret to Line Start with Selection", (v) => lineStart(v, true), {
category: "Editor Actions",
keywords: ["line start with selection", "home", "cursorHomeSelect"],
}),
caret("editor.lineEndWithSelection", "Move Caret to Line End with Selection", (v) => selectLineBoundaryForward(v), {
category: "Editor Actions",
keywords: ["line end with selection", "end", "cursorEndSelect"],
}),
caret("editor.scrollToCenter", "Scroll to Center", (v) => scrollToCenter(v), { category: "Editor Actions" }),
caret("editor.scrollUp", "Scroll Up", (v) => scrollUp(v), { category: "Editor Actions" }),
caret("editor.scrollDown", "Scroll Down", (v) => scrollDown(v), { category: "Editor Actions" }),
+283
Переглянути файл
@@ -0,0 +1,283 @@
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { EditorSelection, EditorState } from "@codemirror/state";
import { EditorView } from "@codemirror/view";
import { _setFocusedCellEditor } from "@/editor/api";
import { matchActions } from "@/features/search/everywhere/model";
import { resolveActionId } from "@/features/vim/rc";
import { allActions, executeAction, getAction, registerAction } from "@/platform/actions";
import { useContextKeys } from "@/platform/context";
import { _resetI18nForTests, setLocale } from "@/platform/i18n";
import { IDEA_ACTIONS } from "@/platform/ideaActions";
import { parseIdeaKeymap } from "@/platform/ideaKeymap";
import { installKeyboardDispatcher, normalizeBinding, PRESETS, useKeymap } from "@/platform/keymap";
import { useProject } from "@/platform/project";
import { registerEditorActions } from "./actions";
import { stickySelectionField, toggleStickySelection } from "./cm/stickySelection";
import { visibleGoalColumns } from "./cm/verticalMotion";
const ACTIONS = [
["editor.up", "EditorUp", "Move Caret Up"],
["editor.down", "EditorDown", "Move Caret Down"],
["editor.left", "EditorLeft", "Move Caret Left"],
["editor.right", "EditorRight", "Move Caret Right"],
["editor.lineStart", "EditorLineStart", "Move Caret to Line Start"],
["editor.lineEnd", "EditorLineEnd", "Move Caret to Line End"],
["editor.upWithSelection", "EditorUpWithSelection", "Move Caret Up with Selection"],
["editor.downWithSelection", "EditorDownWithSelection", "Move Caret Down with Selection"],
["editor.leftWithSelection", "EditorLeftWithSelection", "Move Caret Left with Selection"],
["editor.rightWithSelection", "EditorRightWithSelection", "Move Caret Right with Selection"],
["editor.lineStartWithSelection", "EditorLineStartWithSelection", "Move Caret to Line Start with Selection"],
["editor.lineEndWithSelection", "EditorLineEndWithSelection", "Move Caret to Line End with Selection"],
] as const;
let dispose: () => void;
let uninstall: (() => void) | null = null;
const views: EditorView[] = [];
const initialKeymap = useKeymap.getState();
const initialSettings = useProject.getState().settings;
function makeView(doc: string, anchor: number, head = anchor, readOnly = false): EditorView {
const view = new EditorView({
state: EditorState.create({
doc,
selection: EditorSelection.range(anchor, head),
extensions: [visibleGoalColumns, stickySelectionField, ...(readOnly ? [EditorState.readOnly.of(true)] : [])],
}),
parent: document.body,
});
views.push(view);
return view;
}
beforeEach(() => {
dispose = registerEditorActions();
useContextKeys.setState({ textEditorActive: true, editorTextFocus: true }, true);
});
afterEach(() => {
uninstall?.();
uninstall = null;
dispose();
_setFocusedCellEditor(null);
while (views.length) {
const v = views.pop()!;
v.destroy();
v.dom.remove();
}
useContextKeys.setState({}, true);
useKeymap.setState({
preset: initialKeymap.preset,
overrides: initialKeymap.overrides,
extensions: initialKeymap.extensions,
});
useProject.setState({ settings: initialSettings });
_resetI18nForTests();
});
describe("Caret movement actions", () => {
it("registers all 12 actions in Editor Actions and makes them discoverable in Find Action", () => {
for (const [id, , title] of ACTIONS) {
expect(getAction(id)).toMatchObject({ title, category: "Editor Actions" });
expect(getAction(id)?.hidden).not.toBe(true);
}
const search = (query: string) =>
matchActions(allActions(), query, { isEnabled: () => true, recent: [] }).map((item) => item.id);
expect(search("Up")).toContain("editor.up");
expect(search("Down")).toContain("editor.down");
expect(search("Left")).toContain("editor.left");
expect(search("Right")).toContain("editor.right");
expect(search("Line Start")).toContain("editor.lineStart");
expect(search("Line End")).toContain("editor.lineEnd");
expect(search("Up with Selection")).toContain("editor.upWithSelection");
expect(search("Down with Selection")).toContain("editor.downWithSelection");
expect(search("Left with Selection")).toContain("editor.leftWithSelection");
expect(search("Right with Selection")).toContain("editor.rightWithSelection");
expect(search("Line Start with Selection")).toContain("editor.lineStartWithSelection");
expect(search("Line End with Selection")).toContain("editor.lineEndWithSelection");
});
it("maps IDEA action ids for IdeaVim and imported keymaps without default shortcuts", () => {
for (const [id, ideaId] of ACTIONS) {
expect(IDEA_ACTIONS[ideaId]).toBe(id);
expect(resolveActionId(ideaId)).toBe(id);
for (const keymap of Object.values(PRESETS)) expect(keymap[id] ?? []).toEqual([]);
}
const xml = `<keymap version="1" name="HomeRow" parent="VSCode (macOS)">
<action id="EditorUp"><keyboard-shortcut first-keystroke="meta k"/></action>
<action id="EditorDown"><keyboard-shortcut first-keystroke="meta j"/></action>
<action id="EditorLeft"><keyboard-shortcut first-keystroke="control h"/></action>
<action id="EditorRight"><keyboard-shortcut first-keystroke="control l"/></action>
<action id="EditorLineStart"><keyboard-shortcut first-keystroke="meta h"/></action>
<action id="EditorLineEnd"><keyboard-shortcut first-keystroke="meta l"/></action>
<action id="EditorUpWithSelection"><keyboard-shortcut first-keystroke="shift meta k"/></action>
<action id="EditorDownWithSelection"><keyboard-shortcut first-keystroke="shift meta j"/></action>
<action id="EditorLeftWithSelection"><keyboard-shortcut first-keystroke="shift control h"/></action>
<action id="EditorRightWithSelection"><keyboard-shortcut first-keystroke="shift control l"/></action>
<action id="EditorLineStartWithSelection"><keyboard-shortcut first-keystroke="shift meta h"/></action>
<action id="EditorLineEndWithSelection"><keyboard-shortcut first-keystroke="shift meta l"/></action>
</keymap>`;
const parsed = parseIdeaKeymap(xml);
expect(parsed.unknownActions).toEqual([]);
expect(parsed.overrides["editor.up"]).toEqual([normalizeBinding("Meta+K")]);
expect(parsed.overrides["editor.lineStartWithSelection"]).toEqual([normalizeBinding("Meta+Shift+H")]);
expect(parsed.overrides["editor.lineEndWithSelection"]).toEqual([normalizeBinding("Meta+Shift+L")]);
});
it("moves and selects with Up, Down, Left, Right, Line Start and Line End", async () => {
const view = makeView("alpha\n beta\ngamma", 12); // " be|ta"
_setFocusedCellEditor(view);
await executeAction("editor.left");
expect(view.state.selection.main).toMatchObject({ anchor: 11, head: 11 });
await executeAction("editor.right");
expect(view.state.selection.main).toMatchObject({ anchor: 12, head: 12 });
await executeAction("editor.up");
expect(view.state.doc.lineAt(view.state.selection.main.head).number).toBe(1);
await executeAction("editor.down");
expect(view.state.selection.main).toMatchObject({ anchor: 12, head: 12 });
// Smart Home enabled: first goes to indentation, second to column 0.
useProject.setState({ settings: { ...initialSettings, editor: { smartKeys: { smartHome: true } } } });
await executeAction("editor.lineStart");
expect(view.state.selection.main).toMatchObject({ anchor: 10, head: 10 });
await executeAction("editor.lineStart");
expect(view.state.selection.main).toMatchObject({ anchor: 6, head: 6 });
await executeAction("editor.lineEnd");
expect(view.state.selection.main).toMatchObject({ anchor: 14, head: 14 });
// Smart Home disabled: goes straight to column 0.
useProject.setState({ settings: { ...initialSettings, editor: { smartKeys: { smartHome: false } } } });
await executeAction("editor.lineStart");
expect(view.state.selection.main).toMatchObject({ anchor: 6, head: 6 });
await executeAction("editor.rightWithSelection");
expect(view.state.selection.main).toMatchObject({ anchor: 6, head: 7 });
await executeAction("editor.lineEndWithSelection");
expect(view.state.selection.main).toMatchObject({ anchor: 6, head: 14 });
await executeAction("editor.leftWithSelection");
expect(view.state.selection.main).toMatchObject({ anchor: 6, head: 13 });
await executeAction("editor.lineStartWithSelection");
expect(view.state.selection.main).toMatchObject({ anchor: 6, head: 6 });
await executeAction("editor.downWithSelection");
expect(view.state.doc.lineAt(view.state.selection.main.head).number).toBe(3);
expect(view.state.selection.main.anchor).toBe(6);
await executeAction("editor.upWithSelection");
expect(view.state.selection.main).toMatchObject({ anchor: 6, head: 6 });
});
it("extends the selection on plain moves while sticky selection is active", async () => {
const view = makeView("first\n second", 10); // " se|cond"
_setFocusedCellEditor(view);
expect(toggleStickySelection(view)).toBe(true);
await executeAction("editor.right");
expect(view.state.selection.main).toMatchObject({ anchor: 10, head: 11 });
await executeAction("editor.lineEnd");
expect(view.state.selection.main).toMatchObject({ anchor: 10, head: 14 });
await executeAction("editor.up");
expect(view.state.selection.main.anchor).toBe(10);
expect(view.state.doc.lineAt(view.state.selection.main.head).number).toBe(1);
});
it("moves the caret on the focused diff pane (editable and read-only sides)", async () => {
const editable = makeView("one\ntwo", 5); // "t|wo"
const readonly = makeView("old\nnew", 5, 5, true);
useContextKeys.setState({ diffEditorFocus: true }, true);
editable.focus();
await executeAction("editor.up");
expect(editable.state.selection.main).toMatchObject({ anchor: 1, head: 1 });
readonly.focus();
await executeAction("editor.lineEnd");
expect(readonly.state.selection.main).toMatchObject({ anchor: 7, head: 7 });
});
it("replaces preset chords and conflicting preset bindings when overridden in keymapOverrides", async () => {
const view = makeView("line1\nline2", 8); // "li|ne2"
_setFocusedCellEditor(view);
const copyPath = vi.fn();
const hideActive = vi.fn();
const commit = vi.fn();
const cutLineEnd = vi.fn();
const cleanup = [
registerAction({ id: "editor.copyPath", title: "Copy Path", run: copyPath }),
registerAction({ id: "toolwindow.hideActive", title: "Hide Active", run: hideActive }),
registerAction({ id: "vcs.commit", title: "Commit", run: commit }),
registerAction({
id: "code.cutLineEnd",
title: "Cut Line End",
keyWhen: "editorTextFocus || diffEditorFocus",
run: cutLineEnd,
}),
];
try {
uninstall = installKeyboardDispatcher(window);
const press = (init: KeyboardEventInit) =>
view.contentDOM.dispatchEvent(new KeyboardEvent("keydown", { bubbles: true, cancelable: true, ...init }));
// VS Code (macOS): Meta+K starts chords (`Meta+K P` etc.), Meta+J is `toolwindow.hideActive`.
useKeymap.setState({
preset: "vscode-macos",
overrides: {
"editor.up": ["Meta+K"],
"editor.down": ["Meta+J"],
},
});
press({ key: "k", code: "KeyK", metaKey: true });
await Promise.resolve();
expect(view.state.selection.main).toMatchObject({ anchor: 2, head: 2 });
expect(copyPath).not.toHaveBeenCalled();
press({ key: "j", code: "KeyJ", metaKey: true });
await Promise.resolve();
expect(view.state.selection.main).toMatchObject({ anchor: 8, head: 8 });
expect(hideActive).not.toHaveBeenCalled();
// IntelliJ (macOS): Meta+K is `vcs.commit` (listed after `editor.up`), Ctrl+K has `keyWhen`.
useKeymap.setState({
preset: "intellij-macos",
overrides: {
"editor.up": ["Meta+K", "Ctrl+K"],
},
});
press({ key: "k", code: "KeyK", metaKey: true });
await Promise.resolve();
expect(view.state.selection.main).toMatchObject({ anchor: 2, head: 2 });
expect(commit).not.toHaveBeenCalled();
// Move back down, then test overriding a keyWhen-gated preset shortcut (`Ctrl+K`).
await executeAction("editor.down");
press({ key: "k", code: "KeyK", ctrlKey: true });
await Promise.resolve();
expect(view.state.selection.main).toMatchObject({ anchor: 2, head: 2 });
expect(cutLineEnd).not.toHaveBeenCalled();
} finally {
for (const fn of cleanup) fn();
}
});
it.each([
["en", "Move Caret Up", "Move Caret to Line Start with Selection"],
["zh", "将光标向上移动", "将光标移至行首并选择"],
["zh-TW", "將游標向上移動", "將游標移至行首並選擇"],
])("has searchable %s titles", async (locale, upTitle, lineStartSelTitle) => {
await setLocale(locale);
expect(getAction("editor.up")?.title).toBe(upTitle);
expect(getAction("editor.lineStartWithSelection")?.title).toBe(lineStartSelTitle);
});
});
+12
Переглянути файл
@@ -136,6 +136,18 @@ export const IDEA_ACTIONS: Readonly<Record<string, string>> = {
ToggleZenMode: "view.toggleZenMode",
EditorIncreaseFontSizeGlobal: "editor.increaseFontSizeAll",
EditorDecreaseFontSizeGlobal: "editor.decreaseFontSizeAll",
EditorUp: "editor.up",
EditorDown: "editor.down",
EditorLeft: "editor.left",
EditorRight: "editor.right",
EditorLineStart: "editor.lineStart",
EditorLineEnd: "editor.lineEnd",
EditorUpWithSelection: "editor.upWithSelection",
EditorDownWithSelection: "editor.downWithSelection",
EditorLeftWithSelection: "editor.leftWithSelection",
EditorRightWithSelection: "editor.rightWithSelection",
EditorLineStartWithSelection: "editor.lineStartWithSelection",
EditorLineEndWithSelection: "editor.lineEndWithSelection",
EditorDeleteLine: "code.deleteLine",
EditorScrollUp: "editor.scrollUp",
EditorScrollDown: "editor.scrollDown",
+18 -9
Переглянути файл
@@ -265,10 +265,14 @@ function cachedBindings() {
bindingsCache.extensions === extensions
)
return bindingsCache;
const merged: Keymap = { ...usableExtensionBindings(extensions), ...platformPreset(preset), ...overrides };
const pairs = Object.entries(merged).flatMap(([id, keys]) =>
keys.map((k) => [normalizeBinding(k), id] as [string, string]),
);
const base: Keymap = { ...usableExtensionBindings(extensions), ...platformPreset(preset) };
// Keep overridden actions after preset/extension entries even when the action id already exists in the preset,
// so user overrides win over preset bindings on the same keystroke.
const entries: Array<[string, string[]]> = [
...Object.entries(base).filter(([id]) => !Object.hasOwn(overrides, id)),
...Object.entries(overrides),
];
const pairs = entries.flatMap(([id, keys]) => keys.map((k) => [normalizeBinding(k), id] as [string, string]));
const hasWheel = pairs.some(([binding, id]) => isWheelBinding(binding) && supportsWheelShortcut(id));
bindingsCache = { preset, overrides, extensions, os, pairs, hasWheel };
return bindingsCache;
@@ -893,18 +897,23 @@ export function installKeyboardDispatcher(
// in the project view instead of reaching the Git log's Edit Commit
// Message. An unmatching `keyWhen` fails the enablement check below, and
// when no `keyWhen` matches, the preset/override order decides as before.
const { overrides } = useKeymap.getState();
const isOverridden = (id: string) => Object.hasOwn(overrides, id);
const keyWhenMatches = (id: string) => {
const action = getAction(id);
return !!action?.keyWhen && evaluateWhen(action.keyWhen, ctx);
};
const ordered = exact.reverse();
const preferred: string[] = [];
const fallback: string[] = [];
const overridePreferred: string[] = [];
const overrideFallback: string[] = [];
const presetPreferred: string[] = [];
const presetFallback: string[] = [];
for (const id of ordered) {
if (keyWhenMatches(id)) preferred.push(id);
else fallback.push(id);
const specific = keyWhenMatches(id);
if (isOverridden(id)) (specific ? overridePreferred : overrideFallback).push(id);
else (specific ? presetPreferred : presetFallback).push(id);
}
for (const id of [...preferred, ...fallback]) {
for (const id of [...overridePreferred, ...overrideFallback, ...presetPreferred, ...presetFallback]) {
const action = getAction(id);
if (action && actionEnabledForKey(action, e) && (!restricted || isForwardableAction(id, e.target))) {
e.preventDefault();
+13
Переглянути файл
@@ -136,6 +136,19 @@ describe("IDEA keymap parity", () => {
// Back / Forward also carry the mouse side buttons (`<mouse-shortcut keystroke="button4"/>`).
["editor.codeBlockStartWithSelection", ["Meta+Alt+Shift+["], ["Ctrl+Shift+["]],
["editor.codeBlockEndWithSelection", ["Meta+Alt+Shift+]"], ["Ctrl+Shift+]"]],
// Plain caret moves and their With Selection variants stay unbound so CodeMirror handles arrows and Home/End by default.
["editor.up", [], []],
["editor.down", [], []],
["editor.left", [], []],
["editor.right", [], []],
["editor.lineStart", [], []],
["editor.lineEnd", [], []],
["editor.upWithSelection", [], []],
["editor.downWithSelection", [], []],
["editor.leftWithSelection", [], []],
["editor.rightWithSelection", [], []],
["editor.lineStartWithSelection", [], []],
["editor.lineEndWithSelection", [], []],
// EditorForwardParagraph / EditorBackwardParagraph (and with Selection) have no shortcut.
["editor.paragraphForward", [], []],
["editor.paragraphBackward", [], []],
+12
Переглянути файл
@@ -141,6 +141,18 @@ export const intellijMacos: Record<string, string[]> = {
"code.startNewLineBefore": ["Meta+Alt+Enter"],
// Before the HTTP / SQL consoles' ⌘↵ (Run), which wins there.
"code.splitLine": ["Meta+Enter"],
"editor.up": [],
"editor.down": [],
"editor.left": [],
"editor.right": [],
"editor.lineStart": [],
"editor.lineEnd": [],
"editor.upWithSelection": [],
"editor.downWithSelection": [],
"editor.leftWithSelection": [],
"editor.rightWithSelection": [],
"editor.lineStartWithSelection": [],
"editor.lineEndWithSelection": [],
"editor.scrollToCenter": ["Ctrl+L"],
"tree.scrollToCenter": [],
"editor.scrollUp": [],
+12
Переглянути файл
@@ -142,6 +142,18 @@ export const intellijWindows: Record<string, string[]> = {
"code.startNewLineBefore": ["Ctrl+Alt+Enter"],
// Before the HTTP / SQL consoles' Ctrl+Enter (Run), which wins there.
"code.splitLine": ["Ctrl+Enter"],
"editor.up": [],
"editor.down": [],
"editor.left": [],
"editor.right": [],
"editor.lineStart": [],
"editor.lineEnd": [],
"editor.upWithSelection": [],
"editor.downWithSelection": [],
"editor.leftWithSelection": [],
"editor.rightWithSelection": [],
"editor.lineStartWithSelection": [],
"editor.lineEndWithSelection": [],
"editor.scrollToCenter": ["Ctrl+M"],
"tree.scrollToCenter": [],
"editor.scrollUp": ["Ctrl+Up"],
+12
Переглянути файл
@@ -274,6 +274,18 @@ export const vscodeMacos: Record<string, string[]> = {
"editor.copyPath": ["Meta+K P"],
"navigate.searchText": [],
"code.splitLine": [],
"editor.up": [],
"editor.down": [],
"editor.left": [],
"editor.right": [],
"editor.lineStart": [],
"editor.lineEnd": [],
"editor.upWithSelection": [],
"editor.downWithSelection": [],
"editor.leftWithSelection": [],
"editor.rightWithSelection": [],
"editor.lineStartWithSelection": [],
"editor.lineEndWithSelection": [],
"editor.scrollToCenter": [],
"tree.scrollToCenter": [],
"editor.scrollUp": [],
+12
Переглянути файл
@@ -720,6 +720,18 @@
"Move Down and Scroll with Selection": "向下移動並捲動並選擇",
"Scroll to Top": "捲動到頂部",
"Scroll to Bottom": "捲動到底部",
"Move Caret Up": "將游標向上移動",
"Move Caret Down": "將游標向下移動",
"Move Caret Left": "將游標向左移動",
"Move Caret Right": "將游標向右移動",
"Move Caret to Line Start": "將游標移至行首",
"Move Caret to Line End": "將游標移至行尾",
"Move Caret Up with Selection": "將游標向上移動並選擇",
"Move Caret Down with Selection": "將游標向下移動並選擇",
"Move Caret Left with Selection": "將游標向左移動並選擇",
"Move Caret Right with Selection": "將游標向右移動並選擇",
"Move Caret to Line Start with Selection": "將游標移至行首並選擇",
"Move Caret to Line End with Selection": "將游標移至行尾並選擇",
"Move Caret to Page Top": "將游標移至頁面頂部",
"Move Caret to Page Bottom": "將游標移至頁面底部",
"Move Caret to Page Top with Selection": "將游標移至頁面頂部並選擇",
+12
Переглянути файл
@@ -1172,6 +1172,18 @@
"Move Down and Scroll with Selection": "向下移动并滚动并选择",
"Scroll to Top": "滚动到顶部",
"Scroll to Bottom": "滚动到底部",
"Move Caret Up": "将光标向上移动",
"Move Caret Down": "将光标向下移动",
"Move Caret Left": "将光标向左移动",
"Move Caret Right": "将光标向右移动",
"Move Caret to Line Start": "将光标移至行首",
"Move Caret to Line End": "将光标移至行尾",
"Move Caret Up with Selection": "将光标向上移动并选择",
"Move Caret Down with Selection": "将光标向下移动并选择",
"Move Caret Left with Selection": "将光标向左移动并选择",
"Move Caret Right with Selection": "将光标向右移动并选择",
"Move Caret to Line Start with Selection": "将光标移至行首并选择",
"Move Caret to Line End with Selection": "将光标移至行尾并选择",
"Move Caret to Page Top": "将光标移至页面顶部",
"Move Caret to Page Bottom": "将光标移至页面底部",
"Move Caret to Page Top with Selection": "将光标移至页面顶部并选择",