Re: [9fans] Sam commands in acme

2009-06-29 Thread erik quanstrom
> unfortunately the overall line count almost always seems to trend > upwards regardless of the amount of code deleted. we are unwitting wack-a-mole players. - erik

Re: [9fans] Sam commands in acme

2009-06-29 Thread roger peppe
2009/6/27 Rob Pike : > Deletion is the greatest tool of software design. yes, i always get great pleasure from deleting code. unfortunately the overall line count almost always seems to trend upwards regardless of the amount of code deleted.

Re: [9fans] Sam commands in acme

2009-06-27 Thread J.R. Mauro
On Sat, Jun 27, 2009 at 3:20 PM, Rob Pike wrote: > > Indeed, but it's an excellent reason to remove a bad feature.  @ was a > bad feature. It was hard to use well because @* or @+ would consume > the whole file. Your structural regex paper gripes about . and * not consuming newlines. Apparently it

Re: [9fans] Sam commands in acme

2009-06-27 Thread Rob Pike
On Sat, Jun 27, 2009 at 11:17 AM, J.R. Mauro wrote: > On Fri, Jun 26, 2009 at 6:57 AM, roger peppe wrote: >> you need (.|\n) instead of . >> >> sam originally used @ as a "match everything" character >> but it was removed, presumably because it was rarely used. > > That's a stupid reason to remove

Re: [9fans] Sam commands in acme

2009-06-27 Thread J.R. Mauro
On Fri, Jun 26, 2009 at 6:57 AM, roger peppe wrote: > you need (.|\n) instead of . > > sam originally used @ as a "match everything" character > but it was removed, presumably because it was rarely used. That's a stupid reason to remove a good feature. By that token, maybe we should remove structu

Re: [9fans] Sam commands in acme

2009-06-26 Thread hugo rivera
Yes, you are right. Now I understand it, I missed the / after \*, so I was thinking that the comma was inside the regexp. Thanks a lot :-) 2009/6/26 Rudolf Sykora : > 2009/6/26 hugo rivera : >> I tested the command you suggested (,x/\/\*/.,/\*\//) and it works as >> I wanted, thanks. But there's s

Re: [9fans] Sam commands in acme

2009-06-26 Thread Rudolf Sykora
2009/6/26 hugo rivera : > I tested the command you suggested (,x/\/\*/.,/\*\//) and it works as > I wanted, thanks. But there's something I still don't understand and > is the meaning of that comma in there. As far as I know, the comma is > a  mark that delimits the addresses that acme understands,

Re: [9fans] Sam commands in acme

2009-06-26 Thread hugo rivera
I tested the command you suggested (,x/\/\*/.,/\*\//) and it works as I wanted, thanks. But there's something I still don't understand and is the meaning of that comma in there. As far as I know, the comma is a mark that delimits the addresses that acme understands, but I do not know how a comma i

Re: [9fans] Sam commands in acme

2009-06-26 Thread roger peppe
you need (.|\n) instead of . sam originally used @ as a "match everything" character but it was removed, presumably because it was rarely used. to match C comments, you need something like this: x/\/\*([^*]|\*[^\/]|[^*\/]|\n)*\*\// 2009/6/26 hugo rivera : > Hi, > I am trying to select all c com

Re: [9fans] Sam commands in acme

2009-06-26 Thread yy
2009/6/26 hugo rivera : > Hi, > I am trying to select all c comments from within a file using acme, > but I am unable to do it properly. The command x/\/\*.*\*\// is the > closest I could get, but it doesn't work with comments that span over > more than one line. This raises a question for me: some

[9fans] Sam commands in acme

2009-06-26 Thread hugo rivera
Hi, I am trying to select all c comments from within a file using acme, but I am unable to do it properly. The command x/\/\*.*\*\// is the closest I could get, but it doesn't work with comments that span over more than one line. This raises a question for me: somewhere, I cannot recall where, I re