If I try to indent a code using visual mode or ggVG= vi automatically inserts 2 tabs instead of just 1.
for example:
// inside main
for (int i = 0; i < 10; i++) {
test += i;
}
changes to:
for (int i = 0; i < 10; i++) {
int test = 2;
}
There are two tabs before for and int. I want a single tab. I have set:
set noexpandtab
set tabstop=4
set softtabstop=0
set smartindent
is there any way to change the two tabs to one?