Home > Development Tools > sublime > body text

How to run the code written in sublime

下次还敢
Release: 2024-04-03 12:33:19
Original
1125 people have browsed it

Sublime Text offers several ways to run your code: Use the keyboard shortcut (Windows/Linux: Ctrl B, macOS: Cmd B) to select Tools > Build System > from the menu bar New Build System" Type "build" in the command palette and select "Build" (Ctrl Shift P/Cmd Shift P) Add the "build_on_save" setting (Preferences > Settings > Users) Install the REPL plugin and use the keyboard shortcut ( Windows/Linux: Ctrl Alt R,ma

How to run the code written in sublime

#Run code in Sublime Text

Sublime Text is a popular Code editor, which provides multiple ways to run code:

1. Keyboard shortcuts

  • Windows/Linux: Ctrl B
  • macOS: Cmd B

2. Menu bar

  • Go to the menu bar "Tools" > "Build Systems" > "New Build System".
  • Select a build system that corresponds to your language, such as "Python" or "C".

3. Command Panel

  • Press Ctrl Shift P (Windows/Linux) or Cmd Shift P (macOS) to open the command panel.
  • Enter "Build" ” and select Build.

4. Build on Save

  • Go to Preferences > Settings > Users.
  • Add the following code in the "Extra Settings" field:
<code>  "build_on_save": true,</code>
Copy after login

This setting will automatically run your code on every save.

5. Sublime REPL Plugin

The REPL (Read-Eval-Print-Loop) plugin allows you to run code directly in Sublime Text. Install the plugin and use the following keyboard shortcuts:

  • Windows/Linux: Ctrl Alt R
  • macOS: Cmd Option R

Any of these methods will work for you Code in Sublime Text. Choose the method that best suits your workflow.

The above is the detailed content of How to run the code written in sublime. 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!