How to Open Sublime Text from Terminal in MacOS

Why sublime text?

Sublime Text is the lightest IDE with GUI someone can ask for, as well as very powerful.

Installation

For MacOS just run the command in the terminal:

sudo ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl 

Usage

Now if you want to load a folder full of files, like a project

subl .
# or
subl ./myproject/src

Or if you want to load just a file

subl ./readme.md

That’s it, enjoy!

If you enjoy also sublime merge

Installation

than also run the command

sudo ln -s /Applications/Sublime\ Merge.app/Contents/SharedSupport/bin/smerge /usr/local/bin/smerge

Usage

Now if you want to load a folder full of files, like a project

smerge .
# or
smerge ./myproject/src

Just make sure your project has a .git folder!

That’s it, enjoy!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store