首先安装package controls
s2
import urllib2,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); os.makedirs( ipp ) if not os.path.exists(ipp) else None; urllib2.install_opener( urllib2.build_opener( urllib2.ProxyHandler()) ); by = urllib2.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); open( os.path.join( ipp, pf), 'wb' ).write(by) if dh == h else None; print('Error validating download (got %s instead of %s), please try manual install' % (dh, h) if dh != h else 'Please restart Sublime Text to finish installation')
s3
import urllib.request,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
1:有Git就执行git clone https://github.com/SublimeText/CTags
没有的话就直接去下载
当然你也可以选择用package install 来安装
2:把下载的CTags复制到preferrence--->brower package下面
3:配置,ctag的执行需要组件配合
下载地址
http://prdownloads.sourceforge.net/ctags/ctags58.zip
下载解压到英文无空格目录
找到CTags目录下面的CTags.sublime-settings
找到配置项:"command" : "D:/softtools/ctags58/ctags.exe",
command里面的内容替换下载的组件解压后的地址
4:这个时候基本已经可以用啦。
配置一下,让ctag构建起来的标记文件,不显示出来。
找到Preferences.sublime-settings一般在用户(User文件夹里面)
添加 "file_exclude_patterns": [".tags", ".tags_sorted_by_file", ".gemtags"]
ok可以使用啦。
快捷使用:
构建标记 ctrl+t, ctrl+r
跳转到定义处 ctrl+t, ctrl+t ctrl+> ctrl+shift+left_click
跳转到上一个 ctrl+t, ctrl+b ctrl+< ctrl+shift+right_click
显示所有标记 alt+s
show_symbols (all files) alt+shift+s
show_symbols (suffix) ctrl+alt+shift+s