Variable: magit-diff-section-map
magit-diff-section-map is a variable defined in magit-diff.el.
Value
magit-apply
magit-diff-visit-file
magit-discard
magit-file-rename
magit-file-untrack
magit-reverse
magit-stage
magit-unstage
& magit-do-async-shell-command
<1> <magit-menu-format-desc> nil
<2> <magit-menu-format-desc> nil
<3> <magit-menu-format-desc> nil
<4> <magit-menu-format-desc> nil
<5> <magit-menu-format-desc> nil
<7> <magit-menu-format-desc> nil
C magit-commit-add-log
C-<return> magit-diff-visit-worktree-file
C-c C-e magit-diff-edit-hunk-commit
C-c C-t magit-diff-trace-definition
C-j magit-diff-visit-worktree-file
C-x 4 <return> magit-diff-visit-file-other-window
C-x 4 a magit-add-change-log-entry-other-window
C-x 5 <return> magit-diff-visit-file-other-frame
C-x a magit-add-change-log-entry
Documentation
Keymap for diff sections.
The classes magit-file-section(var)/magit-file-section(fun) and magit-hunk-section(var)/magit-hunk-section(fun) derive
from the abstract magit-diff-section(var)/magit-diff-section(fun) class. Accordingly this
keymap is the parent of their keymaps.
Aliases
magit-diff-section-base-map (obsolete since Magit 4.0.0)
Source Code
;; Defined in ~/.emacs.d/elpa/magit-20260411.1452/magit-diff.el
(defvar-keymap magit-diff-section-map
:doc "Keymap for diff sections.
The classes `magit-file-section' and `magit-hunk-section' derive
from the abstract `magit-diff-section' class. Accordingly this
keymap is the parent of their keymaps."
"C-j" #'magit-diff-visit-worktree-file
"C-<return>" #'magit-diff-visit-worktree-file
"C-x 4 <return>" #'magit-diff-visit-file-other-window
"C-x 5 <return>" #'magit-diff-visit-file-other-frame
"&" #'magit-do-async-shell-command
"C" #'magit-commit-add-log
"C-x a" #'magit-add-change-log-entry
"C-x 4 a" #'magit-add-change-log-entry-other-window
"C-c C-t" #'magit-diff-trace-definition
"C-c C-e" #'magit-diff-edit-hunk-commit
"<remap> <magit-file-rename>" #'magit-file-rename
"<remap> <magit-file-untrack>" #'magit-file-untrack
"<remap> <magit-visit-thing>" #'magit-diff-visit-file
"<remap> <magit-revert-no-commit>" #'magit-reverse
"<remap> <magit-delete-thing>" #'magit-discard
"<remap> <magit-unstage-files>" #'magit-unstage
"<remap> <magit-stage-files>" #'magit-stage
"<remap> <magit-cherry-apply>" #'magit-apply
"<8>" (magit-menu-item "Rename file" #'magit-file-rename
'(:enable (eq (magit-diff-scope) 'file)))
"<7>" (magit-menu-item "Untrack %x" #'magit-file-untrack)
"<6>" (magit-menu-item "Visit file" #'magit-diff-visit-file
'(:enable (memq (magit-diff-scope) '(file files))))
"<5>" (magit-menu-item "Reverse %x" #'magit-reverse
'(:enable (not (memq (magit-diff-type)
'(untracked unstaged)))))
"<4>" (magit-menu-item "Discard %x" #'magit-discard
'(:enable (not (memq (magit-diff-type)
'(committed undefined)))))
"<3>" (magit-menu-item "Unstage %x" #'magit-unstage
'(:enable (eq (magit-diff-type) 'staged)))
"<2>" (magit-menu-item "Stage %x" #'magit-stage
'(:enable (eq (magit-diff-type) 'unstaged)))
"<1>" (magit-menu-item "Apply %x" #'magit-apply
'(:enable (not (memq (magit-diff-type)
'(unstaged staged))))))