9

I'd like to know if there is an analogue to verbose map <key> (which shows the location that the map was assigned) for functions. For example I have a few Git plugins and I'd like to know what plugin defines the :GitFiles function, if Vim knows this info.

The fallback (which'll certainly work) is to search my files for the string.

statox
  • 49,782
  • 19
  • 148
  • 225
Steven Lu
  • 2,251
  • 15
  • 26

2 Answers2

8

From :h :function-verbose:

When 'verbose' is non-zero, listing a function will also display where it was
last defined. Example: >

    :verbose function SetFileTypeSH
    function SetFileTypeSH(name)
        Last set from /usr/share/vim/vim-7.0/filetype.vim

So :verbose function GitFiles should do the work.

statox
  • 49,782
  • 19
  • 148
  • 225
0

While the other answer is correct, you can take another approach: install https://github.com/iamcco/coc-vimlsp and use go to definition feature of coc.

eyal karni
  • 1,106
  • 9
  • 33