aboutsummaryrefslogtreecommitdiff
path: root/plugin/scroll_next.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-29 02:12:14 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-29 02:12:14 +1200
commitcc135ce086c158012c8b740ff8e5a802b9f9ee52 (patch)
tree3178d2dbd78587561dab75245b839e833d1d81ae /plugin/scroll_next.vim
parentMerge branch 'release/v1.0.0' (diff)
parentBump VERSION (diff)
downloadvim-scroll-next-cc135ce086c158012c8b740ff8e5a802b9f9ee52.tar.gz
vim-scroll-next-cc135ce086c158012c8b740ff8e5a802b9f9ee52.zip
Merge branch 'release/v2.0.0'HEADv2.0.0master
* release/v2.0.0: Reduce to just one expression
Diffstat (limited to 'plugin/scroll_next.vim')
-rw-r--r--plugin/scroll_next.vim7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugin/scroll_next.vim b/plugin/scroll_next.vim
index ae3f269..f9e19bf 100644
--- a/plugin/scroll_next.vim
+++ b/plugin/scroll_next.vim
@@ -10,7 +10,6 @@ if exists('loaded_scroll_next') || &compatible || v:version < 700
endif
let loaded_scroll_next = 1
-" Mapping setup
-nnoremap <expr> <silent> <unique>
- \ <Plug>(ScrollNext)
- \ scroll_next#ScrollNext()
+" If last line visible, go to next file, otherwise page down
+nnoremap <expr> <Plug>(ScrollNext)
+ \ line('w$') == line('$') ? ":\<C-U>next\<CR>" : "\<PageDown>"