Re: [Vim-latex-devel] CVS keyword expansion
Brought to you by:
srinathava,
tmaas
From: Benji F. <be...@me...> - 2003-01-10 12:09:21
|
Srinath Avadhanula wrote: > On Thu, 9 Jan 2003, Benji Fisher wrote: > > Okay. I just checked this. I did the following: > > Then on my sourceforge account > > nix > cvs update > nix > vim dosfile2 > > Guess what? I see the annoying ^M character at the EOL! But ff? gives me > 'unix'. Setting ff=dos and saving doesn't help. However, doing > 'dos2unix dosfile2' does help in removing the ^M character and ff is > also correctly identified as unix... Try this: nix > vim dosfile2 :set ffs? If the 'fileformats' option does not include "dos" then it explains the behavior you got. Try (still in vim) :set ffs+=dos :e! and I think it will set 'ff' to "dos". > So well, I guess we are somewhat screwed if the file being commited is > in dos format. I am wondering why this didn't happen already... Maybe the CVS CR/LF conversion did some good. I guess I am not clear on how it caused problems in the first place... > But this problem is not really related to -kb at all... You'll notice > that I didn't use -kb anywhere... If I do > > nix > cvs admin -kb dosfile2 > nix > cvs update dosfile2 > > Even then, it doesn't help... > > So whats the conclusion from all this? I really don't know... > > >> Can you add something to the makefile that will check for and >>correct line endings? It seems to be safe to run dos2unix on a file >>already in unix format; with the -k flag, it keeps the time stamp. > > > Yes... I'll do this. But what about files in which there are spurious ^M > characters? That counts as a "funky character" and should be removed anyway. Before changing the makefile, you should check out a fresh copy and make sure we do not have any ^M characters lurking. Can grep handle that? Mikolaj Machowski wrote: > > It seems the only solution is to add in modeline ff=unix in all files. I think this is worth doing. Even if we adopt another solution (like using dos2unix in the makefile) this could be a second line of defense. By itself, it is not quite enough: if I create a file with DOS-style line endings, add the modeline, save it, and commit it, then it still has DOS-style line endings. Vim only changes the line endings when the file is loaded with that modeline. --Benji |