Customizing Notepad++ New Document Line Encoding: CR/LF/CR LF


Notepad++ text editor works only on Windows (sadly!) and thus the default line encoding for the files you create using Notepad++ is Windows - CR LF.

This could be problematic for developers or DevOps who are working on a file that needs to be deployed on Unix/Linux or Mac devices.

Tip: You can quickly tell what the file/tab line encoding is by looking at the status bar at the far right.

Notepad++ know file or line encoding

How to change the default line encoding for new documents/tabs in Notepad++?

  • Go to Settings -> Preferences...
    Notepad++ Settings - Preferences Menu Option
  • Now select New Documents from the side bar.
  • Under Format (Line ending), you will see by default "Windows (CR LF)" is selected, choose among,
    1. Unix (LF)
    2. Macintosh (CR)
    Notepad++ new documents format - line ending
  • Click close.

Now when you will open any new tab or a new document, it will have a default line encoding that you just selected.

-


Have Questions? Post them here!


Top Hashtags: