aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--VERSION4
-rw-r--r--vim/after/ftplugin/mail.vim23
2 files changed, 19 insertions, 8 deletions
diff --git a/VERSION b/VERSION
index aaf629b3..06c70380 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v1.49.1
-Wed Aug 8 03:01:39 UTC 2018
+tejr dotfiles v1.50.0
+Wed Aug 8 12:50:13 UTC 2018
diff --git a/vim/after/ftplugin/mail.vim b/vim/after/ftplugin/mail.vim
index 73749893..d5f38166 100644
--- a/vim/after/ftplugin/mail.vim
+++ b/vim/after/ftplugin/mail.vim
@@ -63,7 +63,12 @@ nnoremap <buffer>
let b:undo_ftplugin .= '|nunmap <buffer> <LocalLeader>l'
" Move through quoted paragraphs like normal-mode `{` and `}`
-function! s:NewBlank(start, count, up) abort
+function! s:NewBlank(count, up, visual) abort
+
+ " Reselect visual selection
+ if a:visual
+ normal! gv
+ endif
" Flag for whether we've started a block
let l:block = 0
@@ -72,7 +77,7 @@ function! s:NewBlank(start, count, up) abort
let l:blocks = 0
" Iterate through buffer lines
- let l:num = a:start
+ let l:num = line('.')
while l:num > 0 && l:num <= line('$')
" If the line is blank
@@ -109,14 +114,20 @@ endfunction
" Maps using NewBlank() function above for quoted paragraph movement
nnoremap <buffer> <silent> <LocalLeader>[
- \ :<C-U>call <SID>NewBlank(line('.'), v:count1, 1)<CR>
+ \ :<C-U>call <SID>NewBlank(v:count1, 1, 0)<CR>
nnoremap <buffer> <silent> <LocalLeader>]
- \ :<C-U>call <SID>NewBlank(line('.'), v:count1, 0)<CR>
+ \ :<C-U>call <SID>NewBlank(v:count1, 0, 0)<CR>
onoremap <buffer> <silent> <LocalLeader>[
- \ :<C-U>call <SID>NewBlank(line('.'), v:count1, 1)<CR>
+ \ :<C-U>call <SID>NewBlank(v:count1, 1, 0)<CR>
onoremap <buffer> <silent> <LocalLeader>]
- \ :<C-U>call <SID>NewBlank(line('.'), v:count1, 0)<CR>
+ \ :<C-U>call <SID>NewBlank(v:count1, 0, 0)<CR>
+xnoremap <buffer> <silent> <LocalLeader>[
+ \ :<C-U>call <SID>NewBlank(v:count1, 1, 1)<CR>
+xnoremap <buffer> <silent> <LocalLeader>]
+ \ :<C-U>call <SID>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>]'