PHP8.1.21版本已发布
vue8.1.21版本已发布
jquery8.1.21版本已发布

用ChainOfCommand包实现Sublime Text单一快捷键执行多重命令

藏色散人
藏色散人 转载
2019-11-01 11:51:57 3120浏览

下面由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中文网其它相关文章!

声明:本文转载于:segmentfault,如有侵犯,请联系admin@php.cn删除