Sublime Forum

Sublime2 Documentation Issues

#1

Hi, guys!
Awesome stuff you have here… Sublime2 is absolutely revolutionary! Love it!

So… I was looking at sublimetext.com/docs/2/osx_command_line.html and noticed (ran into really) some issues:

  • The wait command is actually a CAPS W (does not work in lower caps)
  • It might be a good idea to mention that the user needs to have PATH=$PATH:$HOME/bin in their .bash_profile for this to work, and that export EDITOR=‘subl’ should be in .bash_profile too for the setting to be consistent and load every time the user logs in.

Thanks!
Yara

0 Likes

#2

I’m kind of a UNIX newb and I can’t get this to work. The official docs definitely need some more details.
I even tried the bash profile vars you mentioned and still no dice. This may be a super dumb question, but should I just create {USERNAME]/bin/subl ?

0 Likes

#3

[quote=“dearborn”]I’m kind of a UNIX newb and I can’t get this to work. The official docs definitely need some more details.
I even tried the bash profile vars you mentioned and still no dice. This may be a super dumb question, but should I just create {USERNAME]/bin/subl ?[/quote]

I don’t use OSX, but try something like this:

user@host> which subl
/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl
user@host> mkdir $HOME/bin
user@host> ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" $HOME/bin/subl

Edit: Although now I’m thinking the ‘which’ won’t work if ‘subl’ isn’t already in your PATH. Just try the symlink (ln -s) and let us know what happens.

0 Likes

#4

When I try the sym link, I get:

"/Users/dearborn/bin/subl: No such file or directory"

Here’s my .bash_profile:

[code]
cd `osascript -e 'tell application “Finder” to if window 1 exists then if targe$
export ANDROID_HOME=~/“Documents/SDKs/android-sdk-mac_x86”
-s “$HOME/.rvm/scripts/rvm” ]] && . “$HOME/.rvm/scripts/rvm” # Load RVM func$
export PS1="\W:$ "
export PATH=/usr/local/mysql-5.5.15-osx10.6-x86_64/bin:$PATH

PATH=$PATH:$HOME/bin
export EDITOR=‘subl -w’[/code]

I feel like it’s something obvious, like just creating the /bin myself.

0 Likes

#5

Did you

~:$ mkdir $HOME/bin The ‘ln’ command should be creating the ‘subl’ file, so it has to be that the directory is missing.

0 Likes

#6

Hm. Could have sworn I posted a reply already.

Anyway, no I didn’t try that (at the time). I must have skipped over it when reading it.
I have since tried it and it worked as described. This should definitely be explicitly mentioned in the docs.

However, it seems odd to have this location be in the user’s home dir. Wouldn’t it make more sense in the Library or /usr/local/bin?

0 Likes

#7

Also, did we decide whether the bash var was a capital W or not?

Does my profile (posted above) look correct?

0 Likes

#8

Most users do not have write access to /usr/local/bin .
I’m not sure about the ‘W’ . Seems like it should be lowercase.

In your bash_profile, I believe you’re missing an ‘export’ when you change PATH. But you can combine it into the line above anyway:

export PATH="$HOME/bin:/usr/local/mysql-5.5.15-osx10.6-x86_64/bin:$PATH"

After you make the changes you’ll need to source the file or logout/login.

source ~/.bash_profile
0 Likes

#9

Ah, good eye. Here’s the updated version.

export ANDROID_HOME=~/"Documents/SDKs/android-sdk-mac_x86" -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function export PATH="$HOME/bin:/usr/local/mysql-5.5.15-osx10.6-x86_64/bin:$PATH" export EDITOR='subl -w' cd `osascript -e 'tell application "Finder" to if window 1 exists then if target of window 1 as string is not ":" then get POSIX path of (target of window 1 as alias)'`

Thanks!

0 Likes