1

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.

3

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.

  • 1
    or to know where a command was defined: :verbose :com GitFiles – Christian Brabandt Sep 25 at 17:19
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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.