Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Automatic EOL conversion in Eclipse

Need to keep EOL format consistent in all resources under Eclipse workspace.

I know about Eclipse preference that sets new line style for newly created files, but I would like to have automatic conversion for already existing files. Is there some settings/plugins?

I want just setup once and be sure that all line endings are in the same format.

like image 650
Ilya Ivanov Avatar asked Feb 15 '11 12:02

Ilya Ivanov


1 Answers

In addition to the Window > Preferences > General > Workspace setting for new files that you already know about, there is a File > Convert Line Delimiters To option. I don't know of any existing plugin/tool that will do this automatically when you save, but you could certainly write one or make converting the line ending part of your process.

To make it easier on yourself, you can bind keyboard shortcuts to the conversion commands by going to Window > Preferences > General > Keys and filtering using "delimiter": binding a shortcut to EOL conversion

like image 150
Justin Garrick Avatar answered Oct 04 '22 11:10

Justin Garrick