feat(cursor): add prev/next paragrapn alt+a/e keybindings

This commit is contained in:
2025-02-21 23:11:42 +00:00
parent 89aeb4a960
commit edd534d50e
2 changed files with 118 additions and 68 deletions

View File

@@ -216,6 +216,23 @@
// Text navigation
// ===========================================================================
//
{ // Forward paragraph.
"key": "alt+e",
"command": "emacs-mcx.forwardParagraph",
"when": "editorTextFocus && !suggestWidgetVisible"
},
{ // Forward paragraph.
// This is a workaround for alt+e not working in VSCode. Relies on
// Karabiner-Elements to remap alt+e to cmd+alt+right.
"key": "cmd+alt+right",
"command": "emacs-mcx.forwardParagraph",
"when": "editorTextFocus && !suggestWidgetVisible"
},
{ // Backward paragraph.
"key": "alt+a",
"command": "emacs-mcx.backwardParagraph",
"when": "editorTextFocus && !suggestWidgetVisible"
},
{ // Go to symbol definition.
"key": "ctrl+t",
"command": "workbench.action.gotoSymbol",

View File

@@ -1,71 +1,104 @@
{
"description": "VSCode alt keybindings workaround",
"manipulators": [
"description": "VSCode alt keybindings workaround",
"manipulators": [
{
"conditions": [
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.microsoft\\.VSCode",
"^com\\.todesktop\\."
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "i",
"modifiers": {
"mandatory": [
"option"
],
"optional": [
"caps_lock",
"shift"
]
}
},
"to": [
{
"key_code": "up_arrow",
"modifiers": [
"left_option",
"left_command"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.microsoft\\.VSCode",
"^com\\.todesktop\\."
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "n",
"modifiers": {
"mandatory": [
"option"
],
"optional": [
"caps_lock",
"shift"
]
}
},
"to": [
{
"key_code": "down_arrow",
"modifiers": [
"left_option",
"left_command"
]
}
],
"type": "basic"
"bundle_identifiers": [
"^com\\.microsoft\\.VSCode",
"^com\\.todesktop\\."
],
"type": "frontmost_application_if"
}
]
}
],
"from": {
"key_code": "i",
"modifiers": {
"mandatory": [
"option"
],
"optional": [
"caps_lock",
"shift"
]
}
},
"to": [
{
"key_code": "up_arrow",
"modifiers": [
"left_option",
"left_command"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.microsoft\\.VSCode",
"^com\\.todesktop\\."
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "n",
"modifiers": {
"mandatory": [
"option"
],
"optional": [
"caps_lock",
"shift"
]
}
},
"to": [
{
"key_code": "down_arrow",
"modifiers": [
"left_option",
"left_command"
]
}
],
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.microsoft\\.VSCode",
"^com\\.todesktop\\."
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "e",
"modifiers": {
"mandatory": [
"option"
],
"optional": [
"caps_lock",
"shift"
]
}
},
"to": [
{
"key_code": "right_arrow",
"modifiers": [
"left_option",
"left_command"
]
}
],
"type": "basic"
}
]
}