Bee wrote:
>
> On Oct 11, 2009, at 6:56 PM, Brett Stahlman wrote:
>> Yes. The 'viminfo' `:' flag determines how many commands are *saved*
>> to the viminfo file; the 'history' option determines how many are
>> *restored* upon startup. There's a bit of asymmetry here, since
>> 'viminfo' defaults to 'history', but not the other way around. The
>> bottom line, as Jürgen indicates, is that you should set 'history' to
>> match 'viminfo' if you want to restore all the commands you save.
>
> I am using:
> set history=111 "command-line history restored
> set viminfo=%,\"4,'4,/111,:111,h,f0
> " | | | | | | +file marks 0-9,A-Z 0=NOT stored
> " | | | | | +disable 'hlsearch' loading viminfo
> " | | | | +command-line history saved
> " | | | +search history saved
> " | | +files marks saved
> " | +lines saved each register (old name for <, vi6.2)
> " +save/restore buffer list
>
> I would like to use the value in 'history' to set the values in
> 'viminfo':
> But this does not work:
>
> set viminfo=%,\"4,'4,/history,:history,h,f0
Try this:
let &viminfo = '%,"4,''4,/' . &history . ',:' . &history . ',h,f0'
:help let-option
Brett Stahlman
>
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---