1

This is the second of two errors posted tonight. As mentioned before, I did re-install vim/gvim 8.2 to make sure I'd installed it as administrator, as instructed, to make sure the batch files, etc., got installed.

I move files around between Linux and Windows constantly, and use the unix file format for everything to avoid constantly having to do :%s/^M//g every time I move a file around. I had this silenced (by some magic, it just finally shut up). I have set fileformat=unix in my .vimrc as the first non-comment line. But when opening the first file, it will always give me the following errors (having to add blank lines to keep them from becoming one giant mess of a paragraph - Each error is followed by line 1):

Error detected while processing C:\jim\bin\Vim\vim82\plugin\getscriptPlugin.vim:
Error detected while processing C:\jim\bin\Vim\vim82\plugin\gzip.vim:
Error detected while processing C:\jim\bin\Vim\vim82\plugin\logiPat.vim:
Error detected while processing C:\jim\bin\Vim\vim82\plugin\manpager.vim:
Error detected while processing C:\jim\bin\Vim\vim82\plugin\matchparen.vim:
Error detected while processing C:\jim\bin\Vim\vim82\plugin\netrwPlugin.vim:
Error detected while processing C:\jim\bin\Vim\vim82\plugin\rrhelper.vim:
Error detected while processing C:\jim\bin\Vim\vim82\plugin\spellfile.vim:
Error detected while processing C:\jim\bin\Vim\vim82\plugin\tarPlugin.vim:
Error detected while processing C:\jim\bin\Vim\vim82\plugin\tohtml.vim:
Error detected while processing C:\jim\bin\Vim\vim82\plugin\vimballPlugin.vim:
Error detected while processing C:\jim\bin\Vim\vim82\plugin\zipPlugin.vim:
Error detected while processing C:\jim\bin\Vim\vim82\menu.vim:
Error detected while processing C:\jim\bin\Vim\vim82\autoload\paste.vim:

Each of the above is followed by: W15: Warning: Wrong line separator, ^M may be missing

If I exit out of vim//gvim, I get the same errors again. If I use :e foo.bar to simply edit the file again, or another file, or split, etc., I don't get the same errors. I looked at the various .vim files, saved them in unix format, and thought that might stop these error messages. No such luck.

5
  • :set fileformat=unix doesn't do what you think it does. See the "update" section of my answer here Why isn't carriage return shown as ^M in my Vim – B Layer Jan 21 at 2:21
  • Also, I edit files in gvim with unix line ending and those with windows line endings all the time and I never see ^M. That's because the default 'ffs' setting mentioned in my referenced answer is designed to keep that stuff hidden. – B Layer Jan 21 at 2:29
  • :h W15 and set your fileformats option correctly – Christian Brabandt Jan 21 at 7:10
  • In my .vimrc, the first non-commented line (and .vimrc is in unix format, btw) is: set fileformats=unix Ok, here's a possibility: could it be one of vim's startup files (e.g., all those .vim files that it's complaining about (except not those, specifically...like I said, I saved all of those in unix format, so I'm guessing that it must be something opened before them. So what is the order of files opened by vim that could have a ^M that would throw that error? Also remember, this is ONLY happening in gvim, NOT vim. In case that matters. – GTbrewer Jan 21 at 14:12
  • Ok, I tried several different settings for fileformats and fileformat=unix. I had ffs set to [empty], unix, and unix,dos. Each time (after saving .vimrc, of course), I got the same series of warnings in gvim, but NOT in vim. And fileformats=[whichever of the three I'm testing at the time] is immediately before fileformat=unix (I learned the full option decades ago...ff and ffs just this morning). – GTbrewer Jan 21 at 14:28
0

It's not a perfect solution, but I did silence those warnings. Seems all of the files that gvim (again, not vim) was griping about were in the vim 8.2 distribution, all .vim files. I just set those to dos format. So I gather those files are loaded prior to loading my ~/.vimrc, where the first two non-commented lines are:

set ffs= set ff=unix

I also copied what was left in my old ~/.exrc file (from many decades ago, before vim existed and I used normal vi) and renamed it to get it out of the way (for some reason, I can't convince myself to rm old config files; oh wait, I know why, it always eventually comes back to bite me when I do). It was also one of the files gvim was complaining about.

So I'm happy. Thanks, everyone, for pointing me in the right directions to find the above solution (or do we call it a band-aid?). It works. Good enough.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.