дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-05 17:47:08 +02:00
feat(keymap): add Visual Studio and ReSharper keymap presets
Settings › Keymap gains Visual Studio and ReSharper presets (Windows/Linux and macOS), generated from JetBrains' Visual Studio and ReSharper keymaps with the same parent chain: Visual Studio builds on the IntelliJ preset of the OS, ReSharper on Visual Studio. Where a preset gives a key to another action, inherited bindings of context-free actions on that key are dropped so the key does one thing. IDEA_ACTIONS gains 64 standard IDEA action ids (Resume, StepOver, FindNext, CompileDirty, SwitchHeaderSource, …), which also helps imported IDEA keymaps and IdeaVim's :action, and imported keymaps based on Visual Studio, ReSharper or NetBeans now pick that preset as their parent.
Цей коміт міститься в:
1 джерело
8f1d2afb0c
коміт
f07b2fbcb6
8 files changed
+608
-2
No files matched your search
@@ -31,10 +31,13 @@ export interface ImportedIdeaKeymap {
|
||||
/** IDEA's bundled keymap names (`<keymap name=…>`) → our presets. */
|
||||
function presetOf(parent: string | null): string {
|
||||
const p = parent ?? "";
|
||||
// "Mac OS X 10.5+", "Eclipse (Mac OS X)", "VSCode (macOS)"; not the "mac" inside "Emacs".
|
||||
const mac = /\bmac(?: ?os)?\b/i.test(p);
|
||||
// "Mac OS X 10.5+", "Eclipse (Mac OS X)", "VSCode (macOS)", "Visual Studio OSX"; not the "mac" inside "Emacs".
|
||||
const mac = /\bmac(?: ?os)?\b|\bosx\b/i.test(p);
|
||||
if (/^eclipse/i.test(p)) return mac ? "eclipse-macos" : "eclipse-windows";
|
||||
if (/^vs ?code/i.test(p)) return mac ? "vscode-macos" : "vscode-windows";
|
||||
if (/^netbeans/i.test(p)) return mac ? "netbeans-macos" : "netbeans-windows";
|
||||
if (/^visual studio/i.test(p)) return mac ? "visualstudio-macos" : "visualstudio-windows";
|
||||
if (/^resharper/i.test(p)) return mac ? "resharper-macos" : "resharper-windows";
|
||||
if (mac) return "intellij-macos";
|
||||
// IDEA's Emacs keymap (and copies of it) inherits $default.
|
||||
if (p === "$default" || /^default for/i.test(p) || /^emacs\b/i.test(p)) return "intellij-windows";
|
||||
|
||||
Reference in new issue
Заблокувати користувача