-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgitlogdiff.txt
More file actions
124 lines (74 loc) · 3.43 KB
/
gitlogdiff.txt
File metadata and controls
124 lines (74 loc) · 3.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
*gitlogdiff.txt* Recent Git commits and diffs
==============================================================================
INTRODUCTION *gitlogdiff-intro*
A tiny Neovim plugin that shows a simple, keyboard‑driven list of recent Git commits and lets you diff them quickly via Diffview.
Works great for: “show me the last N commits, let me pick one (or two) and open the diff”.
!Preview
==============================================================================
FEATURES *gitlogdiff-features*
- Lists recent commits using git log (configurable max_count)
- Toggle selection with space, navigate with j/k
- Press Enter to open diffs in diffview.nvim
- 1 selected commit → diff that commit against its parent (<hash>^..<hash>)
- 2 selected commits → diff between the two commits
==============================================================================
REQUIREMENTS *gitlogdiff-requirements*
- Neovim ≥ 0.10 (uses vim.system)
- Git available on your $PATH
- Dependencies:
- sindrets/diffview.nvim
==============================================================================
INSTALLATION *gitlogdiff-installation*
lazy.nvim *gitlogdiff-lazy.nvim*
>
{
"Salanoid/gitlogdiff.nvim",
main = "gitlogdiff",
dependencies = {
"sindrets/diffview.nvim",
},
cmd = "GitLogDiff",
opts = { max_count = 300 },
}
<
packer.nvim *gitlogdiff-packer.nvim*
>
use({
"Salanoid/gitlogdiff.nvim",
requires = {
"sindrets/diffview.nvim",
},
config = function()
require("gitlogdiff").setup({
max_count = 300,
})
end,
})
<
Note: This plugin defines the :GitLogDiff command on load. If your plugin manager pre-defines lazy command stubs, gitlogdiff.nvim will safely overwrite them (we create the command with force = true).
==============================================================================
USAGE *gitlogdiff-usage*
- Run :GitLogDiff inside a Git repository
- Navigate with j/k
- Toggle selection with <space>
- Press <CR> to open diffs in Diffview
- Press q to close the list
==============================================================================
CONFIGURATION *gitlogdiff-configuration*
>
require("gitlogdiff").setup({
max_count = 300, -- how many commits to list
})
<
==============================================================================
TROUBLESHOOTING *gitlogdiff-troubleshooting*
- “No git commits found”: you are likely not in a Git repo (or max_count is 0)
- “git log failed …”: check that git is installed and available in $PATH
==============================================================================
ROADMAP / NOTES *gitlogdiff-roadmap-notes*
- Should work with other diff viwers plugins for example with: esmuellert/codediff.nvim: https://github.com/esmuellert/codediff.nvim
==============================================================================
LICENSE *gitlogdiff-license*
MIT — see LICENSE.
sindrets/diffview.nvim: https://github.com/sindrets/diffview.nvim
vim:tw=78:ts=8:ft=help:norl: