Mplus highlighting for Sublime Text 2

A syntax highlighter for Mplus SEM program using Sublime Text 2. Includes running inputs and viewing outputs.

View the Project on GitHub bkeller2/Mplus



Install Sublime Text 2 by going to and following their directions.

Install Package Control for sublime text 2 ( ):

  1. Open Sublime Text 2.
  2. Press Control + ` (Mac, Linux, Windows).
  3. Paste the code below into the console.
  4. Restart Sublime Text 2.
import urllib2,os; 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())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen(''+pf.replace(' ','%20')).read()); print('Please restart Sublime Text to finish installation')

Install Mplus syntax highlighter:

  1. Press Command + Shift + P (Windows/Linux: Control + Shift + P).
  2. Type "Install Package" and select "Package Control: Install Package".
  3. Type "Mplus" and select it.

Alternate Installation Method

  1. Download and unzip .
  2. In sublime text 2 go to Preferences > Packages.
  3. Move the unzipped folder into there and begin.

Build setup

Mac OSX:



sudo ln -s /opt/Sublime\ Text\ 2/sublime_text /usr/bin/subl


This package currently offers three themes. By default it uses the "Mplus lite" theme which mimics close to normal Mplus highlighting. To switch to the more highlighting option add this code into the syntax specific settings:

  // Sets the colors used within the text area
    "color_scheme": "Packages/Mplus/Mplus.tmTheme"

To switch to the dark theme (black background) add this code intot he syntax specific settings:

  // Sets the colors used within the text area
    "color_scheme": "Packages/Mplus/Mplus Dark.tmTheme"

Still in development, stay tuned!

To do: