Missing \C-^ mapping
Hi! The \C-^ mapping for switching to the alternate buffer is missing. I tried implementing it, but I gave up, sorry. Also, # and % don’t work in ex.
On Tue, Sep 20, 2011 at 16:20, Nikolai Weibull <[email protected]> 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))) would do as a start, but that’s not quite how \C-^ works in Vim. I don’t actually know if Vim’s way is better (that is, using #, which may disappear).
On Tue, Sep 20, 2011 at 04:30:43PM +0200, Nikolai Weibull wrote:
On Tue, Sep 20, 2011 at 16:20, Nikolai Weibull <[email protected]> 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. For % and #, you're right, they are not implemented yet. They would require a special handling of file-arguments that has to be done. In order to prevent us forgetting this it may be a good idea to file an issue at http://bitbucket.org/lyro/evil Btw, I do not really know if there is a better way to mimic # as Emacs and Vim's organisation of buffers is different (afaik there are no buffer-numbers in Emacs, just a list of them that may be reordered). Probably it's not worth the effort to mimic Vim's behaviour. Frank
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? Thank you very much! Jim.
Am Mon, 5 Dec 2011 17:49:39 +0000 (UTC) schrieb Jim <[email protected]>:
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
On 5 December 2011 19:38, Frank Fischer <[email protected]> wrote:
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
Thank you very much, without the evil software I dare not enter the emacs world. Jim
participants (4)
-
Frank Fischer -
Jim -
Jim Green -
Nikolai Weibull