From: Rob Pike <robpike@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] [acme] Edit command -- More than one argument?
Date: Mon, 27 Oct 2014 08:34:53 -0700 [thread overview]
Message-ID: <CAKzdPgx+p97ScEmeUsAHEj25CVYujsfCT6HTBvd9BcHZiqNsog@mail.gmail.com> (raw)
In-Reply-To: <20141027152832.GA11570@hypnotoad>
[-- Attachment #1: Type: text/plain, Size: 1118 bytes --]
Edit {
s/^/\[/
s/\:\ /\]/
}
On Mon, Oct 27, 2014 at 8:28 AM, Eduardo Alvarez <astrochelonian@gmail.com>
wrote:
> Hello, everyone,
>
> I'm in the process of learning acme via Russ Cox's p9p port. Recently, I
> found
> myself editing some text to use with markdown, and needed to make more
> than one
> modification to a list. I wanted to know if it's possible to give the Edit
> command more than one argument. For example, I found myself needing to
> replace
> colons with a close bracket (]), and inserting an open bracket at the
> beginning
> of the line. So I did this:
>
> Edit s/^/\[/
> Edit s/\:\ /\]/
>
> And I was hoping to combine these into a single line, so, for example:
>
> Edit s/^/\[/ s/\:\ /\]/
> (Not sure if escaping was necessary, but I was playing it safe)
>
> Doing exactly what I did above resulted in the error
>
> "Edit: newline expected (saw f)"
>
> So that's obviously not it. But I'm not sure if it's at all possible.
>
> Thank you in advance.
> --
> Eduardo Alvarez
>
> "Stercus, Stercus, Stercus, moriturus sum"
> -- Rincewind The Wizzard
>
[-- Attachment #2: Type: text/html, Size: 1926 bytes --]
next prev parent reply other threads:[~2014-10-27 15:34 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-27 15:28 Eduardo Alvarez
2014-10-27 15:34 ` Rob Pike [this message]
2014-10-27 15:46 ` Ingo Krabbe
2014-10-27 17:09 ` Rob Pike
2014-10-27 17:15 ` lucio
2014-10-27 17:33 ` Ingo Krabbe
2014-10-27 17:33 ` Eduardo Alvarez
2014-10-27 17:35 ` Skip Tavakkolian
2014-10-27 17:29 ` Kostarev Ilya
2014-10-27 16:41 sl
2014-10-27 22:54 ` Rob Pike
2014-10-27 23:39 ` Paul Lalonde
2014-10-28 3:41 ` erik quanstrom
2014-10-28 3:49 ` Paul Lalonde
2014-10-28 22:51 ` erik quanstrom
2014-10-28 23:08 ` Paul Lalonde
2014-10-28 23:47 ` erik quanstrom
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=CAKzdPgx+p97ScEmeUsAHEj25CVYujsfCT6HTBvd9BcHZiqNsog@mail.gmail.com \
--to=robpike@gmail.com \
--cc=9fans@9fans.net \
/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).