| Crates.io | wedi-core |
| lib.rs | wedi-core |
| version | 0.8.2 |
| created_at | 2026-01-12 04:13:31.016006+00 |
| updated_at | 2026-01-13 22:48:47.086572+00 |
| description | Core editor primitives for wedi |
| homepage | https://github.com/superyngo/wedi |
| repository | https://github.com/superyngo/wedi |
| max_upload_size | |
| id | 2036979 |
| size | 1,185,338 |
A lightweight, easy-to-use console text editor written in Rust.
You can install wedi using Wenget.
You can install wedi using Winget (Windows Package Manager).
$env:APP_NAME="wedi"; $env:REPO="superyngo/wedi"; $env:UNINSTALL="false"; irm https://gist.githubusercontent.com/superyngo/a6b786af38b8b4c2ce15a70ae5387bd7/raw/gpinstall.ps1 | iex
Uninstall:
$env:APP_NAME="wedi"; $env:REPO="superyngo/wedi"; $env:UNINSTALL="true"; irm https://gist.githubusercontent.com/superyngo/a6b786af38b8b4c2ce15a70ae5387bd7/raw/gpinstall.ps1 | iex
curl -fsSL https://gist.githubusercontent.com/superyngo/a6b786af38b8b4c2ce15a70ae5387bd7/raw/gpinstall.sh | APP_NAME="wedi" REPO="superyngo/wedi" bash
Uninstall:
curl -fsSL https://gist.githubusercontent.com/superyngo/a6b786af38b8b4c2ce15a70ae5387bd7/raw/gpinstall.sh | APP_NAME="wedi" REPO="superyngo/wedi" bash -s uninstall
The installation script will:
%LOCALAPPDATA%\Programs\wedi~/.local/binSupported Platforms:
Note: Replace
superyngowith the actual GitHub superyngo in the URLs above.
Download the latest release for your platform from the Releases page.
Windows:
# Extract the downloaded zip file and move wedi.exe to a directory in your PATH
# For example:
move wedi.exe %LOCALAPPDATA%\Programs\wedi\
Linux/macOS:
# Extract the downloaded tar.gz file and move wedi to a directory in your PATH
tar -xzf wedi-*.tar.gz
chmod +x wedi
mv wedi ~/.local/bin/
If you prefer to build from source, ensure you have Rust installed:
# Clone the repository
git clone https://github.com/superyngo/wedi.git
cd wedi
# Build release binary
cargo build --release
# The binary will be available at:
# - Windows: target\release\wedi.exe
# - Linux/macOS: target/release/wedi
# Install manually
# Windows:
copy target\release\wedi.exe %LOCALAPPDATA%\Programs\wedi\
# Linux/macOS:
cp target/release/wedi ~/.local/bin/
chmod +x ~/.local/bin/wedi
# Open or create a file
wedi <filename>
# Show help
wedi -h
# or
wedi --help
# Show version
wedi -v
# or
wedi --version
# Enable debug mode
wedi --debug <filename>
wedi supports specifying different encodings for reading and saving files:
# Specify source encoding (reading)
wedi <filename> --from-encoding <encoding>
# or use shorthand
wedi <filename> -f <encoding>
# Specify target encoding (saving)
wedi <filename> --to-encoding <encoding>
# or use shorthand
wedi <filename> -t <encoding>
# Specify both source and target encoding
wedi <filename> -f <encoding> -t <encoding>
Supported Encodings:
utf-8 / utf8 (default)utf-16le / utf-16begbk (Chinese GBK)shift-jis (Japanese Shift-JIS)big5 (Traditional Chinese Big5)cp1252 (Western European Windows-1252)Encoding Priority for Saving:
When saving files, the encoding priority is: --to-encoding > --from-encoding > detected encoding from file.
Examples:
# Read UTF-8, save as GBK
wedi file.txt -f utf-8 -t gbk
# Read with auto-detection, save as UTF-16LE
wedi file.txt -t utf-16le
# Read GBK, save as GBK
wedi file.txt -f gbk
wedi supports customizable syntax highlighting themes. You can choose from 7 built-in themes:
# List all available themes
wedi --list-themes
# Use a specific theme
wedi --theme <THEME_NAME> <filename>
Available Themes:
Examples:
# Use Solarized Dark theme
wedi --theme "Solarized (dark)" myfile.rs
# Use Mocha theme
wedi --theme "base16-mocha.dark" myfile.py
# List all themes
wedi --list-themes
Note: The default theme is base16-eighties.dark. If you don't specify a theme, this will be used automatically.
Note: In Ctrl+S selection mode, all movement keys (arrows, Home/End, Page Up/Down, Ctrl+arrows) will extend selection. Press Ctrl+S again, ESC, or perform any editing operation to exit selection mode.
Note: Search mode is activated when you press Ctrl+F and find matches. Press ESC to exit search mode and return to normal navigation. The search query and results are preserved until you perform a new search.
wedi automatically detects file type and applies appropriate comment style:
//#--REM"Comments are highlighted in green color for better visibility.
wedi includes comprehensive syntax highlighting powered by bat's syntax definitions, supporting 219+ programming languages including:
wedi provides intelligent syntax highlighting with automatic performance optimization:
Use Ctrl+J to toggle syntax highlighting on/off. The intelligent processing ensures both accuracy and performance automatically.
cargo build
cargo run -- <filename>
cargo test
cargo build --release
MIT
wedi uses syntax definitions from the bat project:
assets/syntaxes.bin (219+ language definitions)The syntax definitions are embedded in the binary and are used under the terms of the MIT License. We are grateful to the bat project maintainers and the Sublime Text community for their excellent work on syntax definitions.
For complete third-party license information, see the bat project repository.
Contributions are welcome! Please feel free to submit a Pull Request.