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

Re: Bug in formatting of nested comments?

Expand Messages
  • Gary Johnson
    ... Nice! Thank you! I always learn a lot from reading these mappings, too. I did make one change to preserve the right margin: instead of deleting the
    Message 1 of 3 , Sep 4 11:06 AM
    • 0 Attachment
      On 2003-09-04, Klaus Bosau <kbosau@...> wrote:
      > On Tue, 2 Sep 2003, Gary Johnson wrote:
      >
      > > [...]
      > >
      > > The problem is that vim ignores the list item tags at the beginning of
      > > those lines when they are in quoted lines. I don't know if this is
      > > a bug or a missing feature, but since vim recognizes paragraphs within
      > > such quoted regions, and even nested quoted regions, it would be nice
      > > if it also recognized these special paragraph types within quoted
      > > regions.
      >
      > Not as powerful as an inbuilt solution, but maybe helpful in certain
      > situations.. Strip the comment leader referred to prior to applying 'gq'
      > and insert it again afterwards..
      >
      > vn ,gq <Esc>'<0yl:'<,'>s/^.//<Cr>'[gq']:'<,.s/^/\=@"/<Cr>

      Nice! Thank you! I always learn a lot from reading these mappings,
      too. I did make one change to preserve the right margin: instead
      of deleting the comment leader, I replaced it with a space.

      vn ,gq <Esc>'<0yl:'<,'>s/^./ /<Cr>'[gq']:'<,.s/^ /\=@"/<Cr>

      Regards,
      Gary

      --
      Gary Johnson | Agilent Technologies
      garyjohn@... | Wireless Division
      | Spokane, Washington, USA
    Your message has been successfully submitted and would be delivered to recipients shortly.