Vim Syntastic安装问题:^M文件结尾

Vim Syntastic安装问题:^M文件结尾,vim,cygwin,syntastic,Vim,Cygwin,Syntastic,我正在尝试使用Cygwin安装Syntastic for Vim。在Syntastic中完成步骤2.1和步骤2.2的克隆部分后,我发现现在运行vim时出现以下错误: Error detected while processing /home/rjw08/.vim/bundle/syntastic/plugin/syntastic/autoloclist.vim: line 1: E15: Invalid expression: exists("g:loaded_syntastic_noti

我正在尝试使用Cygwin安装Syntastic for Vim。在Syntastic中完成步骤2.1和步骤2.2的克隆部分后,我发现现在运行vim时出现以下错误:

Error detected while processing /home/rjw08/.vim/bundle/syntastic/plugin/syntastic/autoloclist.vim:
line    1:
E15: Invalid expression: exists("g:loaded_syntastic_notifier_autoloclist") || !exists("g:loaded_syntastic_plugin")^M
line   39:
E171: Missing :endif
Error detected while processing /home/rjw08/.vim/bundle/syntastic/plugin/syntastic/balloons.vim:
line    1:
E15: Invalid expression: exists("g:loaded_syntastic_notifier_balloons") || !exists("g:loaded_syntastic_plugin")^M
line   67:
E171: Missing :endif
Error detected while processing /home/rjw08/.vim/bundle/syntastic/plugin/syntastic/checker.vim:
line    1:
E15: Invalid expression: exists("g:loaded_syntastic_checker") || !exists("g:loaded_syntastic_plugin")^M
还有一些错误,但它们遵循这个基本格式。据我所知,列出的文件中的文件结尾不正确(即^M)。但是,当我在Vim中打开这些文件时,似乎没有任何要删除的^M结尾


如何解决此问题?

将文件加载到vim中,然后
:set fileformat=unix
:wq
应解决此问题


PS:您没有看到^Ms,因为vim认为它是dos文件(加载后状态栏中可能会显示
[dos]

此命令将把每个文件转换为~/.vim/bundle目录中的unix文件

find ~/.vim/bundle -type f -follow -print|xargs dos2unix

在有问题的文件上运行
dos2unix