Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Dec 1999 02:21:23 -0500
From:      James Bailie <jazzturk@home.com>
To:        freebsd-questions@freebsd.org
Subject:   The Endless Perfect Editor Thread (was Re: Programmer's editor?)
Message-ID:  <19991207022123.A10544@cr31617-a.lndn1.on.wave.home.co>
In-Reply-To: <19991124192529.A2201@strontium.scientia.demon.co.uk>; from ben@scientia.demon.co.uk on Wed, Nov 24, 1999 at 07:25:29PM %2B0000
References:  <009901bf35ee$d892ef60$8208a8c0@iqunlimited.net> <Pine.BSF.4.21.9911231240360.4557-100000@fw.wintelcom.net> <19991123153032.60087@mojave.sitaranetworks.com> <19991123211822.B2618@strontium.scientia.demon.co.uk> <19991123181858.20266@mojave.sitaranetworks.com> <19991124192529.A2201@strontium.scientia.demon.co.uk>

next in thread | previous in thread | raw e-mail | index | archive | help

--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

On Wed, Nov 24, 1999 at 07:25:29PM +0000, Ben Smithurst wrote:

> ...Vi just feels "right" to me, somehow. I suppose we all have our
> personal preferences which are unlikely to get changed once you've been
> using an editor for a while.
>

I've been resisting contributing to this thread since it started, but here's
my two cents.

When I first started using *nix, I learned GNU Emacs as it was
self-documenting, and become proficient fairly quickly, perusing the info
files for topics on a need-to-know basis. Eventually I learned most of Emacs
Lisp by crafing custom functions.

Emacs is a convenient environment to code, compile, and debug in. It's
convenient to be able run shells in windows, or to edit files fetched
transparently via ftp from another site. I rely heavily on Emac's command,
function, and filename completion, and that it operates similarly to that in
Bash. Emacs auto-indentation and syntax-highlighting functions are smarter
than other editors' because they're lisp programs. One grows accustomed to
the fact that one can switch between entering commands and entering text
EXTREMELY quickly, by dropping one's pinky or thumb momentarily onto the
control or alt keys, rattling off a few commands, and then return to insert=
ing
text by lifting the digit. It becomes muscle-memory.

But Emacs is HUGE and SLOW. Having so much of it written in ELisp has made
it flexibile like few other tools, but it has also made it a hog.  This was
much more important when I was running a 486-based PC in 1995, than it is
now, but it's still too big to keep loading and unloading for little editing
jobs. One ends up running it all the time, sending files to it with
emacsclient. If you live inside Emacs, as many true-believers do, having it
running all the time is no big deal. Along the way, I auditioned Jove and
Jed, but found myself too spoiled by certain missing Emacs features to aban=
don
GNU Emacs for them, but they are worth having a gander at, if you're looking
for a lightweight Emacs-workalike.

After three years of almost exclusive Emacs use, I made the conscious choice
to use only Vi, and did so for about a year. My Emacs withdrawal lasted for
weeks and weeks. I always seemed to somehow land in command-mode, trying to
enter text, having the editor beep mockingly at me.  Although I love the
efficiency with which one can edit text in Vi, the modal nature of the edit=
or
still gives me problems with composition because the keystroke-overhead
involved in getting into command-mode, making my edits and, returning to my
editing position in insert-mode is greater than that of emacs. At first, I
thought I could create a very comfortable environment for myself in Vi with
macros.  I thought I would write a few mode-bouncing macros to give me the
basic Emacs character-motion and deletion commands, but I gave up on this
because of the nasty behaviour the Vi cursor has when leaving insert-mode,
of backing up a character. One can write one's macros to compensate for this
behaviour, but then this behaviour does not occur at the beginning of a lin=
e,
as there is no previous character for the cursor to move to there, so my
backward-moving macros would fail crossing line beginnings, and some would
fail differently in different versions of Vi. I decided one must use differ=
ent
composition habits in Vi.

Now I'm at the point where after a fifteen minutes re-acclimatization, I can
work with either editor, and most of my Emacs macros are in fact, emulating
Vi-commands, but I usually come back to Emacs for program development. Among
the vi-like editors, I prefer nvi, because it's modest, having a few extras
that I find myself wanting, such as filename completion and the capability
of editing multiple buffers in multiple windows.

Emacs has a few Vi-emulation modes, where one can have the best of both
worlds. In Vi-mode, insert mode is like regular emacs, and command mode is
like Vi. This to me, is how the perfect editor would feel. There is a niche
going unfilled for a lightweight hybrid editor, with modest means and resou=
rce
usage. It would not try and reinvent Vi or Emacs, but rather distil what is
good about both into a small-footprint console-only editor, strong on editi=
ng,
weak on customization and automation, but good at IPC.

--=20
James Bailie =20

http://members.home.net/jazzturk =20

--ikeVEW9yuYc//A+q
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (FreeBSD)
Comment: For info see http://www.gnupg.org

iD8DBQE4TLVy0Fh9wojXfzIRASr5AKDQxJnomWSWuz+VPdYveg5dfE/ezQCfaTuN
BL38d6aMY5cGlc7/nlUspS0=
=Su2G
-----END PGP SIGNATURE-----

--ikeVEW9yuYc//A+q--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19991207022123.A10544>