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

Re: regex or function for deleting spaces in mail quote string

Expand Messages
  • Luc Hermitte
    Hello, ... HTH, -- Luc Hermitte http://hermitte.free.fr/vim/
    Message 1 of 5 , Dec 2, 2004
    • 0 Attachment
      Hello,

      * On Thu, Dec 02, 2004 at 10:22:38AM +0100, Christian Ebert <blacktrash@...> wrote:
      > "> > > Text" should become ">>> Text" (w/o ")

      Try this:

      :s/^[> ]\+/\=substitute(submatch(0),' ', '', 'g').' '

      :h :substitute
      :h sub-replace-expression

      HTH,

      --
      Luc Hermitte
      http://hermitte.free.fr/vim/
    • Antony Scriven
      Hello ... Antony
      Message 2 of 5 , Dec 2, 2004
      • 0 Attachment
        Hello

        Christian Ebert wrote:

        > I am looking for a regex or function to shrink the indenting of
        > higher quote levels in mails.
        >
        > "> > > Text" should become ">>> Text" (w/o ")

        Try something like this:

        :s/\(^[> ]*\)\@<= >/>/g

        :help /\@<= (and friends)

        Antony
      • Christian Ebert
        Bonjour Luc, ... Great. Thanks. ... Yup. And with an example I can actually use it s always easier for me to start getting a grip on the matter. ... Sure did.
        Message 3 of 5 , Dec 2, 2004
        • 0 Attachment
          Bonjour Luc,

          * Luc Hermitte on Thu, Dec 02, 2004:
          > * On Thu, Dec 02, 2004 at 10:22:38AM +0100, Christian Ebert <blacktrash@...> wrote:
          >> "> > > Text" should become ">>> Text" (w/o ")
          >
          > Try this:
          >
          > :s/^[> ]\+/\=substitute(submatch(0),' ', '', 'g').' '

          Great. Thanks.

          >:h :substitute
          >:h sub-replace-expression

          Yup. And with an example I can actually use it's always easier
          for me to start getting a grip on the matter.

          > HTH,

          Sure did.

          c
          --
          Try halting your sub-vocal speech. Try to achieve even ten
          seconds of inner silence. You will encounter a resisting
          organism that forces you to talk. That organism is the word.
          ~ W. S. Borroughs, The Ticket That Exploded
        • Alan G Isaac
          ... http://www.american.edu/econ/notes/aimail.vim has this and a few other things. hth, Alan Isaac
          Message 4 of 5 , Dec 2, 2004
          • 0 Attachment
            On Thu, 2 Dec 2004, Christian Ebert apparently wrote:
            > I am looking for a regex or function to shrink the indenting of
            > higher quote levels in mails.

            http://www.american.edu/econ/notes/aimail.vim
            has this and a few other things.

            hth,
            Alan Isaac
          Your message has been successfully submitted and would be delivered to recipients shortly.