How to fix E575: viminfo: Illegal starting char in line
Once I was working with the VIM editor and everything was normal. When I started using the same VIM editor on the other day and tried to open any file, it was throwing me an ERROR of
“E575: viminfo: Illegal starting char in line: SOME_TEXT”
Reason of the ERROR E575: viminfo: Illegal starting char in line
This ERROR comes when the user’s .viminfo file gets corrupted for some reason and certain characters are not interpretted properly by VIM editor. So everytime you try to open the original file or any other file, it throws out “Illegal starting char in line”
You can see in the ERROR message that the error comes from the viminfo. As the error contains “viminfo:” in the message string.
Solution for this error:
Just go to the user’s home directory and delete the file .viminfo.
If root is the user then enter the following command in the console:
# rm /root/.viminfo
If user is other then root then enter the following command in the console:
# rm /home/<USER_NAME>/.viminfo
Lets say the user is infysim then the command will be:
# rm /home/infysim/.viminfo
If you are using a graphical user interface then the .viminfo file may not be visible because the preceding dot (.) denotes as a hidden file. So make hidden files visible and then delete the file.
What is .viminfo file?
This file is automatically generated as you start working with vim editor, which contains the history of all the vim editor records i.e which all files edited and what all arguments the user have used in the editor etc.
Will it affect on VIM settings?
No, deleting .viminfo file is not going to affect any of your prior vim settings, because the settings for vim is stored in another file entirely.
It is the same way you erase your cache history but it does not affects any of your work done.
Do I need to recreate a new .viminfo file manually?
No, this file gets automatically generated inside user’s home directory as soon as you start working on any text file using vim editor.
You might also like
Vim is the best text editor when it comes to speed, handy and features comparison with any other text editor in this world. You will understand this if you are