shlyapa
shlyapa

Reputation: 81

"E426: tag not found error" when generating tags

I've got a macvim snapshot 64 downloaded from here and exuberant ctags installed via homebrew:

which ctags
/usr/local/bin/ctags

my tags variable in vim looks like this:

:echo &tags
/Users/macovsky/code/faces/tmp/tags,./tags,tags,/Users/macovsky/.rbenv/versions/1.9.2-p290/lib/ruby/site_ruby/1.9.1/tags,/Users/macovsky/.rbenv/versions/1.9.2-p290/lib/ruby/site_ruby/1.9.1/x86_64-darwin11.2.0/tags,/Users/macovsky/.rbenv/versions/1.9.2-p290/lib/ruby/site_ruby/tags,/Users/macovsky/.rbenv/versions/1.9.2-p290/lib/ruby/vendor_ruby/1.9.1/tags,/Users/macovsky/.rbenv/versions/1.9.2-p290/lib/ruby/vendor_ruby/1.9.1/x86_64-darwin11.2.0/tags,/Users/macovsky/.rbenv/versions/1.9.2-p290/lib/ruby/vendor_ruby/tags,/Users/macovsky/.rbenv/versions/1.9.2-p290/lib/ruby/1.9.1/tags,/Users/macovsky/.rbenv/versions/1.9.2-p290/lib/ruby/1.9.1/x86_64-darwin11.2.0/tags,/Users/macovsky/code/faces/tags 

and I generated the tags file with rails-vim's :Rtags command:

file tmp/tags 
tmp/tags: Exuberant Ctags tag file text

the problem is that whether I use C-] or :tag it all fails with a E426 tag not found error.

The tag is definitely there:

cat tmp/tags | grep post_image
post_image  /Users/macovsky/code/faces/app/helpers/posts_helper.rb  /^  def post_image(post, style)$/;" f   class:PostsHelper

Any suggestions? Thank you.

Upvotes: 8

Views: 7282

Answers (2)

Anton Orel
Anton Orel

Reputation: 576

Make sure you added a semicolon to your tag paths in .vimrc:

set tags=./tags;,./gems.tags;

There is an explanation.

Upvotes: 2

Paul
Paul

Reputation: 370

The problem might be that you define the tags to be in tmp/tags, however your tags variable only holds a link to a tags file in the current directory.

Try either putting your tags file in the current directory or add ./tmp/tags to your vim tags variable. (I would prefer the first option)

\Paul

Upvotes: 0

Related Questions