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

Re: save & restore :[N]match

Expand Messages
  • Bram Moolenaar
    ... Makes sense. I think a function is best. The @/ things refer to registers, and I don t think these patterns deserve a register (we re running out of
    Message 1 of 2 , Mar 31 11:33 AM
    • 0 Attachment
      Yakov Lerner wrote:

      > Is it possible to add the function which returns the current
      > regexp of :match/2match/3match ? It would enable
      > to save & restore the :match, especially when :match
      > is used for something temporary.
      >
      > I am thinking by analogy to @/ which allows to save
      > & restore search pattern.

      Makes sense. I think a function is best. The @/ things refer to
      registers, and I don't think these patterns deserve a register (we're
      running out of usable register names). And you also need to obtain the
      HL group name used.

      --
      SIGIRO -- irony detected (iron core dumped)

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ download, build and distribute -- http://www.A-A-P.org ///
      \\\ help me help AIDS victims -- http://www.ICCF.nl ///
    Your message has been successfully submitted and would be delivered to recipients shortly.