I had to convert a file from ESP-IDF that was using TAB for spacing, and tried to use vim “retab” and “:%s/\t/ /g” with not luck to keep the visual position of the text.
Fortunately the solution is very simple:
$ expand -t 8 core-isa.h > output_filename
Source: https://vi.stackexchange.com/questions/495/how-to-replace-tabs-with-spaces
I used Vi back in my Unix days but never liked it. I feel the same about Vim, plus I’ve lost my skills with it after years of using geany. I like geany and it converts tabs to spaces with a simple replace command using regex expression. Vi IS useful for its universality.
Yes, I think vi/vim are very powerful when you master it correctly. It requires much time and effort to get there.