How to navigate multiple ctags matches in Vim?

Sathish picture Sathish · Jan 22, 2013 · Viewed 25.1k times · Source

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

Answer

Dmitry Frank picture Dmitry Frank · Jan 22, 2013

Use g] instead of C-] to get the list of all matches.

You might want to read :help g]