Wedi is a lightweight, keyboard-driven console text editor designed for efficient text editing directly within the terminal. It offers intuitive text selection, clipboard operations (cut, copy, paste), fast navigation using keyboard shortcuts, commenting capabilities, and robust search functionality. These features combine to deliver a smooth and distraction-free editing experience entirely in the command line.
Key Features:
Intuitive text selection with Shift or Ctrl+S
Clipboard support for cut, copy, and paste operations
Fast navigation via keyboard shortcuts (Ctrl+H/E, Home/End)
Comment toggling (Ctrl+/ or Ctrl+K) for multiple programming languages
Search functionality (Ctrl+F, F3) with support for finding next/previous matches
Audience & Benefit:
Ideal for developers and users who prefer terminal-based workflows, Wedi enhances productivity by eliminating the need for a graphical interface. It is particularly beneficial for those working in environments where quick text editing or code modifications are required without GUI distractions.
Wedi can be installed via winget, making it easy to integrate into your existing workflow.
README
wedi
A lightweight, easy-to-use console text editor written in Rust.
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/
From Source
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
Usage
# Open or create a file
wedi
# Show help
wedi -h
# or
wedi --help
# Show version
wedi -v
# or
wedi --version
# Enable debug mode
wedi --debug
Encoding Options
wedi supports specifying different encodings for reading and saving files:
# Specify source encoding (reading)
wedi --from-encoding
# or use shorthand
wedi -f
# Specify target encoding (saving)
wedi --to-encoding
# or use shorthand
wedi -t
# Specify both source and target encoding
wedi -f -t
Supported Encodings:
utf-8 / utf8 (default)
utf-16le / utf-16be
gbk (Chinese GBK)
shift-jis (Japanese Shift-JIS)
big5 (Traditional Chinese Big5)
cp1252 (Western European Windows-1252)
And many more...
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
Keyboard Shortcuts
Basic Editing
Ctrl+W: Save file
Ctrl+Q: Quit (press twice if modified)
Ctrl+Z: Undo
Ctrl+Y: Redo
Backspace: Delete character before cursor or selected text
Delete: Delete character under cursor or selected text
Ctrl+D: Delete current line or selected lines
Tab: Indent (insert 4 spaces or indent selected lines)
Shift+Tab: Unindent (remove up to 4 leading spaces)
Navigation
Arrow Keys: Move cursor
Ctrl+Up / Ctrl+Home: Move to first line
Ctrl+Down / Ctrl+End: Move to last line
Home / Ctrl+H: Move to line start
End / Ctrl+E: Move to line end
Page Up / Page Down: Scroll page up/down
Ctrl+G: Go to line number
Selection
Ctrl+S: Toggle selection mode (for terminals without Shift key support)
Shift + Arrow Keys: Select text
Shift + Home / End: Select to line start/end
Shift + Page Up / Down: Select page up/down
Shift + Ctrl + Arrows: Quick select to line/file start/end
Shift + Ctrl + H / E: Quick select to line start/end
Ctrl+A: Select all
ESC: Clear selection and messages
> Note: In Ctrl+S selection mode, all movement keys (arrows, Home/End, Page Up/Down, Ctrl+arrows, Ctrl+H/E) will extend selection. Press Ctrl+S again, ESC, or perform any editing operation to exit selection mode.
Clipboard
Ctrl+C: Copy (selection or current line)
Ctrl+X: Cut (selection or current line)
Ctrl+V: Paste
Alt+C: Internal Copy (selection or current line)
Alt+X: Internal Cut (selection or current line)
Alt+V: Internal Paste
Search
Ctrl+F: Find text
F3: Find next match
Shift+F3: Find previous match
Code
Ctrl+/ / Ctrl+\ / Ctrl+K: Toggle line comment
Ctrl+L: Toggle line numbers
Supported Comment Styles
wedi automatically detects file type and applies appropriate comment style: