Settings > Users) Install the REPL plugin and use the keyboard shortcut (Windows/Linux: Ctrl+Alt+R,ma"/> Settings > Users) Install the REPL plugin and use the keyboard shortcut (Windows/Linux: Ctrl+Alt+R,ma">

Home  >  Article  >  Development Tools  >  How to run the code written in sublime

How to run the code written in sublime

下次还敢
下次还敢Original
2024-04-03 12:33:191072browse

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>

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!

Statement:
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