Skip to content

Instantly share code, notes, and snippets.

@alexlafroscia
Created April 27, 2015 03:16
Show Gist options
  • Save alexlafroscia/d7d351c6fc9834efebe9 to your computer and use it in GitHub Desktop.
Save alexlafroscia/d7d351c6fc9834efebe9 to your computer and use it in GitHub Desktop.
vim-go with vim-dispatch integration profiling

These are the profile logs from using :GoBuild with and without Dispatch detection enabled. I did the profiling using the steps detailed here.

SCRIPT /Users/alex/.vim/bundle/vim-go/autoload/go/cmd.vim
Sourced 1 time
Total time: 0.000666
Self time: 0.000666
count total (s) self (s)
if !exists("g:go_jump_to_error")
1 0.000021 let g:go_jump_to_error = 1
1 0.000006 endif
1 0.000013 function! go#cmd#Run(bang, ...)
let goFiles = '"' . join(go#tool#Files(), '" "') . '"'
if IsWin()
exec '!go run ' . goFiles
if v:shell_error
redraws! | echon "vim-go: [run] " | echohl ErrorMsg | echon "FAILED"| echohl None
else
redraws! | echon "vim-go: [run] " | echohl Function | echon "SUCCESS"| echohl None
endif
return
endif
let default_makeprg = &makeprg
if !len(a:000)
let &makeprg = 'go run ' . goFiles
else
let &makeprg = "go run " . expand(a:1)
endif
if exists(':Make') == 2
silent! exe 'Make'
else
exe 'make!'
endif
if !a:bang
cwindow
let errors = getqflist()
if !empty(errors)
if g:go_jump_to_error
cc 1 "jump to first error if there is any
endif
endif
endif
let &makeprg = default_makeprg
endfunction
1 0.000009 function! go#cmd#Install(...)
let pkgs = join(a:000, '" "')
let command = 'go install "' . pkgs . '"'
let out = go#tool#ExecuteInDir(command)
if v:shell_error
call go#tool#ShowErrors(out)
cwindow
return
endif
if exists("$GOBIN")
echon "vim-go: " | echohl Function | echon "installed to ". $GOBIN | echohl None
else
echon "vim-go: " | echohl Function | echon "installed to ". $GOPATH . "/bin" | echohl None
endif
endfunction
1 0.000008 function! go#cmd#Build(bang, ...)
let default_makeprg = &makeprg
let gofiles = join(go#tool#Files(), '" "')
if v:shell_error
let &makeprg = "go build . errors"
else
let &makeprg = "go build -o /dev/null " . join(a:000, ' ') . ' "' . gofiles . '"'
endif
echon "vim-go: " | echohl Identifier | echon "building ..."| echohl None
if exists(':Make')
silent! exe 'Make!'
else
silent! exe 'make!'
endif
redraw!
if !a:bang
cwindow
let errors = getqflist()
if !empty(errors)
if g:go_jump_to_error
cc 1 "jump to first error if there is any
endif
else
redraws! | echon "vim-go: " | echohl Function | echon "[build] SUCCESS"| echohl None
endif
endif
let &makeprg = default_makeprg
endfunction
1 0.000008 function! go#cmd#Test(compile, ...)
let command = "go test "
" don't run the test, only compile it. Useful to capture and fix errors or
" to create a test binary.
if a:compile
let command .= "-c"
endif
if len(a:000)
let command .= expand(a:1)
endif
if len(a:000) == 2
let command .= a:2
endif
if a:compile
echon "vim-go: " | echohl Identifier | echon "compiling tests ..." | echohl None
else
echon "vim-go: " | echohl Identifier | echon "testing ..." | echohl None
endif
redraw
let out = go#tool#ExecuteInDir(command)
if v:shell_error
call go#tool#ShowErrors(out)
cwindow
let errors = getqflist()
if !empty(errors)
if g:go_jump_to_error
cc 1 "jump to first error if there is any
endif
endif
echon "vim-go: " | echohl ErrorMsg | echon "[test] FAIL" | echohl None
else
call setqflist([])
cwindow
if a:compile
echon "vim-go: " | echohl Function | echon "[test] SUCCESS" | echohl None
else
echon "vim-go: " | echohl Function | echon "[test] PASS" | echohl None
endif
endif
endfunction
1 0.000007 function! go#cmd#TestFunc(...)
" search flags legend (used only)
" 'b' search backward instead of forward
" 'c' accept a match at the cursor position
" 'n' do Not move the cursor
" 'W' don't wrap around the end of the file
"
" for the full list
" :help search
let test = search("func Test", "bcnW")
if test == 0
echo "vim-go: [test] no test found immediate to cursor"
return
end
let line = getline(test)
let name = split(split(line, " ")[1], "(")[0]
let flag = "-run \"" . name . "$\""
let a1 = ""
if len(a:000)
let a1 = a:1
" add extra space
let flag = " " . flag
endif
call go#cmd#Test(0, a1, flag)
endfunction
1 0.000006 function! go#cmd#Coverage(...)
let l:tmpname=tempname()
let command = "go test -coverprofile=".l:tmpname
let out = go#tool#ExecuteInDir(command)
if v:shell_error
call go#tool#ShowErrors(out)
else
" clear previous quick fix window
call setqflist([])
let openHTML = 'go tool cover -html='.l:tmpname
call go#tool#ExecuteInDir(openHTML)
endif
cwindow
let errors = getqflist()
if !empty(errors)
if g:go_jump_to_error
cc 1 "jump to first error if there is any
endif
endif
call delete(l:tmpname)
endfunction
1 0.000005 function! go#cmd#Vet()
echon "vim-go: " | echohl Identifier | echon "calling vet..." | echohl None
let out = go#tool#ExecuteInDir('go vet')
if v:shell_error
call go#tool#ShowErrors(out)
else
call setqflist([])
endif
cwindow
let errors = getqflist()
if !empty(errors)
if g:go_jump_to_error
cc 1 "jump to first error if there is any
endif
else
redraw | echon "vim-go: " | echohl Function | echon "[vet] PASS" | echohl None
endif
endfunction
" vim:ts=4:sw=4:et
"
SCRIPT /Users/alex/.vim/bundle/vim-dispatch/autoload/dispatch.vim
Sourced 1 time
Total time: 0.001124
Self time: 0.001124
count total (s) self (s)
" Location: autoload/dispatch.vim
1 0.000005 if exists('g:autoloaded_dispatch')
finish
endif
1 0.000004 let g:autoloaded_dispatch = 1
" Utility {{{1
1 0.000005 function! dispatch#uniq(list) abort
let i = 0
let seen = {}
while i < len(a:list)
if (a:list[i] ==# '' && exists('empty')) || has_key(seen,a:list[i])
call remove(a:list,i)
elseif a:list[i] ==# ''
let i += 1
let empty = 1
else
let seen[a:list[i]] = 1
let i += 1
endif
endwhile
return a:list
endfunction
1 0.000003 function! dispatch#shellescape(...) abort
let args = []
for arg in a:000
if arg =~ '^[A-Za-z0-9_/.-]\+$'
let args += [arg]
elseif &shell =~# 'c\@<!sh'
let args += [substitute(shellescape(arg), '\\\n', '\n', 'g')]
else
let args += [shellescape(arg)]
endif
endfor
return join(args, ' ')
endfunction
1 0.000004 let s:flags = '\%(:[p8~.htre]\|:g\=s\(.\).\{-\}\1.\{-\}\1\)*'
1 0.000004 let s:expandable = '\\*\%(<\w\+>\|%\|#\d*\)' . s:flags
1 0.000003 function! dispatch#expand(string) abort
return substitute(a:string, s:expandable, '\=s:expand(submatch(0))', 'g')
endfunction
1 0.000004 function! s:expand(string) abort
let slashes = len(matchstr(a:string, '^\%(\\\\\)*'))
return repeat('\', slashes/2) . expand(a:string[slashes : -1])
endfunction
1 0.000003 function! dispatch#slash() abort
return !exists("+shellslash") || &shellslash ? '/' : '\'
endfunction
1 0.000003 function! dispatch#shellpipe(file) abort
if &shellpipe =~# '%s'
return ' ' . printf(&shellpipe, dispatch#shellescape(a:file))
else
return ' ' . &shellpipe . ' ' . dispatch#shellescape(a:file)
endif
endfunction
1 0.000003 function! dispatch#vim_executable() abort
if !exists('s:vim')
if has('win32')
let roots = [fnamemodify($VIMRUNTIME, ':8') . dispatch#slash(),
\ fnamemodify($VIM, ':8') . dispatch#slash()]
elseif has('gui_macvim')
let roots = [fnamemodify($VIM, ':h:h') . '/MacOS/']
else
let roots = [fnamemodify($VIM, ':h:h') . '/bin/']
endif
for root in roots
if executable(root . v:progname)
let s:vim = root . v:progname
break
endif
endfor
if !exists('s:vim')
if executable(v:progname)
let s:vim = v:progname
else
let s:vim = 'vim'
endif
endif
endif
return s:vim
endfunction
1 0.000003 function! dispatch#callback(request) abort
if !empty(v:servername) && has_key(s:request(a:request), 'id')
return dispatch#shellescape(dispatch#vim_executable()) .
\ ' --servername ' . dispatch#shellescape(v:servername) .
\ ' --remote-expr "' . 'DispatchComplete(' . s:request(a:request).id . ')' . '"'
endif
return ''
endfunction
1 0.000004 function! dispatch#prepare_start(request, ...) abort
let exec = 'echo $$ > ' . a:request.file . '.pid; '
if executable('perl')
let exec .= 'perl -e "select(undef,undef,undef,0.1)" 2>/dev/null; '
else
let exec .= 'sleep 1; '
endif
let exec .= a:0 ? a:1 : a:request.expanded
let callback = dispatch#callback(a:request)
let after = 'rm -f ' . a:request.file . '.pid; ' .
\ 'touch ' . a:request.file . '.complete' .
\ (empty(callback) ? '' : '; ' . callback)
if &shellpipe =~# '2>&1'
return 'trap ' . shellescape(after) . ' EXIT INT TERM; ' . exec
else
" csh
return exec . '; ' . after
endif
endfunction
1 0.000003 function! dispatch#prepare_make(request, ...) abort
let exec = a:0 ? a:1 : (a:request.expanded . dispatch#shellpipe(a:request.file))
return dispatch#prepare_start(a:request, exec, 1)
endfunction
1 0.000003 function! dispatch#set_title(request) abort
return dispatch#shellescape('printf',
\ '\033]1;%s\007\033]2;%s\007',
\ a:request.title,
\ a:request.expanded)
endfunction
1 0.000003 function! dispatch#isolate(keep, ...) abort
let keep = ['SHELL'] + a:keep
let command = ['cd ' . shellescape(getcwd())]
for line in split(system('env'), "\n")
let var = matchstr(line, '^\w\+\ze=')
if !empty(var) && var !=# '_' && index(keep, var) < 0
if &shell =~# 'csh'
let command += split('setenv '.var.' '.shellescape(eval('$'.var)), "\n")
else
let command += split('export '.var.'='.dispatch#shellescape(eval('$'.var)), "\n")
endif
endif
endfor
let command += a:000
let temp = tempname()
call writefile(command, temp)
return 'env -i ' . join(map(copy(keep), 'v:val."=\"$". v:val ."\" "'), '') . &shell . ' ' . temp
endfunction
1 0.000003 function! s:current_compiler() abort
return get((empty(&l:makeprg) ? g: : b:), 'current_compiler', '')
endfunction
1 0.000003 function! s:set_current_compiler(name) abort
if empty(a:name)
unlet! b:current_compiler
else
let b:current_compiler = a:name
endif
endfunction
1 0.000003 function! s:dispatch(request) abort
for handler in g:dispatch_handlers
let response = call('dispatch#'.handler.'#handle', [a:request])
if !empty(response)
redraw
let pid = dispatch#pid(a:request)
echo ':!'.a:request.expanded . ' ('.handler.'/'.(pid ? pid : '?').')'
let a:request.handler = handler
return 1
endif
endfor
return 0
endfunction
" }}}1
" :Start, :Spawn {{{1
1 0.000003 function! s:extract_opts(command) abort
let command = a:command
let opts = {}
while command =~# '^-\%(\w\+\)\%([= ]\|$\)'
let opt = matchstr(command, '^-\zs\w\+')
if command =~ '^-\w\+='
let val = matchstr(command, '^-\w\+=\zs\%(\\.\|\S\)*')
else
let val = 1
endif
if opt ==# 'dir' || opt ==# 'directory'
let opts.directory = fnamemodify(expand(val), ':p')
else
let opts[opt] = substitute(val, '\\\(\s\)', '\1', 'g')
endif
let command = substitute(command, '^-\w\+\%(=\%(\\.\|\S\)*\)\=\s*', '', '')
endwhile
return [command, opts]
endfunction
1 0.000003 function! dispatch#spawn_command(bang, command) abort
let [command, opts] = s:extract_opts(a:command)
let opts.background = a:bang
call dispatch#spawn(command, opts)
return ''
endfunction
1 0.000003 function! dispatch#start_command(bang, command) abort
let command = a:command
if empty(command) && type(get(b:, 'start', [])) == type('')
let command = b:start
endif
let [command, opts] = s:extract_opts(command)
let opts.background = a:bang
if command =~# '^:.'
unlet! g:dispatch_last_start
return substitute(command, '\>', get(a:0 ? a:1 : {}, 'background', 0) ? '!' : '', '')
endif
call dispatch#start(command, opts)
return ''
endfunction
1 0.000010 if type(get(g:, 'DISPATCH_STARTS')) != type({})
1 0.000002 unlet! g:DISPATCH_STARTS
1 0.000003 let g:DISPATCH_STARTS = {}
1 0.000001 endif
1 0.000003 function! dispatch#start(command, ...) abort
return dispatch#spawn(a:command, extend({'manage': 1}, a:0 ? a:1 : {}))
endfunction
1 0.000003 function! dispatch#spawn(command, ...) abort
let command = empty(a:command) ? &shell : a:command
let request = extend({
\ 'action': 'start',
\ 'background': 0,
\ 'command': command,
\ 'directory': getcwd(),
\ 'expanded': dispatch#expand(command),
\ 'title': '',
\ }, a:0 ? a:1 : {})
let g:dispatch_last_start = request
if empty(request.title)
let request.title = substitute(fnamemodify(matchstr(request.command, '\%(\\.\|\S\)\+'), ':t:r'), '\\\(\s\)', '\1', 'g')
endif
if get(request, 'manage')
let key = request.directory."\t".substitute(request.expanded, '\s*$', '', '')
let i = 0
while i < len(get(g:DISPATCH_STARTS, key, []))
let [handler, pid] = split(g:DISPATCH_STARTS[key][i], '@')
if !s:running(pid)
call remove(g:DISPATCH_STARTS[key], i)
continue
endif
try
if request.background || dispatch#{handler}#activate(pid)
let request.handler = handler
let request.pid = pid
return request
endif
catch
endtry
let i += 1
endwhile
endif
let request.file = tempname()
let s:files[request.file] = request
let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd' : 'cd'
try
if request.directory !=# getcwd()
let cwd = getcwd()
execute cd fnameescape(request.directory)
endif
if s:dispatch(request)
if get(request, 'manage')
if !has_key(g:DISPATCH_STARTS, key)
let g:DISPATCH_STARTS[key] = []
endif
call add(g:DISPATCH_STARTS[key], request.handler.'@'.dispatch#pid(request))
endif
else
execute '!' . request.command
endif
finally
if exists('cwd')
execute cd fnameescape(cwd)
endif
endtry
return request
endfunction
" }}}1
" :Dispatch, :Make {{{1
1 0.000005 let g:dispatch_compilers = get(g:, 'dispatch_compilers', {})
1 0.000003 function! dispatch#compiler_for_program(args) abort
let remove = keys(filter(copy(g:dispatch_compilers), 'empty(v:val)'))
let pattern = '\%('.join(map(remove, 'substitute(escape(v:val, ".*^$~[]\\"), "\\w\\zs$", " ", "")'), '\s*\|').'\)'
let args = substitute(a:args, '\s\+', ' ', 'g')
let args = substitute(args, '^\s*'.pattern.'*', '', '')
for [command, plugin] in items(g:dispatch_compilers)
if strpart(args.' ', 0, len(command)+1) ==# command.' ' && !empty(plugin)
\ && !empty(findfile('compiler/'.plugin.'.vim', escape(&rtp, ' ')))
return plugin
endif
endfor
let program = fnamemodify(matchstr(args, '\S\+'), ':t')
if program ==# 'make'
return 'make'
endif
let plugins = map(reverse(split(globpath(escape(&rtp, ' '), 'compiler/*.vim'), "\n")), '[fnamemodify(v:val, ":t:r"), readfile(v:val)]')
for [plugin, lines] in plugins
for line in lines
let full = substitute(substitute(
\ matchstr(line, '\<CompilerSet\s\+makeprg=\zs\a\%(\\.\|[^[:space:]"]\)*'),
\ '\\\(.\)', '\1', 'g'),
\ ' \=["'']\=\%(%\|\$\*\|--\w\@!\).*', '', '')
if !empty(full) && strpart(args.' ', 0, len(full)+1) ==# full.' '
return plugin
endif
endfor
endfor
for [plugin, lines] in plugins
for line in lines
if matchstr(line, '\<CompilerSet\s\+makeprg=\zs[[:alnum:]_.-]\+') ==# program
return plugin
endif
endfor
endfor
return ''
endfunction
1 0.000003 function! dispatch#compiler_options(compiler) abort
let current_compiler = get(b:, 'current_compiler', '')
let makeprg = &l:makeprg
let efm = &l:efm
try
if a:compiler ==# 'make'
if &makeprg !=# 'make'
setlocal efm&
endif
return {'program': 'make', 'format': &efm}
endif
let &l:makeprg = ''
execute 'compiler '.fnameescape(a:compiler)
let options = {'format': &errorformat}
if !empty(&l:makeprg)
let options.program = &l:makeprg
endif
return options
finally
let &l:makeprg = makeprg
let &l:efm = efm
call s:set_current_compiler(current_compiler)
endtry
endfunction
1 0.000022 function! s:completion_filter(results, query) abort
if type(get(g:, 'completion_filter')) == type({})
return g:completion_filter.Apply(a:results, a:query)
else
return filter(a:results, 'strpart(v:val, 0, len(a:query)) ==# a:query')
endif
endfunction
1 0.000034 function! s:file_complete(A) abort
return map(split(glob(substitute(a:A, '\(.\@<=[\\/]\|$\)', '*\1', 'g')), "\n"),
\ 'isdirectory(v:val) ? v:val . dispatch#slash() : v:val')
endfunction
1 0.000004 function! s:compiler_complete(compiler, A, L, P) abort
let compiler = empty(a:compiler) ? 'make' : a:compiler
let fn = ''
for file in findfile('compiler/'.compiler.'.vim', escape(&rtp, ' '), -1)
for line in readfile(file)
let fn = matchstr(line, '-complete=custom\%(list\)\=,\zs\%(s:\)\@!\S\+')
if !empty(fn)
break
endif
endfor
endfor
if !empty(fn)
let results = call(fn, [a:A, a:L, a:P])
elseif exists('*CompilerComplete_' . compiler)
let results = call('CompilerComplete_' . compiler, [a:A, a:L, a:P])
else
let results = -1
endif
if type(results) == type([])
return results
elseif type(results) != type('')
unlet! results
let results = join(s:file_complete(a:A), "\n")
endif
return s:completion_filter(split(results, "\n"), a:A)
endfunction
1 0.000007 function! dispatch#command_complete(A, L, P) abort
let len = matchend(a:L, '\S\+\s\+\S\+\s')
if len >= 0 && len <= a:P
let compiler = dispatch#compiler_for_program(matchstr(a:L, '\s\zs.*'))
return s:compiler_complete(compiler, a:A, 'Make '.strpart(a:L, len), a:P-len+5)
elseif a:A =~# '^\%(\w:\|\.\)\=[\/]'
let executables = s:file_complete(a:A)
else
let executables = []
for dir in split($PATH, has('win32') ? ';' : ':')
let executables += map(split(glob(dir.'/'.substitute(a:A, '.', '*&', 'g').'*'), "\n"), 'v:val[strlen(dir)+1 : -1]')
endfor
endif
return s:completion_filter(sort(dispatch#uniq(executables)), a:A)
endfunction
1 0.000007 function! dispatch#make_complete(A, L, P) abort
let modelines = &modelines
try
let &modelines = 0
silent doautocmd QuickFixCmdPre dispatch-make-complete
return s:compiler_complete(s:current_compiler(), a:A, a:L, a:P)
finally
silent doautocmd QuickFixCmdPost dispatch-make-complete
let &modelines = modelines
endtry
endfunction
1 0.000005 if !exists('s:makes')
1 0.000004 let s:makes = []
1 0.000003 let s:files = {}
1 0.000001 endif
1 0.000004 function! dispatch#compile_command(bang, args, count) abort
if !empty(a:args)
let args = a:args
else
let args = '_'
for vars in a:count < 0 ? [b:, g:, t:, w:] : [b:]
if has_key(vars, 'dispatch') && type(vars.dispatch) == type('')
let args = vars.dispatch
endif
endfor
endif
if args =~# '^!'
return 'Start' . (a:bang ? '!' : '') . ' ' . args[1:-1]
elseif args =~# '^:.'
return (a:count > 0 ? a:count : '').substitute(args[1:-1], '\>', (a:bang ? '!' : ''), '')
endif
let [args, request] = s:extract_opts(args)
let executable = matchstr(args, '\S\+')
call extend(request, {
\ 'action': 'make',
\ 'background': a:bang,
\ 'format': '%+I%.%#'
\ }, 'keep')
if executable ==# '_'
let request.args = matchstr(args, '_\s*\zs.*')
let request.program = &makeprg
if &makeprg =~# '\$\*'
let request.command = substitute(&makeprg, '\$\*', request.args, 'g')
elseif empty(request.args)
let request.command = &makeprg
else
let request.command = &makeprg . ' ' . request.args
endif
let request.format = &errorformat
let request.compiler = s:current_compiler()
else
let request.compiler = get(request, 'compiler', dispatch#compiler_for_program(args))
if !empty(request.compiler)
call extend(request,dispatch#compiler_options(request.compiler))
endif
let request.command = args
endif
let request.format = substitute(request.format, ',%-G%\.%#\%($\|,\@=\)', '', '')
if a:count
let request.command = substitute(request.command, '<\%(lnum\|line1\|line2\)>'.s:flags, '\=fnamemodify(a:count, submatch(0)[6:-1])', 'g')
else
let request.command = substitute(request.command, '<\%(lnum\|line1\|line2\)>'.s:flags, '', 'g')
endif
if empty(request.compiler)
unlet request.compiler
endif
let request.title = get(request, 'title', get(request, 'compiler', 'make'))
if &autowrite || &autowriteall
silent! wall
endif
cclose
let request.file = tempname()
let &errorfile = request.file
let efm = &l:efm
let makeprg = &l:makeprg
let compiler = get(b:, 'current_compiler', '')
let modelines = &modelines
let after = ''
let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd' : 'cd'
try
let &modelines = 0
call s:set_current_compiler(get(request, 'compiler', ''))
let &l:efm = request.format
let &l:makeprg = request.command
silent doautocmd QuickFixCmdPre dispatch-make
let request.directory = get(request, 'directory', getcwd())
if request.directory !=# getcwd()
let cwd = getcwd()
execute cd fnameescape(request.directory)
endif
let request.expanded = get(request, 'expanded', dispatch#expand(request.command))
call extend(s:makes, [request])
let request.id = len(s:makes)
let s:files[request.file] = request
if !s:dispatch(request)
let after = 'call dispatch#complete('.request.id.')'
redraw!
execute 'silent !'.request.command dispatch#shellpipe(request.file)
redraw!
endif
finally
silent doautocmd QuickFixCmdPost dispatch-make
let &modelines = modelines
let &l:efm = efm
let &l:makeprg = makeprg
call s:set_current_compiler(compiler)
if exists('cwd')
execute cd fnameescape(cwd)
endif
endtry
execute after
return ''
endfunction
" }}}1
" :FocusDispatch {{{1
1 0.000003 function! dispatch#focus() abort
if exists('w:dispatch')
let [compiler, why] = [w:dispatch, 'Window local focus']
elseif exists('t:dispatch')
let [compiler, why] = [t:dispatch, 'Tab local focus']
elseif exists('g:dispatch')
let [compiler, why] = [g:dispatch, 'Global focus']
elseif exists('b:dispatch')
let [compiler, why] = [b:dispatch, 'Buffer default']
elseif !empty(&l:makeprg)
return [':Make', 'Buffer default']
else
return [':Make', 'Global default']
endif
if compiler =~# '^_\>'
return [':Make' . compiler[1:-1], why]
elseif compiler =~# '^!'
return [':Start ' . compiler[1:-1], why]
elseif compiler =~# '^:.'
return [compiler, why]
else
return [':Dispatch ' . compiler, why]
endif
endfunction
1 0.000004 function! dispatch#focus_command(bang, args) abort
let args = a:args =~# '^:.' ? a:args : escape(dispatch#expand(a:args), '#%')
if empty(a:args) && a:bang
unlet! w:dispatch t:dispatch g:dispatch
let [what, why] = dispatch#focus()
echo 'Reverted default to ' . what
elseif empty(a:args)
let [what, why] = dispatch#focus()
echo printf('%s is %s', why, what)
elseif a:bang
let w:dispatch = args
let [what, why] = dispatch#focus()
echo 'Set window local focus to ' . what
else
unlet! w:dispatch t:dispatch
let g:dispatch = args
let [what, why] = dispatch#focus()
echo 'Set global focus to ' . what
endif
return ''
endfunction
" }}}1
" Requests {{{1
1 0.000004 function! s:file(request) abort
if type(a:request) == type('')
return a:request
elseif type(a:request) == type({})
return get(a:request, 'file', '')
else
return get(get(s:makes, a:request-1, {}), 'file', '')
endif
endfunction
1 0.000003 function! s:request(request) abort
if type(a:request) == type({})
return a:request
elseif type(a:request) == type(0) && a:request > 0
return get(s:makes, a:request-1, {})
elseif type(a:request) == type('') && !empty(a:request)
return get(s:files, a:request, {})
else
return {}
endif
endfunction
1 0.000003 function! dispatch#request(...) abort
return a:0 ? s:request(a:1) : get(s:makes, -1, {})
endfunction
1 0.000003 function! s:running(pid) abort
if !a:pid
return 0
elseif has('win32')
let tasklist_cmd = 'tasklist /fi "pid eq '.a:pid.'"'
if &shellxquote ==# '"'
let tasklist_cmd = substitute(tasklist_cmd, '"', "'", "g")
endif
return system(tasklist_cmd) =~# '==='
else
call system('kill -0 '.a:pid)
return !v:shell_error
endif
endfunction
1 0.000005 function! dispatch#pid(request) abort
let request = s:request(a:request)
let file = request.file
if !has_key(request, 'pid')
if has('win32') && !executable('wmic')
let request.pid = 0
return 0
endif
for i in range(50)
if getfsize(file.'.pid') > 0 || filereadable(file.'.complete')
break
endif
sleep 10m
endfor
try
let request.pid = +readfile(file.'.pid')[0]
catch
let request.pid = 0
endtry
endif
if request.pid && getfsize(file.'.pid') > 0
if s:running(request.pid)
return request.pid
else
let request.pid = 0
call delete(file.'.pid')
endif
endif
endfunction
1 0.000003 function! dispatch#completed(request) abort
return get(s:request(a:request), 'completed', 0)
endfunction
1 0.000003 function! dispatch#complete(file) abort
if !dispatch#completed(a:file)
let request = s:request(a:file)
let request.completed = 1
echo 'Finished:' request.command
if !request.background
call s:cgetfile(request, 0, 0)
redraw
endif
endif
return ''
endfunction
" }}}1
" Quickfix window {{{1
1 0.000005 function! dispatch#copen(bang) abort
if empty(s:makes)
return 'echoerr ' . string('No dispatches yet')
endif
let request = s:makes[-1]
if !dispatch#completed(request) && filereadable(request.file . '.complete')
let request.completed = 1
endif
call s:cgetfile(request, a:bang, 1)
endfunction
1 0.000005 function! s:cgetfile(request, all, copen) abort
let request = s:request(a:request)
let efm = &l:efm
let makeprg = &l:makeprg
let compiler = get(b:, 'current_compiler', '')
let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd' : 'cd'
let dir = getcwd()
let modelines = &modelines
try
let &modelines = 0
call s:set_current_compiler(get(request, 'compiler', ''))
exe cd fnameescape(request.directory)
if a:all
let &l:efm = '%+G%.%#'
else
let &l:efm = request.format
endif
let &l:makeprg = request.command
silent doautocmd QuickFixCmdPre cgetfile
execute 'cgetfile '.fnameescape(request.file)
silent doautocmd QuickFixCmdPost cgetfile
catch '^E40:'
return v:exception
finally
let &modelines = modelines
exe cd fnameescape(dir)
let &l:efm = efm
let &l:makeprg = makeprg
call s:set_current_compiler(compiler)
endtry
call s:open_quickfix(request, a:copen)
endfunction
1 0.000004 function! s:open_quickfix(request, copen) abort
let was_qf = &buftype ==# 'quickfix'
execute 'botright' (a:copen ? 'copen' : 'cwindow')
if &buftype ==# 'quickfix' && !was_qf && !a:copen
wincmd p
endif
for winnr in range(1, winnr('$'))
if getwinvar(winnr, '&buftype') ==# 'quickfix'
call setwinvar(winnr, 'quickfix_title', ':' . a:request.expanded)
let bufnr = winbufnr(winnr)
call setbufvar(bufnr, '&efm', a:request.format)
call setbufvar(bufnr, 'dispatch', escape(a:request.expanded, '%#'))
if has_key(a:request, 'program')
call setbufvar(bufnr, '&makeprg', a:request.program)
endif
if has_key(a:request, 'compiler')
call setbufvar(bufnr, 'current_compiler', a:request.compiler)
endif
endif
endfor
endfunction
" }}}1
SCRIPT /Users/alex/.vim/bundle/vim-dispatch/autoload/dispatch/tmux.vim
Sourced 1 time
Total time: 0.000512
Self time: 0.000512
count total (s) self (s)
" dispatch.vim tmux strategy
1 0.000013 if exists('g:autoloaded_dispatch_tmux')
finish
endif
1 0.000008 let g:autoloaded_dispatch_tmux = 1
1 0.000003 let s:waiting = {}
1 0.000006 let s:make_pane = tempname()
1 0.000007 function! dispatch#tmux#handle(request) abort
let session = get(g:, 'tmux_session', '')
if empty($TMUX) && empty(''.session) || !executable('tmux')
return 0
endif
if !empty(system('tmux has-session -t '.shellescape(session))[0:-2])
return ''
endif
if a:request.action ==# 'make'
return dispatch#tmux#make(a:request)
elseif a:request.action ==# 'start'
let command = 'tmux new-window -P -t '.shellescape(session.':')
let command .= ' -n '.shellescape(a:request.title)
if a:request.background
let command .= ' -d'
endif
let command .= ' ' . shellescape('exec ' . dispatch#isolate(
\ ['TMUX', 'TMUX_PANE'], dispatch#prepare_start(a:request)))
call system(command)
return 1
endif
endfunction
1 0.000004 function! dispatch#tmux#make(request) abort
let pipepane = (&shellpipe ==# '2>&1| tee' || &shellpipe ==# '|& tee')
\ && a:request.format !~# '%\\[er]'
let session = get(g:, 'tmux_session', '')
let script = dispatch#isolate(['TMUX', 'TMUX_PANE'],
\ call('dispatch#prepare_make',
\ [a:request] + (pipepane ? [a:request.expanded] : [])))
let title = shellescape(get(a:request, 'title', get(a:request, 'compiler', 'make')))
if get(a:request, 'background', 0)
let cmd = 'new-window -d -n '.title
elseif has('gui_running') || empty($TMUX) || (!empty(''.session) && session !=# system('tmux display-message -p "#S"')[0:-2])
let cmd = 'new-window -n '.title
else
let cmd = 'split-window -l 10 -d'
endif
let cmd .= ' ' . dispatch#shellescape('-P', '-t', session.':', 'exec ' . script)
let filter = 'sed'
let uname = system('uname')[0:-2]
if uname ==# 'Darwin'
let filter = '/usr/bin/sed -l'
elseif uname ==# 'Linux'
let filter .= ' -u'
endif
let filter .= " -e \"s/\r$//\" -e \"s/.*\r//\" -e \"s/\e\\[K//g\" -e \"s/.*\e\\[2K\e\\[0G//g\" -e \"s/\e\\[[0-9;]*m//g\" > ".a:request.file
call system('tmux ' . cmd . '|tee ' . s:make_pane .
\ (pipepane ? '|xargs -I {} tmux pipe-pane -t {} '.shellescape(filter) : ''))
let pane = s:pane_id(get(readfile(s:make_pane, '', 1), 0, ''))
if !empty(pane)
let s:waiting[pane] = a:request
return 1
endif
endfunction
1 0.000014 function! s:pane_id(pane) abort
if a:pane =~# '\.\d\+$'
let [window, index] = split(a:pane, '\.\%(\d\+$\)\@=')
let out = system('tmux list-panes -F "#P #{pane_id}" -t '.shellescape(window))
let id = matchstr("\n".out, '\n'.index.' \+\zs%\d\+')
else
let id = system('tmux list-panes -F "#{pane_id}" -t '.shellescape(a:pane))[0:-2]
endif
return id
endfunction
1 0.000008 function! dispatch#tmux#poll() abort
if empty(s:waiting)
return
endif
let panes = split(system('tmux list-panes -a -F "#{pane_id}"'), "\n")
for [pane, request] in items(s:waiting)
if index(panes, pane) < 0
call remove(s:waiting, pane)
call dispatch#complete(request)
endif
endfor
endfunction
1 0.000008 function! dispatch#tmux#activate(pid) abort
let out = system('ps ewww -p '.a:pid)
let pane = matchstr(out, 'TMUX_PANE=\zs%\d\+')
if empty(pane)
return 0
endif
let session = get(g:, 'tmux_session', '')
if !empty(session)
let session = ' -t '.shellescape(session)
endif
let panes = split(system('tmux list-panes -s -F "#{pane_id}"'.session), "\n")
if index(panes, pane) >= 0
call system('tmux select-window -t '.pane.'; tmux select-pane -t '.pane)
return !v:shell_error
endif
endfunction
1 0.000005 augroup dispatch_tmux
1 0.000195 autocmd!
1 0.000020 autocmd VimResized * if !has('gui_running') | call dispatch#tmux#poll() | endif
1 0.000005 augroup END
FUNCTION <SNR>175_set_current_compiler()
Called 2 times
Total time: 0.000027
Self time: 0.000027
count total (s) self (s)
2 0.000006 if empty(a:name)
1 0.000004 unlet! b:current_compiler
1 0.000001 else
1 0.000005 let b:current_compiler = a:name
1 0.000001 endif
FUNCTION <SNR>133_get_hunks_gitgutter()
Called 7 times
Total time: 0.001046
Self time: 0.000148
count total (s) self (s)
7 0.000891 0.000079 if !get(g:, 'gitgutter_enabled', 0) || s:is_branch_empty()
return ''
endif
7 0.000129 0.000044 return GitGutterGetHunkSummary()
FUNCTION <SNR>68_repo_head()
Called 1 time
Total time: 0.000210
Self time: 0.000054
count total (s) self (s)
1 0.000160 0.000019 let head = s:repo().head_ref()
1 0.000009 if head =~# '^ref: '
1 0.000028 0.000013 let branch = s:sub(head,'^ref: %(refs/%(heads/|remotes/|tags/)=)=','')
1 0.000002 elseif head =~# '^\x\{40\}$'
" truncate hash to a:1 characters if we're in detached head mode
let len = a:0 ? a:1 : 0
let branch = len ? head[0:len-1] : ''
else
return ''
endif
1 0.000001 return branch
FUNCTION go#tool#ExecuteInDir()
Called 1 time
Total time: 0.098687
Self time: 0.098687
count total (s) self (s)
1 0.000012 let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd ' : 'cd '
1 0.000033 let dir = getcwd()
1 0.000003 try
1 0.000140 execute cd . fnameescape(expand("%:p:h"))
1 0.098388 let out = system(a:cmd)
1 0.000007 finally
1 0.000087 execute cd . fnameescape(dir)
1 0.000002 endtry
1 0.000004 return out
FUNCTION airline#check_mode()
Called 7 times
Total time: 0.000917
Self time: 0.000917
count total (s) self (s)
7 0.000052 let context = s:contexts[a:winnr]
7 0.000040 if get(w:, 'airline_active', 1)
7 0.000034 let l:m = mode()
7 0.000024 if l:m ==# "i"
let l:mode = ['insert']
elseif l:m ==# "R"
let l:mode = ['replace']
elseif l:m =~# '\v(v|V||s|S|)'
let l:mode = ['visual']
else
7 0.000028 let l:mode = ['normal']
7 0.000010 endif
7 0.000061 let w:airline_current_mode = get(g:airline_mode_map, l:m, l:m)
7 0.000010 else
let l:mode = ['inactive']
let w:airline_current_mode = get(g:airline_mode_map, '__')
endif
7 0.000037 if g:airline_detect_modified && &modified
call add(l:mode, 'modified')
endif
7 0.000020 if g:airline_detect_paste && &paste
call add(l:mode, 'paste')
endif
7 0.000019 if &readonly || ! &modifiable
call add(l:mode, 'readonly')
endif
7 0.000050 let mode_string = join(l:mode)
7 0.000044 if get(w:, 'airline_lastmode', '') != mode_string
call airline#highlighter#highlight_modified_inactive(context.bufnr)
call airline#highlighter#highlight(l:mode)
let w:airline_lastmode = mode_string
endif
7 0.000011 return ''
FUNCTION airline#util#append()
Called 21 times
Total time: 0.000412
Self time: 0.000412
count total (s) self (s)
21 0.000084 if a:minwidth > 0 && winwidth(0) < a:minwidth
return ''
endif
21 0.000132 let prefix = s:spc == "\ua0" ? s:spc : s:spc.s:spc
21 0.000109 return empty(a:text) ? '' : prefix.g:airline_left_alt_sep.s:spc.a:text
FUNCTION <SNR>135_format_name()
Called 1 time
Total time: 0.000002
Self time: 0.000002
count total (s) self (s)
1 0.000002 return a:name
FUNCTION go#tool#Files()
Called 1 time
Total time: 0.098875
Self time: 0.000085
count total (s) self (s)
1 0.000118 0.000015 if IsWin()
let command = 'go list -f "{{range $f := .GoFiles}}{{$.Dir}}\{{$f}}{{printf \"\n\"}}{{end}}{{range $f := .CgoFiles}}{{$.Dir}}\{{$f}}{{printf \"\n\"}}{{end}}"'
else
1 0.000009 let command = "go list -f '{{range $f := .GoFiles}}{{$.Dir}}/{{$f}}{{printf \"\\n\"}}{{end}}{{range $f := .CgoFiles}}{{$.Dir}}/{{$f}}{{printf \"\\n\"}}{{end}}'"
1 0.000002 endif
1 0.098714 0.000027 let out = go#tool#ExecuteInDir(command)
1 0.000024 return split(out, '\n')
FUNCTION <SNR>176_pane_id()
Called 1 time
Total time: 0.009943
Self time: 0.009943
count total (s) self (s)
1 0.000019 if a:pane =~# '\.\d\+$'
1 0.000026 let [window, index] = split(a:pane, '\.\%(\d\+$\)\@=')
1 0.009842 let out = system('tmux list-panes -F "#P #{pane_id}" -t '.shellescape(window))
1 0.000036 let id = matchstr("\n".out, '\n'.index.' \+\zs%\d\+')
1 0.000002 else
let id = system('tmux list-panes -F "#{pane_id}" -t '.shellescape(a:pane))[0:-2]
endif
1 0.000004 return id
FUNCTION airline#parts#iminsert()
Called 7 times
Total time: 0.000085
Self time: 0.000085
count total (s) self (s)
7 0.000034 if g:airline_detect_iminsert && &iminsert && exists('b:keymap_name')
return toupper(b:keymap_name)
endif
7 0.000009 return ''
FUNCTION gitgutter#process_buffer()
Called 1 time
Total time: 0.000553
Self time: 0.000205
count total (s) self (s)
1 0.000124 0.000038 call gitgutter#utility#set_buffer(a:bufnr)
1 0.000272 0.000026 if gitgutter#utility#is_active()
1 0.000007 if g:gitgutter_sign_column_always
call gitgutter#sign#add_dummy_sign()
endif
1 0.000003 try
1 0.000041 0.000024 if !a:realtime || gitgutter#utility#has_fresh_changes()
let diff = gitgutter#diff#run_diff(a:realtime || gitgutter#utility#has_unsaved_changes(), 1)
call gitgutter#hunk#set_hunks(gitgutter#diff#parse_diff(diff))
let modified_lines = gitgutter#diff#process_hunks(gitgutter#hunk#hunks())
if len(modified_lines) > g:gitgutter_max_signs
call gitgutter#utility#warn('exceeded maximum number of signs (configured by g:gitgutter_max_signs).')
call gitgutter#sign#clear_signs()
return
endif
if g:gitgutter_signs || g:gitgutter_highlight_lines
call gitgutter#sign#update_signs(modified_lines)
endif
call gitgutter#utility#save_last_seen_change()
endif
1 0.000004 catch /diff failed/
call gitgutter#hunk#reset()
endtry
1 0.000002 else
call gitgutter#hunk#reset()
endif
FUNCTION <SNR>68_repo_head_ref()
Called 1 time
Total time: 0.000100
Self time: 0.000084
count total (s) self (s)
1 0.000042 0.000033 if !filereadable(self.dir('HEAD'))
return ''
endif
1 0.000054 0.000047 return readfile(self.dir('HEAD'))[0]
FUNCTION <SNR>175_current_compiler()
Called 1 time
Total time: 0.000006
Self time: 0.000006
count total (s) self (s)
1 0.000006 return get((empty(&l:makeprg) ? g: : b:), 'current_compiler', '')
FUNCTION airline#extensions#tabline#buflist#list()
Called 3 times
Total time: 0.000018
Self time: 0.000018
count total (s) self (s)
3 0.000011 if exists('s:current_buffer_list')
3 0.000004 return s:current_buffer_list
endif
let buffers = []
let cur = bufnr('%')
for nr in range(1, bufnr('$'))
if buflisted(nr) && bufexists(nr)
let toadd = 1
for ex in s:excludes
if match(bufname(nr), ex) >= 0
let toadd = 0
break
endif
endfor
if getbufvar(nr, 'current_syntax') == 'qf'
let toadd = 0
endif
if toadd
call add(buffers, nr)
endif
endif
endfor
let s:current_buffer_list = buffers
return buffers
FUNCTION <SNR>137_check_mixed_indent()
Called 1 time
Total time: 0.000146
Self time: 0.000146
count total (s) self (s)
1 0.000002 if s:indent_algo == 1
" [<tab>]<space><tab>
" spaces before or between tabs are not allowed
let t_s_t = '(^\t* +\t\s*\S)'
" <tab>(<space> x count)
" count of spaces at the end of tabs should be less then tabstop value
let t_l_s = '(^\t+ {' . &ts . ',}' . '\S)'
return search('\v' . t_s_t . '|' . t_l_s, 'nw')
else
1 0.000136 return search('\v(^\t+ +)|(^ +\t+)', 'nw')
endif
FUNCTION airline#extensions#tabline#formatters#webdevicons#format()
Called 3 times
Total time: 0.000655
Self time: 0.000078
count total (s) self (s)
" Call original formatter.
3 0.000429 0.000042 let originalFormatter = airline#extensions#tabline#formatters#{g:_webdevicons_airline_orig_formatter}#format(a:bufnr, a:buffers)
3 0.000222 0.000030 return originalFormatter . ' ' . WebDevIconsGetFileTypeSymbol(bufname(a:bufnr)) . ' '
FUNCTION dispatch#tmux#handle()
Called 1 time
Total time: 0.055725
Self time: 0.008906
count total (s) self (s)
1 0.000008 let session = get(g:, 'tmux_session', '')
1 0.000052 if empty($TMUX) && empty(''.session) || !executable('tmux')
return 0
endif
1 0.008763 if !empty(system('tmux has-session -t '.shellescape(session))[0:-2])
return ''
endif
1 0.000008 if a:request.action ==# 'make'
1 0.046874 0.000055 return dispatch#tmux#make(a:request)
elseif a:request.action ==# 'start'
let command = 'tmux new-window -P -t '.shellescape(session.':')
let command .= ' -n '.shellescape(a:request.title)
if a:request.background
let command .= ' -d'
endif
let command .= ' ' . shellescape('exec ' . dispatch#isolate( ['TMUX', 'TMUX_PANE'], dispatch#prepare_start(a:request)))
call system(command)
return 1
endif
FUNCTION gitgutter#utility#exists_file()
Called 1 time
Total time: 0.000057
Self time: 0.000057
count total (s) self (s)
1 0.000055 return filereadable(s:file)
FUNCTION 39()
Called 7 times
Total time: 0.000114
Self time: 0.000114
count total (s) self (s)
7 0.000053 if !exists('b:syntastic_loclist') || empty(b:syntastic_loclist)
let b:syntastic_loclist = g:SyntasticLoclist.New([])
endif
7 0.000015 return b:syntastic_loclist
FUNCTION 48()
Called 7 times
Total time: 0.000617
Self time: 0.000617
count total (s) self (s)
7 0.000034 if !exists('self._stl_format')
let self._stl_format = ''
endif
7 0.000040 if !exists('self._stl_flag')
let self._stl_flag = ''
endif
7 0.000025 if g:syntastic_stl_format !=# self._stl_format
let self._stl_format = g:syntastic_stl_format
if !empty(self._rawLoclist)
let errors = self.errors()
let warnings = self.warnings()
let num_errors = len(errors)
let num_warnings = len(warnings)
let num_issues = len(self._rawLoclist)
let output = self._stl_format
"hide stuff wrapped in %E(...) unless there are errors
let output = substitute(output, '\m\C%E{\([^}]*\)}', num_errors ? '\1' : '' , 'g')
"hide stuff wrapped in %W(...) unless there are warnings
let output = substitute(output, '\m\C%W{\([^}]*\)}', num_warnings ? '\1' : '' , 'g')
"hide stuff wrapped in %B(...) unless there are both errors and warnings
let output = substitute(output, '\m\C%B{\([^}]*\)}', (num_warnings && num_errors) ? '\1' : '' , 'g')
"sub in the total errors/warnings/both
let output = substitute(output, '\m\C%w', num_warnings, 'g')
let output = substitute(output, '\m\C%e', num_errors, 'g')
let output = substitute(output, '\m\C%t', num_issues, 'g')
"first error/warning line num
let output = substitute(output, '\m\C%F', num_issues ? self._rawLoclist[0]['lnum'] : '', 'g')
"first error line num
let output = substitute(output, '\m\C%fe', num_errors ? errors[0]['lnum'] : '', 'g')
"first warning line num
let output = substitute(output, '\m\C%fw', num_warnings ? warnings[0]['lnum'] : '', 'g')
let self._stl_flag = output
else
let self._stl_flag = ''
endif
endif
7 0.000012 return self._stl_flag
FUNCTION dispatch#callback()
Called 1 time
Total time: 0.000016
Self time: 0.000016
count total (s) self (s)
1 0.000006 if !empty(v:servername) && has_key(s:request(a:request), 'id')
return dispatch#shellescape(dispatch#vim_executable()) . ' --servername ' . dispatch#shellescape(v:servername) . ' --remote-expr "' . 'DispatchComplete(' . s:request(a:request).id . ')' . '"'
endif
1 0.000001 return ''
FUNCTION airline#extensions#tabline#get_buffer_name()
Called 3 times
Total time: 0.000727
Self time: 0.000053
count total (s) self (s)
3 0.000723 0.000050 return airline#extensions#tabline#formatters#{s:formatter}#format(a:nr, airline#extensions#tabline#buflist#list())
FUNCTION dispatch#prepare_make()
Called 1 time
Total time: 0.000185
Self time: 0.000020
count total (s) self (s)
1 0.000007 let exec = a:0 ? a:1 : (a:request.expanded . dispatch#shellpipe(a:request.file))
1 0.000176 0.000012 return dispatch#prepare_start(a:request, exec, 1)
FUNCTION dispatch#isolate()
Called 1 time
Total time: 0.013482
Self time: 0.010531
count total (s) self (s)
1 0.000004 let keep = ['SHELL'] + a:keep
1 0.000023 let command = ['cd ' . shellescape(getcwd())]
71 0.007237 for line in split(system('env'), "\n")
70 0.000676 let var = matchstr(line, '^\w\+\ze=')
70 0.000332 if !empty(var) && var !=# '_' && index(keep, var) < 0
66 0.000259 if &shell =~# 'csh'
let command += split('setenv '.var.' '.shellescape(eval('$'.var)), "\n")
else
66 0.003901 0.000949 let command += split('export '.var.'='.dispatch#shellescape(eval('$'.var)), "\n")
66 0.000066 endif
66 0.000035 endif
70 0.000052 endfor
1 0.000002 let command += a:000
1 0.000004 let temp = tempname()
1 0.000473 call writefile(command, temp)
1 0.000042 return 'env -i ' . join(map(copy(keep), 'v:val."=\"$". v:val ."\" "'), '') . &shell . ' ' . temp
FUNCTION WebDevIconsGetFileTypeSymbol()
Called 10 times
Total time: 0.000712
Self time: 0.000712
count total (s) self (s)
10 0.000022 if a:0 == 0
7 0.000044 let fileNodeExtension = expand("%:e")
7 0.000029 let fileNode = expand("%:t")
7 0.000016 let isDirectory = 0
7 0.000008 else
3 0.000013 let fileNodeExtension = fnamemodify(a:1, ':e')
3 0.000010 let fileNode = fnamemodify(a:1, ':t')
3 0.000004 if a:0 == 2
let isDirectory = a:2
else
3 0.000006 let isDirectory = 0
3 0.000003 endif
3 0.000002 endif
10 0.000050 let fileNodeExtension = tolower(fileNodeExtension)
10 0.000040 let fileNode = tolower(fileNode)
10 0.000051 if has_key(g:WebDevIconsUnicodeDecorateFileNodesExactSymbols, fileNode)
let symbol = g:WebDevIconsUnicodeDecorateFileNodesExactSymbols[fileNode]
elseif has_key(g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols, fileNodeExtension)
10 0.000044 let symbol = g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols[fileNodeExtension]
10 0.000010 else
if isDirectory == 1
let symbol = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol
else
let symbol = g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol
endif
endif
10 0.000015 return symbol
FUNCTION <SNR>170_UpdateDiagnosticNotifications()
Called 1 time
Total time: 0.000061
Self time: 0.000048
count total (s) self (s)
1 0.000050 0.000037 let should_display_diagnostics = g:ycm_show_diagnostics_ui && s:DiagnosticUiSupportedForCurrentFiletype() && pyeval( 'ycm_state.NativeFiletypeCompletionUsable()' )
1 0.000004 if !should_display_diagnostics
1 0.000002 return
endif
py ycm_state.UpdateDiagnosticInterface()
FUNCTION <SNR>170_SetUpYcmChangedTick()
Called 1 time
Total time: 0.000021
Self time: 0.000021
count total (s) self (s)
1 0.000019 let b:ycm_changedtick = get( b:, 'ycm_changedtick', { 'file_ready_to_parse' : -1, } )
FUNCTION dispatch#shellescape()
Called 67 times
Total time: 0.003067
Self time: 0.003067
count total (s) self (s)
67 0.000140 let args = []
137 0.000215 for arg in a:000
70 0.000622 if arg =~ '^[A-Za-z0-9_/.-]\+$'
55 0.000177 let args += [arg]
55 0.000059 elseif &shell =~# 'c\@<!sh'
15 0.000166 let args += [substitute(shellescape(arg), '\\\n', '\n', 'g')]
15 0.000014 else
let args += [shellescape(arg)]
endif
70 0.000058 endfor
67 0.000217 return join(args, ' ')
FUNCTION <SNR>175_request()
Called 1 time
Total time: 0.000006
Self time: 0.000006
count total (s) self (s)
1 0.000004 if type(a:request) == type({})
1 0.000002 return a:request
elseif type(a:request) == type(0) && a:request > 0
return get(s:makes, a:request-1, {})
elseif type(a:request) == type('') && !empty(a:request)
return get(s:files, a:request, {})
else
return {}
endif
FUNCTION gitgutter#utility#set_buffer()
Called 1 time
Total time: 0.000086
Self time: 0.000086
count total (s) self (s)
1 0.000015 let s:bufnr = a:bufnr
1 0.000067 let s:file = resolve(bufname(a:bufnr))
FUNCTION airline#util#wrap()
Called 49 times
Total time: 0.000421
Self time: 0.000421
count total (s) self (s)
49 0.000185 if a:minwidth > 0 && winwidth(0) < a:minwidth
return ''
endif
49 0.000077 return a:text
FUNCTION <SNR>175_running()
Called 1 time
Total time: 0.005512
Self time: 0.005512
count total (s) self (s)
1 0.000002 if !a:pid
return 0
elseif has('win32')
let tasklist_cmd = 'tasklist /fi "pid eq '.a:pid.'"'
if &shellxquote ==# '"'
let tasklist_cmd = substitute(tasklist_cmd, '"', "'", "g")
endif
return system(tasklist_cmd) =~# '==='
else
1 0.005469 call system('kill -0 '.a:pid)
1 0.000017 return !v:shell_error
endif
FUNCTION <SNR>68_sub()
Called 1 time
Total time: 0.000016
Self time: 0.000016
count total (s) self (s)
1 0.000015 return substitute(a:str,'\v\C'.a:pat,a:rep,'')
FUNCTION airline#extensions#tabline#get()
Called 3 times
Total time: 0.000153
Self time: 0.000091
count total (s) self (s)
3 0.000014 let curtabcnt = tabpagenr('$')
3 0.000007 if curtabcnt != s:current_tabcnt
let s:current_tabcnt = curtabcnt
call airline#extensions#tabline#tabs#invalidate()
call airline#extensions#tabline#buffers#invalidate()
endif
3 0.000008 if s:show_buffers && curtabcnt == 1 || !s:show_tabs
return airline#extensions#tabline#buffers#get()
else
3 0.000088 0.000025 return airline#extensions#tabline#tabs#get()
endif
FUNCTION PencilMode()
Called 7 times
Total time: 0.000161
Self time: 0.000161
count total (s) self (s)
7 0.000032 if exists('b:pencil_wrap_mode')
if b:pencil_wrap_mode ==# s:WRAP_MODE_SOFT
return get(g:pencil#mode_indicators, 'soft', 'S')
elsei b:pencil_wrap_mode ==# s:WRAP_MODE_HARD
return get(g:pencil#mode_indicators, 'hard', 'H')
el
return get(g:pencil#mode_indicators, 'off', '')
en
else
7 0.000009 return '' " should be blank for non-prose modes
en
FUNCTION airline#extensions#tabline#title()
Called 3 times
Total time: 0.000801
Self time: 0.000074
count total (s) self (s)
3 0.000007 let title = ''
3 0.000004 if s:taboo
let title = TabooTabTitle(a:n)
endif
3 0.000006 if empty(title)
3 0.000009 let buflist = tabpagebuflist(a:n)
3 0.000008 let winnr = tabpagewinnr(a:n)
3 0.000753 0.000026 return airline#extensions#tabline#get_buffer_name(buflist[winnr - 1])
endif
return title
FUNCTION airline#extensions#tabline#formatters#default#wrap_name()
Called 3 times
Total time: 0.000072
Self time: 0.000072
count total (s) self (s)
3 0.000015 let _ = s:buf_nr_show ? printf(s:buf_nr_format, a:bufnr) : ''
3 0.000026 let _ .= substitute(a:buffer_name, '\\', '/', 'g')
3 0.000013 if getbufvar(a:bufnr, '&modified') == 1
let _ .= s:buf_modified_symbol
endif
3 0.000003 return _
FUNCTION go#cmd#Build()
Called 1 time
Total time: 0.173488
Self time: 0.008696
count total (s) self (s)
1 0.000010 let default_makeprg = &makeprg
1 0.098900 0.000025 let gofiles = join(go#tool#Files(), '" "')
1 0.000003 if v:shell_error
let &makeprg = "go build . errors"
else
1 0.000169 let &makeprg = "go build -o /dev/null " . join(a:000, ' ') . ' "' . gofiles . '"'
1 0.000002 endif
1 0.000038 echon "vim-go: " | echohl Identifier | echon "building ..."| echohl None
1 0.000007 if exists(':Make')
1 0.066520 0.000603 silent! exe 'Make!'
1 0.000001 else
silent! exe 'make!'
endif
1 0.005120 redraw!
1 0.000009 if !a:bang
1 0.000003 cwindow
1 0.000008 let errors = getqflist()
1 0.000004 if !empty(errors)
if g:go_jump_to_error
cc 1 "jump to first error if there is any
endif
else
1 0.002662 redraws! | echon "vim-go: " | echohl Function | echon "[build] SUCCESS"| echohl None
1 0.000001 endif
1 0.000001 endif
1 0.000006 let &makeprg = default_makeprg
FUNCTION dispatch#tmux#make()
Called 1 time
Total time: 0.046819
Self time: 0.023093
count total (s) self (s)
1 0.000027 let pipepane = (&shellpipe ==# '2>&1| tee' || &shellpipe ==# '|& tee') && a:request.format !~# '%\\[er]'
1 0.000005 let session = get(g:, 'tmux_session', '')
1 0.013727 0.000060 let script = dispatch#isolate(['TMUX', 'TMUX_PANE'], call('dispatch#prepare_make', [a:request] + (pipepane ? [a:request.expanded] : [])))
1 0.000011 let title = shellescape(get(a:request, 'title', get(a:request, 'compiler', 'make')))
1 0.000003 if get(a:request, 'background', 0)
1 0.000003 let cmd = 'new-window -d -n '.title
1 0.000005 elseif has('gui_running') || empty($TMUX) || (!empty(''.session) && session !=# system('tmux display-message -p "#S"')[0:-2])
let cmd = 'new-window -n '.title
else
let cmd = 'split-window -l 10 -d'
endif
1 0.000129 0.000013 let cmd .= ' ' . dispatch#shellescape('-P', '-t', session.':', 'exec ' . script)
1 0.000002 let filter = 'sed'
1 0.008027 let uname = system('uname')[0:-2]
1 0.000009 if uname ==# 'Darwin'
1 0.000006 let filter = '/usr/bin/sed -l'
1 0.000002 elseif uname ==# 'Linux'
let filter .= ' -u'
endif
1 0.000013 let filter .= " -e \"s/\r$//\" -e \"s/.*\r//\" -e \"s/\e\\[K//g\" -e \"s/.*\e\\[2K\e\\[0G//g\" -e \"s/\e\\[[0-9;]*m//g\" > ".a:request.file
1 0.014724 call system('tmux ' . cmd . '|tee ' . s:make_pane . (pipepane ? '|xargs -I {} tmux pipe-pane -t {} '.shellescape(filter) : ''))
1 0.010081 0.000138 let pane = s:pane_id(get(readfile(s:make_pane, '', 1), 0, ''))
1 0.000004 if !empty(pane)
1 0.000007 let s:waiting[pane] = a:request
1 0.000003 return 1
endif
FUNCTION <SNR>133_get_hunks()
Called 7 times
Total time: 0.001310
Self time: 0.000264
count total (s) self (s)
7 0.000034 if empty(s:source_func)
if get(g:, 'loaded_signify', 0)
let s:source_func = 's:get_hunks_signify'
elseif exists('*GitGutterGetHunkSummary')
let s:source_func = 's:get_hunks_gitgutter'
elseif exists('*changes#GetStats')
let s:source_func = 's:get_hunks_changes'
else
let s:source_func = 's:get_hunks_empty'
endif
endif
7 0.001128 0.000082 return {s:source_func}()
FUNCTION <SNR>170_DiagnosticUiSupportedForCurrentFiletype()
Called 1 time
Total time: 0.000013
Self time: 0.000013
count total (s) self (s)
1 0.000011 return get( s:diagnostic_ui_filetypes, &filetype, 0 )
FUNCTION <SNR>170_AllowedToCompleteInCurrentFile()
Called 1 time
Total time: 0.000082
Self time: 0.000082
count total (s) self (s)
1 0.000027 if empty( &filetype ) || getbufvar( winbufnr( winnr() ), "&buftype" ) ==# 'nofile' || &filetype ==# 'qf'
return 0
endif
1 0.000007 if exists( 'b:ycm_largefile' )
return 0
endif
1 0.000015 let whitelist_allows = has_key( g:ycm_filetype_whitelist, '*' ) || has_key( g:ycm_filetype_whitelist, &filetype )
1 0.000010 let blacklist_allows = !has_key( g:ycm_filetype_blacklist, &filetype )
1 0.000005 return whitelist_allows && blacklist_allows
FUNCTION airline#parts#ffenc()
Called 7 times
Total time: 0.000120
Self time: 0.000120
count total (s) self (s)
7 0.000114 return printf('%s%s', &fenc, strlen(&ff) > 0 ? '['.&ff.']' : '')
FUNCTION <SNR>68_repo_dir()
Called 2 times
Total time: 0.000016
Self time: 0.000016
count total (s) self (s)
2 0.000014 return join([self.git_dir]+a:000,'/')
FUNCTION gitgutter#utility#has_fresh_changes()
Called 1 time
Total time: 0.000016
Self time: 0.000016
count total (s) self (s)
1 0.000015 return getbufvar(s:bufnr, 'changedtick') != getbufvar(s:bufnr, 'gitgutter_last_tick')
FUNCTION airline#extensions#tabline#tabs#get()
Called 3 times
Total time: 0.000062
Self time: 0.000062
count total (s) self (s)
3 0.000012 let curbuf = bufnr('%')
3 0.000007 let curtab = tabpagenr()
3 0.000008 if curbuf == s:current_bufnr && curtab == s:current_tabnr
3 0.000021 if !g:airline_detect_modified || getbufvar(curbuf, '&modified') == s:current_modified
3 0.000008 return s:current_tabline
endif
endif
let b = airline#extensions#tabline#new_builder()
for i in range(1, tabpagenr('$'))
if i == curtab
let group = 'airline_tabsel'
if g:airline_detect_modified
for bi in tabpagebuflist(i)
if getbufvar(bi, '&modified')
let group = 'airline_tabmod'
endif
endfor
endif
let s:current_modified = (group == 'airline_tabmod') ? 1 : 0
else
let group = 'airline_tab'
endif
let val = '%('
if s:show_tab_nr
if s:tab_nr_type == 0
let val .= (g:airline_symbols.space).'%{len(tabpagebuflist('.i.'))}'
elseif s:tab_nr_type == 1
let val .= (g:airline_symbols.space).i
else "== 2
let val .= (g:airline_symbols.space).i.'.%{len(tabpagebuflist('.i.'))}'
endif
endif
call b.add_section(group, val.'%'.i.'T %{airline#extensions#tabline#title('.i.')} %)')
endfor
call b.add_raw('%T')
call b.add_section('airline_tabfill', '')
call b.split()
if s:show_close_button
call b.add_section('airline_tab', ' %999X'.s:close_symbol.' ')
endif
if s:show_tab_type
call b.add_section('airline_tabtype', ' tabs ')
endif
let s:current_bufnr = curbuf
let s:current_tabnr = curtab
let s:current_tabline = b.build()
return s:current_tabline
FUNCTION airline#parts#paste()
Called 7 times
Total time: 0.000046
Self time: 0.000046
count total (s) self (s)
7 0.000036 return g:airline_detect_paste && &paste ? g:airline_symbols.paste : ''
FUNCTION airline#parts#readonly()
Called 7 times
Total time: 0.000036
Self time: 0.000036
count total (s) self (s)
7 0.000027 return &readonly ? g:airline_symbols.readonly : ''
FUNCTION airline#extensions#hunks#get_hunks()
Called 7 times
Total time: 0.001979
Self time: 0.000669
count total (s) self (s)
7 0.000035 if !get(w:, 'airline_active', 0)
return ''
endif
7 0.001386 0.000076 let hunks = s:get_hunks()
7 0.000017 let string = ''
7 0.000019 if !empty(hunks)
28 0.000066 for i in [0, 1, 2]
21 0.000060 if s:non_zero_only == 0 || hunks[i] > 0
21 0.000207 let string .= printf('%s%s ', s:hunk_symbols[i], hunks[i])
21 0.000026 endif
21 0.000025 endfor
7 0.000007 endif
7 0.000011 return string
FUNCTION airline#extensions#syntastic#get_warnings()
Called 7 times
Total time: 0.000958
Self time: 0.000125
count total (s) self (s)
7 0.000892 0.000060 let errors = SyntasticStatuslineFlag()
7 0.000024 if strlen(errors) > 0
return errors.(g:airline_symbols.space)
endif
7 0.000008 return ''
FUNCTION <SNR>170_OnFileReadyToParse()
Called 1 time
Total time: 0.000172
Self time: 0.000090
count total (s) self (s)
" We need to call this just in case there is no b:ycm_changetick; this can
" happen for special buffers.
1 0.000043 0.000022 call s:SetUpYcmChangedTick()
" Order is important here; we need to extract any done diagnostics before
" reparsing the file again. If we sent the new parse request first, then
" the response would always be pending when we called
" UpdateDiagnosticNotifications.
1 0.000091 0.000030 call s:UpdateDiagnosticNotifications()
1 0.000010 let buffer_changed = b:changedtick != b:ycm_changedtick.file_ready_to_parse
1 0.000003 if buffer_changed
py ycm_state.OnFileReadyToParse()
endif
1 0.000007 let b:ycm_changedtick.file_ready_to_parse = b:changedtick
FUNCTION <SNR>133_is_branch_empty()
Called 7 times
Total time: 0.000812
Self time: 0.000111
count total (s) self (s)
7 0.000805 0.000104 return exists('*airline#extensions#branch#head') && empty(airline#extensions#branch#head())
FUNCTION airline#extensions#whitespace#check()
Called 7 times
Total time: 0.000674
Self time: 0.000528
count total (s) self (s)
7 0.000049 if &readonly || !&modifiable || !s:enabled || line('$') > s:max_lines
return ''
endif
7 0.000031 if !exists('b:airline_whitespace_check')
1 0.000002 let b:airline_whitespace_check = ''
1 0.000004 let checks = get(g:, 'airline#extensions#whitespace#checks', s:default_checks)
1 0.000001 let trailing = 0
1 0.000003 if index(checks, 'trailing') > -1
1 0.000077 let trailing = search('\s$', 'nw')
1 0.000001 endif
1 0.000002 let mixed = 0
1 0.000002 if index(checks, 'indent') > -1
1 0.000155 0.000009 let mixed = s:check_mixed_indent()
1 0.000001 endif
1 0.000002 if trailing != 0 || mixed != 0
let b:airline_whitespace_check = s:symbol
if s:show_message
if trailing != 0
let b:airline_whitespace_check .= (g:airline_symbols.space).printf(s:trailing_format, trailing)
endif
if mixed != 0
let b:airline_whitespace_check .= (g:airline_symbols.space).printf(s:mixed_indent_format, mixed)
endif
endif
endif
1 0.000000 endif
7 0.000014 return b:airline_whitespace_check
FUNCTION airline#extensions#tabline#formatters#default#format()
Called 3 times
Total time: 0.000386
Self time: 0.000314
count total (s) self (s)
3 0.000006 let _ = ''
3 0.000011 let name = bufname(a:bufnr)
3 0.000007 if empty(name)
let _ .= '[No Name]'
else
3 0.000004 if s:fnamecollapse
3 0.000199 let _ .= substitute(fnamemodify(name, s:fmod), '\v\w\zs.{-}\ze(\\|/)', '', 'g')
3 0.000005 else
let _ .= fnamemodify(name, s:fmod)
endif
3 0.000015 if a:bufnr != bufnr('%') && s:fnametruncate && strlen(_) > s:fnametruncate
let _ = strpart(_, 0, s:fnametruncate)
endif
3 0.000002 endif
3 0.000100 0.000028 return airline#extensions#tabline#formatters#default#wrap_name(a:bufnr, _)
FUNCTION dispatch#expand()
Called 1 time
Total time: 0.000047
Self time: 0.000047
count total (s) self (s)
1 0.000046 return substitute(a:string, s:expandable, '\=s:expand(submatch(0))', 'g')
FUNCTION <SNR>170_SetUpCompleteopt()
Called 1 time
Total time: 0.000063
Self time: 0.000063
count total (s) self (s)
" Some plugins (I'm looking at you, vim-notes) change completeopt by for
" instance adding 'longest'. This breaks YCM. So we force our settings.
" There's no two ways about this: if you want to use YCM then you have to
" have these completeopt settings, otherwise YCM won't work at all.
" We need menuone in completeopt, otherwise when there's only one candidate
" for completion, the menu doesn't show up.
1 0.000021 set completeopt-=menu
1 0.000008 set completeopt+=menuone
" This is unnecessary with our features. People use this option to insert
" the common prefix of all the matches and then add more differentiating chars
" so that they can select a more specific match. With our features, they
" don't need to insert the prefix; they just type the differentiating chars.
" Also, having this option set breaks the plugin.
1 0.000005 set completeopt-=longest
1 0.000005 if g:ycm_add_preview_to_completeopt
set completeopt+=preview
endif
FUNCTION gitgutter#utility#not_git_dir()
Called 1 time
Total time: 0.000140
Self time: 0.000065
count total (s) self (s)
1 0.000138 0.000063 return gitgutter#utility#full_path_to_directory_of_file() !~ '[/\\]\.git\($\|[/\\]\)'
FUNCTION gitgutter#utility#full_path_to_directory_of_file()
Called 1 time
Total time: 0.000075
Self time: 0.000075
count total (s) self (s)
1 0.000073 return fnamemodify(s:file, ':p:h')
FUNCTION gitgutter#hunk#summary()
Called 7 times
Total time: 0.000029
Self time: 0.000029
count total (s) self (s)
7 0.000022 return s:summary
FUNCTION dispatch#compile_command()
Called 1 time
Total time: 0.064673
Self time: 0.000524
count total (s) self (s)
1 0.000007 if !empty(a:args)
1 0.000004 let args = a:args
1 0.000001 else
let args = '_'
for vars in a:count < 0 ? [b:, g:, t:, w:] : [b:]
if has_key(vars, 'dispatch') && type(vars.dispatch) == type('')
let args = vars.dispatch
endif
endfor
endif
1 0.000006 if args =~# '^!'
return 'Start' . (a:bang ? '!' : '') . ' ' . args[1:-1]
elseif args =~# '^:.'
return (a:count > 0 ? a:count : '').substitute(args[1:-1], '\>', (a:bang ? '!' : ''), '')
endif
1 0.000054 0.000013 let [args, request] = s:extract_opts(args)
1 0.000007 let executable = matchstr(args, '\S\+')
1 0.000018 call extend(request, { 'action': 'make', 'background': a:bang, 'format': '%+I%.%#' }, 'keep')
1 0.000002 if executable ==# '_'
1 0.000011 let request.args = matchstr(args, '_\s*\zs.*')
1 0.000004 let request.program = &makeprg
1 0.000004 if &makeprg =~# '\$\*'
let request.command = substitute(&makeprg, '\$\*', request.args, 'g')
elseif empty(request.args)
1 0.000002 let request.command = &makeprg
1 0.000001 else
let request.command = &makeprg . ' ' . request.args
endif
1 0.000003 let request.format = &errorformat
1 0.000016 0.000010 let request.compiler = s:current_compiler()
1 0.000001 else
let request.compiler = get(request, 'compiler', dispatch#compiler_for_program(args))
if !empty(request.compiler)
call extend(request,dispatch#compiler_options(request.compiler))
endif
let request.command = args
endif
1 0.000019 let request.format = substitute(request.format, ',%-G%\.%#\%($\|,\@=\)', '', '')
1 0.000002 if a:count
1 0.000015 let request.command = substitute(request.command, '<\%(lnum\|line1\|line2\)>'.s:flags, '\=fnamemodify(a:count, submatch(0)[6:-1])', 'g')
1 0.000001 else
let request.command = substitute(request.command, '<\%(lnum\|line1\|line2\)>'.s:flags, '', 'g')
endif
1 0.000002 if empty(request.compiler)
1 0.000002 unlet request.compiler
1 0.000001 endif
1 0.000005 let request.title = get(request, 'title', get(request, 'compiler', 'make'))
1 0.000002 if &autowrite || &autowriteall
1 0.000006 silent! wall
1 0.000001 endif
1 0.000001 cclose
1 0.000004 let request.file = tempname()
1 0.000005 let &errorfile = request.file
1 0.000006 let efm = &l:efm
1 0.000002 let makeprg = &l:makeprg
1 0.000006 let compiler = get(b:, 'current_compiler', '')
1 0.000002 let modelines = &modelines
1 0.000001 let after = ''
1 0.000005 let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd' : 'cd'
1 0.000001 try
1 0.000006 let &modelines = 0
1 0.000023 0.000012 call s:set_current_compiler(get(request, 'compiler', ''))
1 0.000006 let &l:efm = request.format
1 0.000003 let &l:makeprg = request.command
1 0.000045 0.000039 silent doautocmd QuickFixCmdPre dispatch-make
1 0.000030 let request.directory = get(request, 'directory', getcwd())
1 0.000013 if request.directory !=# getcwd()
let cwd = getcwd()
execute cd fnameescape(request.directory)
endif
1 0.000061 0.000014 let request.expanded = get(request, 'expanded', dispatch#expand(request.command))
1 0.000008 call extend(s:makes, [request])
1 0.000003 let request.id = len(s:makes)
1 0.000004 let s:files[request.file] = request
1 0.064037 0.000021 if !s:dispatch(request)
let after = 'call dispatch#complete('.request.id.')'
redraw!
execute 'silent !'.request.command dispatch#shellpipe(request.file)
redraw!
endif
1 0.000001 finally
1 0.000046 0.000040 silent doautocmd QuickFixCmdPost dispatch-make
1 0.000010 let &modelines = modelines
1 0.000011 let &l:efm = efm
1 0.000004 let &l:makeprg = makeprg
1 0.000026 0.000011 call s:set_current_compiler(compiler)
1 0.000004 if exists('cwd')
execute cd fnameescape(cwd)
endif
1 0.000002 endtry
1 0.000004 execute after
1 0.000004 return ''
FUNCTION <SNR>175_extract_opts()
Called 1 time
Total time: 0.000041
Self time: 0.000041
count total (s) self (s)
1 0.000003 let command = a:command
1 0.000002 let opts = {}
1 0.000012 while command =~# '^-\%(\w\+\)\%([= ]\|$\)'
let opt = matchstr(command, '^-\zs\w\+')
if command =~ '^-\w\+='
let val = matchstr(command, '^-\w\+=\zs\%(\\.\|\S\)*')
else
let val = 1
endif
if opt ==# 'dir' || opt ==# 'directory'
let opts.directory = fnamemodify(expand(val), ':p')
else
let opts[opt] = substitute(val, '\\\(\s\)', '\1', 'g')
endif
let command = substitute(command, '^-\w\+\%(=\%(\\.\|\S\)*\)\=\s*', '', '')
endwhile
1 0.000002 return [command, opts]
FUNCTION airline#extensions#branch#head()
Called 14 times
Total time: 0.000768
Self time: 0.000270
count total (s) self (s)
14 0.000100 if exists('b:airline_head') && !empty(b:airline_head)
13 0.000030 return b:airline_head
endif
1 0.000005 let b:airline_head = ''
1 0.000005 let found_fugitive_head = 0
1 0.000009 if s:has_fugitive && !exists('b:mercurial_dir')
1 0.000525 0.000029 let b:airline_head = fugitive#head(7)
1 0.000002 let found_fugitive_head = 1
1 0.000003 if empty(b:airline_head) && !exists('b:git_dir')
let b:airline_head = s:get_git_branch(expand("%:p:h"))
endif
1 0.000001 endif
1 0.000002 if empty(b:airline_head)
if s:has_lawrencium
let b:airline_head = lawrencium#statusline()
endif
endif
1 0.000002 if empty(b:airline_head)
if s:has_vcscommand
call VCSCommandEnableBufferSetup()
if exists('b:VCSCommandBufferInfo')
let b:airline_head = get(b:VCSCommandBufferInfo, 0, '')
endif
endif
endif
1 0.000004 if empty(b:airline_head) || !found_fugitive_head && !s:check_in_path()
let b:airline_head = ''
endif
1 0.000011 0.000009 let b:airline_head = s:format_name(b:airline_head)
1 0.000004 if exists("g:airline#extensions#branch#displayed_head_limit")
let w:displayed_head_limit = g:airline#extensions#branch#displayed_head_limit
if len(b:airline_head) > w:displayed_head_limit - 1
let b:airline_head = b:airline_head[0:w:displayed_head_limit - 1].'…'
endif
endif
1 0.000001 return b:airline_head
FUNCTION GitGutterGetHunkSummary()
Called 7 times
Total time: 0.000085
Self time: 0.000056
count total (s) self (s)
7 0.000080 0.000051 return gitgutter#hunk#summary()
FUNCTION airline#parts#mode()
Called 7 times
Total time: 0.000052
Self time: 0.000052
count total (s) self (s)
7 0.000040 return get(w:, 'airline_current_mode', '')
FUNCTION dispatch#prepare_start()
Called 1 time
Total time: 0.000165
Self time: 0.000148
count total (s) self (s)
1 0.000007 let exec = 'echo $$ > ' . a:request.file . '.pid; '
1 0.000084 if executable('perl')
1 0.000005 let exec .= 'perl -e "select(undef,undef,undef,0.1)" 2>/dev/null; '
1 0.000001 else
let exec .= 'sleep 1; '
endif
1 0.000003 let exec .= a:0 ? a:1 : a:request.expanded
1 0.000030 0.000014 let callback = dispatch#callback(a:request)
1 0.000011 let after = 'rm -f ' . a:request.file . '.pid; ' . 'touch ' . a:request.file . '.complete' . (empty(callback) ? '' : '; ' . callback)
1 0.000007 if &shellpipe =~# '2>&1'
1 0.000010 return 'trap ' . shellescape(after) . ' EXIT INT TERM; ' . exec
else
" csh
return exec . '; ' . after
endif
FUNCTION <SNR>68_repo()
Called 2 times
Total time: 0.000252
Self time: 0.000252
count total (s) self (s)
2 0.000032 let dir = a:0 ? a:1 : (exists('b:git_dir') && b:git_dir !=# '' ? b:git_dir : fugitive#extract_git_dir(expand('%:p')))
2 0.000007 if dir !=# ''
2 0.000012 if has_key(s:repos, dir)
2 0.000012 let repo = get(s:repos, dir)
2 0.000003 else
let repo = {'git_dir': dir}
let s:repos[dir] = repo
endif
2 0.000156 return extend(extend(repo, s:repo_prototype, 'keep'), s:abstract_prototype, 'keep')
endif
call s:throw('not a git repository: '.expand('%:p'))
FUNCTION airline#statusline()
Called 7 times
Total time: 0.000217
Self time: 0.000217
count total (s) self (s)
7 0.000076 if has_key(s:contexts, a:winnr)
7 0.000116 return '%{airline#check_mode('.a:winnr.')}'.s:contexts[a:winnr].line
endif
" in rare circumstances this happens...see #276
return ''
FUNCTION dispatch#pid()
Called 1 time
Total time: 0.005672
Self time: 0.000154
count total (s) self (s)
1 0.000017 0.000010 let request = s:request(a:request)
1 0.000003 let file = request.file
1 0.000003 if !has_key(request, 'pid')
1 0.000005 if has('win32') && !executable('wmic')
let request.pid = 0
return 0
endif
1 0.000007 for i in range(50)
1 0.000020 if getfsize(file.'.pid') > 0 || filereadable(file.'.complete')
1 0.000002 break
endif
sleep 10m
endfor
1 0.000002 try
1 0.000044 let request.pid = +readfile(file.'.pid')[0]
1 0.000002 catch
let request.pid = 0
endtry
1 0.000001 endif
1 0.000013 if request.pid && getfsize(file.'.pid') > 0
1 0.005528 0.000016 if s:running(request.pid)
1 0.000008 return request.pid
else
let request.pid = 0
call delete(file.'.pid')
endif
endif
FUNCTION gitgutter#utility#is_active()
Called 1 time
Total time: 0.000246
Self time: 0.000048
count total (s) self (s)
1 0.000244 0.000047 return g:gitgutter_enabled && gitgutter#utility#exists_file() && gitgutter#utility#not_git_dir()
FUNCTION <SNR>175_dispatch()
Called 1 time
Total time: 0.064016
Self time: 0.002072
count total (s) self (s)
1 0.000004 for handler in g:dispatch_handlers
1 0.057031 0.000760 let response = call('dispatch#'.handler.'#handle', [a:request])
1 0.000004 if !empty(response)
1 0.001192 redraw
1 0.005692 0.000020 let pid = dispatch#pid(a:request)
1 0.000052 echo ':!'.a:request.expanded . ' ('.handler.'/'.(pid ? pid : '?').')'
1 0.000008 let a:request.handler = handler
1 0.000002 return 1
endif
endfor
return 0
FUNCTION airline#extensions#branch#get_head()
Called 7 times
Total time: 0.000306
Self time: 0.000238
count total (s) self (s)
7 0.000114 0.000046 let head = airline#extensions#branch#head()
7 0.000062 let empty_message = get(g:, 'airline#extensions#branch#empty_message', get(g:, 'airline_branch_empty_message', ''))
7 0.000043 let symbol = get(g:, 'airline#extensions#branch#symbol', g:airline_symbols.branch)
7 0.000072 return empty(head) ? empty_message : printf('%s%s', empty(symbol) ? '' : symbol.(g:airline_symbols.space), head)
FUNCTION fugitive#head()
Called 1 time
Total time: 0.000496
Self time: 0.000075
count total (s) self (s)
1 0.000010 if !exists('b:git_dir')
return ''
endif
1 0.000479 0.000058 return s:repo().head(a:0 ? a:1 : 0)
FUNCTION IsWin()
Called 1 time
Total time: 0.000102
Self time: 0.000102
count total (s) self (s)
1 0.000008 let win = ['win16', 'win32', 'win32unix', 'win64', 'win95']
6 0.000017 for w in win
5 0.000035 if (has(w))
return 1
endif
5 0.000011 endfor
1 0.000002 return 0
FUNCTION <SNR>170_OnCursorHold()
Called 1 time
Total time: 0.000403
Self time: 0.000087
count total (s) self (s)
1 0.000112 0.000031 if !s:AllowedToCompleteInCurrentFile()
return
endif
1 0.000085 0.000023 call s:SetUpCompleteopt()
1 0.000198 0.000026 call s:OnFileReadyToParse()
FUNCTION SyntasticStatuslineFlag()
Called 7 times
Total time: 0.000832
Self time: 0.000102
count total (s) self (s)
7 0.000823 0.000092 return g:SyntasticLoclist.current().getStatuslineFlag()
FUNCTIONS SORTED ON TOTAL TIME
count total (s) self (s) function
1 0.173488 0.008696 go#cmd#Build()
1 0.098875 0.000085 go#tool#Files()
1 0.098687 go#tool#ExecuteInDir()
1 0.064673 0.000524 dispatch#compile_command()
1 0.064016 0.002072 <SNR>175_dispatch()
1 0.055725 0.008906 dispatch#tmux#handle()
1 0.046819 0.023093 dispatch#tmux#make()
1 0.013482 0.010531 dispatch#isolate()
1 0.009943 <SNR>176_pane_id()
1 0.005672 0.000154 dispatch#pid()
1 0.005512 <SNR>175_running()
67 0.003067 dispatch#shellescape()
7 0.001979 0.000669 airline#extensions#hunks#get_hunks()
7 0.001310 0.000264 <SNR>133_get_hunks()
7 0.001046 0.000148 <SNR>133_get_hunks_gitgutter()
7 0.000958 0.000125 airline#extensions#syntastic#get_warnings()
7 0.000917 airline#check_mode()
7 0.000832 0.000102 SyntasticStatuslineFlag()
7 0.000812 0.000111 <SNR>133_is_branch_empty()
3 0.000801 0.000074 airline#extensions#tabline#title()
FUNCTIONS SORTED ON SELF TIME
count total (s) self (s) function
1 0.098687 go#tool#ExecuteInDir()
1 0.046819 0.023093 dispatch#tmux#make()
1 0.013482 0.010531 dispatch#isolate()
1 0.009943 <SNR>176_pane_id()
1 0.055725 0.008906 dispatch#tmux#handle()
1 0.173488 0.008696 go#cmd#Build()
1 0.005512 <SNR>175_running()
67 0.003067 dispatch#shellescape()
1 0.064016 0.002072 <SNR>175_dispatch()
7 0.000917 airline#check_mode()
10 0.000712 WebDevIconsGetFileTypeSymbol()
7 0.001979 0.000669 airline#extensions#hunks#get_hunks()
7 0.000617 48()
7 0.000674 0.000528 airline#extensions#whitespace#check()
1 0.064673 0.000524 dispatch#compile_command()
49 0.000421 airline#util#wrap()
21 0.000412 airline#util#append()
3 0.000386 0.000314 airline#extensions#tabline#formatters#default#format()
14 0.000768 0.000270 airline#extensions#branch#head()
7 0.001310 0.000264 <SNR>133_get_hunks()
SCRIPT /Users/alex/.vim/bundle/vim-go/autoload/go/cmd.vim
Sourced 1 time
Total time: 0.000247
Self time: 0.000247
count total (s) self (s)
if !exists("g:go_jump_to_error")
1 0.000006 let g:go_jump_to_error = 1
1 0.000002 endif
1 0.000005 function! go#cmd#Run(bang, ...)
let goFiles = '"' . join(go#tool#Files(), '" "') . '"'
if IsWin()
exec '!go run ' . goFiles
if v:shell_error
redraws! | echon "vim-go: [run] " | echohl ErrorMsg | echon "FAILED"| echohl None
else
redraws! | echon "vim-go: [run] " | echohl Function | echon "SUCCESS"| echohl None
endif
return
endif
let default_makeprg = &makeprg
if !len(a:000)
let &makeprg = 'go run ' . goFiles
else
let &makeprg = "go run " . expand(a:1)
endif
exe 'make!'
if !a:bang
cwindow
let errors = getqflist()
if !empty(errors)
if g:go_jump_to_error
cc 1 "jump to first error if there is any
endif
endif
endif
let &makeprg = default_makeprg
endfunction
1 0.000003 function! go#cmd#Install(...)
let pkgs = join(a:000, '" "')
let command = 'go install "' . pkgs . '"'
let out = go#tool#ExecuteInDir(command)
if v:shell_error
call go#tool#ShowErrors(out)
cwindow
return
endif
if exists("$GOBIN")
echon "vim-go: " | echohl Function | echon "installed to ". $GOBIN | echohl None
else
echon "vim-go: " | echohl Function | echon "installed to ". $GOPATH . "/bin" | echohl None
endif
endfunction
1 0.000003 function! go#cmd#Build(bang, ...)
let default_makeprg = &makeprg
let gofiles = join(go#tool#Files(), '" "')
if v:shell_error
let &makeprg = "go build . errors"
else
let &makeprg = "go build -o /dev/null " . join(a:000, ' ') . ' "' . gofiles . '"'
endif
echon "vim-go: " | echohl Identifier | echon "building ..."| echohl None
silent! exe 'make!'
redraw!
if !a:bang
cwindow
let errors = getqflist()
if !empty(errors)
if g:go_jump_to_error
cc 1 "jump to first error if there is any
endif
else
redraws! | echon "vim-go: " | echohl Function | echon "[build] SUCCESS"| echohl None
endif
endif
let &makeprg = default_makeprg
endfunction
1 0.000003 function! go#cmd#Test(compile, ...)
let command = "go test "
" don't run the test, only compile it. Useful to capture and fix errors or
" to create a test binary.
if a:compile
let command .= "-c"
endif
if len(a:000)
let command .= expand(a:1)
endif
if len(a:000) == 2
let command .= a:2
endif
if a:compile
echon "vim-go: " | echohl Identifier | echon "compiling tests ..." | echohl None
else
echon "vim-go: " | echohl Identifier | echon "testing ..." | echohl None
endif
redraw
let out = go#tool#ExecuteInDir(command)
if v:shell_error
call go#tool#ShowErrors(out)
cwindow
let errors = getqflist()
if !empty(errors)
if g:go_jump_to_error
cc 1 "jump to first error if there is any
endif
endif
echon "vim-go: " | echohl ErrorMsg | echon "[test] FAIL" | echohl None
else
call setqflist([])
cwindow
if a:compile
echon "vim-go: " | echohl Function | echon "[test] SUCCESS" | echohl None
else
echon "vim-go: " | echohl Function | echon "[test] PASS" | echohl None
endif
endif
endfunction
1 0.000003 function! go#cmd#TestFunc(...)
" search flags legend (used only)
" 'b' search backward instead of forward
" 'c' accept a match at the cursor position
" 'n' do Not move the cursor
" 'W' don't wrap around the end of the file
"
" for the full list
" :help search
let test = search("func Test", "bcnW")
if test == 0
echo "vim-go: [test] no test found immediate to cursor"
return
end
let line = getline(test)
let name = split(split(line, " ")[1], "(")[0]
let flag = "-run \"" . name . "$\""
let a1 = ""
if len(a:000)
let a1 = a:1
" add extra space
let flag = " " . flag
endif
call go#cmd#Test(0, a1, flag)
endfunction
1 0.000003 function! go#cmd#Coverage(...)
let l:tmpname=tempname()
let command = "go test -coverprofile=".l:tmpname
let out = go#tool#ExecuteInDir(command)
if v:shell_error
call go#tool#ShowErrors(out)
else
" clear previous quick fix window
call setqflist([])
let openHTML = 'go tool cover -html='.l:tmpname
call go#tool#ExecuteInDir(openHTML)
endif
cwindow
let errors = getqflist()
if !empty(errors)
if g:go_jump_to_error
cc 1 "jump to first error if there is any
endif
endif
call delete(l:tmpname)
endfunction
1 0.000003 function! go#cmd#Vet()
echon "vim-go: " | echohl Identifier | echon "calling vet..." | echohl None
let out = go#tool#ExecuteInDir('go vet')
if v:shell_error
call go#tool#ShowErrors(out)
else
call setqflist([])
endif
cwindow
let errors = getqflist()
if !empty(errors)
if g:go_jump_to_error
cc 1 "jump to first error if there is any
endif
else
redraw | echon "vim-go: " | echohl Function | echon "[vet] PASS" | echohl None
endif
endfunction
" vim:ts=4:sw=4:et
"
FUNCTION <SNR>133_get_hunks_gitgutter()
Called 8 times
Total time: 0.003142
Self time: 0.000200
count total (s) self (s)
8 0.002932 0.000103 if !get(g:, 'gitgutter_enabled', 0) || s:is_branch_empty()
return ''
endif
8 0.000173 0.000059 return GitGutterGetHunkSummary()
FUNCTION <SNR>68_repo_head()
Called 4 times
Total time: 0.001433
Self time: 0.000398
count total (s) self (s)
4 0.000986 0.000090 let head = s:repo().head_ref()
4 0.000098 if head =~# '^ref: '
4 0.000248 0.000110 let branch = s:sub(head,'^ref: %(refs/%(heads/|remotes/|tags/)=)=','')
4 0.000013 elseif head =~# '^\x\{40\}$'
" truncate hash to a:1 characters if we're in detached head mode
let len = a:0 ? a:1 : 0
let branch = len ? head[0:len-1] : ''
else
return ''
endif
4 0.000010 return branch
FUNCTION go#tool#ExecuteInDir()
Called 1 time
Total time: 0.093484
Self time: 0.093484
count total (s) self (s)
1 0.000005 let cd = exists('*haslocaldir') && haslocaldir() ? 'lcd ' : 'cd '
1 0.000017 let dir = getcwd()
1 0.000002 try
1 0.000139 execute cd . fnameescape(expand("%:p:h"))
1 0.093217 let out = system(a:cmd)
1 0.000006 finally
1 0.000087 execute cd . fnameescape(dir)
1 0.000002 endtry
1 0.000004 return out
FUNCTION airline#check_mode()
Called 8 times
Total time: 0.001208
Self time: 0.001208
count total (s) self (s)
8 0.000067 let context = s:contexts[a:winnr]
8 0.000050 if get(w:, 'airline_active', 1)
8 0.000048 let l:m = mode()
8 0.000032 if l:m ==# "i"
let l:mode = ['insert']
elseif l:m ==# "R"
let l:mode = ['replace']
elseif l:m =~# '\v(v|V||s|S|)'
let l:mode = ['visual']
else
8 0.000039 let l:mode = ['normal']
8 0.000013 endif
8 0.000082 let w:airline_current_mode = get(g:airline_mode_map, l:m, l:m)
8 0.000012 else
let l:mode = ['inactive']
let w:airline_current_mode = get(g:airline_mode_map, '__')
endif
8 0.000048 if g:airline_detect_modified && &modified
call add(l:mode, 'modified')
endif
8 0.000026 if g:airline_detect_paste && &paste
call add(l:mode, 'paste')
endif
8 0.000024 if &readonly || ! &modifiable
call add(l:mode, 'readonly')
endif
8 0.000075 let mode_string = join(l:mode)
8 0.000062 if get(w:, 'airline_lastmode', '') != mode_string
call airline#highlighter#highlight_modified_inactive(context.bufnr)
call airline#highlighter#highlight(l:mode)
let w:airline_lastmode = mode_string
endif
8 0.000016 return ''
FUNCTION airline#util#append()
Called 24 times
Total time: 0.000586
Self time: 0.000586
count total (s) self (s)
24 0.000127 if a:minwidth > 0 && winwidth(0) < a:minwidth
return ''
endif
24 0.000185 let prefix = s:spc == "\ua0" ? s:spc : s:spc.s:spc
24 0.000154 return empty(a:text) ? '' : prefix.g:airline_left_alt_sep.s:spc.a:text
FUNCTION <SNR>135_format_name()
Called 4 times
Total time: 0.000020
Self time: 0.000020
count total (s) self (s)
4 0.000014 return a:name
FUNCTION go#tool#Files()
Called 1 time
Total time: 0.093585
Self time: 0.000052
count total (s) self (s)
1 0.000057 0.000008 if IsWin()
let command = 'go list -f "{{range $f := .GoFiles}}{{$.Dir}}\{{$f}}{{printf \"\n\"}}{{end}}{{range $f := .CgoFiles}}{{$.Dir}}\{{$f}}{{printf \"\n\"}}{{end}}"'
else
1 0.000004 let command = "go list -f '{{range $f := .GoFiles}}{{$.Dir}}/{{$f}}{{printf \"\\n\"}}{{end}}{{range $f := .CgoFiles}}{{$.Dir}}/{{$f}}{{printf \"\\n\"}}{{end}}'"
1 0.000001 endif
1 0.093499 0.000016 let out = go#tool#ExecuteInDir(command)
1 0.000018 return split(out, '\n')
FUNCTION airline#parts#iminsert()
Called 8 times
Total time: 0.000113
Self time: 0.000113
count total (s) self (s)
8 0.000043 if g:airline_detect_iminsert && &iminsert && exists('b:keymap_name')
return toupper(b:keymap_name)
endif
8 0.000013 return ''
FUNCTION gitgutter#process_buffer()
Called 3 times
Total time: 0.001431
Self time: 0.000515
count total (s) self (s)
3 0.000233 0.000071 call gitgutter#utility#set_buffer(a:bufnr)
3 0.000750 0.000044 if gitgutter#utility#is_active()
3 0.000020 if g:gitgutter_sign_column_always
call gitgutter#sign#add_dummy_sign()
endif
3 0.000008 try
3 0.000099 0.000052 if !a:realtime || gitgutter#utility#has_fresh_changes()
let diff = gitgutter#diff#run_diff(a:realtime || gitgutter#utility#has_unsaved_changes(), 1)
call gitgutter#hunk#set_hunks(gitgutter#diff#parse_diff(diff))
let modified_lines = gitgutter#diff#process_hunks(gitgutter#hunk#hunks())
if len(modified_lines) > g:gitgutter_max_signs
call gitgutter#utility#warn('exceeded maximum number of signs (configured by g:gitgutter_max_signs).')
call gitgutter#sign#clear_signs()
return
endif
if g:gitgutter_signs || g:gitgutter_highlight_lines
call gitgutter#sign#update_signs(modified_lines)
endif
call gitgutter#utility#save_last_seen_change()
endif
3 0.000012 catch /diff failed/
call gitgutter#hunk#reset()
endtry
3 0.000006 else
call gitgutter#hunk#reset()
endif
FUNCTION <SNR>68_repo_head_ref()
Called 4 times
Total time: 0.000634
Self time: 0.000506
count total (s) self (s)
4 0.000281 0.000212 if !filereadable(self.dir('HEAD'))
return ''
endif
4 0.000322 0.000263 return readfile(self.dir('HEAD'))[0]
FUNCTION airline#extensions#tabline#buflist#list()
Called 2 times
Total time: 0.000013
Self time: 0.000013
count total (s) self (s)
2 0.000008 if exists('s:current_buffer_list')
2 0.000003 return s:current_buffer_list
endif
let buffers = []
let cur = bufnr('%')
for nr in range(1, bufnr('$'))
if buflisted(nr) && bufexists(nr)
let toadd = 1
for ex in s:excludes
if match(bufname(nr), ex) >= 0
let toadd = 0
break
endif
endfor
if getbufvar(nr, 'current_syntax') == 'qf'
let toadd = 0
endif
if toadd
call add(buffers, nr)
endif
endif
endfor
let s:current_buffer_list = buffers
return buffers
FUNCTION <SNR>137_check_mixed_indent()
Called 3 times
Total time: 0.000948
Self time: 0.000948
count total (s) self (s)
3 0.000010 if s:indent_algo == 1
" [<tab>]<space><tab>
" spaces before or between tabs are not allowed
let t_s_t = '(^\t* +\t\s*\S)'
" <tab>(<space> x count)
" count of spaces at the end of tabs should be less then tabstop value
let t_l_s = '(^\t+ {' . &ts . ',}' . '\S)'
return search('\v' . t_s_t . '|' . t_l_s, 'nw')
else
3 0.000888 return search('\v(^\t+ +)|(^ +\t+)', 'nw')
endif
FUNCTION airline#extensions#tabline#formatters#webdevicons#format()
Called 2 times
Total time: 0.000417
Self time: 0.000053
count total (s) self (s)
" Call original formatter.
2 0.000280 0.000031 let originalFormatter = airline#extensions#tabline#formatters#{g:_webdevicons_airline_orig_formatter}#format(a:bufnr, a:buffers)
2 0.000134 0.000020 return originalFormatter . ' ' . WebDevIconsGetFileTypeSymbol(bufname(a:bufnr)) . ' '
FUNCTION gitgutter#utility#exists_file()
Called 3 times
Total time: 0.000207
Self time: 0.000207
count total (s) self (s)
3 0.000202 return filereadable(s:file)
FUNCTION 39()
Called 8 times
Total time: 0.000145
Self time: 0.000145
count total (s) self (s)
8 0.000066 if !exists('b:syntastic_loclist') || empty(b:syntastic_loclist)
let b:syntastic_loclist = g:SyntasticLoclist.New([])
endif
8 0.000020 return b:syntastic_loclist
FUNCTION 48()
Called 8 times
Total time: 0.000815
Self time: 0.000815
count total (s) self (s)
8 0.000046 if !exists('self._stl_format')
let self._stl_format = ''
endif
8 0.000034 if !exists('self._stl_flag')
let self._stl_flag = ''
endif
8 0.000031 if g:syntastic_stl_format !=# self._stl_format
let self._stl_format = g:syntastic_stl_format
if !empty(self._rawLoclist)
let errors = self.errors()
let warnings = self.warnings()
let num_errors = len(errors)
let num_warnings = len(warnings)
let num_issues = len(self._rawLoclist)
let output = self._stl_format
"hide stuff wrapped in %E(...) unless there are errors
let output = substitute(output, '\m\C%E{\([^}]*\)}', num_errors ? '\1' : '' , 'g')
"hide stuff wrapped in %W(...) unless there are warnings
let output = substitute(output, '\m\C%W{\([^}]*\)}', num_warnings ? '\1' : '' , 'g')
"hide stuff wrapped in %B(...) unless there are both errors and warnings
let output = substitute(output, '\m\C%B{\([^}]*\)}', (num_warnings && num_errors) ? '\1' : '' , 'g')
"sub in the total errors/warnings/both
let output = substitute(output, '\m\C%w', num_warnings, 'g')
let output = substitute(output, '\m\C%e', num_errors, 'g')
let output = substitute(output, '\m\C%t', num_issues, 'g')
"first error/warning line num
let output = substitute(output, '\m\C%F', num_issues ? self._rawLoclist[0]['lnum'] : '', 'g')
"first error line num
let output = substitute(output, '\m\C%fe', num_errors ? errors[0]['lnum'] : '', 'g')
"first warning line num
let output = substitute(output, '\m\C%fw', num_warnings ? warnings[0]['lnum'] : '', 'g')
let self._stl_flag = output
else
let self._stl_flag = ''
endif
endif
8 0.000016 return self._stl_flag
FUNCTION airline#extensions#tabline#get_buffer_name()
Called 2 times
Total time: 0.000464
Self time: 0.000034
count total (s) self (s)
2 0.000462 0.000033 return airline#extensions#tabline#formatters#{s:formatter}#format(a:nr, airline#extensions#tabline#buflist#list())
FUNCTION WebDevIconsGetFileTypeSymbol()
Called 10 times
Total time: 0.000856
Self time: 0.000856
count total (s) self (s)
10 0.000026 if a:0 == 0
8 0.000061 let fileNodeExtension = expand("%:e")
8 0.000041 let fileNode = expand("%:t")
8 0.000024 let isDirectory = 0
8 0.000011 else
2 0.000009 let fileNodeExtension = fnamemodify(a:1, ':e')
2 0.000007 let fileNode = fnamemodify(a:1, ':t')
2 0.000002 if a:0 == 2
let isDirectory = a:2
else
2 0.000003 let isDirectory = 0
2 0.000001 endif
2 0.000001 endif
10 0.000059 let fileNodeExtension = tolower(fileNodeExtension)
10 0.000056 let fileNode = tolower(fileNode)
10 0.000054 if has_key(g:WebDevIconsUnicodeDecorateFileNodesExactSymbols, fileNode)
let symbol = g:WebDevIconsUnicodeDecorateFileNodesExactSymbols[fileNode]
elseif has_key(g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols, fileNodeExtension)
10 0.000051 let symbol = g:WebDevIconsUnicodeDecorateFileNodesExtensionSymbols[fileNodeExtension]
10 0.000011 else
if isDirectory == 1
let symbol = g:WebDevIconsUnicodeDecorateFolderNodesDefaultSymbol
else
let symbol = g:WebDevIconsUnicodeDecorateFileNodesDefaultSymbol
endif
endif
10 0.000017 return symbol
FUNCTION <SNR>170_UpdateDiagnosticNotifications()
Called 3 times
Total time: 0.000154
Self time: 0.000113
count total (s) self (s)
3 0.000121 0.000080 let should_display_diagnostics = g:ycm_show_diagnostics_ui && s:DiagnosticUiSupportedForCurrentFiletype() && pyeval( 'ycm_state.NativeFiletypeCompletionUsable()' )
3 0.000013 if !should_display_diagnostics
3 0.000007 return
endif
py ycm_state.UpdateDiagnosticInterface()
FUNCTION <SNR>170_SetUpYcmChangedTick()
Called 3 times
Total time: 0.000066
Self time: 0.000066
count total (s) self (s)
3 0.000061 let b:ycm_changedtick = get( b:, 'ycm_changedtick', { 'file_ready_to_parse' : -1, } )
FUNCTION gitgutter#utility#set_buffer()
Called 3 times
Total time: 0.000162
Self time: 0.000162
count total (s) self (s)
3 0.000058 let s:bufnr = a:bufnr
3 0.000093 let s:file = resolve(bufname(a:bufnr))
FUNCTION airline#util#wrap()
Called 56 times
Total time: 0.000601
Self time: 0.000601
count total (s) self (s)
56 0.000257 if a:minwidth > 0 && winwidth(0) < a:minwidth
return ''
endif
56 0.000109 return a:text
FUNCTION <SNR>68_sub()
Called 4 times
Total time: 0.000137
Self time: 0.000137
count total (s) self (s)
4 0.000131 return substitute(a:str,'\v\C'.a:pat,a:rep,'')
FUNCTION airline#extensions#tabline#get()
Called 2 times
Total time: 0.000106
Self time: 0.000064
count total (s) self (s)
2 0.000010 let curtabcnt = tabpagenr('$')
2 0.000005 if curtabcnt != s:current_tabcnt
let s:current_tabcnt = curtabcnt
call airline#extensions#tabline#tabs#invalidate()
call airline#extensions#tabline#buffers#invalidate()
endif
2 0.000005 if s:show_buffers && curtabcnt == 1 || !s:show_tabs
return airline#extensions#tabline#buffers#get()
else
2 0.000063 0.000021 return airline#extensions#tabline#tabs#get()
endif
FUNCTION PencilMode()
Called 8 times
Total time: 0.000227
Self time: 0.000227
count total (s) self (s)
8 0.000044 if exists('b:pencil_wrap_mode')
if b:pencil_wrap_mode ==# s:WRAP_MODE_SOFT
return get(g:pencil#mode_indicators, 'soft', 'S')
elsei b:pencil_wrap_mode ==# s:WRAP_MODE_HARD
return get(g:pencil#mode_indicators, 'hard', 'H')
el
return get(g:pencil#mode_indicators, 'off', '')
en
else
8 0.000012 return '' " should be blank for non-prose modes
en
FUNCTION airline#extensions#tabline#title()
Called 2 times
Total time: 0.000515
Self time: 0.000051
count total (s) self (s)
2 0.000005 let title = ''
2 0.000003 if s:taboo
let title = TabooTabTitle(a:n)
endif
2 0.000004 if empty(title)
2 0.000006 let buflist = tabpagebuflist(a:n)
2 0.000005 let winnr = tabpagewinnr(a:n)
2 0.000482 0.000019 return airline#extensions#tabline#get_buffer_name(buflist[winnr - 1])
endif
return title
FUNCTION airline#extensions#tabline#formatters#default#wrap_name()
Called 2 times
Total time: 0.000043
Self time: 0.000043
count total (s) self (s)
2 0.000008 let _ = s:buf_nr_show ? printf(s:buf_nr_format, a:bufnr) : ''
2 0.000016 let _ .= substitute(a:buffer_name, '\\', '/', 'g')
2 0.000008 if getbufvar(a:bufnr, '&modified') == 1
let _ .= s:buf_modified_symbol
endif
2 0.000002 return _
FUNCTION go#cmd#Build()
Called 1 time
Total time: 1.055178
Self time: 0.016310
count total (s) self (s)
1 0.000005 let default_makeprg = &makeprg
1 0.093610 0.000025 let gofiles = join(go#tool#Files(), '" "')
1 0.000004 if v:shell_error
let &makeprg = "go build . errors"
else
1 0.008295 let &makeprg = "go build -o /dev/null " . join(a:000, ' ') . ' "' . gofiles . '"'
1 0.000005 endif
1 0.000046 echon "vim-go: " | echohl Identifier | echon "building ..."| echohl None
1 0.945487 0.000205 silent! exe 'make!'
1 0.005150 redraw!
1 0.000012 if !a:bang
1 0.000002 cwindow
1 0.000009 let errors = getqflist()
1 0.000003 if !empty(errors)
if g:go_jump_to_error
cc 1 "jump to first error if there is any
endif
else
1 0.002518 redraws! | echon "vim-go: " | echohl Function | echon "[build] SUCCESS"| echohl None
1 0.000001 endif
1 0.000001 endif
1 0.000010 let &makeprg = default_makeprg
FUNCTION <SNR>133_get_hunks()
Called 8 times
Total time: 0.003495
Self time: 0.000353
count total (s) self (s)
8 0.000045 if empty(s:source_func)
if get(g:, 'loaded_signify', 0)
let s:source_func = 's:get_hunks_signify'
elseif exists('*GitGutterGetHunkSummary')
let s:source_func = 's:get_hunks_gitgutter'
elseif exists('*changes#GetStats')
let s:source_func = 's:get_hunks_changes'
else
let s:source_func = 's:get_hunks_empty'
endif
endif
8 0.003249 0.000107 return {s:source_func}()
FUNCTION <SNR>170_DiagnosticUiSupportedForCurrentFiletype()
Called 3 times
Total time: 0.000041
Self time: 0.000041
count total (s) self (s)
3 0.000036 return get( s:diagnostic_ui_filetypes, &filetype, 0 )
FUNCTION <SNR>170_AllowedToCompleteInCurrentFile()
Called 3 times
Total time: 0.000247
Self time: 0.000247
count total (s) self (s)
3 0.000081 if empty( &filetype ) || getbufvar( winbufnr( winnr() ), "&buftype" ) ==# 'nofile' || &filetype ==# 'qf'
return 0
endif
3 0.000021 if exists( 'b:ycm_largefile' )
return 0
endif
3 0.000045 let whitelist_allows = has_key( g:ycm_filetype_whitelist, '*' ) || has_key( g:ycm_filetype_whitelist, &filetype )
3 0.000031 let blacklist_allows = !has_key( g:ycm_filetype_blacklist, &filetype )
3 0.000016 return whitelist_allows && blacklist_allows
FUNCTION airline#parts#ffenc()
Called 8 times
Total time: 0.000161
Self time: 0.000161
count total (s) self (s)
8 0.000152 return printf('%s%s', &fenc, strlen(&ff) > 0 ? '['.&ff.']' : '')
FUNCTION <SNR>68_repo_dir()
Called 8 times
Total time: 0.000128
Self time: 0.000128
count total (s) self (s)
8 0.000117 return join([self.git_dir]+a:000,'/')
FUNCTION gitgutter#utility#has_fresh_changes()
Called 3 times
Total time: 0.000047
Self time: 0.000047
count total (s) self (s)
3 0.000042 return getbufvar(s:bufnr, 'changedtick') != getbufvar(s:bufnr, 'gitgutter_last_tick')
FUNCTION airline#extensions#tabline#tabs#get()
Called 2 times
Total time: 0.000042
Self time: 0.000042
count total (s) self (s)
2 0.000011 let curbuf = bufnr('%')
2 0.000005 let curtab = tabpagenr()
2 0.000005 if curbuf == s:current_bufnr && curtab == s:current_tabnr
2 0.000012 if !g:airline_detect_modified || getbufvar(curbuf, '&modified') == s:current_modified
2 0.000004 return s:current_tabline
endif
endif
let b = airline#extensions#tabline#new_builder()
for i in range(1, tabpagenr('$'))
if i == curtab
let group = 'airline_tabsel'
if g:airline_detect_modified
for bi in tabpagebuflist(i)
if getbufvar(bi, '&modified')
let group = 'airline_tabmod'
endif
endfor
endif
let s:current_modified = (group == 'airline_tabmod') ? 1 : 0
else
let group = 'airline_tab'
endif
let val = '%('
if s:show_tab_nr
if s:tab_nr_type == 0
let val .= (g:airline_symbols.space).'%{len(tabpagebuflist('.i.'))}'
elseif s:tab_nr_type == 1
let val .= (g:airline_symbols.space).i
else "== 2
let val .= (g:airline_symbols.space).i.'.%{len(tabpagebuflist('.i.'))}'
endif
endif
call b.add_section(group, val.'%'.i.'T %{airline#extensions#tabline#title('.i.')} %)')
endfor
call b.add_raw('%T')
call b.add_section('airline_tabfill', '')
call b.split()
if s:show_close_button
call b.add_section('airline_tab', ' %999X'.s:close_symbol.' ')
endif
if s:show_tab_type
call b.add_section('airline_tabtype', ' tabs ')
endif
let s:current_bufnr = curbuf
let s:current_tabnr = curtab
let s:current_tabline = b.build()
return s:current_tabline
FUNCTION airline#parts#paste()
Called 8 times
Total time: 0.000062
Self time: 0.000062
count total (s) self (s)
8 0.000052 return g:airline_detect_paste && &paste ? g:airline_symbols.paste : ''
FUNCTION airline#parts#readonly()
Called 8 times
Total time: 0.000046
Self time: 0.000046
count total (s) self (s)
8 0.000038 return &readonly ? g:airline_symbols.readonly : ''
FUNCTION airline#extensions#hunks#get_hunks()
Called 8 times
Total time: 0.004498
Self time: 0.001003
count total (s) self (s)
8 0.000048 if !get(w:, 'airline_active', 0)
return ''
endif
8 0.003589 0.000094 let hunks = s:get_hunks()
8 0.000025 let string = ''
8 0.000028 if !empty(hunks)
32 0.000097 for i in [0, 1, 2]
24 0.000090 if s:non_zero_only == 0 || hunks[i] > 0
24 0.000336 let string .= printf('%s%s ', s:hunk_symbols[i], hunks[i])
24 0.000043 endif
24 0.000031 endfor
8 0.000011 endif
8 0.000019 return string
FUNCTION airline#extensions#syntastic#get_warnings()
Called 8 times
Total time: 0.001271
Self time: 0.000172
count total (s) self (s)
8 0.001179 0.000081 let errors = SyntasticStatuslineFlag()
8 0.000035 if strlen(errors) > 0
return errors.(g:airline_symbols.space)
endif
8 0.000011 return ''
FUNCTION <SNR>170_OnFileReadyToParse()
Called 3 times
Total time: 0.000436
Self time: 0.000216
count total (s) self (s)
" We need to call this just in case there is no b:ycm_changetick; this can
" happen for special buffers.
3 0.000110 0.000044 call s:SetUpYcmChangedTick()
" Order is important here; we need to extract any done diagnostics before
" reparsing the file again. If we sent the new parse request first, then
" the response would always be pending when we called
" UpdateDiagnosticNotifications.
3 0.000210 0.000055 call s:UpdateDiagnosticNotifications()
3 0.000030 let buffer_changed = b:changedtick != b:ycm_changedtick.file_ready_to_parse
3 0.000010 if buffer_changed
py ycm_state.OnFileReadyToParse()
endif
3 0.000022 let b:ycm_changedtick.file_ready_to_parse = b:changedtick
FUNCTION <SNR>133_is_branch_empty()
Called 8 times
Total time: 0.002829
Self time: 0.000152
count total (s) self (s)
8 0.002819 0.000142 return exists('*airline#extensions#branch#head') && empty(airline#extensions#branch#head())
FUNCTION airline#extensions#whitespace#check()
Called 8 times
Total time: 0.002065
Self time: 0.001116
count total (s) self (s)
8 0.000063 if &readonly || !&modifiable || !s:enabled || line('$') > s:max_lines
return ''
endif
8 0.000039 if !exists('b:airline_whitespace_check')
3 0.000015 let b:airline_whitespace_check = ''
3 0.000025 let checks = get(g:, 'airline#extensions#whitespace#checks', s:default_checks)
3 0.000009 let trailing = 0
3 0.000017 if index(checks, 'trailing') > -1
3 0.000492 let trailing = search('\s$', 'nw')
3 0.000006 endif
3 0.000009 let mixed = 0
3 0.000015 if index(checks, 'indent') > -1
3 0.000992 0.000044 let mixed = s:check_mixed_indent()
3 0.000007 endif
3 0.000011 if trailing != 0 || mixed != 0
let b:airline_whitespace_check = s:symbol
if s:show_message
if trailing != 0
let b:airline_whitespace_check .= (g:airline_symbols.space).printf(s:trailing_format, trailing)
endif
if mixed != 0
let b:airline_whitespace_check .= (g:airline_symbols.space).printf(s:mixed_indent_format, mixed)
endif
endif
endif
3 0.000003 endif
8 0.000021 return b:airline_whitespace_check
FUNCTION airline#extensions#tabline#formatters#default#format()
Called 2 times
Total time: 0.000249
Self time: 0.000207
count total (s) self (s)
2 0.000005 let _ = ''
2 0.000006 let name = bufname(a:bufnr)
2 0.000004 if empty(name)
let _ .= '[No Name]'
else
2 0.000003 if s:fnamecollapse
2 0.000125 let _ .= substitute(fnamemodify(name, s:fmod), '\v\w\zs.{-}\ze(\\|/)', '', 'g')
2 0.000003 else
let _ .= fnamemodify(name, s:fmod)
endif
2 0.000008 if a:bufnr != bufnr('%') && s:fnametruncate && strlen(_) > s:fnametruncate
let _ = strpart(_, 0, s:fnametruncate)
endif
2 0.000001 endif
2 0.000070 0.000028 return airline#extensions#tabline#formatters#default#wrap_name(a:bufnr, _)
FUNCTION <SNR>170_SetUpCompleteopt()
Called 3 times
Total time: 0.000181
Self time: 0.000181
count total (s) self (s)
" Some plugins (I'm looking at you, vim-notes) change completeopt by for
" instance adding 'longest'. This breaks YCM. So we force our settings.
" There's no two ways about this: if you want to use YCM then you have to
" have these completeopt settings, otherwise YCM won't work at all.
" We need menuone in completeopt, otherwise when there's only one candidate
" for completion, the menu doesn't show up.
3 0.000055 set completeopt-=menu
3 0.000022 set completeopt+=menuone
" This is unnecessary with our features. People use this option to insert
" the common prefix of all the matches and then add more differentiating chars
" so that they can select a more specific match. With our features, they
" don't need to insert the prefix; they just type the differentiating chars.
" Also, having this option set breaks the plugin.
3 0.000017 set completeopt-=longest
3 0.000014 if g:ycm_add_preview_to_completeopt
set completeopt+=preview
endif
FUNCTION gitgutter#utility#not_git_dir()
Called 3 times
Total time: 0.000400
Self time: 0.000181
count total (s) self (s)
3 0.000395 0.000175 return gitgutter#utility#full_path_to_directory_of_file() !~ '[/\\]\.git\($\|[/\\]\)'
FUNCTION gitgutter#utility#full_path_to_directory_of_file()
Called 3 times
Total time: 0.000220
Self time: 0.000220
count total (s) self (s)
3 0.000214 return fnamemodify(s:file, ':p:h')
FUNCTION gitgutter#hunk#summary()
Called 8 times
Total time: 0.000037
Self time: 0.000037
count total (s) self (s)
8 0.000026 return s:summary
FUNCTION airline#extensions#branch#head()
Called 16 times
Total time: 0.002774
Self time: 0.000845
count total (s) self (s)
16 0.000131 if exists('b:airline_head') && !empty(b:airline_head)
12 0.000032 return b:airline_head
endif
4 0.000019 let b:airline_head = ''
4 0.000017 let found_fugitive_head = 0
4 0.000029 if s:has_fugitive && !exists('b:mercurial_dir')
4 0.001988 0.000079 let b:airline_head = fugitive#head(7)
4 0.000016 let found_fugitive_head = 1
4 0.000025 if empty(b:airline_head) && !exists('b:git_dir')
let b:airline_head = s:get_git_branch(expand("%:p:h"))
endif
4 0.000005 endif
4 0.000016 if empty(b:airline_head)
if s:has_lawrencium
let b:airline_head = lawrencium#statusline()
endif
endif
4 0.000014 if empty(b:airline_head)
if s:has_vcscommand
call VCSCommandEnableBufferSetup()
if exists('b:VCSCommandBufferInfo')
let b:airline_head = get(b:VCSCommandBufferInfo, 0, '')
endif
endif
endif
4 0.000033 if empty(b:airline_head) || !found_fugitive_head && !s:check_in_path()
let b:airline_head = ''
endif
4 0.000087 0.000067 let b:airline_head = s:format_name(b:airline_head)
4 0.000031 if exists("g:airline#extensions#branch#displayed_head_limit")
let w:displayed_head_limit = g:airline#extensions#branch#displayed_head_limit
if len(b:airline_head) > w:displayed_head_limit - 1
let b:airline_head = b:airline_head[0:w:displayed_head_limit - 1].'…'
endif
endif
4 0.000010 return b:airline_head
FUNCTION GitGutterGetHunkSummary()
Called 8 times
Total time: 0.000113
Self time: 0.000076
count total (s) self (s)
8 0.000106 0.000069 return gitgutter#hunk#summary()
FUNCTION airline#parts#mode()
Called 8 times
Total time: 0.000067
Self time: 0.000067
count total (s) self (s)
8 0.000057 return get(w:, 'airline_current_mode', '')
FUNCTION <SNR>68_repo()
Called 8 times
Total time: 0.000578
Self time: 0.000578
count total (s) self (s)
8 0.000134 let dir = a:0 ? a:1 : (exists('b:git_dir') && b:git_dir !=# '' ? b:git_dir : fugitive#extract_git_dir(expand('%:p')))
8 0.000031 if dir !=# ''
8 0.000051 if has_key(s:repos, dir)
8 0.000056 let repo = get(s:repos, dir)
8 0.000014 else
let repo = {'git_dir': dir}
let s:repos[dir] = repo
endif
8 0.000192 return extend(extend(repo, s:repo_prototype, 'keep'), s:abstract_prototype, 'keep')
endif
call s:throw('not a git repository: '.expand('%:p'))
FUNCTION airline#statusline()
Called 8 times
Total time: 0.000233
Self time: 0.000233
count total (s) self (s)
8 0.000091 if has_key(s:contexts, a:winnr)
8 0.000119 return '%{airline#check_mode('.a:winnr.')}'.s:contexts[a:winnr].line
endif
" in rare circumstances this happens...see #276
return ''
FUNCTION fugitive#reload_status()
Called 1 time
Total time: 0.000170
Self time: 0.000170
count total (s) self (s)
1 0.000011 if exists('s:reloading_status')
return
endif
1 0.000001 try
1 0.000006 let s:reloading_status = 1
1 0.000003 let mytab = tabpagenr()
3 0.000014 for tab in [mytab] + range(1,tabpagenr('$'))
4 0.000011 for winnr in range(1,tabpagewinnr(tab,'$'))
2 0.000014 if getbufvar(tabpagebuflist(tab)[winnr-1],'fugitive_type') ==# 'index'
execute 'tabnext '.tab
if winnr != winnr()
execute winnr.'wincmd w'
let restorewinnr = 1
endif
try
if !&modified
call s:BufReadIndex()
endif
finally
if exists('restorewinnr')
wincmd p
endif
execute 'tabnext '.mytab
endtry
endif
2 0.000003 endfor
2 0.000002 endfor
1 0.000001 finally
1 0.000002 unlet! s:reloading_status
1 0.000001 endtry
FUNCTION gitgutter#utility#is_active()
Called 3 times
Total time: 0.000706
Self time: 0.000098
count total (s) self (s)
3 0.000701 0.000093 return g:gitgutter_enabled && gitgutter#utility#exists_file() && gitgutter#utility#not_git_dir()
FUNCTION airline#extensions#branch#get_head()
Called 8 times
Total time: 0.000445
Self time: 0.000348
count total (s) self (s)
8 0.000167 0.000070 let head = airline#extensions#branch#head()
8 0.000088 let empty_message = get(g:, 'airline#extensions#branch#empty_message', get(g:, 'airline_branch_empty_message', ''))
8 0.000064 let symbol = get(g:, 'airline#extensions#branch#symbol', g:airline_symbols.branch)
8 0.000106 return empty(head) ? empty_message : printf('%s%s', empty(symbol) ? '' : symbol.(g:airline_symbols.space), head)
FUNCTION fugitive#head()
Called 4 times
Total time: 0.001909
Self time: 0.000162
count total (s) self (s)
4 0.000031 if !exists('b:git_dir')
return ''
endif
4 0.001853 0.000105 return s:repo().head(a:0 ? a:1 : 0)
FUNCTION IsWin()
Called 1 time
Total time: 0.000050
Self time: 0.000050
count total (s) self (s)
1 0.000004 let win = ['win16', 'win32', 'win32unix', 'win64', 'win95']
6 0.000008 for w in win
5 0.000017 if (has(w))
return 1
endif
5 0.000003 endfor
1 0.000001 return 0
FUNCTION <SNR>170_OnCursorHold()
Called 3 times
Total time: 0.001057
Self time: 0.000194
count total (s) self (s)
3 0.000309 0.000062 if !s:AllowedToCompleteInCurrentFile()
return
endif
3 0.000236 0.000055 call s:SetUpCompleteopt()
3 0.000487 0.000052 call s:OnFileReadyToParse()
FUNCTION SyntasticStatuslineFlag()
Called 8 times
Total time: 0.001099
Self time: 0.000139
count total (s) self (s)
8 0.001088 0.000128 return g:SyntasticLoclist.current().getStatuslineFlag()
FUNCTIONS SORTED ON TOTAL TIME
count total (s) self (s) function
1 1.055178 0.016310 go#cmd#Build()
1 0.093585 0.000052 go#tool#Files()
1 0.093484 go#tool#ExecuteInDir()
8 0.004498 0.001003 airline#extensions#hunks#get_hunks()
8 0.003495 0.000353 <SNR>133_get_hunks()
8 0.003142 0.000200 <SNR>133_get_hunks_gitgutter()
8 0.002829 0.000152 <SNR>133_is_branch_empty()
16 0.002774 0.000845 airline#extensions#branch#head()
8 0.002065 0.001116 airline#extensions#whitespace#check()
4 0.001909 0.000162 fugitive#head()
4 0.001433 0.000398 <SNR>68_repo_head()
3 0.001431 0.000515 gitgutter#process_buffer()
8 0.001271 0.000172 airline#extensions#syntastic#get_warnings()
8 0.001208 airline#check_mode()
8 0.001099 0.000139 SyntasticStatuslineFlag()
3 0.001057 0.000194 <SNR>170_OnCursorHold()
3 0.000948 <SNR>137_check_mixed_indent()
10 0.000856 WebDevIconsGetFileTypeSymbol()
8 0.000815 48()
3 0.000706 0.000098 gitgutter#utility#is_active()
FUNCTIONS SORTED ON SELF TIME
count total (s) self (s) function
1 0.093484 go#tool#ExecuteInDir()
1 1.055178 0.016310 go#cmd#Build()
8 0.001208 airline#check_mode()
8 0.002065 0.001116 airline#extensions#whitespace#check()
8 0.004498 0.001003 airline#extensions#hunks#get_hunks()
3 0.000948 <SNR>137_check_mixed_indent()
10 0.000856 WebDevIconsGetFileTypeSymbol()
16 0.002774 0.000845 airline#extensions#branch#head()
8 0.000815 48()
56 0.000601 airline#util#wrap()
24 0.000586 airline#util#append()
8 0.000578 <SNR>68_repo()
3 0.001431 0.000515 gitgutter#process_buffer()
4 0.000634 0.000506 <SNR>68_repo_head_ref()
4 0.001433 0.000398 <SNR>68_repo_head()
8 0.003495 0.000353 <SNR>133_get_hunks()
8 0.000445 0.000348 airline#extensions#branch#get_head()
3 0.000247 <SNR>170_AllowedToCompleteInCurrentFile()
8 0.000233 airline#statusline()
8 0.000227 PencilMode()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment