bkeller2 / Mplus

Mplus syntax highlighting for sublime text 2.
Other
6 stars 5 forks source link

Mplus syntax editor for sublime text 2

http://bkeller2.github.io/Mplus/

Usage

Installation

Install Sublime Text 2 by going to http://www.sublimetext.com/2 and following their directions.

Install Package Control for sublime text 2 ( http://wbond.net/sublime_packages/package_control/installation ):

  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('http://sublime.wbond.net/'+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 https://github.com/bkeller2/Mplus/zipball/master .
  2. In sublime text 2 go to Preferences > Packages.
  3. Move the unzipped folder into there and begin.

Build setup

Mac OSX:

Windows:

Linux:

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

Themes

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: