在Sublime Text 2中,是否可以重新映射空间以保存为老式模式?


0

我一直在尝试在Sublime Text 2中重新创建我的Vim设置。我最想使用的命令之一是映射空间+在常规/命令模式下保存的空间。在Vim中,我具有以下键绑定:

no <space><space> :wa<cr>

在Sublime中,我尝试了几项没有成功的事情:

{ "keys": [" ", " "], "command": "save" }

{ "keys": [" ", " "], "command": "save",
    "context":
    [
        { "key": "setting.command_mode", "operand": false },
        { "key": "setting.is_widget", "operand": false },
        { "key": "setting.vintage_ctrl_keys" }
    ]
},

以及前两个," ""space"s 代替s。

有什么想法,还是在Sublime中不可能?


为什么使用vim标签?
romainl

Answers:


0

好吧,我发现了问题。我已经将Vintage模式的所有默认键绑定复制到我的用户键映射文件中,以便进行修补。我将自定义绑定放在文件的顶部,中间是该绑定:

{ "keys": [" "], "command": "set_motion", "args": {
    "motion": "vi_move_by_characters",
    "motion_args": {"forward": true, "extend": true, "visual": false },
    "clip_to_line": true },
    "context": [{"key": "setting.command_mode"}]
},

问题解决了!

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.