Questions tagged [viminfo]
If you exit `vim` and later start it again, you would normally lose a lot of information. The `viminfo` file can be used to remember that information, which enables you to continue where you left off.
29 questions
0 votes
1 answer
89 views
How do you externally write to vim's register, that an active session will seemlessly pick it up?
Backstory: Creating a TUI in Qt/C++. Much of its functionality is designed mimic vim idioms. Headless environment via qputenv( "QT_QPA_PLATFORM", "eglfs" ); EGLFS is a platform ...
0 votes
1 answer
182 views
How does VIM write .viminfo files
How does Vim handle writing .viminfo files? Does it simply append to an existing file, or does it delete and rewrite the file on disk every time Vim exits? Additionally, is this process consistent ...
0 votes
1 answer
582 views
Vim commandline history and viminfo
I can't understand why when I open (Win10) gvim91 and press :<up> I don't see my most recent command. I'm sure it used to be this way in previous versions of vim (I updated recently). What I see ...
-1 votes
1 answer
152 views
Read viminfo when argc() > 0
Does Vim read the viminfo when called with a file argument? How can I force Vim to restore the buffer list in that case? Use case & context What I want is: When called as vi: enable read/write ...
2 votes
2 answers
1k views
Limit the amount of oldfiles in Vim and Neovim
As simple as the title stated. Suppose I only want to keep the n (say 20) latest files, and the older ones be deleted. How may I configure that?
3 votes
1 answer
2k views
$VIMINIT conflicts for neovim and vim
Repost from stackoverflow after suggestion I am trying to move from vim to neovim. I have a strange problem. I have, in my .bashrc, exported $VIMINIT to .config/vim/vimrc so that vim files like ....
0 votes
1 answer
252 views
BufReadPre and reading viminfo file
I need to backup the registers and settings of a limited group of files. I'm more interested in what can be saved in a viminfo file, less interested in sessionss. I'm having a problem reading viminfo ...
0 votes
2 answers
754 views
Where are buffer level variables stored in Vim? And how to get their RAM / storage usage?
Where does Vim store b: buffer level variables / dictionaries? RAM or some kind of file on a disk? If it stores it in RAM, how to get an estimate of RAM / storage used by a particular variable / ...
0 votes
0 answers
60 views
Check if any vi process is editing a file, or swapfile exists?
I'm writing a script to ensure that everything I work on on my system is committed, pushed to Git etc. I'd also like to check if there are any vim swapfiles active (either in a running Vim, or from ...
3 votes
0 answers
2k views
Strange error when closing Vim
I'm victim of a witchcraft. Likely my own. There's no Vim session open, based on the empty output of pidof vim and can open a new or existing file just fine. When I quit it with :q, however, I see to ...
2 votes
0 answers
48 views
Don't want buffer list to be overwritten when I launch vim with filename argument
I have a percent sign in my viminfo string, so my buffer list is saved when I exit vim, and restored when I restart. When I start vim with a filename argument, the buffer list isn't restored, which ...
1 vote
0 answers
282 views
.viminfo is read-only even after chmod 744
I'm trying to clean out erroneous entries in my command history. Though I could (in theory) use :call histdel("expression") it would be easier for me to just delete the entries from the .viminfo file. ...
1 vote
1 answer
327 views
Ignore some files when using viminfo+=%
I use in my vimrc the following option: set viminfo+=% This allows vim to open the last edited files if you don't pass any arguments to vim. Is there a way to ignore some files? I want to disable ...
0 votes
1 answer
556 views
Cannot find the viminfo file to fix the E575 error Windows 10 WSL
I have been using Vim/vi for a while but my computer ran out of space while writing a file and then this error appeared and continues to whenever I open or exit vi. E575: viminfo: Illegal starting ...
4 votes
1 answer
328 views
How to encrypt the .viminfo file and still get Vim to read it?
I love using Vim yet have a lot of very sensitive, encrypted files to edit, sometimes on an unencrypted drive, and can't have any residual information from these files forensically accessible to other ...