Get ctags in vim to go to definition, not declaration

前端 未结 10 2116
礼貌的吻别
礼貌的吻别 2020-12-07 15:25

I\'m having the problem that ctags in vim/gvim takes me to a forward declaration a lot of times instead of to the actual definition of the function.

Any way to get a

10条回答
  •  猫巷女王i
    2020-12-07 16:23

    Add the following to your .vimrc file:

    noremap  2
    

    This line causes vim to automatically jump to the second match (instead of the first one), which is usually the function definition.

提交回复
热议问题