CTRL-X [y/n/c];
ALT-A and CTRL-K
CTRL-W and CTRL-R
...pretty much covers 99.9% of the commands I ever use in it.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
I also often use it to look inside random files on my Mac that won't open anywhere else (e.g. .xml, .json, files without extension names).
As I mentioned below, While it may be more ubiquitous, vi isn't present on Debian's live cd, while nano is.
It does everything you need it to do for quick configuration edits, and doesn't get in your way.
Have you ever tried to use the equivalent 'ee' editor that comes installed on other NIX? It's painful.
I could use vi/vim, but I'm just too lazy to teach myself or use "vimtutor" to actually learn how to use it. I know just enough to open/modify/save/exit, which I think is just good enough for a quick edits.
Over the last 20 years of using Linux I haven't learned vi and emacs above basic editing and saving files.
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.
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.
et() {
emacsclient -tty --alternate-editor '' "$@"
}
.. for using Emacs in the terminal a-la vim/nano. When you close the file you opened, you'll be right back where you left-off in the shell. I still tend to use a long-running GUI instance as you describe, but for jumping into config files from a terminal to edit a line or two, it's great.Its everywhere, its quick, and unless you've done some pretty nutty stuff in your configs, basic usage is the same between a heavily customized vi and the vi you find bundled with every is bundled windows and gentoo. (Not to disparage any preference for emacs; it just seems a bit much to have to fall back to an entirely different editor seems a bit much)
It's akin to the same justification for why I wouldn't bother opening a random tiny file in Xcode or IntelliJ IDEA.
I don't use Emacs as just a simple text editor. I can probably count the times I've typed `emacs some/file/path.whatever` into the shell on one hand.