One of my favorite Vim tricks,
Here, you can see I have a couple of Python files but all are missing the import time
statement at the beginning of the file.
How are we going to solve this issue using Vim?
It’s straightforward, just two commands.
Firstly, I will open all the files by args command.
:args *.py
Secondly, I will add an import time statement at the beginning of each file and write, update.
:argdo 1put! = 'import time' | write | update
Here is the video