What if you don't know vi? And the gui editor is borked for some reason?
(um, so I have time on my hands like all of us....)
Get your inner OG on and not use a dedicated editor at all!
Let's redirect the standard input (keyboard) to a file instead of the standard output (the screen):
cat > shoppingList
meat
cheese
milk
energy drink
pizza
yerba-mate
air freshener
espresso (ground)
tickets to prog-rock revival
<CTRL-D>
Use the keyboard as you would think for CTRL-D, rather than typing it in as seen in the last line.
This acts like a line-editor, so if you blow it, you'll have to start over and type it all in again. But while you are on a line, you can backspace, and CTRL-U will erase the whole line before you hit return.
So yeah, you aren't going to write your phd thesis with this.
Oops, forgot - need to add birdseed to that list. Let's just append it to the end with two redirection symbols:
cat >> shoppingList
birdseed
<CTRL-D>
If you ls you'll see the file there.
How about something more practical?
You just totally blew out your .Xdefaults file with a wrong parameter. None of your normal editors work.
Man, cat as an editor is not interactive, and I'm not about to type all that in manually.
Let's say you need to urgently change the foreground character color in Aterm. Fortunately, you can add duplicate parameters to .Xdefaults, and when it notices a duplicate, it just uses the last one found.
cat >> .Xdefaults
Aterm*foreground: green
<CTRL-D>
So we just appended the foreground paramater to the end of the .Xdefaults file, overriding the original line for it way up above.
If you play with this a little, you may find yourself reaching for cat as a simple line editor for tiny config files faster than any other editor.