You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

35 lines
1.3 KiB

From: bernhard at alpha1.csd.uwm.edu (Bernhard Reiter)
Date: 20 Apr 1999 17:19:05 GMT
Subject: Quick fix to add "+="
References: <3717AB14.2926AF76@mediaone.net> <slrn7hfd1v.or9.bwinton@tor.dhs.org> <3717EE20.41343593@mediaone.net> <slrn7hg55v.q5o.bernhard@alpha1.csd.uwm.edu> <Pine.LNX.3.96.990420050248.5070A-100000@sup.phys.washington.edu>
Message-ID: <slrn7hpdo9.1qo.bernhard@alpha1.csd.uwm.edu>
X-UID: 322
On Tue, 20 Apr 1999 05:06:00 -0700, Fuming Wang <fuming at sup.phys.washington.edu> wrote:
>On 17 Apr 1999, Bernhard Reiter wrote:
>> 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
>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?
uh, I have been not precise enough and just outlined the idea.
:map! += ^[:s/\([a-zA-Z_][a-zA-Z0-9_]*\)$/\1=\1+/^M:noh^MA
Where ":" means go into vim Commandmode
"^[" means Esc, you have to enter it pressing Ctrl-v and then Esc
"^M" means "Return', you have to enter pressing Ctrl-v and then Return
Does that help? :)
Bernhard