[implementations-list] Dear readers: We need ten minutes of your time to test Vegard's vimpulse-modal so we can decide if to include it in Vimpulse or not
Dear implementations-list readers, We need a volunteer to test vimpulse-modal.el, a file which Vegard wants included in Vimpulse. Vegard can't volunteer, since he himself wrote vimpulse-modal. But anyone else who uses Vimpulse can volunteer, even if they don't know how to code in elisp, and even if they're not an expert at using Vimpulse. Just tell us: * if vimpulse-modal worked for you, * whether you think that it makes Vimpulse better or not, * and any comments, if you have any. Alessandro is too busy to volunteer, and I'm not really interested. I haven't been using Emacs much lately. You can download vimpulse-modal from http://my-trac.assembla.com/vimpulse/ticket/14 -- look in the "Attachments" section. Once you test it, just reply to this email to send your test results to the mailing list. One person's opinion is enough for us to decide if vimpulse-modal merits being included in Vimpulse or not. But even if someone else has posted their opinion, you can post your opinion too if you want. The rest of this email is Vegard's description of vimpulse-modal, copied from the Trac ticket for it. Thanks in advance, -Jason The `:map`, `:imap` and `:vmap` commands of Vim let one make two key mappings starting with the same sequence of characters without one overwriting the other. For example: :imap aa foo :imap aaa bar When Vim has read "`aa`" in Insert mode, it will wait for another character to decide whether to insert "`foo`" or "`bar`". If the user types "`a`", "`bar`" is inserted; if another letter, "`foo`" plus that letter. Compare with the analogous use of Emacs' `global-set-key` function: (global-set-key "aa" 'foo) (global-set-key "aaa" 'bar) Here, the first binding is simply overwritten by the more specific second. The end result is that "`aaa`" is bound to `bar`, while any other sequence starting with "`aa`" is not bound to anything. `vimpulse-modal.el`, attached, provides a set of Vim-like or "modal" functions for making new keybindings "on top of" previous bindings. They are `vimpulse-map`, `vimpulse-imap` and `vimpulse-vmap`, which mimic Vim's commands, and `vimpulse-define-key`, a generic function for specifying the keymap. To load it, issue (require 'vimpulse-modal) Then, for example, the key sequences "`cae`" and "`dae`" may be bound in vi (command) mode using `vimpulse-map`: (vimpulse-map "cae" 'vimpulse-change-a-sexp) (vimpulse-map "dae" 'vimpulse-delete-a-sexp) This will execute `vimpulse-change-a-sexp` when typing "`cae`" in vi mode, while retaining keys like "`cw`" for "change word" or "`cas`" for "change a sentence". Just for demonstration purposes, `vimpulse-change-a-sexp` and `vimpulse-delete-a-sexp` are indeed real text object commands, defined and bound at the end of the file as shown. They act on Lisp S-expressions. I am not suggesting they be made part of Vimpulse, just making a point about extensibility.
From: [email protected] Date: Sun, 17 Jan 2010 20:13:04 -0500
You can download vimpulse-modal from http://my-trac.assembla.com/vimpulse/ticket/14 -- look in the "Attachments" section.
Here is a number of ways you can test vimpulse-modal.el. To install it, place it in the site-lisp directory and add (require 'vimpulse-modal) to .emacs. Then you can make a binding in command mode with vimpulse-map: (defun foo () (interactive) (message "Hey!")) (vimpulse-map "daf" 'foo) You can add this code to .emacs and restart Emacs, or you can evaluate it in the *scratch* buffer. It displays "Hey!" in the minibuffer when you press "daf". Check that it doesn't overwrite previous keys like "daw", "dw" and "dd". To make a binding in Insert mode, use vimpulse-imap: (vimpulse-imap "g" 'foo) To make a binding in Visual mode, use vimpulse-vmap: (vimpulse-vmap "G" 'foo) You can also try the included test commands "cae" and "dae", which act on Lisp S-expressions. "cae" changes an expression, while "dae" deletes it. So with the cursor at the opening parenthesis of any of the expressions above, "dae" deletes the whole form. Please let me know what version of Emacs you are using. Vegard _________________________________________________________________ Windows 7: Se direkte-TV fra den bærbare PCen. Finn ut mer. http://windows.microsoft.com/windows-7
On Sun, Jan 17, 2010 at 08:13:04PM -0500, Jason Spiro wrote:
Dear implementations-list readers,
We need a volunteer to test vimpulse-modal.el, a file which Vegard wants included in Vimpulse. Vegard can't volunteer, since he himself wrote vimpulse-modal. But anyone else who uses Vimpulse can volunteer, even if they don't know how to code in elisp, and even if they're not an expert at using Vimpulse. Just tell us:
* if vimpulse-modal worked for you, * whether you think that it makes Vimpulse better or not, * and any comments, if you have any.
Alessandro is too busy to volunteer, and I'm not really interested. I haven't been using Emacs much lately.
You can download vimpulse-modal from http://my-trac.assembla.com/vimpulse/ticket/14 -- look in the "Attachments" section.
Once you test it, just reply to this email to send your test results to the mailing list. One person's opinion is enough for us to decide if vimpulse-modal merits being included in Vimpulse or not. But even if someone else has posted their opinion, you can post your opinion too if you want.
The rest of this email is Vegard's description of vimpulse-modal, copied from the Trac ticket for it.
Thanks in advance, -Jason
The package works fine for me with the latest Emacs (built today from the Git mirror of the main Bazaar repository) and today's SVN Vimpulse. BTW, this is ridiculous -- Vegard, as the current maintainer of Vimpulse and the author of vimpulse-modal.el, is the one who should decide whether to include it or not. You (Jason) are going to make such a decision for him, based on an opinion of a single user? I'm very happy Vimpulse has got a maintainer that really cares about the package and makes it better. I have not tested it havily yet, but it's already obvious that nothing serious is broken since the last version, right on the contrary: Vegard fixed some bugs and added useful functionality. Thank you very much and put up the good work! P.S.: What I miss from vimpulse-modal.el are the unmapping functions to complement the mapping functionality. Maybe you're going to add them after merging with Vimpulse, as well as the Vim (un)mapping Ex commands?
On Thu, Jan 21, 2010 at 7:06 PM, Štěpán Němec <[email protected]> wrote:
The package works fine for me with the latest Emacs (built today from the Git mirror of the main Bazaar repository) and today's SVN Vimpulse.
Thank you for testing it. Vegard, feel free to merge it. Please don't forget to add yourself to the Copyrights file if you haven't done so already.
BTW, this is ridiculous -- Vegard, as the current maintainer of Vimpulse and the author of vimpulse-modal.el, is the one who should decide whether to include it or not. You (Jason) are going to make such a decision for him, based on an opinion of a single user?
Neither me nor Vegard are official maintainers. Alessandro still is. Both me and Alessandro are too busy to do any testing right now. Because I'm the previous maintainer, Alessandro doesn't mind me making certain decisions. If Vegard had a longer history with us, I would have let him merge vimpulse-modal.el right away. But he's pretty new to the Vimpulse community, so I was cautious and waited for someone to test it. Štěpán, it was kind of you to do the testing.
I'm very happy Vimpulse has got a maintainer that really cares about the package and makes it better. I have not tested it havily yet, but it's already obvious that nothing serious is broken since the last version, right on the contrary: Vegard fixed some bugs and added useful functionality.
Thank you very much and put up the good work!
I, too, am very happy that Vegard is around now, because it helps Vimpulse users everywhere.
P.S.: What I miss from vimpulse-modal.el are the unmapping functions to complement the mapping functionality. Maybe you're going to add them after merging with Vimpulse, as well as the Vim (un)mapping Ex commands?
I don't know if Vegard will do it. I hope he will read this email. Note that the better way to suggest such things is to send a bug report assigned to him to http://www.assembla.com/spaces/vimpulse :)
Sorry for the late reply; I've been busy moving the last few days.
Vegard, feel free to merge it. Please don't forget to add yourself to the Copyrights file if you haven't done so already.
Done. Thanks for the reminder. :)
What I miss from vimpulse-modal.el are the unmapping functions to complement the mapping functionality.
Unmapping is done with nil, e.g., (vimpulse-map "cae" nil) which works exactly the same as Emacs' own functions (global-set-key et al.). If there is a whole tree of bindings starting with "cae", the invocation above removes all of them. You can use 'undefined in place of nil to be less forceful. Also, the latest versions of vimpulse-map and vimpulse-imap have an optional third argument for restricting the binding to a major mode: (vimpulse-map "cae" 'foo 'emacs-lisp-mode) The binding above will only be seen in vi state when editing Elisp code. vimpulse-vmap doesn't have this functionality yet, as Visual mode currently isn't a Viper state proper, and therefore doesn't have its own major mode extension keymap. I intend to rectify this soon.
Maybe you're going to add them after merging with Vimpulse, as well as the Vim (un)mapping Ex commands?
Viper already has its own :map and :unmap commands, which are used for keyboard macro purposes. I suppose I could redefine them, but where would they be of any use? Only Elisp goes into .emacs (and .viper), so one can't store any :map statements there. Well, there happens to be a TODO entry suggesting Vimpulse be made capable of grokking .vimrc files, but after having grappled a bit with the existing .emacs/.viper/Customize-broken clutter, I don't know if this is such a swell idea. There are too many ways of customizing Emacs already (and their hierarchy isn't always clear), and adding another could just make things more confusing. The cleanest approach, I feel, is just to point Vim users to the .emacs file, perhaps along with some Elisp code they can copy and paste into it. It may be unfamiliar at first, but then again, not too dissimilar from the way we've also pasted "unfamiliar" lines into our .vimrc files. :) Vegard _________________________________________________________________ Nye Windows 7: PCen som passer for deg. Finn ut mer. http://windows.microsoft.com/shop
participants (3)
-
Jason Spiro -
Vegard Øye -
Štěpán Němec