fding
fding

Reputation: 455

Jump into .h file instead of .c file when using ctags with vim

I want to use Ctags with VIM, and I have use ctags -R . to get tags file. but when I use CTRL+] to check out functions, I just jump into a .h file, not .c file, just like:

void foo(); in foo.h, but what I want is void foo(){//CODE HERE} in foo.c.

Any solutions?Thanks

Upvotes: 0

Views: 171

Answers (1)

romainl
romainl

Reputation: 196596

<C-]> jumps to the first match.

You could try g] or g<C-]> to choose from a list instead. See :help :tselect and :help :tjump.

Assuming ctags picked up the stuff in foo.c of course.

Upvotes: 2

Related Questions