GitHub - hakmarkdev/edee: EDEE is a lightweight, feature-rich terminal text editor written in Go.
EDEE (Extensible Development Editing Environment) is a lightweight, feature-rich terminal text editor written in Go. It provides a modern editing experience with syntax highlighting, undo/redo functionality, and support for multiple programming languages.
Features
Core Editing
- Multiline text editing with full Unicode support
- Syntax highlighting for Go, Rust, and Python files
- Undo/Redo system with state management (Ctrl+U/Ctrl+Z for undo, Ctrl+Y for redo)
- Line operations including line deletion (Ctrl+X)
User Interface
- Intuitive status bar showing editor state and file information
- Real-time feedback for save operations and errors
- Keyboard shortcuts for common operations
Quick Start
Prerequisites
- Go 1.17 or later
- Unix-like system (Linux, macOS, and WSL/MinGW)
Building
# Build the editor
make buildRunning
# Edit an existing file ./bin/edee myfile.txt # Create a new file ./bin/edee newfile.go # Start without a file (creates untitled.txt) ./bin/edee
Usage
Basic Editing
- Navigation: Use arrow keys to move the cursor
- Text Input: Simply start typing to insert text
- Save: Press
Ctrl+Sto save your changes - Exit: Press
ESCto quit the editor
Advanced Features
Undo/Redo Operations
- Undo:
Ctrl+UorCtrl+Z- Reverts the last change - Redo:
Ctrl+Y- Re-applies the last undone change - State Management: Up to 100 operations are stored in memory
Line Operations
- Delete Current Line:
Ctrl+X- Removes the entire line at cursor position
Key Bindings
Movement
| Key | Action |
|---|---|
↑ ↓ ← → |
Move cursor up/down/left/right |
Home |
Jump to beginning of current line |
End |
Jump to end of current line |
Page Up |
Scroll up one page |
Page Down |
Scroll down one page |
File Operations
| Key | Action |
|---|---|
Ctrl+S |
Save current file |
Ctrl+X |
Delete current line |
Ctrl+U / Ctrl+Z |
Undo last operation |
Ctrl+Y |
Redo last undone operation |
ESC |
Exit editor |
Status Information
The status bar provides real-time feedback:
[Ready]- File loaded, no unsaved changes[Modified]- File has unsaved changes[New file]- Editing a newly created file[Changes saved]- File saved successfully (10 seconds)[Error: message]- Error occurred during save operation (5 seconds)
File Support
Syntax Highlighting
EDEE provides syntax highlighting for:
- Rust files (
.rs) - Go files (
.go) - Python files (
.py)
File Encoding
- UTF-8 support with proper Unicode handling
- Multi-byte character awareness for cursor movement
- Automatic validation of file encoding
Project Structure
edee/
├── cmd/
│ └── main.go # Main application entry point
├── pkg/
│ ├── editor/
│ │ └── editor_test.go # Unit tests for editor functionality
│ └── fileio/
│ └── fileio.go # File I/O operations
├── test_samples/ # Sample files for testing
├── Makefile # Build automation
├── go.mod # Go module definition
└── README.md # This file
Development
Building from Source
# Build the binary make build # Run tests make test
Dependencies
EDEE uses Go standard library and compatible external dependencies:
- termbox-go v1.1.1 - Terminal UI library
- Standard library packages:
os,fmt,time,strings,path/filepath
Configuration
Environment Variables
GO111MODULE=on- Required for proper module resolutionTERM- Terminal type detection (most terminals work automatically)
License
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.