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

42997Re: padding lines to 80 characters [SOLVED]

Expand Messages
  • John Aldridge
    Sep 1, 2003
      The old vi way would be:

      >:%s/$/<80 or more spaces go here>/g

      :%s/^.\{80\}/&/

      Actually, the caret (^) shouldn't be necessary,
      but I think it clarifies the regex.

      ~
      ~
      ~
      "John R. Aldridge, Jr."

      At 03:30 09-01-2003, Denis Perelyubskiy wrote:

      >Hi, Denis. Nice talking to you :)
      >
      >Don't know if there is a better solution, but here
      >is what works for me:
      >
      >:%s/$/<80 or more spaces go here>/g
      >:%s/:%s/\%80c *$//g
      >
      >denis
      >
      >ps. sorry for the spam. it did not occur to me that it was
      >this simple before posting :(
      >
      >On Sun, 31 Aug 2003 22:39:14 -0800,
      >"Denis Perelyubskiy" <lists@...> said:
      > > hello,
      > >
      > > is it possible to padd every line, if its length is
      > > smaller then 80 characters, to 80 characters with
      > > spaces? and if so, how?
      > >
      > > thanks,
      > >
      > > denis
      > > --
      > > // mailto: Denis Perelyubskiy <lists at overwhelmTAKECAPITALSOUT dot net>
      > > // icq : 12359698
      >--
      >// mailto: Denis Perelyubskiy <lists at overwhelmTAKECAPITALSOUT dot net>
      >// icq : 12359698
    • Show all 4 messages in this topic