Accidentally stumbled upon a hidden vim feature. The normal mode key shortcuts responsible for increasing the number, Ctrl+a (increment) and for decreasing the number following the cursor, Ctrl+x (decrement) do something different during the interactive rebase editor. Watch for yourself:
Instead of affecting the numbers it affects the rebase command under the cursor. Specifically, it rotates the following rebase commands in the normal and opposite direction respectively:
pick
, edit
, fixup
, squash
, reword
, drop
I have no git plug-ins enabled, but will yet have to confirm the exact
scenario when this feature is enabled or not. Not sure if terribly handy,
as it is quite easy to just do jjciwr
for rewording the third commit for
instance, but still interesting.
Links
- https://vim.fandom.com/wiki/Increasing_or_decreasing_numbers
- https://git-scm.com/docs/git-rebase#_interactive_mode
This is a 99th post of #100daystooffload.