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

3

17

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?

Neuro answered 12/12, 2009 at 4:36 Comment(2)
How slow is this compared with a local drive?Ultrasonic
@Thorbjørn, it's actually extremely fast.Neuro
S
33

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

Shamble answered 12/12, 2009 at 7:30 Comment(2)
Thank you. Got that one. I also happened to find another setting - (Team > CVS > Files and Folders > Convert text files to use platform line ending) that might have been the root cause of my particular problem.Neuro
Eclipse once again excels in it's infinite and unfathomable ways. A random walk through the UI of Eclipse must be very close to how it actually is to develop it. One can only mesmerized look at how it's become one of the most widely used IDEs with some awe. If there is such a thing as tirrany of the masses (and it's not communism), then this must be it.Daft
C
12

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.

Color answered 15/7, 2010 at 16:36 Comment(1)
by far the easiest solution if you use Eclipse.Decree
S
-1

Or maybe you just have to uncheck this flag :
Window/Preferences/General/Editors/Text Editors/Show whitespace characters

Shelbashelbi answered 8/10, 2015 at 8:44 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.