I like cindent, smartindent and =% features in vim, which properly indents the code. But, I have one problem with this, it indents everything with 8 spaces, and if I have few nested ifs, it can be very long line like here, though having so many nested ifs in first place is another question.
4 int main()
5 {
6 if(x)
7 {
8 if(u)
9 {
10 if(y)
11 {
12 }
13 }
14 }
15 }
I tried to set ts=1 and still it doesnt work.
Is there any way to make default indentation level to 4 spaces while using these features?
Edit set sw=4 solved the problem. No wonder vim always surprises me :)