aboutsummaryrefslogtreecommitdiff
path: root/autoload/scroll_next.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-28 21:44:25 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-28 21:44:25 +1200
commite38d3c95af32ba73c6dc8ded57d31a784987e9e9 (patch)
tree64e37bd0f5d6372b96e40e58b62c1700de8d6135 /autoload/scroll_next.vim
parentMerge branch 'release/v0.2.0' (diff)
parentBump VERSION (diff)
downloadvim-scroll-next-e38d3c95af32ba73c6dc8ded57d31a784987e9e9.tar.gz
vim-scroll-next-e38d3c95af32ba73c6dc8ded57d31a784987e9e9.zip
Merge branch 'release/v0.3.0'v0.3.0
* release/v0.3.0: Bump VERSION Drop Vim 6.x support
Diffstat (limited to 'autoload/scroll_next.vim')
-rw-r--r--autoload/scroll_next.vim9
1 files changed, 9 insertions, 0 deletions
diff --git a/autoload/scroll_next.vim b/autoload/scroll_next.vim
new file mode 100644
index 0000000..8758208
--- /dev/null
+++ b/autoload/scroll_next.vim
@@ -0,0 +1,9 @@
+" Check visibility of last line and flick to :next if appropriate, or just
+" page forward with PageDown
+function! scroll_next#ScrollNext() abort
+ if line('w$') == line('$')
+ silent! next
+ else
+ execute "normal! \<PageDown>"
+ endif
+endfunction