aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-08-09 00:50:13 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-08-09 00:50:13 +1200
commit2ed973e19f38587871b5988c692f882a32376ff8 (patch)
tree5c0cccb2a2a40615685380396de6742b4dadd2dc
parentda3e1b2df154d82c9bb00dcc2209d5aaac04da8e (diff)
parent2404c5b5df8a6a993add974cc80af840ec278293 (diff)
downloaddotfiles-2ed973e19f38587871b5988c692f882a32376ff8.tar.gz
Merge branch 'release/v1.50.0'v1.50.0
* release/v1.50.0: Bump VERSION Adjust ,[ and ,] maps to add visual mode Bump VERSION
-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>]'