Back to .md Directory

Contributor Guidelines for the `ee` editor

Lists a feature backlog, coding style rules, and current refactoring priorities for the `ee` terminal editor project.

May 2, 2026
0 downloads
5 views
ai prompt
View source

What this file does

Lists a feature backlog, coding style rules, and current refactoring priorities for the ee terminal editor project.

When to use it

  • Contributing to the ee editor and need a to-do list and style reference
  • Planning to split a monolithic C file into modules and want a roadmap
  • Adding features like search-and-replace or syntax highlighting to a small editor
  • Reviewing a C project that uses Makefile builds and wants to enforce coding conventions

Assumes this stack

C99ncursesMakefile

Contributor Guidelines for the ee editor

This document collects ideas and instructions for implementing future improvements. Follow these when adding features or refactoring the code. After reading this guide, consult characters.md for the current UTF-8 plan and progress. Refer to the module outline in modules.md when moving code out of ee.c.

Repository Clean‑up

  • Ensure ee and *.o remain ignored by .gitignore.

Build & Testing

  • Use the provided Makefile for builds. Run make clean && make before committing changes to confirm the editor builds without warnings.
  • For future features, consider extending make check to run any new automated tests or lints.

Suggested Feature Backlog

  1. Search and Replace

    • Implement an interactive search-and-replace command.
    • Provide prompts similar to existing search functionality.
  2. Optional Line Numbers

    • Add a toggle to display line numbers in the text window.
  3. Syntax Highlighting

    • Investigate using ncurses color pairs to highlight keywords for common languages (shell scripts, C, Markdown).
    • Make highlighting optional via the settings menu or a .init.ee option.
  4. Configurable Keybindings & Macros

    • Allow users to remap common commands via a config file.
  5. Extended Undo/Redo

    • Increase the undo stack depth and make it configurable.
    • Consider persisting undo history per file during a session.
    • Configurable undo amount.
  6. Color Themes

    • Use full ncurses color support (including 256-color) and allow theme selection.
  7. Command-line Options

    • Provide -R for read‑only mode and options to open at a specific line or to execute an initial command.
  8. Clipboard Integration

    • Implement basic copy/cut/paste buffers separate from the delete/undelete logic.
  9. Tabbed Editing (Multiple Files)

    • Add the ability to open and switch between multiple files in tabs.
  10. Testing

    • Create a minimal test script that launches ee in batch mode to verify key features (opening a file, running a command, saving). This can be invoked by make test in the future.

Status

Undo support with grouped input chunks is complete for now. See undo.md for details. File I/O routines now reside in fileio.c as part of the ongoing module split. Screen drawing functions were moved to screen.c and the main editor loop now lives in editor.c.

Coding Style

  • The project uses C99. Stick to the existing lower‑case function naming and brace style.
  • Address compiler warnings (mostly signedness issues) as you modify the code.
  • Keep functions small and consider splitting ee.c into smaller source files as features grow.
  • Address signedness warnings reported during compilation (e.g. in next_word calls). Standardize on unsigned char for textual data where appropriate.

This file serves as a to‑do list and style reference. Update it whenever a new feature is started or completed.

Current Work

The priority is splitting the remaining logic in ee.c into dedicated modules. editor.c and the core helpers have been separated. The search routines now live in search.c. Continue moving menu handling and input processing next as outlined in modules.md. UTF‑8 refactoring from characters.md continues once the split is mostly done.

What's inside

10 feature suggestions, 5 coding style rules, 3 status updates, and 1 current work section

Change this for your project

  • Replace ee with your editor's binary name in .gitignore and build instructions
  • Replace onethree7/Easy-Edit-ee with your own repository URL
  • Replace modules.md and characters.md with your own module plan and UTF-8 doc filenames

Where it goes

Save as AGENTS.md in your repository root. Read by Codex, Cursor and other agents that follow the AGENTS.md convention.

Worth borrowing

  • Maintain a separate backlog document to track feature ideas without cluttering the codebase
  • Split a monolithic C file into dedicated modules (e.g., fileio.c, screen.c, editor.c) as features grow

Related Documents