From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 31 Mar 2014 18:23:33 +0200 From: Ruben Schuller To: 9fans@9fans.net Message-ID: <20140331182333.76231c1d@kiwi.kuchen> In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Acme, Edit, code and newline Topicbox-Message-UUID: d3d1c16c-ead8-11e9-9d60-3106f5b1d025 Hi, 2014-03-31 17:54 Daniel Peyrolon : > > Edit , x/^[^ ]+[ ]*[^(]*\([^)]*\)[ ]*\{[ ]*\n/ s/[ ]*\{[ ]*\n/\n\{/g > > So, it was simply a matter of changing "$" for "\n" at the x command! > How come my command didn't work? > It really should work with the "$", shouldn't it? > > Or even without the \n or the $, since the regexp already matched > until the '{', > so the substitution should have worked. I'm not really that proficient in acme/sam but, from the sam manpage: $ The null string at the end of the file. I'd also recommend reading http://doc.cat-v.org/bell_labs/sam_lang_tutorial/ . It helped me a lot getting a better undestanding of the command language. Take care, Ruben