From 6c3c57854452272df1c514dd3e3653511efd6710 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 16 Aug 2018 14:12:37 +1200 Subject: Spin out scroll_next.vim into its own dist --- .gitmodules | 3 +++ vim/bundle/scroll_next | 1 + vim/plugin/scroll_next.vim | 32 -------------------------------- 3 files changed, 4 insertions(+), 32 deletions(-) create mode 160000 vim/bundle/scroll_next delete mode 100644 vim/plugin/scroll_next.vim diff --git a/.gitmodules b/.gitmodules index 9f9f3f62..8368e236 100644 --- a/.gitmodules +++ b/.gitmodules @@ -38,6 +38,9 @@ [submodule "vim/bundle/redact_pass"] path = vim/bundle/redact_pass url = https://sanctum.geek.nz/code/vim-redact-pass.git +[submodule "vim/bundle/scroll_next"] + path = vim/bundle/scroll_next + url = https://sanctum.geek.nz/code/vim-scroll-next.git [submodule "vim/bundle/shebang_create_exec"] path = vim/bundle/shebang_create_exec url = https://sanctum.geek.nz/code/vim-shebang-create-exec.git diff --git a/vim/bundle/scroll_next b/vim/bundle/scroll_next new file mode 160000 index 00000000..56166b68 --- /dev/null +++ b/vim/bundle/scroll_next @@ -0,0 +1 @@ +Subproject commit 56166b68079f1573de93c4f134996854b4e6e75a diff --git a/vim/plugin/scroll_next.vim b/vim/plugin/scroll_next.vim deleted file mode 100644 index a02a4e4f..00000000 --- a/vim/plugin/scroll_next.vim +++ /dev/null @@ -1,32 +0,0 @@ -" -" scroll_next.vim: Mapping to scroll a page forward with CTRL-F until the last -" line is visible in the buffer (if supported) or the cursor is on the last -" line, and to run :next instead if so to move to the next buffer in the -" argument list. -" -" Author: Tom Ryder -" License: Same as Vim itself -" -if exists('g:loaded_scroll_next') || &compatible - finish -endif -if v:version < 600 - finish -endif -let g: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 CTRL-F -function! s:ScrollNext() abort - if line('.') == line('$') - \ || line('w$') == line('$') - silent! next - else - execute "normal! \" - endif -endfunction - -" Mapping setup -nnoremap - \ (ScrollNext) - \ :call ScrollNext() -- cgit v1.2.3