EDIT
I guess I had assumed that vi/vim was significantly more widespread than nano. Maybe that's an outdated assumption? I feel like I've come across a few instances where vi has been the only choice...
EDIT
I guess I had assumed that vi/vim was significantly more widespread than nano. Maybe that's an outdated assumption? I feel like I've come across a few instances where vi has been the only choice...
Edit: I suspect it's the default because it launches with visible instructions on how to exit. Launching Vim or Emacs strands a lot of new users.
I am sure vi and emacs are much powerful than nano, but the time I'd have to invest in learning them would outweigh the benefit. I just don't edit text files enough for it to pay off.
The edge still goes to vi, especially if you log into older/legacy things, or in very resource constricted environments. It looks like busybox, for instance, has a vi but not a nano: https://busybox.net/BusyBox.html
Are there better, more powerful editors out there? Sure. But just like vim, you can expect to find nano pretty much anywhere, and if you need to make a quick change, say to a configuration file on a bare-bones system, that's nice.
With Emacs/VI you need to bring a HUGE mental framework to just use it.
And maybe, with luck or some years of pain training, to just EXIT it :)
---
Vim/emacs are powerful. Nice? Never. Easy? never. Good for most common editing task in the terminal?. Nope.
Claim that Vim/Emacs are good is like say "why people use Sublime Text when Eclipse is so much better?"
Except, with eclipse, you know how exit it.
That's enough to get by for quick edits. I haven't used vi a ton in my life, but I've managed to remember that much.
With nano, all is straight in the UI. That is powerful, and so obvious.
Why Vim/Emacs not have that?
The GUI app as a menu bar, a standard gui feature that includes at the far right an entry entitled HELP under which one can find a manual, docs, a tutorial, a FAQ and various other options.
Just saying that vi at its most basic level isn't bad at all. The user only has to remember i,esc,:w,:q,:q! for basic editing. That's not much.
But I do agree that it would be nice if vi / vim would simply list those commands when starting the editor for those who have never used it or haven't used it in ages.
I know other people who aren't Vim fanatics at all but have occasional work in the terminal, and they too also just learned the most basic Vim commands and have the most basic Vim configurations, if at all.
As a developer who almost exclusively uses GUI editors (Sublime / IntelliJ) I have lost the emacs skills I gained in college, and I don't use emacs enough to remember the key strokes necessary to make it more useful than nano. It's more difficult than nano because I have to google a cheat-sheet every time I use emacs.
I never liked vim.
Nano is a great terminal editor, has enough commands to make me productive when needed, and I use it exclusively for terminal text editing.
Just because the command is "vi" to invoke doesn't mean anything.
I agree, but if anyone is curious, the source is available and has a BSD style license: http://ex-vi.sourceforge.net
Also, do Macs come with vim?