From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from aubrey.stanford.edu ([171.64.31.58]) by hawkwind.utcs.utoronto.ca with SMTP id <44290>; Mon, 31 Jul 2000 20:10:12 -0500 Received: (qmail 14895 invoked from network); 29 Jul 2000 20:41:06 -0000 Received: from localhost.highwire.org (HELO aubrey.stanford.edu) (127.0.0.1) by localhost.highwire.org with SMTP; 29 Jul 2000 20:41:06 -0000 X-url: http://highwire.stanford.edu/~jimr/ X-face: "!ZH^<"U,NeU:732A To: "Fco. J. Ballesteros" cc: sam-fans@hawkwind.utcs.toronto.edu Dcc: Subject: Re: but tom-2 repeat cmd feature? In-reply-to: Message from "Fco. J. Ballesteros" of "Thu, 27 Jul 2000 05:14:52 CDT."References: <14719.64908.755161.847689@nautilus.dat.escet.urjc.es> <14719.64908.755161.847689@nautilus.dat.escet.urjc.es> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14888.964903265.1@aubrey.stanford.edu> Date: Sat, 29 Jul 2000 16:41:06 -0500 Message-Id: <00Jul31.201012edt.44290@hawkwind.utcs.utoronto.ca> > 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 "|fmt" just to reformat > 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