netctl icon indicating copy to clipboard operation
netctl copied to clipboard

[CHANGE-EDITOR]: Change fallback EDITOR from nano to vi

Open kaldown opened this issue 3 years ago • 4 comments

Most of the systems have no nano installed by default. Personally, I have no $EDITOR in my root being set. Think vi would be safer.

Thanks for the cool product <3

kaldown avatar Dec 07 '20 20:12 kaldown

Thanks for this suggestion.

I tried to follow the fallbacks of systemd, which are "editor", "nano", "vim", "vi". Back when I wrote it, nano was part of the then-existing base group in Arch Linux, so I could assume that the systemd fallback would effectively be nano for most people.

Now that the base group is gone, it is indeed good to reevaluate that choice. Given that you and I apparently prefer vi(m) and I have no other way of getting information from the users of netctl, let's change the default to either vi or vim! Personally, I think we can go with vim. Do you think this upsets people (maybe it upsets you?). At any rate, this discussion has a high degree of bike-shedding, since we are talking about a fallback.

joukewitteveen avatar Dec 11 '20 11:12 joukewitteveen

Thanks for the extended feedback. I wasn't upset, just

~ sudo netctl edit wlp6s0
/usr/bin/netctl: line 181: exec: nano: not found

Was a bit amusing.

Then I have to remember root user should have his own $EDITOR. So it's kinda refreshing knowledge.

More valuable is the pattern: ${EDITOR:-vi} I never knew it could be used as such. Thanks :)

Personally, I use neovim :)

kaldown avatar Dec 11 '20 12:12 kaldown

I took a look at https://pkgstats.archlinux.de/packages and noted the following (approximate percentages of systems taking part in the statistics):

nano is present on 80% of the systems (from 93% in 2019)

vi is present on 70% of the systems (from 90% in 2019)

vim is present on 50% of the systems (from 50% in 2019)

What would you make of these figures?

joukewitteveen avatar Dec 11 '20 18:12 joukewitteveen

Looks like I have to open a PR on Arch repo first, in order to save peoples from a bad habit of using nano ;)

kaldown avatar Dec 11 '20 19:12 kaldown