From Fedora Project Wiki
m (fix link)
(Upgrade/compatibility impact: See https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/6VZUYS6DMB455IYNCWEMFKMREGNK2WUZ/)
 
(17 intermediate revisions by 7 users not shown)
Line 13: Line 13:
-->
-->
== Current status ==
== Current status ==
[[Category:ChangePageIncomplete]]
[[Category:ChangeAcceptedF33]]
<!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler -->
<!-- remove Category:ChangePageIncomplete and change it to Category:ChangeReadyForWrangler -->


Line 27: Line 27:
CLOSED as NEXTRELEASE -> change is completed and verified and will be delivered in next release under development
CLOSED as NEXTRELEASE -> change is completed and verified and will be delivered in next release under development
-->
-->
* FESCo issue: <will be assigned by the Wrangler>
* FESCo issue: [https://pagure.io/fesco/issue/2426 #2426]
* Tracker bug: <will be assigned by the Wrangler>
* Tracker bug: [https://bugzilla.redhat.com/show_bug.cgi?id=1854444 #1854444]
* Release notes tracker: <will be assigned by the Wrangler>
* Release notes tracker: [https://pagure.io/fedora-docs/release-notes/issue/522 #522]


== Detailed Description ==
== Detailed Description ==
Line 35: Line 35:
Users are exposed to the default editor when they use commands that call it. The main example here is something like <code>git commit</code>.
Users are exposed to the default editor when they use commands that call it. The main example here is something like <code>git commit</code>.


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.
Fedora does not currently have a default terminal text editor, because the $EDITOR environment variable is unset by default. But a common scenario where users wind up in a terminal text editor is when using 'git commit'. By default, git picks vi. 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 vi. It also makes things hard for those who don't particularly want to learn how to use vi. (These arguments would apply just as well if git picked Vim. vi is like hard mode for Vim, with fewer features, missing syntax highlighting, and no indication of what mode you are in. Even Vim users may feel lost and bewildered when using vi.)


Nano is similar to the graphical text editing that people are used to, and therefore doesn't require specialist knowledge to use it. It is already installed across most Fedora Editions and Spins.
In contrast, 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 <code>vim-minimal</code> (which provides vi, but not Vim). People will still be able to call <code>vi</code> if they want to edit a file. It will also obviously be possible to change the default editor to vi or Vim, for those who want it.


This proposal will make Nano the default editor, while continuing to install vim-minimal. People will still be able to call <code>vi</code> if they want to edit a file.
Why make Nano default and vi optional, rather than the other way round? Because Nano is the option that everyone can use.


== Feedback ==
== Feedback ==


Pending ...
* I think this is a great idea - and I already set my EDITOR to vim. Having to explain how to set EDITOR in .bashrc before even starting the basics of terminal lore with a newbie is an unnecessary barrier. @sdgathman (will have to see an example of properly signing feedback)
 
* I like the idea, but ... this is a change in behavior for users who do a clean install in order to "upgrade" the OS. I'd expect at least a handful of bugzilla requests to be opened against this change demanding a different default or to revert and let the app pick its own default. Emacs users are a very vocal bunch for example. Personally, I don't mind; changing the default $EDITOR is not that hard, but it's a point of contention for some, and I feel it's fair to raise that for awareness now rather than wait. Also, what about the default $PAGER for man - it's currently null or /usr/bin/less right? /usr/bin/less uses similar commands to vi and this will bring about an inconsistency in the terminal that I'd like to see addressed before this is released. [[User:Speeddymon|Speeddymon]] ([[User talk:Speeddymon|talk]]) 18:25, 25 June 2020 (UTC)


== Benefit to Fedora ==
== Benefit to Fedora ==
Line 53: Line 55:
== Scope ==
== Scope ==
* Proposal owners:
* Proposal owners:
** Modify comps to include nano Fedora wide
** Create a new subpackage of <code>nano</code>, called <code>nano-default-editor</code>.
** Create a package that provides /usr/bin/editor ... sprinkle on some magic and voila. Also include this package in comps.
** <code>nano-default-editor</code> will include <code>/etc/profile.d/nano.(sh|csh)</code>, which sets <code>$EDITOR</code> to <code>nano</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-default-editor</code> will be added to both @standard and @workstation-product in comps, so it gets installed by default everywhere.
 
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
Line 63: Line 67:
* Policies and guidelines: N/A
* Policies and guidelines: N/A


* Trademark approval: N/A  
* Trademark approval: N/A


== Upgrade/compatibility impact ==
== Upgrade/compatibility impact ==


Will not apply to upgrades.
Users upgrading from Fedora 31/32 to Fedora 33+ who have not explicitly set their editor default will have their default editor changed to nano as well.


== How To Test ==
== How To Test ==
Line 79: Line 83:
== Dependencies ==
== Dependencies ==


Lorem ipsum dolor sit amet ...
No additional dependencies are required.


== Contingency Plan ==
== Contingency Plan ==


The contingency plan is to revert to vi if there are significant issues with the change.
The contingency plan is to revert the change by removing the <code>nano-editor</code> package.


* Contingency deadline: this is a simple change, so a deadline isn't necessary.
* Contingency deadline: probably the beta? It's an easy change to revert.
* Blocks release? if the change breaks the redirection to an editor, it should block the release. However, this is unlikely.
* Blocks release? If the change breaks the redirection to an editor, it should block the release. However, this is unlikely.
* Blocks product? Potentially all.
* Blocks product? Potentially all.



Latest revision as of 09:38, 4 December 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

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.

Fedora does not currently have a default terminal text editor, because the $EDITOR environment variable is unset by default. But a common scenario where users wind up in a terminal text editor is when using 'git commit'. By default, git picks vi. 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 vi. It also makes things hard for those who don't particularly want to learn how to use vi. (These arguments would apply just as well if git picked Vim. vi is like hard mode for Vim, with fewer features, missing syntax highlighting, and no indication of what mode you are in. Even Vim users may feel lost and bewildered when using vi.)

In contrast, 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 (which provides vi, but not Vim). 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 vi or Vim, for those who want it.

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

Feedback

  • I think this is a great idea - and I already set my EDITOR to vim. Having to explain how to set EDITOR in .bashrc before even starting the basics of terminal lore with a newbie is an unnecessary barrier. @sdgathman (will have to see an example of properly signing feedback)
  • I like the idea, but ... this is a change in behavior for users who do a clean install in order to "upgrade" the OS. I'd expect at least a handful of bugzilla requests to be opened against this change demanding a different default or to revert and let the app pick its own default. Emacs users are a very vocal bunch for example. Personally, I don't mind; changing the default $EDITOR is not that hard, but it's a point of contention for some, and I feel it's fair to raise that for awareness now rather than wait. Also, what about the default $PAGER for man - it's currently null or /usr/bin/less right? /usr/bin/less uses similar commands to vi and this will bring about an inconsistency in the terminal that I'd like to see addressed before this is released. Speeddymon (talk) 18:25, 25 June 2020 (UTC)

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:
    • Create a new subpackage of nano, called nano-default-editor.
    • nano-default-editor will include /etc/profile.d/nano.(sh|csh), which sets $EDITOR to nano.
    • nano-default-editor will be added to both @standard and @workstation-product in comps, so it gets installed by default everywhere.

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

Users upgrading from Fedora 31/32 to Fedora 33+ who have not explicitly set their editor default will have their default editor changed to nano as well.

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 the change by removing the nano-editor package.

  • Contingency deadline: probably the beta? It's an easy change to revert.
  • 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