DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Culture and Methodologies
  3. Team Management
  4. Integrating Your Development Workflow Into Sublime With Build Systems, Part 1: Basic Build Systems

Integrating Your Development Workflow Into Sublime With Build Systems, Part 1: Basic Build Systems

If you're a Sublime Text user, you're probably tired of switching back and forth between Sublime and your console to run tests. Here's a great workaround.

Joseph Zimmerman user avatar by
Joseph Zimmerman
·
Mar. 30, 17 · Tutorial
Like (1)
Save
Tweet
Share
3.61K Views

Join the DZone community and get the full member experience.

Join For Free

Sublime Text is a lightweight, but capable code editor that is greatly loved by many developers, but if you’re anything like me, you’re saddened a bit by the fact that Sublime doesn’t have an integrated system console. For many tasks that you use in the console, Sublime Text actually has a decent alternative: build systems. They allow you to run any console commands straight from Sublime. In this series, I’ll be giving you the low-down on how to use Sublime’s build systems to their greatest potential.


Transcript

Hey there folks! I’m Joe Zim and I’m here to talk to you a bit about making your life a little bit simpler by integrating your projects’ development workflow into your favorite code editor: Sublime Text.

Without integrating your workflow into your editor, you’ll end up doing what I used to do: constantly switching back and forth between my editor and my console in order to run my commands for builds and such. I kept exploring ways to integrate a console into Sublime Text, but none of them worked to my satisfaction.

Sublime does have a built-in console, but it may not be exactly what you’d expect. It’s more of a Python REPL. As you can see, normal console commands don’t work, but Python code runs, and you can run Sublime-specific commands from in here, but that doesn’t really help me at all. However, I did finally find a solution that I am satisfied with and it’s built right into Sublime: build systems.

You can find all the build systems that come with Sublime and the ones you’ve created under Tools > Build System. This is where you select a build system to use, but right now, we’re actually going to create a new one.

Click the New Build System menu item and it’ll open up a new file with the most basic bits. You may see shell_cmd or just cmd. There are some differences between the two, but I’ve always found shell_cmd does what I want and seems to be easier to work with, so I don’t really know much about cmd. If you’re more curious about it than I am, you can look at the documentation linked to below the video to find out more.

Let’s change this make command to ls as a simple example of a command that we can use in our build systems to see how they work. Then we’ll save the build system. Notice that it automatically takes you to the user packages folder for your Sublime Text installation, which is where you want to save these so that Sublime can find them. We’ll save the file as ls.sublime-build, and then Sublime will use the file name as the name of the build system.

If we go to the Tools menu and look at Build Systems, we’ll see our new build system is now listed there. Sweet! Let’s select it as our current build system.

Now we need to tell Sublime to actually run the build. You’ll notice that I’m using the mouse and the menus instead of keyboard shortcuts. This is entirely for your sake, so you can see what I’m doing. If you’re a keyboard user, you can always look at the menus to figure out the keyboard shortcuts for yourself, or customize them to your liking with the Key Binding preferences. Returning from our tiny tangent, though, let’s run this build.

And there you have it! We ran a shell command without leaving Sublime and the output showed up in a panel at the bottom of the screen. You may have noticed that we never specified which directory this command should be run in, but it listed the contents of the User Packages directory. In part 2 of these videos, I’ll show you some more options we can give to the build system so we can make these build systems a little bit more useful!

Conclusion

This isn’t the end of these tutorials. This is only part 1 of 4. I’ll be releasing these articles one day at a time, but all of the videos are already available on Youtube. Feel free to click through the annotations or cards to make your way through the series, or just work your way through the playlist. God bless and happy coding!

Build (game engine) workflow Sublime Text Command (computing)

Published at DZone with permission of Joseph Zimmerman, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Scaling Your Testing Efforts With Cloud-Based Testing Tools
  • A First Look at Neon
  • Java REST API Frameworks
  • Reconciling Java and DevOps with JeKa

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: