Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

collapsing all diffs in magit?

Tags:

emacs

magit

Sometimes in a long commit log, it's really painful to navigate the all-expanded diffs.

(You get expanded-diffs when hitting enter from the magit-blame-mode for example)

Is there a way to collapse these diffs?

like image 469
eugene Avatar asked Jan 11 '23 05:01

eugene


1 Answers

In any buffer you can type C-hm to see the major and minor mode descriptions, which almost always includes the key bindings defined by each mode (and if it doesn't, you can type C-hb and then search for the mode you're interested in).

Major mode magit-diff-mode includes the following bindings:

M-1     magit-show-level-1-all
M-2     magit-show-level-2-all
M-3     magit-show-level-3-all
M-4     magit-show-level-4-all
M-H     magit-show-only-files-all
M-S     magit-show-level-4-all
M-g     magit-goto-diffstats
M-h     magit-show-only-files
M-n     magit-goto-next-sibling-section
M-p     magit-goto-previous-sibling-section
M-s     magit-show-level-4
like image 55
phils Avatar answered Jan 19 '23 05:01

phils