Unix Shell - Why is emacs editing mode the default in bash?

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > October 2005 > Why is emacs editing mode the default in bash?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Why is emacs editing mode the default in bash?
casioculture@gmail.com

2005-10-31, 5:58 pm



I don't understand, why is emacs editing mode the default in bash
eventhough vi is the more universal, posix standard editor?

Chris F.A. Johnson

2005-10-31, 5:58 pm

On 2005-10-31, casioculture@gmail.com wrote:
>
> I don't understand, why is emacs editing mode the default in bash
> eventhough vi is the more universal, posix standard editor?


First, don't confuse the shell's editing mode with the text
editors; they are very different things, though they may share some
characteristics.

Second, emacs is just as much a standard editor as vi, and, IMO,
vastly more comfortable to use (though newer versions of vi are a
big improvement over the original).

Third, I find that the shell behaviour in emacs mode makes a lot
more sense than the vi mode.

--
Chris F.A. Johnson | Author:
<http://cfaj.freeshell.org> | Shell Scripting Recipes:
Any code in this post is released | A Problem-Solution Approach,
under the GNU General Public Licence | 2005, Apress
Steve Youngs

2005-10-31, 5:58 pm

* casioculture <casioculture@gmail.com> writes:

> I don't understand, why is emacs editing mode the default in bash
> eventhough vi is the more universal, posix standard editor?


What follows is all conjecture on my part...

o Of the three software projects, vi, emacs, & bash, two of them are
GNU projects. Can you guess which two?

o They wanted to avoid having to answer the FAQ: "why is vi editing
mode the default in bash...?"

o They felt that emacs' editing mode is better than vi's.[1]

o The decision was made alphabetically.

One of them _had_ to be the default, and because it is trivial to
change the default, does it really matter which one they chose?


Footnotes:
[1] Some folks agree, some don't. Editor flame wars are old.

--
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
| Te audire no possum. |
| Musa sapientum fixa est in aure. |
|----------------------------------<steve@youngs.au.com>---|
Enrique Perez-Terron

2005-10-31, 8:50 pm

On Tue, 01 Nov 2005 00:10:02 +0100, Steve Youngs <steve@youngs.au.com> wrote:

> * casioculture <casioculture@gmail.com> writes:
>
>
> What follows is all conjecture on my part...
>
> o Of the three software projects, vi, emacs, & bash, two of them are
> GNU projects. Can you guess which two?
>
> o They wanted to avoid having to answer the FAQ: "why is vi editing
> mode the default in bash...?"
>
> o They felt that emacs' editing mode is better than vi's.[1]
>
> o The decision was made alphabetically.
>
> One of them _had_ to be the default, and because it is trivial to
> change the default, does it really matter which one they chose?
>
>
> Footnotes:
> [1] Some folks agree, some don't. Editor flame wars are old.


I just want to add

o At the time the decision was taken, vi did not have all the
bells and whistles of vim. The vi command set required you
to shift in and out of "command mode" eg. to move the cursor.
The ability to use arrow keys was already there, but keyboards
were so unstandardized and termcaps support so haphazard that
it seemed worthwhile to be able to fall back on control
characters for basic cursor movement.

The attraction of vi in those days was not the command bindings
but the availability. You had it in all unix flavors, so if
you had to work with other people's computers you just had to
learn it, since it was the only thing you could count on.

Vi had another attraction, it was faster than emacs to start,
being much smaller.

Do not confuse the command bindings with the command set. I still
sometimes feel certain forms of repetitions (using the . command)
are easier in vi than in emacs. In emacs, is it possible to have
the buffer displayed with line numbers? etc.

-Enrique
Steve Youngs

2005-10-31, 8:50 pm

* Enrique Perez-Terron <enrio@online.no> writes:

> In emacs, is it possible to have the buffer displayed with line
> numbers?


Yes.

--
|---<Steve Youngs>---------------<GnuPG KeyID: A94B3003>---|
| Te audire no possum. |
| Musa sapientum fixa est in aure. |
|----------------------------------<steve@youngs.au.com>---|
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com