edit

microsoftMIT活跃维护

微软用 Rust 写的终端文本编辑器,主打轻量、现代,在命令行里就能完成日常文本编辑。

We all edit.

v2.0.0发布于 2026-04-28 16:03 UTC14,769star +7 / 7 天737fork同步于 2026-11-10 05:27 UTC

怎么上手

从 README 代码块原样提取,可能是其中一种安装方式
winget install Microsoft.Edit
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/microsoft/edit/main/assets/install.sh | sh
curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/microsoft/edit/main/assets/install.sh | sh -s -- --dev --system
硬件要求

README 没有说明硬件要求。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

这个项目的说明还在生成中,先参考下面「最近发版」和 README。

这个条目还没有人工点评。如果它对你很有用,欢迎到 提交仓库 页写下你的使用经验。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    最近发版

    5 个版本v2.0.0
    1. v2.0.02.0.0 - A compiler for syntax highlighting!最新正式版2026-04-28 · 2026-04-28 16:03 UTC

      ⚠️ If you're a package maintainer, please read the last section at the end.

      Syntax Highlighting

      Edit v2 adds the Lightweight Syntax Highlighter. It has a ~40kB footprint for a dozen languages plus runtime, barely grows with each language added, and runs at >100MB/s.

      The highlighter is based on a simple programming language that combines regular expressions with explicit control flow. It's designed such that the runtime can be easily ported to other languages, including JavaScript.

      Screenshot of Microsoft Edit with Syntax Highlighting

      The list of languages will surely grow over time, and contributions for widely used languages are very welcome. If you're an experienced compiler developer, we'd greatly appreciate any advice and contributions to the LSH compiler. If you're interested in ports of the runtime, please let us know!

      See you in v3, with the introduction of a tiny CSS parser for UI theming.

      Changes

      • Syntax highlighting (#753, #776, #777, #624, #795)The whole LSH stack: compiler, runtime, integration, and initial language definitions. See above.For path matching, we've written our own glob matcher (#743).
      • Preliminary support for settings.json (#742, #779)For now, this is limited to files.associations, which lets you map file paths and extensions to languages for syntax highlighting. I expect v3 to be centered around configurability.
      • Find & Replace now supports capture groups (#222) (thanks @viyic!)You can use $1, $2, etc. in the replacement string when regex mode is on.
      • You can move lines with Alt+Up/Down (#230) (thanks @juemrami!)
      • Tab and Shift+Tab indent and unindent multiple lines at once (#245) (thanks @liltrendi!)
      • Whitespace inside selections is now visible (#397) (thanks @pheonick!)
      • Pressing Ctrl+L selects the entire current line (#541) (thanks @recently-avoid-dyin!)
      • Opening a directory via the CLI drops you into the file picker (#577) (thanks @four-poetic-drew!)
      • Unsaved work is indicated with a ● in the terminal title (#523) (thanks @adamjoer!)
      • The file picker now uses natural sort for filenames (#763)file2.txt sorts before file10.txt, as it should.

      Bug Fixes

      • Invalid CLI arguments are properly rejected instead of silently ignored (#503) (thanks @spinualexandru!)
      • Fixed random Unicode text input corruption on *nix (#520) (thanks @manitofigh!)
      • Fixed a file truncation issue when writing Unicode files (#548)
      • Fixed undo grouping when backspacing (#590)
      • Fixed the alpha blending formula for colors (#594)We were using srgb_to_linear on premultiplied colors, which is no bueno.
      • Scrolling and clicking have gone through a divorce (#603, #812, #819)No more phantom selections when you just wanted to scroll.
      • Fixed UI colors with Terminal.app's new "Clear Dark" theme (#728)
      • Fixed multiple issues found under Linux (#706)UTF-8 parsing for SGR mouse coordinates, sighandler_t warnings, GDB pretty printing.
      • Single-line files will now properly save as CRLF on Windows (#739) (thanks @UnnaturalTwilight!)
      • Fixed horizontal scrolling on macOS touchpads (#794) (thanks @barkure!)
      • You can now replace zero-width regex matches (e.g. $) (#815) (thanks @MihneaTeodorStoica!)
      • Accidentally pasting multiple lines into a single-line input field will not break the UI anymore (#818)
      • Fixed a crash when sorting directories on Linux without ICU being available (#823)

      Smaller Changes

      • SIMD support for LoongArch (#539, #535, #551, #547, #602, #554) (thanks @heiher!)
      • We'll now automatically create parent directories on save (#738) (thanks @stescobedo92!)
      • Printing --help or --version no longer requires a TTY (#556, #810)
      • Fixed Ctrl modifier handling during mouse input (#604)
      • On Windows, SetConsoleMode failures now show a useful error
    2. v1.2.11.2.12025-10-15 · 2025-10-15 14:26 UTC
      查看更新说明

      This release contains the final binaries that ship with Windows 11 25H2. Linux distributions do not need to update to v1.2.1.

      Changes

      • Added an executable icon for Windows (#475, #478)
    3. v1.2.01.2.02025-06-11 · 2025-06-11 21:46 UTC
      查看更新说明

      As Steve Ballmer famously said: Fixes! Fixes! Fixes! We do one better and also have new features. I expect the rate of releases to rise quadratically from now on. 1.1e19.0 should be out in a few weeks.

      To Linux package maintainers: We now added an official recommendation for package names to our README.

      Changes

      • The Open/Save file dialog now features filename autocompletion (#185, #464) (thanks @haoruilee)
      • The encoding picker is now 100% less confusing and has a fuzzy search field (#255) (thanks @b6k)If you couldn't find Shift-JIS before, because we called it "ibm-943_P15A-2003", rest easy: It's now called "Shift_JIS" as you'd expect.
      • Control characters are now shown in yellow (#378)This will make it a lot easier to spot them at a glance!
      • You can now duplicate lines by simply pressing Ctrl+C, Ctrl+V (#405)
      • We'll now detect if your terminal treats "ambiguous" characters as "wide" (#406)This may be a welcome change for those of you who use CJK characters on Linux. It also fixes issues with the older Windows Console when you use fonts such as "MS Gothic".
      • Seeking across lines is now up to hundreds of times faster (#408)If you had issues browsing 1GB+ files before: Now you don't. On my CPU it runs at up to 160GB/s!

      Bug Fixes

      • Fixed a virtual memory leak on Windows (#404)
      • Fixed a bug preventing you from selecting tabs (#412)
      • We're experimenting with fixes for those of you who see random input or hangs when you launch Edit (#416, #424)
      • The line number margin now gets properly updated at all times (#436) (thanks @Link1J)
      • Find & Replace now works with empty replacements (#457) (thanks @Shivix)
      • We fixed another freeze when using Find & Replace (#459)

      Smaller Changes

      • Pressing F3 will now jump to the next search result (#453) (thanks @keircn)
      • Alt+Up in the Open/Save file dialog will now navigate upwards (#458)

      Smaller Bug Fixes

      • If you're using an older terminal which doesn't support color reporting, Edit should now look a bit prettier (#417)
      • Documents are now closed after you were prompted for saving them (#429) (thanks @Ride-A-Pig)
      • The View menu is now properly hidden, when there aren't any files open (#447) (thanks @Shivix)
      • We fixed an issue preventing you from selecting ".." twice in a row in the Open/Save file dialog (#454)
      • Overlapping modals will now clear underlines under them (#460)

      Improvements to our use of Rust

      • We also remove a redundant heap allocation in DisplayablePathBuf::from_string (#336) (thanks @rhysd)
      • We removed our dependency on the os_string_truncate feature (#421) (thanks @matthew-e-brown)
      • scratch_arena had some UB and was fixed (#455) (thanks @comex)

      Localization, Internationalization, Documentation

      • Ellipses in localizations are now more consistently applied (#282) (thanks @ivanovkirilg)
      • The "Go to Line" dialog now uses : instead of / to clarify that you have to type "line:column" (#354) (thanks @sharshi)
      • We improved the grammar for LargeClipboardWarning in German (#384) (thanks @keks137)
      • readme and categories fields were added to Cargo.toml (#415) (thanks @sorairolake)
      • A rudimentary .desktop file was added (#420) (thanks @MingcongBai)
      • Fixed formatting of Vec<T> in our docs (#435) (thanks @sakuram)
      • The "Document Picker" was renamed to "Go to File" to make it easier to find (#456)

      Miscellaneous

      • We add a CI check for PRs now, which should prevent future "oopsies" (#360, #365)
      • We added a LineCache struct in advance of adding syntax highlighting in the future (#352) (thanks @L1quidH2O)
      • Benchmarks were added to make it easier to spot any future regressions (#403)
      • If you prefer CodeLLDB, the project now has a launch option for it (#444) (thanks @Nikitf777)
    4. v1.1.01.1.02025-05-28 · 2025-05-28 22:02 UTC
      查看更新说明

      Welcome to our first servicing release! Thanks to your contributions, this release contains a large amount of bug fixes and welcome additions. Let us know if you like it in the linked discussion.

      If you're using Linux, we would greatly appreciate if you could help us find a name for our editor! You can read more about it and vote here.

      Changes

      • We added a "Go to Line/Column" dialog and bound it to CtrlG (#133, #265, #267) (thanks @diabloproject, @Ride-A-Pig!)
      • You can now open multiple files at once by passing all of them as arguments to edit (#143) (thanks @koitococo!)
      • Pressing F10 will now focus the menubar (#198)
      • Pressing Home will now toggle between line start and indentation (#199) (thanks @achaljhawar!)
      • Buttons that have hotkeys assigned to them, now have a fancy underline to show which button it is (#276) (thanks @deadalusai!)
      • Edit will now insert a final newline if needed (#300)Note that creating new files on Windows will default to not inserting a final newline.

      Bug Fixes

      • Edit should now correctly pick up your user language (#85, #104, #256) (thanks @hikilaka, @eatradish!)Currently supported languages are: English, German, Spanish, French, Italian, Japanese, Korean, Brazilian Portuguese, Russian, Chinese Simplified, Chinese Traditional
      • We fixed some incorrect boolean logic in our fuzzy searcher (#134) (thanks @matklad!)
      • Pressing Shift + Tab in an empty line will not crash Edit anymore (#137) (thanks @marcos-venicius!)
      • Pressing Alt followed by a non-English keyboard key will not crash Edit anymore (#244)Unfortunately, it will also not do anything. This requires support for the "Kitty Keyboard Protocol" which is not yet implemented in either Edit nor Windows Terminal.
      • Fixed a whole assortment of bugs and issues around Search & Replace (#258, #274, #299, #327)
      • The file picker will now properly warn before overwriting an existing file (#277) (thanks @Ride-A-Pig!)

      Smaller Changes

      • We added the following menu items:
        • Select All (#212) (thanks @ankddev!)
        • Document Picker (#224) (thanks @b6k-dev!)
      • You can now select "UTF-8 BOM" in the encoding picker (#225) (thanks @b6k-dev!)
      • When you have an unmodified and untitled document, opening a new file will replace the untitled document (#257)
      • Tab and Arrow keys should now behave more predictable overall (#272)
      • On Windows, the file picker now shows a drive selector if you navigate all the way up (#290)
      • We now use much nicer checkbox characters (#321) (thanks @aspizu!)
      • When you press and hold Ctrl+W it won't accidentally exit the application anymore (#326)

      Smaller Bug Fixes

      • Our SVG application icon is now 100% more valid XML (#106) (thanks @MingcongBai!)
      • The accelerator key for the "Replace" menu item will now work properly (#126) (thanks @dan-jac!)
      • Our unit tests now use the correct page size on aarch64-apple-darwin (#167) (thanks @youknowone!)
      • We fixed a bug where typing S and N was sometimes not possible in the file picker (#298)
      • Doc tests intermittently didn't build, but this issue was swiftly fixed (#310) (thanks @rhysd!)
      • Scrolling inside very large documents (>1GB) will not randomly jump around anymore (#315) (thanks @L1quidH2O!)

      Platform Support

      • Added support for building on macOS and other BSDs (#72) (thanks @factormystic!)
      • Added winget instructions (#105) (thanks @licon4812!)
      • Added support for non-x86/AArch64 architectures (#161)
      • On Windows, UNC (network) paths can now be opened properly (#193)
      • We now use Alt for word-wise navigation on macOS (#207) (thanks @diabloproject!)

      Improvements to our use of Rust

      • We made some smaller improvements to our Cargo.toml (#43, #121) (thanks @HotCakeX, @bee-san!)
      • A rust-toolchain.toml was added, ensuring you automatically use nightly Rust (#97) (thanks @maekawatoshiki!)
      • We stopped app
    5. v1.0.01.0.02025-05-18 · 2025-05-18 22:08 UTC
      查看更新说明

      Welcome to the first public release of Edit!

      We hope you like it, despite its small nature. Maybe you can help it grow? File bugs, feature requests, and any ideas in our issue tracker!

    README 原文

    未翻译

    Application Icon for Edit Edit

    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

    Installation

    Packaging status

    You can also download binaries from our Releases page.

    Windows

    You can install the latest version with WinGet:

    winget install Microsoft.Edit
    

    Linux (build from source)

    If your distribution does not provide binaries, or if you'd like to build your own, you can use our install script, provided you have installed:

    • Rust (via rustup or similar)
    • A C compiler (e.g. gcc)
    • ICU (e.g. libicu78, libicu, icu)
    • curl/wget and tar

    The following command will then install msedit into ~/.local/bin:

    curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/microsoft/edit/main/assets/install.sh | sh
    

    Additional flags are --dev, to build directly from the main branch, and --system to install into /usr/local/bin. For instance:

    curl --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/microsoft/edit/main/assets/install.sh | sh -s -- --dev --system
    

    macOS

    You can install the latest version with Homebrew:

    brew install msedit
    

    Build Instructions

    • Install Rust
    • Clone the repository
    • If you're using nightly Rust:
      cargo build --release --config .cargo/release.toml
      
    • If you're using stable Rust:
      • Ideally: Set the environment variable RUSTC_BOOTSTRAP=1 and use the nightly build instructions above. This is recommended, because it drastically reduces the binary size and slightly improves performance.
      • Otherwise, simply run:
        cargo build --release
        

    Build Configuration

    You can set the following environment variables at build-time to configure the build:

    Environment variableDescription
    EDIT_CFG_ICU*See ICU library name (SONAME) below for details. Linux package maintainers are advised to review and configure these options.
    EDIT_CFG_LANGUAGESA comma-separated list of languages to include in the build. See i18n/edit.toml for available languages.

    Notes to Package Maintainers

    Package Naming

    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 the following library names:

    VariableWindowsmacOSLinux / Other
    EDIT_CFG_ICUUC_SONAMEicuuc.dlllibicucore.dyliblibicuuc.so
    EDIT_CFG_ICUI18N_SONAMEicuin.dlllibicucore.dyliblibicui18n.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 symbols 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 build settings, run cargo test with the --ignored flag. For instance:

    cargo test -- --ignored