Skip to content

Instantly share code, notes, and snippets.

Created September 19, 2013 06:55
Show Gist options
  • Save anonymous/6619893 to your computer and use it in GitHub Desktop.
Save anonymous/6619893 to your computer and use it in GitHub Desktop.
FUNCTION <SNR>126_sub()
Called 9 times
Total time: 0.000159
Self time: 0.000159
count total (s) self (s)
9 0.000150 return substitute(a:str,'\v\C'.a:pat,a:rep,'')
FUNCTION airline#check_mode()
Called 10 times
Total time: 0.000711
Self time: 0.000711
count total (s) self (s)
10 0.000064 if get(w:, 'airline_active', 1)
9 0.000031 let l:m = mode()
9 0.000019 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
9 0.000023 let l:mode = ['normal']
9 0.000009 endif
9 0.000050 let w:airline_current_mode = get(g:airline_mode_map, l:m, l:m)
9 0.000007 else
1 0.000002 let l:mode = ['inactive']
1 0.000011 let w:airline_current_mode = get(g:airline_mode_map, '__')
1 0.000001 endif
10 0.000033 if g:airline_detect_modified && &modified
1 0.000003 call add(l:mode, 'modified')
1 0.000000 endif
10 0.000014 if g:airline_detect_paste && &paste
call add(l:mode, 'paste')
endif
10 0.000040 let mode_string = join(l:mode)
10 0.000042 if get(w:, 'airline_lastmode', '') != mode_string
call airline#highlighter#highlight(l:mode)
let w:airline_lastmode = mode_string
endif
10 0.000010 return ''
FUNCTION neocomplete#handler#_on_write_post()
Called 1 time
Total time: 0.000059
Self time: 0.000044
count total (s) self (s)
1 0.000024 0.000009 let neocomplete = neocomplete#get_current_neocomplete()
" Restore foldinfo.
1 0.000020 for winnr in filter(range(1, winnr('$')), "!empty(getwinvar(v:val, 'neocomplete_foldinfo'))")
let neocomplete_foldinfo = getwinvar(winnr, 'neocomplete_foldinfo')
call setwinvar(winnr, '&foldmethod', neocomplete_foldinfo.foldmethod)
call setwinvar(winnr, '&foldexpr', neocomplete_foldinfo.foldexpr)
call setwinvar(winnr, 'neocomplete_foldinfo', {})
endfor
FUNCTION neocomplete#variables#get_sources()
Called 5 times
Total time: 0.000042
Self time: 0.000042
count total (s) self (s)
5 0.000017 if !exists('s:sources')
let s:sources = {}
endif
5 0.000005 return s:sources
FUNCTION <SNR>148_record()
Called 1 time
Total time: 0.000300
Self time: 0.000049
count total (s) self (s)
1 0.000003 if s:locked | retu | en
1 0.000003 let bufnr = a:bufnr + 0
1 0.000004 let bufname = bufname(bufnr)
1 0.000003 if bufnr > 0 && !empty(bufname)
1 0.000018 cal filter(s:mrbs, 'v:val != bufnr')
1 0.000003 cal insert(s:mrbs, bufnr)
1 0.000261 0.000010 cal s:addtomrufs(bufname)
1 0.000001 en
FUNCTION <SNR>249_IsValidFile()
Called 5 times
Total time: 0.000390
Self time: 0.000328
count total (s) self (s)
5 0.000063 0.000032 call s:LogDebugMessage('Checking if file is valid [' . a:fname . ']')
5 0.000012 if a:fname == '' || a:ftype == ''
call s:LogDebugMessage('Empty filename or type')
return 0
endif
5 0.000092 if !filereadable(a:fname) && getbufvar(a:fname, 'netrw_tmpfile') == ''
call s:LogDebugMessage('File not readable')
return 0
endif
5 0.000007 if &previewwindow
call s:LogDebugMessage('In preview window')
return 0
endif
5 0.000022 if !has_key(s:known_types, a:ftype)
5 0.000017 if exists('g:tagbar_type_' . a:ftype)
" Filetype definition must have been specified in an 'ftplugin'
" file, so load it now
call s:LoadUserTypeDefs(a:ftype)
else
5 0.000061 0.000030 call s:LogDebugMessage('Unsupported filetype: ' . a:ftype)
5 0.000005 return 0
endif
endif
return 1
FUNCTION airline#extensions#paste#get_mark()
Called 9 times
Total time: 0.000030
Self time: 0.000030
count total (s) self (s)
9 0.000026 return &paste ? ' ' . s:symbol : ''
FUNCTION <SNR>234_get_hunks()
Called 9 times
Total time: 0.000203
Self time: 0.000089
count total (s) self (s)
9 0.000157 0.000043 let hunks = sy#repo#get_stats()
9 0.000021 if hunks[0] >= 0
9 0.000011 return hunks
endif
return []
FUNCTION neocomplete#get_current_neocomplete()
Called 14 times
Total time: 0.000113
Self time: 0.000113
count total (s) self (s)
14 0.000046 if !exists('b:neocomplete')
call neocomplete#init#_current_neocomplete()
endif
14 0.000016 return b:neocomplete
FUNCTION <SNR>126_repo_head_ref()
Called 9 times
Total time: 0.000478
Self time: 0.000407
count total (s) self (s)
9 0.000471 0.000400 return readfile(self.dir('HEAD'))[0]
FUNCTION neocomplete#is_enabled_source()
Called 5 times
Total time: 0.000240
Self time: 0.000035
count total (s) self (s)
5 0.000238 0.000033 return neocomplete#helper#is_enabled_source(a:source_name)
FUNCTION <SNR>267_make_cache_current_block()
Called 1 time
Total time: 0.008173
Self time: 0.000022
count total (s) self (s)
" Make cache from current block.
1 0.008171 0.000020 return s:make_cache_current_buffer( max([1, line('.') - 500]), min([line('.') + 500, line('$')]))
FUNCTION airline#extensions#whitespace#check()
Called 9 times
Total time: 0.001502
Self time: 0.001502
count total (s) self (s)
9 0.000026 if &readonly || !s:enabled
return ''
endif
9 0.000041 if !exists('b:airline_whitespace_check')
5 0.000014 let b:airline_whitespace_check = ''
5 0.000010 let trailing = 0
5 0.000018 if index(s:checks, 'trailing') > -1
5 0.000737 let trailing = search(' $', 'nw')
5 0.000004 endif
5 0.000010 let mixed = 0
5 0.000013 if index(s:checks, 'indent') > -1
5 0.000318 let indents = [search('^ ', 'nb'), search('^ ', 'n'), search('^\t', 'nb'), search('^\t', 'n')]
5 0.000028 let mixed = indents[0] != 0 && indents[1] != 0 && indents[2] != 0 && indents[3] != 0
5 0.000005 endif
5 0.000008 if trailing != 0 || mixed
let b:airline_whitespace_check = s:symbol." "
if s:show_message
if trailing != 0
let b:airline_whitespace_check .= printf(s:trailing_format, trailing).' '
endif
if mixed
let mixnr = indents[0] == indents[1] ? indents[0] : indents[2]
let b:airline_whitespace_check .= printf(s:mixed_indent_format, mixnr).' '
endif
endif
endif
5 0.000001 endif
9 0.000013 return b:airline_whitespace_check
FUNCTION 212()
Called 1 time
Total time: 0.000044
Self time: 0.000034
count total (s) self (s)
1 0.000006 let b:syntastic_balloons = {}
1 0.000017 0.000007 if self.enabled() && a:loclist.hasErrorsOrWarningsToDisplay()
let buf = bufnr('')
let issues = filter(a:loclist.filteredRaw(), 'v:val["bufnr"] == buf')
if !empty(issues)
for i in issues
if has_key(b:syntastic_balloons, i['lnum'])
let b:syntastic_balloons[i['lnum']] .= "\n" . i['text']
else
let b:syntastic_balloons[i['lnum']] = i['text']
endif
endfor
set beval bexpr=SyntasticBalloonsExprNotifier()
endif
endif
FUNCTION sy#repo#get_diff_git()
Called 1 time
Total time: 0.035299
Self time: 0.000291
count total (s) self (s)
1 0.000006 let diffoptions = has_key(s:diffoptions, 'git') ? s:diffoptions.git : ''
1 0.035265 0.000257 let diff = system('cd '. sy#util#escape(fnamemodify(a:path, ':h')) .' && git diff --no-ext-diff -U0 '. diffoptions .' -- '. sy#util#escape(a:path))
1 0.000017 return v:shell_error ? '' : diff
FUNCTION fugitive#head()
Called 9 times
Total time: 0.001610
Self time: 0.000149
count total (s) self (s)
9 0.000028 if !exists('b:git_dir')
return ''
endif
9 0.001556 0.000095 return s:repo().head(a:0 ? a:1 : 0)
FUNCTION <SNR>232_sync_active_winnr()
Called 2 times
Total time: 0.000023
Self time: 0.000023
count total (s) self (s)
2 0.000016 if exists('#airline') && winnr() != s:active_winnr
call airline#update_statusline()
endif
FUNCTION <SNR>272_check_cache()
Called 4 times
Total time: 0.000273
Self time: 0.000097
count total (s) self (s)
4 0.000196 0.000020 if !neocomplete#is_enabled_source('include')
return
endif
4 0.000020 let release_accessd_time = localtime() - g:neocomplete#release_cache_time
4 0.000014 for key in keys(s:include_cache)
if has_key(s:cache_accessed_time, key) && s:cache_accessed_time[key] < release_accessd_time
call remove(s:include_cache, key)
endif
endfor
FUNCTION sy#util#escape()
Called 2 times
Total time: 0.000039
Self time: 0.000039
count total (s) self (s)
2 0.000006 if exists('+shellslash')
let old_ssl = &shellslash
set noshellslash
endif
2 0.000011 let path = shellescape(a:path)
2 0.000005 if exists('old_ssl')
let &shellslash = old_ssl
endif
2 0.000003 return path
FUNCTION neocomplete#init#is_enabled()
Called 4 times
Total time: 0.000010
Self time: 0.000010
count total (s) self (s)
4 0.000009 return s:is_enabled
FUNCTION <SNR>249_LogDebugMessage()
Called 25 times
Total time: 0.000176
Self time: 0.000176
count total (s) self (s)
25 0.000035 if s:debug
execute 'redir >> ' . s:debug_file
silent echon strftime('%H:%M:%S') . ': ' . a:msg . "\n"
redir END
endif
FUNCTION sy#repo#get_stats()
Called 9 times
Total time: 0.000114
Self time: 0.000114
count total (s) self (s)
9 0.000056 if !exists('g:sy_path') || !has_key(g:sy, g:sy_path)
return [-1, -1, -1]
endif
9 0.000024 return g:sy[g:sy_path].stats
FUNCTION <SNR>193_ShowMarks()
Called 4 times
Total time: 0.025240
Self time: 0.011656
count total (s) self (s)
4 0.000012 if g:showmarks_enable == 0
return
endif
4 0.000167 if ((match(g:showmarks_ignore_type, "[Hh]") > -1) && (&buftype == "help" )) || ((match(g:showmarks_ignore_type, "[Qq]") > -1) && (&buftype == "quickfix")) || ((match(g:showmarks_ignore_type, "[Pp]") > -1) && (&pvw == 1 )) || ((match(g:showmarks_ignore_type, "[Rr]") > -1) && (&readonly == 1 )) || ((match(g:showmarks_ignore_type, "[Mm]") > -1) && (&modifiable == 0 ))
return
endif
4 0.000012 let n = 0
4 0.000233 0.000037 let s:maxmarks = strlen(s:IncludeMarks())
208 0.000280 while n < s:maxmarks
204 0.009074 0.001073 let c = strpart(s:IncludeMarks(), n, 1)
204 0.003035 0.000917 let nm = s:NameOfMark(c)
204 0.000658 let id = n + (s:maxmarks * winbufnr(0))
"let ln = line("'".c)
204 0.004326 0.001057 let ln = s:GetMarkLine("'".c)
204 0.000782 if ln == 0 && (exists('b:placed_'.nm) && b:placed_{nm} != ln)
exe 'sign unplace '.id.' buffer='.winbufnr(0)
elseif ln > 1 || c !~ '[a-zA-Z]'
" Have we already placed a mark here in this call to ShowMarks?
if exists('mark_at'.ln)
" Already placed a mark, set the highlight to multiple
if c =~# '[a-zA-Z]' && b:ShowMarksLink{mark_at{ln}} != 'ShowMarksHLm'
let b:ShowMarksLink{mark_at{ln}} = 'ShowMarksHLm'
exe 'hi link '.s:ShowMarksDLink{mark_at{ln}}.mark_at{ln}.' '.b:ShowMarksLink{mark_at{ln}}
endif
else
if !exists('b:ShowMarksLink'.nm) || b:ShowMarksLink{nm} != s:ShowMarksDLink{nm}
let b:ShowMarksLink{nm} = s:ShowMarksDLink{nm}
exe 'hi link '.s:ShowMarksDLink{nm}.nm.' '.b:ShowMarksLink{nm}
endif
let mark_at{ln} = nm
if !exists('b:placed_'.nm) || b:placed_{nm} != ln
exe 'sign unplace '.id.' buffer='.winbufnr(0)
exe 'sign place '.id.' name=ShowMark'.nm.' line='.ln.' buffer='.winbufnr(0)
let b:placed_{nm} = ln
endif
endif
endif
204 0.000369 let n = n + 1
204 0.000139 endw
FUNCTION airline#extensions#readonly#get_mark()
Called 10 times
Total time: 0.000061
Self time: 0.000061
count total (s) self (s)
10 0.000051 return &ro ? s:symbol : ''
FUNCTION AutoTag()
Called 1 time
Total time: 0.000848
Self time: 0.000848
count total (s) self (s)
1 0.000001 python << EEOOFF
try:
if not vim_global("Disabled", bool):
at = AutoTag()
at.addSource(vim.eval("expand(\"%:p\")"))
at.rebuildTagFiles()
except:
logging.warning(format_exc())
EEOOFF
1 0.000015 if exists(":TlistUpdate")
TlistUpdate
endif
FUNCTION <SNR>234_init()
Called 9 times
Total time: 0.000241
Self time: 0.000241
count total (s) self (s)
9 0.000023 if !s:initialized
let s:initialized = 1
if get(g:, 'loaded_signify', 0)
function! s:get_hunks()
let hunks = sy#repo#get_stats()
if hunks[0] >= 0
return hunks
endif
return []
endfunction
elseif exists('*GitGutterGetHunkSummary')
function! s:get_hunks()
if !get(g:, 'gitgutter_enabled', 0)
return ''
endif
return GitGutterGetHunkSummary()
endfunction
else
function! s:get_hunks()
return []
endfunction
endif
endif
FUNCTION 230()
Called 10 times
Total time: 0.000100
Self time: 0.000100
count total (s) self (s)
10 0.000037 if !exists("b:syntastic_loclist")
let b:syntastic_loclist = g:SyntasticLoclist.New([])
endif
10 0.000016 return b:syntastic_loclist
FUNCTION <SNR>267_exists_current_source()
Called 2 times
Total time: 0.000012
Self time: 0.000012
count total (s) self (s)
2 0.000010 return has_key(s:buffer_sources, bufnr('%'))
FUNCTION sy#sign#remove_all()
Called 1 time
Total time: 2.278452
Self time: 2.278452
count total (s) self (s)
5 0.000037 for hunk in g:sy[a:path].hunks
47 0.000218 for id in hunk.ids
43 2.277688 execute 'sign unplace '. id
43 0.000369 endfor
4 0.000005 endfor
1 0.000011 let s:other_signs_line_numbers = {}
1 0.000052 let g:sy[a:path].hunks = []
FUNCTION sy#sign#set()
Called 4 times
Total time: 1.837435
Self time: 1.837435
count total (s) self (s)
4 0.000030 let hunk = { 'ids': [], 'start': a:signs[0].lnum, 'end': a:signs[-1].lnum }
47 0.000098 for sign in a:signs
" Preserve non-signify signs
43 0.000231 if !g:signify_sign_overwrite && has_key(s:other_signs_line_numbers, sign.lnum)
next
endif
43 0.000231 call add(hunk.ids, g:id_top)
43 1.835861 execute 'sign place '. g:id_top .' line='. sign.lnum .' name='. sign.type .' file='. sign.path
43 0.000422 let g:id_top += 1
43 0.000210 endfor
4 0.000027 call add(g:sy[sign.path].hunks, hunk)
FUNCTION <SNR>249_GetNearbyTag()
Called 9 times
Total time: 0.000032
Self time: 0.000032
count total (s) self (s)
9 0.000015 if s:nearby_disabled
9 0.000010 return {}
endif
let fileinfo = s:known_files.getCurrent()
if empty(fileinfo)
return {}
endif
let typeinfo = fileinfo.typeinfo
if a:0 > 0
let curline = a:1
else
let curline = line('.')
endif
let tag = {}
" If a tag appears in a file more than once (for example namespaces in
" C++) only one of them has a 'tline' entry and can thus be highlighted.
" The only way to solve this would be to go over the whole tag list again,
" making everything slower. Since this should be a rare occurence and
" highlighting isn't /that/ important ignore it for now.
for line in range(curline, 1, -1)
if has_key(fileinfo.fline, line)
let curtag = fileinfo.fline[line]
if a:all || typeinfo.getKind(curtag.fields.kind).stl
let tag = curtag
break
endif
endif
endfor
return tag
FUNCTION airline#extensions#branch#get_head()
Called 9 times
Total time: 0.001903
Self time: 0.000293
count total (s) self (s)
9 0.000022 let head = ''
9 0.000037 if s:has_fugitive && !exists('b:mercurial_dir')
9 0.001654 0.000044 let head = fugitive#head()
9 0.000030 if empty(head) && s:has_fugitive_detect && !exists('b:git_dir')
call fugitive#detect(getcwd())
let head = fugitive#head()
endif
9 0.000007 endif
9 0.000015 if empty(head)
if s:has_lawrencium
let head = lawrencium#statusline()
endif
endif
9 0.000033 return empty(head) ? s:empty_message : s:symbol.head
FUNCTION <SNR>249_AutoUpdate()
Called 5 times
Total time: 0.001268
Self time: 0.000764
count total (s) self (s)
5 0.000102 0.000054 call s:LogDebugMessage('AutoUpdate called [' . a:fname . ']')
" Get the filetype of the file we're about to process
5 0.000458 let bufnr = bufnr(a:fname)
5 0.000026 let ftype = getbufvar(bufnr, '&filetype')
" Don't do anything if we're in the tagbar window
5 0.000013 if ftype == 'tagbar'
call s:LogDebugMessage('In Tagbar window, stopping processing')
return
endif
" Only consider the main filetype in cases like 'python.django'
5 0.000040 let sftype = get(split(ftype, '\.'), 0, '')
5 0.000079 0.000042 call s:LogDebugMessage("Vim filetype: '" . ftype . "', " . "sanitized filetype: '" . sftype . "'")
" Don't do anything if the file isn't supported
5 0.000423 0.000033 if !s:IsValidFile(a:fname, sftype)
5 0.000052 0.000023 call s:LogDebugMessage('Not a valid file, stopping processing')
5 0.000013 let s:nearby_disabled = 1
5 0.000004 return
endif
let updated = 0
" Process the file if it's unknown or the information is outdated.
" Testing the mtime of the file is necessary in case it got changed
" outside of Vim, for example by checking out a different version from a
" VCS.
if s:known_files.has(a:fname)
let curfile = s:known_files.get(a:fname)
" if a:force || getbufvar(curfile.bufnr, '&modified') ||
if a:force || empty(curfile) || (filereadable(a:fname) && getftime(a:fname) > curfile.mtime)
call s:LogDebugMessage('File data outdated, updating' . ' [' . a:fname . ']')
call s:ProcessFile(a:fname, sftype)
let updated = 1
else
call s:LogDebugMessage('File data seems up to date' . ' [' . a:fname . ']')
endif
elseif !s:known_files.has(a:fname)
call s:LogDebugMessage('New file, processing [' . a:fname . ']')
call s:ProcessFile(a:fname, sftype)
let updated = 1
endif
let fileinfo = s:known_files.get(a:fname)
" If we don't have an entry for the file by now something must have gone
" wrong, so don't change the tagbar content
if empty(fileinfo)
call s:LogDebugMessage('fileinfo empty after processing' . ' [' . a:fname . ']')
return
endif
" Display the tagbar content if the tags have been updated or a different
" file is being displayed
if bufwinnr('__Tagbar__') != -1 && (s:new_window || updated || (!empty(s:known_files.getCurrent()) && a:fname != s:known_files.getCurrent().fpath))
call s:RenderContent(fileinfo)
endif
" Call setCurrent after rendering so RenderContent can check whether the
" same file is being redisplayed
if !empty(fileinfo)
call s:LogDebugMessage('Setting current file [' . a:fname . ']')
call s:known_files.setCurrent(fileinfo)
let s:nearby_disabled = 0
endif
call s:HighlightTag(0)
call s:LogDebugMessage('AutoUpdate finished successfully')
FUNCTION sy#repo#process_diff()
Called 1 time
Total time: 1.839068
Self time: 0.001633
count total (s) self (s)
1 0.000003 let added = 0
1 0.000002 let deleted = 0
1 0.000001 let modified = 0
" Determine where we have to put our signs.
5 0.000335 for line in filter(split(a:diff, '\n'), 'v:val =~ "^@@ "')
4 0.000130 let tokens = matchlist(line, '^@@ -\v(\d+),?(\d*) \+(\d+),?(\d*)')
4 0.000079 let [ old_line, old_count, new_line, new_count ] = [ str2nr(tokens[1]), empty(tokens[2]) ? 1 : str2nr(tokens[2]), str2nr(tokens[3]), empty(tokens[4]) ? 1 : str2nr(tokens[4]) ]
4 0.000060 let signs = []
" 2 lines added:
" @@ -5,0 +6,2 @@ this is line 5
" +this is line 5
" +this is line 5
4 0.000011 if (old_count == 0) && (new_count >= 1)
let added += new_count
let offset = 0
while offset < new_count
call add(signs, { 'type': 'SignifyAdd', 'lnum': new_line + offset, 'path': a:path })
let offset += 1
endwhile
" 2 lines removed:
" @@ -6,2 +5,0 @@ this is line 5
" -this is line 6
" -this is line 7
elseif (old_count >= 1) && (new_count == 0)
let deleted += old_count
if new_line == 0
call add(signs, { 'type': 'SignifyDeleteFirstLine', 'lnum': 1, 'path': a:path })
else
call add(signs, { 'type': (old_count > 9) ? 'SignifyDeleteMore' : 'SignifyDelete'. old_count, 'lnum': new_line, 'path': a:path })
endif
" 2 lines changed:
" @@ -5,2 +5,2 @@ this is line 4
" -this is line 5
" -this is line 6
" +this os line 5
" +this os line 6
elseif old_count == new_count
1 0.000002 let modified += old_count
1 0.000001 let offset = 0
7 0.000009 while offset < new_count
6 0.000071 call add(signs, { 'type': 'SignifyChange', 'lnum': new_line + offset, 'path': a:path })
6 0.000022 let offset += 1
6 0.000005 endwhile
1 0.000001 else
" 2 lines changed; 2 lines deleted:
" @@ -5,4 +5,2 @@ this is line 4
" -this is line 5
" -this is line 6
" -this is line 7
" -this is line 8
" +this os line 5
" +this os line 6
3 0.000003 if old_count > new_count
let modified += new_count
let deleted += (old_count - new_count)
let offset = 0
while offset < (new_count - 1)
call add(signs, { 'type': 'SignifyChange', 'lnum': new_line + offset, 'path': a:path })
let offset += 1
endwhile
let deleted += (old_count - new_count)
call add(signs, { 'type': (deleted > 9) ? 'SignifyChangeDeleteMore' : 'SignifyChangeDelete'. deleted, 'lnum': new_line, 'path': a:path })
" lines changed and added:
" @@ -5 +5,3 @@ this is line 4
" -this is line 5
" +this os line 5
" +this is line 42
" +this is line 666
else
3 0.000014 let modified += old_count
3 0.000009 let added += (new_count - old_count)
3 0.000005 let offset = 0
24 0.000032 while offset < old_count
21 0.000122 call add(signs, { 'type': 'SignifyChange', 'lnum': new_line + offset, 'path': a:path })
21 0.000030 let offset += 1
21 0.000015 endwhile
19 0.000026 while offset < new_count
16 0.000099 call add(signs, { 'type': 'SignifyAdd', 'lnum': new_line + offset, 'path': a:path })
16 0.000025 let offset += 1
16 0.000010 endwhile
3 0.000002 endif
3 0.000000 endif
4 1.837475 0.000040 call sy#sign#set(signs)
4 0.000004 endfor
1 0.000007 let g:sy[g:sy_path].stats = [added, modified, deleted]
FUNCTION 223()
Called 1 time
Total time: 0.000022
Self time: 0.000013
count total (s) self (s)
1 0.000015 0.000006 if self.enabled() && a:loclist.hasErrorsOrWarningsToDisplay()
let b:syntastic_messages = copy(a:loclist.messages(bufnr('')))
let b:oldLine = -1
autocmd! syntastic CursorMoved
autocmd syntastic CursorMoved * call g:SyntasticRefreshCursor()
endif
FUNCTION <SNR>273_garbage_collect()
Called 5 times
Total time: 0.000169
Self time: 0.000169
count total (s) self (s)
5 0.000022 for pid in values(s:bg_processes)
" Check processes.
try
let [cond, status] = s:libcall('vp_waitpid', [pid])
" echomsg string([pid, cond, status])
if cond !=# 'run' || a:is_force
if cond !=# 'exit'
" Kill process.
" 15 == SIGTERM
call vimproc#kill(pid, 15)
endif
if vimproc#util#is_windows()
call s:libcall('vp_close_handle', [pid])
endif
call remove(s:bg_processes, pid)
endif
catch
" Ignore error.
endtry
endfor
FUNCTION <SNR>219_Highlight_Matching_Pair()
Called 3 times
Total time: 0.000284
Self time: 0.000284
count total (s) self (s)
" Remove any previous match.
3 0.000023 if exists('w:paren_hl_on') && w:paren_hl_on
3match none
let w:paren_hl_on = 0
endif
" Avoid that we remove the popup menu.
" Return when there are no colors (looks like the cursor jumps).
3 0.000028 if pumvisible() || (&t_Co < 8 && !has("gui_running"))
return
endif
" Get the character under the cursor and check if it's in 'matchpairs'.
3 0.000014 let c_lnum = line('.')
3 0.000009 let c_col = col('.')
3 0.000004 let before = 0
3 0.000016 let c = getline(c_lnum)[c_col - 1]
3 0.000065 let plist = split(&matchpairs, '.\zs[:,]')
3 0.000012 let i = index(plist, c)
3 0.000005 if i < 0
" not found, in Insert mode try character before the cursor
3 0.000016 if c_col > 1 && (mode() == 'i' || mode() == 'R')
let before = 1
let c = getline(c_lnum)[c_col - 2]
let i = index(plist, c)
endif
3 0.000003 if i < 0
" not found, nothing to do
3 0.000003 return
endif
endif
" Figure out the arguments for searchpairpos().
if i % 2 == 0
let s_flags = 'nW'
let c2 = plist[i + 1]
else
let s_flags = 'nbW'
let c2 = c
let c = plist[i - 1]
endif
if c == '['
let c = '\['
let c2 = '\]'
endif
" Find the match. When it was just before the cursor move it there for a
" moment.
if before > 0
let save_cursor = winsaveview()
call cursor(c_lnum, c_col - before)
endif
" When not in a string or comment ignore matches inside them.
" We match "escape" for special items, such as lispEscapeSpecial.
let s_skip ='synIDattr(synID(line("."), col("."), 0), "name") ' . '=~? "string\\|character\\|singlequote\\|escape\\|comment"'
execute 'if' s_skip '| let s_skip = 0 | endif'
" Limit the search to lines visible in the window.
let stoplinebottom = line('w$')
let stoplinetop = line('w0')
if i % 2 == 0
let stopline = stoplinebottom
else
let stopline = stoplinetop
endif
" Limit the search time to 300 msec to avoid a hang on very long lines.
" This fails when a timeout is not supported.
if mode() == 'i' || mode() == 'R'
let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout
else
let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout
endif
try
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout)
catch /E118/
" Can't use the timeout, restrict the stopline a bit more to avoid taking
" a long time on closed folds and long lines.
" The "viewable" variables give a range in which we can scroll while
" keeping the cursor at the same position.
" adjustedScrolloff accounts for very large numbers of scrolloff.
let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2])
let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2])
let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2])
" one of these stoplines will be adjusted below, but the current values are
" minimal boundaries within the current window
if i % 2 == 0
if has("byte_offset") && has("syntax_items") && &smc > 0
let stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2])
let stopline = min([bottom_viewable, byte2line(stopbyte)])
else
let stopline = min([bottom_viewable, c_lnum + 100])
endif
let stoplinebottom = stopline
else
if has("byte_offset") && has("syntax_items") && &smc > 0
let stopbyte = max([1, line2byte(".") + col(".") - &smc * 2])
let stopline = max([top_viewable, byte2line(stopbyte)])
else
let stopline = max([top_viewable, c_lnum - 100])
endif
let stoplinetop = stopline
endif
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline)
endtry
if before > 0
call winrestview(save_cursor)
endif
" If a match is found setup match highlighting.
if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom
exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
let w:paren_hl_on = 1
endif
FUNCTION neocomplete#context_filetype#set()
Called 4 times
Total time: 0.000105
Self time: 0.000078
count total (s) self (s)
4 0.000046 0.000019 let neocomplete = neocomplete#get_current_neocomplete()
4 0.000018 let context_filetype = s:exists_context_filetype ? context_filetype#get_filetype() : &filetype
4 0.000007 if context_filetype == ''
let context_filetype = 'nothing'
endif
4 0.000012 let neocomplete.context_filetype = context_filetype
4 0.000006 return neocomplete.context_filetype
FUNCTION <SNR>249_Init()
Called 9 times
Total time: 0.000280
Self time: 0.000280
count total (s) self (s)
9 0.000029 if s:checked_ctags == 2 && a:silent
return 0
elseif s:checked_ctags != 1
if !s:CheckForExCtags(a:silent)
return 0
endif
endif
9 0.000016 if !s:checked_ctags_types
call s:GetSupportedFiletypes()
endif
9 0.000013 if !s:type_init_done
call s:InitTypes()
endif
9 0.000013 if !s:autocommands_done
call s:CreateAutocommands()
call s:AutoUpdate(fnamemodify(expand('%'), ':p'), 0)
endif
9 0.000008 return 1
FUNCTION <SNR>193_GetMarkLine()
Called 204 times
Total time: 0.003269
Self time: 0.003269
count total (s) self (s)
204 0.000307 if v:version < 700
let lnum = line(a:mark)
else
204 0.000641 let pos = getpos(a:mark)
204 0.000444 let lnum = pos[1]
204 0.000482 if pos[0] && bufnr("%") != pos[0]
let lnum = 0
endif
204 0.000108 endif
204 0.000174 return lnum
FUNCTION neocomplete#get_context_filetype()
Called 4 times
Total time: 0.000273
Self time: 0.000101
count total (s) self (s)
4 0.000054 0.000020 if !neocomplete#is_enabled()
return &filetype
endif
4 0.000055 0.000022 let neocomplete = neocomplete#get_current_neocomplete()
4 0.000012 if a:0 != 0 || mode() !=# 'i' || neocomplete.context_filetype == ''
4 0.000130 0.000025 call neocomplete#context_filetype#set()
4 0.000003 endif
4 0.000004 return neocomplete.context_filetype
FUNCTION <SNR>176_SkipFile()
Called 1 time
Total time: 0.000083
Self time: 0.000041
count total (s) self (s)
1 0.000006 let force_skip = exists('b:syntastic_skip_checks') ? b:syntastic_skip_checks : 0
1 0.000004 let fname = expand('%')
1 0.000072 0.000030 return force_skip || !empty(&buftype) || !filereadable(fname) || getwinvar(0, '&diff') || s:IgnoreFile(fname)
FUNCTION <SNR>126_repo_head()
Called 9 times
Total time: 0.001183
Self time: 0.000320
count total (s) self (s)
9 0.000779 0.000075 let head = s:repo().head_ref()
9 0.000075 if head =~# '^ref: '
9 0.000233 0.000074 let branch = s:sub(head,'^ref: %(refs/%(heads/|remotes/|tags/)=)=','')
9 0.000016 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] : ''
endif
9 0.000010 return branch
FUNCTION <SNR>176_IgnoreFile()
Called 1 time
Total time: 0.000042
Self time: 0.000042
count total (s) self (s)
1 0.000027 let fname = fnamemodify(a:filename, ':p')
1 0.000008 for p in g:syntastic_ignore_files
if fname =~# p
return 1
endif
endfor
1 0.000001 return 0
FUNCTION <SNR>176_UpdateErrors()
Called 1 time
Total time: 0.001240
Self time: 0.000075
count total (s) self (s)
1 0.000094 0.000011 if s:SkipFile()
return
endif
1 0.000055 0.000016 let run_checks = !a:auto_invoked || s:modemap.allowsAutoChecking(&filetype)
1 0.000001 if run_checks
if a:0 >= 1
call s:CacheErrors(a:1)
else
call s:CacheErrors()
endif
end
1 0.000024 0.000010 let loclist = g:SyntasticLoclist.current()
1 0.000003 let w:syntastic_loclist_set = 0
1 0.000003 if g:syntastic_always_populate_loc_list || g:syntastic_auto_jump
call setloclist(0, loclist.filteredRaw())
let w:syntastic_loclist_set = 1
if run_checks && g:syntastic_auto_jump && loclist.hasErrorsOrWarningsToDisplay()
silent! lrewind
endif
endif
1 0.001036 0.000007 call s:notifiers.refresh(loclist)
FUNCTION neocomplete#is_enabled()
Called 4 times
Total time: 0.000034
Self time: 0.000024
count total (s) self (s)
4 0.000032 0.000022 return neocomplete#init#is_enabled()
FUNCTION sy#start()
Called 1 time
Total time: 4.153912
Self time: 0.000400
count total (s) self (s)
1 0.000029 if &diff || !filereadable(a:path) || (exists('g:signify_skip_filetype') && has_key(g:signify_skip_filetype, &ft)) || (exists('g:signify_skip_filename') && has_key(g:signify_skip_filename, a:path))
return
endif
" new buffer.. add to list of registered files
1 0.000004 if !has_key(g:sy, a:path)
if get(g:, 'signify_disable_by_default')
let g:sy[a:path] = { 'active': 0, 'type': 'unknown', 'hunks': [], 'id_top': g:id_top, 'stats': [-1, -1, -1] }
return
endif
let [ diff, type ] = sy#repo#detect(a:path)
if empty(diff)
" register file as active with either no changes or no found VCS
let g:sy[a:path] = { 'active': 1, 'type': 'unknown', 'hunks': [], 'id_top': g:id_top, 'stats': [0, 0, 0] }
return
endif
" register file as active and containing changes
let g:sy[a:path] = { 'active': 1, 'type': type, 'hunks': [], 'id_top': g:id_top, 'stats': [0, 0, 0] }
" inactive buffer.. bail out
elseif !g:sy[a:path].active
return
" retry detecting changes or VCS
elseif g:sy[a:path].type == 'unknown'
let [ diff, type ] = sy#repo#detect(a:path)
if empty(diff)
" no changes or VCS found
return
endif
let g:sy[a:path].type = type
" update signs
else
1 0.035352 0.000053 let diff = sy#repo#get_diff_{g:sy[a:path].type}(a:path)
1 0.000009 if empty(diff)
call sy#sign#remove_all(a:path)
return
endif
1 0.000015 let g:sy[a:path].id_top = g:id_top
1 0.000001 endif
1 0.000005 if get(g:, 'signify_line_highlight')
call sy#highlight#line_enable()
else
1 0.000742 0.000049 call sy#highlight#line_disable()
1 0.000001 endif
1 0.000003 if !g:signify_sign_overwrite
call sy#sign#get_others(a:path)
endif
1 0.000054 execute 'sign place 99999 line=1 name=SignifyPlaceholder file='. a:path
1 2.278505 0.000053 call sy#sign#remove_all(a:path)
1 1.839109 0.000041 call sy#repo#process_diff(a:path, diff)
1 0.000007 sign unplace 99999
1 0.000005 let g:sy[a:path].id_top = (g:id_top - 1)
FUNCTION <SNR>126_repo_dir()
Called 9 times
Total time: 0.000071
Self time: 0.000071
count total (s) self (s)
9 0.000066 return join([self.git_dir]+a:000,'/')
FUNCTION <SNR>267_check_recache()
Called 1 time
Total time: 0.008232
Self time: 0.000052
count total (s) self (s)
1 0.000016 0.000009 if !s:exists_current_source()
return
endif
1 0.000006 let release_accessd_time = localtime() - g:neocomplete#release_cache_time
1 0.000004 let source = s:buffer_sources[bufnr('%')]
" Check buffer access time.
1 0.000006 if (source.cached_time > 0 && source.cached_time < release_accessd_time) || (neocomplete#util#has_vimproc() && line('$') != source.end_line)
" Buffer recache.
1 0.000002 if g:neocomplete#enable_debug
echomsg 'Make cache from buffer: ' . bufname('%')
endif
1 0.008187 0.000014 call s:make_cache_current_block()
1 0.000003 endif
FUNCTION tagbar#currenttag()
Called 9 times
Total time: 0.000717
Self time: 0.000405
count total (s) self (s)
" Indicate that the statusline functionality is being used. This prevents
" the CloseWindow() function from removing the autocommands.
9 0.000025 let s:statusline_in_use = 1
9 0.000013 if a:0 > 0
" also test for non-zero value for backwards compatibility
let longsig = a:1 =~# 's' || (type(a:1) == type(0) && a:1 != 0)
let fullpath = a:1 =~# 'f'
let prototype = a:1 =~# 'p'
else
9 0.000015 let longsig = 0
9 0.000012 let fullpath = 0
9 0.000014 let prototype = 0
9 0.000007 endif
9 0.000326 0.000046 if !s:Init(1)
return a:default
endif
9 0.000077 0.000045 let tag = s:GetNearbyTag(0)
9 0.000017 if !empty(tag)
if prototype
return tag.getPrototype(1)
else
return printf(a:fmt, tag.str(longsig, fullpath))
endif
else
9 0.000014 return a:default
endif
FUNCTION <SNR>126_repo()
Called 18 times
Total time: 0.000504
Self time: 0.000504
count total (s) self (s)
18 0.000133 let dir = a:0 ? a:1 : (exists('b:git_dir') && b:git_dir !=# '' ? b:git_dir : fugitive#extract_git_dir(expand('%:p')))
18 0.000031 if dir !=# ''
18 0.000052 if has_key(s:repos, dir)
18 0.000054 let repo = get(s:repos, dir)
18 0.000016 else
let repo = {'git_dir': dir}
let s:repos[dir] = repo
endif
18 0.000123 return extend(extend(repo, s:repo_prototype, 'keep'), s:abstract_prototype, 'keep')
endif
call s:throw('not a git repository: '.expand('%:p'))
FUNCTION sy#highlight#line_disable()
Called 1 time
Total time: 0.000693
Self time: 0.000693
count total (s) self (s)
1 0.000069 execute 'sign define SignifyAdd text='. s:sign_add ' texthl=SignifySignAdd linehl='
1 0.000022 execute 'sign define SignifyChange text='. s:sign_change ' texthl=SignifySignChange linehl='
1 0.000024 execute 'sign define SignifyChangeDelete1 text='. s:sign_change .'1 texthl=SignifySignChange linehl='
1 0.000023 execute 'sign define SignifyChangeDelete2 text='. s:sign_change .'2 texthl=SignifySignChange linehl='
1 0.000018 execute 'sign define SignifyChangeDelete3 text='. s:sign_change .'3 texthl=SignifySignChange linehl='
1 0.000026 execute 'sign define SignifyChangeDelete4 text='. s:sign_change .'4 texthl=SignifySignChange linehl='
1 0.000017 execute 'sign define SignifyChangeDelete5 text='. s:sign_change .'5 texthl=SignifySignChange linehl='
1 0.000018 execute 'sign define SignifyChangeDelete6 text='. s:sign_change .'6 texthl=SignifySignChange linehl='
1 0.000018 execute 'sign define SignifyChangeDelete7 text='. s:sign_change .'7 texthl=SignifySignChange linehl='
1 0.000034 execute 'sign define SignifyChangeDelete8 text='. s:sign_change .'8 texthl=SignifySignChange linehl='
1 0.000069 execute 'sign define SignifyChangeDelete9 text='. s:sign_change .'9 texthl=SignifySignChange linehl='
1 0.000048 execute 'sign define SignifyChangeDeleteMore text='. s:sign_change .'> texthl=SignifySignChange linehl='
1 0.000030 execute 'sign define SignifyDelete1 text='. s:sign_delete .'1 texthl=SignifySignDelete linehl='
1 0.000023 execute 'sign define SignifyDelete2 text='. s:sign_delete .'2 texthl=SignifySignDelete linehl='
1 0.000029 execute 'sign define SignifyDelete3 text='. s:sign_delete .'3 texthl=SignifySignDelete linehl='
1 0.000022 execute 'sign define SignifyDelete4 text='. s:sign_delete .'4 texthl=SignifySignDelete linehl='
1 0.000026 execute 'sign define SignifyDelete5 text='. s:sign_delete .'5 texthl=SignifySignDelete linehl='
1 0.000026 execute 'sign define SignifyDelete6 text='. s:sign_delete .'6 texthl=SignifySignDelete linehl='
1 0.000024 execute 'sign define SignifyDelete7 text='. s:sign_delete .'7 texthl=SignifySignDelete linehl='
1 0.000022 execute 'sign define SignifyDelete8 text='. s:sign_delete .'8 texthl=SignifySignDelete linehl='
1 0.000026 execute 'sign define SignifyDelete9 text='. s:sign_delete .'9 texthl=SignifySignDelete linehl='
1 0.000028 execute 'sign define SignifyDeleteMore text='. s:sign_delete .'> texthl=SignifySignDelete linehl='
1 0.000026 execute 'sign define SignifyDeleteFirstLine text='. s:sign_delete_first_line ' texthl=SignifySignDelete linehl='
1 0.000005 let g:signify_line_highlight = 0
FUNCTION <SNR>193_NameOfMark()
Called 204 times
Total time: 0.002118
Self time: 0.002118
count total (s) self (s)
204 0.000399 let name = a:mark
204 0.000769 if a:mark =~# '\W'
let name = stridx(s:all_marks, a:mark) + 10
endif
204 0.000186 return name
FUNCTION <SNR>267_check_cache()
Called 4 times
Total time: 0.000788
Self time: 0.000788
count total (s) self (s)
4 0.000018 let release_accessd_time = localtime() - g:neocomplete#release_cache_time
68 0.000215 for [key, source] in items(s:buffer_sources)
" Check deleted buffer and access time.
64 0.000281 if !bufloaded(str2nr(key)) || (source.accessed_time > 0 && source.accessed_time < release_accessd_time)
" Remove item.
call remove(s:buffer_sources, key)
endif
64 0.000036 endfor
FUNCTION 290()
Called 1 time
Total time: 0.000008
Self time: 0.000008
count total (s) self (s)
1 0.000004 if !exists("b:syntastic_sign_ids")
let b:syntastic_sign_ids = []
endif
1 0.000002 return b:syntastic_sign_ids
FUNCTION <SNR>267_make_cache_current_buffer()
Called 1 time
Total time: 0.008151
Self time: 0.008146
count total (s) self (s)
" Make cache from current buffer.
1 0.000017 0.000012 if !s:exists_current_source()
call s:make_cache(bufnr('%'))
endif
1 0.000004 let source = s:buffer_sources[bufnr('%')]
1 0.000003 let keyword_pattern = source.keyword_pattern
1 0.000001 lua << EOF
do
local keywords = vim.eval('source.keyword_cache')
local b = vim.buffer()
local min_length = vim.eval('g:neocomplete#min_keyword_length')
for linenr = vim.eval('a:start'), vim.eval('a:end') do
local match = 0
while match >= 0 do
match = vim.eval('match(getline(' .. linenr ..
'), keyword_pattern, ' .. match .. ')')
if match >= 0 then
match_end = vim.eval('matchend(getline('..linenr..
'), keyword_pattern, '..match..')')
match_str = string.sub(b[linenr], match+1, match_end)
if string.len(match_str) >= min_length and
keywords[match_str] == nil then
keywords[match_str] = ''
end
-- Next match.
match = match_end
end
end
end
end
EOF
FUNCTION 208()
Called 1 time
Total time: 0.000026
Self time: 0.000007
count total (s) self (s)
1 0.000026 0.000007 call g:SyntasticAutoloclistNotifier.AutoToggle(a:loclist)
FUNCTION 209()
Called 1 time
Total time: 0.000019
Self time: 0.000016
count total (s) self (s)
1 0.000007 0.000004 if a:loclist.hasErrorsOrWarningsToDisplay()
if g:syntastic_auto_loc_list == 1
call a:loclist.show()
endif
else
1 0.000002 if g:syntastic_auto_loc_list > 0
"TODO: this will close the loc list window if one was opened by
"something other than syntastic
1 0.000001 lclose
1 0.000001 endif
1 0.000001 endif
FUNCTION SyntasticStatuslineFlag()
Called 9 times
Total time: 0.000733
Self time: 0.000547
count total (s) self (s)
9 0.000143 0.000057 let loclist = g:SyntasticLoclist.current()
9 0.000088 0.000045 let issues = loclist.filteredRaw()
9 0.000065 0.000040 let num_issues = loclist.getLength()
9 0.000066 0.000034 if loclist.hasErrorsOrWarningsToDisplay()
let errors = loclist.errors()
let warnings = loclist.warnings()
let num_errors = len(errors)
let num_warnings = len(warnings)
let output = g:syntastic_stl_format
"hide stuff wrapped in %E(...) unless there are errors
let output = substitute(output, '\C%E{\([^}]*\)}', num_errors ? '\1' : '' , 'g')
"hide stuff wrapped in %W(...) unless there are warnings
let output = substitute(output, '\C%W{\([^}]*\)}', num_warnings ? '\1' : '' , 'g')
"hide stuff wrapped in %B(...) unless there are both errors and warnings
let output = substitute(output, '\C%B{\([^}]*\)}', (num_warnings && num_errors) ? '\1' : '' , 'g')
"sub in the total errors/warnings/both
let output = substitute(output, '\C%w', num_warnings, 'g')
let output = substitute(output, '\C%e', num_errors, 'g')
let output = substitute(output, '\C%t', num_issues, 'g')
"first error/warning line num
let output = substitute(output, '\C%F', num_issues ? issues[0]['lnum'] : '', 'g')
"first error line num
let output = substitute(output, '\C%fe', num_errors ? errors[0]['lnum'] : '', 'g')
"first warning line num
let output = substitute(output, '\C%fw', num_warnings ? warnings[0]['lnum'] : '', 'g')
return output
else
9 0.000008 return ''
endif
FUNCTION 211()
Called 2 times
Total time: 0.000014
Self time: 0.000014
count total (s) self (s)
2 0.000013 return has('balloon_eval') && (exists('b:syntastic_enable_balloons') ? b:syntastic_enable_balloons : g:syntastic_enable_balloons)
FUNCTION 222()
Called 2 times
Total time: 0.000011
Self time: 0.000011
count total (s) self (s)
2 0.000010 return exists('b:syntastic_echo_current_error') ? b:syntastic_echo_current_error : g:syntastic_echo_current_error
FUNCTION 226()
Called 2 times
Total time: 0.000013
Self time: 0.000013
count total (s) self (s)
2 0.000012 return s:has_highlighting && (exists('b:syntastic_enable_highlighting') ? b:syntastic_enable_highlighting : g:syntastic_enable_highlighting)
FUNCTION 227()
Called 1 time
Total time: 0.000603
Self time: 0.000052
count total (s) self (s)
1 0.000009 0.000003 if self.enabled()
1 0.000542 0.000007 call self.reset(a:loclist)
1 0.000004 let buf = bufnr('')
1 0.000018 0.000008 let issues = filter(a:loclist.filteredRaw(), 'v:val["bufnr"] == buf')
1 0.000002 for item in issues
let group = item['type'] == 'E' ? 'SyntasticError' : 'SyntasticWarning'
" The function `Syntastic_{filetype}_{checker}_GetHighlightRegex` is
" used to override default highlighting.
if has_key(item, 'hl')
call matchadd(group, '\%' . item['lnum'] . 'l' . item['hl'])
elseif get(item, 'col')
let lastcol = col([item['lnum'], '$'])
let lcol = min([lastcol, item['col']])
" a bug in vim can sometimes cause there to be no 'vcol' key,
" so check for its existence
let coltype = has_key(item, 'vcol') && item['vcol'] ? 'v' : 'c'
call matchadd(group, '\%' . item['lnum'] . 'l\%' . lcol . coltype)
endif
endfor
1 0.000000 endif
FUNCTION 228()
Called 1 time
Total time: 0.000535
Self time: 0.000535
count total (s) self (s)
1 0.000002 if s:has_highlighting
61 0.000184 for match in getmatches()
60 0.000166 if stridx(match['group'], 'Syntastic') == 0
call matchdelete(match['id'])
endif
60 0.000032 endfor
1 0.000000 endif
FUNCTION 233()
Called 10 times
Total time: 0.000053
Self time: 0.000053
count total (s) self (s)
10 0.000042 return copy(self._quietWarnings ? self.errors() : self._rawLoclist)
FUNCTION 236()
Called 9 times
Total time: 0.000025
Self time: 0.000025
count total (s) self (s)
9 0.000019 return len(self._rawLoclist)
FUNCTION 239()
Called 13 times
Total time: 0.000048
Self time: 0.000048
count total (s) self (s)
13 0.000026 if self._hasErrorsOrWarningsToDisplay >= 0
13 0.000014 return self._hasErrorsOrWarningsToDisplay
endif
let self._hasErrorsOrWarningsToDisplay = empty(self._rawLoclist) ? 0 : (!self._quietWarnings || len(self.errors()))
return self._hasErrorsOrWarningsToDisplay
FUNCTION <SNR>275_make_cache_current_buffer()
Called 4 times
Total time: 0.000394
Self time: 0.000121
count total (s) self (s)
4 0.000019 if !exists('g:neocomplete#sources#member#prefix_patterns')
return
endif
4 0.000019 if !has_key(s:member_sources, bufnr('%'))
call s:initialize_source(bufnr('%'))
endif
4 0.000303 0.000030 let filetype = neocomplete#get_context_filetype(1)
4 0.000020 if !has_key(g:neocomplete#sources#member#prefix_patterns, filetype) || g:neocomplete#sources#member#prefix_patterns[filetype] == ''
4 0.000004 return
endif
let source = s:member_sources[bufnr('%')]
let keyword_pattern = '\%(' . s:get_member_pattern(filetype) . '\%(' . g:neocomplete#sources#member#prefix_patterns[filetype] . '\m\)\)\+' . s:get_member_pattern(filetype)
let keyword_pattern2 = '^'.keyword_pattern
let member_pattern = s:get_member_pattern(filetype) . '$'
" Cache member pattern.
for line in getline(a:start, a:end)
let match = match(line, keyword_pattern)
while match >= 0 "{{{
let match_str = matchstr(line, keyword_pattern2, match)
" Next match.
let match = matchend(line, keyword_pattern, match + len(match_str))
while match_str != ''
let member_name = matchstr(match_str, member_pattern)
if member_name == ''
break
endif
let var_name = match_str[ : -len(member_name)-1]
if !has_key(source.member_cache, var_name)
let source.member_cache[var_name] = {}
endif
if !has_key(source.member_cache[var_name], member_name)
let source.member_cache[var_name][member_name] = member_name
endif
let match_str = matchstr(var_name, keyword_pattern2)
endwhile
endwhile"}}}
endfor
FUNCTION <SNR>193_IncludeMarks()
Called 208 times
Total time: 0.008197
Self time: 0.008197
count total (s) self (s)
208 0.001555 if exists('b:showmarks_include') && exists('b:showmarks_previous_include') && b:showmarks_include != b:showmarks_previous_include
" The user changed the marks to include; hide all marks; change the
" included mark list, then show all marks. Prevent infinite
" recursion during this switch.
if exists('s:use_previous_include')
" Recursive call from ShowMarksHideAll()
return b:showmarks_previous_include
elseif exists('s:use_new_include')
" Recursive call from ShowMarks()
return b:showmarks_include
else
let s:use_previous_include = 1
call <sid>ShowMarksHideAll()
unlet s:use_previous_include
let s:use_new_include = 1
call <sid>ShowMarks()
unlet s:use_new_include
endif
endif
208 0.000528 if !exists('g:showmarks_include')
let g:showmarks_include = s:all_marks
endif
208 0.000497 if !exists('b:showmarks_include')
let b:showmarks_include = g:showmarks_include
endif
" Save this include setting so we can detect if it was changed.
208 0.000559 let b:showmarks_previous_include = b:showmarks_include
208 0.000295 return b:showmarks_include
FUNCTION neocomplete#helper#is_enabled_source()
Called 5 times
Total time: 0.000205
Self time: 0.000125
count total (s) self (s)
5 0.000060 0.000022 let neocomplete = neocomplete#get_current_neocomplete()
5 0.000082 0.000040 let source = get(neocomplete#variables#get_sources(), a:source_name, {})
5 0.000056 return !empty(source) && (empty(source.filetypes) || get(source.filetypes, neocomplete.context_filetype, 0)) && (!get(source.disabled_filetypes, '_', 0) && !get(source.disabled_filetypes, neocomplete.context_filetype, 0))
FUNCTION <SNR>148_addtomrufs()
Called 1 time
Total time: 0.000251
Self time: 0.000251
count total (s) self (s)
1 0.000048 let fn = fnamemodify(a:fname, ':p')
1 0.000009 let fn = exists('+ssl') ? tr(fn, '/', '\') : fn
1 0.000164 if ( !empty({s:in}) && fn !~# {s:in} ) || ( !empty({s:ex}) && fn =~# {s:ex} ) || !empty(getbufvar('^'.fn.'$', '&bt')) || !filereadable(fn) | retu
en
1 0.000012 let idx = index(s:mrufs, fn, 0, !{s:cseno})
1 0.000001 if idx
cal filter(s:mrufs, 'v:val !='.( {s:cseno} ? '#' : '?' ).' fn')
cal insert(s:mrufs, fn)
if {s:soup} && idx < 0
cal s:savetofile(s:mergelists())
en
en
FUNCTION 256()
Called 1 time
Total time: 0.000039
Self time: 0.000025
count total (s) self (s)
1 0.000009 let fts = split(a:filetype, '\.')
1 0.000010 0.000006 if self.isPassive()
1 0.000019 0.000009 return self._isOneFiletypeActive(fts)
else
return self._noFiletypesArePassive(fts)
endif
FUNCTION 257()
Called 1 time
Total time: 0.000004
Self time: 0.000004
count total (s) self (s)
1 0.000003 return self._mode == "passive"
FUNCTION 261()
Called 1 time
Total time: 0.000010
Self time: 0.000010
count total (s) self (s)
1 0.000008 return !empty(filter(a:filetypes, 'index(self._activeFiletypes, v:val) != -1'))
FUNCTION 264()
Called 1 time
Total time: 0.001029
Self time: 0.000193
count total (s) self (s)
6 0.000013 for type in self._enabled_types
5 0.000054 let class = substitute(type, '.*', 'Syntastic\u&Notifier', '')
5 0.000097 0.000067 if !has_key(g:{class}, 'enabled') || self._notifier[type].enabled()
5 0.000844 0.000038 call self._notifier[type].refresh(a:loclist)
5 0.000004 endif
5 0.000004 endfor
FUNCTION 285()
Called 2 times
Total time: 0.000016
Self time: 0.000016
count total (s) self (s)
2 0.000015 return has('signs') && exists('b:syntastic_enable_signs') ? b:syntastic_enable_signs : g:syntastic_enable_signs
FUNCTION 286()
Called 1 time
Total time: 0.000111
Self time: 0.000027
count total (s) self (s)
1 0.000016 0.000008 let old_signs = copy(self._bufSignIds())
1 0.000010 0.000003 if self.enabled()
1 0.000062 0.000006 call self._signErrors(a:loclist)
1 0.000001 endif
1 0.000019 0.000006 call self._removeSigns(old_signs)
1 0.000003 let s:first_sign_id = s:next_sign_id
FUNCTION 288()
Called 1 time
Total time: 0.000056
Self time: 0.000051
count total (s) self (s)
1 0.000002 let loclist = a:loclist
1 0.000013 0.000008 if loclist.hasErrorsOrWarningsToDisplay()
" errors some first, so that they are not masked by warnings
let buf = bufnr('')
let issues = copy(loclist.errors())
if !loclist.quietWarnings()
call extend(issues, loclist.warnings())
endif
call filter(issues, 'v:val["bufnr"] == buf')
let seen = {}
for i in issues
if !has_key(seen, i['lnum'])
let seen[i['lnum']] = 1
let sign_severity = i['type'] ==? 'W' ? 'Warning' : 'Error'
let sign_subtype = get(i, 'subtype', '')
let sign_type = 'Syntastic' . sign_subtype . sign_severity
exec "sign place " . s:next_sign_id . " line=" . i['lnum'] . " name=" . sign_type . " buffer=" . i['bufnr']
call add(self._bufSignIds(), s:next_sign_id)
let s:next_sign_id += 1
endif
endfor
endif
FUNCTION 289()
Called 1 time
Total time: 0.000013
Self time: 0.000013
count total (s) self (s)
1 0.000003 if has('signs')
1 0.000002 for i in a:ids
exec "sign unplace " . i
call remove(self._bufSignIds(), index(self._bufSignIds(), i))
endfor
1 0.000001 endif
FUNCTION airline#extensions#hunks#get_hunks()
Called 9 times
Total time: 0.001030
Self time: 0.000586
count total (s) self (s)
9 0.000299 0.000058 call <sid>init()
9 0.000254 0.000051 let hunks = s:get_hunks()
9 0.000013 let string = ''
9 0.000019 if !empty(hunks)
36 0.000055 for i in [0, 1, 2]
27 0.000059 if s:non_zero_only == 0 || hunks[i] > 0
27 0.000192 let string .= printf('%s%s ', s:hunk_symbols[i], hunks[i])
27 0.000023 endif
27 0.000015 endfor
9 0.000005 endif
9 0.000011 return string
FUNCTION <SNR>272_check_buffer()
Called 1 time
Total time: 0.000285
Self time: 0.000221
count total (s) self (s)
1 0.000072 0.000008 if !neocomplete#is_enabled_source('include')
return
endif
1 0.000005 let bufnumber = (a:bufnumber == '') ? bufnr('%') : a:bufnumber
1 0.000027 let filename = fnamemodify(bufname(bufnumber), ':p')
1 0.000008 if !has_key(s:include_info, bufnumber)
" Initialize.
let s:include_info[bufnumber] = { 'include_files' : [], 'lines' : [], 'async_files' : {}, }
endif
1 0.000029 if !executable(g:neocomplete#ctags_command)
return
endif
1 0.000004 let include_info = s:include_info[bufnumber]
1 0.000049 if a:is_force || include_info.lines !=# getbufline(bufnumber, 1, 100)
let include_info.lines = getbufline(bufnumber, 1, 100)
" Check include files contained bufname.
let include_files = s:get_buffer_include_files(bufnumber)
" Check include files from function.
let filetype = getbufvar(a:bufnumber, '&filetype')
let function = get(g:neocomplete#sources#include#functions, filetype, '')
if function != '' && getbufvar(bufnumber, '&buftype') !~ 'nofile'
let path = get(g:neocomplete#sources#include#paths, filetype, getbufvar(a:bufnumber, '&path'))
let include_files += call(function, [getbufline(bufnumber, 1, (a:is_force ? '$' : 1000)), path])
endif
if getbufvar(bufnumber, '&buftype') !~ 'nofile' && filereadable(filename)
call add(include_files, filename)
endif
let include_info.include_files = neocomplete#util#uniq(include_files)
endif
1 0.000002 if g:neocomplete#sources#include#max_processes <= 0
return
endif
1 0.000004 let filetype = getbufvar(bufnumber, '&filetype')
1 0.000002 if filetype == ''
let filetype = 'nothing'
endif
2 0.000004 for filename in include_info.include_files
1 0.000005 if (a:is_force || !has_key(include_info.async_files, filename)) && !has_key(s:include_cache, filename)
if !a:is_force && has_key(s:async_include_cache, filename) && len(s:async_include_cache[filename]) >= g:neocomplete#sources#include#max_processes
break
endif
let s:async_include_cache[filename] = [ s:initialize_include(filename, filetype) ]
let include_info.async_files[filename] = 1
endif
1 0.000001 endfor
FUNCTIONS SORTED ON TOTAL TIME
count total (s) self (s) function
1 4.153912 0.000400 sy#start()
1 2.278452 sy#sign#remove_all()
1 1.839068 0.001633 sy#repo#process_diff()
4 1.837435 sy#sign#set()
1 0.035299 0.000291 sy#repo#get_diff_git()
4 0.025240 0.011656 <SNR>193_ShowMarks()
1 0.008232 0.000052 <SNR>267_check_recache()
208 0.008197 <SNR>193_IncludeMarks()
1 0.008173 0.000022 <SNR>267_make_cache_current_block()
1 0.008151 0.008146 <SNR>267_make_cache_current_buffer()
204 0.003269 <SNR>193_GetMarkLine()
204 0.002118 <SNR>193_NameOfMark()
9 0.001903 0.000293 airline#extensions#branch#get_head()
9 0.001610 0.000149 fugitive#head()
9 0.001502 airline#extensions#whitespace#check()
5 0.001268 0.000764 <SNR>249_AutoUpdate()
1 0.001240 0.000075 <SNR>176_UpdateErrors()
9 0.001183 0.000320 <SNR>126_repo_head()
9 0.001030 0.000586 airline#extensions#hunks#get_hunks()
1 0.001029 0.000193 264()
FUNCTIONS SORTED ON SELF TIME
count total (s) self (s) function
1 2.278452 sy#sign#remove_all()
4 1.837435 sy#sign#set()
4 0.025240 0.011656 <SNR>193_ShowMarks()
208 0.008197 <SNR>193_IncludeMarks()
1 0.008151 0.008146 <SNR>267_make_cache_current_buffer()
204 0.003269 <SNR>193_GetMarkLine()
204 0.002118 <SNR>193_NameOfMark()
1 1.839068 0.001633 sy#repo#process_diff()
9 0.001502 airline#extensions#whitespace#check()
1 0.000848 AutoTag()
4 0.000788 <SNR>267_check_cache()
5 0.001268 0.000764 <SNR>249_AutoUpdate()
10 0.000711 airline#check_mode()
1 0.000693 sy#highlight#line_disable()
9 0.001030 0.000586 airline#extensions#hunks#get_hunks()
9 0.000733 0.000547 SyntasticStatuslineFlag()
1 0.000535 228()
18 0.000504 <SNR>126_repo()
9 0.000478 0.000407 <SNR>126_repo_head_ref()
9 0.000717 0.000405 tagbar#currenttag()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment