Skip to content

Instantly share code, notes, and snippets.

@sgur
Last active December 15, 2017 01:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sgur/d154ca16972e3e3cad714b8d562f3881 to your computer and use it in GitHub Desktop.
Save sgur/d154ca16972e3e3cad714b8d562f3881 to your computer and use it in GitHub Desktop.
renderoptions 用の画面スクロール用のベンチマークスクリプト
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