Add file history feature similar to diffview.nvim #176

Closed
opened 2026-09-21 18:12:58 +00:00 by barrettruth · 3 comments
Owner

Original issue: barrettruth/diffs.nvim#415
Original author: Entsllor
Original date: 2026-06-18T09:56:16Z

Prerequisites

Problem

It’s often useful to quickly see how a file changed over time and jump between previous revisions. In sindrets/diffview.nvim this is available via the :DiffviewFileHistory % command (see https://github.com/sindrets/diffview.nvim#file-history), which shows the full commit history for the current file and lets you inspect changes per commit. I currently just use git log -p but it’s not as convenient.

Proposed solution

I’d like something like :Diff history % that opens a file history view for the current buffer. It should let me browse previous commits affecting the file and view the diff between the current state and a selected commit. Navigation between commits could be handled via keymaps or a small split panel at the bottom (similar to diffview.nvim’s file history UI).

Thanks for the plugin, I really like it.

Alternatives considered

No response

> Original issue: barrettruth/diffs.nvim#415 > Original author: `Entsllor` > Original date: 2026-06-18T09:56:16Z ### Prerequisites - [x] I have searched [existing issues](https://github.com/barrettruth/diffs.nvim/issues) ### Problem It’s often useful to quickly see how a file changed over time and jump between previous revisions. In sindrets/diffview.nvim this is available via the `:DiffviewFileHistory %` command (see https://github.com/sindrets/diffview.nvim#file-history), which shows the full commit history for the current file and lets you inspect changes per commit. I currently just use `git log -p` but it’s not as convenient. ### Proposed solution I’d like something like `:Diff history %` that opens a file history view for the current buffer. It should let me browse previous commits affecting the file and view the diff between the current state and a selected commit. Navigation between commits could be handled via keymaps or a small split panel at the bottom (similar to diffview.nvim’s file history UI). Thanks for the plugin, I really like it. ### Alternatives considered _No response_
barrettruth 2026-09-21 18:12:58 +00:00
Author
Owner

Original comment: barrettruth/diffs.nvim#415, comment 4742235058
Original author: justinmk
Original date: 2026-06-18T13:08:02Z

isn't this the role of your git plugin (vim-fugitive etc)?

> Original comment: barrettruth/diffs.nvim#415, comment 4742235058 > Original author: `justinmk` > Original date: 2026-06-18T13:08:02Z isn't this the role of your git plugin (vim-fugitive etc)?
Author
Owner

Original comment: barrettruth/diffs.nvim#415, comment 4744110903
Original author: Entsllor
Original date: 2026-06-18T16:35:32Z

Yeah, vim-fugitive would work here, but I don't use it.

I used to rely on gitsigns, diffview.nvim, and the Git CLI in a separate tmux pane. About a week ago I switched from diffview.nvim to diffs.nvim because I find it more convenient overall.

The only feature I currently miss is DiffviewFileHistory. I realize this may be a fairly niche use case and that this functionality might be considered outside the scope of the plugin, so I completely understand if the feature request is declined

> Original comment: barrettruth/diffs.nvim#415, comment 4744110903 > Original author: `Entsllor` > Original date: 2026-06-18T16:35:32Z Yeah, vim-fugitive would work here, but I don't use it. I used to rely on gitsigns, diffview.nvim, and the Git CLI in a separate tmux pane. About a week ago I switched from diffview.nvim to diffs.nvim because I find it more convenient overall. The only feature I currently miss is DiffviewFileHistory. I realize this may be a fairly niche use case and that this functionality might be considered outside the scope of the plugin, so I completely understand if the feature request is declined
Author
Owner

Original comment: barrettruth/diffs.nvim#415, comment 4744505726
Original author: barrettruth
Original date: 2026-06-18T17:26:56Z

This is out of scope. Also note that if you use a picker (very likely) you can simply open up something like the "buffer gitcommits" file picker, send the files to the qfl/loclist, and then browse.

You could also probably write up a 20 line function that just populates the qfl too.

> Original comment: barrettruth/diffs.nvim#415, comment 4744505726 > Original author: `barrettruth` > Original date: 2026-06-18T17:26:56Z This is out of scope. Also note that if you use a picker (very likely) you can simply open up something like the "buffer gitcommits" file picker, send the files to the qfl/loclist, and then browse. You could also probably write up a 20 line function that just populates the qfl too.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
barrettruth/diffs.nvim#176
No description provided.