sam-fans - fans of the sam editor
 help / color / mirror / Atom feed
From: "James A. Robinson" <jim.robinson@stanford.edu>
To: sam-fans@hawkwind.utcs.toronto.edu
Subject: preserving indention levels?
Date: Wed, 28 Jun 2000 22:33:28 -0500	[thread overview]
Message-ID: <00Jun29.135625edt.44226@hawkwind.utcs.utoronto.ca> (raw)

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


                 reply	other threads:[~2000-06-29 18:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=00Jun29.135625edt.44226@hawkwind.utcs.utoronto.ca \
    --to=jim.robinson@stanford.edu \
    --cc=sam-fans@hawkwind.utcs.toronto.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).