[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Substiotution of tabs with spaces...

From: Alan Mackenzie
Subject: Re: Substiotution of tabs with spaces...
Date: Fri, 15 Apr 2005 19:55:42 +0000
User-agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (Linux/2.0.35 (i686))

address@hidden wrote on Fri, 15 Apr 2005 11:06:02 +0200:

> Hi,
> is there a smart way to replace all tabs with 3 spaces in a buffer edited
> in c-mode
> (both comments and code lines)

Yes, but that might not be what you really want.  Assuming you've got
tab-width set to 3, a tab extends to the next column which is a multiple
of 3.  So if you had this in a buffer


it would look like this:

a  b

If you replaced the tab with three spaces, you'd end up with this

a   b.

I suggest you do this:  C-x h  (to mark the entire buffer) followed by
M-x untabify.

> Thank you very much.

And the best of luck!

Alan Mackenzie (Munich, Germany)
Email: address@hidden; to decode, wherever there is a repeated letter
(like "aa"), remove half of them (leaving, say, "a").

reply via email to

[Prev in Thread] Current Thread [Next in Thread]