Closed tvenable-mie closed 7 years ago
Using these settings - :set ts=2 sw=2 et cino=(0 This example is indented like this, which is correct (note eight spaces at the start):
:set ts=2 sw=2 et cino=(0
if (one && two) { }
Now use tabs to indent, change spaces to tabs, and go to line 2 - :set noet | retab! | 2 Reindent that line with == and the file becomes:
:set noet | retab! | 2
==
The indentation should be like it was in the first example (aside from every two spaces should be a tab instead).
Thanks for looking!
I think you're setting tabstop is the issue. Just found out that that is a problem
tabstop
what version of vim do you use?
https://github.com/vim/vim/issues/1581
Using these settings -
:set ts=2 sw=2 et cino=(0
This example is indented like this, which is correct (note eight spaces at the start):Now use tabs to indent, change spaces to tabs, and go to line 2 -
:set noet | retab! | 2
Reindent that line with==
and the file becomes:The indentation should be like it was in the first example (aside from every two spaces should be a tab instead).
Thanks for looking!