Reputation: 2018
I'm trying to enable advanced syntax highlighting when using VIM on a non-local machine. I'm using the plugin from here: https://github.com/octol/vim-cpp-enhanced-highlight
I created the directory /.vim/after/syntax/
and moved the cpp.vim file into it. When I open a .cpp file it gives me the following error:
What should I do?
Upvotes: 0
Views: 430
Reputation: 1633
Your file has DOS line endings. In order to get rid of them open your file and run following command:
:%s/^M//g
where ^M you will get by pressing Ctrl+v Ctrl+m. This way you should get rid of wrong line endings.
Or just use :set ff=unix
as you wrote.
There is also another option. You can also configure git to not convert line endings dealing with line endings
Upvotes: 2