I happen to work on code in which some modules use tabs for indentation while others use spaces. Many text editors such as Np++ has some sort of an adaptive tabbing feature, which use spaces for indentation if the previous line (or block of code) use spaces, or tabs as the case may be.
I haven’t seen anything in vim like this. Is there any such plugin or setting for this?
I perfer to set my enviroment up like the below example demonstrates. I make a general rule of replacing tabs with spaces and use
augroupwhen I need to override that rule. Makefiles are a good example of when you may require TABS and a cpp file is when you may require spaces.