[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vile] Is there any easy way to change indent globally?
From: |
Thomas Dickey |
Subject: |
Re: [vile] Is there any easy way to change indent globally? |
Date: |
Wed, 04 Apr 2012 16:50:30 -0400 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Wed, Apr 04, 2012 at 07:25:47PM +0100, Chris Green wrote:
> Is there any easy way in vile/xvile to change the indenting of a file
> that uses spaces for indenting?
yes/no: vile has the entab and entab-leading (and corresponding detab)
commands, which can be used to alter the spaces to/from tabs (and with
a suitable macro, change the tab-interval).
"detab-lines-til" ^A-<space>
( operator: convert tabs to spaces in the region )
( undoable, accepts range, may follow global command )
"entab-lines-til" ^A-^I
( operator: convert spaces to tabs where possible in the region )
( undoable, accepts range, may follow global command )
"leading-detab-lines-til" ^X-<space>
( operator: convert leading tabs to spaces in the region )
( undoable, accepts range, may follow global command )
"leading-entab-lines-til" ^X-^I
( operator: convert leading spaces to tabs where possible in the region )
( undoable, accepts range, may follow global command )
I've used that, though not so much recently. Over the past 10-12 years I've
mostly used some external indent program, combined with a script to let me
preview the changes and tweak the line-breaks.
Generally leading-entab is safer as I recall, since the plain entab doesn't
know about quoted strings in C, etc.
--
Thomas E. Dickey <address@hidden>
http://invisible-island.net
ftp://invisible-island.net
signature.asc
Description: Digital signature