Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to use ChainOfCommand package to implement Sublime Text single Shortcut to execute multiple commands

Shulou Source: shulou.com Published: 2022-06-02 16:22:00 09月28日 Update

Editor to share with you how to use ChainOfCommand package to achieve Sublime Text single shortcut key execution of multiple commands, I believe that most people do not know much, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!

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 appropriate environment, use the online tutorials to use F5 as an one-click compilation shortcut:

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

The drawback of this approach is that every time you modify the code, you must save it by Ctrl+S before pressing F5 to compile the latest version of the file.

And the Chain Of Command package solves this problem perfectly.

After installing the package through Package Control, modify the User Setting as follows to achieve 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"}]}} these are all the contents of the article "how to use the ChainOfCommand package to implement Sublime Text single shortcut to execute multiple commands" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Keyboard shortcuts commands articles compilation content not much code functions most of them that is tutorials files methods more versions environment knowledge shortcomings industry information Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Huawei Docker MySQL Apple