RStudio v1.2.5033 Mac ā€“ Indentation not abiding by settings in Global / Code

I'm unable to adjust indent settings, regardless of number of spaces specified in Global / Code. cmd-i does not reindent selected text. Please follow link to gif for behavior.

Mac indent fail

Thoughts on how to proceed? Thanks in advance!

1 Like

Hi, and welcome!

For coding questions, please see the FAQ: What's a reproducible example (`reprex`) and how do I do one? Using a reprex, complete with representative data will attract quicker and more answers. This isn't one of them, of course.

My poor eyesight made it difficult for me to see exactly what's going on, so I'll ask. Is the desired behavior to move the highlighted block on stop to the right?

I'm on macOS, also, and what CMD I seems to do is to do is outdent to the left, up to the left margin, identically to SHIFT TAB. What I'd like to be able to do is what I'm used to in Sublime Text, say with CMD ] and CMD ] back and forth. Until tonight I didn't discover that I can with something that seems like it should be destructive, highlight and TAB [not CMD TAB as I said earlier]

Thank you for the response.

The behavior Iā€™m expecting is for the text to move to the right the number of spaces specified in the Global / Code settings. However, the text does not move beyond the original indent setting of 2.

1 Like

Found it. If the Project | Code settings are still at the opinionated 2 spaces, that will take precedence.

1 Like

Thank you!
I find the fix an odd behavior itself, as it takes precedence over global settings, even when a new project is started. Regardless, thanks again!

1 Like

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