aboutsummaryrefslogblamecommitdiff
path: root/autoload/put_blank_lines.vim
blob: 2ee8ce8ad98a97093538cda1ce567bfe9519cc6e (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                            



                                              
                                            



                                              
                                                 



                                            
                                                 


                                           
function! put_blank_lines#Above(count) abort
  set operatorfunc=put_blank_lines#AboveOpfunc
  call feedkeys(a:count.'g@l', 'n')
endfunction

function! put_blank_lines#Below(count) abort
  set operatorfunc=put_blank_lines#BelowOpfunc
  call feedkeys(a:count.'g@l', 'n')
endfunction

function! put_blank_lines#AboveOpfunc(type) abort
  silent put! =repeat(nr2char(10), v:count1)
  ']+1
endfunction

function! put_blank_lines#BelowOpfunc(type) abort
  silent put =repeat(nr2char(10), v:count1)
  '[-1
endfunction