MacOS在命令行中打开Sublime Text 3
配置
在终端中输入命令来创建软链接:
1 | ln -sv "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl |
如果Sublime Text是版本v2,则使用如下命令:
1 | ln -sv "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl |
然后
1 | source ~/.zshrc |
使用
在命令行执行:
1 | subl text.cpp |
就可以直接打开文件啦。
Reference
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.
Comment