2

我想强迫自己在 Sublime 文本中练习 VIM 时使用 hjkl 进行导航。即我想映射光标键在插入模式下什么都不做。

4

1 回答 1

3

在“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" ... }]} 行。)

于 2012-12-21T00:17:35.843 回答