A Git TUI side-by-side diff viewer with vim-style keybindings.
Safe by design — vig only performs read operations and safe git commands (
git switch,git branch -d). Destructive operations like merge, rebase, or force delete are intentionally excluded.
- Side-by-side diff view with syntax highlighting
- Branch selector with git log preview
- Compare working directory against any local branch
- Vim-style modes: Scroll, Normal, Visual, Visual-Line
- File tree with status indicators (A/D/M/R/?)
- Yank (copy) to system clipboard with vim motions
- Live file watching with auto-refresh
- Open files in external editor (
$EDITOR) - GitHub View — Browse Issues and Pull Requests (body, comments, reviews, CI status) via
ghCLI
brew install td72/tap/vigDownload a pre-built binary from the GitHub Releases page:
# Linux x86_64
curl -sL https://github.com/td72/vig/releases/latest/download/vig-x86_64-unknown-linux-gnu.tar.gz | tar xz -C ~/.local/bin vig
# Linux aarch64
curl -sL https://github.com/td72/vig/releases/latest/download/vig-aarch64-unknown-linux-gnu.tar.gz | tar xz -C ~/.local/bin vig
# macOS Apple Silicon
curl -sL https://github.com/td72/vig/releases/latest/download/vig-aarch64-apple-darwin.tar.gz | tar xz -C ~/.local/bin vigcargo install vigRequires: Rust toolchain, libgit2, libssl, pkg-config
cargo install --path .Run in a Git repository:
vig| Key | Action |
|---|---|
1 |
Switch to Git View |
2 |
Switch to GitHub View |
| Key | Action |
|---|---|
Tab / Shift+Tab |
Cycle panes: Files → Branches → Reflog → GitLog → Diff |
h / l |
Move between adjacent upper panes (Files, Branches, Reflog) |
i |
Jump from upper pane to main pane (GitLog / Diff) |
Esc |
Return from main pane to previous upper pane |
| Key | Action |
|---|---|
j / k |
Scroll down / up |
h / l |
Scroll left / right (in Diff view) |
gg |
Jump to top |
G |
Jump to bottom |
Ctrl+d / Ctrl+u |
Half page down / up |
| Key | Action |
|---|---|
j / k |
Navigate branches (git log preview updates) |
Enter |
Action menu (switch / delete / set as diff base) |
/ |
Search branches |
Esc |
Clear search / Reset comparison to HEAD |
| Key | Action |
|---|---|
j / k |
Navigate commits |
Ctrl+d / Ctrl+u |
Half page scroll |
g / G |
Top / Bottom |
y |
Copy commit hash |
o |
Open in GitHub |
/ |
Search commits |
Esc |
Clear search / Back to Branch List |
| Key | Action |
|---|---|
j / k |
Navigate entries |
Ctrl+d / Ctrl+u |
Half page scroll |
g / G |
Top / Bottom |
Enter |
Set as diff base |
/ |
Search reflog |
Esc |
Clear search / Back to Branches |
| Key | Action |
|---|---|
i |
Enter Normal mode |
v |
Visual mode (character) |
V |
Visual-Line mode |
Esc |
Back to Scroll mode |
| Key | Action |
|---|---|
yy |
Yank line |
yw / ye / yb |
Yank word / end of word / word back |
y$ / y0 |
Yank to end / start of line |
y (in Visual) |
Yank selection |
Text objects are also supported: iw, aw, i", a", i(, a(, i{, a{
| Key | Action |
|---|---|
/ |
Start search |
n |
Next match |
N |
Previous match |
Search works in all panes (DiffView, FileTree, CommitLog, Reflog). Case-insensitive.
Browse GitHub Issues and Pull Requests directly within vig. Requires GitHub CLI (gh) to be installed and authenticated.
| Key | Action |
|---|---|
h / l |
Switch between Issue List and PR List |
j / k |
Navigate list |
i / Enter |
Open detail view |
o |
Open in browser |
Esc |
Back to list |
Ctrl+d / Ctrl+u |
Half page scroll (detail view) |
g / G |
Top / Bottom |
r |
Refresh data |
| Key | Action |
|---|---|
Enter / Space |
Open file / Toggle directory |
e |
Open in external editor |
r |
Refresh diff and branches |
? |
Show help |
q / Ctrl+c |
Quit |
mise install # installs prek
mise exec -- prek install # installs pre-commit hooksManaged by prek:
cargo fmt --checkcargo clippy- Trailing whitespace, EOF fixer, TOML/YAML check, merge conflict check, large file check
- GIF freshness check (tape modified → gif must be re-recorded)
GitHub Actions runs on push to main and pull requests:
- prek hooks (fmt + clippy)
cargo testcargo build
MIT