Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 May 2020 14:58:34 -0400
From:      "Derek (freebsd lists)" <482254ac@razorfever.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: nvi expandtab - tabs to spaces
Message-ID:  <3cb01e2e-a77a-da31-fe4f-65d3a4584d59@chezmarcotte.ca>
In-Reply-To: <778c15db-ab60-4856-b08a-479adfafaedf@chezmarcotte.ca>
References:  <0c30ebf7-e5b1-6fcb-d81e-2a039415f8a1@chezmarcotte.ca> <CAEJNuHyDc%2B1hgg_UwDzuu=eskf-DhhoKU%2BjuF3LUL%2B2qQ919HQ@mail.gmail.com> <c736fc5f-3a12-6d8a-1830-df44b74b2dfb@chezmarcotte.ca> <CAD1r1D%2Bm%2BUQ=ECS=wCsKt5684buoE-LfnGqhy%2BiyxB=VdqiPfw@mail.gmail.com> <CAEJNuHw4fWBUP6Htutrv7RywBkxRfr2o4cFo7v6e0UxNfjgoEQ@mail.gmail.com> <bc251662-9588-6e2d-74c1-76df1829c214@infracaninophile.co.uk> <778c15db-ab60-4856-b08a-479adfafaedf@chezmarcotte.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2020-05-26 2:09 p.m., Derek (freebsd lists) wrote:
> On 2020-05-26 12:48 p.m., matthew@FreeBSD.org wrote:
>> Or use expand(1) from the command line...
>>
> 
> That's what I'm looking for, thank you.  No external dependencies.  I'll 
> just change my muscle memory around.
> 
> Gratitude.
> 

I guess I should add for posterity, you can do in vi:

:<range>!expand -t <width>

So:

:.,.+6!expand -t 4

takes the current and the following 6 lines, and converts the tabs to 4 
spaces.

:%!expand

will convert the whole buffer to 8-space tabs.

Thanks again!




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3cb01e2e-a77a-da31-fe4f-65d3a4584d59>