It often happens that you are modifying a text file and you want to replace spaces with tabs using Vim text editor. There is nothing easier!
Firstly, set the proper flag to use tabs instead of spaces:
Then retabulate the whole file:
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.