Skip to content

Commit 852f527

Browse files
committed
manual: add a section about navigating blame/diff views
This functionality, in particular the relevance and usefulness of the `,` and `b` commands in the blame or diff views, was previously hard to discover except by experimentation. I hope documenting it will let more people take advantage of it. See also #1315.
1 parent b5f6193 commit 852f527

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

doc/manual.adoc

+24
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,30 @@ be appended:
248248
[main] 77d9e40fbcea3238015aea403e06f61542df9a31 - commit 1 of 779 loading 5s 0%
249249
-------------------------------------------------------------------------------
250250

251+
[[blame]]
252+
Blame and diff navigation
253+
~~~~~~~~~~~~~~~~~~~~~~~~~
254+
255+
Tig allows quick navigation between blame views and related diff views.
256+
257+
In the diff view, navigating to an added line in a diff and pressing
258+
'b' will open the blame view of the commit that was shown and select
259+
the corresponding line in that view. Navigating to a removed line in the
260+
diff and pressing 'b' takes you to the blame view of the parent commit.
261+
262+
The blame view can also be opened directly with the 'tig blame' command.
263+
264+
In the blame view, the blame commit for the current line is considered
265+
"selected", and is shown in the status bar. In this view, the 'b'
266+
command will jump to the corresponding line in the blame view for that
267+
commit. The ',' AKA ':parent' command will jump to the corresponding line
268+
in the parent of the blame commit (or the nearest line Tig can find,
269+
if there is no corresponding line). The '<' AKA ':back' command can be
270+
used to undo jumps within the blame view.
271+
272+
Pressing 'Enter' in the blame view will take you to the corresponding
273+
line in the diff of the blamed commit.
274+
251275
[[env-variables]]
252276
Environment Variables
253277
---------------------

0 commit comments

Comments
 (0)