Reputation: 3536
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?
Upvotes: 15
Views: 10698
Reputation: 27231
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>
Upvotes: 11
Reputation: 40384
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>
Upvotes: 15