Magit Keys

From Coder Merlin
Revision as of 22:55, 15 February 2021 by Chukwuemeka-tinashe (talk | contribs) (Created page with "== Overview == {{KeySymbology}} == Status Window == {| class='wikitable' ! Cursor Location ! Key Sequence ! Purpose |- | Anywhere | {{SpecialKey|CONTROL|x}} {{Key|g}} | O...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Within these castle walls be forged Mavens of Computer Science ...
— Merlin, The Coder

Overview[edit]

  • A key sequence will be displayed as a series of keys, presented from left to right in the order that each key should be pressed. A space character will separate each of these keys. For example, if the key sequence is q u, this indicates that you should press and release the q key, and then press and release the u key.
  • In some cases, a key sequence requires that a key be pressed with a modifier. In these cases, the modifier will appear first, followed by a hyphen, followed by the second key. A very common modifier is SHIFT. For example, SHIFT-Q would indicate that you first press (and hold) the SHIFT key, then press and release the Q key, then release the SHIFT key. However, because the need to use the shift key is apparent based on the character required, we generally won't show the need for this modifier. As an example, if the required sequence is 4, you'd simply press and release the 4 key. However, if the required sequence is $, you'd need to press and hold the SHIFT key, press and release the $ key, and then release the SHIFT key. All other modifier keys will be displayed explicitly.
  • The sequence CONTROL-u indicates that you first press (and hold) the CONTROL key, then press and release the u key, then release the CONTROL key. The emacs manual will refer to this sequence as C-u.
  • The sequence ALT-x indicates that you first press (and hold) the ALT key, then press and release the x key, then release the ALT key. The emacs manual will refer to this sequence as M-x.
  • If there is a space rather than a dash between keys, the first key must be released before pressing the next key. For example, ESC x indicates that the ESC key should be pressed and released, and then the x key should be pressed and released.
  • There are some cases which require two modifier keys. As an example, the sequence CONTROL-SHIFT-_ indicates that you should first press and hold the CONTROL key, then press and hold the SHIFT key, then press and release the _ key, and then release the other two modifier keys.

Status Window[edit]

Cursor Location Key Sequence Purpose
Anywhere CONTROL-x g Open Magit status window
Anywhere ? Help
Status window, section header TAB Expands/collapses section
Status window, file TAB Expands/collapses diff
Status window, commit ENTER Displays commit details and diffs in new window
Status window l Displays log menu
Status window, unstaged changes s stage changes
Status window, staged changes u unstage changes
Status window S stage all changes
Status window U unstage all changes
Status window c Displays commit menu
Status window P Displays push menu
Status window q quit status window

Commit History Window[edit]

Cursor Location Key Sequence Purpose
Anywhere q quit commit history window

(New) Commit Window[edit]

Cursor Location Key Sequence Purpose
Anywhere CONTROL-c CONTROL-c complete commit