aboutsummaryrefslogtreecommitdiffstats
path: root/bundle/git-shortcuts/ftplugin/git/git_shortcuts.vim
diff options
context:
space:
mode:
Diffstat (limited to 'bundle/git-shortcuts/ftplugin/git/git_shortcuts.vim')
-rw-r--r--bundle/git-shortcuts/ftplugin/git/git_shortcuts.vim18
1 files changed, 18 insertions, 0 deletions
diff --git a/bundle/git-shortcuts/ftplugin/git/git_shortcuts.vim b/bundle/git-shortcuts/ftplugin/git/git_shortcuts.vim
new file mode 100644
index 0000000..1c844b7
--- /dev/null
+++ b/bundle/git-shortcuts/ftplugin/git/git_shortcuts.vim
@@ -0,0 +1,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>