[SunHELP] vi question

Nicholas Dronen sunhelp at sunhelp.org
Wed Jun 6 08:33:43 CDT 2001


:%s/<TAB>/ /g works just as well.  No control key necessary.

a<TAB><TAB>

:set list

a^I^I$

:%s/<TAB>/ /g

a  $

On Thu, Jun 07, 2001 at 09:18:14AM +0100, Will Mc Donald wrote:
> 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
> 
> _______________________________________________
> SunHELP maillist  -  SunHELP at sunhelp.org
> http://www.sunhelp.org/mailman/listinfo/sunhelp



More information about the SunHELP mailing list