Skip to content

Instantly share code, notes, and snippets.

@sgur
Created November 22, 2010 02:49
Show Gist options
  • Save sgur/709455 to your computer and use it in GitHub Desktop.
Save sgur/709455 to your computer and use it in GitHub Desktop.
echo bootup time which is measured by vim --startuptime
" expect 'vim --startuptime "%TEMP%\vim_startuptime.log"'
let s:startup_logfile = 'vim_startuptime.log'
function! s:GetStartupTime()
let startup_logpath = expand('$TEMP') . '/' . s:startup_logfile
if filereadable(startup_logpath)
let startup_file = readfile(startup_logpath)
return matchstr(startup_file[len(startup_file)-1], '^[0-9-.]\+')
endif
return 0
endfunction
echo s:GetStartupTime()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment