Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I stop Eclipse (EPIC Perl) from adding DOS CR/LF to my Perl scripts?

I use Eclipse on Windows to edit files on a remotely mounted Linux SMB share.

Coupled with Samba's stubborn opposition to on-the-fly mapping, Eclipse's insistence on CR/LF creates a real headache with Perl scripts.

Any workarounds?

like image 356
Alex R Avatar asked Dec 12 '09 04:12

Alex R


2 Answers

In Eclipse, the end-of-line sequence setting can be found under Window > Preferences > General > Workspace > "New text file line delimiter".

like image 142
mob Avatar answered Oct 06 '22 01:10

mob


I just stumbled upon an easy way of fixing these problems when you run into someone else's code that has them.

In Eclipse Kepler (and later), use the menu item File > Convert Line Delimiters To.

In previous versions of Eclipse, you have to user Source > Format. It'll reformat the code, which includes replacing CR/LFs with LFs.

like image 36
Eli Avatar answered Oct 06 '22 00:10

Eli