Jump to function definition in vim

后端 未结 11 2636
独厮守ぢ
独厮守ぢ 2020-11-27 08:53

How can I jump to to a function definition using vim? For example with Visual Assist, I can type Alt+g under a function and it opens a context menu lis

11条回答
  •  庸人自扰
    2020-11-27 09:54

    Use gd or gD while placing the cursor on any variable in your program.

    1. gd will take you to the local declaration.
    2. gD will take you to the global declaration.

    more navigation options can be found in here.

    Use cscope for cross referencing large project such as the linux kernel.

提交回复
热议问题