feat(comment): Add ignore_surrounding_blank_line#2242
feat(comment): Add ignore_surrounding_blank_line#2242jrwrigh wants to merge 1 commit intonvim-mini:mainfrom
Conversation
ba9d403 to
228fe1b
Compare
|
Thanks for the PR!
I don't quite understand the use case here. Does it imply that toggling a comment for a paragraph is done by The textobject for a paragraph without blank lines is Does this solve the original usability problem? |
|
My habit when commenting out a few blocks of code (often multiple paragraph textobjects) is to do So for example, if I have the following C code: if (input > 0) {
bool something_extra;
int64 = enum_value;
} else {
int64 = -1;
}
printf("int64: %ld, enum_value: %d, input: %d\n", int64, enum_value, input);Let my cursor be at the // if (input > 0) {
// bool something_extra;
//
// int64 = enum_value;
// } else {
// int64 = -1;
// }
//
printf("int64: %ld, enum_value: %d, input: %d\n", int64, enum_value, input); The extra line at the end is commented even though it's empty. Thus, I can't use I recognize the application is niche and mostly due to my own habits. I don't have any qualms with it not being upstreamed (though that would require me to rebase my changes if and when they're updated here). |
I did not know about that! That is quite handy, but doesn't fully address my issues with |
Yes, I am afraid this is not a strong case for adding a new option. At least for these reasons:
So yeah, I am afraid I am going to close this as not planned. Thanks for your time and efforts doing this, though! |
This adds a new feature and parameter to
mini.comment.The goal is that blank lines at the beginning or end of a range are ignored, allowing me to use paragraph text objects to highlight chunks of code to be (un)commented without having to add the extra
j/kto remove the blank line from the range.Originally did this to be a custom fork of
mini.comment, but figured I'd see if y'all were interested in it.