Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ask whether the default system-wide editor should be ee or vi #3

Open
grahamperrin opened this issue Sep 28, 2021 · 7 comments
Open

Comments

@grahamperrin
Copy link

grahamperrin commented Sep 28, 2021

Implementation

Something like this:


Which command-line editor should be the system-wide default?

  • ee (easy editor)
  • vi
  • I don't know

This system-wide default will apply to sh.

Per-user defaults for other shells may be set after starting the installed system.


Use a radio button GUI.

🔘 ee pre-selected.

If the user does not know: assume that they have no knowledge of vi, proceed as if ee was selected.

If the system-wide default will be ee, then append these two lines to /etc/profile:

export EDITOR=/usr/bin/ee
export VISUAL=/usr/bin/ee

Rationale

Essentially:

  • avoid putting end users in accident-prone situations.

With a fresh installation of FreeBSD 13.0-RELEASE, echo $EDITOR returns vi.

For some newcomers to the system, unexpected/unwanted appearance of vi will be unreasonably disorienting.

Contexts include:

Problems with accidental/unexpected appearance of vi were acknowledged, in FreeBSD base, twenty years ago.

Earlier (twenty-four years ago):

… vi … sometimes you will inadvertently issue a command that will do something you do not expect. … when it gives you trouble …

Thoughts

Compare with helloSystem/ISO@a59de6a#diff-0f711ba9ca1c5db6bee04e1572b1f3ddf469a1f53b2348a70f34cb94d9a32baeR142 where no choice is offered and nano is the default. Whilst nano is reasonable for helloSystem, it is not in FreeBSD base.

FreeBSD base includes a handful of editors, of which ee seems to be the easiest (for people who will have little or no knowledge of vi).

@fat-git-geezer
Copy link

FCP-20211005-ee: Default Editor As ee


The default editor is an essential tool for the initial configuration of
Freebsd. This should be easy to use both for seasoned users and new
users.

Problem Statement


Many new users and some seasoned users have difficulty with vi, the current
default editor. It is not self explanatory. Initial configuration of a new
installation of Freebsd can entail all of

  • changing the default shell
  • changing the EDITOR environment variable
  • editing configuration files

Currently this is highly difficult without a reasonable knowledge of vi.

Problem Discussion


Both ee and vi are in the base system.

The most basic requirements of a text editor are

  • input of text
  • saving as a file
  • exiting the text editor

vi has historically been the default editor, is a good text editor and has a
long following of users who are satisfied. vi requires some knowledge of
usage in order to save and exit.

ee as its name is an easy text editor. It requires no knowledge of usage for
any of the basic requirements. This is because instructions are clearly
displayed at the top of the screen and in menus.

Although it may be quite easy to change the EDITOR environment variable, it
is not uncommon to have started the default editor beforehand, by for instance
using chpass to change the default shell. This may alter the format of
setting an environment variable in the first place.

During a fresh installation of Freebsd, many experienced users find the current
default text editor of vi difficult, and the process of replacing it
convoluted. Many new users have found themselves lost in vi, unable to save
or exit.

This is offputting to new users of Freebsd, and as so may narrow the user-base
of Freebsd.

Proposed Solution


The default editor should be changed from vi to ee.

Solution Discussion


ee is self explanatory and allows for full functionality of a text editor for those
with no prior knowledge.

The default editor of ee would be forward thinking, modern and one step
towards broadening the usage of Freebsd.

In recognition of those who prefer vi, vi should remain in the base system.

ee should also be added to /rescue.

Thank you.


@grahamperrin
Copy link
Author

Food for thought, part of the NomadBSD first run routine:

image

@fat-git-geezer
Copy link

It is interesting to see that they give the choice of text editor both in text mode and in graphics mode. It is also interesting that they give the choice of shell in text mode and file manager in graphics mode.

I do not think that graphics mode should be mandatory in Freebsd as it appears to be in Nomadbsd. But it does show that they understand the essentials of a basic environment, editor and shell, which includes the options of ee and sh.

@Vull-the-invisible
Copy link

It would be fine with me if the default editor in FreeBSD was ee instead of vi. Anything to make things easier.

I agree that graphics should not be a mandatory part of FreeBSD. Many valid FreeBSD applications do not require graphics.

@grahamperrin

This comment was marked as resolved.

grahamperrin added a commit to grahamperrin/freebsd-src that referenced this issue Sep 12, 2022
<yangzhong-freebsd/lua-httpd#3> Ask whether the default system-wide editor should be ee or vi

<https://gist.github.com/grahamperrin/83fa2bd1f3dbf32fa8019ec04f810c6e> FreeBSD environments miscellany

<https://redd.it/xbycd8> freebsd-update(8): prevent vi, prefer ee
@fat-git-geezer
Copy link

Great commit, +1 for common sense.

@grahamperrin
Copy link
Author

Great commit, +1 for common sense.

Thanks, although let's note that it's essentially a draft in my fork (not in the FreeBSD repo, https://cgit.freebsd.org/src/). Testing the waters: https://old.reddit.com/r/freebsd/comments/xbycd8/-/io2od72/?context=1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants