Contents

Overview

This document will help you install and configure the Sublime Text 3 text editor to edit programs (e.g., C++, Python, Ruby, Java, JavaScript, HTML, etc.). This is available for OSX, Windows, and Linux.

Sublime text is not free. You can use the fully functional trial as long as you want, but a popup tell you to buy it will display after every few saves. It costs something like $75 to register. We have registered copies installed on all of the machines in the Mac Lab and in the Center for Computing in LSB 113 (by the CSC faculty offices).

There are many alternatives. jEdit is a completely free, cross-platform editor. You may also wish to use a built in editor: Windows has Notepad, Mac has TextEdit (though you need to be sure switch the formatting option to text mode), and Linux has GEdit and the like. In all cases, be sure that you are editing in text format, not rich text format (RTF). The rest of this document refers to configuring Sublime Text, so if you choose and alternative text editor, you can ignore this document.

Install Sublime Text

Download and install Sublime Text 3 here. If you have OSX < 10.7, you probably will need to install Sublime Text 2

Configure Sublime Text

Sublime has a lot of nice features, the main one being it is easy to install extensions made by other users. This section will bring you through configuring Sublime to allow extensions to be easily installed, and then some helpful plugins you should install.

Install Package Control

In order to easily download and install plugins in Sublime, you have to first install Package Control. Here are the steps:

  1. visit this page and copy the text in the gray box under "Sublime Text 3" (or "Sublime Text 2" if you have the older version installed)
  2. open Sublime Text and press the key combo Ctrl+` (that is, hold down control and press the back-tic button just to the left of the 1 key)
  3. the previous step should open a text box at the bottom of Sublime Text and should automatically get focus; paste the text you copied from the website by hitting Ctrl+V (Windows) or Cmd+V (OSX)
  4. hit Enter

The status bar at the very bottom of Sublime Text should show you the progress of installation. It's pretty quick—no more than a few seconds. That's it for installing Package Control.

Install plugins

To install any plugin (the ones listed here as well as any other plugin you'd like), you must access the Installation Manager. Do this by:

  1. in Sublime, press the key combo:
    1. Windows/Linux: Ctrl+Shift+P
    2. OSX: Cmd+Shift+P
  2. this will cause a popup to open; start typing "install"
  3. click the result that says "Package Control: Install Package"
  4. a new popup will appear; start to enter the name of the package and select the result that matches the package you are trying to install

Here are a list of packages I recommend installing:

Configuring Terminal Plugin to use ConEmu in Windows

By default, the Terminal plugin on Windows will open PowerShell. To set it to open ConEMu, you need to do the following after installing Terminal:

  1. in Sublime Text, go to "Preferences" → "Package Settings" → "Terminal" → "Settings - Default"
  2. that'll open your settings file as a text file
  3. replace the text with the following text:
    {
        "terminal": "C:\\Program Files\\ConEmu64.exe",
        "parameters": ["-Dir","%CWD%"]
    }
        

To test, open a file in Sublime and then press Ctrl+Shift+T; if ConEMu opens (instead of PowerShell) and opens in the correct directory, you're all set!

To go back to the system defaults:

  1. in Sublime Text, go to "Preferences" → "Package Settings" → "Terminal" → "Settings - Default"
  2. that'll open your settings file as a text file
  3. replace the text with the following text:
    {
        "terminal": "",
        "parameters": []
    }
        
(Back to top)