Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Consistently map syntax node navigation actions on macOS (#37874)

Joseph T. Lyonscffb883108ec
diff --git a/assets/keymaps/default-linux.json b/assets/keymaps/default-linux.json
index 7c7692ac46f..6ad2244fa8a 100644
--- a/assets/keymaps/default-linux.json
+++ b/assets/keymaps/default-linux.json
@@ -493,8 +493,8 @@
"alt-down": "editor::MoveLineDown",
"ctrl-alt-shift-up": "editor::DuplicateLineUp",
"ctrl-alt-shift-down": "editor::DuplicateLineDown",
- "alt-shift-right": "editor::SelectLargerSyntaxNode", // Expand Selection
- "alt-shift-left": "editor::SelectSmallerSyntaxNode", // Shrink Selection
+ "alt-shift-right": "editor::SelectLargerSyntaxNode", // Expand selection
+ "alt-shift-left": "editor::SelectSmallerSyntaxNode", // Shrink selection
"ctrl-shift-l": "editor::SelectAllMatches", // Select all occurrences of current selection
"ctrl-f2": "editor::SelectAllMatches", // Select all occurrences of current word
"ctrl-d": ["editor::SelectNext", { "replace_newest": false }], // editor.action.addSelectionToNextFindMatch / find_under_expand
diff --git a/assets/keymaps/default-macos.json b/assets/keymaps/default-macos.json
index 8cf1217fb06..9f13fc30798 100644
--- a/assets/keymaps/default-macos.json
+++ b/assets/keymaps/default-macos.json
@@ -544,8 +544,10 @@
"alt-down": "editor::MoveLineDown",
"alt-shift-up": "editor::DuplicateLineUp",
"alt-shift-down": "editor::DuplicateLineDown",
- "ctrl-shift-right": "editor::SelectLargerSyntaxNode", // Expand Selection
- "ctrl-shift-left": "editor::SelectSmallerSyntaxNode", // Shrink Selection
+ "cmd-ctrl-left": "editor::SelectSmallerSyntaxNode", // Shrink selection
+ "cmd-ctrl-right": "editor::SelectLargerSyntaxNode", // Expand selection
+ "cmd-ctrl-up": "editor::SelectPreviousSyntaxNode", // Move selection up
+ "cmd-ctrl-down": "editor::SelectNextSyntaxNode", // Move selection down
"cmd-d": ["editor::SelectNext", { "replace_newest": false }], // editor.action.addSelectionToNextFindMatch / find_under_expand
"cmd-shift-l": "editor::SelectAllMatches", // Select all occurrences of current selection
"cmd-f2": "editor::SelectAllMatches", // Select all occurrences of current word
diff --git a/assets/keymaps/default-windows.json b/assets/keymaps/default-windows.json
index b10ac964339..9d040372c6e 100644
--- a/assets/keymaps/default-windows.json
+++ b/assets/keymaps/default-windows.json
@@ -492,8 +492,8 @@
"alt-down": "editor::MoveLineDown",
"shift-alt-up": "editor::DuplicateLineUp",
"shift-alt-down": "editor::DuplicateLineDown",
- "shift-alt-right": "editor::SelectLargerSyntaxNode", // Expand Selection
- "shift-alt-left": "editor::SelectSmallerSyntaxNode", // Shrink Selection
+ "shift-alt-right": "editor::SelectLargerSyntaxNode", // Expand selection
+ "shift-alt-left": "editor::SelectSmallerSyntaxNode", // Shrink selection
"ctrl-shift-l": "editor::SelectAllMatches", // Select all occurrences of current selection
"ctrl-f2": "editor::SelectAllMatches", // Select all occurrences of current word
"ctrl-d": ["editor::SelectNext", { "replace_newest": false }], // editor.action.addSelectionToNextFindMatch / find_under_expand