[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: some vi equivalents please?

From: Drew Adams
Subject: RE: some vi equivalents please?
Date: Thu, 6 Nov 2008 08:50:35 -0800

> Your macro is not equivalent to the vi :g/<pat>/d unless it is
> embedded into a loop.  The loop could be programmatic or interactive
> (keep doing Cx e)

To loop with a keyboard macro:
`C-x e e e e e e e e'... or `C-u 1000 C-x e'

> (without the infrequently used flush-lines)

Why "infrequently"?

> I work in an environment where I am the old-timer using the strange
> old clunky emacs. I have a hell of a time convincing my half-my-age
> coworkers to use emacs.  Confirming the clunkyness (because I dont
> know a command) does not help my cause :-)

Don't bother. ;-)

Or convince by example. A friend asked his team to estimate how long it would
take to transform tons of C++ code in a certain context. The estimates were all
about 2-3 man-weeks. He looked through the existing Emacs Lisp source code,
hacked something together, and did all of the code transformation in less than a

YMMV, of course. But Emacs is not so clunky. ;-)

> Funnily enough, this requirement came up in a large scale edit that
> required adding a single line to 200 classes in 37 files.  I did this
> (for these coworkers) by writing 3 elisp functions that implemented an
> iterator that sequentially went through the 200 classes.  Producing
> the file:lineNo list of those 200 cases was where the original request
> (for deleting lines) came up.

There you go. I should think that such demonstrations might eventually pique the
interest of a few of your half-your-agers.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]