Closed somini closed 7 years ago
I'm reluctant to add anything language-specific to this plugin. Fold markers are a Vim thing and I'm not sure they naturally integrate with comments or should be coupled to comment syntax.
I can imagine that people might want other 'embedded' constructs to somehow influence what part of a comment is selected. For example the block tags section in a Javadoc comment (lines at the bottom of the doc comment starting with an @
block tag), or simply comment 'paragraphs' in general (blank commented line separates paragraphs).
In this particular case, I wonder if you might not be better served by a fold text object? viz
to select the fold contents under the cursor?
Yeah, that wasn't a good example. A better example would have other non-comments in the fold. I do have a fold text object. ☺ My use case is having several folds together, without newlines between them, with a multi-line header on top of each.
Re-reading my earlier comment I find myself still agreeing with it, closing.
How hard would be to add an option to stop the multiline comment detection on fold markers?
What I mean is this,
||
means the cursor location:This is technically a single multi-line comment, but logically (IMHO), if you run
vac
it should select only this:I understand this requirement shouldn't be the default, but there should be an option to toggle this behaviour. I can submit a PR for this, just need a pointer for where to start.