A modern terminal-based text editor in C# inspired by Microsoft's edit โ a similar project built in Rust.
Choose your edition from the Releases page:
- Trimmed AOT: Ultra-lightweight, instant startup (~5-10MB)
- Full Edition: Feature-complete with plugin support (~20-30MB)
Linux/macOS:
tar -xzf edit-sharp-*.tar.gz
chmod +x edit-sharp
./edit-sharp [filename]Windows:
# Extract the .zip file, then:
edit-sharp.exe [filename]Perfect for: Daily text editing, fast startup, minimal resource usage
Features:
- โ Native AOT compiled - instant startup
- โ Smallest file size (~5-10MB)
- โ No runtime dependencies
- โ All core editing features
- โ Line numbers, status bar, word wrap
- โ File operations (new, open, save, save as)
- โ No plugin support
- โ No Command Palette
Build Configuration: Release-Trimmed
Perfect for: Power users, plugin developers, extensibility
Features:
- โ Full Lua plugin support
- โ .NET plugin support
- โ Command Palette (Ctrl+Shift+P)
- โ Extensible with custom commands
- โ All core editing features
- โ Regex find/replace (via plugins)
- โ Text transformations (via plugins)
โ ๏ธ Larger file size (~20-30MB)โ ๏ธ Slightly slower startup
Build Configuration: Release-Full
| Shortcut | Action |
|---|---|
Ctrl+N |
New File |
Ctrl+O |
Open File |
Ctrl+S |
Save File |
Ctrl+Shift+S |
Save As |
Ctrl+Q |
Exit |
| Shortcut | Action |
|---|---|
Ctrl+Shift+P |
Open Command Palette |
Create a plugins/ folder next to the executable and add .lua files.
Example Plugin:
-- hello.lua
editor.registerCommand(
"example.hello",
"Say Hello",
"Examples",
function()
local name = editor.getInput("Name", "Enter your name:", "")
if name and name ~= "" then
editor.showMessage("Hello", "Hello, " .. name .. "!")
end
end
)Text Operations:
editor.getText()- Get all texteditor.setText(text)- Set all texteditor.getSelectedText()- Get selectioneditor.replaceSelectedText(text)- Replace selectioneditor.insertText(text)- Insert at cursor
User Input:
editor.getInput(title, prompt, default)- Single-line inputeditor.getMultiLineInput(title, prompt, default)- Multi-line inputeditor.confirm(title, message)- Yes/No confirmation
UI:
editor.showMessage(title, message)- Show message dialogeditor.setStatus(message)- Update status bar
Commands:
editor.registerCommand(id, name, category, function)- Register command
- text_transform.lua - Upper/lower/title case, reverse
- line_tools.lua - Sort, deduplicate, trim
- regex_tools.lua - Regex find/replace
- find_replace.lua - Simple find/replace
- snippets.lua - Lorem ipsum, date insertion
- word_stats.lua - Word count statistics
- .NET 10.0 SDK or later
- Terminal.Gui 1.19.0 (auto-installed)
- MoonSharp 2.0.0 (Full edition only, auto-installed)
Linux/macOS:
chmod +x build.sh
./build.shWindows:
.\build.ps1Manual Build:
# Trimmed AOT Edition
dotnet publish -c Release-Trimmed -r linux-x64 --self-contained
# Full Edition
dotnet publish -c Release-Full -r linux-x64 --self-contained| Configuration | AOT | Trimmed | Plugins |
|---|---|---|---|
Release-Trimmed |
โ | โ | โ |
Release-Full |
โ | โ | โ |
Release |
โ | โ | โ (same as Release-Full) |
Debug |
โ | โ | โ |
Tested on Linux x64:
| Metric | Trimmed AOT | Full Edition |
|---|---|---|
| Binary Size | ~8 MB | ~25 MB |
| Startup Time | ~50ms | ~200ms |
| Memory (idle) | ~15 MB | ~30 MB |
| Plugin Support | โ | โ |
Contributions welcome! Please ensure:
- Code works in both Trimmed and Full builds
- Use
#if PLUGIN_SUPPORTfor plugin-specific code - Test both editions before submitting PR
MIT License - See LICENSE file
Trimmed AOT Edition:
- Cannot load plugins (by design)
- No Command Palette (by design)
Full Edition:
- Larger binary size
- Slower startup than Trimmed edition
- Syntax highlighting (Full edition)
- More built-in Lua plugins
- Configuration file support
- Theme customization
- Undo/Redo support
- Search/Replace UI (without plugins)
- GitHub Issues: Report bugs or request features
- Discussions: Ask questions or share plugins
Made with โค๏ธ using .NET and Terminal.Gui