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

Re: French-style paragraphs (Was: Justify, margin and text width on already existing files)

Expand Messages
  • Klaus Bosau
    ... fun! GQ() range exe sil . a:lastline . put _ | ma z exe a:firstline while line( . )
    Message 1 of 5 , May 11, 2004
    • 0 Attachment
      On Mon, 10 May 2004, Antoine J. Mechelynck wrote:

      > [...] What I would like to have is (in its simplest form) "Any line
      > starting with whitespace is not a candidate for joining with the
      > previous line."

      fun! GQ() range
      exe 'sil ' . a:lastline . ' put _' | ma z
      exe a:firstline
      while line('.') < line("'z")
      exe 'norm! -/^\s^MV/\n\s\|\%' . (line("'z") - 1) . 'l^Mgq'
      +
      endwhile
      sil 'z- s/\n//
      endfun
      vn <silent> q :call GQ()<Cr>

      (^M = <C-V><Cr>, set fo=tcq2 noai)

      HTH

      Klaus
    Your message has been successfully submitted and would be delivered to recipients shortly.