Reputation: 10139
I am using vi on Mac, and when I've run :set list
, a $
(dollar sign) character is displayed at the end of each line. My confusion is that $
is not the ASCII value for a newline. Why does $
represent the end of the line?
Upvotes: 0
Views: 632
Reputation: 212248
$
was chosen as the default value to display to represent the line, probably because $
is the command to move the cursor to the end of the line, which was probably chosen because $
represents an end of line anchor in a regular expression. There's nothing magical about it, and you can use any character you want by setting listchars
. :help listchars
for details.
Upvotes: 2