On 2014-08-06, dhulme wrote:
> On Wednesday, August 6, 2014 8:37:56 PM UTC-7, Gary Johnson wrote:
> > On 2014-08-06, dhulme wrote:
> > > Is it not possible to use -i and -u simultaneously? The -u
> > > command works for me, but when I use -i, it only works when -u is
> > > omitted.
> >
> > Would you please explain what you mean when you say -i doesn't work?
> > What observation makes you think it's not working? Are you
> > specifying a viminfo file or "NONE".
> >
> > Regards,
> > Gary
>
> Sure.
>
> $echo > tmprc
> $echo *encoding=utf-8 > tmpinfo
> $vim -u tmprc -i tmpinfo
>
> :set viminfo?
> viminfo=
>
>
> $vim -i tmpinfo
>
> :set viminfo?
> viminfo='100,<50,s10,h
>
> I just did this simple test on cygwin with vim 7.4.335. However,
> I originally noticed this behavior using CentOS 6.5 (Vim 7.2), and
> confirmed it on FreeBSD 10.0 with VIM 7.4.364.
>
> It is remarkably consistent, so I am a little surprised no one has
> noticed it before.
The default value of 'viminfo' for vim running on Unix is
'100,<50,s10,h
For vi, it is empty. (See ":help 'viminfo'".)
When vim is running as vi, with only vi features enabled, it is
running in compatible mode. When vim is running with vim features
enabled, it is running in nocompatible mode. (See ":help
'compatible'".)
Note the last sentences in ":help -u":
Using the "-u" argument has the side effect that the
'compatible' option will be on by default. This can have
unexpected effects.
You appear to have a ~/.viminfo file, or a system vimrc file (such
as /etc/vimrc) that sets 'nocompatible'. (Fedora has a /etc/vimrc
that does that.) That is causing this command,
vim -i tmpinfo
to start vim in nocompatible mode, which means that 'viminfo' will
be initialized to
'100,<50,s10,h
When run using this command,
vim -u tmprc -i tmpinfo
vim starts in compatible mode, which means that 'viminfo' will be
initialized to be empty.
I think that explains what you're seeing, which is all expected and
not a bug.
Regards,
Gary
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.