-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default key binding for "dance.seek.askObject.inner" (alt+i) doesn't work on MacOS #220
Comments
I'm having the same issue and had to change the input source to I think Essentially in |
Is there a way/example to configure Dance to use those helix type of keybindings? E.g. |
@zetashift you could remap
A more advanced approach would be to map |
Thank you! |
Added the config I'm using here |
Oh that's very nice, here is mine: "key": "m",
"command": "dance.openMenu",
"args": {
"menu": {
"items": {
"i": {
"text": "select inner object",
"command": "dance.seek.askObject.inner"
},
"a": {
"text": "select object",
"command": "dance.seek.askObject"
},
"s": {
"text": "surround around object",
"command": "dance.openMenu",
"args": {
"menu": {
"items": {
"(": {
"text": "(surround)",
"command": "dance.run",
"args": {
"input": "await replace((x) => '(' + x + ')')",
"commands": [
[
".edit.insert",
{ "where": "start", "shift": "extend", "text": "(" }
],
[
".edit.insert",
{ "where": "end", "shift": "extend", "text": ")" }
]
]
}
},
"{": {
"text": "{surround}",
"command": "dance.run",
"args": {
"input": "await replace((x) => '{' + x + '}')",
"commands": [
[
".edit.insert",
{ "where": "start", "shift": "extend", "text": "{" }
],
[
".edit.insert",
{ "where": "end", "shift": "extend", "text": "}" }
]
]
}
},
"[": {
"text": "[surround]",
"command": "dance.run",
"args": {
"input": "await replace((x) => '[' + x + ']')",
"commands": [
[
".edit.insert",
{ "where": "start", "shift": "extend", "text": "[" }
],
[
".edit.insert",
{ "where": "end", "shift": "extend", "text": "]" }
]
]
}
},
"<": {
"text": "<surround>",
"command": "dance.run",
"args": {
"input": "await replace((x) => '<' + x + '>')",
"commands": [
[
".edit.insert",
{ "where": "start", "shift": "extend", "text": "<" }
],
[
".edit.insert",
{ "where": "end", "shift": "extend", "text": ">" }
]
]
}
},
"\"": {
"text": "\"surround\"",
"command": "dance.run",
"args": {
"input": "await replace((x) => '\"' + x + '\"')",
"commands": [
[
".edit.insert",
{ "where": "start", "shift": "extend", "text": "\"" }
],
[
".edit.insert",
{ "where": "end", "shift": "extend", "text": "\"" }
]
]
}
},
"'": {
"text": "'surround'",
"command": "dance.run",
"args": {
"input": "await replace((x) => `'` + x + `'`)",
"commands": [
[
".edit.insert",
{ "where": "start", "shift": "extend", "text": "'" }
],
[
".edit.insert",
{ "where": "end", "shift": "extend", "text": "'" }
]
]
}
},
"`": {
"text": "`surround`",
"command": "dance.run",
"args": {
"input": "await replace((x) => '`' + x + '`')",
"commands": [
[
".edit.insert",
{ "where": "start", "shift": "extend", "text": "`" }
],
[
".edit.insert",
{ "where": "end", "shift": "extend", "text": "`" }
]
]
}
}
}
}
}
},
"d": {
"text": "delete surround",
"command": "dance.run",
"args": {
"input": "await replace((x) => x.slice(1, -1))",
"commands": [
".selections.save",
".selections.reduce.edges",
".edit.delete",
".selections.restore"
]
}
}
}
}
},
"when": "editorTextFocus && dance.mode == 'normal'"
},
|
|
For now the default keybindings are Kakoune's on Windows and Linux (though I'd like to change this), so I think we should keep the current command. The wiki is where we can put custom keybindings in the meantime. |
Sorry bad phrasing on my part. I meant would you consider adding a "match menu", which cover It's just not a custom key binding but a new menu/feature. |
This StackOverflow answer explains how to completely prevent Option+key from producing special characters on Mac, allowing you to use these combinations for shortcuts in VS Code and various other editors. In short:
|
Due to microsoft/vscode#41024, this key combination cannot be mapped on MacOS (as well as
alt+`,e,n,u
and possibly others)I've remapped it to
ctrl+i
but I think the defaults should also be adjustedThe text was updated successfully, but these errors were encountered: