“subl” command not working properly

穿精又带淫゛_ 提交于 2019-12-03 10:01:37

问题


I'm running into a problem when using the "subl" command in my terminal. It used to work fine but lately when I run it does open the files I want but I can't edit them and moreover Sublime Text doesn't show up in the topbar of my mac as if it wasn't running at all (there's no dot besides the icon in the dock aswell). I kind of opens it as if it was just a window and not an application...But when I click on the icon from the dock it works just fine !

I've got an old macbook from 2008 running on Lion.

Thanks for the help (I'm a newbie),

Appreciated


回答1:


Try creating the subl symlink, it may have been deleted.

In Terminal:

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

It should now work.

Edit - one other thing you might check. Do you have two versions of Sublime Text installed, ie versions 2 and 3? From what you say about it not opening up properly with subl but opening fine when you click it in the dock, they may be opening different versions. Look in your applications folder.




回答2:


Sublime Text 2

ln -sv "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl

Sublime Text 3

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


来源:https://stackoverflow.com/questions/26931544/subl-command-not-working-properly

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!