Is there a way to select a paragraph inside a comment?

Suppose that I have a long code comment with multiple paragraphs. They are connected by a “blank” line that only has the comment marker at the start.

# This is the first paragraph
# Lorem ipsum dolor sit amet
# 
# This is the second paragraph
# consectetur adipiscing elit

If I type <a-i>p, it selects the whole thing. Is there another command that selects only the paragraph under the cursor?

Hello, afaik, you would have to define a custom text object to do what you want, when you use or you can then press c to input a text object description that states where your custom object starts and where it ends, you’ll have to describe what you want with a regex, that would make the solution to your problem more reusable in the future, you could also define a user command but I think the text object approach would be better.