aboutsummaryrefslogtreecommitdiff
path: root/vim/after/ftplugin
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
parentc8c890ba9203f77e56688e559cb7d65b67665188 (diff)
downloaddotfiles-bcad40034e1e472f18adcfec48998d114d3618be.tar.gz
dotfiles-bcad40034e1e472f18adcfec48998d114d3618be.zip
Use shorter :map commands for diff/mail para nav
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, 16 insertions, 32 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
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim
index cfb738a1..85b7affd 100644
--- a/vim/after/ftplugin/mail.vim
+++ b/vim/after/ftplugin/mail.vim
@@ -114,21 +114,13 @@ let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>Q'
\ . '|xunmap <buffer> <LocalLeader>Q'
" Maps using autoloaded function for quoted paragraph movement
-nnoremap <buffer> <silent> <LocalLeader>[
+noremap <buffer> <silent> <LocalLeader>[
\ :<C-U>call mail#NewBlank(v:count1, 1, 0)<CR>
-nnoremap <buffer> <silent> <LocalLeader>]
+sunmap <buffer> <LocalLeader>[
+noremap <buffer> <silent> <LocalLeader>]
\ :<C-U>call mail#NewBlank(v:count1, 0, 0)<CR>
-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>]'
+sunmap <buffer> <LocalLeader>]
+let b:undo_ftplugin .= '|smap <buffer> <LocalLeader>] <nop>'
+ \ . '|unmap <buffer> <LocalLeader>]'
+ \ . '|smap <buffer> <LocalLeader>] <nop>'
+ \ . '|unmap <buffer> <LocalLeader>]'