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?

Alex R
  • 11,364
  • 15
  • 100
  • 180

3 Answers3

33

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

brian d foy
  • 129,424
  • 31
  • 207
  • 592
mob
  • 117,087
  • 18
  • 149
  • 283
  • 1
    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. – Alex R Dec 13 '09 at 14:48
  • 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. – Jonas Byström Jan 27 '14 at 08:38
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.

rob74
  • 4,939
  • 29
  • 31
Eli
  • 36,793
  • 40
  • 144
  • 207
-1

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