Question about strict vim compatibility

Eric S Fraga e.fraga at
Fri Jan 27 18:19:55 CET 2012

Frank Fischer <frank.fischer at> writes:

> On Thu, Jan 26, 2012 at 04:11:36PM +0000, Eric S Fraga wrote:
>> Hello,
>> From what I understand, evil strives to be, as much as possible,
>> identical in behaviour to vim.  I am wondering whether this need always
>> be the case?
> Many users use both, Vim and Evil, or come from Vim and thus are used
> to the behavior of Vim. Therefore it's a good idea to keep Evil as
> compatible to Vim as possible, especially in common operations,
> otherwise the inconsistency would probably hit many users immediately.

Yes, that makes perfect sense of course!

>> My query is related to something that has bothered me a long time in vi
>> (and descendents): 'de' and 'dw' behave differently from 'ce' and 'cw'
>> with respect to whitespace that may be present between the current word
>> and the next.  It would be nice to have 'cw' behave analogously to 'dw'
>> and actually replace the whitespace as well...
> Yes, the special case of 'cw' is in fact explicitly mentioned in the
> Vim documentation. And 'cw' is certainly one of the most common
> operations, that's why evil implements the same behavior.

Sure, as above.  I agree.

> But I agree that this is an inconsistency within Vim itself (although
> documented). Unluckily the hint from the Vim-docs, using ":map cw dwi"
> does not work in evil because of the way the keymaps are arranged in
> evil. Therefore I added a customization variable
> `evil-want-change-word-to-end' in 6c5bf608 which controls whether 'cw'
> is treated specifically. If set to t (the default) 'cw' behaves as in
> Vim, if set to nil 'cw' behaves like 'dw' + 'i'.
> Hope that helps you.

It does indeed.  This is brilliant and works perfectly!  Many thanks.

now, of course, I'll find myself using vim more and more and I'll get
totally confused ;-)

Thanks again,
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs + No Gnus v0.18

More information about the implementations-list mailing list