Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
I tried let @q = '<return>' and it obviously won't work
let @q = '<return>'
<return> is not completely wrong. You just need to use double-quote and add backslash. For example:
:let @q = "ihello\<Return>vim\<Esc>"
Required, but never shown