From d468ed5edc51e1fde19c82c91646ce76eec8bcbb Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 29 May 2019 02:11:44 +1200 Subject: Reduce to just one expression --- autoload/scroll_next.vim | 9 --------- plugin/scroll_next.vim | 7 +++---- 2 files changed, 3 insertions(+), 13 deletions(-) delete mode 100644 autoload/scroll_next.vim diff --git a/autoload/scroll_next.vim b/autoload/scroll_next.vim deleted file mode 100644 index cb40a18..0000000 --- a/autoload/scroll_next.vim +++ /dev/null @@ -1,9 +0,0 @@ -" 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('$') - return ":\next\" - else - return "\" - endif -endfunction 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 - \ (ScrollNext) - \ scroll_next#ScrollNext() +" If last line visible, go to next file, otherwise page down +nnoremap (ScrollNext) + \ line('w$') == line('$') ? ":\next\" : "\" -- cgit v1.2.3 From 9645ddf2edea95c72f5502475047c77679bb86b2 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 29 May 2019 02:12:03 +1200 Subject: Bump VERSION --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 3eefcb9..227cea2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.0 +2.0.0 -- cgit v1.2.3