-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
runSelection submits proceeding comments #1244
Comments
My gut feeling is
So would propose do post processing to remove header comments as well |
In a previous issue or PR (I forget which one), I find it useful to keep comments in the terminals so that when I scroll the terminal I could also read the comment to know about the code just like in the source code. But if the comment block has too many lines, it might be a bit annoying. Maybe we could let user to opt-out removing leading comments if they find it annoying? |
Makes sense will add an argument flag to enable/disable the feature. Any preferences on default? Personally I would argue that we should mirror rstudio which would be to have this enabled by default. Likewise any thoughts on wether this should be for |
The default behavior of RStudio is keeping the leading comments. I suggest we keep it as default too. User could opt-out the behavior by a setting. I think |
Agreed, I will rework so that it only applies to The Rstudio implementation seems to be space dependent i.e.
Would include the comments whilst:
Would not include the comments.... I don't think we should replicate this exactly, though it confuses me as to what our default should be. |
* Remove leading comments from terminal submission (#1244) * converted in -> of to appease lintr * updates to appease lintr * added unit test for double comment line * Add r.removeLeadingComments to settings --------- Co-authored-by: Kun Ren <renkun@outlook.com>
Closing. |
Am wanting to re-open #438 as I was hoping to work on developing a PR for it.
As far as I can see it there are 2 options to solve this
(1) Add a pre-processor that strips comments from the selected range
(2) Adjust
expandSelection
to not cover these lines(1) is easier to implement but am thinking (2) is probably the more "proper" way of handling this. @renkun-ken any preference as to how to handle this ?
The text was updated successfully, but these errors were encountered: