javascript - How to replace CRLF with LF in the editor under windows?
黄舟
黄舟 2017-06-29 10:09:46
0
2
1160

I have recently been using the code format verification tool: eslint, which has introduced a certain verification standard.

But every time I verify, the verification tool will prompt me that I am using CRLF and want me to replace it with LF.

I would like to ask everyone, how should this be replaced? Is it okay to use regular expressions?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
phpcn_u1582

vscode has this function

小葫芦

Replace with a regular expression, replace rn with n. Among them, r refers to CR, and n refers to LF.

But generally speaking, most IDEs and editors have the option to directly switch the newline end character, such as the SublimeText I use:

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template