Search code examples
vimctagsexuberant-ctags

How to navigate multiple ctags matches in Vim?


I'm using Ctrl-] in Vim to navigate using Ctags. How do I navigate to alternate file if there are multiple matches?

Ex. something.publish in a codebase containing multiple occurrences of publish:

class Foo
  def publish
  end
end

class Bar
  def publish
  end
end

Solution

  • :tn[ext] goes to the next tag, :tp[revious] goes to the previous one. :ts[elect] gives you a list to choose from.

    :help tag-matchlist for more fun and exciting things to try!