"subl ." 命令找不到的问题

Sometimes,if you want to use one editor,for example:Sublime text 2 or textmate,etc.you will hope you can use them in the terminal via use the short cmd.but maybe you will caught the command can not found error.

Now I record the way I am fix the issue that 'subl .' can not be found.

http://www.sublimetext.com/docs/2/osx_command_line.html

https://teamtreehouse.com/forum/ruby-on-rails-subl-command-not-found

If you read these two passages,you can fix it.

Update:

Today I try the way above, but can not fix the issue, at last I have used cmd:

ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /bin/subl
use sudo to do it, the issue fixed.

Reference Link:

http://www.kadrmasconcepts.com/blog/2012/02/08/sublime-from-the-command-line/

更新:

如果是新的Mac OS X,大概在10.11.3的话,之前的方式是会失败的,由于新系统有Rootless机制,导致/usr/bin 这个目录根本不可写入,可以把这个放到另外的目录链接中,如: ```/usr/local/bin/subl```,可以通过```echo $PATH``` 知道有哪学目录是可以的。

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

Thanks,

Blues

转载于:https://my.oschina.net/u/913344/blog/169952

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值