54297Re: viminfo, args and --remote
- Oct 15, 2004Bram Moolenaar wrote:
> Antony Scriven wrote:But the argument list is modified. I think it is this that
> > If I start gvim with `gvim *.cpp' then, because there are
> > filename arguments, gvim doesn't read the buffer list from
> > the viminfo file.
> > If, however, I start gvim with `gvim --remote *.cpp' then
> > the buffer list is read from the viminfo file, despite there
> > being an argument list. Is this a bug or is there a reason
> > for this?
> If you specify files to be edited remotely these are not
> recognized as file name arguments. Thus for the viminfo
> behavior it means the buffer list is restored.
is confusing me a little.
> Does this behavior cause a problem somehow?I suppose only in that I find it inconsistent. Depending on
whether vim is first started with --remote or not I can end
up with a different buffer list. I launch vim with
--remote-silent from an IDE and depending on whether vim was
already open or not I can get unexpected completions.
> I would actually sometimes prefer Vim loads the bufferYou could add another option :-) If I had to choose I think
> list from the viminfo, even though there are file name
> arguments (so that completion also searches these
> buffers, for example).
I would prefer vim to always load the viminfo buffer list:
that is why I have it saved after all. What was the
reasoning behind not loading it?
Another reason to always load the buffer list would be that
when you exit vim it writes the current buffer list to the
viminfo file. I have a very large and useful buffer list in
my viminfo and I don't want that wiped out if I've started
vim with an argument list. I currently use an autocommand to
get around that. I suppose I could modify that to always
load the buffer list when vim is started, but I'm used to
the current behaviour (when not starting vim with --remote)
at the moment.
To change the subject a little, I would personally find it
very useful if there were :argolder and :argnewer commands,
similar to the :cnewer and :colder commands.
- << Previous post in topic Next post in topic >>