For GitHub and GitHub Enterprise PR threads, draft comments, and explicit review submission, use the separate PR Review workspace with :review or Open PR Review in the command palette. Local Git navigation and hunk staging do not require a PR or GitHub authentication.
Changed-file navigation
Open Explorer and select Git with 2, Tab, or Shift-Tab. Kvim discovers the repository from Commander's focused directory and asynchronously builds a collapsible tree containing staged, unstaged, conflicted, untracked, deleted, renamed, and copied paths. Ignored files are omitted.
Each row begins with three status columns:
- The first column is the staged index status.
- The second column is the unstaged worktree status.
+in the third column means the corresponding open buffer has unsaved changes. Unsaved buffer-only paths are included even before saving.
Status letters are A added, M modified, D deleted, R renamed, C copied, and U conflicted. Directories aggregate the status of their descendants. File and directory icons follow the configured glyph profile; file icons use their filetype colors, while path labels and each status column use Git colors for added, modified, removed, and conflicted changes. The tree keeps a dim vertical scrollbar track even when its rows fit or the tree is empty. A proportional thumb appears when scrolling is needed; with a preview open, the track uses the existing tree/preview divider. The track is an indicator, not a file-selection target.
Navigation uses:
j/k, arrow keys, Page Up/Page Down, Home/End, andg/Gto move.h/lor Left/Right to collapse and expand directories.- Enter to open a file, and
s/vto open it in a horizontal or vertical split. /to search paths, withnandNrepeating the search.rto refresh repository status.
Opening a path reuses an existing buffer, preserving unsaved contents. Deleted paths remain visible but cannot be opened. Symlinks, reparse points, submodules, special files, and paths resolving outside the repository are not opened as ordinary files.
The last successful status snapshot is reused within the current Kvim session when switching tabs or reopening Explorer in the same repository. This keeps large repositories immediately navigable; press r when an external tool changes the index or worktree. Unsaved Kvim buffer markers continue to update while the tab is open.
The Git tab deliberately has no staging, unstaging, discard, stash, commit, pull, push, or remote-management actions. Its status scan uses gix, runs off the editor thread, is cancellable and bounded, and rejects stale results.
Change preview
Selecting a changed file automatically shows a read-only unified diff on the right. Each comparison shows the complete file, with removed and added lines interleaved and all unchanged code available by scrolling, without @@ headers. The preview keeps Staged changes (HEAD to index) separate from Unstaged changes (index to current text), showing one comparison at a time. It opens Unstaged when available, otherwise Staged; c switches comparisons when both exist, preserving their independent scroll and hunk positions. Current text comes from an existing editor buffer when available, including unsaved edits, or from disk otherwise. The header identifies the active source as [index], [buffer], [unsaved buffer], or [disk]. A deleted file's clean, previously opened buffer does not hide its on-disk deletion.
Added and removed lines use colored backgrounds rather than +/- prefixes. Syntax colors follow the active theme, including Kterm's terminal palette, and remain visible over line and inline-change backgrounds. Added lines receive stronger within-line highlights only when paired with removed text. New files, addition-only hunks, and extra inserted lines in mixed hunks retain syntax colors and the subtle added-line background without an extra full-text overlay. When resolved theme colors would make comments hard to read, their color is lightened or darkened just enough for contrast against the final diff background, including selection. Other syntax colors are preserved.
[and]jump directly to the previous or next hunk, without a second key. Navigation skips unchanged gaps within the active comparison, stops at either end, and never switches comparisons or files.cswitches between Staged and Unstaged when both have changes.J/Kscroll the preview vertically;H/Lscroll long lines horizontally. The mouse wheel over the preview scrolls it without moving the tree selection.- The header shows the active comparison and its hunk position. Selecting another file opens near its first hunk, with earlier code still scrollable.
- Enter and
s/vretain their existing file-opening behavior. During/search, brackets are ordinary query characters. rrefreshes both status and the selected preview. External changes still require a refresh; buffer revisions update the preview automatically.
The tree starts at approximately 35% of the available width. Use the existing window.resize_left/window.resize_right bindings (Ctrl-Shift-H/L by default) to resize the divider. Its Git-specific ratio is persisted independently from Commander and other previews. Terminals narrower than 65 columns show only the tree, preserving usable minimum widths for both panes.
Additions, untracked files, deletions, renames, and copies can be previewed. Rename/copy headers identify the active comparison's source path, without carrying rename information across baselines. Rename-only and mode-only changes show the complete file with a no-textual-changes header. Directories show a selection hint; conflicts, binary/non-UTF-8 content, submodules, symlinks, reparse points, and unsupported objects show an explanation rather than an empty diff. Sparse-checkout index entries also show an explanation instead of appearing as on-disk deletions.
Preview work uses gix off the editor thread, with a single shared worker, cancellation, and stale-result rejection. Each input is limited to 4 MiB, 50,000 lines, and 16 KiB per line; exceeding a limit shows an explanation. Filesystem reads retain no-follow and repository-confinement checks. Browsing the preview never changes buffers, the index, or the worktree. Built-in Git line-ending and encoding conversions are honored, but external filter drivers are never executed by passive previews; affected files show an explanation.
Git signs
For a path-backed buffer inside a Git worktree, Kvim compares the current buffer text with the file at HEAD and renders added, modified, and removed line indicators in the gutter. Work runs asynchronously and stale results are discarded when the buffer changes.
Files outside a worktree simply have no Git signs. Symlinks, reparse points, special files, binary files, submodules, and unsupported index states are rejected rather than followed or treated as ordinary editable files.
Hunk review
Open the focused buffer's hunk view with <space>h or :hunks.
The hunk view compares the in-memory buffer against the Git index, so it can show unstaged edits before they are saved. Navigation supports j/k, arrow keys, Ctrl-d/Ctrl-u, Ctrl-f/Ctrl-b, g/G, and Home/End.
]/[move forward/backward through hunks. Large hunks scroll by half a screen per press until their bottom/top is visible; the next press moves to the next/previous hunk. Moving backward into a large hunk starts at its bottom. Navigation stops at the first and last hunks without wrapping.]h/[hjump directly between hunk headers without incremental scrolling.sstages the selected hunk.dasks for confirmation before discarding the selected hunk.rrefreshes the view.wsaves before refreshing when necessary.- Enter returns to the same editor split in Normal mode at the focused line's first nonblank character. Added and context lines jump exactly; deleted lines jump to their replacement or the next surviving line, using the previous surviving line at EOF. A hunk header jumps to its first change's current-buffer location. Unsaved changes are preserved.
qorEsccloses the view when no mutation is in progress.<space>acasks an existing Copilot CLI conversation about the current hunk, or a range selected withv/V.:copilot send linesends the focused diff line, including historical removed lines.
Enter leaves the view open with an explanation if hunks are still loading, a save or hunk transaction is in progress, the view is stale, or no source location is selected. Unlike Enter, q and Esc do not reposition the editor cursor.
Stage and discard operations revalidate the repository, index, file identity, and buffer revision before mutation. They preserve unrelated index and worktree content, run away from the editor loop, support cancellation, and report stale or indeterminate outcomes instead of hiding them behind a success-shaped result.
Discard updates the worktree through the verified file handle and reloads the shared buffer only after the operation succeeds. Multiple windows showing the same buffer remain synchronized.