Tab Width Resetting

I have my tab width set to 4. However, RStudio appears to keep resetting the tab width to 2 spaces, although the setting itself remains at 4. The only way to fix it temporarily is to change the tab width to something else, like 6, click OK, then change it back to 4 again. However, the next time I open RStudio the tab width is back to 2. This is driving me nuts. This started happening with RStudio 1.2.

I do remember changing the tab width to 2 spaces a long time ago, but then changing it back to 4. Not sure if there's some config file somewhere that's still referring to that?

My version of RStudio: Version 1.2.1335, Build 1379 (f1ac3452)



Hmm, this might be the same bug reported here:

1 Like

Thanks so much Mara - good find. I'll go ahead and confirm that it's a bug...hope they fix soon!


The tab width is saved within a user-preference file located at:


If RStudio is unable to read / write that file for some reason, then it will default back to using 2 spaces for the tab width. Could that be what's happening in your case?

It might be worth trying to reset your RStudio's state:


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.