Quick fix to add "+="
Bernhard Reiter
bernhard at alpha1.csd.uwm.edu
Tue Apr 20 13:19:05 EDT 1999
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
More information about the Python-list
mailing list