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

Re: vertical alignment shortcuts

Expand Messages
  • Douglas L Potts
    ... Dr. Chip has a set of vim mappings to go with his textab utility that accomplish alignment on commas, colons, and others. You can get them from his web
    Message 1 of 3 , Jun 28, 2001
    • 0 Attachment
      On Wed, Jun 27, 2001 at 05:21:17PM -0700 Adam Monsen wrote:
      > Can any guru help me in reformatting this:
      >
      > printf( "%d %d %d here\n", num1, num3, num2 );
      > printf( "%d\n\n", num1 );
      > printf( "%d", num3 );
      > printf( "%d %d", num2, num2 );
      >
      > to this:
      >
      > printf( "%d %d %d here\n", num1, num3, num2 );
      > printf( "%d\n\n", num1 );
      > printf( " %d ", num3 );
      > printf( "%d %d", num2, num2 );
      >
      >
      > I want to write a general function to handle stuff like this, but I don't
      > know of a way to vertically align arbitrary parts of text within a line.
      > Maybe there's a way to have a marker at a certain column, then I could just
      > fill in space with a shortcut key or something, to create nicely aligned
      > code while I'm typing. That would be cool, yes?
      Dr. Chip has a set of vim mappings to go with his textab utility that
      accomplish alignment on commas, colons, and others. You can get them
      from his web site http://www.erols.com/astronaut/

      The textab utility acts as a text filter on the lines you tell it to
      user (via either visual (I belive) or marks).

      I use it and love it (Thanks Dr. C)!

      HTH,
      -Doug

      --
      *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
      Douglas L. Potts Url: http://www.bigfoot.com/~pottsdl
      "The Matrix is everywhere, it's all around us, here even in this room. You can
      see it out your window, or on your television. You feel it when you go to work,
      or go to church or pay your taxes. It is the world that has been pulled over
      your eyes to blind you from the truth... Unfortunately, no one can be told what
      the Matrix is. You have to see it for yourself. ~Morpheus "- from The Matrix
      *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
    Your message has been successfully submitted and would be delivered to recipients shortly.