191

I notice that when I load a text file, Notepad++ will recognize and use whatever the newline character in that file is, \n or \r\n.

Is there some option where I can select which to use in a new document? (I've looked in help and googled, but can't find anything.)

Rudie
  • 49,688
  • 40
  • 128
  • 172
Luigi Plinge
  • 49,776
  • 19
  • 109
  • 178

4 Answers4

324

For a new document: Settings -> Preferences -> New Document/Default Directory -> New Document -> Format -> Windows/Mac/Unix

And for an already-open document: Edit -> EOL Conversion

Vlad
  • 17,655
  • 4
  • 40
  • 70
  • 3
    But note: in the the current version this only works when you create a new file with NP++. If you create an empty file it still seems to default to \r\n (when it finds no EOL characters to go by), and use that instead. – Jonathon Apr 17 '13 at 03:20
  • 2
    In version 7.7.1 this seems to default to the proper new document preferences. – Enthus3d Sep 19 '19 at 15:22
84

"Edit -> EOL Conversion". You can convert to Windows/Linux/Mac EOL there. The current format is displayed in the status bar.

Yada
  • 28,965
  • 22
  • 100
  • 142
2

on windows 10, Notepad 7.8.5, i found this solution to convert from CRLF to LF.
Edit > Format end of line
and choose either Windows(CR+LF) or Unix(LF)

velocity
  • 1,400
  • 17
  • 22
-1

Notepad++ - change the EOL format

Just double click on that EOL format in status bar and select Unix(LF). It's not possible to default save it in this (LF) format. Just option for new document mentioned earlier...