The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

How To Setup A Command To Open Sublime Text From The Terminal On A Mac

TODO: Pull subtitle into page object

I setup my Mac (running macOS 12.x) to launch Sublime Text from the command line by making a symbolic link like this:

code_start_default_section code_end_default_section

That lets me type `st` to open Sublime Text. I can also do `st file.txt` or `st file1.txt file2.txt` to open files.

The approach from the official documentation is to update the PATH that gets used to look for command line tools to point to the `/Applications/Sublime Text.app/Contents/SharedSupport/bin` directory. That sets up to use the binary named `subl`.

The reason I use the symbolic links is so I can use the command `st` instead of `subl` since it's shorter and easier to type.

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

How To Setup A Command To Open Sublime Text From The Terminal On A Mac

-- p

I setup my Mac (running macOS 12.x) to launch Sublime Text from the command line by making a symbolic link like this:

-- code/
-- bash

ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" "/usr/local/bin/st"

-- /code

-- p

That lets me type `st` to open Sublime Text. I can also do `st file.txt` or `st file1.txt file2.txt` to open files.

-- p

The approach from the <<link|official documentation|https://www.sublimetext.com/docs/command_line.html>> is to update the PATH that gets used to look for command line tools to point to the `/Applications/Sublime Text.app/Contents/SharedSupport/bin` directory. That sets up to use the binary named `subl`.

-- p

The reason I use the symbolic links is so I can use the command `st` instead of `subl` since it's shorter and easier to type.


-- categories
-- Command Line

-- metadata
-- date: 2022-04-20 18:39:52
-- id: 28573mxe
-- status: published
-- type: post
-- SCRUBBED_NEO: false
-- site: aws