Earlier quoted context omitted.
I use nano all the time. If I need to do quick editing, nano is perfect. If I need to do anything more complex, I'd use rmate[1] + rsub[2] with sublime text. 1: https://github.com/aurora/rmate 2: https://github.com/henrikpersson/rsub
This is really cool. I'm sure something similar exists (or could exist) for Emacs and Vim, right?
GNU nano 2.9.0
51–60 of 62 posts
Re: GNU nano 2.9.0
#52Earlier quoted context omitted.
I think vi is probably more ubiquitous though, especially since it’s included in busybox which powers almost all imbedded Linux hosts. Still a good idea to learn a little vim
>I think vi is probably more ubiquitous though, As I mentioned below, While it may be more ubiquitous, vi isn't present on Debian's live cd, while nano is.
Re: GNU nano 2.9.0
#53Re: GNU nano 2.9.0
#54Nano does what is does very well. Want to quickly modify some some file it is the tool of choice in the way a hammer is the tool to drive a nail. Right tool for the right job.
We can all think of far more complicated changes that are considerable more efficient in vi. So the question is 'given perfect familiarity with the tools, and all else being equal, what kind of changes, if any, are more suitable for nano rather than vi.
None of that is to say that nano doesn’t have a place.
Re: GNU nano 2.9.0
#55Earlier quoted context omitted.
It's a simple text editor that's available out of the box in most Unix-like distros these days. So kinda like vi, except I know how to use it (and if I ever forget, it lists all shortcuts on the bottom of the screen anyway).
Actually, the Debian install cd doesn't have vi but does have nano, and vim (and neovim) is larger than nano.
vim-tiny and nano sizes are nearly the same; nvi is smaller; I'm pretty sure the "vi" applet in busybox would be much smaller.
Re: GNU nano 2.9.0
#56Re: GNU nano 2.9.0
#57Nano does what is does very well. Want to quickly modify some some file it is the tool of choice in the way a hammer is the tool to drive a nail. Right tool for the right job.
Re: GNU nano 2.9.0
#58Nano does what is does very well. Want to quickly modify some some file it is the tool of choice in the way a hammer is the tool to drive a nail. Right tool for the right job.
That said, I prefer Sublime/Vim (Sublime also has these plugins), but Nano is a decent alternative and resembles the first text editor I ever used. Sublime is lightning fast for me, but it isn't open source.
To break the habit of firing up Nano I symlinked it from /usr/local/bin/nano to /usr/bin/vim. If you use Vim regularly, the shortcuts will stick in your head whereas if you resort to Nano you won't memorise them for long. If I ever still require Nano then I can execute it by executing /usr/bin/nano
For people on a Mac, I can recommend the app CheatSheet [1] available in Homebrew. If you're lost in an application holding Command (⌘) for a few sec will represent you with a cheatsheet of shortcuts. It won't work with CLI apps though.
Re: GNU nano 2.9.0
#59Earlier quoted context omitted.
It's simple, it's on every platform I ever SSH into, and it gets the job done quickly?
Exactly this reason. You just know it will always be installed. And I still type "pico".
If you want to get rid of this habit put this in /usr/local/bin/pico.sh or ~/bin/pico.sh
#!/bin/bash echo "Type nano instead of pico..." sleep 5 nano $*
Put in ~/.bashrc alias pico=~/bin/pico.sh (or /usr/local/bin/pico.sh)
Make sure to chmod +x the shell script.
You can also simply call it pico instead of pico.sh; then you won't have to use the ~/.bashrc addition.
Re: GNU nano 2.9.0
#60Earlier quoted context omitted.
It's weird how comfortable familiarity is. I approached vim similarly, I first used pico/nano to modify files here and there but mostly used GUI IDEs or editors. Switched to vim and been using it for 10+ years. Every once in awhile I encounter an OS where visudo or something else defaults to nano and I feel so awkward just trying to make simple changes and save the file.
The huge advantage of nano over vi in that scenario, is that nano 1) uses the conventional [i.e. as used by every editor other than vi] arrow key cursor movement and typing behavior without the need to toggle any modes etc, and 2) displays the shortcuts you need for anything else on the screen by default - things like saving, cutting/pasting, searching, and, oh yes, quitting. So, while it might not be optimal for vi…