Who writes? Is it you or some kind of program?
Your terminology is unusual: usually programmers understand from a computer point of view!
What you write by typing on the keyboard is the entrance to some program (which reads it).
If you want editable input (to a program so written or typed by a user), consider using the GNU read string (on Linux) or perhaps ncurses
If you want to format the output of a program (which the user would read with his own eyes), you usually need to explicitly format the code. Perhaps ANSI escape codes might be useful (but using them might make readline or ncurses invalid).
See also this answer and the links I gave there.
source share