vscode:
{
"vim.easymotion": true,
"vim.sneak": true,
"vim.incsearch": true,
"vim.useSystemClipboard": true,
"vim.useCtrlKeys": true,
"vim.hlsearch": true,
"vim.insertModeKeyBindings": [
{
"before": ["j","j"],//将jj与<Esc>绑定为normal模式
// "before":["<ctrl>","["],
"after": ["<Esc>"]
}
],
"vim.otherModesKeyBindingsNonRecursive": [
{
"before": ["<leader>","d"],
"after": ["d", "d"]
},
{
"before":["<C-n>"],
"after":[],
"commands": [
{
"command": ":nohl"
}
]
}
],
"vim.leader": "<space>",
"vim.handleKeys":{
"<C-a>": false,
"<C-f>": false
}
}
vim:
启用vim:
在菜单栏中: Preferences -> Setting - User ,即可打开配置文件进行编辑,将 ignored_packages 项的[]里面内容清空:
“ignored_packages”:
[
],
修改Esc快捷键:
首先安装sublime安装目录找到Packages,再找到 Vintage.sublime-package这个包,加上一个能压缩的后缀如(.zip),
然后打开后找到Default.sublime-keymap 文件,最后打开这个文件,搜索exit_insert_mode,在2,10,19,25行修改切换成normal模式,把escape即ESC改为jj。
{ "keys": ["ctrl+["], "command": "exit_insert_mode",
"context":
[
{ "key": "setting.command_mode", "operand": false },
{ "key": "setting.is_widget", "operand": false }
]
},
{ "keys": ["ctrl+["], "command": "exit_visual_mode",
"context":
[
{ "key": "setting.command_mode"},
{ "key": "num_selections", "operand": 1},
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": false }
]
},
{ "keys": ["ctrl+["], "command": "hide_auto_complete", "context":
[
{ "key": "auto_complete_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["ctrl+["], "command": "vi_cancel_current_action", "context":
[
{ "key": "setting.command_mode" },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": false },
{ "key": "vi_has_input_state" }
]
},
{ "keys": ["j", "j"], "command": "exit_insert_mode",
"context":
[
{ "key": "setting.command_mode", "operand": false },
{ "key": "setting.is_widget", "operand": false },
{ "key": "setting.vintage_ctrl_keys" }
]
},
{ "keys": ["j", "j"], "command": "exit_visual_mode",
"context":
[
{ "key": "setting.command_mode"},
{ "key": "num_selections", "operand": 1},
{ "key": "selection_empty", "operator": "equal", "operand": false, "match_all": false },
{ "key": "setting.vintage_ctrl_keys" }
]
},
{ "keys": ["j", "j"], "command": "vi_cancel_current_action", "context":
[
{ "key": "setting.command_mode" },
{ "key": "vi_has_input_state" },
{ "key": "selection_empty", "operator": "equal", "operand": true, "match_all": false },
{ "key": "setting.vintage_ctrl_keys" }
]
},