当我在插入模式下按;;时,我希望在行尾插入;。在sublime-text 3中会有什么映射
就像这样:
inoremap ;; <C-o>A;在VIM中。
到目前为止,我设法找到了我目前所在的EOL,但不知道如何链接其他命令来插入;。我在文档中找不到任何关于按顺序运行多个命令的内容。
{
"keys": [";", ";"],
"command": "move_to", "args": { "to": "eol" }
}发布于 2015-01-20 05:39:06
由于我找不到任何本机到编辑器的解决方案,幸运的是有一个名为Chain of Command的插件
https://packagecontrol.io/packages/Chain%20of%20Command然后您可以将其放入用户键映射设置文件中:
{
"keys": [";", ";"],
"command": "chain",
"args": {
"commands": [
[ "move_to", { "to": "eol" }],
[ "insert", { "characters": ";" } ]
]
},
// with a help of this line, command won't get executed
// if in command_mode (vintage mode enabled), so it applies to insert mode
// only.
"context": [ { "key": "setting.command_mode", "operand": false } ]
}https://stackoverflow.com/questions/28032439
复制相似问题