after/ftplugin/gitrebase.vim

Enforce vim script implementation to reduce ambiguities and improve robustness:

scriptversion 4

Use my custom maps:

call keymaps#mnemonic_map('rebase', #{buffer: v:true, local: v:true})

for s:verb in ['Cycle', 'Edit', 'Fixup', 'Pick', 'Reword', 'Squash']
    execute printf('nnoremap <buffer> [rebase]%s <Cmd>%s<CR>',
    \              tolower(s:verb[0]), s:verb)
endfor
Example result of calling :Switch

Add quick bindings to cycle available options using switch.vim as it supports directions:

nnoremap <buffer> { <Cmd>SwitchReverse<CR>
nnoremap <buffer> } <Cmd>Switch<CR>

Note

This obviously shadows immensely useful bindings, but they aren’t very useful in this instance because of the git rebase template.