aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin/diff.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-07 01:11:16 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-07 01:11:46 +1200
commitbcad40034e1e472f18adcfec48998d114d3618be (patch)
treefe74dfee4c272769aaa53eab20da216a8757515c /vim/after/ftplugin/diff.vim
parentAdjust quoting in mail greeting match (diff)
downloaddotfiles-bcad40034e1e472f18adcfec48998d114d3618be.tar.gz
dotfiles-bcad40034e1e472f18adcfec48998d114d3618be.zip
Use shorter :map commands for diff/mail para nav
Diffstat (limited to 'vim/after/ftplugin/diff.vim')
-rw-r--r--vim/after/ftplugin/diff.vim24
1 files changed, 8 insertions, 16 deletions
diff --git a/vim/after/ftplugin/diff.vim b/vim/after/ftplugin/diff.vim
index f9f6c4b3..8c3d5b1d 100644
--- a/vim/after/ftplugin/diff.vim
+++ b/vim/after/ftplugin/diff.vim
@@ -4,24 +4,16 @@ if exists('no_plugin_maps') || exists('no_diff_maps')
endif
" Maps using autoloaded function for quoted block movement
-nnoremap <buffer> <silent> <LocalLeader>[
+noremap <buffer> <silent> <LocalLeader>[
\ :<C-U>call diff#MoveBlock(v:count1, 1, 0)<CR>
-nnoremap <buffer> <silent> <LocalLeader>]
+sunmap <buffer> <LocalLeader>[
+noremap <buffer> <silent> <LocalLeader>]
\ :<C-U>call diff#MoveBlock(v:count1, 0, 0)<CR>
-onoremap <buffer> <silent> <LocalLeader>[
- \ :<C-U>call diff#MoveBlock(v:count1, 1, 0)<CR>
-onoremap <buffer> <silent> <LocalLeader>]
- \ :<C-U>call diff#MoveBlock(v:count1, 0, 0)<CR>
-xnoremap <buffer> <silent> <LocalLeader>[
- \ :<C-U>call diff#MoveBlock(v:count1, 1, 1)<CR>
-xnoremap <buffer> <silent> <LocalLeader>]
- \ :<C-U>call diff#MoveBlock(v:count1, 0, 1)<CR>
-let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>['
- \ . '|nunmap <buffer> <LocalLeader>]'
- \ . '|ounmap <buffer> <LocalLeader>['
- \ . '|ounmap <buffer> <LocalLeader>]'
- \ . '|xunmap <buffer> <LocalLeader>['
- \ . '|xunmap <buffer> <LocalLeader>]'
+sunmap <buffer> <LocalLeader>]
+let b:undo_ftplugin .= '|smap <buffer> <LocalLeader>] <nop>'
+ \ . '|unmap <buffer> <LocalLeader>]'
+ \ . '|smap <buffer> <LocalLeader>] <nop>'
+ \ . '|unmap <buffer> <LocalLeader>]'
" Set mappings for diff pruning plugin
nmap <buffer> <LocalLeader>p