Using `ctrl-v` to type control characters
When in command-line mode in Vim, for example, when typing Ex commands, you can
use ctrl-v
to type control characters. Usually, if you type the control
character, Vim will execute it. For example, if you simply press enter, you’re
going to execute whatever you have typed so far in command-line mode. But
if you type ctrl-v
followed by enter, you will see a ^M
inserted and
Vim will treat it as if you typed the enter character instead.
Photo by the author