NeogitOrg / neogit

An interactive and powerful Git interface for Neovim, inspired by Magit
MIT License
3.71k stars 221 forks source link

`ZZ`/`ZQ` shortcuts for rebase message editor #1296

Closed chuckhousley closed 2 months ago

chuckhousley commented 2 months ago

nvim nightly, neogit master as of this evening Is your feature request related to a problem? Please describe. Feature parity with magit, expected behavior within nvim. Currently ZZ in a rebase message buffer does not edit the commit message but instead creates a new commit.

Describe the solution you'd like Select a commit and use the [r]ebase -> re[w]ord action Pressing ZZ in normal mode (the vim "write and quit" shortcut) within the buffer should behave as does and perform the reword action instead of creating a new commit. ZQ should behave as <c-c><c-k> does. If the reword buffer has been manually saved, ZQ will quit and create a new commit with the saved buffer as the message, <c-c><c-k> discards the new rewritten message even if the buffer was manually saved.

Describe alternatives you've considered I have added the mappings to the rebase_editor map in lua/neogit/config.lua, this seems to match the behavior I am expecting but I haven't tested beyond a few commits.

Thanks

CKolkey commented 2 months ago

Good catch, thanks