下面由sublime教程栏目给大家介绍如何用chainofcommand包实现sublime text单一快捷键执行多重命令。

sublimeREPL是一个Sublime Text上用来构造Python IDE的很好的一个包。
配置好相应的环境之后,用网上的教程让F5作为一键编译的快捷键:
[
{
"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先保存再编译的功能。
{
"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单一快捷键执行多重命令的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号