diff options
Diffstat (limited to 'plugin/scroll_next.vim')
-rw-r--r-- | plugin/scroll_next.vim | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/plugin/scroll_next.vim b/plugin/scroll_next.vim index 8f09b24..4535223 100644 --- a/plugin/scroll_next.vim +++ b/plugin/scroll_next.vim @@ -5,26 +5,12 @@ " Author: Tom Ryder <tom@sanctum.geek.nz> " License: Same as Vim itself " -if exists('loaded_scroll_next') || &compatible - finish -endif -if v:version < 600 +if exists('loaded_scroll_next') || &compatible || v:version < 700 finish endif let loaded_scroll_next = 1 -" Check visibility of last line (Vim >=7.0) or cursor presence on last line -" and flick to :next if appropriate, or just page forward with PageDown -function! s:ScrollNext() abort - if line('.') == line('$') - \ || line('w$') == line('$') - silent! next - else - execute "normal! \<PageDown>" - endif -endfunction - " Mapping setup nnoremap <silent> <unique> \ <Plug>(ScrollNext) - \ :<C-U>call <SID>ScrollNext()<CR> + \ :<C-U>call scroll_next#ScrollNext()<CR> |