Binding [tab] and C-i in viper-vi-basic-map

Štěpán Němec stepnem at gmail.com
Sat Jul 10 10:57:05 CEST 2010


After having actually run the new code (current version of which was
introduced in commit 4dfbed11308), I commented the two lines out

;; (define-key viper-vi-basic-map [tab] (or (key-binding [tab])
;;                                          (key-binding "\C-i")))

because for me it brought one problem -- the code binds <tab> at the
point of loading Vimpulse to some binding <tab> happens to have at that
time; but the binding also overrides any major mode maps, so e.g. in Org
mode, I now got `yas-expand' on <tab> instead of the previous and
correct `org-cycle' in Vi state (because Vi state originally had no
binding for <tab> at all, it worked just fine).

While I understand what the change was supposed to do, I don't really
understand *why* you did it. Vegard? Does it solve any problems or
bring any actual advantages?

I don't feel too strongly about it, because in Vi state there is no
universal way to have major mode bindings respected, i.e. it's just a
fortunate coincidence that <tab> was unbound in Vi state; the only safe
way is to use Emacs state for the mode or mess with the Viper maps.

OTOH, I really don't see why you made that change, so I figured I'd ask.
;-)

Štěpán



More information about the implementations-list mailing list