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: References: <3717AB14.2926AF76@mediaone.net> <3717EE20.41343593@mediaone.net> Message-ID: 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 > =+ > 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