Re: Hiding ^M
> I'm asking about the last comment, under "Hide unwanted text", which is aWell, I think I can see the reason for it. If for some reason they're being
> suggestion to hide ^M line endings. I agree with the view that hiding ^M is
> generally a mistake (instead, the issue should be fixed).
> However, for those who want to hide ^M, I would like to fix the suggestion
> which currently says:
> :highlight UglyDosLineend guifg=bg guibg=bg
> :match UglyDosLineend /\s*\zs\r/
> I propose replacing the above two lines with:
> :match Ignore /\r/
> Is that right? I can't see any reason for the "\s*\zs" stuff, but before
> deleting it I'd like to know if I'm overlooking something.
highlighed as errors or something and it looks messy, including them in the
pattern makes things look neat--hiding even more problems!
I think it's best to remove it, though, and keep the tip strictly to the ^M issue.
I don't think I agree with the suggestion of including $ in the pattern. Sometimes
you can get a file with mixed Mac and Unix line endings, and in this case, you see
a lot of ^Ms that are not at the ends of lines. There are reasons for wanting to
preserve this, but hide them, and the solution is more general then than requiring
the ^M at the end of a line, which only deals with mixed DOS and Unix line
endings, not mixed Mac and Unix ones. (Incidentally, I opened such a file recently
and because of the order of my ffs, or the nature of the file, it was recognised
as a Mac line ending file--I saw multiple ^Js per line in my text!)
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php