CJ Dennis
CJ Dennis

Reputation: 4336

Stop PhpStorm from changing line endings from LF to CRLF on file open

PhpStorm is opening some files saved with LF as CRLF. I've got Editor > Code Style > Line separator: Unix and maxOS (\n) and I've now turned on Editor > Inspections > General > Inconsistent line separators so at least PhpStorm warns me as soon as it opens the file. But I can't find the setting that is automatically converting my line endings in the first place. I can tell it's PhpStorm doing this because Git shows no changes until the instant I open a file in PhpStorm.

In case you're wondering about my Git settings, I've got core.autocrlf=false in both my global and repository Git config, so it's not to do with Git.

How do I stop PhpStorm from automatically converting my line endings?

Upvotes: 3

Views: 5486

Answers (1)

Juanma
Juanma

Reputation: 676

I accomplished this behaviour on PhpStorm 2023.1.6 with this configuration:

PhpStorm on save configuration

Source.

Upvotes: 0

Related Questions