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.

40 lines
1.2 KiB

From: fuming at (Fuming Wang)
Date: Tue, 20 Apr 1999 05:06:00 -0700
Subject: Quick fix to add "+="
In-Reply-To: <>
References: <> <> <> <>
Message-ID: <>
X-UID: 305
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?