I know that vim retains some meta information about a file (like cursor position before you last closed it, file type if you have manually set it)
How can I reset this information? I'm in a very weird situation where I have a file x
and I have a file y
that is just a symlink to x
.
I'm getting a weird error whenever I try to edit y
but I don't encounter it when editing x
directly, indicating that this has something to do with the file state rather than the error being legitimate (error message is about a plugin but removing that plugin doesn't stop vim from trying to invoke functions in that plugin in the file y
, though it does not give any error in file x
or any other symlinks of x
)
How do I just reset the file y
? I've tried deleting and restoring it, to no avail. I cannot rename it, it's a configuration file so it must be present in a certain location.
Answers to some follow up questions:
- Are the file extensions same? Yes, and so is
:set ft?
. - Are any plugins that save / restore session state? I have inspected the plugins and does not seem that's the case
- Is
:scriptnames
same between both the files? Yes
~/.viminfo
does not seem to reset file state (vim still remembers last edit position).