Author Topic: Option to show ^M when opening DOS line endings files  (Read 2119 times)

rowbearto

  • Senior Community Member
  • Posts: 2335
  • Hero Points: 132
Option to show ^M when opening DOS line endings files
« on: July 27, 2017, 07:04:04 PM »
Hi:

I'd like an option so that I can visually see if a file has DOS line endings. So if a text file has <cr><lf> at the end of each line, I'd like to be able to see the <cr> somehow (as ^M or <cr>). But if the file is "correct" and only has <lf> at the end of each line, don't show anything special.

I tried C/C++ Options->View->Special Characters and checked "Newline Characters", but it shows the same symbol for both <cr><lf> and just <lf>.

Is there a way to currently configure to show the <cr>, or can I request a new option to do that?

Would also be useful if there was a macro command for this, so I could quickly turn it on or off if I want to quickly see if CR/^M is there or not. Currently I use Ctrl-Shift-H to go to hex mode but that takes more brain power to look for the 0d0a then if I could look for ^Ms at the end of a line.

Thanks,
Rob
« Last Edit: July 27, 2017, 07:44:14 PM by rowbearto »

microcode

  • Community Member
  • Posts: 59
  • Hero Points: 10
Re: Option to show ^M when opening DOS line endings files
« Reply #1 on: August 25, 2017, 08:08:10 PM »
With v21 and later, you can accomplish what you want (if I understand correctly) with the Special Characters options, but it's not intuitive.  See the attached image showing how to configure it so something is displayed for CR, but nothing is displayed for LF.