Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show multilayer function relationship by cscope in vim

Tags:

vim

cscope

I know source insight can show multilayer function relationship in one window.

For example, we have four functions as below

void example_A()
{
    example_B();
}

void example_B()
{
    example_C();
}

void example_C()
{
    example_D();
}

void example_D();
{
    return 5;
}

When I click example_D() in source insight, source insight show example_C() is calling the function.

Moreover, when I click example_C(), I see example_B() is calling the function.

The relationship is like this:

Example_D()
   |
   -->Example_C()
         |
         -->Example_B()
               |
               -->Example_A()

Could I see the relationship in one window by using cscope in vim?

Thank you.

like image 492
Iverson Hsieh Avatar asked Feb 05 '16 14:02

Iverson Hsieh


1 Answers

CCTRee plugin for vim does this kind of visualization using cscope

https://sites.google.com/site/vimcctree/

http://www.vim.org/scripts/script.php?script_id=2368

https://github.com/hari-rangarajan/CCTree

like image 87
Hennadii Madan Avatar answered Nov 23 '22 20:11

Hennadii Madan