This is a bug which I have actually informed Hari of a while ago, but perhaps 
my bug email got lost :)

The default mapping for LookupFile is F5. What this error message means is that 
you already have a mapping for F5 in your .vimrc file, and you haven't 
specified a mapping for <Plug>LookupFile. In this situations, LookupFile will 
try to map F5 to <Plug>LookupFile, which fails with the error message that you 
get.

This is annoying, and this is my work around for it until Hari fixes it. All 
you need is the final line, some random unused mapping to <Plug>LookupFile, and 
that will stop the error from firing.

:map <silent> <F7> :LookupFile<CR>                      " enter LookupFile 
explicitly
:map <silent> <S-F7> :LUWalk<CR>                        " enter LUWalk 
explicitly
:map <silent> <C-F7> :LUPath<CR>                        " enter LUPath 
explicitly
:imap <silent> <F7> <esc><Plug>LookupFile               " exit LookupFile
:map <silent> <S-C-A-F8> <Plug>LookupFile               " something random to 
remove the error!

Max


> -----Original Message-----
> From: Meino Christian Cramer [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 12, 2007 7:30 PM
> To: Max Dyckhoff
> Cc: [EMAIL PROTECTED]; [email protected]
> Subject: Re: File name completion for files residing in multiple
> directories
>
> From: Max Dyckhoff <[EMAIL PROTECTED]>
> Subject: RE: File name completion for files residing in multiple
> directories
> Date: Mon, 12 Feb 2007 11:58:35 -0800
>
> I installed lookupfile and got back this error message while starting
> vim (console):
>
> Error detected while processing
> /home/mccramer/.vim/plugin/lookupfile.vim:
> line  105:
> E227: mapping already exists for [EMAIL PROTECTED]
> Press ENTER or type command to continue
>
> ???
>
>
>
> > You want Hari's LookupFile plugin, which you can find on vim.org.
> It's awesome, and has speeded up my development massively. It does
> exactly what you want, in almost exactly the way you suggest.
> >
> > Max
> >
> > > -----Original Message-----
> > > From: Erik Bergman [mailto:[EMAIL PROTECTED]
> > > Sent: Monday, February 12, 2007 10:53 AM
> > > To: [email protected]
> > > Subject: File name completion for files residing in multiple
> > > directories
> > >
> > > I've been searching for a nice way to quickly open files that may
> > > reside in
> > > any of number of directories, similar to the "quick open" feature
> you
> > > find
> > > in some other editors. One solution is to mess around with the **
> and *
> > > wildcards, but this gets terribly slow for large projects. Another
> > > "solution" is to set the 'path' variable, but vim does not perform
> > > completion on files opened that way. A third solution is to
> generate
> > > file
> > > name tags and use :tag to jump to files, but in that case you will
> > > perform
> > > completion on just not file names, but other tags as well. Finally,
> you
> > > can
> > > open all files you need to switch between and use :b, but for
> obvious
> > > reasons this isn't very practical.
> > >
> > > What I think would be an nice solution is if there was some way to
> make
> > > vim
> > > perform file name completion using 'file' tags from the tag file.
> That
> > > way
> > > you could still use tags for other things, and most often the files
> you
> > > generate tags for are exactly the files you want to be able to open
> and
> > > switch between quickly.
> > >
> > > Can anyone think of a better solution? Would it be possible to
> > > integrate
> > > this feature into vim in a nice way?
> > >
> > > /Erik Berman

Reply via email to