Skip to content

change comment behavior to be more consistent other commands #2014

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

Open
fidgetingbits opened this issue Nov 10, 2023 · 1 comment
Open

change comment behavior to be more consistent other commands #2014

fidgetingbits opened this issue Nov 10, 2023 · 1 comment

Comments

@fidgetingbits
Copy link
Collaborator

Currently if you use the change comment command it will replace the entire comment including the prefix, so for example # foo in python becomes ``. This is more consistent with what should be expected of chuck, whereas `change` should leave the `# ` (although I suppose keeping the space after the comment delimiter is debatable).

I also think it's worth adding inside comment support such that given some comments like:

# A: foo
# B: bar

You could issue a command bring fin inside comment bat and you would end up with:

# A: foo
# foo

The above already works for other target scopes like inside class.

@pokey
Copy link
Member

pokey commented Nov 10, 2023

One problem with "change comment" excluding the # is that it will break "bring comment", because both use the content range of the target. I wonder if this is an argument for enabling those to diverge 🤔. See discussion in #1923

Easiest is to support "inside comment"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants