Home

Awesome

sublime-mod

Mod for Sublime Text

Getting Started

Install package control

First, install Package Control for Sublime Text 2:

Install sublime-mod

Option #1: Install module using package control

Option #2: Install module directly

If you weren't able to find the package on Package Control, go to your Sublime Text Packages directory, located here:

Add the sublime-mod module:

Without Git: Download the latest source zip from github and extract the files into a new folder inside your Sublime Text "Packages" directory.

With Git: Clone the repository in your Sublime Text "Packages" directory:

git clone git://github.com/yuanyan/sublime-mod.git

Modfile

Add a Modfile to in your project root.

Build System > Mod

build-on-save

To enable build-on-save, you first have to save your project in Sublime Text by going to Project > Save Project As. Then go to your project folder and settings line from the example below to your myProject.sublime-project file.

For each project that you want to take advantage of this feature, you will have to modify the the .sublime-project file.

Build Settings

In your project folder

{
  "folders":
  [
    { "path": "/C/path-to-your-project-here" }
  ],
  "settings": { "build_on_save": 1 }
}

To build on save, keep the value at 1. To disable build on save, change the value to 0.

A build-on-save word of caution

Running mod every time you hit ctrl + s will be a great productivity booster when used wisely. But if you have lots of processor-intensive tasks that take more than a few seconds to run, this feature might get annoying pretty fast.