[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 2024-08-19 Emacs news
From: |
James Thomas |
Subject: |
Re: 2024-08-19 Emacs news |
Date: |
Sun, 01 Sep 2024 04:58:12 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Sacha Chua wrote:
> * I wrote a short vc-mode tutorial (Reddit)
Some of my tricks (about which i've mailed the author) are listed:
1.
> you can drop a hunk using k, or split it using C-c C-s.
Complicated partial commits are also possible. Consider such a diff:
context1
context2
-deletion1
-deletion2
-deletion3
+addition1
+addition2
+addition3
context3
context4
If you want to commit only the, say, upper part, you can change it to:
context1
context2
-deletion1
-deletion2
+addition1
+addition2
deletion3
context3
context4
Apart from the normal editing commands, C-x r t may be used to change
the 1st character of the lines between +/-/space instantaneously: this
makes sure the header counts are not turned off (btw you can undo if
that happens), which is good as an indicator of an invalid diff .
2. C-x v g a a a... (Historical line-by-line git blame)
Of course, ICYDK, you can use C-x x u before the 'a', to keep that
buffer around.
3. C-x v ! C-x v L, add: -G"search term", RET (commit search)
4. C-x v ! in general, for slight modifications. For e.g. to compare a
stash with the worktree, stash the latter (z s) and use this prefix
before '=' on the former and change the command to "git diff ..." etc.
Bonus: I've C-h RET (actually <F1> RET) bound to a lambda (man
(Man-default-man-entry)) for quick look up in the command-editing
minibuffer (because "minibuffer within a minibuffer" is impossible).
--
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: 2024-08-19 Emacs news,
James Thomas <=