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

84635Re: regexp to identify N duplicates parts into several lines

Expand Messages
  • A.Politz
    Nov 4, 2007
    • 0 Attachment
      Andy Wokula wrote:

      >Slightly shortened regexp:
      >:g/\%(\1;.*\n\)\@<!\(^[^;]*\);.*\(\n\1;.*\)\+$/exe "norm! \"AyV//e\r"
      >I'd also prefer :copy alias :t with a range, but it's not possible to
      > .,//e copy
      >because "e" would be ":edit" here. Maybe someone finds another trick to
      >do this ...
      It is possible to use a '\zs' item in the pattern, without
      disturbing g. I also used the very-magic flag '\v' to avoid

      g/\v%(\1;.*\n)@<!(^[^;]*);.*(\n\1;.*)+$\zs/ .,//t$


      Ich hab geträumt, der Krieg wär vorbei.

      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 8 messages in this topic