vi undo and repeatIn command mode, to undo the last command u is used and if you want to repeat the last command use dot (.). u This command allows us to undo or cancel our last command. Example: ![]() Look at the above snapshot, this is our script. ![]() Look at the above snapshot, with the help of dG command we have deleted last lines. ![]() Look at the above snapshot, after pressing u, last command dG disables and all the content came back. (.) The . command allows us to repeat last used command. Example: ![]() Look at the above snapshot, we have used D command to delete some part of line second.
Next TopicLinux vi cut, copy and paste
|