VIM WordGame Puzzle

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

VIM WordGame Puzzle

David Rayner
Hi,
It has occurred to me that it must be possible to invent a VIM command
sequence that reads like an English sentence but performs a trivial
edit.

Example:-

facts

fa (find a)
cts (change till s)

Ideally The "Vim command sequence" would operate on a piece of gobbledygook text to leave behind

a phrase in some way related to the "vim command sequence"

It's sadly beyond me!

But any takers?

zzapper (also posted at comp.editors)


Reply | Threaded
Open this post in threaded view
|

Re: VIM WordGame Puzzle

Eric Arnold

Larry Wall did this with Perl in the early days.  He even had a poetry
contest, though those didn't seem to attempt to do anything real.  I
don't know where it might be these days, but maybe archived in CPAN.

As for Vim scripting, it has a little less flexibility than Perl in
providing word-only syntax, i.e. it's going to be hard to get around
() for functions, etc., but maybe it's not important.  Your best
bet for creating new words that do something is going to be the
"command" command.

--- David Rayner <[hidden email]> wrote:

> Hi,
> It has occurred to me that it must be possible to invent a VIM command
> sequence that reads like an English sentence but performs a trivial
> edit.
>
> Example:-
>
> facts
>
> fa (find a)
> cts (change till s)
>
> Ideally The "Vim command sequence" would operate on a piece of gobbledygook
> text to leave behind
>
> a phrase in some way related to the "vim command sequence"
>
> It's sadly beyond me!
>
> But any takers?
>
> zzapper (also posted at comp.editors)
>
>
>