search
HomeDevelopment ToolssublimeHow to run sublime after writing the code

How to run sublime after writing the code

Apr 16, 2025 am 08:51 AM
linuxsublimewindowsoperating system

There are six ways to run code in Sublime: through hotkeys, menus, build systems, command lines, set default build systems, and custom build commands, and run individual files/projects by right-clicking on projects/files. The build system availability depends on the installation of Sublime Text.

How to run sublime after writing the code

How to run the code in Sublime

There are the following ways to run the code in Sublime:

1. Use hotkeys

  • Windows/Linux: Ctrl B
  • Mac: ⌘ B

This hotkey will run the entire active file.

2. Run through the menu

  • From the menu bar, select "Tools" -> "Build" -> "Build"

3. Use the build system

  • Select a build system in the drop-down list.
  • Press F7 to run the build.

4. Use the command line

  • Press Ctrl ` to open the console.
  • Type the following command and press Enter:

    • Windows/Linux: build
    • Mac: sublime_build

5. Set the default build system

  • Open "Preferences" -> "Settings - Default" in Sublime Text.
  • Find the "build_system" option and set it to the build system you want to use.
  • Restart Sublime Text to apply the changes.

6. Custom build commands

  • Open "Preferences" -> "Settings - User" in Sublime Text.
  • Add the following line and set it to the build command to use:

    • Windows/Linux: "build_system": "你的构建命令"
    • Mac: "build_system": "/usr/bin/你的构建命令"

Notice:

  • Build commands vary by operating system and usage.
  • You can run a single file or project by right-clicking on a project or file in Sublime Text and selecting "Run".
  • The availability of the build system also depends on the installation of Sublime Text.

The above is the detailed content of How to run sublime after writing the code. 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
Sublime Text for Developers: A Guide to Using the EditorSublime Text for Developers: A Guide to Using the EditorApr 29, 2025 am 12:15 AM

SublimeText is popular among developers for its fast, powerful and rich plug-in ecosystem. 1. Multi-line editing and multi-cursor functions allow multiple text modifications at the same time. 2. Command panel and shortcut keys improve operation efficiency. 3. Use PackageControl management plug-in to meet various development needs. SublimeText is ideal for developers to improve programming efficiency.

Sublime Text: Exploring Pricing and AvailabilitySublime Text: Exploring Pricing and AvailabilityApr 28, 2025 am 12:03 AM

SublimeText is priced at $99 (starting from personal and commercial licenses), with a one-time purchase model that supports Windows, macOS and Linux: 1. A free trial version is available, and it is permanently used after purchase and is updated; 2. It can be downloaded from the official website or third-party store, but it is recommended to purchase from the official website to ensure flexibility.

Accessing Sublime Text: Exploring Your OptionsAccessing Sublime Text: Exploring Your OptionsApr 27, 2025 am 12:24 AM

You can get SublimeText by trialing for free, purchasing a license, or applying for an education license. 1) Free trial: No time limit, but you will prompt to purchase when saving the file. 2) Purchase a license: Pay $99 in one lump sum, get lifelong updates and support. 3) Education license: Students and educators can enjoy discounts and must verify their identity.

Sublime Text: Exploring Its CapabilitiesSublime Text: Exploring Its CapabilitiesApr 26, 2025 am 12:10 AM

SublimeText is a powerful text editor suitable for a variety of programming languages ​​and file formats. 1. Multiple selection and editing functions allow multiple locations to be modified at the same time to improve editing efficiency. 2. The command panel is accessed through shortcut keys and performs various operations, such as formatting code and managing plug-ins.

Sublime Text Evaluation: The Free to Try OptionSublime Text Evaluation: The Free to Try OptionApr 25, 2025 am 12:08 AM

SublimeText is available for free, but every once in a while, a purchase prompt pops up. 1) It supports multiple programming languages, has a simple interface and a powerful plug-in ecosystem. 2) Users can optimize the user experience by closing unnecessary plug-ins, regularly updating and using shortcut keys.

Sublime Text: From Beginners to ExpertsSublime Text: From Beginners to ExpertsApr 24, 2025 am 12:14 AM

SublimeText is suitable for beginners and experts. 1. Shortcut keys and command panels improve efficiency. 2. Package manager extension function. 3. Customize the details of the configuration file. 4. Multiple selection and editing functions are used to refactor code. 5. Search and replace function positioning and modify code. 6. Project management and version control integration facilitate project management.

Sublime Text: The Price of PerformanceSublime Text: The Price of PerformanceApr 23, 2025 am 12:09 AM

The performance benefits of SublimeText are fast startup, multi-threading, and a rich plug-in ecosystem, but at the expense of high license fees, complex plug-in configurations, and potentially increased memory footprint.

Sublime Text vs. VS Code: User Interface and User ExperienceSublime Text vs. VS Code: User Interface and User ExperienceApr 22, 2025 am 12:07 AM

SublimeText is suitable for users who pursue simplicity and highly customized, while VSCode is more suitable for users who need one-stop service and better user experience. The SublimeText interface is simple and complex, suitable for advanced users; the VSCode interface is modern and easy to use, suitable for beginners and team collaboration.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)