Oh, nice! I think you're right about the prefix argument, it's more usefull if it specifies the number of chars to copy (although I almost never use emacs' prefix arguments in insert mode). And the code of commit 853ba91 is more complete than my naive function (my code does strange things to tabs and control chars). Thanks again for Vimpulse. Cheers! Sébastien. 2011/2/20 Vegard Øye <[email protected]>:
On 2011-02-19 15:37, Sébastien Rocca-Serra wrote:
I just wrote a small function to emulate Vim’s i_CTRL_E and i_CTRL_Y. Please feel free to use it, change the names, or not use it. The code is here: http://gist.github.com/834957
Thanks for your contribution. I'm forwarding this to the mailing list, as Štěpán Němec sent me some similar code recently, which also deals with tabs and control characters. It's added in commit 853ba91.
I wonder about the prefix argument, though. Currently, it specifies the number of lines to move forward or backward, like in your implementation. Wouldn't it make better sense to specify the number of characters to copy? I don't see myself typing "C-3 C-e C-3 C-e" to copy text character by character from three lines ahead, but I might do "C-5 C-e" to get a chunk of characters at once. What do you think?
-- Vegard