From 842fe398d7571df015cd57399272ecfaa7bded0d Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Thu, 6 Mar 2025 02:42:13 +0000 Subject: [PATCH] fix(cursor): add alt keybinds for ctrl+f/b/n/p keys --- cursor/keybindings.json | 48 +++++++++++++++++++++++++++++++++++++++++ cursor/settings.json | 3 +++ 2 files changed, 51 insertions(+) diff --git a/cursor/keybindings.json b/cursor/keybindings.json index 1ddf787..2952984 100644 --- a/cursor/keybindings.json +++ b/cursor/keybindings.json @@ -29,6 +29,10 @@ "key": "cmd+0", "command": "workbench.action.zoomReset" }, + { // Toggle sidebar visibility. + "key": "ctrl+s", + "command": "workbench.action.toggleSidebarVisibility" + }, // // =========================================================================== // MARK: Window Tabs @@ -54,6 +58,14 @@ "key": "ctrl+z ctrl+p", "command": "workbench.action.showPreviousWindowTab" }, + { // Go to previous window tab. + // + // This is a workaround for ctrl+p not working globally as up arrow in + // all input fields. This relies on Karabiner-Elements to remap ctrl+p to + // up arrow. + "key": "ctrl+z up", + "command": "workbench.action.showPreviousWindowTab" + }, { // Go to previous window tab. "key": "shift+cmd+[", "command": "workbench.action.showPreviousWindowTab" @@ -97,6 +109,15 @@ "command": "file-browser.open", "when": "editorTextFocus" }, + { // Open file via file browser extension. + // + // This is a workaround for ctrl+f not working globally as right arrow in + // all input fields. This relies on Karabiner-Elements to remap ctrl+f to + // right arrow. + "key": "ctrl+x right", + "command": "file-browser.open", + "when": "editorTextFocus" + }, { // Open quick open. "key": "ctrl+x ctrl+;", "command": "workbench.action.quickOpen" @@ -120,6 +141,15 @@ "command": "workbench.action.showAllEditorsByMostRecentlyUsed", "when": "!terminalFocus" }, + { // Show all editors by most recently used. + // + // This is a workaround for ctrl+b not working globally as left arrow in + // all input fields. This relies on Karabiner-Elements to remap ctrl+b to + // left arrow. + "key": "ctrl+x left", + "command": "workbench.action.showAllEditorsByMostRecentlyUsed", + "when": "!terminalFocus" + }, { // Close active editor. "key": "ctrl+x ctrl+k", "command": "workbench.action.closeActiveEditor", @@ -433,6 +463,15 @@ "command": "editor.action.formatDocument", "when": "editorTextFocus && !editorReadonly" }, + { // Format document. + // + // This is a workaround for ctrl+f not working globally as right arrow in + // all input fields. This relies on Karabiner-Elements to remap ctrl+f to + // right arrow. + "key": "ctrl+c right", + "command": "editor.action.formatDocument", + "when": "editorTextFocus && !editorReadonly" + }, { // Duplicate selection. "key": "ctrl+x ctrl+d", "command": "editor.action.duplicateSelection" @@ -627,6 +666,15 @@ "command": "macros.runTestDebugFailTests", "when": "editorTextFocus" }, + { // Debug failed tests. + // + // This is a workaround for ctrl+f not working globally as right arrow in + // all input fields. This relies on Karabiner-Elements to remap ctrl+f to + // right arrow. + "key": "ctrl+c right", + "command": "macros.runTestDebugFailTests", + "when": "editorTextFocus" + }, { // Debug last run. "key": "ctrl+c , d", "command": "macros.runTestDebugLastRun", diff --git a/cursor/settings.json b/cursor/settings.json index 1be482f..7fa9728 100644 --- a/cursor/settings.json +++ b/cursor/settings.json @@ -66,6 +66,9 @@ // Modified Tabs "workbench.editor.highlightModifiedTabs": true, // + // Accessibility + "editor.accessibilitySupport": "off", + // // =========================================================================== // MARK: Workbench // ===========================================================================