Quantcast

Go to function definition

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Go to function definition

statquant2
Hi all,
I use to work on VStudio, one nice feature was the possibility to go to a function definition by right clicking.
I have built tabs for my cpp project so that I can use omnicompletion... so in some sense vim can already know where  is a function implemented.

Is there an addin which will enable me to jump to a function definition like VS is doing ?

Thanks for reading
Cheers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Go to function definition

Ivan Sichmann Freitas
> I have built tabs for my cpp project so that I can use omnicompletion... so
> in some sense vim can already know where  is a function implemented.

You mean tags, right? With a ctags database, put the cursor on the
function name and hit control-] (use control-t to go back where you
came from). Also, you can use :tag <tagname>.
Just search for tags vim and you can find many other tricks to jump around.

HTH

--
==============================================
Ivan Sichmann Freitas
Engenharia de Computação 2009
UNICAMP
http://identi.ca/ivansichmann
Grupo Pró Software Livre UNICAMP - GPSL
==============================================

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Go to function definition

statquant2
Thanks Ivan
Yes tags, the problem is that when I do <CTRL> ] I go on the .h file, and I don't know how to go the the cpp file itself... (where the function is implemented)

Do you know by any chance ?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Go to function definition

Ivan Sichmann Freitas
On Mon, Nov 1, 2010 at 2:23 PM, statquant2 <[hidden email]> wrote:
>
> Thanks Ivan
> Yes tags, the problem is that when I do <CTRL> ] I go on the .h file, and I
> don't know how to go the the cpp file itself... (where the function is
> implemented)
>
> Do you know by any chance ?

You can use :tselsect to have a menu with the matches and/or use
:tnext and :tprevious (abbreviately, :tn and :tp) to move around tags.
For more, see :help tag-matchlist

> --
> View this message in context: http://vim.1045645.n5.nabble.com/Go-to-function-definition-tp3245004p3245274.html
> Sent from the Vim - General mailing list archive at Nabble.com.
>
> --
> You received this message from the "vim_use" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>



--
==============================================
Ivan Sichmann Freitas
Engenharia de Computação 2009
UNICAMP
http://identi.ca/ivansichmann
Grupo Pró Software Livre UNICAMP - GPSL
==============================================

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Go to function definition

statquant2
Cool that solves it thanks a lot mate
Loading...