我需要将一些模拟数据的行尾转换为 Unix 格式。我在 Win 7 上使用 Atom 编辑器。
在网上查看,我找到了一个 Atom 包来转换行尾,但该包表示它已被弃用,因为 Atom 现在将此作为标准功能。
我在 Atom 中找不到任何这样的标准功能——而且 Atom 的文档甚至不知道行尾转换是什么。
“关于 Atom”告诉我 Atom 是最新的 v.1.23.3
在我看来,这似乎是一个悖论。
(不,我不能只使用 Notepad++。)
我已经环顾了很多解决方案,但还没有找到一个真正有效的解决方案。
最佳答案
内置的 line-ending-selector 包支持这个用例:https://atom.io/packages/line-ending-selector
该包的文档描述了如何执行此操作:
You can click the line ending in the status-bar to open a modal with the line ending options. Selecting a different line ending will change each line of the file in the active editor.
如果您更喜欢使用键盘,您还可以打开命令面板(在 macOS 上为
cmd-shift-p
),输入 Convert 然后使用 Line Ending Selector: Convert to LF 和 Line Ending Selector: Convert to CRLF 命令。
关于atom-editor - Atom 编辑器 - 将行尾转换为 UNIX,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48630322/