68949Re: [patch] Handle files with mixed LF - CRLF line endings when doing tag search
- Apr 3 3:22 AMOn 02-Apr-2013 Ben Fritz <fritzophrenic@...> wrote:
> On Monday, April 1, 2013 11:43:38 AM UTC-5, Bram Moolenaar wrote:But it is a kind of a half-solution. When you modify a single line in
> > I wonder how many users actually run into files where only some lines
> > end in a CR. I would consider such a file broken, and first thing would
> > be to strip them all off.
> It's quite frequent where I work. I even have an autocmd that reloads the file in DOS format if it detects mixed line endings. It sets "nomodified" but doesn't save, so if I don't make any further changes, the file on-disk remains unchanged.
the file and write it, you end up with a number of changed lines. How do
you cope with that? In this case I can't simply check in the file
– I have to undo the line endings modifications which is quite a tedious
and annoying task.
I'll be extremely happy to get a hint how I should go about this
> The problem is that many other editors, including Visual Studio andI beg to differ. In my opinion the real problem is that Vim refuses to
> UltraEdit, may read in Unix file format correctly, but depending on
> how they are configured, will insert Windows line endings on any *new*
> lines. UltraEdit will even preserve line ending style of any
> copy-pasted text. That *sounds* like a feature but in reality it is
> incredibly annoying.
cooperate. The compilers can deal with it, ctags and cscope can deal
with it, all other editors can deal with it. Vim can't and now that I'm
trying to make Vim more friendly, I hear Vim is fine and I should fix
the files. Vim may be my favourite editor but – sorry – in this
particular case it is inferior to everything out there.
> Do I understand correctly, that I won't see the problem, because I already force-reload the file to remove the mixed line endings?Yes, you are not going to see any improvements since you are already
handling this one problem.
 I checked GNU Emacs: I built a tags file and then added a few
carriage returns at the ends of the lines. It still worked.
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscribe@....
For more options, visit https://groups.google.com/groups/opt_out.
- << Previous post in topic Next post in topic >>