Why is ^M
used to represent a carriage return in VIM and other contexts?
My guess is that M
is the 13th letter of the Latin alphabet and a carriage return is \x0D
or decimal 13
. Is this the reason? Is this representation documented anywhere?
I notice that Tab is represented by ^I
, which is the ninth letter of the Latin alphabet. Conversely, Tab is \x09
or decimal 9
, which supports my theory stated above. However, where might this be documented as fact?