aboutsummaryrefslogtreecommitdiffstats
path: root/bundle
diff options
context:
space:
mode:
authorTeddy Wing2019-10-27 01:05:24 +0200
committerTeddy Wing2019-10-27 22:09:26 +0100
commitc12080edc96c800edf41aa91286f923ea75f951c (patch)
tree09ef3b56d7023d57ffe7dc3e345b117f7aba3003 /bundle
parentd8607bc48b1313b9acdf03d0c80e47fdbf1ba6c6 (diff)
downloaddotvim-c12080edc96c800edf41aa91286f923ea75f951c.tar.bz2
git-shortcuts: Add commit movement omaps
Omaps for `[[` and `]]` commit motion commands.
Diffstat (limited to 'bundle')
-rw-r--r--bundle/git-shortcuts/ftplugin/git/git_shortcuts.vim9
1 files changed, 9 insertions, 0 deletions
diff --git a/bundle/git-shortcuts/ftplugin/git/git_shortcuts.vim b/bundle/git-shortcuts/ftplugin/git/git_shortcuts.vim
index 1c844b7..f57db66 100644
--- a/bundle/git-shortcuts/ftplugin/git/git_shortcuts.vim
+++ b/bundle/git-shortcuts/ftplugin/git/git_shortcuts.vim
@@ -6,13 +6,22 @@ let b:undo_ftplugin = ''
if !hasmapto('<Plug>GitShortcutsCommitBackward')
nmap <buffer> [[ <Plug>GitShortcutsCommitBackward
+ omap <buffer> [[ <Plug>GitShortcutsCommitBackward
+
let b:undo_ftplugin .= '| nunmap <buffer> [['
+ let b:undo_ftplugin .= '| ounmap <buffer> [['
endif
if !hasmapto('<Plug>GitShortcutsCommitForward')
nmap <buffer> ]] <Plug>GitShortcutsCommitForward
+ omap <buffer> ]] <Plug>GitShortcutsCommitForward
+
let b:undo_ftplugin .= '| nunmap <buffer> ]]'
+ let b:undo_ftplugin .= '| ounmap <buffer> ]]'
endif
nnoremap <buffer> <Plug>GitShortcutsCommitBackward :call git_shortcuts#CommitBackward()<CR>
nnoremap <buffer> <Plug>GitShortcutsCommitForward :call git_shortcuts#CommitForward()<CR>
+
+onoremap <buffer> <Plug>GitShortcutsCommitBackward :call git_shortcuts#CommitBackward()<CR>
+onoremap <buffer> <Plug>GitShortcutsCommitForward :call git_shortcuts#CommitForward()<CR>