Skip to content

Diff Viewer and Gutter

Loky edited this page Oct 4, 2026 · 1 revision

Diff Viewer and Gutter

Color diff gutter

Modified and added lines are marked in the script editor's gutter (from git diff -U0 against HEAD). It updates on save, on editor focus, and with the Refresh Diff Gutter button. Click a marker to open the matching hunk in the diff viewer. Tracked files only.

Diff viewer (bottom panel: Gitot Diff)

Read-only unified diff of the current script against HEAD:

  • Foldable hunks with @@ headers, basic syntax highlighting.
  • Separate +/- gutter and real source line numbers, color-coded lines.
  • File path label at the top. Outdated results are discarded if you change script tab before the diff arrives.

Commit history (dock fold)

Recent commits (message, author, date), filterable to 10 / 20 / 30. Auto-refreshes after commit, push, pull and switch. Selecting a commit (click or arrow keys) opens it in the diff viewer:

  1. The panel lists the commit's changed files (colored A / M / D).
  2. Pick a file to load its diff (fetched on demand, so big commits stay fast).
  3. Click the commit header to copy its hash.

Single file diffs are truncated at 200,000 characters. Clicking a gutter marker returns the viewer to working-tree mode.

Restore file

In commit mode, restore the selected file to its content at that commit (git restore --source=<hash> -- <path>). A confirmation warns that uncommitted changes to the file are lost. If the file is open, the class reloads but the tab text refreshes on the next editor focus change.

Limits (merge commits, binary files, non-ASCII names): Troubleshooting.

Clone this wiki locally