Skip to content

Commit c8d8a3f

Browse files
committed
add more xcode action mapping
feat: add more xcode action
1 parent 55e8368 commit c8d8a3f

49 files changed

Lines changed: 1127 additions & 275 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

action-support-matrix.md

Lines changed: 107 additions & 106 deletions
Large diffs are not rendered by default.

config/action_mappings/README.md

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,15 @@ Each YAML file follows this structure:
2323
```yaml
2424
mappings:
2525
- id: "actions.category.actionName"
26-
description: "Human-readable description of what this action does"
26+
name: "A short, human-readable name for the action"
27+
description: "A longer, more detailed description of what the action does"
28+
category: "editor.editing.selection"
29+
featured: false
30+
featuredReason: "This action is widely supported and considered portable."
2731
vscode:
2832
command: "vscode.command.name"
2933
when: "contextCondition"
34+
note: "optional special note of this command"
3035
zed:
3136
action: "zed::Action"
3237
context: "ContextName"
@@ -40,13 +45,17 @@ mappings:
4045
4146
### Field Definitions
4247
43-
- **`id`**: Unique universal action identifier following the pattern `actions.category.actionName`
44-
- **`description`**: Clear, human-readable explanation of what the action does
45-
- **Editor-specific sections**:
46-
- **VSCode**: `command` (the VSCode command ID) and optional `when` clause
47-
- **Zed**: `action` (the Zed action name) and `context` (when the action is available)
48-
- **IntelliJ**: `action` (IntelliJ action ID) and optional `context`
49-
- **Vim**: `command` (vim command/key sequence) and `mode` (vim mode where applicable)
48+
- **`id`**: Unique universal action identifier following the pattern `actions.category.actionName`.
49+
- **`name`**: A short, human-readable name for the action.
50+
- **`description`**: A clear, human-readable explanation of what the action does.
51+
- **`category`**: The category of the action, used for grouping and organization.
52+
- **`featured`**: A boolean indicating if the action is not widely portable across editors. Set to `true` for editor-specific or non-standard actions.
53+
- **`featuredReason`**: An explanation for why an action is `featured`, or a recommendation to use a more portable alternative.
54+
- **Editor-specific sections** (`vscode`, `zed`, `intellij`, `vim`, `helix`, `xcode`):
55+
- These sections contain the specific implementation details for each editor. For editors that support multiple configurations for a single action (like VSCode), this is a list of mappings.
56+
- **`disableImport`** (optional): If `true`, this mapping will only be used for exporting keymaps and will be ignored during import.
57+
- **`notSupported`** (optional): If `true`, this action is explicitly marked as not supported for the editor.
58+
- **`notSupportedReason`** (optional): A string explaining why the action is not supported.
5059

5160
## Supported Editors
5261

config/action_mappings/clipboard.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@ mappings:
2323
helix:
2424
command: "delete_selection"
2525
mode: "insert"
26+
xcode:
27+
action: "cut:"
28+
alternate: "NO"
29+
commandGroupID: "Xcode.IDEKit.CmdDefinition.Cut"
30+
commandID: "Xcode.IDEKit.CmdDefinition.Cut"
31+
group: "Edit Menu"
32+
groupID: "Xcode.IDEKit.MenuDefinition.Main"
33+
groupedAlternate: "NO"
34+
navigation: "NO"
35+
title: "Cut"
2636
- id: "actions.clipboard.copy"
2737
name: "Copy text"
2838
description: "Copy selected text/file"
@@ -57,6 +67,17 @@ mappings:
5767
helix:
5868
command: "yank_to_clipboard"
5969
mode: "insert"
70+
xcode:
71+
action: "copy:"
72+
alternate: "NO"
73+
commandGroupID: "Xcode.IDEKit.CmdDefinition.Copy"
74+
commandID: "Xcode.IDEKit.CmdDefinition.Copy"
75+
group: "Edit Menu"
76+
groupID: "Xcode.IDEKit.MenuDefinition.Main"
77+
groupedAlternate: "NO"
78+
navigation: "NO"
79+
parentTitle: "Copy"
80+
title: "Copy"
6081
- id: "actions.clipboard.paste"
6182
name: "Paste text"
6283
description: "Paste text/file"
@@ -108,3 +129,5 @@ mappings:
108129
action: "CopyPaths"
109130
helix:
110131
notSupported: true
132+
xcode:
133+
notSupported: true

config/action_mappings/cursor.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ mappings:
1313
context: "Editor"
1414
helix:
1515
notSupported: true
16+
xcode:
17+
notSupported: false

config/action_mappings/cursor_file.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ mappings:
1414
helix:
1515
command: "goto_file_start"
1616
mode: "insert"
17+
xcode:
18+
textAction: "scrollToBeginningOfDocument:"
1719
- id: "actions.cursor.moveToBottom"
1820
name: "Move to bottom"
1921
description: "Move caret to text end"
@@ -29,6 +31,8 @@ mappings:
2931
helix:
3032
command: "goto_file_end"
3133
mode: "insert"
34+
xcode:
35+
textAction: "scrollToEndOfDocument:"
3236
- id: "actions.cursor.moveToTopSelect"
3337
name: "Select to top"
3438
description: "Select from cursor to text start"

config/action_mappings/cursor_word.yaml

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# TODO(xinnjie): distinct move cursor backward/left and move word forward/right, backward != left, some languages use backward as right
12
mappings:
23
- id: "actions.cursor.wordRight"
34
name: "Move to next word"
@@ -14,6 +15,8 @@ mappings:
1415
helix:
1516
command: "move_next_word_end"
1617
mode: "insert"
18+
xcode:
19+
textAction: "moveWordForward:"
1720
- id: "actions.cursor.wordPartRight"
1821
name: "Move to next subword"
1922
description: "Move cursor to the end of the next subword (hump)"
@@ -26,10 +29,12 @@ mappings:
2629
context: "Editor"
2730
intellij:
2831
notSupported: true
29-
notSupportedReason: "intellij need to turn on `CamelHumps` setting"
32+
note: "intellij need to turn on `CamelHumps` setting"
3033
helix:
3134
command: "move_next_sub_word_start"
3235
mode: "insert"
36+
xcode:
37+
textAction: "moveSubWordForward:"
3338
- id: "actions.cursor.wordLeft"
3439
name: "Move to previous word"
3540
description: "Move cursor to the start of the previous word"
@@ -45,6 +50,8 @@ mappings:
4550
helix:
4651
command: "move_prev_word_start"
4752
mode: "insert"
53+
xcode:
54+
textAction: "moveWordBackward:"
4855
- id: "actions.cursor.wordPartLeft"
4956
name: "Move to previous subword"
5057
description: "Move cursor to the start of the previous subword (hump)"
@@ -57,10 +64,12 @@ mappings:
5764
context: "Editor"
5865
intellij:
5966
notSupported: true
60-
notSupportedReason: "intellij need to turn on `CamelHumps` setting"
67+
note: "intellij need to turn on `CamelHumps` setting"
6168
helix:
6269
command: "move_prev_sub_word_start"
6370
mode: "insert"
71+
xcode:
72+
textAction: "moveSubWordBackward:"
6473
- id: "actions.cursor.wordRightSelect"
6574
name: "Select next word"
6675
description: "Select to the end of the next word"
@@ -75,7 +84,9 @@ mappings:
7584
action: "EditorNextWordWithSelection"
7685
helix:
7786
notSupported: true
78-
notSupportedReason: "helix move cursor with selection by default"
87+
note: "helix move cursor with selection by default"
88+
xcode:
89+
textAction: "moveWordForwardAndModifySelection:"
7990
- id: "actions.cursor.wordPartRightSelect"
8091
name: "Select next subword"
8192
description: "Select to the end of the next subword (hump)"
@@ -88,9 +99,11 @@ mappings:
8899
context: "Editor"
89100
intellij:
90101
notSupported: true
91-
notSupportedReason: "intellij need to turn on `CamelHumps` setting"
102+
note: "intellij need to turn on `CamelHumps` setting"
92103
helix:
93104
notSupported: true
105+
xcode:
106+
textAction: "moveSubWordForwardAndModifySelection:"
94107
- id: "actions.cursor.wordLeftSelect"
95108
name: "Select previous word"
96109
description: "Select to the start of the previous word"
@@ -105,7 +118,9 @@ mappings:
105118
action: "EditorPreviousWordWithSelection"
106119
helix:
107120
notSupported: true
108-
notSupportedReason: "helix move cursor with selection by default"
121+
note: "helix move cursor with selection by default"
122+
xcode:
123+
textAction: "moveWordBackwardAndModifySelection:"
109124
- id: "actions.cursor.wordPartLeftSelect"
110125
name: "Select previous subword"
111126
description: "Select to the start of the previous subword (hump)"
@@ -118,7 +133,9 @@ mappings:
118133
context: "Editor"
119134
intellij:
120135
notSupported: true
121-
notSupportedReason: "intellij need to turn on `CamelHumps` setting"
136+
note: "intellij need to turn on `CamelHumps` setting"
122137
helix:
123138
notSupported: true
124-
notSupportedReason: "helix move cursor with selection by default"
139+
note: "helix move cursor with selection by default"
140+
xcode:
141+
textAction: "moveSubWordBackwardAndModifySelection:"

config/action_mappings/debug.yaml

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,16 @@ mappings:
1313
helix:
1414
command: "dap_launch"
1515
mode: "insert"
16+
xcode:
17+
action: "runActiveRunContext:"
18+
alternate: "NO"
19+
commandGroupID: "Xcode.IDEKit.CmdDefinition.Run"
20+
commandID: "Xcode.IDEKit.CmdDefinition.Run"
21+
group: "Product Menu"
22+
groupID: "Xcode.IDEKit.MenuDefinition.Main"
23+
groupedAlternate: "NO"
24+
navigation: "NO"
25+
title: "Run"
1626
- id: "actions.run.stopDebugging"
1727
name: "Stop debugging"
1828
description: "Stop Debugging"
@@ -27,6 +37,9 @@ mappings:
2737
helix:
2838
command: "dap_terminate"
2939
mode: "insert"
40+
xcode:
41+
notSupported: true
42+
note: "Use `Start debugging` instead"
3043
- id: "actions.run.restartDebugging"
3144
name: "Restart debugging"
3245
description: "Restart Debugging"
@@ -42,6 +55,16 @@ mappings:
4255
helix:
4356
command: "dap_restart"
4457
mode: "insert"
58+
xcode:
59+
action: "cancelCurrentExecution:"
60+
alternate: "NO"
61+
commandGroupID: "Xcode.IDEKit.CmdDefinition.Stop"
62+
commandID: "Xcode.IDEKit.CmdDefinition.Stop"
63+
group: "Product Menu"
64+
groupID: "Xcode.IDEKit.MenuDefinition.Main"
65+
groupedAlternate: "NO"
66+
navigation: "NO"
67+
title: "Stop"
4568
- id: "actions.run.toggleBreakpoint"
4669
name: "Toggle breakpoint"
4770
description: "Toggle Breakpoint"
@@ -57,6 +80,17 @@ mappings:
5780
helix:
5881
command: "dap_toggle_breakpoint"
5982
mode: "insert"
83+
xcode:
84+
action: "toggleBreakpointAtCurrentLine:"
85+
alternate: "NO"
86+
commandGroupID: "Xcode.IDEKit.CmdDefinition.ToggleBreakpointAtCurrentLine"
87+
commandID: "Xcode.IDEKit.CmdDefinition.ToggleBreakpointAtCurrentLine"
88+
group: "Debug Menu"
89+
groupID: "Xcode.IDEKit.MenuDefinition.Main"
90+
groupedAlternate: "NO"
91+
navigation: "NO"
92+
parentTitle: "Breakpoints"
93+
title: "Create Breakpoint at Current Line"
6094
- id: "actions.view.showDebugOutputConsole"
6195
name: "Show debug console"
6296
description: "Show Debug Output Console view"
@@ -68,9 +102,9 @@ mappings:
68102
when: "workbench.panel.repl.view.active"
69103
zed:
70104
notSupported: true
71-
notSupportedReason: "zed do not have debug console"
105+
note: "zed do not have debug console"
72106
intellij:
73107
notSupported: true
74-
notSupportedReason: "intellij have debug output with DebugPanel"
108+
note: "intellij have debug output with DebugPanel"
75109
helix:
76110
notSupported: true

config/action_mappings/debug_eval.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ mappings:
1313
context: "Workspace"
1414
helix:
1515
notSupported: true
16+
xcode:
17+
notSupported: true

config/action_mappings/debug_step.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,16 @@ mappings:
3939
helix:
4040
command: "dap_step_in"
4141
mode: "insert"
42+
xcode:
43+
action: "stepInto:"
44+
alternate: "NO"
45+
commandGroupID: "Xcode.IDEKit.CmdDefinition.StepInto"
46+
commandID: "Xcode.IDEKit.CmdDefinition.StepInto"
47+
group: "Debug Menu"
48+
groupID: "Xcode.IDEKit.MenuDefinition.Main"
49+
groupedAlternate: "NO"
50+
navigation: "NO"
51+
title: "Step Into"
4252
- id: "actions.run.stepOut"
4353
name: "Step out"
4454
description: "Step Out"
@@ -78,6 +88,16 @@ mappings:
7888
helix:
7989
command: "dap_continue"
8090
mode: "insert"
91+
xcode:
92+
action: "pauseOrContinue:"
93+
alternate: "NO"
94+
commandGroupID: "Xcode.IDEKit.CmdDefinition.PauseContinue"
95+
commandID: "Xcode.IDEKit.CmdDefinition.PauseContinue"
96+
group: "Debug Menu"
97+
groupID: "Xcode.IDEKit.MenuDefinition.Main"
98+
groupedAlternate: "NO"
99+
navigation: "NO"
100+
title: "Pause / Continue"
81101
- id: "actions.run.runToCursor"
82102
name: "Run to cursor"
83103
description: "Run to Cursor"

config/action_mappings/diff.yaml

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,36 @@ mappings:
2323
zed:
2424
action: "editor::GoToNextChange"
2525
context: "Editor && mode == full"
26+
xcode:
27+
- action: "jumpToNextChange:"
28+
alternate: "NO"
29+
commandGroupID: "Xcode.IDEPegasusSourceEditor.CmdDefinition.JumpToNextChange"
30+
commandID: "Xcode.IDEPegasusSourceEditor.CmdDefinition.JumpToNextChange"
31+
group: "Navigate Menu for Asset Catalog Comparison"
32+
groupID: "Xcode.IDEPegasusSourceEditor.MenuDefinition.Navigate"
33+
groupedAlternate: "NO"
34+
navigation: "NO"
35+
title: "Jump to Next Change"
36+
disableImport: true
37+
- action: "jumpToNextChange:"
38+
alternate: "NO"
39+
commandGroupID: "Xcode.IDEPegasusSourceEditor.CmdDefinition.JumpToNextChange"
40+
commandID: "Xcode.IDEPegasusSourceEditor.CmdDefinition.JumpToNextChange"
41+
group: "Navigate Menu for Commit Sheet"
42+
groupID: "Xcode.IDEPegasusSourceEditor.MenuDefinition.Navigate"
43+
groupedAlternate: "NO"
44+
navigation: "NO"
45+
title: "Jump to Next Change"
46+
disableImport: true
47+
- action: "jumpToNextChange:"
48+
alternate: "NO"
49+
commandGroupID: "Xcode.IDEPegasusSourceEditor.CmdDefinition.JumpToNextChange"
50+
commandID: "Xcode.IDEPegasusSourceEditor.CmdDefinition.JumpToNextChange"
51+
group: "Navigate Menu for Source Code"
52+
groupID: "Xcode.IDEPegasusSourceEditor.MenuDefinition.Navigate"
53+
groupedAlternate: "NO"
54+
navigation: "NO"
55+
title: "Jump to Next Change"
2656
- id: "actions.diff.previousChange"
2757
name: "Previous change"
2858
description: "Go to previous change in compare editor"
@@ -32,7 +62,36 @@ mappings:
3262
when: "textCompareEditorVisible"
3363
intellij:
3464
action: "PreviousDiff"
35-
# TODO(xinnjie): compare editor not available in zed?
3665
zed:
3766
action: "editor::GoToPreviousChange"
3867
context: "Editor && mode == full"
68+
xcode:
69+
- action: "jumpToPreviousChange:"
70+
alternate: "NO"
71+
commandGroupID: "Xcode.IDEPegasusSourceEditor.CmdDefinition.JumpToPreviousChange"
72+
commandID: "Xcode.IDEPegasusSourceEditor.CmdDefinition.JumpToPreviousChange"
73+
group: "Navigate Menu for Asset Catalog Comparison"
74+
groupID: "Xcode.IDEPegasusSourceEditor.MenuDefinition.Navigate"
75+
groupedAlternate: "NO"
76+
navigation: "NO"
77+
title: "Jump to Previous Change"
78+
disableImport: true
79+
- action: "jumpToPreviousChange:"
80+
alternate: "NO"
81+
commandGroupID: "Xcode.IDEPegasusSourceEditor.CmdDefinition.JumpToPreviousChange"
82+
commandID: "Xcode.IDEPegasusSourceEditor.CmdDefinition.JumpToPreviousChange"
83+
group: "Navigate Menu for Commit Sheet"
84+
groupID: "Xcode.IDEPegasusSourceEditor.MenuDefinition.Navigate"
85+
groupedAlternate: "NO"
86+
navigation: "NO"
87+
title: "Jump to Previous Change"
88+
disableImport: true
89+
- action: "jumpToPreviousChange:"
90+
alternate: "NO"
91+
commandGroupID: "Xcode.IDEPegasusSourceEditor.CmdDefinition.JumpToPreviousChange"
92+
commandID: "Xcode.IDEPegasusSourceEditor.CmdDefinition.JumpToPreviousChange"
93+
group: "Navigate Menu for Source Code"
94+
groupID: "Xcode.IDEPegasusSourceEditor.MenuDefinition.Navigate"
95+
groupedAlternate: "NO"
96+
navigation: "NO"
97+
title: "Jump to Previous Change"

0 commit comments

Comments
 (0)