Rstudio ide ignores tab-to-space setting

Yesterday, typing in the IDE, when I hit the tab at the start of a line, it goes in 3 spaces.
Today, typing in the IDE, when I hit tab at the start of a line, it goes 8 spaces.
I didn't change any setting, or install any new software.

When I go to Tools >> Gobal Options >> Code >> Editing and I look at "Insert spaces for tab" at "tab width" there is a checked checkbox and a number 3 there. I tried changing the number to 2, applying, restarting the software, and it doesn't respond to the change in the interface.

I tried downloading, installing, and running todays (27-Sept-2021) the latest/greatest version of RStudio Desktop, and it doesn't help.

I read this:

It says that this can be a very deep hole.

Does it help to go to Options -> Code and uncheck "Auto-detect code indentation"? Sometimes RStudio guesses incorrectly.

Also check your project-level tab settings (Tools -> Project Options -> Code), which take precedence over the Global Options.

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.