VintageEx-master下载地址:
百度云链接: http://pan.baidu.com/s/1ntIHh3r 密码: 3nrw
sublime支持文本编辑使用 vim 模式,vim 快捷键编辑文本还是挺快的,两个编辑器融合一下也挺好,选择Preferences->Settings- Default, 在文本的最下面有一行
"ignored_packages": ["vintage"]
,这里sublime 默认去掉了vim的支持,我们只需要把”vintage”删掉就好了。
再在编辑框里试试已经ok了,但是在vim里我都把ESC键映射到了’ii’上了: imap ‘ii’ ,这里并不支持imap。 不过我们可以在vintage 的package包里自己定义,我的机器是windows,默认packages都装在了 C:Documents and Settingszhengj1Application DataSublime Text 2Packages 目录下,找到VintageDefault.sublime-keymap文件,用文本编辑器打开,加上下面的代码:
{ "keys": ["i","i"], "command": "exit_insert_mode",
"context":
[
{ "key": "setting.command_mode", "operand": false },
{ "key": "setting.is_widget", "operand": false }
]
},
{ "keys": ["i","i"], "command": "hide_auto_complete", "context":
[
{ "key": "auto_complete_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["i","i"], "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" }
]
},
"context":
[
{ "key": "setting.command_mode", "operand": false },
{ "key": "setting.is_widget", "operand": false }
]
},
{ "keys": ["i","i"], "command": "hide_auto_complete", "context":
[
{ "key": "auto_complete_visible", "operator": "equal", "operand": true }
]
},
{ "keys": ["i","i"], "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" }
]
},
这个keymap文件里可以定义自己习惯的快捷键方式,有兴趣的不妨研究研究。
vintage这个插件并不支持command, 想要支持还需要下一个VintageEx 包,一些简单的命令就可以用了。