improve flog cp mappings

This commit is contained in:
Stefan Liebl 2022-03-14 14:15:36 +01:00
parent 582327e521
commit 7318cef45a

View File

@ -1,7 +1,13 @@
" settings for flog
nmap <buffer> <silent> rb :call flog#run_command('Git reset %h', 1, 1)<CR>
nmap <buffer> <silent> rbh :call flog#run_command('Git reset --hard %h', 1, 1)<CR>
" Only for testing
function Flog_echo_command(command, ...)
echom flog#format_command(a:command)
endfunction
nmap <buffer> <silent> cp :call flog#run_command('Git cherry-pick %h', 1, 1)<CR>
"nmap <buffer> <silent> d :call flog#run_command('Git cherry-pick %h', 1, 1)<CR>
nnoremap <buffer> <silent> rb :call flog#run_command('Git reset %h', 1, 1)<CR>
nnoremap <buffer> <silent> rbh :call flog#run_command('Git reset --hard %h', 1, 1)<CR>
nnoremap <buffer> <silent> cp :call flog#run_command('Git cherry-pick %h', 1, 1)<CR>
vnoremap <buffer> <silent> cp :<C-U>call flog#run_command("Git cherry-pick %(h'>)^..%(h'<)", 1, 1)<CR>
"vnoremap <buffer> <silent> cp :<C-U>call Flog_echo_command("Git cherry-pick %(h'>)^..%(h'<)", 1, 1)<CR>