sam-fans - fans of the sam editor
 help / color / mirror / Atom feed
From: "James A. Robinson" <jim.robinson@stanford.edu>
To: "Fco. J. Ballesteros" <nemo@gsyc.escet.urjc.es>
Cc: sam-fans@hawkwind.utcs.toronto.edu
Subject: Re: but tom-2 repeat cmd feature?
Date: Sat, 29 Jul 2000 16:41:06 -0500	[thread overview]
Message-ID: <00Jul31.201012edt.44290@hawkwind.utcs.utoronto.ca> (raw)
In-Reply-To: Message from "Fco. J. Ballesteros" <nemo@gsyc.escet.urjc.es>  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>

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

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


      parent reply	other threads:[~2000-08-01  1:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-07-27 10:14 Fco. J. Ballesteros
2000-07-28  1:27 ` Paul Jackson
2000-07-28  6:52 ` Steve Kilbane
2000-07-29 21:41 ` James A. Robinson [this message]

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=00Jul31.201012edt.44290@hawkwind.utcs.utoronto.ca \
    --to=jim.robinson@stanford.edu \
    --cc=nemo@gsyc.escet.urjc.es \
    --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).