aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-14 00:07:42 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-14 00:07:42 +1200
commitd506a6c502faaa24303e1be93a6f7ef88722183d (patch)
treeb44463262e98c138b61323a52efe4f8b80892a3e /vim/after/ftplugin
parentfdc778f9d1aa54a5718595a1b5559d95368a06a9 (diff)
downloaddotfiles-d506a6c502faaa24303e1be93a6f7ef88722183d.tar.gz
dotfiles-d506a6c502faaa24303e1be93a6f7ef88722183d.zip
Revert "Use shorter :map commands for diff/mail...
This reverts commit bcad400. It breaks visual mode and operator mode operations, which should have been obvious.
Diffstat (limited to 'vim/after/ftplugin')
-rw-r--r--vim/after/ftplugin/diff.vim24
-rw-r--r--vim/after/ftplugin/mail.vim24
2 files changed, 32 insertions, 16 deletions
diff --git a/vim/after/ftplugin/diff.vim b/vim/after/ftplugin/diff.vim
index 8c3d5b1d..f9f6c4b3 100644
--- a/vim/after/ftplugin/diff.vim
+++ b/vim/after/ftplugin/diff.vim
@@ -4,16 +4,24 @@ if exists('no_plugin_maps') || exists('no_diff_maps')
endif
" Maps using autoloaded function for quoted block movement
-noremap <buffer> <silent> <LocalLeader>[
+nnoremap <buffer> <silent> <LocalLeader>[
\ :<C-U>call diff#MoveBlock(v:count1, 1, 0)<CR>
-sunmap <buffer> <LocalLeader>[
-noremap <buffer> <silent> <LocalLeader>]
+nnoremap <buffer> <silent> <LocalLeader>]
\ :<C-U>call diff#MoveBlock(v:count1, 0, 0)<CR>
-sunmap <buffer> <LocalLeader>]
-let b:undo_ftplugin .= '|smap <buffer> <LocalLeader>] <nop>'
- \ . '|unmap <buffer> <LocalLeader>]'
- \ . '|smap <buffer> <LocalLeader>] <nop>'
- \ . '|unmap <buffer> <LocalLeader>]'
+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 for diff pruning plugin
nmap <buffer> <LocalLeader>p
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim
index 85b7affd..cfb738a1 100644
--- a/vim/after/ftplugin/mail.vim
+++ b/vim/after/ftplugin/mail.vim
@@ -114,13 +114,21 @@ let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>Q'
\ . '|xunmap <buffer> <LocalLeader>Q'
" Maps using autoloaded function for quoted paragraph movement
-noremap <buffer> <silent> <LocalLeader>[
+nnoremap <buffer> <silent> <LocalLeader>[
\ :<C-U>call mail#NewBlank(v:count1, 1, 0)<CR>
-sunmap <buffer> <LocalLeader>[
-noremap <buffer> <silent> <LocalLeader>]
+nnoremap <buffer> <silent> <LocalLeader>]
\ :<C-U>call mail#NewBlank(v:count1, 0, 0)<CR>
-sunmap <buffer> <LocalLeader>]
-let b:undo_ftplugin .= '|smap <buffer> <LocalLeader>] <nop>'
- \ . '|unmap <buffer> <LocalLeader>]'
- \ . '|smap <buffer> <LocalLeader>] <nop>'
- \ . '|unmap <buffer> <LocalLeader>]'
+onoremap <buffer> <silent> <LocalLeader>[
+ \ :<C-U>call mail#NewBlank(v:count1, 1, 0)<CR>
+onoremap <buffer> <silent> <LocalLeader>]
+ \ :<C-U>call mail#NewBlank(v:count1, 0, 0)<CR>
+xnoremap <buffer> <silent> <LocalLeader>[
+ \ :<C-U>call mail#NewBlank(v:count1, 1, 1)<CR>
+xnoremap <buffer> <silent> <LocalLeader>]
+ \ :<C-U>call mail#NewBlank(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>]'