rstudio / rstudio

RStudio is an integrated development environment (IDE) for R
https://posit.co/products/open-source/rstudio/
Other
4.67k stars 1.09k forks source link

"Insert Section" should have auto-indent #10123

Closed brb-arraytools closed 2 years ago

brb-arraytools commented 2 years ago

I would suggest "Insert Section" in the RStudio menu should have auto-indent for the added section line.

Now it always starts from the beginning of the line. If I use the "Reindent Lines" command, the line will be indented.

ronblum commented 2 years ago

@brb-arraytools Thank you for raising this! However, I'm not sure why you would expect sections to be indented. Using a few online sources, it appears that sections are not expected to be indented:

Also, can you please provide a couple of things: 1) Sample code ton which you're using "Reindent Lines"—I don't get the indentation for sections, so I'd like to try to reproduce this. 2) The environment you're working with: RStudio Edition : RStudio Version : OS Version : R Version :

brb-arraytools commented 2 years ago

Hi Ron,

I see. I don't mind that the sections do not indent. The problem is that after I use "Reindent lines", they will indent. It seems to be a bug.

  1. Sample code ton which you're using "Reindent Lines"—I don't get the indentation for sections, so I'd like to try to reproduce this.

I attached one of my code files. All my code files are the same: sections indent after applying the command "Reindent lines". I use the Dracula theme in RStudio. Will that affect the performance?

  1. The environment you're working with: RStudio Edition :
  2. RStudio Version :
  3. RStudio 2021.09.0+351 "Ghost Orchid" Release (077589bcad3467ae79f318afe8641a1899a51606, 2021-09-20) for Windows Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/5.12.8 Chrome/69.0.3497.128 Safari/537.36 OS Version : Windows 10 R Version : 4.1.2

Thank you, Qian


From: Ron Blum @.> Sent: Tuesday, November 23, 2021 9:52 AM To: rstudio/rstudio @.> Cc: Xie, Qian @.>; Mention @.> Subject: Re: [rstudio/rstudio] "Insert Section" should have auto-indent (Issue #10123)

[External: Use caution with links & attachments]

@brb-arraytoolshttps://urldefense.us/v3/__https://github.com/brb-arraytools__;!!JRQnnSFuzw7wjAKq6ti6!iUOeqCpJhr54GJowfxX_NjE3cmjC9aLs7U0TQq42Cc7ukSkOtFd1V666ONBePA$ Thank you for raising this! However, I'm not sure why you would expect sections to be indented. Using a few online sources, it appears that sections are not expected to be indented:

Also, can you please provide a couple of things:

  1. Sample code ton which you're using "Reindent Lines"—I don't get the indentation for sections, so I'd like to try to reproduce this.
  2. The environment you're working with: RStudio Edition : RStudio Version : OS Version : R Version :

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.us/v3/__https://github.com/rstudio/rstudio/issues/10123*issuecomment-976662830__;Iw!!JRQnnSFuzw7wjAKq6ti6!iUOeqCpJhr54GJowfxX_NjE3cmjC9aLs7U0TQq42Cc7ukSkOtFd1V65wahvrmg$, or unsubscribehttps://urldefense.us/v3/__https://github.com/notifications/unsubscribe-auth/AP4OY5PB7J7NCBAAS4EAKPLUNOTCXANCNFSM5IPKUAVA__;!!JRQnnSFuzw7wjAKq6ti6!iUOeqCpJhr54GJowfxX_NjE3cmjC9aLs7U0TQq42Cc7ukSkOtFd1V65WZk_hcA$. Triage notifications on the go with GitHub Mobile for iOShttps://urldefense.us/v3/__https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675__;!!JRQnnSFuzw7wjAKq6ti6!iUOeqCpJhr54GJowfxX_NjE3cmjC9aLs7U0TQq42Cc7ukSkOtFd1V66IoltHUQ$ or Androidhttps://urldefense.us/v3/__https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign*3Dnotification-email*26utm_medium*3Demail*26utm_source*3Dgithub__;JSUlJSU!!JRQnnSFuzw7wjAKq6ti6!iUOeqCpJhr54GJowfxX_NjE3cmjC9aLs7U0TQq42Cc7ukSkOtFd1V66lrfLG6Q$.

github-actions[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs, per https://github.com/rstudio/rstudio/wiki/Issue-Grooming. Thank you for your contributions.

github-actions[bot] commented 2 years ago

This issue has been automatically closed due to inactivity.