dw and db not working quite right; search bug; visual selection options

Frank Fischer frank.fischer at mathematik.tu-chemnitz.de
Sat Dec 24 11:49:09 CET 2011


On Thu, Dec 22, 2011 at 04:33:55PM -0500, Leo Alekseyev wrote:
> Hi all,
> I've started playing around with Evil recently, and am quite
> impressed.  Unlike most people here, I come from almost purely Emacs
> background with very little Vim experience.
> 
> I've run into a couple of issues:
> 
> First, dw and db don't seem to work very consistently for me combined
> with the '.' key.  In particular, the following occurs:
> 
> (1) When doing dw or db and then pressing ... a few times, "After 0
> kbd macro iterations: Quit " message will pop up in the minibuffer
> when pressing '.', and deletion repetitions no longer work.  Movement
> commands don't clear the error; I need to repeat dw or db again, or
> toggle insert mode.

I'm sorry, but I can't reproduce this error. Please try to give a
minimal way to reproduce this (starting with "make emacs" from evil's
source directory), otherwise it's very hard to judge what's going
wrong.

> 
> (2) dw ....... doesn't work across lines; when end-of-line is reached,
> it starts deleting backwards instead of deleting words on a new line.

This is exactly the behavior of vim and described as a special case:

  Another special case: When using the "w" motion in combination with an
  operator and the last word moved over is at the end of a line, the end of
  that word becomes the end of the operated text, not the first word in the
  next line.


> There isn't a particular sequence of actions that I found that
> triggers those errors, but they appear often enough to render dw and
> db unusable for me.  Is it a known issue and is there a workaround?

The second behavior is a "feature", the first one is an unknown bug,
but, as I said, I've not been able to reproduce it, yet. But the
repeat-system is quite tricky and there may easily still contain some
bugs.

> Second, there appears to be a bug with evil-search-forward and C-g.
> In the help, it says "C-g when search is successful aborts and moves
> point to starting point."  (This is in fact standard emacs behavior.)
> This doesn't work for me; point stays at the first match, and to get
> back to the starting point I need to hit C-o.  It's kind of annoying
> because I often cancel searches.

Yes, that's a bug. In the mean-time you may try evil's own build-in
search which is *not* based on isearch (so it's not so close to Emacs
and therefore maybe not the right thing for you) using

customize-variable RET evil-search-module

> Finally, is there a setting equivalent to Vim's :set
> selection=exclusive?  Coming from Emacs, I find visual mode's current
> "inclusive" behavior to be deeply strange.

Well, afaik (Vergard wrote this part) this is already possible but I'm
not sure if there's a configuration option (don't think so).


It would be kind if you can file those bugs/feature requests on [1]
because I won't have much time (at least this year ;)) so we can deal
with them as soon as possible (and do not forget them).

Frank

[1] http://bitbucket.org/lyro/evil/issues



More information about the implementations-list mailing list