Arch might be switching to nano as default editor as result of dropping ancient vi (unless people would really prefer vim to enter [core])
lists.archlinux.orghttps://lists.archlinux.org/pipermail/arch-dev-public/2015-April/027118.htmlAbout this post
- Posted
- Archived
- Score
- 130 · 100% up
- Kind
- Link
- ID
- 33ebcr
109 comments
Even though I'll never use nano I don't really have a problem with this -- I'll install vim and set EDITOR. One use case that might bother me though is trying to do an install or rescue from a boot image and discovering there is no vi. Are there good arguments against including vim-minimal in [core]?
vim-minimal has been added to the list of packages included in the installation image. So, no worries there!
Quite frankly, when you're doing editing jobs large enough to matter from a rescue disc, why not install vim it in ram? Or keep your own rescue setup handy (I have a usb key setup for such an occasion)?
Usually you're just changing something in e.g. syslinux.cfg, and in my experience back to what it was previously. For those three-line operations nano is perfectly capable.
You can also make your own arch isos.
Personally I have script that build a new one. It enables ssh, installs a key, add vim, network manager for wifi and cloud-init (although I haven't gotten around to using that yet).
I also expose the entire thing over my network via a PXE server so no burning discs/messing around with USB sticks.
Yeah, you're right about that, and it's more important to have an editor that anyone can use in those situations than it is to have my "favorite" editor. I remember a few years ago discovering that the single user mode of whatever BSD system I was using only had ed (I think maybe vi was in /usr, which couldn't be mounted)...I would have pretty happy with nano at that point.
Vim should be the default
I'm a vim fanboy, but I disagree. Nano is a better choice as a default due to the keyboard shortcuts shown on-screen. You can't expect everyone to know vim, and setting $EDITOR is really easy.
cant be worse that VI... right? the logical change will be from VI to VIM... is not that nano is any easier for someone that is coming from windows.. you will be surprised in how many developers use vim under OSX and windows.
I prefer vim as well.
But I think a default editor should be as simple and general (as in without any unique features) as possible.
Vim is clearly not that.
I would go as far as to say that using
vimas a default would go against everything Arch stands for. Were we not as minimal as possible? How isvima 'requirement'? That makes no sense whatsoever.vimcan do more than the occasional operating system. Obviously a default Arch installation has to stick to its own philosophy - especially when we are talking about the (greatest in the world) text editor.I use nano but I still think Vim is awesome and vi is just damn outdated.
If there was a vim tutorial I didn't have to pay for that wasn't vimtutor and involved me, I'd be using vim everyfuckingwhere.
Yes, I'm so freaking cheap that I don't want to buy a license for that game you all know about. That's like, most of a dinner with my gf. GF is more important.
EDIT: Also, colemak. I don't use qwerty, vim navigation shortcuts are useless for me.
Hmm, want to consider giving it another shot? May I ask what you did not like about
vimtutor?With
vim, you start of being more helpless and essentially slow than with any other editor. But there is this 'cut-off' point in time. That is the point where yourvimskills catch up with the average text editor.From that point on,
vimwon't cost you any extra time to do whatever you do with text editing. If you are already a terminal user, then that point of time should be around 30 minutes - 120 minutes into yourvimlearning (regardless what tools you use). (Granted, my dad would probably need 10-20 hours but he has a hard time using his web browser as is).From that point on you sticky note 4-5 new
vimcommands every week and just make an effort using them when they are efficient. After a week or so those commands become muscle memory and you can continue etc.The important thing to note is, this choice is like quitting to smoke. There is no point "choosing" to do this 6 months or a year later. The sooner you start the better - assuming you really want to do it eventually anyway. The time you wait until then is just wasted.
I simple rebound all vim keys to the colemak keys so that the position on the keyboard didn't change.
There are probably more optimal setups, but I switched from qwerty to colemak long after I started using vim.
What's wrong with vimtutor? Everything after that is just using it every day.
Vi is old, but it works, and it certainly doesn't lack features compared to nano...
Deleted before we saved it.
I prefer vim myself, but I suspect that vim users also know how to set
$EDITOR.Nano is a lot easier to learn and is already in the base install, so I agree it should be default.
Although I like vim better and would really like it to be in core/base, the fact is it's easy enough to install and configure any editor you want to be default so it doesn't matter.
And in that case, might as well go with the easiest one as default.
hjkl i esc :q :w
You just learned all the vi you need ever to have it work better than nano. How is it hard to use again?
I'm not saying vi is hard. In fact, I prefer it (or rather, its direct successor vim) to any other editor. You do have to know a few commands (:w :x etcetera) to work with it though.
Nano has all the keybinds right on the screen, so no need to learn anything.
String mandatoryEditorWarsJoke = "Also they need to cater to the lowest common denominator - both vim and emacs have a fanatical following that would abandon a distro for making the other one a default. Nano, being relatively neutral ground, would not have this effect.";
So i guess hjkl i esc :q and :w can can cut/paste text as well. And somehow i always thought, searching used a different command as well. (And thanks to all those compatibility settings like arrow keys, getting to the end/beginning of a row is the same as in nano.. else you would need to know $ and 0 as well.)
Don't get me wrong, i use vim almost all the time. But it isn't the better choice.
Also I know I said the magic words "default editor", so here you go,
edis the default editor.There is an extended implementation of
edcalledex.exhas a visual mode that you start by entering the ex command:vi. Some clever dude made an executable calledvithat startedexand immediately went into visual mode. The rest is history. (Don't believe me? Startviand typeQto leave visual mode)Probably everybody knows this already, but this blew my mind the first time I stumbled on this fact. Also this makes
vimthe true heir from the mightyedbloodline of the house of standard text editors!SO THAT'S WHAT HAPPENS! I always wondered why I ended up in ex-mode every now and then.
Came here to say this. It's the only choice that makes any sense.
Here is why this is a good idea: anyone who knows what ^ means can use nano. vim requires reading a manual, and the way it works is foreign compared to other editors and the command line in general.
hjkl i esc :w ;q
There's all the manual you need to surpass nano.
No, that's all you need to equal nano.
I prefer vim myself, but let's not pretend that nano isn't infinitely more intuitive (and thus useful) for new users.
New users don't have to look up how to use nano. They do for vim.
Nano makes far more sense. It's easiest for everyone to use. Everyone has their preferences, but as an emacs user I grumble everytime I am forced to use vi/vim and inevitably forget to press 'i'. Vim users can easily use nano, emacs users can easily use nano, everyone can easily use nano. Vi not so much.
Can't say that I care one way or the other. If I were interested in using defaults, I wouldn't be using Arch in the first place and vim is just a command away.
I agree. Whatever they choose is fine by me, I'll just set EDITOR if they choose Nano.
I think nano is a bad choice for a default editor for these types of config files. Its default setup has word wrap on, and the way it's implemented actually inserts unwanted newlines into files if you type a line too long instead of just wrapping on-screen.
The nano package is built with --disable-wrapping-as-root so wrapping is disabled when editing files as root.
This sounds like a very ugly hack. I tend to use sudoedit to edit configuration files, whose point is exactly not to run the editor as root.
Also, Nano badly needs a single shortcut to save and exit. It's outrageous that such a common operation needs four key presses (Ctrl X Y Enter). This may be only one more than in vim, but
:xis can be typed much faster.Yeah, and this bad behavior is a really big deal. If mc is on the install image (I'm not sure where to see this -- edit: oh never mind it's in community), why not make the default editor mcedit?
Yes please.
Finally
Saw this on the mailing list, I've always preferred nano, but thats just me, I would much prefer to have vim-minimal in core that vi because vi is over 15 years since last update.
Sounds good to me. Nano has been good to me while I sharpened my CLI skills.
Even as a vim-guy, I would prefer to have nano as default. Makes it more user friendly.
For the 4 packages who need compile time editor setup: Couldn't we just use a small stub program who calls VISUAL/EDITOR instead?
How about ne http://ne.di.unimi.it/ Far better than nano easier than vim.
Should I remove the vi package then? When updating with pacaur, it now states that it can't find vi in the AUR.
I did, nothing had blown up yet.
can i still put 'set -o vi' into my bash environment? i need vi or vim as my command line editor
That's a feature built into the shell. It doesn't actually make any calls to
vi.mg or e3 are also possible.
Personally, I'd rather vim enter [core]. But whatever happens it'll be fine. I can deal with nano as a default.
For a installer it kind of make sense. Vi was old and very unpractical to use (even for a daily vim user), and when you firstly install Arch Linux a simpler editor like Nano is a good idea. If you want a rescue-disk-for-emergency-cases, you can just make a little install on a USB key or whatever and keep it around in case you can't boot otherwise, it can come in handy sometimes ^^
This was reverted, vi is the default editor again:
https://lists.archlinux.org/pipermail/arch-dev-public/2015-April/027133.html
Does that mean that everything will be nano now? Or will it still use $EDITOR?
When a user does not define $EDITOR, the default will presumably be nano, I think.
I think it is a necessary change, visudo with vi is completely broken.
I actually prefer
vitonano, now. I keep spamming nano with things like "lllllll" or ":w" or "cw" :/EDIT: But, someone who hasn't even set their $EDITOR will want to use nano.
And it might be better for newer users (like me) who never really bothered trying to learn vim since nano does everything I need and it tells me how to exit it
I, too, prefer vim (after having gotten used to it) but I think nano should be the default. What's the problem with vi and visudo?
What's broken about visudo with vi?
Surely $EDITOR will still be respected. Nobody's going to overwrite your shell configuration or go through the trouble of patching every piece of software that uses $EDITOR.
Deleted before we saved it.
I can't take tutorials/etc that tell me to use nano to edit files. vi/vim in core, please.
I'm using vim for everything from writing novels to managing a repo with 50+ software packages.
I'd still prefer nano as default, if only to keep the size of the install images reasonably small.
Being the biggest
vimsupporter there is and using it exclusively for virtually any text processing, coding, editing and mark-up, I have to speak against the hive mind.vimis great. However it is as far from a requirement and sane default as a text editor could be. However, things should be done withvimas the popular choice in mind. Despite, by default, not using vim for most things, it should be as simple as installingvimviapacmanto have everything default toviminstead.If
vimis required in a multi-user environment, individual users can still use their own choices. However it seems very sane thatvimis only a default as soon as it is installed.I have sympathy for
vionly because it's a (known to me) trace of the original UNIX.