How to Setup MavensMate in Sublime Text

Reading Time: 3 minutes

Sublime Text is a sophisticated text editor for code, markup and prose.You’ll love the slick user interface, extraordinary features and amazing performance. It’s very light weight and simple. If you are using eclipse for coding but after that reading post you would like to code with ST.

Take advantage of Sublime Text features like code assist, quick find, etc. when building your Force.com applications.

Download:
Sublime Text 2
Sublime Text 3

Setup :

A. Install the ST on you machine.

B. After installing open it.

C. Install Package Control :
1. Go on View > Show Console menu.
2. If you are using ST v3 then copy paste this script in console : (For more help go here)

import urllib.request,os,hashlib; h = 'eb2297e1a458f27d836c04bb0cbaf282' + 'd0e7a3098092775ccb37ca9d6b2e4b7d'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)

For ST v2

import urllib2,os,hashlib; h = 'eb2297e1a458f27d836c04bb0cbaf282' + 'd0e7a3098092775ccb37ca9d6b2e4b7d'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://packagecontrol.io/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')

D. Install MavensMate :
1. Go on Preferences > Package Control.
2. A window will opens, type install package and click on Package Control:Install Package

install package
3. After it a window will popup again. Type MavensMate and click on it. It will start downloading MavensMate. It takes few minutes.

Install Mavens Mate
4. After installing MavensMate, a new menu will appears.

Mavens Mate Menu

E. Install MavensMate Latest Api :
1. Go on MavensMate > MavensMate API (mm) > Install MavensMate API (mm) version….
2. Click on latest version and it will take time to install.

Mavens Mate API

F. Setup Directories :
1. Go on MavensMate > Settings > User.
2. Go on MavensMate > Settings > Default.
3. We have to setup dir in both files.
Find out “mm_workspace” : “”,
Put you dir here like if your dir is E:ST then type it will be :
“mm_workspace” : “E://ST”,

Do same things for both files and save both files.

G. Now Restart you Machine.

H. Setup Salesforce Projects :
1. Open ST and Go on MavensMate > Project > New Project.
2. It will opens a tab in browser.

Mavens Mate Project
3. Fill Info of project here.
Note : In the password box , password must be password+Security Token
Like if password is test123 and security key is asdfghjkkblvls then put both together test123asdfghjkkblvls

NOTE : If you are getting Error 5: Access is denied error , please turn off your firewall or disable your antivirus. In my case i removed my McAfee.

All Setup ?

Cheers!!!

Leave a Reply