views:

27

answers:

2

Does anyone know of a text editor on linux that allows me to see line breaks and carriage returns? Does vim support this feature? Thanks.

+2  A: 

:set list in vim will show whitespace. End of lines show as '$' and carriage returns usually show as ^M.

jay.lee
Same question here: http://superuser.com/questions/97692/vim-show-line-feeds-carriage-return
mangledorf
@mangledorf good find
jay.lee
All good answers. Thanks
usertest
+1  A: 

VI shows newlines (LF character, code x0A) by showing the subsequent text on the next line.

Use the -b switch for binary mode. Eg vi -b filename or vim -b filename --

It will then show CR characters (x0D), which are not normally used in Unix style files, as the characters ^M.

Larry K