command line text editor for android lollipop terminal emulator
Depending on the Android variant (stock ROMs, custom ROMs, etc. could differ), GNU Nano might already be built in. Here's what it looks like running in Terminal Emulator, identical to its desktop Linux counterpart.



Even the CTRL key shortcuts are preserved, so your terminal emulator should support emulating CTRL key combos if you want to use it, else you'd need an external keyboard.

Run it anywhere simply by executing nano /path/to/file/filename.