After learning vim for a bit, I find nano quite superior for my use case mainly editing files inside terminal on remote servers.
After learning vim for a bit, I find nano quite superior for my use case mainly editing files inside terminal on remote servers.
But yeah, editors are just a preference, especially when every single one of them works in 90% of cases. I actually forked nano a long time ago (back in college) just to implement some niche multi-cursor hack because one guy said it was one thing vim could do that nano couldn't. I know there's plenty that <any editor> can do that <some other editor> can't, but nano's always Just Worked and occupied a very special, reliable, spot in my heart.
To someone new to the command-line, Vim is not at all approachable. Once you know your way around Vim, it's a fantastic editor, and frankly Nano just doesn't compare, but you can't expect a newbie to be able to use Vim effectively. Without a tutorial and a deliberate effort to learn it, Vim is rather baffling.
To the question of what should be the default, I suppose it depends on the context. A power-user distro wouldn't have much use for Nano, the choice would be between Vim and Emacs.
- New to vi(m)? Close the editor by typing :q!
- Learn vi(m) by running the following program: vimtutor
VIM - Vi IMproved
version 8.2.814
by Bram Moolenaar et al.
Vim is open source and freely distributable
Help poor children in Uganda!
type :help iccf<Enter> for information
type :q<Enter> to exit
type :help<Enter> or <F1> for on-line help
type :help version8<Enter> for version info
The problem is that a total noob will still be overwhelmed, Vim's UI is simply too different from modern UI conventions.That's why I think it makes total sense for nano to be the default editor in this day and age, even it if means that I'll have to remember to set EDITOR properly if I want to use vi(m).
I have used the IdeaVim plugin for IntelliJ, and honestly it was so bad it was worse than not having the plugin at all. Maybe 20% of commands actually behaved consistently with vim. And IIRC, a decent chunk of my preferred vim functionality was outright unimplemented.
Perhaps ironically, I didn't have any such problems with the (commercial) plugin for Visual Studio. It worked very well. It cost $100, but my employer paid for that.
I've basically given up on IDEs after that and just use vim itself. If you know of any that have a really good vi-mode plugin, I'd love to try one!
I guess they are being accommodative to people who don't know any editor to use, since those who have their favorite editor don't need to be told.
That being said, for new users without bias, nano definitely seems easier.
So if I can't keep muscle memory of Vim keybindings, and I have never found a Vim configuration I've been happy with, why was I so stubbornly holding onto the idea that Vim was the right editor of choice for me? I don't know, but I finally changed my mind and looked for another editor. A dead simple one with sane defaults.
It came down to Nano vs Micro for me. Both are great. I ended up liking Micro a bit better, although I'm very glad to see that Nano development is still active.
"You can't figure out how to get out of the editor? I'm busy, stop asking me stupid questions. Look for the answer on Stack Overflow. Make sure to leave your mark there by up-voting the answer."
On topic: It's weird that nano is so beloved, but good that GNU just keeps pushing out things as long as they are used.
Type :qa! and press <Enter> to abandon all changes and exit Vim
Maybe not quite what the user was looking for. But I guess it does get you out of Vim.
ETA: Also, that answer on Stack Overflow at one time was the answer with the most traffic on the site. Reading must be a common problem for trapped Vim users.
While vi comes with all installs
> is very easy to use. It has all the shortcut listed on page so it is quite user friendly out of the box
Tell that to the users that don't know what ^ stands for
> After learning vim for a bit, I find nano quite superior for my use case mainly editing files inside terminal on remote servers.
I just don't understand how this is possible, except if you're doing very basic edits (even in that case...)
As such, I almost always just grabs nano for these things, and use an IDE when working on code.
Unfortunately, for me when I googled that exact phrase just now it gives a "Featured Snippet" saying it means "the beginning of a line", which is about regexen and and also only sort of right in that context. The wikipedia page is the first real result though.
Edit: I was spelling caret wrong. oops.
Edit: Also there are a lot of stories of "this old system that is central to our operation that nobody except that one guy 10 years ago knew how to set up" in companies.
But the person I replied to said 'all' which is incorrect. If he said 'most' or something I wouldn't have replied :)
I use nano as my daily driver, and here is how:
- I have a nanorc I copy around but am quite comfortable without. Here it is. You can use it under WTFPL-1. Feel free to fork it, but I'm not accepting pull requests.
set multibuffer
set nohelp
# Defaults for older versions
set nowrap
set smooth
set morespace
unset boldtext
- I use ^K and ^U to cut and paste lines of text.- If I need to edit multiple files, I use ^R
- If I need to find and/or replace, I use ^W (find), optionally with ^R (replace) and/or M-R (Regexp).
- Sometimes I need to go to a specific line/col, so I use ^_
Basically there's nothing else I want my text editor to do. I want minimal magic.
When vi/vim aren't available, I usually just end up using sed.
If there's no nano available like on busybox, I'll default to vi, but I don't prefer it.
Which is why I prefer Nano over vim, I don't edit _that_ much from the console so I only have one easy thing to remember.
If you run `nano` it shows a message that you can get help using 'Ctrl-G'. In the second paragraph it tells you what '^' stands for. It will be a problem if you somehow ended in nano unintentionally. Even then someone can figure that it means either 'Alt' or 'Ctrl', that is the modifier keys.
>I just don't understand how this is possible, except if you're doing very basic edits (even in that case...)
Some people prefer or/and find easier to work with a modeless editor.
I think also I was on a real Linux box a few weeks ago (can’t remember what distro, sorry) that only came with ed by default. That was interesting, at least until I gave up and installed vi.
Most edits I do if I'm not on my daily driver is basic edits. Making adjustments to config files, etc. Doesn't require all the magic of Vim. Still prefer Vim though. Not having my Vim keybindings in an editor is like using a keyboard with a different layout.
The users who have already figured out how to open a terminal, find their file, know what nano is and how to launch it?