Last active
December 15, 2017 01:25
-
-
Save sgur/d154ca16972e3e3cad714b8d562f3881 to your computer and use it in GitHub Desktop.
renderoptions 用の画面スクロール用のベンチマークスクリプト
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scriptencoding utf-8 | |
function! s:benchmark() abort "{{{ | |
normal !gg | |
call timer_start(0, function('s:callback', [reltime(), line('$')]), {'repeat': -1}) | |
endfunction "}}} | |
function! s:callback(time, lines, timer) abort "{{{ | |
if line('.') < a:lines | |
execute 'normal!' "\<C-f>" | |
return | |
endif | |
echomsg reltimestr(reltime(a:time)) | |
call timer_stop(a:timer) | |
endfunction "}}} | |
command! -nargs=0 ScrollBench call s:benchmark() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment