aboutsummaryrefslogtreecommitdiffstats
path: root/bundle/git-shortcuts/ftplugin/git/git_shortcuts.vim
blob: 1c844b71c73121e29f911ff52f80978e5ca148f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
if exists('g:no_plugin_maps') || exists('g:no_git_shortcut_maps')
	finish
endif

let b:undo_ftplugin = ''

if !hasmapto('<Plug>GitShortcutsCommitBackward')
	nmap <buffer> [[ <Plug>GitShortcutsCommitBackward
	let b:undo_ftplugin .= '| nunmap <buffer> [['
endif

if !hasmapto('<Plug>GitShortcutsCommitForward')
	nmap <buffer> ]] <Plug>GitShortcutsCommitForward
	let b:undo_ftplugin .= '| nunmap <buffer> ]]'
endif

nnoremap <buffer> <Plug>GitShortcutsCommitBackward :call git_shortcuts#CommitBackward()<CR>
nnoremap <buffer> <Plug>GitShortcutsCommitForward :call git_shortcuts#CommitForward()<CR>