Consider the following script:
vim -u NONE -i /tmp/foo.viminfo -c 'help :command' -c 'setlocal
buflisted' -c 'set viminfo='\''0,%' -c 'qa'
This will result in the following contents in foo.viminfo:
# This viminfo file was generated by Vim 7.4.
# You may edit it if you're careful!
# Value of 'encoding' when this file was written
*encoding=latin1
# hlsearch on (H) or off (h):
~H
# Last Search Pattern:
~mSle0~/*:command*
# Registers:
# File marks:
'0 1173 23 ~/.local-vim/share/vim/vim74/doc/map.txt
# Jumplist (newest first):
-' 1173 23 ~/.local-vim/share/vim/vim74/doc/map.txt
-' 1 0 ~/.local-vim/share/vim/vim74/doc/map.txt
# Buffer list:
%~/.local-vim/share/vim/vim74/doc/map.txt 1173 23
# History of marks within files (newest to oldest):
> ~/.local-vim/share/vim/vim74/doc/map.txt
" 1173 23
As you see there is map.txt in buffer list which is the help buffer (I did
not change &buftype). But according to the documentation help buffers are
not saved. I would suggest to fix the documentation:
diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt
index 48793a9..9538ef9 100644
--- a/runtime/doc/options.txt
+++ b/runtime/doc/options.txt
@@ -7991,9 +7991,9 @@ A jump table for the options with a short description
can be found at |Q_op|.
% When included, save and restore the buffer list. If Vim is
started with a file name argument, the buffer list is not
restored. If Vim is started without a file name argument, the
- buffer list is restored from the viminfo file. Buffers
- without a file name and buffers for help files are not written
- to the viminfo file.
+ buffer list is restored from the viminfo file. Quickfix
+ ('buftype'), unlisted ('buflisted'), unnamed and buffers on
+ removable media (|viminfo-r|) are not saved.
When followed by a number, the number specifies the maximum
number of buffers that are stored. Without a number all
buffers are stored.
--
--
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.