Recently, sublime text is often written under MAC.Code, The editor is very good to use. The only pity is that I like to toss things under the iterm command line. I used to see Vim in all the code files, and now I want to sublime.
SublimeProgramI used the ln command to establish a soft connection. Unfortunately, an error was reported. Finally, I wrote a script to solve the problem. The following is the content of the script file subl:
#! /Bin/Bash"/Applications/sublime text 2.app/ contents/MACOs/sublime text 2"$1
Put the file under the/usr/bin directory. In this way, you can directly enter 'subl filename 'or 'subl directory name' under iterm or terminal to use sublime to open a file or directory.
In addition, iterm2 calls open to open the selected project by default when you press and hold the command key while clicking a project. You can also change it to subl. The specific step is to enable the iterm option, and then select profiles-> advanced,
Modify 'run command' to 'subl \ 1 '. Below is: