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

136214Re: trouble with pattern, character collections

Expand Messages
  • Marc Weber
    Feb 18 2:38 PM
    • 0 Attachment
      > No, it is because "\n" is evaluated to a true line feed, so "[^\n]"
      > matches anything but ASCII NUL and ASCII 10, while '[^\n]' matches
      > anything but ASCII NUL (which is used internally by Vim to distinguish
      > lines from each other (e.g. a line seperator), so that a . matches
      > anyhing in the buffer but the line seperator)

      Christian: Once and for all - I don't want anybody to explain me that
      [^\n] behaves in a wired way because '.' should behave the way it does.

      I'm *not* talking about internals. I'm talking the user interface you
      and me and new users are faced with every day. So help me think about
      whether there is a way to improve the situation.

      So why should anybody write [^\n] if you can use '.'? So why make [^\n]
      behave the same way? Why not make it raise an error such as:

      E99999: For odd reasons you should try "[\n]" instead of '[^\n]' and be
      done. True reason see long reply by Christian on ml ..

      Trouble solved within 2 min. No debugging why vim does not behave the
      way you expect. This guard would be trival to implement. if []
      collections are negated and contain \n show the message.
      And it would not break backward compatibility. Which is the use case for
      allowing '[^\n]' at all?

      I'm not saying it solves the issue, but it would cause less pain,
      do you agree on this?

      I wrote vim-addon-manager to improve usage experience for users - and
      this is another case just driving me crazy which I think needs to
      improved - the issue is in which way.

      Marc Weber

      You received this message from the "vim_use" 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_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • Show all 28 messages in this topic