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 (Bernhard Reiter)
Date: 20 Apr 1999 17:19:05 GMT
Subject: Quick fix to add "+="
References: <> <> <> <> <>
Message-ID: <>
X-UID: 322
On Tue, 20 Apr 1999 05:06:00 -0700, Fuming Wang <fuming at> 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? :)