Show HN: A retro terminal text editor for GNU/Linux coded in C (C-edit)
C-EDIT is an alpha text editor for Linux, mimicking MSDOS EDIT, featuring a simple interface, dynamic buffer, and modular design. Installation requires source code compilation, with future enhancements planned.
Read original articleC-EDIT is an alpha version text editor developed in C for Linux, designed to mimic the MSDOS EDIT interface. It is currently compatible with Termux and is under active development, with the latest update in August 2024 introducing a dynamic buffer. The editor features a simple double screen buffer for improved display, a basic text user interface with windows and textboxes, automatic display resizing, and an open file dialog with scrolling. It also includes a rudimentary edit buffer with scrolling capabilities and a millisecond timer for animations. The project is modular, consisting of various source files that handle different functionalities, such as keyboard input, file management, and user interface components. Installation involves downloading the repository, navigating to the source directory, compiling the code with `make`, and executing the editor. Future plans for C-EDIT include code cleanup, adding more functionalities like home/end keys and scroll bars, and completing the menu options. Users are cautioned against using this editor for important files due to its alpha status.
- C-EDIT is a Linux text editor in alpha development, resembling MSDOS EDIT.
- It features a simple user interface, dynamic buffer, and modular design.
- Installation requires compiling from the source code.
- Future updates aim to enhance functionality and user experience.
- Users should avoid using it for important files due to its developmental stage.
Related
That Editor
The GitHub repository hosts a DOS-like editor created for video production, not ideal for general use. It reflects historical hardware and software limitations, tailored for specific vintage computing requirements.
Chr – terminal editor inspired by Turbo Pascal editor from 1997
A terminal-based text editor "chr" on GitHub mimics desktop editors' shortcuts, blending modern GUI with retro text mode. Developed with Tui Widget, it welcomes contributions. Installation involves cloning, building, and compiling.
Cursor – The AI Code Editor
Cursor is an AI-powered code editor that enhances developer productivity through predictive editing, natural language coding, and a focus on privacy, receiving positive feedback for its efficiency and user experience.
Anvil: Graphical, multi-pane tiling editor
Anvil is a multi-pane tiling text editor that emphasizes mouse usage, featuring syntax highlighting, multiple cursors, remote file editing, and is inspired by the Acme editor, supported by GIO and Go communities.
Chrome and FF extension to edit any browser text field in an Emacs buffer
Chrome Emacs is a project that enhances online text editing in browsers using Emacs, featuring cursor synchronization, compatibility with multiple editors, and customization options, while adhering to Chrome Extension Manifest V3 standards.
- Many users express nostalgia for retro text editors, comparing C-EDIT to classic tools like QEdit and Borland's TUI.
- Suggestions for enhancements include adding Unicode support, improving memory allocation, and implementing mouse support.
- Users appreciate the simplicity and design of C-EDIT, with some sharing their own experiences in developing text editors.
- There is interest in the potential for future developments and enhancements to the software.
- Some comments reference related projects and tools that evoke similar retro aesthetics or functionalities.
However, my two suggestions would be:
- add Unicode support (it's the 21st century, so ∑, ®, etc. should finally work); this is not easy, but the earlier you do it the less dramatic the changes will be (check out https://github.com/unicode-org/icu/tree/main/icu4c);
- don't allocate the lines individually (as you do now with malloc, having looked at the code); at least use an arena allocator, i.e. allocate larger chunks of memory and the provide your own alloc_line function that uses the larger chunks (called arenas) piecemeal. This will speed things up and reduce fragmentation. A more advanced approach would be not to use per-line buffers but to switch to rope data structures e.g. https://github.com/josephg/librope).
Anyways, the TUI on mainstream MS-DOS 6.22 and Borland from those days were incomparable to anything on mainstream Linux even on these days. For some reason Linux is the king of text mode and yet never had a proper TUI tradition.
Thank you for sharing the project. Compiled well on my side, looking forward to the next developments. My (unrequested) feedback:
+ consider renaming from C-edit (uppercase) to lower case c-edit, because it is simpler to type from the terminal.
+ the animations of the spining part on top was distracting
+ some menus missing to implement functionality, didn't test copy&paste
+ mouse support would be nice, albeit optional but would complete the MS-DOS 6.22 / borland style since it supported mouse there too
Thank you.
Slightly related but another way to simulate a retro text editor (old school raster style green screen aesthetic in this instance) is to combine the "cool-retro-term" terminal with the minimal editor "micro".
I've also been writing my own terminal text editor for a while (just crossed the ten years mark!), so I know how much dedication this takes. :-)
One thing I did recently was start writing the lessons I've learned in my journey, I figured I'd share it in case it helps you, maybe you'll find one or two ideas interesting: https://github.com/alefore/weblog/blob/master/edge-lessons.m...
There's a QBjs, for QuickBasic on the web.
There's a QB64 vscode extension: https://github.com/QB64Official/vscode
Textual has a MarkdownViewer TUI control with syntax highlighting and a file tree in a side panel like NERDtree, but not yet a markdown editor.
Turbo Vision: https://github.com/magiblot/tvision
Related
That Editor
The GitHub repository hosts a DOS-like editor created for video production, not ideal for general use. It reflects historical hardware and software limitations, tailored for specific vintage computing requirements.
Chr – terminal editor inspired by Turbo Pascal editor from 1997
A terminal-based text editor "chr" on GitHub mimics desktop editors' shortcuts, blending modern GUI with retro text mode. Developed with Tui Widget, it welcomes contributions. Installation involves cloning, building, and compiling.
Cursor – The AI Code Editor
Cursor is an AI-powered code editor that enhances developer productivity through predictive editing, natural language coding, and a focus on privacy, receiving positive feedback for its efficiency and user experience.
Anvil: Graphical, multi-pane tiling editor
Anvil is a multi-pane tiling text editor that emphasizes mouse usage, featuring syntax highlighting, multiple cursors, remote file editing, and is inspired by the Acme editor, supported by GIO and Go communities.
Chrome and FF extension to edit any browser text field in an Emacs buffer
Chrome Emacs is a project that enhances online text editing in browsers using Emacs, featuring cursor synchronization, compatibility with multiple editors, and customization options, while adhering to Chrome Extension Manifest V3 standards.