Skip to content

Instantly share code, notes, and snippets.

@xuboying
Created May 5, 2018 08:31
Show Gist options
  • Select an option

  • Save xuboying/cce3e438527e4f0d4359da3aafc24ec7 to your computer and use it in GitHub Desktop.

Select an option

Save xuboying/cce3e438527e4f0d4359da3aafc24ec7 to your computer and use it in GitHub Desktop.
Karabiner-Elements complex_modifications rules for macvim
put file in /tmp/macvim.json
Open following link in browser(e.g ff)
karabiner://karabiner/assets/complex_modifications/import?url=file%3A%2F%2F%2Ftmp%2Fmacvim.json
{
"title": "CONTROL <=> CMD in Macvim",
"rules": [
{
"description": "Swap control and command in macvim",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_control",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_gui"
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^org\\.vim\\.MacVim"
]
}
]
},
{
"type": "basic",
"from": {
"key_code": "left_gui",
"modifiers": {
"optional": [
"any"
]
}
},
"to": [
{
"key_code": "left_control"
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^org\\.vim\\.MacVim"
]
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment