Home > Article > Development Tools > How to run programs in sublime
There are several ways to run programs in Sublime Text: Use the keyboard shortcut (Windows/Linux: Ctrl B, MacOS: Cmd B). Select Tools > Build Systems > Select Current Build System from the menu bar. Depending on the selected build system, the program will run in the Sublime Text integrated terminal.
Running a program in Sublime Text
How to run a program?
There are several ways to run programs in Sublime Text:
1. Keyboard shortcuts:
Ctrl
B
Cmd
B
2. Menu Column:
#Choose a build system:
Sublime Text needs to know the type of program you want to run in order to run it correctly. You can select a build system from the drop-down list:
Custom Build System:
If the program type you are using is not in the list , you can customize the build system. Add the following code in the configuration file (Preferences.sublime-settings
):
<code>{ "build_systems": [ { "name": "My Custom Build System", "command": "/path/to/my_command", "working_dir": "/path/to/working_directory" } ] }</code>
Replace /path/to/my_command
with the command to run the program, replace /path/to/working_directory
Replace with the path to the program.
Run the program:
After selecting the build system, press the keyboard shortcut or go to the menu bar. The program will run in the Sublime Text integrated terminal.
Additional options:
PATH
or PYTHONPATH
. The above is the detailed content of How to run programs in sublime. For more information, please follow other related articles on the PHP Chinese website!