Home > Development Tools > sublime > body text

Use ChainOfCommand package to implement Sublime Text single shortcut key to execute multiple commands

藏色散人
Release: 2019-11-01 11:51:57
forward
3474 people have browsed it

The following tutorial column from sublime will introduce how to use the ChainOfCommand package to implement Sublime Text with a single shortcut key to execute multiple commands.

Use ChainOfCommand package to implement Sublime Text single shortcut key to execute multiple commands

sublimeREPL is a good package for constructing Python IDE on Sublime Text.

After configuring the corresponding environment, use the online tutorial to use F5 as the shortcut key for one-click compilation:

[ 
    {
        "keys":["f5"],
        "caption": "SublimeREPL: Python - RUN current file",
        "command": "run_existing_window_command", "args":
        {
            "id": "repl_python_run",
            "file": "config/Python/Main.sublime-menu"
        }
    }
]
Copy after login

The disadvantage of this method is that it must be modified every time after modifying the code. Press Ctrl S to save, and then press F5 to compile the latest version of the file.

The Chain Of Command package perfectly solves this problem.

After installing the package through Package Control, modify the User Setting as follows to realize the function of pressing F5 to save and then compile.

{
        "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"}]
            ]
        }
    }
Copy after login

The above is the detailed content of Use ChainOfCommand package to implement Sublime Text single shortcut key to execute multiple commands. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template