Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EOL conversion in notepad ++

Tags:

notepad++

eol

For some reason, when I open files from a unix server on my windows machine, they occasionally have Macintosh EOL conversion, and when I edit/save them again they don't work properly on the unix server. I only use notepad ++ to edit files from this unix server, so is there a way to create a macro that automatically converts EOL to Unix format whenever I open a file?

like image 816
Jeff Avatar asked Apr 26 '13 15:04

Jeff


People also ask

How do I change the EOL of a file?

Just change "Search Mode" to "Extended", and you can work with EOL (\r\n in Windows or \n in Unix), tabs (\t), etc. You can also use the Find in Files tab of the dialog to do the replace across multiple files.

What is the end of line character in notepad?

This character is commonly known as the 'Line Feed' or 'Newline Character'. CR (character : \r, Unicode : U+000D, ASCII : 13, hex : 0x0d) : This is simply the 'r' character. This character is commonly known as 'Carriage Return'.


1 Answers

That functionality is already built into Notepad++. From the "Edit" menu, select "EOL Conversion" -> "UNIX/OSX Format".

screenshot of the option for even quicker finding (or different language versions)

You can also set the default EOL in notepad++ via "Settings" -> "Preferences" -> "New Document/Default Directory" then select "Unix/OSX" under the Format box.

like image 185
Nate Allen Avatar answered Sep 20 '22 09:09

Nate Allen