aboutsummaryrefslogtreecommitdiff
path: root/plugin/put_blank_lines.vim
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/put_blank_lines.vim')
-rw-r--r--plugin/put_blank_lines.vim34
1 files changed, 6 insertions, 28 deletions
diff --git a/plugin/put_blank_lines.vim b/plugin/put_blank_lines.vim
index b64fb0b..ede964a 100644
--- a/plugin/put_blank_lines.vim
+++ b/plugin/put_blank_lines.vim
@@ -1,7 +1,6 @@
"
" put_blank_lines.vim: Provide plugin maps to put blank lines above or below
-" the current line. The guts of this is backported from Tim Pope's
-" unimpaired.vim plugin, and still uses repeat.vim if it can find it.
+" the current line.
"
" Author: Tom Ryder <tom@sanctum.geek.nz>
" License: Same as Vim itself
@@ -9,35 +8,14 @@
if exists('g:loaded_put_blank_lines') || &compatible
finish
endif
-if v:version < 600
+if v:version < 700
finish
endif
let g:loaded_put_blank_lines = 1
-function! s:PutBlankLinesAbove(count)
- let l:i = 0
- while l:i < a:count
- silent put! =nr2char(10)
- let l:i = l:i + 1
- ']+1
- endwhile
- silent! call repeat#set("\<Plug>(PutBlankLinesAbove)", a:count)
-endfunction
-
-function! s:PutBlankLinesBelow(count)
- let l:i = 0
- while l:i < a:count
- silent put =nr2char(10)
- let l:i = l:i + 1
- '[-1
- endwhile
- silent! call repeat#set("\<Plug>(PutBlankLinesBelow)", a:count)
-endfunction
-
-nnoremap <silent> <unique>
- \ <Plug>(PutBlankLinesAbove)
- \ :<C-U>call <SID>PutBlankLinesAbove(v:count1)<CR>
-
nnoremap <silent> <unique>
\ <Plug>(PutBlankLinesBelow)
- \ :<C-U>call <SID>PutBlankLinesBelow(v:count1)<CR>
+ \ :<C-U>call put_blank_lines#Below(v:count1)<CR>
+nnoremap <silent> <unique>
+ \ <Plug>(PutBlankLinesAbove)
+ \ :<C-U>call put_blank_lines#Above(v:count1)<CR>