A lightweight, Vim-inspired terminal text editor written in C using the ncurses library. Built from scratch to explore low-level systems programming, terminal rendering, and text manipulation.
- Insert mode (
i) - Save file (
:w) - Quit (
:q) - Arrow-key scrolling
- Status banner showing filename, row, and column
- Forward search (
/pattern) - Navigate search results (
n,p)
- Line numbers (
:set number) - Jump to end of file (
G) - Spell-check highlighting using a dictionary file
- GCC or Clang
- ncurses
Run on terminal: ./myeditor example.txt
Design Notes
- Text is stored as a dynamically allocated array of strings
- Scrolling handled via row/column offsets
- Spell-checking implemented with binary search over a sorted dictionary
- Rendering optimized using ncurses color pairs
Future Improvements
- Horizontal scrolling refinement
- Undo/redo
- Better word tokenization
- File open/create from editor
Built With:
- C
- ncurses