Recently when I edit my Wordpress files, after saving, I get this annoying ^M with every line break. I was told that this is a Windows issue, which is kind of confusing cause i am using a MAC. For editing I use PHPStorm with UTF-8 setup. Additional I don't know much or nothing about encoding. Anybody can help?

有帮助吗?

解决方案

For brand new files (created in IDE) you can change default line ending in Preferences | Code Style | General | Line Separator.

For existing files -- it is automatically detected for each file individually. You can change line ending at any time by changing File | Line Separators (or via right click in status bar in appropriate place -- where current line ending is displayed).

其他提示

if you can use a Vi editor.. open your file using vi ...

vi example.java

then press esc and type :

then type beside the colon %s/ctrl+v ctrl+M/

press enter/return

then press esc and :

now type wq

It would save the edits and ^M would be gone ..,,

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top