Apr 20, 1999, 5:06 AM
Post #6 of 7
(1118 views)
Permalink
Hi,
On 17 Apr 1999, Bernhard Reiter wrote:
> Your editor is your friend:
>
> Just use a macro in your favorite editor, which grabs the left
> word of the curser postion and expands it into
> <word>=<word>+
> Trigger the macro with "+=" and you type excactly what you
> always type, just the result is more python like.
>
> For vim, the following does the trick (without the special word matching caps
> new vim versions provide. the ":noh is for people using hlsearch in
> vim 5.x version.)
>
>
> :map!^[:s/\([a-zA-Z_][a-zA-Z0-9_]*\)$/\1=\1+/^M:noh^MA
>
> Bernhard
>
This works for me, except I got "no mapping found" when I enter the
suggested command. I am using vim 5.3. Is this the problem?
Thanks!
Fuming