Editor Line Breaks

I'm using IntelliJ on Windows, and it uses Windows line breaks (CRLF)

I can't find an option to force the line breaks to be Unix style breaks.

The coding style at my company suggests using Unix style line breaks everywhere.

Is this possible?

5 comments
Comment actions Permalink

Project Settings / Code Style / General. There is an option "Line Separator (for new files)" but its name kind of suggests that it will not replace line separators in existing files.

0
Comment actions Permalink

I'm not sure there is a setting, but you can write a trivial plugin that
sets the "line.separator" system property on startup to "\n".


sw> I'm using IntelliJ on Windows, and it uses Windows line breaks
sw> (CRLF)
sw>
sw> I can't find an option to force the line breaks to be Unix style
sw> breaks.
sw>
sw> The coding style at my company suggests using Unix style line breaks
sw> everywhere.
sw>
sw> Is this possible?


0
Comment actions Permalink

are you using idea9? there is no such option in my version of idea8

0
Comment actions Permalink

It's there in my 8.1.3 Settings.

Enter "Line Separator" into the search filter in the upper-left-hand corner of the Settings dialog to narrow down the list then click "General" under "Code Style" and look for the highlighted control (center bottom, right above the "Right margin" control).


Randall Schulz

0
Comment actions Permalink

Hi.

Please, don't mix up Project Settings with Project Structure dialogs. In IDEA 9 the option is really in Project Settings / Code style / General.

Alexander.

0

Please sign in to leave a comment.