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.

2 Answers 2


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.

  • 5
    or to know where a command was defined: :verbose :com GitFiles Sep 25, 2019 at 17:19
  • the :com option worked for me, thanks Dec 13, 2020 at 6:34

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 and acknowledge that you have read and understand our privacy policy and code of conduct.

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