Sublime Text subl shortcut not working: ln: /Users/edmundmai/bin/subl: No such file or directory

后端 未结 3 681
后悔当初
后悔当初 2021-02-01 09:40

Hi I am trying to set up the terminal shortcut for sublime text 2(subl) but it\'s not working. I\'m following the directions on https://github.com/mhartl/rails_tuto

相关标签:
3条回答
  • 2021-02-01 10:06

    This probably means that there is no ~/bin directory. Which also probably means that it isn't in the PATH. So just continue on to the next suggestion:

    sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/bin/subl
    
    0 讨论(0)
  • 2021-02-01 10:16

    Alternatively you can put it to your local bin:

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

    it may need creating the bin beforehand:

    mkdir /usr/local/bin
    
    0 讨论(0)
  • 2021-02-01 10:22

    Another approach is define subl as your shell alias

    http://opensourcehacker.com/2012/05/11/sublime-text-2-tips-for-python-and-web-developers/#Open_files_from_command-line

    This is the recommended approach as it is against the best practices to add symlinks in /usr/bin

    0 讨论(0)
提交回复
热议问题