Convenient configuration of sublime text 2 and iterm2 in Mac OS

Source: Internet
Author: User

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:


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.