Sublime Text 插件之ctags
source link: http://blog.grayson.org.cn/blog/2014/06/09/sublime-text-plugin-ctags
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Sublime Text 插件之ctags
Jun 09, 2014
##1. 安装ctags命令
$ brew install ctags
##2. subl安装ctags插件
按住快捷键 cmd+shift+p
输入 Package Control: Install Package
再输入 CTags 回车
注:如果以下的错
那么需要指定下ctags在subl的路定
{
...
"command": "/usr/local/bin/ctags",
"autocomplete": true
...
}
##3.建立索引
cmd+shift+p 选择 'Ctags:Rebuild Tags'
##4.快捷键(跳转至方法)
ctrl+shift+鼠标单击
到这一步,就可应用起来ctags!
##5.建立通用rails的命令
vi ~/.rvm/bin/ctags_rails
#!/bin/bash
/usr/local/bin/ctags -R -f .tags_gems .
#/usr/local/bin/ctags -R . $(bundle list --paths)
if [ -f ./Gemfile ]
then
/usr/local/bin/ctags -R -f .tags_gems $(bundle list --paths)
fi
chmod 777 ~/.rvm/bin/ctags_rails
这样以后每个rails项目都可以共用此命令
进入你的rails_app目录
ctags_rails #建立索引
rails_app目录下会生成以下的文件,所以需要.gitignore排除出版本库!
$ git status
# On branch stable
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# .tags
# .tags_gems
# .tags_sorted_by_file
Posted by grayson Jun 09, 2014 rails MacOSX sublime-text plugin Homebrew
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK