Home > Development Tools > sublime > body text

How to run sublime test program

下次还敢
Release: 2024-04-03 10:36:17
Original
1100 people have browsed it

Steps to run a program in Sublime Text: Create and configure a Build System to define the commands and file paths required to run the script; save the build system file; run the program using shortcut keys or through the Tools menu .

How to run sublime test program

How to run programs in Sublime Text

<code>步骤 1:设置构建系统</code>
Copy after login

In Sublime Text, go to Tools > "Build Systems" > "New Build System" to create a new build system.

<code>步骤 2:配置构建系统</code>
Copy after login

Add the following code to the build system file to run the script:

<code>{
  "cmd": ["python", "$file"],
  "file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
  "selector": "source.python"
}</code>
Copy after login

Replace "python" with the interpreter you want to use and "$file" with the file you want to run path.

<code>步骤 3:保存构建系统</code>
Copy after login

Name the build system file "MyBuildSystem.sublime-build" and save it in Sublime Text's "Build System" folder.

<code>步骤 4:运行程序</code>
Copy after login

Run the program using the shortcut "Ctrl B" (Windows) or "Cmd B" (Mac) or by going to Tools > Build.

The above is the detailed content of How to run sublime test program. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!