[Chicago] Vim or Emacs

Christopher Allan Webber cwebber at imagescape.com
Tue May 27 17:16:54 CEST 2008


Emacs has a pretty high learning curve, but its also by far the most
powerful and rewarding editor that exists.  It's also fairly close to
the python philosophy of "batteries included"... 90% of the things
you'd want to do are bundled with emacs, the other ten percent can be
found strewn across these here intarwebs.  Emacs is pretty much an
editor inside a lisp machine, and it's extendable on the fly, as you
run it.

It also has great python integration, and its not very difficult to
have emacs open a mediated python session where you can easily pass in
regions of code that you're writing with just a few keystrokes.  That,
amongst a billion other features.  I learn something new and powerful
about emacs every day, almost.

If you're wondering whether to use GNU Emacs or XEmacs, use GNU emacs.
XEmacs is pretty dead, and the features that made it "better" than GNU
emacs well over a decade ago have long become obsolete.

When in doubt, check the emacs wiki:
http://www.emacswiki.org/

And when still in doubt, join #emacs on freenode.

To get started, open up emacs and type the command:
C-h t   (Control+h, then 't')

This will open the emacs tutorial.

It's all a bit overwhelming at first, but I guarantee that once you go
Emacs, you'll never go back.


Feihong Hsu <hsu.feihong at yahoo.com> writes:

> Ironically, I read this shortly after posting my question:
>
> http://steve-yegge.blogspot.com/2008/04/xemacs-is-dead-long-live-xemacs.html
>
> Although Steve Yegge isn't really comparing vim to Emacs, he does
> convince me that Emacs is extensible enough for my needs. 
>
> However I still don't know about vim. But for those of you who
> haven't tried it, I think the Python integration in vim is pretty
> slick. The plain vanilla vim binary didn't have Python, but after I
> installed Cream it Just Worked (Cream is a user-friendlier version of
> vim with a gtk frontend). Maybe it's not very powerful, but the API
> is very easy to work with and can probably solve 80% of my scripting
> needs. Since it just uses your default Python, you can import any
> modules you want, like lxml, Tkinter, etc. But at least in the vim
> module available to Python, I didn't see any way to use vim's dialogs
> or to hook into events/signals. Don't know if this is also a
> limitation in vim's built-in scripting language.
>
> I will probably try out Emacs now in the spirit of learning new
> stuff.
>
> --- Cosmin Stejerean <cstejerean at gmail.com> wrote:
>
>> 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
>> _______________________________________________
>> Chicago mailing list
>> Chicago at python.org
>> http://mail.python.org/mailman/listinfo/chicago
>> 
>
>
>
>       
> _______________________________________________
> Chicago mailing list
> Chicago at python.org
> http://mail.python.org/mailman/listinfo/chicago


More information about the Chicago mailing list