Is it even possible?
What I mean is, many vim commands can take a movement to operate on, can I define a custom movement so that I can tailor my edits to an environment?
The specific command I'm interested in is
gq, to re-format. I can type
gqip to re-format a paragraph,
ip being the movement from the beginning to the end of the current paragraph excluding surrounding whitespace.
Is it possible to define a custom movement to replace
ip to allow me to, say, re-format comments without touching surrounding code? This would require a movement similar to
ip but with different conditions for where it starts or ends.