* replace tab stops with spaces
@ 2002-10-14 9:09 Roland Reichenberg
2002-10-14 9:35 ` Edric M Ellis
2002-10-14 14:03 ` Kevin Dziulko
0 siblings, 2 replies; 4+ messages in thread
From: Roland Reichenberg @ 2002-10-14 9:09 UTC (permalink / raw)
Hi everybody,
in our small development team nearly everybody uses a different editor
to work on our sources. And not every editor is configured to use blank
spaces instead of tab stops. So our sources contain both real tab stops
and blank spaces.
This bothers me while editing buffers. Is there an easy-to-use command
which converts all tab stops into 4 blank spaces?
Thanks in advance,
Roland
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: replace tab stops with spaces
2002-10-14 9:09 replace tab stops with spaces Roland Reichenberg
@ 2002-10-14 9:35 ` Edric M Ellis
2002-10-14 14:03 ` Kevin Dziulko
1 sibling, 0 replies; 4+ messages in thread
From: Edric M Ellis @ 2002-10-14 9:35 UTC (permalink / raw)
Roland Reichenberg wrote:
> in our small development team nearly everybody uses a different
> editor to work on our sources. And not every editor is configured to
> use blank spaces instead of tab stops. So our sources contain both
> real tab stops and blank spaces.
I assume telling them to use a better editor is out of the question ;)
> This bothers me while editing buffers. Is there an easy-to-use
> command which converts all tab stops into 4 blank spaces?
C-x h M-x untabify RET?
NB that "untabify" uses the current value of tab-width, but you could
hard-wire it, and do the whole buffer at once like this:
(defun untabify-whole-buffer-4 nil
(interactive)
(let ((tab-width 4))
(untabify (point-min) (point-max))))
Cheers,
Edric.
--
Edric M Ellis
The MathWorks, Ltd., Matrix House, Cowley Park, Cambridge CB4 0HH, UK
Tel: +44 (0) 1223 423 200 Ext: 218
Fax: +44 (0) 1223 423 255
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: replace tab stops with spaces
2002-10-14 9:09 replace tab stops with spaces Roland Reichenberg
2002-10-14 9:35 ` Edric M Ellis
@ 2002-10-14 14:03 ` Kevin Dziulko
1 sibling, 0 replies; 4+ messages in thread
From: Kevin Dziulko @ 2002-10-14 14:03 UTC (permalink / raw)
With the cursor at the beginning of the file, type M-x replace string.
At the "Replace string:" prompt, hit tab key then enter.
At the "Replace string with:" prompt hit 4 spaces then enter.
On Mon, 14 Oct 2002, Roland Reichenberg wrote:
> Hi everybody,
>
> in our small development team nearly everybody uses a different editor
> to work on our sources. And not every editor is configured to use blank
> spaces instead of tab stops. So our sources contain both real tab stops
> and blank spaces.
>
> This bothers me while editing buffers. Is there an easy-to-use command
> which converts all tab stops into 4 blank spaces?
>
> Thanks in advance,
>
> Roland
>
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: replace tab stops with spaces
@ 2002-10-14 14:25 Bingham, Jay
0 siblings, 0 replies; 4+ messages in thread
From: Bingham, Jay @ 2002-10-14 14:25 UTC (permalink / raw)
The suggested approach may produce undesirable results, such as when a tab takes less than a fixed number of spaces, which is the reason for existence of tab characters.
Instead try the M-x untabify command at the start of the buffer
untabify is an interactive compiled Lisp function in `tabify'.
(untabify START END)
Convert all tabs in region to multiple spaces, preserving columns.
Called non-interactively, the region is specified by arguments
START and END, rather than by the position of point and mark.
The variable `tab-width' controls the spacing of tab stops.
-_
J_)
C_)ingham
. HP - NonStop Austin Software & Services - Software Product Assurance
. Austin, TX
. Language is the apparel in which your thoughts parade in public.
. Never clothe them in vulgar and shoddy attire. -Dr. George W. Crane-
-----Original Message-----
From: Kevin Dziulko [mailto:dziulko@klaatu.canisius.edu]
Sent: Monday, October 14, 2002 9:04 AM
To: help-gnu-emacs@gnu.org
Subject: Re: replace tab stops with spaces
With the cursor at the beginning of the file, type M-x replace string.
At the "Replace string:" prompt, hit tab key then enter.
At the "Replace string with:" prompt hit 4 spaces then enter.
On Mon, 14 Oct 2002, Roland Reichenberg wrote:
> Hi everybody,
>
> in our small development team nearly everybody uses a different editor
> to work on our sources. And not every editor is configured to use blank
> spaces instead of tab stops. So our sources contain both real tab stops
> and blank spaces.
>
> This bothers me while editing buffers. Is there an easy-to-use command
> which converts all tab stops into 4 blank spaces?
>
> Thanks in advance,
>
> Roland
>
> _______________________________________________
> Help-gnu-emacs mailing list
> Help-gnu-emacs@gnu.org
> http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
>
_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-10-14 14:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-14 9:09 replace tab stops with spaces Roland Reichenberg
2002-10-14 9:35 ` Edric M Ellis
2002-10-14 14:03 ` Kevin Dziulko
-- strict thread matches above, loose matches on Subject: below --
2002-10-14 14:25 Bingham, Jay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).