Jim Lynch Codes
  • Blog
  • About Jim

Writings about one coder's stories & experiences.

How to Add Syntax Highlighting to Sublime Text (on MacOS) - The EASY Guide with Pictures!

9/8/2016

0 Comments

 
I'll try not to blab too much as I promised this post would be quick and easy! This will work with Sublime Text 2 and Sublime Text 3. Notice that with a fresh install of Sublime Text when you open up a *.ts file it doesn't look very pretty:
Picture

Step 1: Get the typescript.tmLanguage File!

Here is a link to the site that hosts it: 
​https://blogs.msdn.microsoft.com/interoperability/2012/10/01/sublime-text-vi-emacs-typescript-enabled/
And here's a link directly to the zip file: 
http://www.interoperabilitybridges.com/media/155452/typescript_support_for_sublime_text.zip

Download the zip file and unzip it. The contents should look like this:
Picture

Step 2: Put the typescript.tmlLanguage File in the Right Place!

The right place for this file is in a folder inside of your Packages directory of your Sublime Text installation. The correct path to this folder is usually this:
/Users/{user}/Library/Application Support/Sublime Text 2/Packages
Note though that when I looked in Finder I didn't see any "Library" folder inside of my user directory. However, when I opened up terminal it was there so I used cd to naviagate down into the proper Packages directory.
Picture
Once I was there I ran "open ." to open the current directory in Finder.
Picture
I then created a folder called "TypeScript" inside of this Packages directory. 
(Note: A stack overflow poster noted that it will work even if the file isn't called "TypeScript", but just to keep yourself from being confused I would call it TypeScript.
Picture
Then drag the typescript.tmlLanguage file into this newly created TypeScript folder.
Picture
Now close and reopen your TypeScript file for beautiful, colorful syntax highlighting! Huzzahhh!
Picture
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    ​Author

    Picture
    The posts on this site are written and maintained by Jim Lynch. About Jim...
    Picture
    Follow @JimLynchCodes
    Follow @JimLynchCodes

    Categories

    All
    Actionscript 3
    Angular
    AngularJS
    Automated Testing
    AWS Lambda
    Behavior Driven Development
    Blockchain
    Blogging
    Business Building
    C#
    C / C++
    ClojureScript / Clojure
    Coding
    Community Service
    CS Philosophy
    Css / Scss
    Dev Ops
    Firebase
    Fitness
    Flash
    Front End
    Functional Programming
    Git
    Go Lang
    Haskell
    Illustrations
    Investing
    Java
    Javascript
    Lean
    Life
    Linux
    Logic Pro
    Music
    Node.js
    Planning
    Productivity
    Professionalism
    Python
    React
    Redux / Ngrx
    Refactoring
    Reusable Components
    Rust
    Security
    Serverless
    Shell Scripting
    Swift
    Test Driven Development
    Things
    TypeScript
    Useful Sites
    Useful Tools
    Video
    Website Development
    WebStorm
    Writing

    Archives

    March 2023
    August 2021
    February 2021
    January 2021
    October 2020
    September 2020
    May 2020
    April 2020
    February 2020
    January 2020
    December 2019
    October 2019
    September 2019
    August 2019
    July 2019
    June 2019
    May 2019
    April 2019
    March 2019
    February 2019
    January 2019
    December 2018
    November 2018
    October 2018
    September 2018
    August 2018
    June 2018
    May 2018
    April 2018
    March 2018
    February 2018
    January 2018
    December 2017
    November 2017
    October 2017
    September 2017
    August 2017
    July 2017
    May 2017
    April 2017
    March 2017
    February 2017
    January 2017
    December 2016
    November 2016
    October 2016
    September 2016
    August 2016
    July 2016
    June 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    December 2015
    November 2015
    October 2015

    RSS Feed

  • Blog
  • About Jim
JimLynchCodes © 2023