viminfo?

Tony Wang wwang at party.to
Tue Jul 22 19:18:23 PDT 2003


On Tue, Jul 22, 2003 at 01:33:38PM +0200, Frank Gruellich wrote:
> Date: Tue, 22 Jul 2003 13:33:38 +0200
> From: Frank Gruellich <frank at ifm.tu-chemnitz.de>
> To: blfs-support at linuxfromscratch.org
> Subject: Re: viminfo?
> Mail-Followup-To: blfs-support at linuxfromscratch.org
> User-Agent: Mutt/1.2.5.1i
> 
> * Tony Wang <wwang at party.com> 22. Jul 03
> > On Tue, Jul 22, 2003 at 11:04:27AM +0200, Erika Pacholleck wrote:
> > > [22.07.2003] Tony Wang <-- :
> > > > And then I setup some config in ~/.vimrc file, and mostly time it works
> > > > fine, but I found the viminfo config I have setup does not act really,
> > > > I have tried
> > > >   set viminfo='20,"50
> > > >   set viminfo='20,\"50
> > > >   set viminfo='20,\\"50
> > >   set viminfo='20,\"50
> 
> Leave the defaults.
> 
> > > > but no use, when I edit a file and quit at some line, then reopen it,
> > > > but the cursor always go to the first line, and there is really a
> > > > ~/.viminfo contains some information last time I left.
> > > [explanation]
> > Thank you very much! But I remember that when I use vim under my host
> > system redhat 8.0, every time I start vim it will go exactly where I
> > left last time, It's is automatically and need't "'0" keys to be
> > pressed. That is some convenient for me.
> 
> If I understand you correctly, add this
> 
> if has("autocmd")
>   autocmd BufReadPost *
>     \ if line("'\"") > 0 && line("'\"") <= line("$") |
>     \   exe "normal g`\"" |
>     \ endif
> endif
> 
> to your ~/.vimrc file.  Didn't you find it in :help vimrc-filetype?
> 
> HTH,
>  regards, Frank.

Oh, It does really work! Thank you and all!

But I still wonder why the "viminfo" and "history" variables I set in
~/.vimrc file disappear when I type ":set" to "Show all options that
differ from their default value.", but others variables such as
"textwidth" "incsearch" display there.

Thanks again!
Tony
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe blfs-support' in the subject header of the message



More information about the blfs-support mailing list