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

sam-fans - fans of the sam editor

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/sam-fans

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 sam-fans sam-fans/ http://inbox.vuxu.org/sam-fans \
		sam-fans@hawkwind.utcs.toronto.edu
	public-inbox-index sam-fans

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.sam-fans


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git