Skip to content

Instantly share code, notes, and snippets.

@AGou-ops
Last active August 5, 2022 08:18
Show Gist options
  • Save AGou-ops/cb8659d99ff47f32eeb14a81ad47a2a9 to your computer and use it in GitHub Desktop.
Save AGou-ops/cb8659d99ff47f32eeb14a81ad47a2a9 to your computer and use it in GitHub Desktop.
MacOS偏门解决vim/Neovim光标跳转(j/k键)卡顿的问题。【使用karabiner】
{
"title": "iterm2 - by: AGou-ops.cn",
"rules": [
{
"description": "Change left_shift to command+spacebar if pressed alone in iterm2",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "left_shift"
},
"to": [
{
"key_code": "left_shift"
}
],
"to_if_alone": [
{
"key_code": "spacebar",
"modifiers": [
"left_command"
]
}
],
"conditions": [
{
"type": "frontmost_application_if",
"bundle_identifiers": [
"^com\\.googlecode\\.iterm2$"
]
}
]
}
]
}
]
}
@AGou-ops
Copy link
Author

AGou-ops commented Aug 5, 2022

问题详情参考:https://blog.deskangel.com/2021/04/03/vim-j-k-speed-issue/

在iterm2中强制让英文输入法切换为内置的ABC输入法而不使用搜狗或者其他输入法的英文状态.

在使用iterm2的时候,将左shift键重新映射为command+space键(在系统快捷键中设置切换输入法的快捷键,这里你可以自定义)。
使用以下命令将上面这个键盘映射json文件导入到karabiner里面(浏览器打开就可以,会自动拉起karabiner,路径自定义。)

karabiner://karabiner/assets/complex_modifications/import?url=file:///Users/agou-ops/Desktop/iterm2.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment