I have some source code file which has mixed tabs/spaces and I want to convert it to a file where it has automatically replaced all indentation spaces by tabs for a given tab space length (i.e. for example tab = 2 spaces).
Any easy solution (with common Unix tools, MacOSX, bash or zsh)? Some sed script or Python command or so?
Thanks, Albert
Go into its settings and turn off "Fix Mixed Tabs"... If you have the default VS settings, tabs in the editor are converted to spaces. So (in theory) if you clicked Untabify when the message comes up, it should convert all tabs to spaces and the errors should not appear next time.
To convert tabs in a text file to spaces, you can use the expand command. To convert each tab to a single space character, use the -t 1 option.
Ok, none of the given solutions satisfied me, so I coded it myself. :)
See here:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With