I like to escape insert mode using:
imap jj <Esc>
in my .vimrc file. Is there any way to do this on Xcode 13?
I like to escape insert mode using:
imap jj <Esc>
in my .vimrc file. Is there any way to do this on Xcode 13?
For the time being you can use: https://bryce.co/xcode-vim-map/
But @apple please do it officially. Bring .vimrc.
Xcode doesn't support .vimrc, this is so frustrated.
try out Karabiner, you can download it from github.
add below to the json file under ~/.config/karabiner, then you can use jk to jump out of INSERT mode, or change it to your favorite combination.
{
"description": "jk to escape for xcode",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"com.apple.dt.Xcode"
],
"type": "frontmost_application_if"
},
{
"name": "j_pressed",
"type": "variable_unless",
"value": 1
}
],
"from": {
"key_code": "j"
},
"parameters": {
"basic.to_delayed_action_delay_milliseconds": 500
},
"to": [
{
"set_variable": {
"name": "j_pressed",
"value": 1
}
}
],
"to_delayed_action": {
"to_if_invoked": [
{
"set_variable": {
"name": "j_pressed",
"value": 0
}
}
]
},
"type": "basic"
},
{
"conditions": [
{
"bundle_identifiers": [
"com.apple.dt.Xcode"
],
"type": "frontmost_application_if"
},
{
"name": "j_pressed",
"type": "variable_if",
"value": 1
}
],
"from": {
"key_code": "k"
},
"to": [
{
"set_variable": {
"name": "j_pressed",
"value": 0
}
},
{
"key_code": "escape",
"modifiers": [
]
}
],
"type": "basic"
}
]
}