I use vim in the following way:
I open vim.
Then I press
i
to start writing.Then I save the buffer and give the file a name by issuing the command
:w some-file-name.txt
Then I quit vim by
:x
Then I would expect some-file-name.txt
to be in the oldfiles list next time I open vim, but when I use :oldfiles
it is not there.
If I, on the other hand, start my process by using :e some-file-name.txt
and thereby giving the file a name before I write the content, then the file is actually showing up in the oldfiles list next time I start vim.
But I prefer writing content first and then giving the filename later.
Does anyone know why my preferred workflow does not put my last edited file in oldfiles?
v:oldfiles
do not get updated, unless the buffer was read from disk at least once (doing extra:e
between steps (2) and (3) helps).