On Thu, Jan 10, 2019 at 3:03 PM Ven Tadipatri <vtadipa...@gmail.com> wrote:
>
> Hi,
>   I found that when I yanked a large number of lines, exited vim and
> tried pasting, only the first 50 lines were pasted. I was able to set
> the viminfo variable: viminfo='100,<600,s10,h , then yank the lines,
> and it worked. However, I don't want to keep setting the viminfo
> variable every time I want to yank a large number of lines. For some
> reason, when I set the viminfo variable in my .vimrc, it's not picking
> it up, and always reverts to the default : "viminfo='100,<50,s10,h".
> Is there some way I can set this permanently in some Vim config file?
>
> Thanks,
> Ven

My vimrc includes the following, so set the 'viminfo' option and also
to save the viminfo file when I "save my work" before leaving the
keyboard temporarily for any reason. You may of course pick and
choose. Caveat: all this is trated as a comment in Small and Tiny Vim
builds (which don't have expression evaluation).

if has('viminfo')
  set vi='1000,!,%,c
  " '1000 : save marks for up to 1000 files
  " no f : also save all "file" marks, [0-9A-Z]
  " ! : save variables whose name is /[A-Z][A-Z_]*/
  " % : save and restore the buffer list
  " c : convert the viminfo encoding if necessary
  " no < : save all registers in full
  if has('unix')
    set vi+=r/mnt/
    " save no marks for anything at /mnt/ and below
    " (mount points for removable media)
  endif " +unix
  " use F3 to save all (incl. viminfo if supported)
  map  <F3>         :wa<Bar>wv<CR>
  map! <F3>    <C-O>:wa<Bar>wv<CR>
else
  map  <F3>         :wa<CR>
  map! <F3>    <C-O>:wa<CR>
endif " +viminfo


Best regards,
Tony.

-- 
-- 
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_use+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to