aboutsummaryrefslogtreecommitdiff
path: root/plugin/scroll_next.vim
blob: f9e19bfc1f270054c2abf5b0056f2c08e95549de (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
"
" scroll_next.vim: Mapping to scroll a page forward until the buffer's end,
" and then to go to the :next buffer in the argument list.
"
" Author: Tom Ryder <tom@sanctum.geek.nz>
" License: Same as Vim itself
"
if exists('loaded_scroll_next') || &compatible || v:version < 700
  finish
endif
let loaded_scroll_next = 1

" If last line visible, go to next file, otherwise page down
nnoremap <expr> <Plug>(ScrollNext)
      \ line('w$') == line('$') ? ":\<C-U>next\<CR>" : "\<PageDown>"