Is this the first time you’ve had the pleasure of using vi/vim? 😄 visudo is a command that locks the sudo file and just opens vi or vim. It’s not a text editor in and of itself.
Vim is the source of the famous “how do you quit vim”, meme. (:q <Enter>, btw) The interface is completely nonintuitive and has modes. In “edit mode”, all the buttons do different edits to text or move the cursor. That must have been your experience: trying to type in edit mode and getting garbage. You have to enter “insert mode” to type using the I
key. Commands to do things like save and quit are started by typing a colon in edit mode. You navigate in edit mode using HJKL as arrow keys.
To avoid it, set your default editor to nano instead. Nano’s hotkeys are nonsensical to people coming from Windows, but at least they’re displayed on the screen at all times.
export EDITOR=nano
I’m glad it worked. I was going to to rebut all the pessimists in here, saying I’ve done this before, and most ROM copies are identical. (Sites like Retro Achievements rely on ROMs having specific hashes, for example.)