Mona Jalal Mona Jalal - 1 year ago 83
Linux Question

How to find the callers and callee of a function in C code in vi/vim?

I want to know how can I easily click (or maybe use some easy shortcuts) on a function name and find all its callee or open where it has been defined. Most of the web manuals in web are really hard to follow or don't happen to work out. Say I want to click on

and see where it has been defined?

uint newstk=allocuvm(pgdir, USERTOP-PGSIZE, USERTOP);

Answer Source

For that, Vim integrates with the cscope tool; see :help cscope for more information.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download