From: fuming at sup.phys.washington.edu (Fuming Wang)
Date: Tue, 20 Apr 1999 05:06:00 -0700
Subject: Quick fix to add "+="
In-Reply-To: <slrn7hg55v.q5o.bernhard@alpha1.csd.uwm.edu>
References: <3717AB14.2926AF76@mediaone.net> <slrn7hfd1v.or9.bwinton@tor.dhs.org> <3717EE20.41343593@mediaone.net> <slrn7hg55v.q5o.bernhard@alpha1.csd.uwm.edu>
Message-ID: <Pine.LNX.3.96.990420050248.5070A-100000@sup.phys.washington.edu>
X-UID: 305                                                  

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





