If you are getting below error, most likely this is happens because the home directory has run out of disk space and no free inode is left on the server that’s why any new vim operation is unable to write in the .viminfo file.
In this article I will show how you can fix this error.
Check Disk Space
First of all check disk space on the server using below command.
# df -h
If everything is looks fine then check inode usage using below command.
# df -i
If found this issue on my vps server because there was no free inode was left. I fixed this issue increasing inode on the server.
If above situation is fine than there could be lots of reason, may be viminfo file in $/HOME/.viminfo! is corrupted. You should fix this removing this file as shown below.
# rm /HOME/.viminfo*
You can also check the permission and ownership of /HOME/.viminfo* For some reason, this resulted in the owner of the directory to be “nobody“. Adding write permissions for “other” solved the problem.
# chmod o+w ~/.viminfo
Hope this helps you!