第一步:File->Settings

第二步:Editor->Code Style
可以看到,默认是System-Dependent,这个其实还是很牛叉的,根据系统自动配置,但是你是windows系统,默认是CRLF,服务器是Linux,你就得自己换了。

创建文件时,就能看到默认是LF了 。
这时只是新建文件时是LF,如果当前已经有项目,那项目的设置还是CRLF,还需要修改当前项目。
选中当前项目,然后File->Line Separators->LF

第一步:File->Settings
第二步:Editor->Code Style
可以看到,默认是System-Dependent,这个其实还是很牛叉的,根据系统自动配置,但是你是windows系统,默认是CRLF,服务器是Linux,你就得自己换了。
创建文件时,就能看到默认是LF了 。
这时只是新建文件时是LF,如果当前已经有项目,那项目的设置还是CRLF,还需要修改当前项目。
选中当前项目,然后File->Line Separators->LF
本文标题:IntelliJ Idea设置默认换行符
本文链接:https://www.haomeiwen.com/subject/jbrecctx.html
网友评论