How can I disable auto changing line separator?
已回答
I'm using Intellij IDEA 2017.3.1 (Ultimate Edition) on mac. I have a text file in project with "mixed mode" of line separators (CRLF and LF) - it has both \n and \r\n. When I'm changing something in this file, IDEA changes \r\n to \n (if LF mode is enabled) and \n to \r\n (if CRLF is enabled).
How can I disable that in IDEA, not in git config etc? I can't change these separators and commit them. And I don't want to revert part of the differences each time when I'm committing.
How can I disable that in IDEA, not in git config etc? I can't change these separators and commit them. And I don't want to revert part of the differences each time when I'm committing.
请先登录再写评论。
Not possible now, unfortunately. Please vote and follow the https://youtrack.jetbrains.com/issue/IDEA-171699
Thank you
It's a nightmare... I have shell and batch scripts. Every time I change the shell scripts to use LF, either by File-Line separators or the bottom right control, eventually it always reverts back to CRLF completely randomly... literally, I changed it, everything worked fine, I went home and the next morning it was back to CRLF. Thus, it's official, IntelliJ cannot be used to do mixed mode programming.
Try to wrap your head around this one:
Yesterday before I left the office I made sure all my shell scripts were set to LF and they were. I went home for the day, came back this morning, and low and behold every single one had reset itself back to CRLF... EXCEPT for the one that happened to be selected (has focus) in the project explorer. Pretty massive issue for an IDE if you ask me.