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.vim28
-rw-r--r--vim/after/ftplugin/perl.vim9
3 files changed, 24 insertions, 37 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 e84702f0..85b7affd 100644
--- a/vim/after/ftplugin/mail.vim
+++ b/vim/after/ftplugin/mail.vim
@@ -15,13 +15,13 @@ if line('.') == 1 && col('.') == 1
while getline('.') =~? '^> *'
\ . '\%('
\ . '\%('
- \ . "g['\u2019]\\=day"
+ \ . 'g[''\u2019]\=day'
\ . '\|\%(good \)\=\%(morning\|afternoon\|evening\)'
\ . '\|h[eu]\%(ll\|rr\)o\+'
\ . '\|hey\+'
\ . '\|hi\+'
\ . '\|sup'
- \ . "\\|what['\u2019]\\=s up"
+ \ . '\|what[''\u2019]\=s up'
\ . '\|yo'
\ . '\)'
\ . '[[:punct:] ]*'
@@ -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>]'
diff --git a/vim/after/ftplugin/perl.vim b/vim/after/ftplugin/perl.vim
index d1e5dd52..a303fa75 100644
--- a/vim/after/ftplugin/perl.vim
+++ b/vim/after/ftplugin/perl.vim
@@ -18,9 +18,12 @@ if exists('no_plugin_maps') || exists('no_perl_maps')
endif
" Add boilerplate intelligently
-nnoremap <buffer> <silent> <LocalLeader>b
- \ :<C-U>call perl#Boilerplate()<CR>
-let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>b'
+command -buffer Boilerplate
+ \ call perl#Boilerplate()
+nnoremap <buffer> <LocalLeader>b
+ \ :<C-U>Boilerplate<CR>
+let b:undo_ftplugin .= '|delcommand Boilerplate'
+ \ . '|nunmap <buffer> <LocalLeader>b'
" Mappings to choose compiler
nnoremap <buffer> <LocalLeader>c