[Chicago] Vim or Emacs

Cosmin Stejerean cstejerean at gmail.com
Sun May 25 08:56:20 CEST 2008


On Sun, May 25, 2008 at 12:13 AM, Feihong Hsu <hsu.feihong at yahoo.com> wrote:
> I've decided I need to move to a more powerful text editor. I've
> narrowed my choices down to Vim and Emacs. Personally, I'm used to
> the Vi modal style, having been forced to learn it in high school.
> However, I have a strong need for the editor to be highly extensible,
> meaning I should be able to write fairly sophisticated plugins for
> it.

If you like Vi key bindings but decide to go with Emacs you might be
interested in Viper mode which does a pretty good job at emulating Vim
keys in Emacs.

>
> I know that Vim has python support and so does Emacs (through
> Pymacs). However, after playing around with python in vim, I get the
> impression that I can't bind any callbacks to program events, e.g.
> run something every time the user saves the buffer to disk. It's
> possible that I'm mistaken, as I'm not overly familiar with vim. But
> I'm wondering now if Pymacs or Emacs in general is more extensible
> than vim. Is there anybody who cares to weigh in on this?
>

The impression I've got is that Emacs is more extensible than Vim due
to the way it was designed. Vim experts on the list, please step in
and correct me if I'm wrong. In the mean time take a look at the first
part of this thread
http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/83976 it
seems I'm not the only thinking this way.

For example adding a hook for whenever a buffer is saved is trivial in
Emacs. Take a look at an example (coincidentally involving Pymacs) at
http://pymacs.progiciels-bpi.ca/pymacs.html#auto-reloading-on-save

While Emacs itself is very extensible it's possible you'll run into
limitations of Pymacs depending on what you're trying to accomplish.
Take a look at http://pymacs.progiciels-bpi.ca/TODO for an idea.

> Oh, and please don't mention any other text editors. Chances are I've
> already looked at them and rejected them for whatever reason. Right
> now I'm trying to narrow it down between Emacs and Vim, and the one
> criteria I'm really unsure about is extensibility.

If extensibility is your primary concern I would highly recommend
Emacs, although I would also recommend getting comfortable with Emacs
Lisp at least to work around whatever you can't accomplish with
Pymacs.

-- 
Cosmin Stejerean
http://blog.offbytwo.com


More information about the Chicago mailing list