Permalink
Browse files

Add option for top margin size. Pad the bottom to hide tildes.

* The specified number (default = 0) of blank lines is inserted above
each slide as they are shown.
* A calculated number of blank lines is appended below each slide to
force the ~ lines off the bottom of the window.
  • Loading branch information...
Phil Runninger
Phil Runninger committed Nov 14, 2016
1 parent 0a81a9e commit 024f90364cf742b7d163cbceced3f00c55e55fb8
Showing with 14 additions and 0 deletions.
  1. +8 −0 doc/presenting.txt
  2. +6 −0 plugin/presenting.vim
View
@@ -113,6 +113,14 @@ Default: >
Set the statusline to display cursor position: >
:let g:presenting_statusline = '%l, %c'
<
------------------------------------------------------------------------------
*presenting_top_margin*
This option lets you define the number of blank lines to insert above each
slide. Default: 0
>
:let g:presenting_top_margin = 2
<
==============================================================================
ISSUES *presenting-issues*
View
@@ -15,6 +15,10 @@ if !exists('g:presenting_statusline')
\ '%{b:presenting_page_current}/%{b:presenting_page_total}'
endif
if !exists('g:presenting_top_margin')
let g:presenting_top_margin = 0
endif
" Main logic / start the presentation {{{
function! s:Start()
if g:presenting_vim_using == 1
@@ -80,6 +84,8 @@ function! s:ShowPage(page_no)
" avoid "--No lines in buffer--" msg by using silent
silent %delete _
call append(0, s:pages[s:page_number])
call append(0, map(range(1,g:presenting_top_margin), '""'))
call append(line('$'), map(range(1,winheight('%')-(line('w$')-line('w0')+1)), '""'))
" some options for the buffer
setlocal buftype=nofile

0 comments on commit 024f903

Please sign in to comment.