Home » Questions » Computers [ Ask a new question ]

How to distinguish between \r\n and \n in VIM

How to distinguish between \r\n and \n in VIM

In VIM I can show all the hidden characters in a file via the command ":set invlist". However, end of line sequences are always displayed as $ whether it is a carriage return/line feed or just a line feed. How do I distinguish between the two types of line endings?

Asked by: Guest | Views: 247
Total answers/comments: 1
bert [Entry]

"refer to VIM change end-of-line format.

If you set the file to unix mode then the carriage return shows up as ^M and the linefeed displays as the end-of-line character."