Home >Development Tools >sublime >How to run sublimetest
To use Sublime Text to run code, you need to follow the following steps: Install relevant plug-ins, configure the build system, define commands to compile and run the code, set shortcut keys to facilitate running the build system, press shortcut keys or run the code example through the menu: To run Python code, you need to install the Anaconda Python plug-in, configure the build system (name: Python, command: python3 "${file_name}"), and set the shortcut key (super b).
How to use Sublime Text to run code
Sublime Text is a text editor that can be used for a variety of programming language. To run code using Sublime Text, you can follow these steps:
1. Install the Sublime Text plug-in
For most programming languages, you need to install the relevant plug-in for SublimeText. Plugins can be installed from Package Control, a package manager for managing Sublime Text plugins.
2. Configure the build system
The build system defines the commands for compiling and running code. To configure a build system:
python "${file_name}"
. 3. Set a shortcut key
You can set a shortcut key to run the build system. Go to Preferences ->Key Bindings ->Users and add the following line:
<code>{ "keys": ["super+b"], "command": "build" }</code>
This will set super b
as the shortcut key for the build command .
4. Run the code
To run the code, press the set shortcut key (such as super b
) or go to " Tools" -> "Build".
Example: Running Python code
Configure the build system:
python3 "${file_name}"
super b
super b
to run it. Note:
The above is the detailed content of How to run sublimetest. For more information, please follow other related articles on the PHP Chinese website!