Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Viewing \n and \r characters in Vim?

Is there a way to make \n or \r characters visible in vim? (I want to be able to see if the csv file I am looking at uses just \n or \r and \n at the end of lines.

like image 948
leeand00 Avatar asked May 15 '12 14:05

leeand00


1 Answers

:setl fileformat?

dos means CR-LF (consistently; if only some lines contain both, it'll be listed as unix, and you'll see ^M characters at the end of those lines), unix means LF; mac means only CR newlines.

like image 175
Ingo Karkat Avatar answered Oct 16 '22 16:10

Ingo Karkat