如何在 Atom 中替换换行符? [英] How do I replace a newline in Atom?

查看:115
本文介绍了如何在 Atom 中替换换行符?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Atom 中,如果我在搜索和替换工具上激活正则表达式模式,它可以找到 换行符,但是当我尝试替换它们时,它们仍然存在.

In Atom, If I activate regex mode on the search-and-replace tool, it can find newlines as , but when I try to replace them, they're still there.

有没有办法在 Atom 中替换换行符?

Is there no way to replace a newline-spanning string in Atom?

推荐答案

看起来 Atom 将换行符匹配为 但在仅替换 时表现不一致一无所有.

Looks like Atom matches newlines as but behaves inconsistently when replacing just the with nothing.

所以换行符似乎匹配 s+ ,并且只有一半"的行尾匹配 .

So newlines seem to match s+ and , and only "half" of the line-ending matches .

  • 如果将 替换为字符串,行尾不会发生任何变化,但字符串会附加到下一行
  • 如果将 替换为字符串,则什么都不会发生,但是光标会前进.
  • If you replace with a string, nothing happens to the line-ending, but the string is appended to the next line
  • If you replace with a string, nothing happens at all, but the cursor advances.

这篇关于如何在 Atom 中替换换行符?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆