Crane – a text editor for large files

(crane-editor.com)

1 points | by the-hangry-dev 7 hours ago ago

1 comments

  • the-hangry-dev 7 hours ago ago

    Hi,

    I've been working on Crane - a native, cross-platform text editor for files that are too big for most editors (e.g. multi-GB logs, CSV, JSON and SQL dumps, FASTA/FASTQ and others...).

    It's written in C++23 and uses its own UI library (so not Qt or Electron).

    It's at an early beta stage (currently free, no signups or e-mails required) and has basic required features from any text editor (i.e. syntax highlighting for multiple file formats, search/replace, vim mode, minimap among others) - it simply performs them on huge files.

    Some more techy details on how it works on the hood:

    * Files are memory-mapped and the underlying data structure is a piece table, so open-to-first paint is pretty much instant. The line index builds in the background and you can scroll, search and edit while it does. Currently, editing or any mutating operation is only possible once the file has finished loading.

    * Search, highlighting, the minimap and save are performed on immutable snapshots, so none of them block typing.

    * Regex search uses RE2 with a PCRE2 fallback. The search is parallelized, naturally.

    A demo video I posted on my X is at https://x.com/hangrydeveloper/status/2113182353887478220 for those interested. There are also other posts showing some screenshots and details.

    I hope some of you might find this interesting and useful and perhaps give it a try and provide some feedback & questions.

    Thank you.