Missing \C-^ mapping

Frank Fischer frank.fischer at mathematik.tu-chemnitz.de
Mon Dec 5 20:38:15 CET 2011


Am Mon, 5 Dec 2011 17:49:39 +0000 (UTC)
schrieb Jim <student.northwestern at gmail.com>:

> Frank Fischer <frank.fischer <at> mathematik.tu-chemnitz.de> writes:
> 
> > 
> > On Tue, Sep 20, 2011 at 04:30:43PM +0200, Nikolai Weibull wrote:
> > > On Tue, Sep 20, 2011 at 16:20, Nikolai Weibull <now <at>
> > > bitwi.se> wrote:
> > > 
> > > > The \C-^ mapping for switching to the alternate buffer is
> > > > missing.  I tried implementing it, but I gave up, sorry.
> > > 
> > > I guess something as simple as
> > > 
> > > (defun evil-other-buffer ()
> > >   (interactive)
> > >   (switch-to-buffer (other-buffer)))
> > 
> > I added something similar in adbbe21.
> 
> % grep "c-^" -ir .
> ./evil-maps.el:(define-key evil-motion-state-map (kbd "C-^")
> 'evil-buffer)
> 
> Hi: 
> c-^ works great to switch between two buffers but in vim c-6 does it
> as well.
> 
> when I do c-h k c-6, it shows c-6 is already occupied by emacs.
> 
> Would this be something that can not be easily fixed?

C-<number> is bound to `digit-argument' in Emacs, and many users
(including myself) are used to insert prefix-arguments using these
bindings (instead of going through C-u, although evil allows to type
prefix-arguments straight ahead without C- keys). Therefore IMHO
overriding this binding may cause a lot of problems and inconveniences
and gain very little. Evil will probably never redefine C-6.

If you really desperately need this binding you can always use

(define-key evil-motion-state-map (kbd "C-6") 'evil-buffer)

in your .emacs file to redefine the binding on your own.

Frank



More information about the implementations-list mailing list