Skip to content

Instantly share code, notes, and snippets.

@ravicious
Created August 28, 2013 12:47
Show Gist options
  • Save ravicious/6365638 to your computer and use it in GitHub Desktop.
Save ravicious/6365638 to your computer and use it in GitHub Desktop.
FUNCTION <SNR>64_repo_head_ref()
Called 50 times
Total time: 0.009825
Self time: 0.008881
count total (s) self (s)
50 0.009620 0.008676 return readfile(self.dir('HEAD'))[0]
FUNCTION <SNR>64_repo_head()
Called 50 times
Total time: 0.021346
Self time: 0.005445
count total (s) self (s)
50 0.015137 0.001187 let head = s:repo().head_ref()
50 0.001006 if head =~# '^ref: '
50 0.002972 0.001021 let branch = s:sub(head,'^ref: %(refs/%(heads/|remotes/|tags/)=)=','')
50 0.000328 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
50 0.000307 return branch
FUNCTION <SNR>89_SetDefaultCompletionType()
Called 1 time
Total time: 0.000043
Self time: 0.000043
count total (s) self (s)
1 0.000024 if exists('b:SuperTabDefaultCompletionType') && (!exists('b:complCommandLine') || !b:complCommandLine)
call SuperTabSetCompletionType(b:SuperTabDefaultCompletionType)
endif
FUNCTION MyReadonly()
Called 50 times
Total time: 0.001410
Self time: 0.001410
count total (s) self (s)
50 0.000338 if &filetype == "help"
return ""
elseif &readonly
return "RO"
else
50 0.000158 return ""
endif
FUNCTION lightline#link()
Called 25 times
Total time: 0.018098
Self time: 0.018098
count total (s) self (s)
25 0.000656 let mode = get(s:lightline._mode_, mode(), 'normal')
75 0.000589 for i in range(len(s:lightline.active.left))
50 0.002823 exec printf('hi link LightLineLeft_active_%d LightLineLeft_%s_%d', i, mode, i)
50 0.003102 exec printf('hi link LightLineLeft_active_%d_%d LightLineLeft_%s_%d_%d', i, i + 1, mode, i, i + 1)
50 0.000165 endfor
25 0.000935 exec printf('hi link LightLineMiddle_active LightLineMiddle_%s', mode)
100 0.000626 for i in range(len(s:lightline.active.right))
75 0.002796 exec printf('hi link LightLineRight_active_%d LightLineRight_%s_%d', i, mode, i)
75 0.003116 exec printf('hi link LightLineRight_active_%d_%d LightLineRight_%s_%d_%d', i, i + 1, mode, i, i + 1)
75 0.001110 endfor
25 0.000109 return ''
FUNCTION MyFugitive()
Called 50 times
Total time: 0.029874
Self time: 0.001043
count total (s) self (s)
50 0.029674 0.000843 return exists('*fugitive#head') ? fugitive#head() : ''
FUNCTION <SNR>144_UpdateNERDTree()
Called 4 times
Total time: 0.000296
Self time: 0.000296
count total (s) self (s)
4 0.000027 let stay = 0
4 0.000031 if(exists("a:1"))
let stay = a:1
end
4 0.000027 if exists("t:NERDTreeBufName")
let nr = bufwinnr(t:NERDTreeBufName)
if nr != -1
exe nr . "wincmd w"
exe substitute(mapcheck("R"), "<CR>", "", "")
if !stay
wincmd p
end
endif
endif
FUNCTION MyModified()
Called 78 times
Total time: 0.001799
Self time: 0.001799
count total (s) self (s)
78 0.000449 if &filetype == "help"
return ""
elseif &modified
56 0.000170 return "+"
elseif &modifiable
22 0.000067 return ""
else
return ""
endif
FUNCTION <SNR>181_PreviewCSSColorInLine()
Called 15 times
Total time: 0.001934
Self time: 0.001934
count total (s) self (s)
" TODO use cssColor matchdata
"
" N.B. these substitute() calls are here just for the side effect
" of invoking s:MatchColorValue during substitution -- because
" match() and friends do not allow finding all matches in a single
" scan without examining the start of the string over and over
15 0.001627 call substitute( substitute( substitute( substitute( getline('.'), '#\(\x\)\(\x\)\(\x\)\>', '\=s:MatchColorValue(submatch(1).submatch(1).submatch(2).submatch(2).submatch(3).submatch(3), submatch(0))', 'g' ), '#\(\x\{6}\)\>', '\=s:MatchColorValue(submatch(1), submatch(0))', 'g' ), 'rgba\?(\s*\(\d\{1,3}%\?\)\s*,\s*\(\d\{1,3}%\?\)\s*,\s*\(\d\{1,3}%\?\)\s*\%(,[^)]*\)\?)', '\=s:MatchColorValue(s:HexForRGBValue(submatch(1),submatch(2),submatch(3)),submatch(0))', 'g' ), 'hsla\?(\s*\(\d\{1,3}%\?\)\s*,\s*\(\d\{1,3}%\?\)\s*,\s*\(\d\{1,3}%\?\)\s*\%(,[^)]*\)\?)', '\=s:MatchColorValue(s:HexForHSLValue(submatch(1),submatch(2),submatch(3)),submatch(0))', 'g' )
FUNCTION <SNR>128_Highlight_Matching_Pair()
Called 17 times
Total time: 0.004239
Self time: 0.004239
count total (s) self (s)
" Remove any previous match.
17 0.000287 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).
17 0.000342 if pumvisible() || (&t_Co < 8 && !has("gui_running"))
return
endif
" Get the character under the cursor and check if it's in 'matchpairs'.
17 0.000154 let c_lnum = line('.')
17 0.000114 let c_col = col('.')
17 0.000078 let before = 0
17 0.000227 let c = getline(c_lnum)[c_col - 1]
17 0.000675 let plist = split(&matchpairs, '.\zs[:,]')
17 0.000169 let i = index(plist, c)
17 0.000070 if i < 0
" not found, in Insert mode try character before the cursor
17 0.000170 if c_col > 1 && (mode() == 'i' || mode() == 'R')
13 0.000061 let before = 1
13 0.000140 let c = getline(c_lnum)[c_col - 2]
13 0.000108 let i = index(plist, c)
13 0.000036 endif
17 0.000061 if i < 0
" not found, nothing to do
17 0.000056 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 lightline#mode()
Called 25 times
Total time: 0.000483
Self time: 0.000483
count total (s) self (s)
25 0.000372 return get(s:lightline.mode_map, mode(), s:lightline.mode_map['?'])
FUNCTION <SNR>64_repo()
Called 100 times
Total time: 0.008955
Self time: 0.008955
count total (s) self (s)
100 0.001889 let dir = a:0 ? a:1 : (exists('b:git_dir') && b:git_dir !=# '' ? b:git_dir : fugitive#extract_git_dir(expand('%:p')))
100 0.000482 if dir !=# ''
100 0.000731 if has_key(s:repos, dir)
100 0.000804 let repo = get(s:repos, dir)
100 0.000280 else
let repo = {'git_dir': dir}
let s:repos[dir] = repo
endif
100 0.002304 return extend(extend(repo, s:repo_prototype, 'keep'), s:abstract_prototype, 'keep')
endif
call s:throw('not a git repository: '.expand('%:p'))
FUNCTION MyFilename()
Called 50 times
Total time: 0.005292
Self time: 0.002083
count total (s) self (s)
50 0.005090 0.001881 return ('' != MyReadonly() ? MyReadonly() . ' ' : '') . ('' != expand('%:t') ? expand('%:t') : '[No Name]') . ('' != MyModified() ? ' ' . MyModified() : '')
FUNCTION lightline#update_once()
Called 2 times
Total time: 0.000055
Self time: 0.000055
count total (s) self (s)
2 0.000043 if !exists('w:lightline') || w:lightline | call lightline#update() | endif
FUNCTION fugitive#head()
Called 50 times
Total time: 0.028831
Self time: 0.002655
count total (s) self (s)
50 0.000444 if !exists('b:git_dir')
return ''
endif
50 0.027633 0.001457 return s:repo().head(a:0 ? a:1 : 0)
FUNCTION fugitive#reload_status()
Called 4 times
Total time: 0.002694
Self time: 0.002694
count total (s) self (s)
4 0.000072 if exists('s:reloading_status')
return
endif
4 0.000014 try
4 0.000039 let s:reloading_status = 1
4 0.000034 let mytab = tabpagenr()
12 0.000107 for tab in [mytab] + range(1,tabpagenr('$'))
24 0.000152 for winnr in range(1,tabpagewinnr(tab,'$'))
16 0.000253 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
16 0.000044 endfor
8 0.000025 endfor
4 0.000012 finally
4 0.000022 unlet! s:reloading_status
4 0.000014 endtry
FUNCTION eclim#util#ShowCurrentError()
Called 2 times
Total time: 0.000694
Self time: 0.000262
count total (s) self (s)
2 0.000034 if mode() != 'n' || expand('%') == ''
return
endif
2 0.000486 0.000054 let message = eclim#util#GetLineError(line('.'))
2 0.000011 if message != ''
" remove any new lines
let message = substitute(message, '\n', ' ', 'g')
" convert tabs to spaces to ensure a consistent char to display length
let message = substitute(message, '\t', ' ', 'g')
call eclim#util#WideMessage('echo', message)
let s:show_current_error_displaying = 1
else
" clear the message if one of our error messages was displaying
2 0.000012 if s:show_current_error_displaying
call eclim#util#WideMessage('echo', message)
let s:show_current_error_displaying = 0
endif
2 0.000006 endif
FUNCTION <SNR>64_repo_dir()
Called 50 times
Total time: 0.000944
Self time: 0.000944
count total (s) self (s)
50 0.000754 return join([self.git_dir]+a:000,'/')
FUNCTION <SNR>64_sub()
Called 50 times
Total time: 0.001951
Self time: 0.001951
count total (s) self (s)
50 0.001730 return substitute(a:str,'\v\C'.a:pat,a:rep,'')
FUNCTION eclim#util#GetLineError()
Called 2 times
Total time: 0.000432
Self time: 0.000432
count total (s) self (s)
2 0.000019 let line = line('.')
2 0.000015 let col = col('.')
2 0.000011 let errornum = 0
2 0.000009 let errorcol = 0
2 0.000009 let index = 0
2 0.000018 let locerrors = getloclist(0)
2 0.000014 let qferrors = getqflist()
2 0.000018 let bufname = expand('%')
2 0.000014 let lastline = line('$')
2 0.000018 for error in qferrors + locerrors
let index += 1
if bufname(error.bufnr) == bufname && (error.lnum == line || (error.lnum > lastline && line == lastline))
if errornum == 0 || (col >= error.col && error.col != errorcol)
let errornum = index
let errorcol = error.col
endif
endif
endfor
2 0.000009 if errornum > 0
let src = 'qf'
let cnt = len(qferrors)
let errors = qferrors
if errornum > cnt
let errornum -= cnt
let src = 'loc'
let cnt = len(locerrors)
let errors = locerrors
endif
let message = src . ' - (' . errornum . ' of ' . cnt . '): ' . substitute(errors[errornum - 1].text, '^\s\+', '', '')
return message
endif
2 0.000008 return ''
FUNCTIONS SORTED ON TOTAL TIME
count total (s) self (s) function
50 0.029874 0.001043 MyFugitive()
50 0.028831 0.002655 fugitive#head()
50 0.021346 0.005445 <SNR>64_repo_head()
25 0.018098 lightline#link()
50 0.009825 0.008881 <SNR>64_repo_head_ref()
100 0.008955 <SNR>64_repo()
50 0.005292 0.002083 MyFilename()
17 0.004239 <SNR>128_Highlight_Matching_Pair()
4 0.002694 fugitive#reload_status()
50 0.001951 <SNR>64_sub()
15 0.001934 <SNR>181_PreviewCSSColorInLine()
78 0.001799 MyModified()
50 0.001410 MyReadonly()
50 0.000944 <SNR>64_repo_dir()
2 0.000694 0.000262 eclim#util#ShowCurrentError()
25 0.000483 lightline#mode()
2 0.000432 eclim#util#GetLineError()
4 0.000296 <SNR>144_UpdateNERDTree()
2 0.000055 lightline#update_once()
1 0.000043 <SNR>89_SetDefaultCompletionType()
FUNCTIONS SORTED ON SELF TIME
count total (s) self (s) function
25 0.018098 lightline#link()
100 0.008955 <SNR>64_repo()
50 0.009825 0.008881 <SNR>64_repo_head_ref()
50 0.021346 0.005445 <SNR>64_repo_head()
17 0.004239 <SNR>128_Highlight_Matching_Pair()
4 0.002694 fugitive#reload_status()
50 0.028831 0.002655 fugitive#head()
50 0.005292 0.002083 MyFilename()
50 0.001951 <SNR>64_sub()
15 0.001934 <SNR>181_PreviewCSSColorInLine()
78 0.001799 MyModified()
50 0.001410 MyReadonly()
50 0.029874 0.001043 MyFugitive()
50 0.000944 <SNR>64_repo_dir()
25 0.000483 lightline#mode()
2 0.000432 eclim#util#GetLineError()
4 0.000296 <SNR>144_UpdateNERDTree()
2 0.000694 0.000262 eclim#util#ShowCurrentError()
2 0.000055 lightline#update_once()
1 0.000043 <SNR>89_SetDefaultCompletionType()
FUNCTION <SNR>89_SetDefaultCompletionType()
Called 1 time
Total time: 0.000043
Self time: 0.000043
count total (s) self (s)
1 0.000024 if exists('b:SuperTabDefaultCompletionType') && (!exists('b:complCommandLine') || !b:complCommandLine)
call SuperTabSetCompletionType(b:SuperTabDefaultCompletionType)
endif
FUNCTION <SNR>127_Highlight_Matching_Pair()
Called 30 times
Total time: 0.007931
Self time: 0.007931
count total (s) self (s)
" Remove any previous match.
30 0.000516 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).
30 0.000666 if pumvisible() || (&t_Co < 8 && !has("gui_running"))
return
endif
" Get the character under the cursor and check if it's in 'matchpairs'.
30 0.000299 let c_lnum = line('.')
30 0.000233 let c_col = col('.')
30 0.000143 let before = 0
30 0.000460 let c = getline(c_lnum)[c_col - 1]
30 0.001297 let plist = split(&matchpairs, '.\zs[:,]')
30 0.000307 let i = index(plist, c)
30 0.000121 if i < 0
" not found, in Insert mode try character before the cursor
30 0.000317 if c_col > 1 && (mode() == 'i' || mode() == 'R')
26 0.000131 let before = 1
26 0.000307 let c = getline(c_lnum)[c_col - 2]
26 0.000227 let i = index(plist, c)
26 0.000077 endif
30 0.000111 if i < 0
" not found, nothing to do
30 0.000107 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 eclim#util#ShowCurrentError()
Called 2 times
Total time: 0.000672
Self time: 0.000262
count total (s) self (s)
2 0.000041 if mode() != 'n' || expand('%') == ''
return
endif
2 0.000463 0.000053 let message = eclim#util#GetLineError(line('.'))
2 0.000012 if message != ''
" remove any new lines
let message = substitute(message, '\n', ' ', 'g')
" convert tabs to spaces to ensure a consistent char to display length
let message = substitute(message, '\t', ' ', 'g')
call eclim#util#WideMessage('echo', message)
let s:show_current_error_displaying = 1
else
" clear the message if one of our error messages was displaying
2 0.000012 if s:show_current_error_displaying
call eclim#util#WideMessage('echo', message)
let s:show_current_error_displaying = 0
endif
2 0.000004 endif
FUNCTION <SNR>176_PreviewCSSColorInLine()
Called 28 times
Total time: 0.003997
Self time: 0.003997
count total (s) self (s)
" TODO use cssColor matchdata
"
" N.B. these substitute() calls are here just for the side effect
" of invoking s:MatchColorValue during substitution -- because
" match() and friends do not allow finding all matches in a single
" scan without examining the start of the string over and over
28 0.003418 call substitute( substitute( substitute( substitute( getline('.'), '#\(\x\)\(\x\)\(\x\)\>', '\=s:MatchColorValue(submatch(1).submatch(1).submatch(2).submatch(2).submatch(3).submatch(3), submatch(0))', 'g' ), '#\(\x\{6}\)\>', '\=s:MatchColorValue(submatch(1), submatch(0))', 'g' ), 'rgba\?(\s*\(\d\{1,3}%\?\)\s*,\s*\(\d\{1,3}%\?\)\s*,\s*\(\d\{1,3}%\?\)\s*\%(,[^)]*\)\?)', '\=s:MatchColorValue(s:HexForRGBValue(submatch(1),submatch(2),submatch(3)),submatch(0))', 'g' ), 'hsla\?(\s*\(\d\{1,3}%\?\)\s*,\s*\(\d\{1,3}%\?\)\s*,\s*\(\d\{1,3}%\?\)\s*\%(,[^)]*\)\?)', '\=s:MatchColorValue(s:HexForHSLValue(submatch(1),submatch(2),submatch(3)),submatch(0))', 'g' )
FUNCTION eclim#util#GetLineError()
Called 2 times
Total time: 0.000410
Self time: 0.000410
count total (s) self (s)
2 0.000020 let line = line('.')
2 0.000014 let col = col('.')
2 0.000012 let errornum = 0
2 0.000009 let errorcol = 0
2 0.000009 let index = 0
2 0.000018 let locerrors = getloclist(0)
2 0.000014 let qferrors = getqflist()
2 0.000018 let bufname = expand('%')
2 0.000014 let lastline = line('$')
2 0.000019 for error in qferrors + locerrors
let index += 1
if bufname(error.bufnr) == bufname && (error.lnum == line || (error.lnum > lastline && line == lastline))
if errornum == 0 || (col >= error.col && error.col != errorcol)
let errornum = index
let errorcol = error.col
endif
endif
endfor
2 0.000009 if errornum > 0
let src = 'qf'
let cnt = len(qferrors)
let errors = qferrors
if errornum > cnt
let errornum -= cnt
let src = 'loc'
let cnt = len(locerrors)
let errors = locerrors
endif
let message = src . ' - (' . errornum . ' of ' . cnt . '): ' . substitute(errors[errornum - 1].text, '^\s\+', '', '')
return message
endif
2 0.000008 return ''
FUNCTIONS SORTED ON TOTAL TIME
count total (s) self (s) function
30 0.007931 <SNR>127_Highlight_Matching_Pair()
28 0.003997 <SNR>176_PreviewCSSColorInLine()
2 0.000672 0.000262 eclim#util#ShowCurrentError()
2 0.000410 eclim#util#GetLineError()
1 0.000043 <SNR>89_SetDefaultCompletionType()
FUNCTIONS SORTED ON SELF TIME
count total (s) self (s) function
30 0.007931 <SNR>127_Highlight_Matching_Pair()
28 0.003997 <SNR>176_PreviewCSSColorInLine()
2 0.000410 eclim#util#GetLineError()
2 0.000672 0.000262 eclim#util#ShowCurrentError()
1 0.000043 <SNR>89_SetDefaultCompletionType()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment