It may not be useful in this case, but if you're doing command line operations you can use asciinema[0] to generate your screencast as a textfile and edit the typos at specific timestamps when you're done.
Example:
Suppose you wanted to type `sudo su` but typed `suod su` then corrected it. Here's part of the file that would be generated:
[1.886896, "o", "s"]
[1.984919, "o", "u"]
[2.047353, "o", "o"]
[2.150955, "o", "d"]
[2.54311, "o", " "]
[2.629135, "o", "s"]
[2.745892, "o", "u"]
[3.324734, "o", "\b\u001b[K"]
[3.481178, "o", "\b\u001b[K"]
[3.611576, "o", "\b\u001b[K"]
[3.776223, "o", "\b\u001b[K"]
[3.896898, "o", "\b\u001b[K"]
[4.089885, "o", "\b\u001b[K"]
[5.812011, "o", "u"]
[5.978867, "o", "d"]
[6.017407, "o", "o"]
[6.177912, "o", " "]
[6.385136, "o", "s"]
[6.385614, "o", "u"]
You can edit the file, delete the type and correction-delete keys and keep the right one. Yan even edit the timestamp if you want to either with your text editor with macros, or a spreadsheet once you're done and decrement by four seconds.
When you play it with `asciinema play foobar.cast`, it will play `sudo su`.
Quick tip:
asciinema rec -i 2 deployment_screen.cast
The above records the "screen" to a `deployment_screen.cast` file, and reduces all idle time longer than two seconds to two seconds. If you type a character, then pause for an hour, then type another character, the cast will reduce that dead "half hour" to two seconds. Super useful.
I use that when I'm deploying something for the first time and may have to install additional dependencies or edit some config files and haven't yet scripted the thing. I record the deployment cast and dispatch it, then put it in the target machine and add a `cat /home/user/README.md` in `.bashrc`. The README.md file explains what the target machine is about, the services that are deployed, and where the cast file is.
After all the rough edges are rounded, you can go over the cast file and encode the steps in a Dockerfile or whatever thing you're using and not miss a dependency.
[0]: https://asciinema.org/