Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have the following settings to have two-space sized tab stops:

:set tabstop=2      
:set noexpandtab
:set shiftwidth=2

However, every time I hit Tab, two 2-space-width tabs go in. I just want a single 2-space-sized tab stop. What am I missing here?

share|improve this question
    
What is the value of shiftwidth? –  romainl May 13 '13 at 20:26
    
:set shiftwidth=2, it is also 2 –  user1027169 May 13 '13 at 20:34
    
If this answer worked for you, please mark it as the accepted answer, so that other users know that it worked and that the question has been answered. Thanks! –  Duncan Lock Jun 21 '13 at 9:48

1 Answer 1

up vote 3 down vote accepted

Maybe softtabstop is set to 4? Try this:

:set tabstop=2
:set noexpandtab
:set shiftwidth=2
:set softtabstop=2
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.