Setting up SublimeText

October 14, 2016

I’m setting up a new laptop and figured it was a good chance to document setting up SublimeText for LaTeX, as quasi follow up to my recent post about live LaTeXing. However, installing LaTeX can be hard, and configuring the SublimeText package LaTeXTools to work with LaTeX has the potential to be hard (often just works, but if not, can be confusing), and I won’t write about those parts, because they are better documented elsewhere. So this is simply the easy part (configuring SublimeText) to try to remove a barrier from those who might be looking to switch.

  1. Install a LaTeX distribution for your OS. I’m unable to document this; personally, I just google and hope. 1. Download and install SublimeText 3. Version 3 is in beta, but I’ve found it to extremely stable.

  2. Install PackageControl by typing ctrl+` in a SublimeText window to bring up a console bar at the bottom of the window, and pasting in the code from the website. This is a package manager for SublimeText packages.

  3. Make a symbolic link to the SublimeText user folder you keep in dropbox:

    ln -s ~/Dropbox/SublimeText/User ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/

    If you happen to not have such a folder from another installation with LaTeXTools already installed, then you’ll need to install it to your local SublimeText User folder as follows.

    1. Open PackageControl. On macOS, this is by the menus SublimeText -> Preferences -> Package Control.

    2. Type install and enter, and PackageControl should load the available packages to install. Begin typing latextools and the package should come up; hitting enter will start the installation.

    3. You can install other packages this way if you choose, modify keybindings by Settings -> Keybindings, create snippets by Tools -> Developer -> New Snippet, etc. You can also look at my keybindings hereOr here if you use the Colemak keyboard layout. , and my snippets here. These files can be copied directly into your SublimeText user folder, which on macOS is located at ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User by default.

  4. With LaTeXTools installed, you should be able to compile .tex files from SublimeText by Tools -> Build (perhaps specifying the Build System as LaTeX in the Tools menu first). If this doesn’t work, you may need to change some settings in LaTeXTool’s settings to get them to play nicely. This can be very easy or very hard, and I don’t understand this process. github//LaTeXTools has pretty good instructions for each OS, however, so I refer you there.

  5. Once .tex files are compiling, the last step is to easily see the output. On macOS, they (LaTeXTools) suggest installing Skim as the PDF reader because it syncs nicely with the document in SublimeText. It works pretty well, although Skim is a bit idiosyncratic. I would immediately hide the Contents pane, hide the Notes pane, and toggle the Toolbar (all options under View). They also have suggestions and configuration steps for setting up PDF viewers for each OS.

And that’s it!

comments powered by Disqus
Setting up SublimeText - October 14, 2016 - Eric Hanson