In the question Search for selection in vim, the trick to search for visual selection is to yank the selected text and paste it after the search command /
. But This doesn't seem to work in my special case.
In my case, there are linebreak and spaces in the selected text, like so:
something\\
\end{align*}
Yanking and pasting the part from \\
to the end of next line (which is }
) produced
\\^M \end{align*}
But no match was found by searching for this line.
I also tried escaping
\\\\^M \\end{align*}
but still no match was found.
Any help? Thanks.