1

When I have two spaces next to each other in RStudio I am unable to navigate in between them with the arrow keys. Has anyone else experienced this behavior?

See this gif for an example.

Thanks!

paul-shuvo
  • 1,874
  • 4
  • 33
  • 37
  • 1
    I can replicate. Probably something to do with the tabs/spaces replacement. Possibly a bug. The [RStudio community forums](https://community.rstudio.com/) might be a better place to post for this issue. – Gregor Thomas Feb 23 '20 at 20:50
  • 1
    Thanks, Gregor. I thought the same thing, but couldn't find anywhere in the preferences to fix it. [I just posted it there as well.](https://community.rstudio.com/t/navigating-double-spaces-with-arrow-keys/54132) – jimmyjhickey Feb 23 '20 at 20:53

1 Answers1

2

This is not a problem at all. If you go to RStudio options you'll see at Code > Editing > General that RStudio transforms by default two spaces in a tab and transforms it to base indentation. You can set your own default if two spaces is annoying you.

To avoid this behavior, just turn off this option.

Hope it helps.

rdornas
  • 630
  • 7
  • 15
  • 1
    Thank you! It turns out that I had to change the option in my global preferences and in my project preferences. [See this post for more details](https://stackoverflow.com/questions/48268178/how-can-i-prevent-rstudio-from-turning-my-spaces-into-tabs-it-seems-to-ignore-m) – jimmyjhickey Feb 24 '20 at 13:25