rebinding C-w

Barry OReilly gundaetiapo at gmail.com
Thu May 31 00:49:07 CEST 2012


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 <bobnnamtrop at gmail.com> 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 <gundaetiapo at gmail.com>
> Date: Wed, May 30, 2012 at 9:22 AM
> Subject: Re: rebinding C-w
> To: vi/Vim emulation in Emacs <implementations-list at lists.ourproject.org>
>
>
> 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 <bobnnamtrop at gmail.com> 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
>> implementations-list at lists.ourproject.org
>> https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
>>
>
> _______________________________________________
> implementations-list mailing list
> implementations-list at lists.ourproject.org
> https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
>
> _______________________________________________
> implementations-list mailing list
> implementations-list at lists.ourproject.org
> https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
>



More information about the implementations-list mailing list