4 ms·
One of my former co-workers loves Nano. It does what he needs, it was installed on all our systems, if not it is safe to just apt-get install it. Most of our do
by mrweasel 5y ago
One of my former co-workers loves Nano. It does what he needs, it was installed on all our systems, if not it is safe to just apt-get install it. Most of our documentation said this like "edit this line in this file, using: vi <path to file>." Every time he wrote documentation, or updated existing, he'd change "vi" to "nano".
It always makes me smile and think about him when I spot "nano" somewhere in the documentation.
- rob74 5y agoNano's great advantage over vi(m) is that you can instantly see how you can save the current file and exit the editor, e.g. when confronted with it because of a "git commit" on some server. So, if you configure an editor that anyone should be able to use, I would prefer Nano too...
- cesarb 5y ago> Every time he wrote documentation, or updated existing, he'd change "vi" to "nano". It might be better to change it to "nano -w" instead; IIRC, some versions of nano hard-wrap lines by default (which corrupts files where line breaks are significant) unless you remember to always use "nano -w".
- juangacovas 5y agoYou can add a "set nowrap" line into your home ".nanorc" file so "-w" is applied by default.
- cesarb 5y agoRelying on configuration, either in your home ".nanorc" or in its /etc equivalent, is too risky; you might be using ssh (or docker/podman/etc) to a machine or VM or container which doesn't have that configuration. It's the same for relying on having a nano version where that's the compiled-in default; you might be using a machine or VM or container with a different nano version than you're used to. It's less risky to always type "nano -w" everywhere (or use a different editor, one which never had hard-wrap enabled by default in any version).