In vim, there is a way to yank between two quotations by using yi'
. And there is a way to yank between two square brackets by using yi]
.
I want to do this between two ##
:
some_text
## Point #1 --> Copy this
some_code --> Copy this (cursor here)
some_code2 --> Copy this
## Point #2
Also, I would like it to work even if there is no ##
at the end of the file left
## Point 1
some_code
## Point 2
some_code
## Point 3 --> Copy this
some_code --> Copy this
some_code2 --> Copy this (Cursor here)
some_code3 --> Copy this
--> EOF here