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
eeand*.oremain ignored by.gitignore.
Build & Testing
- Use the provided
Makefilefor builds. Runmake clean && makebefore committing changes to confirm the editor builds without warnings. - For future features, consider extending
make checkto run any new automated tests or lints.
Suggested Feature Backlog
-
Search and Replace
- Implement an interactive search-and-replace command.
- Provide prompts similar to existing search functionality.
-
Optional Line Numbers
- Add a toggle to display line numbers in the text window.
-
Syntax Highlighting
- Investigate using
ncursescolor pairs to highlight keywords for common languages (shell scripts, C, Markdown). - Make highlighting optional via the settings menu or a
.init.eeoption.
- Investigate using
-
Configurable Keybindings & Macros
- Allow users to remap common commands via a config file.
-
Extended Undo/Redo
- Increase the undo stack depth and make it configurable.
- Consider persisting undo history per file during a session.
- Configurable undo amount.
-
Color Themes
- Use full ncurses color support (including 256-color) and allow theme selection.
-
Command-line Options
- Provide
-Rfor read‑only mode and options to open at a specific line or to execute an initial command.
- Provide
-
Clipboard Integration
- Implement basic copy/cut/paste buffers separate from the delete/undelete logic.
-
Tabbed Editing (Multiple Files)
- Add the ability to open and switch between multiple files in tabs.
-
Testing
- Create a minimal test script that launches
eein batch mode to verify key features (opening a file, running a command, saving). This can be invoked bymake testin the future.
- Create a minimal test script that launches
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.cinto smaller source files as features grow. - Address signedness warnings reported during compilation (e.g. in
next_wordcalls). Standardize onunsigned charfor 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.