Skip to content

Instantly share code, notes, and snippets.

@gwmccubbin
Forked from vanderlin/Sublime Text 3 Command
Created April 21, 2022 13:17
Show Gist options
  • Save gwmccubbin/16c4fdd1565f4cad22c1c523921e4dae to your computer and use it in GitHub Desktop.
Save gwmccubbin/16c4fdd1565f4cad22c1c523921e4dae to your computer and use it in GitHub Desktop.
Create a Sublime Text 3 symbolic link to open a file via command line. paste this into terminal and now you can run `subl .` to open the directory in sublime or `subl file.html`
ln -s /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl /usr/local/bin/subl
@davidcolvin3
Copy link

figured it out. I used
sudo ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
and had to make sure the sublime text was saved in Applications, not just onto my icloud desktop.

@SusanHillyer
Copy link

Hi David - following behind you. Failed attempt. Used yours and now asking me for a password.

@SusanHillyer
Copy link

David ... did you have to enter a password?

@SusanHillyer
Copy link

Hi Gregory, Hi David -
OBJECTIVE: Add sublime 3 Text Command.
UNSUCCESSFUL
MESSAGE BACK:
Gregory - msg when I enter your link: "no such file or directory"
David - msg when I enter your link: needs a "password"
Thank you @gwmccubbin & @davidcolvin3 for your help!

@IkechukwuAbuah
Copy link

@davidcolvin3 Thanks

@SusanHillyer
Copy link

SusanHillyer commented Sep 2, 2022 via email

@IkechukwuAbuah
Copy link

Hi all! No I didn’t. I’m sure this easy. Do you know the password? Kicking myself. Susan Hillyer Managing Director | Founder HEALTHY PE🙂PLE PROJECT www.healthypeopleproject.com Powered by Green Rocket 501(c)3 Healthy People Month | October Healthy People Day | October 10th BLOK AWARDS | August 2024

On Sep 2, 2022, at 11:44 AM, Ikechukwu Abuah @.> wrote: @. commented on this gist. @davidcolvin3 Thanks — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

@SusanHillyer try your laptop user account password

@bobrothers
Copy link

Mine also asks for a password. Laptop user account password did not work.

@JahnShelb
Copy link

Use the password you use to sign into your Laptop. Should work

@dtpassarelli
Copy link

It looks like the sudo worked but when I entered the subl . it says zsh: command not found: subl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment