When working in a shell, my preferred text editor is nano. It’s easy to find the full manual online, but I wanted to share some of my frequently used commands:
Create / edit file named XXXXXnano XXXXX
Exit nanoControl + x
Followed by:
Y to close saving changes
N to close without saving changes
Control + C to cancel exit
Find within fileControl + w
When in find mode, switch to replace modeControl + r
When in replace mode, after typing the text to replaceControl + x
to toggle between replace one and replace allEnter
to confirm replacement
Followed by Y to confirm each instance