A lightweight, terminal-based text editor inspired by vim, built in C with a focus on simplicity and performance
Features Installation Usage Commands License
- Features
- Installation
- Usage
- Commands
- Key Bindings
- Technical Details
- Building from Source
- Contributing
- License
- Dual Mode Interface: Input mode for editing and command mode for file operations
- File Operations: Open, save, and create files with vim-like commands
- Dynamic Window Sizing: Automatically adapts to terminal size
- Line Numbers: Grey-colored line numbers for easy navigation
- Large File Support: Handles files up to 1000 lines with 120 columns
- Scrolling: Both horizontal and vertical scrolling for large documents
- Syntax-Free: Clean, distraction-free editing environment
- Fast Startup: Minimal dependencies and quick load times
- Cross-Platform: Works on Linux and Unix-like systems
- GCC compiler
- Make
- Linux/Unix terminal
git clone https://github.com/yourusername/VERBATRON.git
cd VERBATRON
makeStart VERBATRON:
./VERBATRON(or whatever you may call it)Open a specific file:
./VERBATRON(or whatever you may call it) filename.txtVERBATRON starts in Input Mode by default. You can immediately start typing to create content.
In Input Mode:
- Arrow keys: Move cursor
- Enter: New line
- Backspace: Delete previous character
In Command Mode:
- Arrow keys: Move cursor without editing
- Type commands after the
:prompt
- Input Mode (default): Type normally to insert text
- Command Mode: Press
ESCto enter, type commands
Press ESC to enter command mode. You'll see a : prompt at the bottom of the screen.
| Command | Description |
|---|---|
:i or :input |
Switch to input mode |
:w |
Save current file |
:w filename |
Save as specific filename |
:o filename |
Open file |
:q |
Quit |
:wq |
Save and quit |
| Key | Action |
|---|---|
ESC |
Enter command mode |
Arrow Keys |
Navigate cursor |
Backspace |
Delete character |
Enter |
New line |
Ctrl+D |
Exit program |
Printable chars |
Insert character |
| Key | Action |
|---|---|
ESC |
Return to input mode |
Arrow Keys |
Move cursor position |
Enter |
Execute command |
Backspace |
Delete command character |
- Buffer Size: 1000 rows 120 columns
- Display: Dynamic window sizing (adapts to terminal)
- Memory: Static allocation for predictable performance
- I/O: Raw terminal mode for immediate key response
- Plain text files
- Unix line endings
- Printable ASCII characters (32-126)
- Startup: < 1 second (includes splash screen)
- File Loading: Efficient character-by-character reading
- Memory Usage: ~120KB for text buffer
- Scrolling: Smooth horizontal and vertical scrolling
# Clean build
make re
# Regular build
make
# Clean only
make clean
# Remove all generated files
make fcleanVERBATRON/
includes/
editor.h # Function declarations
includes.h # System includes
typedefs.h # Type definitions and constants
srcs/
editor.c # Core editor functions
input.c # Input handling and display
main.c # Program entry point
term.c # Terminal management
obj/ # Object files (generated)
Makefile # Build configuration
README.md # This file
verbatron.txt # Splash screen content
-Wall -Wextra -Werror: Strict error checking-Iincludes: Include directoryC99 standard
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow the existing code style
- Use tabs for indentation
- Keep functions under 25 lines when possible
- Comment complex logic
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by vim and other terminal-based editors
- Built as a learning project to understand terminal programming
- Thanks to the open-source community for inspiration
VERBATRON - Simple, fast, distraction-free editing.
- this readme was written with VERBATRON v1.0