How to reset hunk under cursor? #2256
-
Contributing guidelines
Module(s)mini.diff QuestionI was wondering how to setup mini.diff keymap to reset the hunk under my cursors. Any attempt i have resets the hunk at the current line (not the entire hunk) or resets all hunks in buffer. Similar to how gitsigns works with hunks |
Beta Was this translation helpful? Give feedback.
Answered by
echasnovski
Feb 3, 2026
Replies: 1 comment
-
|
'mini.diff' defines a set of mappings. Among them are:
So to reset hunk under cursor with default mappings, type |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
echasnovski
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
'mini.diff' defines a set of mappings. Among them are:
mappings.resetkeys can be used to reset hunks inside visual/operator region.". By default it isgH.mappings.textobjectkeys define 'hunk range under cursor' textobject which can be used in Operator-pending mode as target for operator (like d, y, apply/reset hunks, etc.).". By default it isgh.So to reset hunk under cursor with default mappings, type
gHgh(apply reset operator forghtextobject). Tip: it is dot-repeatable; meaning you can typegHgh, navigate to the next hunk with]h, and press.to reset it.