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

Re: Format text in Vim

Expand Messages
  • Antoine J. Mechelynck
    ... No colon needed (it s a Normal-mode command, not an Ex-command). In Normal mode: gq{motion} Format current line: gqq Format current paragraph: gqap Format
    Message 1 of 2 , Jul 31, 2004
    • 0 Attachment
      Simón <simon@...> wrote:
      > Hi all,
      >
      > how can I format text in gvim? I´m trying to use the gq operators in
      > visual mode, but after select the text and typing :gqap it tells me
      > that it isn´t a command. What can I do?
      >
      > Thanks, Simon.

      No colon needed (it's a Normal-mode command, not an Ex-command).

      In Normal mode:

      gq{motion}

      Format current line:

      gqq

      Format current paragraph:

      gqap

      Format whole file:

      gggqG

      In Visual mode: Format visual area (Linewise-visual preferred):

      gq

      HTH,
      Tony.
    Your message has been successfully submitted and would be delivered to recipients shortly.