[SunHELP] vi question

Will Mc Donald sunhelp at sunhelp.org
Thu Jun 7 03:18:14 CDT 2001


For 1) something like...

:%s/CTRL-vCTRL-i/ /

So, colon, percent, s, as usual for find and replace all (assuming that's
what you want), then CTRL-v tells vi that what's coming up next is a control
character, then just press TAB or CTRL-i and then let vi know what you want
to replace TAB with.

This is according to our Vim/GVim expert/monkey and is un-tried and
un-tested. :) And he actually suggested...

:g/CTRL-vCTRL-i/s// /g

... because he likes doing stuff using :g

For 2), err I'll have a think about that. :)

----- Original Message -----
From: "Shahid Shahzad-W5106C" <W5106C at motorola.com>
To: <sunhelp at sunhelp.org>
Sent: Tuesday, June 05, 2001 11:51 PM
Subject: [SunHELP] vi question


> Hi,
> Does anyone know how to
> 1) Replace tabs with spaces in a file using vi editor.
> 2) How to find the Number of tabs, spaces and returns in a file using vi.
>
> Thanks,
> SS




More information about the SunHELP mailing list