Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I despise Nano. I support the effort of anyone working on open source, but really don't like using the editor personally. As a result, it's really frustrating when setting up a new box and VIM isn't the default.


> As a result, it's really frustrating when setting up a new box and VIM isn't the default.

However having Nano as default is the better choice. You as an expert know how to change the default. Newbies who don't likely will prefer a discoverable editor like Nano.


I agree. And if you only occasionally need text editor on a linux server, like when you change some config file or update cronjob and nothing more, nano is perfectly adequate, without needing to learn all the vim shortcuts.


> And if you only occasionally need text editor on a linux server, like when you change some config file or update cronjob and nothing more, nano is perfectly adequate

That's precisely when nano is the least adequate: "sudo -e" or "crontab -e" won't pass the "-w" flag to nano, and without that flag, the automatic hard line wrapping can easily corrupt config files which depend on line breaks for their semantics (a crontab being a great example, where each line is a separate entry).


Thanks, I check that flag. Anyway, I never encountered the problem you are mentioning...


That can go in nanorc


> However having Nano as default is the better choice. You as an expert know how to change the default.

Speak for yourself. It's not better for me and I had to do some googling to figure out how to change the default when it was changed to Nano. I'm not an "expert" in any sense, but I'm sure a lot more comfortable with VIM than Nano.

Also, I'm not sure most people setting up VMs newbies, at least in the way you're using the word. I have no problems with Nano being installed as the default on some distros. I just wish it weren't on the one I use!


Thank you for speaking for the rest of us.


What's nuts to me is how often I hear people complain that that can't figure out how to quit out of nano when those exact instructions are always visible at the bottom of the screen.


But you have to know that the "^" sign means "hold ctrl".


When you first open nano, it tells you at the bottom of the screen that you can press "Ctrl+G" for help. The second paragraph of the help text explains the '^' notation, and the help further explains that you could have accessed the help page by pressing F1, which has been a common key for accessing the help feature of whatever program you're using for decades.


These are people who prefer vim, and are perfectly fine with the :q magic.


Shift + zz


For me, nano was the text editor that I immediately knew how to use. No need to learn, you just read the bottom of the screen, and you can do the basics. For writing a commit message, it's more than enough.

Compare that to Vim: it's a great tool for coding, very powerful, you can easily customize it, optimize it to your needs, but you actually need to spend time learning to use it, and then tweaking it to your work.


I am the reverse, I hate when I ssh in a server and try to edit crontab and I get hit with vim. At least now vim shows you how to quit it if you attempt to ctrl+c it. I don't need vim when I want to edit a 10 line files.


> At least now vim shows you how to quit it if you attempt to ctrl+c it.

This has been the case for at least ten years. I started using Linux in 2009 and the first time I opened vim, I tried using ctrl-c to quit and saw that message.


Servers are usually running LTS Linux versions and I had to Google how to quit vim a few times because I forget. Same with closing a frozen SSH, I kinda know the shortcut but I am always wrong a bit so I eventually remember it or Google it again. Things I do not use often are just wiped from my memory.


My anecdotal evidence: when I'm working on a VPS or making changes in terminal on my non-windows devices I wouldn't know of any other editor that I could use that is not Nano.

Occasionally I've been taken to vi or vim and I wouldn't know how to cut/save the file. So I appreciate Nano for exposing those actionsore clearly.

Maybe the alternative would be to ask user what editor they want to use whenever they try to edit a file - yet suggest Nano as the default for those who have no experience on any other editor.


When I started using Linux, nano was often the default, and it had the tendency of corrupting configuration files because of its automatic hard line wrapping unless called as "nano -w". To prevent that kind of accidental corruption, I always remove nano from every system I administer.


Nano's never done that to me, and I regularly update a single-line authentication cookie in a config file. Do you remember which distro you were using? Sounds like it included a weird /etc/nanorc file.

Debian's has `set nowrap`.


> Do you remember which distro you were using? Sounds like it included a weird /etc/nanorc file.

It was a long time ago, back in the 90s; it probably was either Debian or Slackware or Conectiva.

Edit: it probably was Debian, I found contemporary bug reports complaining of that, for instance https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=127634 and according to https://metadata.ftp-master.debian.org/changelogs/main/n/nan... the default /etc/nanorc was changed to disable wrapping only many years later in 2.0.9-2; even then, you're still depending on nobody commenting that line on /etc/nanorc. Removing the whole package is much safer.


I was in a workshop organized by ElasticSearch. They provided to their VM from browsers. All Vi guys there got stuck because the keybinding didn't work on the browser.

I helped some guys there, shown them how to use nano. And then could move on with the ES demo.


I despise vim, not sure how they thought that such a design was reasonable for an editor (e.g. the fact that typing doesn't insert text at the cursor position unless you press Insert first).

Nano, on the other hand, works properly as an editor.


vim was designed to work like vi, which is older than the standard behavior you are talking about. What seems reasonable is basically just what you are used to.


Well, that behaviour makes it easier to move around in a file, which is exactly the point.


I have the opposite problem from Vim novices. I genuinely cannot exit from Nano.


Exactly. The real user friendly editor would always show you the "top" commands that can be accepted.

But some !@$ in some distros or programs set the defaults of nano to not show the "help lines." So I know it's Nano, but as I don't use it all the time I don't remember how to do anything but typing the text.

Not a good configuration.

And still, at least after the Esc was pressed it should show the help lines, and not pretend nothing's happened! That's a missing feature! Even decades ago the user friendly text based editors had that.

And the help is still talking about the "Meta" key -- when have you the last time seen the physical keyboard with the key labelled as "Meta"?


Same thing here ^^ It's annoying to reflex type `:q` and see it on the screen and nothing happen! One good thing with nano being beginner friendly is that it reminds you at all time how to quit on the bottom left of the screen so the annoyance doesn't last long.


"Ctrl+x", "y" or "n" if you need to save, then "Enter"


Wrong, you just hold down Ctrl and then randomly mash 'O', 'X' , and Enter until it kicks you back into the shell like a screaming infant


Thanks. Well, now I can't make that joke any more!


try micro. it's better than both


Swap nano and vim and that's how exactly I feel. :-)


s/VIM/emacs-nox/


Startup time: 1ms, vs 3000ms


What are you talking about?

$ time emacs -nw -q --eval '(save-buffers-kill-terminal)'

emacs -nw -q --eval '(save-buffers-kill-terminal)' 0.06s user 0.01s system 99% cpu 0.077 total




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: