aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin
diff options
context:
space:
mode:
Diffstat (limited to 'vim/after/ftplugin')
-rw-r--r--vim/after/ftplugin/diff.vim24
-rw-r--r--vim/after/ftplugin/mail.vim2
2 files changed, 20 insertions, 6 deletions
diff --git a/vim/after/ftplugin/diff.vim b/vim/after/ftplugin/diff.vim
index eecc8b8c..a52b3fdd 100644
--- a/vim/after/ftplugin/diff.vim
+++ b/vim/after/ftplugin/diff.vim
@@ -8,11 +8,25 @@ if exists('g:no_plugin_maps') || exists('g:no_diff_maps')
finish
endif
-" Modify curly braces to navigate by diff block
-nnoremap <buffer> { ?^@@<CR>
-nnoremap <buffer> } /^@@<CR>
-let b:undo_ftplugin .= '|nunmap <buffer> {'
- \ . '|nunmap <buffer> }'
+" Maps using autoloaded function for quoted block movement
+nnoremap <buffer> <silent> <LocalLeader>[
+ \ :<C-U>call diff#MoveBlock(v:count1, 1, 0)<CR>
+nnoremap <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>]'
" Set mappings
nmap <buffer> <LocalLeader>p
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim
index 4b6c827c..3aa3fec3 100644
--- a/vim/after/ftplugin/mail.vim
+++ b/vim/after/ftplugin/mail.vim
@@ -64,7 +64,7 @@ let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>Q'
\ . '|nunmap <buffer> <LocalLeader>QQ'
\ . '|xunmap <buffer> <LocalLeader>Q'
-" Maps using NewBlank() function above for quoted paragraph movement
+" Maps using autoloaded function for quoted paragraph movement
nnoremap <buffer> <silent> <LocalLeader>[
\ :<C-U>call mail#NewBlank(v:count1, 1, 0)<CR>
nnoremap <buffer> <silent> <LocalLeader>]