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.
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 tofiles.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 Julio Ramirez (@juemrami)!)
- Tab and Shift+Tab indent and unindent multiple lines at once (#245) (thanks Brian (@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.txtsorts beforefile10.txt, as it should.
Bug Fixes
- Invalid CLI arguments are properly rejected instead of silently ignored (#503) (thanks Alex Spînu (@spinualexandru)!)
- Fixed random Unicode text input corruption on *nix (#520) (thanks Mani Tofigh (@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 usingsrgb_to_linearon 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_twarnings, GDB pretty printing. - Single-line files will now properly save as CRLF on Windows (#739) (thanks Cal (@UnnaturalTwilight)!)
- Fixed horizontal scrolling on macOS touchpads (#794) (thanks barkure (@barkure)!)
- You can now replace zero-width regex matches (e.g.
$) (#815) (thanks Mihnea-Teodor Stoica (@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 hev (@heiher)!)
- We'll now automatically create parent directories on save (#738) (thanks Sergio Triana Escobedo (@stescobedo92)!)
- Printing
--helpor--versionno longer requires a TTY (#556, #810) - Fixed Ctrl modifier handling during mouse input (#604)
- On Windows,
SetConsoleModefailures now show a useful error message (#639) - The Windows application manifest compatibility section was fixed (#635)
- Fixed a bug where the release announcement contained too much flavor
- Toggling buttons in the search/replace dialog will not move focus around anymore (#821)
Build & Packaging
- The ICU SONAME is configurable at build time via
EDIT_CFG_ICU*(#495)
If this interests you, read the section at the end. - A devcontainer configuration was added (#496) (thanks luisgizirian!)
- A basic
snapcraft.yamlwas added for Snap package builds (#500) (thanks Aaron J Prisk (@aaronprisk)!) - The
.desktopfile was improved (#560) (thanks Nukleari!) - We added our own custom localization system (#591)
All translations live ini18n/edit.tomlfor now. The system allows us to dynamically add more languages over time. - A single-line Linux installer script was added (#628) (thanks Jared Tweed (@JaredTweed)!)
See our readme for more information. clippy::ptr_as_ptrlint was fixed (#730) (thanks xtqqczze!)- Nightly Rust is no longer required (#761, #762, #764)
All nightly features have been replaced with our own, lovingly handcrafted unsafe code.
Localization, Internationalization, Documentation
This release adds 19 new languages, bringing the total to 30 (#596, #629, #634, #655, #663, #669, #688, #693).
Thanks go out to (in no particular order): viyic, VenusGirl❤ (@VenusGirl), Mr Flamel (@mrFlamel), Mohammad Abu Mattar (@MKAbuMattar), Tiago Mouta (@OMouta), Miteigi (@miteigidesu), Emir SARI (@bitigchi), ebraminio, Mads Ohm Larsen (@omegahm), William Beinö (@xTacobaco), Nikola Djordjevic (@marinac-dev), Marginal (@marginal23326), NandeMD, Mekan Soltanov (@msoltanov), Þór Sigurðsson (@TotiTolvukall), Skryta Istota (@hidden-being), Piotr Błażejewicz (Peter Blazejewicz) (@peterblazejewicz), schilive (@schilive), Jakub Kolcar (@ioma8), Michael Avagianos (@maikkundev), Ruzsinszki Gábor (@webmaster442), Erithax, Alex Spînu (@spinualexandru), Ronja Koistinen (@ronja-koistinen), and Yaroslav (@KarpenkoY)!
Other documentation:
- Updated the man page for 1.2.1 (#727) (thanks Stefan (@polluks)!)
- Fixed the localization path in CONTRIBUTING.md (#601) (thanks Aloïs MASSON--CLAUDEZ (@Packingdustry)!)
- Copyright year updated (#760) (thanks Alex Manochio (@ajm19826)!)
Additional notes to Build & Packaging
To summarize the changes above:
- Microsoft Edit now builds with stable Rust. However, Rust 1.93 or later is required.
- The build system now supports SONAME overrides for ICU (primarily relevant on Linux). You can read more about it at the end of our readme.
For instance, a build on Debian 13 (Trixie) may look like this:
# If permitted by your stability policies
# and with rust-src installed:
export RUSTC_BOOTSTRAP=1
export EDIT_CFG_ICUUC_SONAME=libicuuc.so.76
export EDIT_CFG_ICUI18N_SONAME=libicui18n.so.76
export EDIT_CFG_ICU_RENAMING_VERSION=76
cargo test -- --ignored
cargo build --release --config .cargo/release.toml
# Otherwise:
export EDIT_CFG_ICUUC_SONAME=libicuuc.so.76
export EDIT_CFG_ICUI18N_SONAME=libicui18n.so.76
export EDIT_CFG_ICU_RENAMING_VERSION=76
cargo test -- --ignored
cargo build --release