Abruzzo Forte e Gentile
Abruzzo Forte e Gentile

Reputation: 14869

Displaying the function call stack in vim

Is there a way to display in VIM/GVIM the call stack of a function while editing (not while running) the code? I am using LINUX and C++. Suppose the example of code below

 void foo3(){}

 void foo2(){}

 void foo1(){
     foo2(){
         foo3(){
         }
     }    
 }

I am looking for a vim command or a plugin able to display a list below

foo1()
foo2()
foo3()

Upvotes: 2

Views: 1923

Answers (2)

Xavier T.
Xavier T.

Reputation: 42238

You could install Eclim which is a way to integrate Vim with Eclipse, your Vim instance is communicating to Eclipse instance via a daemon.

The display of call stack is supported. See here for an example. You'll also get some other benefits from Eclipse like code completion and basic code validation.

From my personal experience, it is a bit cumbersome to use since you have to set up an Eclipse project, but this is a rather easy way to get IDE features into Vim, if this is your goal.

Upvotes: 1

Saqlain
Saqlain

Reputation: 17928

I would suggest to have a look at http://www.vim.org/scripts/script.php?script_id=2368, its descent and serve the purpose for me.

Upvotes: 3

Related Questions