From Fedora Project Wiki
(Add some comments to this proposal)
(remove the /usr/bin/editor element of the proposal, as agreed by the workstation wg)
Line 55: Line 55:
== Scope ==
== Scope ==
* Proposal owners:
* Proposal owners:
** Modify comps to include nano Fedora wide
** Modify comps to include nano Fedora wide.
** Create a package that provides /usr/bin/editor ... sprinkle on some magic and voila. Also include this package in comps.
** Create new subpackage of <code>nano</code>, called <code>nano-editor</code>.
** <span>INFO: Eighth_Doctor |  I think this is the thing that actually manages /usr/bin/editor on debian: https://salsa.debian.org/debian/sensible-utils</span>
** <code>nano-editor</code> to include <code>/usr/lib/environment.d/10-nano.conf</code>, which sets <code>$EDITOR</code> to <code>nano</code>.
** Counterproposal from mcatanzaro and halfline: Forget about /usr/bin/editor. Just create /usr/lib/environment.d/10-nano.conf to set $EDITOR to nano. That can be provided by a subpackage of nano itself, say nano-editor, so it gets uninstalled if you remove nano, and so that installing nano doesn't on its own install the conf. Done.
 
With this approach, if <code>nano</code> is uninstalled, the configuration will be removed with it. At the same time, installing nano on its own won't install the conf.


* Other developers: N/A
* Other developers: N/A

Revision as of 09:22, 25 June 2020

Make nano the default editor

Summary

Let's make Fedora more approachable, by having a default editor that doesn't require specialist knowledge to use.

Owner

Current status

  • Targeted release: Fedora 33
  • Last updated: 2020-06-25
  • FESCo issue: <will be assigned by the Wrangler>
  • Tracker bug: <will be assigned by the Wrangler>
  • Release notes tracker: <will be assigned by the Wrangler>

Detailed Description

Users are exposed to the default editor when they use commands that call it. The main example here is something like git commit.

Vim is the current default. You need to spend time learning how to use it, for even basic editing tasks. This increases the barrier to entry for those who are switching to Fedora and don't know how to use Vim. It also makes things hard for those who don't particularly want to learn how to use Vim. (mcatanzaro: It's even worse than this... vi is the current default, not vim. vi is like hard mode for vim. Fewer features, missing syntax highlighting, no indication of what mode you are in... even vim users may feel lost and bewildered when using vi.)

Nano offers the kind of graphical text editing experience that people are used to, and therefore doesn't require specialist knowledge to use. It is already installed across most Fedora Editions and Spins.

This proposal will make Nano the default editor, while continuing to install vim-minimal. People will still be able to call vi if they want to edit a file. It will also obviously be possible to change the default editor to Vim, for those who want it.

Why make Nano default and Vim optional, rather than the other way round? Because Nano is the option that everyone can use.

Feedback

Pending ...

Benefit to Fedora

  • Makes the default editor across all of Fedora more approachable.
  • Nano is also mostly self-documenting, by displaying common keyboard shortcuts on-screen.
  • More in line with the default editor of other distributions.

Scope

  • Proposal owners:
    • Modify comps to include nano Fedora wide.
    • Create new subpackage of nano, called nano-editor.
    • nano-editor to include /usr/lib/environment.d/10-nano.conf, which sets $EDITOR to nano.

With this approach, if nano is uninstalled, the configuration will be removed with it. At the same time, installing nano on its own won't install the conf.

  • Other developers: N/A
  • Release engineering: #9522
  • Policies and guidelines: N/A
  • Trademark approval: N/A

Upgrade/compatibility impact

Will not apply to upgrades.

How To Test

Run export EDITOR="/usr/bin/nano".

User Experience

Users running git commit will be able to just type their commit message, rather than having to learn about insert mode, and they'll be able to cut and paste without having to learn special shortcuts.

Dependencies

No additional dependencies are required.

Contingency Plan

The contingency plan is to revert to vi if there are significant issues with the change.

  • Contingency deadline: this is a simple change, so a deadline isn't necessary.
  • Blocks release? if the change breaks the redirection to an editor, it should block the release. However, this is unlikely.
  • Blocks product? Potentially all.

Documentation

As part of this change, it would be good to add instructions for changing the default editor to the quick docs.

Release Notes