ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Sublime​On​Save​Build

by alexnj ST2/ST3

Trigger a build the moment you save a file in Sublime Text 2. Works best with web projects that make use of Less, Compass and any other pre-processor or a makefile.

Details

Installs

  • Total 15K
  • Win 8K
  • OS X 5K
  • Linux 2K
Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11 Mar 10
Windows 24 24 27 27 17 10 26 30 36 26 30 15 19 37 37 35 27 19 24 19 21 31 29 40 22 16 13 15 23 27 28 30 12 19 30 26 37 41 30 12 12 40 25 41 38 17
OS X 12 14 13 16 11 8 9 21 12 22 21 9 11 9 15 19 23 16 9 11 22 15 13 18 17 9 9 18 18 21 19 23 8 10 21 19 19 18 19 5 7 25 16 16 15 22
Linux 5 7 5 2 5 4 5 8 7 7 5 5 2 5 5 5 9 10 7 7 3 4 4 7 15 4 3 5 7 3 8 2 5 1 7 5 3 6 1 0 3 6 9 10 4 4

Readme

Source
raw.​github.​com

SublimeOnSaveBuild Sublime Plugin

This is a simple plugin for Sublime Text 2 to trigger a build on each save.

Not all projects might need this plugin, especially if the build operation is lengthy. However, if you have a build that does things like pre-processing CSS via tools like LessCSS and stitching all JS files together, this might be very handy.

Installation

With the Package Control plugin: The easiest way to install SublimeOnSaveBuild is through Package Control, which can be found at this site: http://wbond.net/sublime_packages/package_control

Once you install Package Control, restart ST2 and bring up the Command Palette (Command+Shift+P on OS X, Control+Shift+P on Linux/Windows). Select “Package Control: Install Package”, wait while Package Control fetches the latest package list, then select SublimeOnSaveBuild when the list appears. The advantage of using this method is that Package Control will automatically keep SublimeOnSaveBuild up to date with the latest version.

Without Git: Download the latest source from GitHub and copy the SublimeOnSaveBuild folder to your Sublime Text 2 “Packages” directory.

With Git: Clone the repository in your Sublime Text 2 “Packages” directory:

git clone git://github.com/alexnj/SublimeOnSaveBuild.git

The “Packages” directory is located at:

  • OS X:

    ~/Library/Application Support/Sublime Text 2/Packages/
    
  • Linux:

    ~/.config/sublime-text-2/Packages/
    
  • Windows:

    %APPDATA%/Sublime Text 2/Packages/
    

Configuring

There are a number of configuration options available to customize the behavior of SublimeOnSaveBuild. For the latest information on what options are available, select the menu item Preferences->Package Settings->SublimeOnSaveBuild->Settings - Default.

Do NOT edit the default SublimeOnSaveBuild settings. Your changes will be lost when SublimeOnSaveBuild is updated. ALWAYS edit the user SublimeOnSaveBuild settings by selecting Preferences->Package Settings->SublimeOnSaveBuild->Settings - User.

  • build_on_save
    Set to 1 to trigger a build on save. By default, this is set to 1. I.e., SublimeOnSaveBuild attempts to build all projects. You can change this behavior and build only specific projects by configuring the user specific setting of build_on_save to 0 and project specific setting to 1.

  • filename_filter
    SublimeOnSaveBuild matches the name of the file being saved against this regular expression to determine if a build should be triggered. By default, the setting has a value of "\\.(css|js|sass|less|scss)$".

Usage

  1. Make sure you have a build operation set up in your Sublime Text 2 project and you are able to build using Control+B (Linux/Windows) or Command+B (OS X).
  2. Hit your favorite shortcut to Saveit should trigger a build.

Good luck!