user53670
user53670

Reputation:

How to config EOL in Eclipse

I'm using eclipse in Windows. However, other people in my group mostly write code in linux. This cause a conflict of EOL. How can I change the EOL from \r\n to \n?

Upvotes: 18

Views: 9755

Answers (3)

no.good.at.coding
no.good.at.coding

Reputation: 20371

  1. To do this for all projects in your workspace, from the menu bar

    Window > Preferences > General > Workspace > New text file line delimiter
    

    Setting the EOL explicitly for the complete workspace

  2. To do it on a per-project basis, go to your project's Properties and select Resource from the sidebar to get the same option of New text file line delimiter

Upvotes: 22

user670804
user670804

Reputation:

You have to select your project (click on it) then go to "File > Convert Line Delimiter To" and choose Windows / Unix / MacOS 9.

This works with Eclipse 3.6.

Cheers,

Upvotes: 5

James.Xu
James.Xu

Reputation: 8295

right click on your project folder, choose "Properties", in the popup dialog, click on "Resource", you will see the section: "New text file line delimiter", tick "Other", then you can choose: Windows, Linux, Mac OS

Upvotes: 2

Related Questions