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

RE: Vim7: Listing the script where a map was defined

Expand Messages
  • Zdenek Sekera
    ... I tried it, works well, I think this is a very useful modification of the output. Thanks! ... Indeed, thanks again. I still don t like the interspersing
    Message 1 of 23 , Sep 7, 2005
    • 0 Attachment
      > -----Original Message-----
      > From: Yegappan Lakshmanan [mailto:yegappanl@...]
      > Sent: 07 September 2005 03:57
      > To: Zdenek Sekera
      > Cc: Vim Developers
      > Subject: Re: Vim7: Listing the script where a map was defined
      >
      > Hi Zdenek,
      >
      > On 8/31/05, Zdenek SEKERA <Zdenek.Sekera@...> wrote:
      > >
      > > > Can you try the following commands (without any
      > additional arguments) and
      > > > see whether the script names are displayed?
      > > >
      > > > :verbose map
      > > > :verbose function
      > > > :verbose command
      > > > :verbose autocmd
      > >
      > > Yes, I am now getting that but have a few comments:
      > >
      > > 1. when I do e.g. ':verbose function', I get a very long listing of
      > > quite long lines that wrap around. e.g.: (just a short example):
      > >
      > > ...
      > > function Uname()
      > > Last set from
      > /afs/cern.ch/user/s/sekera/.vim/AsNeeded/Uname.vim
      > > ...
      > >
      > > There are also *much* longer lines.
      > > Would it be a bad idea to replace the $HOME part of the path by
      > > the customary '~', that would considerably shorten the output.
      > >
      >
      > In the latest Vim7 snapshot (142), the home directory path in
      > the script path is replaced with ~.
      >

      I tried it, works well, I think this is a very useful
      modification of the output. Thanks!

      > >
      > > 2. I see a difference:
      > > :verbose function Uname
      > > ----
      > > function Uname()name
      > > Last set from
      > /afs/cern.ch/user/s/sekera/.vim/AsNeeded/Uname.vim
      > > 1 return substitute(system("uname"), " *\n", "", "")
      > > endfunction
      > > ----
      > >
      > > Notice different indenting (cosmetics) but more importantly the
      > > the funny '...()name' part and the contents of the
      > function itself.
      > >
      >
      > The display of extra characters after the function name is
      > fixed in the
      > latest Vim7 snapshot.

      Indeed, thanks again.

      I still don't like the interspersing the "Last set...."
      line inside the function code for 'verbose function Uname'.
      Why not to just display the "Last set..." rather then the
      whole function code with it, when the code can be had with
      much more logical ':function Uname' ?? (I know you said
      that's how it was before and you didn't change it so it
      may need Bram's word on it).

      This brings me back to the previous suggestion of Dr.Chip
      to use simply a different command (I think he suggested
      'wherefrom') to get the "last set..." line. I liked (and
      said do) this suggestion very much. The command name really
      says what it is doing. Using the 'verbose...' is much more
      obscure, no doubt.

      So we would have:
      wherefrom function -> equiv to todays 'verbose function'
      wherefrom Uname -> would give just the "last set ..."
      line for the function Uname

      ...and same for commands, maps, ...etc.

      Cheers and thanks again! Very useful addition.

      ---Zdenek
    Your message has been successfully submitted and would be delivered to recipients shortly.