dw and db not working quite right; search bug; visual selection options
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. (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. 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? 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. 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. I'll ease myself into using Evil more over the next few days. We'll see how it's going to co-exist with my existing emacs usage patterns :) Cheers, --Leo
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
On 2011-12-22 22:33 +0100, Leo Alekseyev wrote:
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.
Fixed in commit 6302c05.
Finally, is there a setting equivalent to Vim's :set selection=exclusive?
There is (setq evil-visual-char 'exclusive), which changes the behavior of characterwise selections. Block selections remain "inclusive", though. I might add a customization variable for changing both at once. -- Vegard
On Sun, Dec 25, 2011 at 8:31 AM, Vegard Øye <[email protected]> wrote:
On 2011-12-22 22:33 +0100, Leo Alekseyev wrote:
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.
Fixed in commit 6302c05.
Thanks! It works well when you are cancelling the search at the first match. I still wish there were a way to quickly jump back to where the search originally began after you have explored some matches. Typical use case (emacs): you isearch for a string, go through a few matches by pressing C-s repeatedly, and then change your mind. C-g then takes you to where the search began. With the evil-search-forward, when you start going through matches by pressing 'n', the starting point gets forgotten. C-g is no longer effective, and C-o takes you back through the list of matches. Given how evil-search works, it's probably not very trivial to implement, but would be a nice-to-have feature.
Finally, is there a setting equivalent to Vim's :set selection=exclusive?
There is (setq evil-visual-char 'exclusive), which changes the behavior of characterwise selections. Block selections remain
That's exactly what I was looking for. Coming from emacs, I think this should be the default. Regarding my earlier problems with dw and repetition, I tracked it down to keychord.el. I don't know what the problem is, but removing keychord.el made it go away. My bad for not testing with emacs -Q to begin with. --Leo
participants (3)
-
Frank Fischer -
Leo Alekseyev -
Vegard Øye