PhpStorm saving with Linux line ending on Windows

别说谁变了你拦得住时间么 提交于 2019-11-28 10:42:27

You can safely use \n line ending for .php and most of other files as well -- PHP on Windows will read such files just fine.


To set default line ending for all new files: go to Settings/Preferences | Editor | Code Style and change Line separator (for new files) option to the desired style (e.g. Unix and OS X (\n)).


To change line ending for a particular existing file: open the file and either change it via appropriate section in Status Bar .. or via File | Line Separators


P.S.

If you do have EditorConfig plugin installed and enabled ... you might also configure this via .editorconfig file -- there you may specify what line ending to use (this can be done on per file extension level .. so it's more flexible than PhpStorm's own setting).

This will also work in another editor/IDE that supports such file.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!