Yes, you are right. Changing it to evil-motion-state-map fixes it. Thanks. Is there any reason to bind C-w to evil-delete versus delete-region?
Bob On Wed, May 30, 2012 at 4:49 PM, Barry OReilly <[email protected]> wrote: > Select the region and then do C-h k C-w > > If you're entering the visual state, you should probably put your key > binding in the evil-motion-state-map instead. > > > > On 5/30/12, Bob Nnamtrop <[email protected]> wrote: >> It says its bound to kill-region, but when I select a region and try >> to use it a C-w is echoed to the mini-buffer and emacs waits. >> >> Bob >> >> >> ---------- Forwarded message ---------- >> From: Barry OReilly <[email protected]> >> Date: Wed, May 30, 2012 at 9:22 AM >> Subject: Re: rebinding C-w >> To: vi/Vim emulation in Emacs <[email protected]> >> >> >> What does it show when you do: C-h k C-w >> >> I've found I generally need to look at what's in the >> evil-motion-state-map and evil-normal-state-map and make them >> consistent. See evil-maps.el for the stock key bindings. As >> described in evil-core.el: "Normal state inherits bindings from Motion >> state". Thus, you might need to: (define-key evil-motion-state-map >> "\C-w" nil) >> >> >> >> On 5/30/12, Bob Nnamtrop <[email protected]> wrote: >>> I am used to the emacs windowing commands so I'd like to rebind C-w in >>> normal state to the usual emacs binding (kill-region) or the evil >>> "equivalent" (evil-delete). Is there a better choice here? However, >>> the usual way does not work: >>> >>> (define-key evil-normal-state-map "\C-w" 'kill-region) >>> >>> It doesn't matter if it is before or after (require 'evil). What am I >>> doing wrong? >>> >>> Thanks, >>> Bob >>> >>> _______________________________________________ >>> implementations-list mailing list >>> [email protected] >>> https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list >>> >> >> _______________________________________________ >> implementations-list mailing list >> [email protected] >> https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list >> >> _______________________________________________ >> implementations-list mailing list >> [email protected] >> https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list >> > > _______________________________________________ > implementations-list mailing list > [email protected] > https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list _______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
