Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Improved jumps to definition

Tags:

vim

plugins

ctags

When we're using ctags in vim and want to go to particular definition of variable or function we press ctrl + ], when we want to go back we press ctrl + T.

When we want to autocomplete a name of a variable we press ctrl + N and from a little violet window we can choose the right word.

Is it possible to improve go to definition so that we won't jump in the document, but only the little window with the function or variable definition will appear?

thank you

like image 696
xralf Avatar asked Nov 06 '11 11:11

xralf


1 Answers

You want a way to see the function's signature without actually jumping to its definition?

I know about two plugins supposed to provide exactly this feature:

  • EchoFunc,
  • Tag Signature Balloons

The last time I tried echofunc it didn't work for JavaScript, at least for me, but it worked well for the few PHP files I've tested it with. I didn't try the other one because it's GVim-only and I use the CLI version almost as often as the GUI version.

But you can also use TagList and/or TagBar: two very useful plugins providing great code navigation based on ctags. Both will display the signature of the tag under your cursor if you hit <Space>.

like image 54
romainl Avatar answered Sep 21 '22 14:09

romainl