Take the Windows operating system as an example to introduce the installation process:
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.
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.
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.
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