Better mechanism to choose the default editor (and avoid vi if possible)?
Augie Fackler
raf at durin42.com
Sat May 30 14:41:49 UTC 2020
On Sat, May 30, 2020 at 8:24 AM Chris Green <cl at isbd.net> wrote:
>
> On Sat, May 30, 2020 at 06:42:41AM +0000, Steve - Gadget Barnes wrote:
>> Several other version control systems, (and other systems as well), honour
>> the environmental variable EDITOR - this is an easy way to specify the
>> editor to use for things like hg config --edit without having to use an
>> editor that you are less than happy with. Maybe honouring this and possibly
>> adding mention of it to the helps would be the optimal way to go!
>>
> The 'modern' Linux way is to use the 'alternatives' set-up isn't it?
At least on debian. I don't know about other distros. Both our
first-party debian packaging rules and the downstream debian packaging
rules specify "sensible-editor" as the default editor in the debian
package, rather than vim. If there's something equivalent other
packaging rules should be doing, they should do so. :)
(I remain sympathetic to the notion that vi is a wrong default on
Windows because vi isn't always there. Notepad.exe may be the worst
editor ever, but it has the virtue of existing reliably.)
>
> The default application for each job is configured in
> /etc/alternatives and a (somewhat weird) system of links maintained by
> the update-alternatives command allows you to choose what editor (or
> whatever) you want to use.
>
> --
> Chris Green
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
More information about the Mercurial
mailing list