sam-fans - fans of the sam editor
 help / color / mirror / Atom feed
* how to shrink dot
@ 1992-12-09  2:10 Scott Schwartz
  0 siblings, 0 replies; 3+ messages in thread
From: Scott Schwartz @ 1992-12-09  2:10 UTC (permalink / raw)
  To: Sam Fans

Given 
	foo{
		stuff
	}
if you click on a brace dot is set to the text between them.  Then
how do you ask to shrink dot to include only whole lines within?

.-0+1,.+0-1 doesn't work.  .-1+2,.+1-2 works, though I'd expect it to
fail at the top and bottom of the file, which it seems not to.  On the
other hand, if dot includes the entire top line, it fails.  Strange.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how to shrink dot
  1992-12-14  3:47 ` John Mackin
@ 1992-12-19  2:34   ` Scott Schwartz
  0 siblings, 0 replies; 3+ messages in thread
From: Scott Schwartz @ 1992-12-19  2:34 UTC (permalink / raw)
  To: John Mackin; +Cc: Sam Fans


[sorry for the delay replying; its been one of those weeks]

John writes:
| You don't need to shrink dot for this to work.  This was the kind of thing
| I thought you would have in mind.  All you have to do is to pick the whole
| lines first.  ...  x/^.*$/ x/^/a/    /

Workarounds, workarounds.  :-)

Suppose I want to do the formatting by pipeing to some program?  Then I
need the selection to be correct beforehand.

| I don't understand this.  When you use double-click to `select a region
| with delimiters' sam _does_ exclude them from the selection: there is no
| way to get it to _include_ them.  Maybe you mean if you are using an x
| command -- can you give me another concrete example?

There I was thinking of something like clipping mailbox entries.  If
you select one with something like /^From /;/^From / you need to trim
the top and bottom to get the actual message excluding the From line.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: how to shrink dot
       [not found] <92Dec13.215944est.2516@groucho.cs.psu.edu>
@ 1992-12-14  3:47 ` John Mackin
  1992-12-19  2:34   ` Scott Schwartz
  0 siblings, 1 reply; 3+ messages in thread
From: John Mackin @ 1992-12-14  3:47 UTC (permalink / raw)
  To: Scott Schwartz; +Cc: Sam Fans

Scott and I are talking about shrinking dot.

    At first, I wanted to change the indentation of the stuff in between
    the inner braces in something like
    	for (..) {
    	  for (..) {
    	    stuff
    	  }
    	}
    where it was easier to double click on the brace than sweep out exactly
    the right lines.

You don't need to shrink dot for this to work.  This was the kind of thing
I thought you would have in mind.  All you have to do is to pick the whole
lines first.  Try this, tested in the very sam I am writing this mail in:
Snarf this command, then double-click inside the first brace, change to the
sam window and send:

x/^.*$/ x/^/a/    /

As you can see, it works on the inner lines only, as we want.

    More generally, it is easy to select a region with delimiters,
    but it you want to process the stuff between the delimiters
    you have to exclude them from dot.

I don't understand this.  When you use double-click to `select a region
with delimiters' sam _does_ exclude them from the selection: there is no
way to get it to _include_ them.  Maybe you mean if you are using an x
command -- can you give me another concrete example?

OK,
John.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1992-12-19  2:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1992-12-09  2:10 how to shrink dot Scott Schwartz
     [not found] <92Dec13.215944est.2516@groucho.cs.psu.edu>
1992-12-14  3:47 ` John Mackin
1992-12-19  2:34   ` Scott Schwartz

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).