[lug] vi(m) question
Sean Reifschneider
jafo at tummy.com
Thu Oct 5 11:49:02 MDT 2000
On Thu, Oct 05, 2000 at 12:39:47PM -0500, Michael J. Hammel wrote:
>Interesting. I've always used:
>
>:1,$s/ / /g
>
>(where the first string is a tab and the second 3 spaces)
>
>Does "1G!Gexpand -3" work better? Will it, for example, maintain alignment
>of columns spaced using tabs?
The difference being that expand understands the difference between
"a<tab>b" and "ab<tab>c" and makes the second column line up. Your
substitution only works if the tabs appear only at the beginning of
the line.
a b
ab c
versus:
a b
ab c
Sean
--
Get your data structures correct first, and the rest of the program will
write itself. -- David Jones
Sean Reifschneider, Inimitably Superfluous <jafo at tummy.com>
tummy.com - Linux Consulting since 1995. Qmail, KRUD, Firewalls, Python
More information about the LUG
mailing list