- CoffeeScript Application Development Cookbook
- Mike Hatfield
- 514字
- 2021-07-23 19:35:51
Configuring Sublime Text
What you use to edit code can be a very personal choice, as you, like countless others, might use the tools dictated by your team or manager. Fortunately, most popular editing tools either support CoffeeScript out of the box or can be easily extended by installing add-ons, packages, or extensions.
In this recipe, we will look at adding CoffeeScript support to Sublime Text and Visual Studio.
Getting ready
This section assumes that you have Sublime Text or Visual Studio installed.
Sublime Text is a very popular text editor that is geared to working with code and projects. You can download a fully functional evaluation version from http://www.sublimetext.com. If you find it useful and decide to continue to use it, you will be encouraged to purchase a license, but there is currently no enforced time limit.
How to do it...
Sublime Text does not support CoffeeScript out of the box. Thankfully, a package manager exists for Sublime Text; this package manager provides access to hundreds of extension packages, including ones that provide helpful and productive tools to work with CoffeeScript.
Tip
Sublime Text does not come with this package manager, but it can be easily added by following the instructions on the Package Control website at https://sublime.wbond.net/installation.
With Package Control installed, you can easily install the CoffeeScript packages that are available using the Package Control option under the Preferences menu. Select the Install Package option.
To install the CoffeeScript package, open the Install Package window and enter CoffeeScript
. This will display the CoffeeScript-related packages. We will use the Better CoffeeScript package:

As you can see, the CoffeeScript package includes syntax highlighting, commands, shortcuts, snippets, and compilation.
How it works...
In this section, we will explain the different keyboard shortcuts and code snippets available with the Better CoffeeScript package for Sublime.
You can run the desired command by entering the command into the Sublime command pallet or by pressing the related keyboard shortcut. Remember to press Ctrl + Shift + P to display the command pallet window. Some useful CoffeeScript commands include the following:

- Spring 5企業(yè)級開發(fā)實戰(zhàn)
- Practical UX Design
- Vue.js入門與商城開發(fā)實戰(zhàn)
- UI智能化與前端智能化:工程技術、實現(xiàn)方法與編程思想
- Mastering Ubuntu Server
- R的極客理想:工具篇
- Learn React with TypeScript 3
- Go語言精進之路:從新手到高手的編程思想、方法和技巧(2)
- Unity 3D腳本編程:使用C#語言開發(fā)跨平臺游戲
- HTML+CSS+JavaScript網(wǎng)頁設計從入門到精通 (清華社"視頻大講堂"大系·網(wǎng)絡開發(fā)視頻大講堂)
- Flowable流程引擎實戰(zhàn)
- Python編程:從入門到實踐(第3版)
- MySQL程序員面試筆試寶典
- Serverless Web Applications with React and Firebase
- Hadoop 2.X HDFS源碼剖析