Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to get Sublime Text2 to support CoffeeScript

Shulou Source: shulou.com Published: 2022-06-02 18:12:08 11月14日 Update

This article will explain in detail how to get Sublime Text2 to support CoffeeScript. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

1. Provide syntax highlighting

Download CoffeeScript.tmLanguage

Save it under C:\ Users\ youName\ AppData\ Roaming\ Sublime Text 2\ Packages\ CoffeeScript (you need to be cheap)

Then you can select coffeeScript in the lower right corner. Is it on?!

2. Provide Build support

Select Tools-> Build System-> New Build System... in the menu bar

Copy and save the following to the default User directory and name it coffee (this makes it easy for you to find it in Tools-> Build System)

{"cmd": ["coffee.cmd", "- c", "$file", "& &", "coffee.cmd", "$file"], "selector": "source.coffee"}

Test it:

Save as .resume

Console.log 'Hello.Worldman'

CTL+B executes the script to get the following output:

Hello, World! On how to get Sublime Text2 to provide support for CoffeeScript to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Support content more article selection good practical copy article directory knowledge script menu grammar highlight reference help related test output Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB macOS MySQL NVidia Docker