66

I am using the Eclipse code editor to work on my remote files.
It appears that Eclipse is set to dos/Windows file format. I do not know how to find the file format set in Eclipse, but I want it to be set to Unix file format.

How can I set the file format to Unix in Eclipse?

Similar Question to set file format in VIM

Henke
  • 4,445
  • 3
  • 31
  • 44
Rachel
  • 100,387
  • 116
  • 269
  • 365

3 Answers3

112

I don't have Eclipse installed to check, but from some searching it looks like there are two things to do.

To change the default format for new files:

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

To convert the file that's open:

File -> Convert Line Delimiters To -> Unix

Chad Birch
  • 73,098
  • 23
  • 151
  • 149
  • I do not have option for New test file line delimiter for workspace option – Rachel Mar 03 '10 at 20:44
  • What version of eclipse? The documentation shows that option: http://help.eclipse.org/galileo/topic/org.eclipse.platform.doc.user/reference/ref-9.htm – Chad Birch Mar 03 '10 at 20:48
18

Take look of following image for changing format:

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

enter image description here

Sumit Singh
  • 15,743
  • 6
  • 59
  • 89
6

This can even be done more specific, just for a single project:

Change Project > Properties > Resource : New Tex File Delimiter

Amol M Kulkarni
  • 21,143
  • 34
  • 120
  • 164