我正在使用以下命令为我的Ruby on Rails项目生成emacs的标记文件:
ctags -f TAGS --extra=-f --languages=-javascript --exclude=.git --exclude=log -e -R . $(rvm gemdir)/gems/
当我尝试查找标记时(使用M-.)有些标签工作得很好,但对于许多其他标签,我得到的错误如下:
tag-find-file-of-tag-noselect: File /Users/simao/Documents/sp/ofe/° ¡ not found
etags-goto-tag-location: Rerun etags: `^class Tools::FilteringSteps' not found in /Users/simao/Documents/sp/ofe/lib/geo_db.rb
如何使用emacs为您的RoR项目生成标记?你以前见过这个问题吗?
这是ctags --version
的输出
Exuberant Ctags 5.8, Copyright (C) 1996-2009 Darren Hiebert
Compiled: Mar 9 2012, 15:47:35
Addresses: <dhiebert@users.sourceforge.net>, http://ctags.sourceforge.net
Optional compiled features: +wildcards, +regex
我的emacs版本:
GNU Emacs 24.0.95.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2012-04-02
发布于 2013-07-26 05:27:56
如果你正在使用Git,我建议你在执行git操作时,遵循下面的设置,在执行git操作时自动构建CTags标记文件:
http://tbaggery.com/2011/08/08/effortless-ctags-with-git.html
即使您不使用Git,您也可以尝试使用他的命令来构建CTags:
ctags --tag-relative -Rf.git/tags.$$ --exclude=.git --languages=-javascript,sql
另外,我建议你为bundle install设置一个别名来指定一个路径,这样你的get就会被打包到你的项目的子目录中,例如:
alias bi='bundle install --path vendor'
(注意:一定要对该目录执行.gitignore操作)。这将允许您直接进入每个gem的源代码,并防止您的标记文件因系统中的所有gem而变得臃肿。
https://stackoverflow.com/questions/10120720
复制相似问题