Loading ...
Sorry, an error occurred while loading the content.

40546Re: Vim7: Listing the script where a map was defined

Expand Messages
  • Yegappan Lakshmanan
    Sep 5, 2005
    • 0 Attachment

      On 9/2/05, Keith W. Roberts <keithr@...> wrote:
      > Perhaps a tweak to the behavior of :function is in order. :map xx lists all
      > maps starting with xx, and likewise for all the others. But :fun can
      > comprise many, MANY lines, so how about adding an illegal function name
      > character to indicate "just show me the function definition line, not the
      > whole function".
      > Something like
      > :fun *Save
      > to list just the definition lines of all functions starting with "Save".
      > Hmmm... even better ... why not make it a pattern instead, as
      > :fun /^Save.*
      > Then
      > :fun /.*text.*
      > would list all functions [definition line(s) only] with names containing
      > "text".
      > Consequently, :verbose fun /^Uname$ would list only the initial line of
      > function Uname() in all the places it was previously defined.

      Bram has implemented the above in the latest Vim7 snapshot.
      Now you can use the following command to list all the functions
      matching a pattern:

      :function /<pattern>

      If you prefix this command with 'verbose', then you will get the
      name of the script where a function is defined.

      - Yegappan
    • Show all 23 messages in this topic