Sometimes, vim shows an annoying warning saying
This went away for a short time if I deleted all files inside
After rummaging around for quite a while inside my
.vimrc, I found the reason for this:
This is very useful as it saves and automatically reloads the current state (cursor, etc) of the file’s buffer.
When a readonly buffer window is dynamically created by a plugin and then closed,
create a view for this window and since the script declared it as readonly,
mkview will persist
Next time the plugin is creating the dynamic window, the previous readonly state will be restored and the plugin won’t be able to write into it’s own window!
I found the following snippet here: Make views automatic
?* solution from the vim wiki link above didn’t work for me, I guess because
the buffer that had the problems has a name and thus is satisfying the expression.
expand("%") sounds promising, but someone noted that when closing a tab and
the next tab is nameless, querying
% might be unreliable.
For now I’ll restrict mkview to
*.* files - the solution at the bottom of
said wiki entry sounds ok but
I’m not sure if I’m comfortable including this rather big script just for being
able to save the state of files without a dot in their name.