sam-fans - fans of the sam editor
 help / color / mirror / Atom feed
From: rob@research.att.com
To: sam-fans@hawkwind.utcs.toronto.edu
Date: Tue, 15 Dec 1992 23:04:40 -0500	[thread overview]
Message-ID: <92Dec15.231339est.2701@hawkwind.utcs.toronto.edu> (raw)

trimming the edges of dot in sam is actually pretty easy, especially
using +0 and -0 as addresses.  these move to the nearest end or beginning
of a line.  if you've just double clicked the braces in
	for(;;){
		...
	}
and you want to trim it to the whole lines within, just say
	-0+,+0-
it looks funny but it means something: move the beginning of
dot to the beginning of the previous line, then advance it a line,
ending up at the first line boundary within dot, and symmetrically
for the end of dot.

you may of course include a command, as in
	-0+,+0- x/^	/d
or, what i prefer,
	-0+,+0- s/^	//g
because dot stays put.  when you're learning this stuff, though,
don't use a command: just try the address to see what gets selected.

another trick: adjusting to the null string at the beginning or end
of dot using +#0 and -#0, an exercise i leave to the reader.

since this is my first message to this group, i should take the
opportunity to say how encouraged i am by the attention sam seems
to have acquired and delight at how creatively people seem to be
using it.  also, i would like to make an announcement that
the public release of sam would not and could not have happened
without the generous and able assistance of bob flandrena, who
did all the work of making the plan 9 sam (the only one i use)
portable to the many flavors of unix out there.

-rob pike


             reply	other threads:[~1992-12-16  4:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-12-16  4:04 rob [this message]
1992-12-19  3:19 ` Scott Schwartz

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=92Dec15.231339est.2701@hawkwind.utcs.toronto.edu \
    --to=rob@research.att.com \
    --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).