How does Vim batch process files to change tab to space?

  question, vim

Previous coding habits were not very good, so many tab were used in the code.
Now I want to convert tab into space by settingvimrcThen execute:retCommand is ok, the problem is that there are many files to be processed, and execute them manually for each file.:retThe order is not very realistic, may I ask from which angle can I consider to solve this problem?

For example, if you are dealing with python files, then cd to the project root directory:
1. $ > VIM`find.-typef-name “* .py” `//use vim to open all files to be processed
2. :argdo :ret | update // Execute: ret command on all files in vim parameter list and save

In addition, you can learn more about the usage of bufdo, windo window commands.

The above is just to show VIM can easily do this for the problems of the building owner, instead of doing it one by one. Of course, it is also a good way to write scripts according to the thinking upstairs.