Setup an awesome Salesforce developer environment with Sublime Text 3

Sublime+MavensMate For Salesforce

Why Sublime Text 3 ?

I’ve been working with for about 2 years, and always using IDE(See here, Eclipse IDE Installation)as my development environment. I don’t think it is really difficult to use, but it could be more friendly. For example:

1. It doesn’t support APEX and VF assist
※Seriously?! This looks like using Emeditor to write Perl code, if without assist.

2. Heavy
※Eclipse crashes occasionally, once you try to reopen it, you have to take the risk that the source code on may be overwrited with local.

3. Need a nice dark theme

Recently,I’ve tried Sublime Text 3 and deeply moved by it’s light, so lightly!
The installation package only has 10MB, and the Eclipse has about 400MB, then you can know how slick it can be in seconds.

In this post, I want to share you that how to setup an awesome development environment with Sublime Text 3.

Let’s get started.

1. Install Sublime Text 3

Download Sublime Text 3 and install it
Sublime Text 3 supports Windows,MacOSX and Linux,I will explain it with MacOSX in this post.
※Google Chrome will be needed if you are using Windows OS.
sublime text install

2. Install Package Control

Package Control is the Sublime Text package manager,it is the simplest method of package management.
1. Open Package Control installation page,copy the content in red frame.
Package Control Install
2. Open Sublime Text Console
Open Console Menu 3. Ctrl-V Paste to Console,then Enter to run.
Package Control

3. Install MavensMate

Now we have Package Control to install packages so easily.
1. Open Package Control: Preferences > Package Control,input “install”, then select “Package Control: Install Package” /> 2014-11-29 09.28.24
2. Input “MavensMate“,click the menu to install.
2014-11-29 09.28.43
It will output “Package MavensMate successfully installed” in console after package has been installed.

1. Set Workspace

Open MavensMate > Settings > User
2014-12-03 22.15.02
Case of one workspace: Case of multiple workspaces: Slash has to be(”\”→”\\”) in window, Like:

2. Install MavensMate API (mm)

MavensMate API ※If you’re using MavensMate v7, then you don’t need installing MavensMate API (mm) anymore, take a look at here: 《To Fix Error “Require TLS 1.1 for HTTPS connections” of MavensMate v6.0》

2. Install MavensMate-Desktop

Install MavensMate-Desktop from and run it.

4. Install other useful packages

Intall those packages like [3.]

 ・ Visualforce

  Visualforce bundle for Sublime Text 2/3
  Visualforce for Sublime Text

 ・ jQuery

   Sublime Text package bundle for jQuery

 ・ CSS Snipet

   CSS support for Sublime Text 3

 ・ Salesforce Reference

   Quick access to Salesforce Documentation from Sublime Text.Preferences > Package Control > Salesforce Reference


   Simplifies writing DocBlock comments in Javascript, PHP, CoffeeScript, Actionscript, C & C++.

5. Eclipse Shortcuts

Jump by ctrl+click

Create “Default (OSX).sublime-mousemap” file in “Default (OSX).sublime-keymap” ‘s parent folder with the following contents. ※This only works on Windows OS. 🙁
※Reference:here and here

Find in files

Open Preferences > KeyBindings-User and copy the following contents.

Delete Line

※Need to change “super” to “ctrl” in Windows OS.

6. New Project

1. Open MavensMate > Project > New Project,
input “Project Name”,” Username”,” Password”(with password+SecurityToken if have Security Token). Create New Project

2.Click Project Metadata to select Project Metadata 2014-12-12 23.31.51
3.Click Create Project. 2014-12-12 23.32.15
4. That is all! Looks great! 2014-12-12 23.48.35
— Updated at 2016/06/16

Have an error like “Require TLS 1.1 for HTTPS connections” with MavensMate v6.0? You can fix it by following this post 《To Fix Error “Require TLS 1.1 for HTTPS connections” of MavensMate v6.0》 !
Enjoy it!