Which map is active when I overwrite text with R
Titus von der Malsburg
malsburg at gmail.com
Fri Mar 9 16:11:29 CET 2012
On Fri, Mar 9, 2012 at 9:14 AM, Frank Fischer
<frank.fischer at mathematik.tu-chemnitz.de> wrote:
> On Wed, Mar 07, 2012 at 03:45:41PM +0100, Titus von der Malsburg wrote:
>> In insert mode, I bind TAB to a custom expand function that is based
>> on hippie-expand. However, when I overwrite text with the R command,
>> I would also like to be able to use the expand function. During
>> overwriting, TAB is bound to indent-for-tab-command and unfortunately
>> it's not clear to me which map is active during overwrite. Could
>> somebody please give me a hint?
>
> I think `evil-replace-state-map' is what you're looking for.
Ah right, thank you! I went through evil-maps.el but overlooked it. Sorry.
The thing is now that when I bind TAB to my expand function and hit
TAB in replace state it doesn't overwrite the existing text with the
expansion but inserts the expansion. I think I would fix that by
binding TAB in replace state to a wrapper of my expand-function that
first determines the expansion, inserts it, and then deletes a string
that is as long as the expansion following the expansion. While this
should work, I'm wondering: is there a better way to do this?
Specifically, I'm wondering if evil has a way to make the overwriting
transparent for the expansion function.
Best,
Titus
More information about the implementations-list
mailing list