Binding [tab] and C-i in viper-vi-basic-map
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
On 2010-07-10 10:57, Štěpán Němec wrote:
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 added it on the basis on an e-mail I received about C-i conflicting with the use of <tab> as a completion key. (This is quite popular, judging by http://www.emacswiki.org/emacs/TabCompletion and the storm of blog posts retrieved by Google.) However, binding C-i in vi state shouldn't affect the binding of <tab> in Insert state -- it would only be a problem if you for some reason complete words in vi state. Evidently, some people do, as I did receive a confirmation that my change fixed the problem. -- Vegard
Vegard Øye <[email protected]> writes:
On 2010-07-10 10:57, Štěpán Němec wrote:
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 added it on the basis on an e-mail I received about C-i conflicting with the use of <tab> as a completion key. (This is quite popular, judging by http://www.emacswiki.org/emacs/TabCompletion and the storm of blog posts retrieved by Google.)
However, binding C-i in vi state shouldn't affect the binding of <tab> in Insert state -- it would only be a problem if you for some reason complete words in vi state. Evidently, some people do, as I did receive a confirmation that my change fixed the problem.
... just to introduce a different one ;-) I wonder how those "some people" do the completion in Vi state. I really don't think it's a good change, for the reasons I gave in the previous mail -- major modes often do something with the Tab key, and you now clobber every such binding (in Vi state) with some arbitrary one hardcoded at Vimpulse load time. I also don't really understand how the change fixes the completion problem (or what the problem really was), because even before the change C-i and <tab> were prefectly different in GUI for me (e.g. in Org mode <tab> is org-cycle, C-i is vimpulse-jump-forward). Štěpán
On 2010-07-11 21:22, Štěpán Němec wrote:
I really don't think it's a good change, for the reasons I gave in the previous mail -- major modes often do something with the Tab key, and you now clobber every such binding (in Vi state) with some arbitrary one hardcoded at Vimpulse load time.
Yeah, I don't really like it either. I'll get in touch with the aforementioned user and see if the problem can be solved in a more congenial manner. -- Vegard
On 2010-07-12 19:55, Vegard Øye wrote:
On 2010-07-11 21:22, Štěpán Němec wrote:
I really don't think it's a good change, for the reasons I gave in the previous mail -- major modes often do something with the Tab key, and you now clobber every such binding (in Vi state) with some arbitrary one hardcoded at Vimpulse load time.
Yeah, I don't really like it either.
Commit [93f88cdfa3] removes the C-i/<tab> code. -- Vegard
participants (2)
-
Vegard Øye -
Štěpán Němec