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

Re: search results depend on length

Expand Messages
  • Andy Wokula
    ... Neat! attached is a mod with backslash/ ff -bugs fixed and simpler notation, shorter gen d patterns and preparation for multi-char items, otherwise no
    Message 1 of 17 , Nov 1, 2011
    View Source
    • 0 Attachment
      Am 31.10.2011 22:59, schrieb Christian Brabandt:
      > On Mo, 31 Okt 2011, Ernie Rael wrote:
      >
      >> It's similar, but a list of chars that need escaping is more flexible.
      >> I could specify that '(' needs to be escaped to mean grouping and that
      >> '?' does not need to be escaped to mean optional. Using the list could
      >> be dependent on the "magic-ness of a pattern".
      >
      > Hm, interesting concept. Attached is a simple script to try out.
      >
      > Use
      > :let g:re_dont_escape = '()|?'
      > to specify which chars have a special meaning and don't need to be
      > escaped (only for using the literal version). So in this example, '()
      > wouldn't need to be escaped for grouping, '|' means OR and '?' means
      > optional match.
      >
      > When searching, press<f7> to translate the pattern into a vim pattern.
      > It basically only adds/removes the backslashes (so you need to know all
      > vim specific atoms, like '\@<=' and can't use e.g. Perl look-arounds).
      >
      > Disclaimer, only very basically tested.
      >
      > regards,
      > Christian

      Neat! attached is a mod with backslash/'ff'-bugs fixed and simpler
      notation, shorter gen'd patterns and preparation for multi-char items,
      otherwise no feats added.

      --
      Andy

      --
      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
    • Ernie Rael
      ... Thanks Christian and Andy. I m on vacation now, won t be giving this any play until after next week. But it looks like some pros are working it over.
      Message 2 of 17 , Nov 1, 2011
      View Source
      • 0 Attachment
        On 10/31/2011 2:59 PM, Christian Brabandt wrote:
        > On Mo, 31 Okt 2011, Ernie Rael wrote:
        >
        >> It's similar, but a list of chars that need escaping is more flexible.
        >> I could specify that '(' needs to be escaped to mean grouping and that
        >> '?' does not need to be escaped to mean optional. Using the list could
        >> be dependent on the "magic-ness of a pattern".
        > Hm, interesting concept. Attached is a simple script to try out.
        >
        > Use
        > :let g:re_dont_escape = '()|?'
        > to specify which chars have a special meaning and don't need to be
        > escaped (only for using the literal version). So in this example, '()
        > wouldn't need to be escaped for grouping, '|' means OR and '?' means
        > optional match.
        >
        > When searching, press<f7> to translate the pattern into a vim pattern.
        > It basically only adds/removes the backslashes (so you need to know all
        > vim specific atoms, like '\@<=' and can't use e.g. Perl look-arounds).
        >
        > Disclaimer, only very basically tested.
        >
        > regards,
        > Christian
        >
        Thanks Christian and Andy.

        I'm on vacation now, won't be giving this any play until after next
        week. But it looks like some pros are working it over.

        -ernie

        --
        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
      • Christian Brabandt
        Hi Andy! ... Nice. Here is your version extended by not replacing inside collations. regards, Christian -- -- You received this message from the vim_dev
        Message 3 of 17 , Nov 1, 2011
        View Source
        • 0 Attachment
          Hi Andy!

          On Di, 01 Nov 2011, Andy Wokula wrote:

          > Am 31.10.2011 22:59, schrieb Christian Brabandt:
          > >On Mo, 31 Okt 2011, Ernie Rael wrote:
          > >
          > >>It's similar, but a list of chars that need escaping is more flexible.
          > >>I could specify that '(' needs to be escaped to mean grouping and that
          > >>'?' does not need to be escaped to mean optional. Using the list could
          > >>be dependent on the "magic-ness of a pattern".
          > >
          > >Hm, interesting concept. Attached is a simple script to try out.
          > >
          > >Use
          > >:let g:re_dont_escape = '()|?'
          > >to specify which chars have a special meaning and don't need to be
          > >escaped (only for using the literal version). So in this example, '()
          > >wouldn't need to be escaped for grouping, '|' means OR and '?' means
          > >optional match.
          > >
          > >When searching, press<f7> to translate the pattern into a vim pattern.
          > >It basically only adds/removes the backslashes (so you need to know all
          > >vim specific atoms, like '\@<=' and can't use e.g. Perl look-arounds).
          > >
          > >Disclaimer, only very basically tested.
          > >
          > >regards,
          > >Christian
          >
          > Neat! attached is a mod with backslash/'ff'-bugs fixed and simpler
          > notation, shorter gen'd patterns and preparation for multi-char items,
          > otherwise no feats added.
          >

          Nice. Here is your version extended by not replacing inside collations.


          regards,
          Christian
          --

          --
          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
        Your message has been successfully submitted and would be delivered to recipients shortly.