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.
How do you insert literal control characters in vi on Mac?
For example what is the Mac equivalent of
Windows ^Q^M (in vim)
to insert a \r into a substitution string?
It's the same like in Unix/Linux:
But, if you want to use the character in a substitution string, then you should write it like it is, \r, e.g.