Sample Header Ad - 728x90

In Vim, how can I automatically determine whether to use spaces or tabs for indentation?

10 votes
3 answers
3708 views
Sometimes I edit others source code where the prevailing style is to use tabs. In this case, I want to keep the existing convention of using literal tabs. For files I create myself, and files that use spaces as the prevailing indent style, I wish to use that instead. How can I do this in vim?
Asked by Chris Down (129986 rep)
Jan 31, 2013, 05:58 AM
Last activity: Aug 22, 2022, 02:07 AM