Subject: but tom-2 repeat cmd feature?

From: "Fco. J. Ballesteros" <[email-masked]>
Date: Thu, 27 Jul 2000 05:14:52 -0500

Wouldn't it be nice if the button-2 menu could have an entry to repeat
the last command in the ~~sam~~ window?

I found myself repeating <move mouse> <click> "|fmt" just to reformat 
paragraphs in a LaTeX document I was editing. 

Anyone made that change to sam? Or is there a better way to do it?

(Doing a single |fmt when done with the modifications is not an option
because there are sections of the document that shoudn't be fmt'd).

regards

-- 
    ()    ascii ribbon campaign - against html mail 
    /\                          - against microsoft attachments

---

From: Steve Kilbane <[email-masked]>
Date: Fri, 28 Jul 2000 01:52:53 -0500

> the last command in the ~~sam~~ window?

plausibly, but where the does "the last command" start and finish?

> paragraphs in a LaTeX document I was editing. 

After having done a "send" in the sam window, it's the default option
next time around. So four cicks do it:

- single click selects the sam window;
- double-click on b1 selects the whole line
- single click on b2 sends.

> because there are sections of the document that shoudn't be fmt'd).

And you can't use y/pattern/ to avoid those parts?

steve

---

From: "James A. Robinson" <[email-masked]>
Date: Sat, 29 Jul 2000 16:41:06 -0500

> paragraphs in a LaTeX document I was editing. 

If I find I have to keep using ~~sam~~ do to the same thing, I just
set dot, double click the command in ~~sam~~ and select send. It is
more mouse movement and clicks than what you are suggesting.

However, I have found that it is normally pretty easy to use sam's
command language to find the patterns I want to format.  For example if
I had a selection

Here is some text that should
be adjusted with fmt

\begin{math}
math != fmt (
	x,
	y,
		z,
	a)
\end{math}

But the above math should not, and certainly
not

\begin{quote}
a
quote
of sorts
\end{quote}

then the regex command 'x/(.+\n)+/v/^\\begin{/|fmt' applied to the
selection will run through the text and fmt only those blocks of text
that don't begin with \begin{.

If you didn't have newline seperators I imagine you could do some fancy
things with ',' and ';' and friends, but I'm not sure what. In those
cases, I normally take a three step process where one regex splits the
text into managable pieces, one regex formats select pieces, and the
last regex recombines the pieces.

Jim

---

From: Paul Jackson <[email-masked]>
Date: Thu, 27 Jul 2000 20:27:11 -0500

On Thu, 27 Jul 2000, Fco. J. Ballesteros wrote:
> I found myself repeating <move mouse> <click> "|fmt"
> just to reformat paragraphs ... 

A simple thing I do that helps here -- I have a couple
commands, named "F" and "Q", on my path, which are
trivial shell scripts calling my favorite formating
and quoting (prepend '> ' to each line) filters.

Then the command is reduced a couple of key strokes,
to such as "|F" (both of which are shifted, it happens,
for even less finger calisthenics).

-- 
I won't rest till it's the best ...	   Software Production Engineer
Paul Jackson ([email-masked]; [email-masked]) 3x1373 http://sam.engr.sgi.com/pj