Home Download Buy Blog Forum Support

Sublime2 Documentation Issues

Sublime2 Documentation Issues

Postby yaramayer on Thu Jan 12, 2012 2:01 pm

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

So... I was looking at http://www.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
yaramayer
 
Posts: 1
Joined: Thu Jan 12, 2012 1:56 pm

Re: Sublime2 Documentation Issues

Postby dearborn on Wed Feb 15, 2012 6:47 am

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 ?
dearborn
 
Posts: 7
Joined: Wed Feb 15, 2012 6:42 am

Re: Sublime2 Documentation Issues

Postby nick. on Wed Feb 15, 2012 2:40 pm

dearborn wrote: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 ?


I don't use OSX, but try something like this:
Code: Select all
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.
nick.
 
Posts: 266
Joined: Wed Jan 18, 2012 3:45 am

Re: Sublime2 Documentation Issues

Postby dearborn on Wed Feb 15, 2012 6:21 pm

When I try the sym link, I get:
Code: Select all
"/Users/dearborn/bin/subl: No such file or directory"


Here's my .bash_profile:

Code: Select all
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'


I feel like it's something obvious, like just creating the /bin myself.
dearborn
 
Posts: 7
Joined: Wed Feb 15, 2012 6:42 am

Re: Sublime2 Documentation Issues

Postby nick. on Wed Feb 15, 2012 7:25 pm

Did you
Code: Select all
~:$ mkdir $HOME/bin
The 'ln' command should be creating the 'subl' file, so it has to be that the directory is missing.
nick.
 
Posts: 266
Joined: Wed Jan 18, 2012 3:45 am

Re: Sublime2 Documentation Issues

Postby dearborn on Fri Feb 17, 2012 6:40 pm

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?
dearborn
 
Posts: 7
Joined: Wed Feb 15, 2012 6:42 am

Re: Sublime2 Documentation Issues

Postby dearborn on Fri Feb 17, 2012 6:41 pm

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

Does my profile (posted above) look correct?
dearborn
 
Posts: 7
Joined: Wed Feb 15, 2012 6:42 am

Re: Sublime2 Documentation Issues

Postby nick. on Fri Feb 17, 2012 7:01 pm

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:
Code: Select all
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.
Code: Select all
source ~/.bash_profile
nick.
 
Posts: 266
Joined: Wed Jan 18, 2012 3:45 am

Re: Sublime2 Documentation Issues

Postby dearborn on Mon Feb 20, 2012 5:29 am

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

Code: Select all
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!
dearborn
 
Posts: 7
Joined: Wed Feb 15, 2012 6:42 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 22 guests