A modern, modal text editor built in Rust with minimal dependencies. Red combines the power of modal editing with modern features like Language Server Protocol support, async operations, and a JavaScript plugin system.
- Modal Editing: Vim-inspired modal interface with Normal, Insert, Visual, and Command modes
- Language Server Protocol: Full LSP support for intelligent code completion, diagnostics, and more
- Async Architecture: Built on Tokio for responsive, non-blocking operations
- Plugin System: Extend functionality with JavaScript plugins running in a sandboxed Deno runtime
- Syntax Highlighting: Tree-sitter based syntax highlighting for accurate code coloring
- Theme Support: VSCode theme compatibility - use your favorite themes
- Minimal Dependencies: Built from scratch with a focus on simplicity and performance
- Cross-Platform: Works on Linux, macOS, and Windows
- Rust 1.70 or newer
- Cargo (comes with Rust)
- Git
This editor is being actively built on a series of streams and videos published to my CoderSauce YouTube channel here:
https://youtube.com/@CoderSauce
It is my intention to keep it stable starting at the first alpha release, but there are no guarantees. As such, use it at your discretion. Bad things can happen to your files, so don't use it yet for anything critical.
If you want to collaborate or discuss red's features, usage or anything, join our Discord:
- Clone the repository:
git clone https://github.com/codersauce/red.git
cd red
- Build and install:
cargo install --path .
- Set up configuration:
mkdir -p ~/.config/red
cp default_config.toml ~/.config/red/config.toml
cp -R themes ~/.config/red
Once installed, you can start editing files immediately:
red <file-to-edit>
Red uses a TOML configuration file located at ~/.config/red/config.toml
. Here are some key configuration options:
# Theme selection
theme = "github_dark"
# Editor settings
[editor]
line_numbers = true
indent_style = "spaces"
indent_size = 4
cursor_line = true
# LSP configuration
[lsp]
enabled = true
# Plugin settings
[plugins]
enabled = true
directory = "~/.config/red/plugins"
# Logging
[debug]
log_file = "/tmp/red.log"
log_level = "info"
Red supports VSCode themes. Place .json
theme files in ~/.config/red/themes/
and reference them in your config:
theme = "your_theme_name" # without .json extension
Red uses Vim-style modal editing. Here are the essential key bindings:
i
- Enter Insert modev
- Enter Visual mode:
- Enter Command modeh/j/k/l
- Move left/down/up/rightw/b
- Move forward/backward by word0/$
- Move to beginning/end of linegg/G
- Go to first/last linedd
- Delete lineyy
- Copy linep
- Pasteu
- UndoCtrl+r
- Redo/
- Searchn/N
- Next/previous search result
Esc
- Return to Normal mode- All regular typing works as expected
Esc
- Return to Normal moded
- Delete selectiony
- Copy selection>/<
- Indent/unindent selection
:w
- Save file:q
- Quit:wq
- Save and quit:e <file>
- Open file:set <option>
- Set editor option
# Clone the repository
git clone https://github.com/codersauce/red.git
cd red
# Build debug version
cargo build
# Build release version
cargo build --release
# Run tests
cargo test
# Run with debug logging
RUST_LOG=debug cargo run -- test.txt
red/
├── src/
│ ├── main.rs # Entry point and event loop
│ ├── editor.rs # Core editor state machine
│ ├── buffer.rs # Text buffer management
│ ├── lsp/ # Language Server Protocol implementation
│ ├── ui/ # Terminal UI components
│ └── plugins/ # Plugin system
├── plugins/ # Built-in plugins
├── themes/ # Default themes
└── tests/ # Integration tests
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Enable debug logging to troubleshoot issues:
[debug]
log_file = "/tmp/red.log"
log_level = "debug"
Then check the log file:
tail -f /tmp/red.log
- LSP not working: Ensure the language server for your file type is installed and in your PATH
- Plugins not loading: Check that the plugin directory exists and plugins have correct permissions
- Theme not found: Verify the theme file exists in
~/.config/red/themes/
and is valid JSON
If you find any issues, please report them at:
https://github.com/codersauce/red/issues/
Check existing issues first to avoid duplicates.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with love for the Rust community
- Inspired by Vim, Neovim, and Helix
- Special thanks to all contributors and the CoderSauce community
Thank you for trying Red! ❤️