微软发布了用Rust编写的经典MS-DOS编辑器Linux版本
Microsoft Edit

原始链接: https://github.com/microsoft/edit

“Edit”是一款简洁、现代的文本编辑器,其灵感源自经典的MS-DOS编辑器,提供类似VS Code的用户友好界面,即使是不熟悉终端的用户也能轻松上手。 已提供可下载的二进制文件,并可通过WinGet安装 (winget install Microsoft.Edit)。 若要从源代码构建,需要Rust和nightly工具链 (rustup install nightly)。 包维护者应将可执行文件命名为“edit”(规范名称)或“msedit”(备选名称),避免使用“ms-edit”。 建议创建一个“edit”别名。 该项目可以选择使用ICU库进行搜索/替换。 编译时环境变量 (EDIT_CFG_ICUUC_SONAME, EDIT_CFGI18N_SONAME, EDIT_CFG_ICU_CPP_EXPORTS, EDIT_CFG_ICU_RENAMING_VERSION, EDIT_CFG_ICU_RENAMING_AUTO_DETECT) 允许自定义ICU库链接和符号解析,以防默认设置不正确。 可以使用 `cargo test --ignored` 测试ICU设置。

微软发布了一个基于Rust的经典MS-DOS编辑器在Linux上的重新实现版本。Hacker News上的公告引发了对其目标用户的讨论。虽然该项目的目标是为终端新手提供一个易于使用的编辑器,但一些评论者对这是否是主要动机表示怀疑。一位用户表达了用它替换Vim的兴趣,特别是如果添加了LSP和ripgrep支持的话,他更喜欢它而不是Helix,因为它有TUI界面。其他用户则质疑不熟悉终端的用户和技术能力足以发现该项目的用户之间是否存在重叠。尽管对其用途存在争议,但该项目似乎已经引起了部分寻求新的文本编辑器选项的Linux用户的兴趣。
相关文章

原文

A simple editor for simple needs.

This editor pays homage to the classic MS-DOS Editor, but with a modern interface and input controls similar to VS Code. The goal is to provide an accessible editor that even users largely unfamiliar with terminals can easily use.

Screenshot of Edit with the About dialog in the foreground

Packaging status

You can also download binaries from our Releases page.

You can install the latest version with WinGet:

winget install Microsoft.Edit
  • Install Rust
  • Install the nightly toolchain: rustup install nightly
    • Alternatively, set the environment variable RUSTC_BOOTSTRAP=1
  • Clone the repository
  • For a release build, run: cargo build --config .cargo/release.toml --release

Notes to Package Maintainers

The canonical executable name is "edit" and the alternative name is "msedit". We're aware of the potential conflict of "edit" with existing commands and recommend alternatively naming packages and executables "msedit". Names such as "ms-edit" should be avoided. Assigning an "edit" alias is recommended, if possible.

ICU library name (SONAME)

This project optionally depends on the ICU library for its Search and Replace functionality. By default, the project will look for a SONAME without version suffix:

  • Windows: icuuc.dll
  • macOS: libicuuc.dylib
  • UNIX, and other OS: libicuuc.so

If your installation uses a different SONAME, please set the following environment variable at build time:

  • EDIT_CFG_ICUUC_SONAME: For instance, libicuuc.so.76.
  • EDIT_CFG_ICUI18N_SONAME: For instance, libicui18n.so.76.

Additionally, this project assumes that the ICU exports are exported without _ prefix and without version suffix, such as u_errorName. If your installation uses versioned exports, please set:

  • EDIT_CFG_ICU_CPP_EXPORTS: If set to true, it'll look for C++ symbols such as _u_errorName. Enabled by default on macOS.
  • EDIT_CFG_ICU_RENAMING_VERSION: If set to a version number, such as 76, it'll look for symbols such as u_errorName_76.

Finally, you can set the following environment variables:

  • EDIT_CFG_ICU_RENAMING_AUTO_DETECT: If set to true, the executable will try to detect the EDIT_CFG_ICU_RENAMING_VERSION value at runtime. The way it does this is not officially supported by ICU and as such is not recommended to be relied upon. Enabled by default on UNIX (excluding macOS) if no other options are set.

To test your settings, run cargo test again but with the --ignored flag. For instance:

联系我们 contact @ memedata.com