我想在Sublime文本中练习VIM时强迫自己使用hjkl进行导航。即我想映射光标键在插入模式下什么都不做。
答案 0 :(得分:2)
在“Packages / User / Default.sublime-keymap”中添加以下行。
[
{"keys": ["up"], "command": "pass",
"context": [{ "key": "setting.command_mode", "operand": false }]},
{"keys": ["down"], "command": "pass",
"context": [{ "key": "setting.command_mode", "operand": false }]},
{"keys": ["left"], "command": "pass",
"context": [{ "key": "setting.command_mode", "operand": false }]},
{"keys": ["right"], "command": "pass",
"context": [{ "key": "setting.command_mode", "operand": false }]}
]
(如果您已有文件,请在文件的最后一个]之前插入{“keys”...}]}行。)