help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: need advice about fixing up my new vimpact-mode, a Vim emulation mod


From: Michael Kifer
Subject: Re: need advice about fixing up my new vimpact-mode, a Vim emulation mode based on viper-mode
Date: Mon, 19 Feb 2007 16:59:12 -0500

"Jason Spiro" <jasonspiro4@gmail.com> writes:
>
> Hi help-gnu-emacs@gnu.org readers,
> 
> I have created a mode called vimpact-mode, a Vim emulation mode based
> on viper-mode.  It is based mainly on snippets of code from around the
> Web.  The pre-alpha is at:
> 
> http://www.jspiro.com/files/sw/vimpact-mode/vimpact-mode-0.0.1.el
> 
> I now have four questions.
> 
> Vimpact-mode is currently a major mode; that's bad.  (It uses
> define-derived-mode, which unfortunately lets me make major modes
> only.)  I want to make it into a minor mode, but I am not sure if I
> should make it a derivative of viper-mode or if I should fork the
> viper elisp files and distribute my mode's code.

Yes, for an editor emulator, I think, a major mode is close to unacceptable.
Viper used to be a major mode long time ago and there were too many
usability problems with that. Basically, too much of emacs functionality is
shut out by such a major mode.


> Here are my design goals:
> 
> * I plan for all all viper and vimpact functions and customizable
> variables to have the same prefix, "viper-".  I don't want some to
> begin with "viper-" and some to begin with "vimpact-".  That'd be
> confusing.
> 
> Question 1:  Do you think I am right: is my way better than the other
> option of having a mix of prefixes?

I think it is not acceptable to use the same prefix as some other package
unless your package can be logically considered an extension of that other
package. Even then it might be better to use a different prefix.

> * I'd prefer vimpact to be an add-on to viper, not a fork of it, since
> I want vimpact to contain only vim-derived features, not all-new ones.

Yes. In fact, why can't it be just another viper keymap?

> Question 2:  Do you think I am right about my add-on idea?  Or would
> it be better if all or most of the vimpact-mode changes could somehow
> be merged into viper-mode (perhaps I could do it)?

Eventually maybe. I haven't used vim extensively for a long time, but
what kind of essential functionality are you planning to add?


> Question 3:  How much time would it take me, a mediocre elisp coder,
> to make vimpact into a proper minor mode that starts up viper-mode
> then adds the vimpact customizations (the add-on idea from before)?
> How much time would it take me to merge the vimpact-mode changes into
> the viper source code?

Here is an algorithm to measure the time:

1. Start by implementing exactly 1/2 of the vimpact-mode functionality.
2. Carefully measure the time it took you to do this.
3. Multiply that amount by 2 (that is number "two").
4. Add 20% to the result to cover various eventualities.

:-)


> Question 4:  Considering that I am an elisp newbie, is anyone willing
> to do the work themselves?  :-)  You then would be the maintainer of
> vimpact-mode.

:-)


        cheers
          --michael  


> Thanks in advance,
> Jason Spiro
> 
> -- 
> Jason Spiro: computer consulting with a smile.
> I also provide training and spyware removal services for homes and businesses.
> Call or email for a FREE 5-minute consultation. Satisfaction guaranteed.
> +1 (416) 781-5938 / Email: info@jspiro.com / MSN: jasonspiro@hotmail.com
> 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]