Home > Development Tools > sublime > body text

How to make Sublime Text2 support CoffeeScript

藏色散人
Release: 2019-12-18 16:27:23
forward
3423 people have browsed it

The following tutorial column of sublime text will introduce to you how to enable Sublime Text2 to provide support for CoffeeScript. I hope it will be helpful to friends in need!

How to make Sublime Text2 support CoffeeScript

1. Provide syntax highlighting

Download CoffeeScript.tmLanguage

Save in C:\Users\youName\AppData\Roaming\ Under Sublime Text 2\Packages\CoffeeScript (you need to make one yourself)

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

2. Provide Build support

Select Tools -> Build System -> New Build System...

Copy the following content in the menu bar and save it to the default In the User directory, name it coffee (this will allow you to easily find it in Tools -> Build System)

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

Test it:

Save it as .coffee

console.log 'Hello,World!'
Copy after login

CTL B executes the script and gets the following output:

Hello, World!
Copy after login

For more sublime related technical articles, please visit the sublime column: https://www.php.cn/tool/ sublime/

The above is the detailed content of How to make Sublime Text2 support CoffeeScript. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template