- Mastering Sublime Text
- Dan Peleg
- 358字
- 2021-11-12 16:30:44
Installing Sublime Text on OS X
This section will explain how to install Sublime Text on OS X 10.7 or later, as required.
First go to http://www.sublimetext.com/3 and click on the download link for OS X. A file called Sublime Text Build #.dmg
will be downloaded. Open this file and we will see the following window:

Simply drag the Sublime Text icon into the Applications folder and wait for the application to be copied.
We have just installed Sublime on our OS X! Is that all? No, we can also get the bleeding edge version from here: http://www.sublimetext.com/3dev. Bleeding edge versions are available for registered users only and are more susceptible to bugs.
Working with Sublime CLI
Sublime Text ships with a CLI called subl
, but this CLI isn't added to our environment by default. We want to be able to use it straight from our terminal, so we need to add a symbolic link called subl to the subl
executable.
ln –s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
To see if it worked, type subl filename
in the terminal where filename
is the file you want to edit. Did it work? If not, then we need to add our folder that contains the new symlink to the environment. Run the following command:
open ~/.bash_profile
The first line of the file should start with export PATH=
. It contains all the directories that will be looked into for executable binaries when we type a command in the terminal. Since we created a symlink to subl
inside the /usr/local/bin
directory, we will add it to the path by adding it to the directories:
export PATH=/usr/local/bin[…]
Now, run the following code before continuing:
source ~/.bash_profile
This will reload your .bash_profile
with the newly added directory.
Sublime CLI should work now; try one of the following commands:
subl filename ("filename" is the filename to edit) subl foldername ("foldername" is the folder to open) subl . (to open the current directory)
That's it! We have Sublime Text with CLI running on our OS X!
- Instant Apache Stanbol
- Python進(jìn)階編程:編寫更高效、優(yōu)雅的Python代碼
- C語言程序設(shè)計立體化案例教程
- Python Data Analysis(Second Edition)
- Easy Web Development with WaveMaker
- R Data Analysis Cookbook(Second Edition)
- Unity UI Cookbook
- 蘋果的產(chǎn)品設(shè)計之道:創(chuàng)建優(yōu)秀產(chǎn)品、服務(wù)和用戶體驗的七個原則
- Raspberry Pi Robotic Projects(Third Edition)
- JavaScript前端開發(fā)基礎(chǔ)教程
- 深度學(xué)習(xí):基于Python語言和TensorFlow平臺(視頻講解版)
- 快速搞定Spring Boot+Vue全棧開發(fā)
- Twitter Bootstrap Web Development How-to
- Elixir Cookbook
- 高性能Java架構(gòu):核心原理與案例實戰(zhàn)