Vim replace tabs with spaces
To replace all tabs with 4 spaces in vim using the following command:
Code
:%s/\t/ /g
Explained:
Code
: - command %s - entire selection / - separator \t - search for tab / - separator " " - replace with 4 spaces / - separator g - global replace