Install the ctags plug-in for sublime text 2

Source: Internet
Author: User

Take the Windows operating system as an example to introduce the installation process:

  1. Install the ctags application.

Download the latest version to the official website of ctags. decompress it and place the ctags.exe file to the system's search path.

  1. Install the package Control Function of sublime text 2.

Open sublime text 2, press Ctrl + 'call out command line, and execute the following command:

 

importurllib2,os;pf=‘Package Control.sublime-package‘;ipp=sublime.installed_packages_path();os.makedirs(ipp) ifnotos.path.exists(ipp) elseNone;open(os.path.join(ipp,pf),‘wb‘).write(urllib2.urlopen(‘http://sublime.wbond.net/‘+pf.replace(‘ ‘,‘%20‘)).read())

 

Restart sublime text 2.

  1. Use the package control function to install the ctags plug-in.

Press SHIFT + command + P to bring up the command panel. Enter install to call up the package control: Install package option. This option lists all the plug-ins that can be installed, and select ctags for installation.

  1. Use ctags to browse code

Use Ctrl + T + R to create the. tags project symbol index file (sublime text 2will automatically use the ctags.exe installed in step 1 ).. After creating the tags file, you can use the shortcut key to conveniently browse the code. For shortcut keys, see the ctags plug-in project of sublime text 2 in GitHub.

2. php users can change the CTAG Generation Command: "ctags-r-F. tags -- fields = + aimsl -- ages = PHP. Note: The CTAG is relatively old. To support PHP well, you need to install patches. Linux is very easy to implement. I don't know how to install it on win.

Install the ctags plug-in for sublime text 2

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.