Loading ...
Sorry, an error occurred while loading the content.

68966Re: [patch] Handle files with mixed LF - CRLF line endings when doing tag search

Expand Messages
  • Lech Lorens
    Apr 5, 2013
      On 03-Apr-2013 Benjamin Fritz <fritzophrenic@...> wrote:
      > On Wed, Apr 3, 2013 at 5:22 AM, Lech Lorens <lech.lorens@...> wrote:

      > > 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 do just check in the file, without undoing the line ending modifications.
      > Where I work we're only really concerned that all changes get peer reviewed.
      > Plus, a good external diff tool will be able to ignore line ending changes.
      > Maybe that doesn't work for you.

      But this makes discovering who the author of some code is (svn blame,
      git blame, etc.) much harder. Which means it will not be allowed. I would
      really love to go this path but I can't and the decision is not up to

      > > I'll be extremely happy to get a hint how I should go about this
      > > problem.
      > >
      > The best solution is probably to get everybody on your team to use a
      > consistent file format. But I agree Vim should not choke because they don't.

      From my experience – having an agreement without automatically enforcing
      it doesn't work. At my last work place we did have an agreement and
      there always happened a strange editor that would sometimes ignore the
      settings and screw things up.

      > I think Vim should accept the output of stupid editors without jumping through
      > hoops. I would actually welcome this patch or a similar one. Rather than doing
      > two searches couldn't we just always insert \r\? before the $ in the search
      > pattern? Like Bram I don't like the idea of two searches whenever a tag is not
      > found but I doubt very much that an extra single optional character will cause
      > a big performance hit. Do you really need to match any number of \r
      > characters?

      I would be afraid that there's too much potential here for breaking
      things. The tag search pattern can be an arbitrarily complicated regular
      expression. This means that in order not to break it I would have to
      half-intelligently interpret it. I wouldn't like to do it for two
      1. not doing it right and breaking things for some people,
      2. introducing some more than basic RE-related logic outside RE code.
      Vim is already difficult to maintain because of all these global
      variables. I don't want to make it any harder.

      Thanks for this discussion. I'm afraid it leads nowhere as Bram already
      decided the target audience is too small to bother.

      Lech Lorens

      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.
    • Show all 16 messages in this topic