How to fix E575: viminfo: Illegal starting char in line
 

How to fix E575: viminfo: Illegal starting char in line

 

This post was last updated on November 3rd, 2020 at 05:23 pm

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”

FIX: E575: viminfo: Illegal starting char in line

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.

For example:
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 username is john then the command will be:

# rm /home/john/.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.

Previous Divided By Zero: What Happens When it Occurs on a System
Next How to setup a network bridge in Ubuntu Linux
 

About author

shibaa987
shibaa987 243 posts

Linux kernel developer and a firmware developer with an experience of 10+ years.

View all posts by this author →

You might also like

VIM tips 0 Comments

Using vi in Linux

This post was last updated on May 27th, 2020 at 05:36 pm vi Singles: (Command executes immediately) iIaArRoOpPY DJxXu(U)sS~ insert, append, replace, open new line, paste, yank one line, delete

VIM tips 0 Comments

[VIM] Removing new line at the End Of File in VIM

This post was last updated on June 23rd, 2020 at 07:57 pmVim is the best text editor when it comes to speed, handy and features comparison with any other text

0 Comments

No Comments Yet!

You can be first to comment this post!

Leave a Reply