本文摘自PHP中文网,作者藏色散人,侵删。
下面由sublime教程栏目给大家介绍如何用ChainOfCommand包实现Sublime Text单一快捷键执行多重命令。
sublimeREPL是一个Sublime Text上用来构造Python IDE的很好的一个包。
配置好相应的环境之后,用网上的教程让F5作为一键编译的快捷键:
1 2 3 4 5 6 7 8 9 10 11 | [
{
"keys" :[ "f5" ],
"caption" : "SublimeREPL: Python - RUN current file" ,
"command" : "run_existing_window_command" , "args" :
{
"id" : "repl_python_run" ,
"file" : "config/Python/Main.sublime-menu"
}
}
]
|
而这种方式有个缺点,就是每次修改完代码之后必须先Ctrl+S保存之后,再按下F5才能编译最新版本的文件。
而Chain Of Command包完美解决了这一问题。
通过Package Control安装该包之后,将User Setting修改如下,便可实现按下F5先保存再编译的功能。
1 2 3 4 5 6 7 8 9 10 11 12 | {
"keys" :[ "f5" ],
"caption" : "SublimeREPL: save & Python - RUN current file" ,
"command" : "chain" ,
"args" :
{
"commands" :[
[ "save" ],
[ "run_existing_window_command" ,{ "id" : "repl_python_run" , "file" : "config/Python/Main.sublime-menu" }]
]
}
}
|
以上就是用ChainOfCommand包实现Sublime Text单一快捷键执行多重命令的详细内容,更多文章请关注木庄网络博客!
相关阅读 >>
如何解决sublime text 3无法安装package control问题
sublime如何为方法加注释快捷键
sublime text3如何设置快捷键打开浏览器
sublime怎么设置中文
sublime与vscode区别有哪些
sublime text3怎么安装sublime_merge以及sublimerge插件
sublime text3如何配置自动联想python
sublime快捷键,欢迎保存~
在浏览器中打开预览sublime text3文件
sublime text 3 常见错误及其解决办法
更多相关阅读请进入《sublime》频道 >>
转载请注明出处:木庄网络博客 » 用ChainOfCommand包实现Sublime Text单一快捷键执行多重命令