I'm trying to set up my VIMRC (gvim on Ubuntu 11.10)file which contains just 2 lines (as of now)
set ruler
set number
I keep getting this error:
line 1:
E488: Trailing characters: number^M
line 2:
E488: Trailing characters: ruler^M
How do I resolve this?
Every time the user issues a :w command, Vim will automatically remove all trailing whitespace before saving.
The "trailing characters" are in your command, not your document. Vim thinks that you finished the command at Article</ , then considers h2>/gi as the third argument of the substitute command. But those characters aren't all valid for the third argument, so it gives you the error.
Trailing characters are those characters which occur at the end of the string (rightmost part of the string).
As pointed out by the comment, it seems that you've got some \r
characters from a windows configuration. To solve this use:
dos2unix <file>
Open the vimrc file in vim (this will probably work with errors. If it doesn't then move _vimrc to myVimrc):
vim _vimrc
Then run this ex command:
:set fileformat=unix
Dos2Unix didn't work for me. I think that dos2unix only works with ANSI files.
dos2unix <file>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With