Skip to content

Commit

Permalink
Add fixup to gitrebase cycling
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed Feb 14, 2010
1 parent 5fdd2dc commit bda9f09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ftplugin/gitrebase.vim
Expand Up @@ -21,13 +21,14 @@ function! s:choose(word)
endfunction

function! s:cycle()
call s:choose(get({'s':'edit','p':'squash','e':'reword'},getline('.')[0],'pick'))
call s:choose(get({'s':'edit','p':'squash','e':'reword','r':'fixup'},getline('.')[0],'pick'))
endfunction

command! -buffer -bar Pick :call s:choose('pick')
command! -buffer -bar Squash :call s:choose('squash')
command! -buffer -bar Edit :call s:choose('edit')
command! -buffer -bar Reword :call s:choose('reword')
command! -buffer -bar Fixup :call s:choose('fixup')
command! -buffer -bar Cycle :call s:cycle()
" The above are more useful when they are mapped; for example:
"nnoremap <buffer> <silent> S :Cycle<CR>
Expand Down

0 comments on commit bda9f09

Please sign in to comment.