I have installed vim-go, and use ctrl+] to go to the definition. For a function, Sometimes it ends up in the interface declaration (if it was declared in an interface), but what I really intended to do was to go to function definition/specification. How can go to actual function definition?
If :GoDef
(which by default is mapped to gd
and CTRL-]
) doesn't work because it is a function in an interface, you can use :GoImplements
to find implementations of that function. See the vim-go tutorial for more.