Файли
openidea/src/platform/keymaps/vscode-macos.ts
T
RuyimgByCN 748e5cee89 feat(build): add Build › Recompile for a single Java file (#5587)
Build › Recompile '<file>.java' (Shift+Cmd+F9 / Ctrl+Shift+F9, moved from Build Module, which keeps no default shortcut) compiles only the active Java file with javac and streams its output and diagnostics to the Build tool window. The menu, editor, tab and Project view entries name the file and are enabled only for local .java files.

- Maven modules resolve the classpath of the file's scope (compile for main sources, test for test sources) through dependency:build-classpath; the probe is now cancellable.
- Gradle projects get the source set's output, compile classpath, source folders and release from an init script.
- Projects without a build tool compile against their Project Structure roots, outputs and libraries.
- In a workspace the file's member project is used.
- javac gets -g, omits an empty -cp, and uses -source/-target on JDK 8; localized javac error and warning prefixes are parsed.

Co-authored-by: RuyimgByCN <[email protected]>
2026-11-25 00:59:59 +08:00

451 рядки
15 KiB
TypeScript
Неформатований Анотація Історія

Цей файл містить неоднозначні символи Юнікоду
Цей файл містить символи Юнікоду, які можна сплутати з іншими символами. Якщо ви вважаєте, що це зроблено навмисно, можете сміливо ігнорувати це попередження. Щоб показати їх, скористайтеся кнопкою Escape.
/**
* "VS Code (macOS)" keymap: our action ids mapped to the closest Visual Studio
* Code default shortcuts. Actions without a VS Code equivalent are listed with
* no binding so switching presets doesn't leak IntelliJ shortcuts.
*/
export const vscodeMacos: Record<string, string[]> = {
"editor.addOrRemoveCaret": ["Alt+Shift+Button1"],
"editor.createRectangularSelectionOnMouseDrag": ["Alt+Button1", "Button2"],
// Navigate
"navigate.searchEverywhere": ["Shift Shift"],
"navigate.gotoClass": [],
"navigate.gotoFile": ["Meta+P"],
"navigate.gotoSymbol": ["Meta+T"],
"navigate.findAction": ["Meta+Shift+P", "F1"],
"navigate.navigationBar": ["Meta+Shift+."],
"navigate.switcher": ["Ctrl+Tab"],
"navigate.switcherBack": ["Ctrl+Shift+Tab"],
"navigate.recentFiles": [],
"navigate.recentLocations": [],
"navigate.back": ["Ctrl+-", "Button4", "SwipeRight"],
"navigate.forward": ["Ctrl+Shift+-", "Button5", "SwipeLeft"],
"navigate.gotoLine": ["Ctrl+G"],
"navigate.declaration": ["F12"],
"navigate.implementation": ["Meta+F12"],
"navigate.typeDeclaration": [],
"navigate.fileStructure": ["Meta+Shift+O"],
"db.goToColumn": ["Meta+Shift+O"],
"db.submitChanges": ["Meta+Enter"],
"db.revertChanges": ["Meta+Alt+Z"],
// Data editor commands: VS Code has no counterpart.
"db.reloadPage": [],
"db.firstPage": [],
"db.previousPage": [],
"db.nextPage": [],
"db.lastPage": [],
"db.addRow": [],
"db.deleteRows": [],
"db.restoreRows": [],
"db.exportData": [],
"db.editCell": [],
"navigate.relatedSymbol": [],
"navigate.nextError": ["F8"],
"navigate.prevError": ["Shift+F8"],
"navigate.callHierarchy": ["Alt+Shift+H"],
"navigate.showFilePath": [],
"navigate.customRegion": [],
"editor.contextInfo": [],
// editor.action.wordHighlight.next / prev
"navigate.nextHighlightedUsage": ["F7"],
"navigate.prevHighlightedUsage": ["Shift+F7"],
"editor.codeBlockStartWithSelection": [],
"editor.codeBlockEndWithSelection": [],
"code.collapseBlock": [],
"code.expandToLevel1": [],
"code.expandAllToLevel1": [],
"code.expandToLevel2": [],
"code.expandAllToLevel2": [],
"code.expandToLevel3": [],
"code.expandAllToLevel3": [],
"code.expandToLevel4": [],
"code.expandAllToLevel4": [],
"code.expandToLevel5": [],
"code.expandAllToLevel5": [],
"code.autoIndentLines": [],
"code.showErrorDescription": [],
"code.surroundWithLiveTemplate": [],
"code.moveElementLeft": [],
"code.moveElementRight": [],
"analyze.inspectFile": [],
"project.copyElement": [],
"run.chooseDebugConfig": [],
"debug.quickEvaluate": [],
"debug.browseConsoleHistory": [],
"editor.nextSplitter": [],
"editor.prevSplitter": [],
"toolwindow.resizeLeft": [],
"toolwindow.resizeRight": [],
"toolwindow.resizeUp": [],
"toolwindow.resizeDown": [],
"layout.restoreCurrent": [],
"layout.restoreDefault": [],
"workbench.stopBackgroundProcesses": [],
"navigate.typeHierarchy": [],
"navigate.toggleBookmark": [],
"navigate.showBookmarks": [],
"navigate.toggleBookmarkWithMnemonic": [],
"navigate.toggleBookmark0": [],
"navigate.toggleBookmark1": [],
"navigate.toggleBookmark2": [],
"navigate.toggleBookmark3": [],
"navigate.toggleBookmark4": [],
"navigate.toggleBookmark5": [],
"navigate.toggleBookmark6": [],
"navigate.toggleBookmark7": [],
"navigate.toggleBookmark8": [],
"navigate.toggleBookmark9": [],
"navigate.gotoBookmark0": [],
"navigate.gotoBookmark1": [],
"navigate.gotoBookmark2": [],
"navigate.gotoBookmark3": [],
"navigate.gotoBookmark4": [],
"navigate.gotoBookmark5": [],
"navigate.gotoBookmark6": [],
"navigate.gotoBookmark7": [],
"navigate.gotoBookmark8": [],
"navigate.gotoBookmark9": [],
"navigate.selectIn": [],
"navigate.lastEditLocation": [],
"navigate.nextEditLocation": [],
"navigate.gotoTest": [],
"navigate.superMethod": [],
"navigate.nextMethod": [],
"navigate.previousMethod": [],
"navigate.nextOccurrence": [],
"navigate.prevOccurrence": [],
// Find
"find.inFile": ["Meta+F"],
"agents.findInConversation": ["Meta+F"],
"find.replaceInFile": ["Meta+Alt+F"],
"find.next": ["Meta+G"],
"find.previous": ["Meta+Shift+G"],
"find.inPath": ["Meta+Shift+F"],
"find.replaceInPath": ["Meta+Shift+H"],
"find.usages": ["Alt+Shift+F12"],
"find.showUsages": ["Shift+F12"],
"find.highlightUsages": [],
// Code
"code.completion": ["Ctrl+Space"],
"code.smartTypeCompletion": [],
"editor.inlineCompletion.trigger": ["Alt+\\"],
"editor.inlineCompletion.accept": ["Tab"],
"editor.inlineCompletion.acceptWord": ["Meta+Right"],
"editor.inlineCompletion.dismiss": ["Escape"],
"editor.inlineCompletion.next": ["Alt+]"],
"editor.inlineCompletion.previous": ["Alt+["],
"code.parameterInfo": ["Meta+Shift+Space"],
"code.quickDocumentation": ["Meta+K Meta+I"],
"code.quickDefinition": ["Alt+F12"],
"code.showIntentions": ["Meta+."],
"code.applyQuickFix": [],
"code.generate": [],
"code.reformat": ["Alt+Shift+F"],
"code.rearrange": [],
"code.reformatDialog": [],
"code.optimizeImports": ["Alt+Shift+O"],
"code.commentLine": ["Meta+/"],
"code.commentBlock": ["Alt+Shift+A"],
"code.extendSelection": ["Ctrl+Shift+Meta+Right"],
"code.shrinkSelection": ["Ctrl+Shift+Meta+Left"],
"code.duplicateLine": ["Alt+Shift+Down"],
"code.deleteLine": ["Meta+Shift+K"],
"code.moveLineUp": ["Alt+Up"],
"code.moveLineDown": ["Alt+Down"],
"code.moveStatementUp": [],
"code.moveStatementDown": [],
"code.completeStatement": [],
"code.surroundWith": [],
"code.insertLiveTemplate": [],
"code.fold": ["Meta+Alt+["],
"code.unfold": ["Meta+Alt+]"],
"code.foldAll": ["Meta+K Meta+0"],
"code.collapseRecursively": ["Meta+K Meta+["],
"code.expandRecursively": ["Meta+K Meta+]"],
"code.unfoldAll": ["Meta+K Meta+J"],
"code.addCaretNextOccurrence": ["Meta+D"],
"code.selectAllOccurrences": ["Meta+Shift+L"],
"code.unselectOccurrence": ["Meta+U"],
"code.addCaretsToLineEnds": ["Alt+Shift+I"],
"code.startNewLine": ["Meta+Enter"],
"code.startNewLineBefore": ["Meta+Shift+Enter"],
"code.joinLines": ["Ctrl+J"],
"code.toggleCase": [],
"code.pasteFromHistory": [],
"code.sortLines": [],
"code.reverseLines": [],
"code.unwrap": [],
"code.foldSelection": [],
"editor.toggleColumnSelection": [],
// Refactor
"refactor.thisMenu": ["Ctrl+Shift+R"],
"refactor.rename": ["F2"],
"refactor.changeSignature": [],
"refactor.extractVariable": [],
"refactor.extractMethod": [],
"refactor.extractConstant": [],
"refactor.extractField": [],
"refactor.extractParameter": [],
"refactor.inline": [],
"refactor.move": [],
"refactor.safeDelete": [],
"refactor.extractInterface": [],
"refactor.pullMembersUp": [],
"refactor.pushMembersDown": [],
// File / editor tabs
"file.save": ["Meta+S"],
"file.newUntitled": ["Meta+N"],
"file.new": [],
"file.settings": ["Meta+,"],
"file.projectStructure": [],
"file.openProject": ["Meta+O"],
"file.newScratchFile": [],
"editor.closeTab": ["Meta+W"],
"toolwindow.closeContent": ["Meta+W"],
"editor.reopenClosedTab": ["Meta+Shift+T"],
"file.toggleReadOnly": [],
"editor.nextTab": ["Meta+Alt+Right", "Meta+Shift+]"],
"editor.prevTab": ["Meta+Alt+Left", "Meta+Shift+["],
"editor.splitRight": ["Meta+\\"],
"editor.toggleZen": ["Meta+K Z"],
"window.toggleFullScreen": ["Meta+Ctrl+F"],
// Project window groups are an IntelliJ concept; VS Code has no counterpart.
"window.nextTab": [],
"window.previousTab": [],
"window.next": [],
"window.previous": [],
"file.reloadFromDisk": [],
"editor.copyPath": ["Meta+K P"],
"navigate.searchText": [],
"code.splitLine": [],
"editor.scrollToCenter": [],
"editor.codeBlockStart": [],
"editor.codeBlockEnd": [],
"editor.cloneCaretAbove": ["Meta+Alt+Up"],
"editor.cloneCaretBelow": ["Meta+Alt+Down"],
"editor.matchBrace": ["Meta+Shift+\\"],
"editor.toggleInsertState": [],
// Explorer (when: projectViewFocus)
"project.newFile": [],
"project.newInThisDirectory": [],
"project.rename": ["Enter"],
"project.move": [],
"project.delete": ["Meta+Backspace"],
"project.copy": ["Meta+C"],
"project.cut": ["Meta+X"],
"project.paste": ["Meta+V"],
"project.copyAbsolutePath": ["Meta+Alt+C"],
"project.open": ["Meta+Down"],
// Explorer: Open to the Side.
"project.openInRightSplit": ["Meta+Enter"],
"project.reloadFromDisk": [],
"project.expandAll": [],
"project.collapseAll": [],
"run.expandAllTests": [],
"run.collapseAllTests": [],
"project.findUsages": ["Alt+Shift+F12"],
"project.reformatCode": ["Alt+Shift+F"],
"project.optimizeImports": ["Alt+Shift+O"],
"project.compareWith": [],
// Views / panels
"toolwindow.project": ["Meta+Shift+E"],
"toolwindow.bookmarks": [],
"toolwindow.find": [],
"toolwindow.run": [],
"toolwindow.debug": ["Meta+Shift+D"],
"toolwindow.problems": ["Meta+Shift+M"],
"toolwindow.structure": [],
"toolwindow.services": [],
"toolwindow.git": ["Ctrl+Shift+G"],
"toolwindow.commit": [],
"toolwindow.terminal": ["Ctrl+`"],
"terminal.new": [],
"toolwindow.hideAll": ["Meta+B"],
"toolwindow.maximize": [],
"toolwindow.jumpToLast": [],
"toolwindow.hideActive": ["Meta+J"],
"toolwindow.focusEditor": ["Escape"],
// Build (Terminal › Run Build Task)
"build.buildProject": ["Meta+Shift+B"],
"build.buildModule": [],
"build.compileFile": [],
"build.rebuildProject": [],
"build.buildArtifacts": [],
// Run / debug
"run.run": ["Ctrl+F5"],
"run.debug": ["F5"],
"run.runContext": [],
"run.debugContext": [],
"run.stop": ["Shift+F5"],
"run.chooseConfig": [],
"run.editConfigs": [],
"run.updateApplication": [],
"run.rerun": [],
"coverage.manageReports": [],
"web.openInBrowser": [],
"debug.toggleBreakpoint": ["F9"],
"debug.viewBreakpoints": [],
"debug.resume": ["F5"],
"debug.stepOver": ["F10"],
"debug.stepInto": ["F11"],
"debug.stepOut": ["Shift+F11"],
"debug.runToCursor": [],
"debug.forceRunToCursor": [],
"debug.forceStepOver": [],
"debug.forceStepInto": [],
"debug.smartStepInto": [],
"debug.showExecutionPoint": [],
"debug.toggleTemporaryBreakpoint": [],
"debug.attachToProcess": [],
"debug.setValue": ["F2"],
"debug.jumpToSource": [],
"debug.evaluate": [],
"debug.rerun": [],
"find.rerun": [],
"usages.rerun": [],
// VCS
"vcs.operations": [],
"vcs.commit": [],
"vcs.push": [],
"vcs.commitAndPush": [],
"vcs.toggleAmend": [],
"vcs.showMessageHistory": [],
"vcs.update": [],
"vcs.rollback": [],
"vcs.addToVcs": [],
"vcs.showDiff": [],
"vcs.log.changes.showDiff": [],
"vcs.showDiffInNewWindow": [],
"vcs.nextChange": ["Alt+F5"],
"vcs.prevChange": ["Alt+Shift+F5"],
"vcs.branches": [],
"vcs.newBranch": [],
"vcs.annotate": [],
"vcs.localHistory": [],
"localHistory.recentChanges": [],
"runAnything.show": [],
"view.quickSwitchScheme": [],
// Commit tool window (change lists) and Git log; keyWhen limits them to those tool windows.
"vcs.changelist.move": [],
"vcs.shelveSilently": [],
"vcs.unshelveSilently": [],
"vcs.changelist.edit": [],
"vcs.log.copyRevision": [],
"vcs.log.goToRef": [],
"vcs.log.editMessage": [],
"vcs.log.newBranch": [],
"vcs.log.goToChild": [],
"vcs.log.goToParent": [],
"vcs.log.toggleBookmark": [],
"vcs.log.toggleBookmarkWithMnemonic": [],
// View › Appearance (VS Code: workbench.action.zoomIn / zoomOut / zoomReset)
"view.zoomIn": ["Meta+="],
"view.zoomOut": ["Meta+-"],
"view.resetZoom": [],
"editor.increaseFontSize": [],
"editor.decreaseFontSize": [],
// Editing extras, image viewer (keyWhen: image focused) and Markdown editor layouts
"code.cyclicExpandWord": [],
"code.cyclicExpandWordBackward": [],
"editor.copyReference": [],
"editor.copyPathReference": [],
"code.pasteAsPlainText": [],
"code.expressionTypeInfo": [],
"code.implementMethods": [],
"code.overrideMethods": [],
"image.zoomIn": [],
"image.zoomOut": [],
"image.actualSize": [],
"image.fitToWindow": [],
"image.toggleChessboard": [],
"markdown.editorOnly": [],
"markdown.editorAndPreview": ["Meta+K V"],
"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.showSettings": [],
"diff.focusOppositePane": [],
"diff.prevDifference": ["Shift+F7"],
"diff.jumpToSource": [],
// HTTP Client / Database console: run the request or statement at the caret.
"http.runRequest": ["Meta+Enter"],
"graphql.runQuery": ["Meta+Enter"],
"http.runAll": [],
"db.toggleBooleanCell": ["Space"],
"db.setCellNull": ["Meta+Backspace"],
"db.setCellDefault": ["Meta+Shift+Backspace"],
"db.reformatValue": ["Alt+Shift+F"],
"db.openValueWindow": [],
"db.findInValue": ["Meta+F"],
"db.execute": ["Meta+Enter"],
"db.nextResultTab": ["Meta+Alt+Right", "Meta+Shift+]"],
"db.previousResultTab": ["Meta+Alt+Left", "Meta+Shift+["],
"db.showToolWindow": [],
// Database tool window (when the tree has focus).
"db.openConsole": [],
"db.newDataSource": [],
"db.new": [],
"services.addService": [],
"github.createPullRequest": [],
"github.refresh": [],
"github.pullRequest.refresh": [],
"github.pullRequest.timeline.refresh": [],
"github.pullRequest.toggleViewed": [],
"db.properties": [],
"db.refresh": [],
"db.disconnect": [],
"db.jumpToConsole": [],
"db.editData": ["F4"],
"db.goToDdl": ["F12"],
"db.quickDoc": ["Meta+K Meta+I"],
"db.rename": ["F2"],
"db.drop": ["Meta+Backspace"],
"db.truncate": [],
"db.modifyTable": [],
"db.newTable": [],
"db.newColumn": [],
"db.copyReference": ["Meta+Alt+Shift+C"],
"db.duplicateSource": [],
"db.ddlToClipboard": [],
"db.ddlToConsole": [],
"db.runSqlScript": [],
"db.sqlScript": [],
"db.goToReferencedTable": [],
"db.selectOpened": [],
"db.expandAll": [],
"db.collapseAll": [],
// Find in Files popup (findPopupOpen): after the editor's keys, so these win while it is open.
"find.popup.nextResult": ["Meta+G"],
"find.popup.previousResult": ["Meta+Shift+G"],
"find.popup.openResult": [],
"find.popup.recentSearches": ["Alt+Down"],
// Agents (VS Code's chat: ⇧⌘I)
"agents.newTask": ["Meta+Shift+I"],
"agents.focusInput": ["Meta+L"],
"agents.cycleEffort": ["Alt+T"],
"agents.showToolWindow": [],
"agents.sendToAgent": [],
// Agents task list (when it has focus)
"agents.archiveTasks": ["Meta+Shift+E"],
// Python Console: VS Code's Shift+Enter would shadow typing in Python files, so unbound.
"python.console.executeSelection": [],
// Search fields (find bar, Find in Files): last, so they win over editor keys while one is focused.
"find.openInWindow": ["Alt+F7"],
"find.field.newLine": ["Meta+Shift+Enter"],
"find.field.recentSearches": ["Alt+Down"],
"editor.pasteHistory.paste": ["Enter"],
"editor.pasteHistory.remove": ["Delete", "Backspace"],
};