Sublime Text 3和终端提示符OS X Mavericks? [英] Sublime Text 3 and Terminal prompt for OS X Mavericks?

查看:122
本文介绍了Sublime Text 3和终端提示符OS X Mavericks?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在OS X Mavericks上设置Sublime Text 3并获得挫折感。



我已经遵循了所有常见的嫌疑犯的安装和设置,即Google搜索Sublime Text网站和Stack Overflow。



到目前为止我做了什么:


  1. 已下载Sublime Text 3,位于我的/ Applications目录中

  2. 按照指南从Mac终端启动Sublime Text 2

问题从这里开始。我知道在这个链接中提供的符号链接使用ST2,但我想使用 sublime 而不是 subl (个人偏好)。我搜索一下,发现我需要粘贴到ST3的终端:

  ln -s/ Applications / Sublime Text.app / Contents / SharedSupport / bin / subl〜/ usr / local / bin / sublime 




  1. 已经有一个〜/ .bash_profile: export PATH = / usr / local / bin:$ PATH 。但是,当我 echo $ PATH 我得到:

      / usr / local / bin:/ usr / local / bin:/ usr / local / bin:/ usr / local / sbin:/ usr / bin:/ bin:/ usr / sbin:/ sbin 

    现在当我输入 sublime 到终端中我得到命令未找到

我失踪了。这使我很疯狂,因为我倒了,我已经遵循了所有的步骤,但ST3仍然不为我工作

解决方案

be:

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



注意我删除了符号()。 Unix中的Tilde()指的是用户的主目录,所以您的源是正确的,但第二个参数是将链接放在/ Users / [您的用户名] / usr / local / bin /这不包括在$ PATH中。



在你的注释中,你说你尝试从源参数中删除引号。如果你删除引号,你需要确保转义空格字符如下:

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

这应该也行。


I'm trying to set-up Sublime Text 3 on OS X Mavericks and getting levels of frustration.

I've followed all of the usual suspects in regards to installation and setup, i.e. Googling the Sublime Text website, and Stack Overflow. Inevitably it's something minor I'm missing, but it's causing me major heartburn.

What I've done so far:

  1. Downloaded Sublime Text 3, sitting in my /Applications directory
  2. Followed the guide Launch Sublime Text 2 from Mac Terminal

The problems starts here. I know that the symlink presented in this link is using ST2, but I want to use "sublime" instead of the "subl"(personal preference). I searched around and found what I need to paste into Terminal for ST3:

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

  1. Already had a ~/.bash_profile: export PATH=/usr/local/bin:$PATH. However, when I echo $PATH I get:

    /usr/local/bin:/usr/local/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin
    

    Does this look correct?

  2. Now when I type sublime into the terminal I get command not found

What am I missing. This is driving me crazy as I fell that I have followed all the steps, but ST3 is still not working for me

解决方案

Should be:

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

Notice I removed the tilde (~). Tilde (~) in Unix refers to your user's home directory, so your source was correct, but the second argument was placing the link in /Users/[your username]/usr/local/bin/ which is not included in $PATH.

In your note, you said you tried removing the quotes from the source argument. If you remove the quotes, you need to be sure to escape the space character as follows:

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

That should work as well.

这篇关于Sublime Text 3和终端提示符OS X Mavericks?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆