sam-fans - fans of the sam editor
 help / color / mirror / Atom feed
* preserving indention levels?
@ 2000-06-29  3:33 James A. Robinson
  0 siblings, 0 replies; only message in thread
From: James A. Robinson @ 2000-06-29  3:33 UTC (permalink / raw)
  To: sam-fans

I've got a question on how to solve an editing problem.
When one has code that is indented at various levels,
and needs to be replaced with multiple-line blocks, how
does one handle preserving the indention?

For example:

	...
	System.err.println("some annoying debugging but in");
	...
		System.err.println("some other annoying debugging but in");
	...

into

	...
	if (Debug.level(Debug.DEBUG))
	{
		Debug.debug(this, "some annoying debugging but in");
	}
	...
	if (Debug.level(Debug.DEBUG))
	{
		Debug.debug(this, "some other annoying debugging but in");
	}
	...

Is using something like s/^([ 	]+).../...\1\n\1/ the only solution?

Jim


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-06-29 18:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-06-29  3:33 preserving indention levels? James A. Robinson

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 NNTP newsgroup(s).