I am trying to use unicode
characters in vim. Since msdos
prompt didnt support unicode, I downloaded cygwin
.
I added some commands in .vimrc
through cygwin.
Basic commands like setting encoding
, fileencoding
to utf8. Since cygwin also doesn't support diacritits or multiple characters. So, to add Tamil character keymappings and abbreviations, I opened notepad.
When I opened the same file through notepad
, I got multiple sentences in single line. The new line characters were hidden. when i move to the end of line, that cursor has to be moved twice. So, I manually entered a new line by pressing Enter
everytime and saved it.
I thought that the fileformat might be wrong and gave :set fileformat+=msdos,unix
in vimrc.
Then, I opened cygwin and inside it, opened a file through vim. I am getting an error like
E492: Not an editor command : ^M
for every line in the vimrc file.
I understand that the newline character is causing trouble, but dont know how to solve it. Please help.
fileformat
andfileformats
are two different options. It doesn't make any sense to setfileformat
(without ans
) in your.vimrc
, and it also doesn't make any sense to set it using+=
as you do above. Furthermore,msdos
is not a valid value for either option. I'd recommend a thorough read-through of all three of the following help sections::help file-formats
,:help 'ff'
and:help 'ffs'
.