See line breaks and carriage returns in editor

后端 未结 8 2281
臣服心动
臣服心动 2020-12-04 05:33

Does anyone know of a text editor on Linux that allows me to see line breaks and carriage returns? Does Vim support this feature?

8条回答
  •  旧时难觅i
    2020-12-04 06:24

    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.

提交回复
热议问题