Giter VIP home page Giter VIP logo

poppy.vim's People

Contributors

bounceme avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

poppy.vim's Issues

Auto-enable poppy

Heya, just a question, is there a way to auto-enable poppy without executing the mapping you provided in the README?

Make it easier to add a mapping to toggle poppy state

Thanks for your quick reply to my question on reddit :-)

I can add a mapping to switch poppy on with e.g.

nmap <leader>hp :au! CursorMoved * call PoppyInit()<cr>

but it would be even better if I could have the same mapping toogle it on and off. Thoughts?

Match inner-most pair

Thanks for a great plugin, clean and short. I would like to use this plugin to replace the built-in MatchParen, to make the inner-most braces always visible.
screen shot 2017-06-15 at 10 31 55 am

This works great except for the case where the cursor is on a brace:
screen shot 2017-06-15 at 10 32 11 am

I can fix this by adding a 'c' on line 10: (len(g:poppyhigh) > 1 ? 'r' : '').'cnbW', however it doesn't fix the case where the cursor is on the closing brace:
screen shot 2017-06-15 at 10 33 14 am

Do you have any suggestions?

I have the following config:

au cursormoved * call PoppyInit()
let g:poppyhigh = ['MatchParen']
let loaded_matchparen = 1

Poppy seems to be slowing vim down

There is a noticable lag (and cursor inertia) when keeping j and friends down which goes away when poppy is disabled.

Profile log (scroll down for the summary):

FUNCTION  <SNR>115_abs_path()
Called 4 times
Total time:   0.000644
 Self time:   0.000644

count  total (s)   self (s)
    4              0.000612   let p = resolve(expand('#'.a:bufnr.':p'))
    4              0.000026   return a:shellesc ? gitgutter#utility#shellescape(p) : p

FUNCTION  gitgutter#process_buffer()
Called 2 times
Total time:   0.001997
 Self time:   0.000266

count  total (s)   self (s)
                              " NOTE a:bufnr is not necessarily the current buffer.
                            
    2   0.001659   0.000083   if gitgutter#utility#is_active(a:bufnr)
    2   0.000239   0.000084     if a:force || s:has_fresh_changes(a:bufnr)
                            
                                  let diff = ''
                                  try
                                    let diff = gitgutter#diff#run_diff(a:bufnr, 'index', 0)
                                  catch /gitgutter not tracked/
                                    call gitgutter#debug#log('Not tracked: '.gitgutter#utility#file(a:bufnr))
                                  catch /gitgutter diff failed/
                                    call gitgutter#debug#log('Diff failed: '.gitgutter#utility#file(a:bufnr))
                                    call gitgutter#hunk#reset(a:bufnr)
                                  endtry
                            
                                  if diff != 'async'
                                    call gitgutter#diff#handler(a:bufnr, diff)
                                  endif
                            
                                endif
    2              0.000002   endif

FUNCTION  <SNR>128_Highlight_Matching_Pair()
Called 70 times
Total time:   0.011501
 Self time:   0.011501

count  total (s)   self (s)
                              " Remove any previous match.
   70              0.000357   if exists('w:paren_hl_on') && w:paren_hl_on
    1              0.000007     silent! call matchdelete(3)
    1              0.000002     let w:paren_hl_on = 0
    1              0.000001   endif
                            
                              " Avoid that we remove the popup menu.
                              " Return when there are no colors (looks like the cursor jumps).
   70              0.000491   if pumvisible() || (&t_Co < 8 && !has("gui_running"))
                                return
                              endif
                            
                              " Get the character under the cursor and check if it's in 'matchpairs'.
   70              0.000195   let c_lnum = line('.')
   70              0.000178   let c_col = col('.')
   70              0.000091   let before = 0
                            
   70              0.000236   let text = getline(c_lnum)
   70              0.001477   let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)')
   70              0.000213   if empty(matches)
                                let [c_before, c] = ['', '']
                              else
   70              0.000326     let [c_before, c] = matches[1:2]
   70              0.000048   endif
   70              0.001870   let plist = split(&matchpairs, '.\zs[:,]')
   70              0.000273   let i = index(plist, c)
   70              0.000092   if i < 0
                                " not found, in Insert mode try character before the cursor
   69              0.000254     if c_col > 1 && (mode() == 'i' || mode() == 'R')
                                  let before = strlen(c_before)
                                  let c = c_before
                                  let i = index(plist, c)
                                endif
   69              0.000066     if i < 0
                                  " not found, nothing to do
   69              0.000066       return
                                endif
                              endif
                            
                              " Figure out the arguments for searchpairpos().
    1              0.000002   if i % 2 == 0
    1              0.000001     let s_flags = 'nW'
    1              0.000003     let c2 = plist[i + 1]
    1              0.000001   else
                                let s_flags = 'nbW'
                                let c2 = c
                                let c = plist[i - 1]
                              endif
    1              0.000002   if c == '['
                                let c = '\['
                                let c2 = '\]'
                              endif
                            
                              " Find the match.  When it was just before the cursor move it there for a
                              " moment.
    1              0.000001   if before > 0
                                let has_getcurpos = exists("*getcurpos")
                                if has_getcurpos
                                  " getcurpos() is more efficient but doesn't exist before 7.4.313.
                                  let save_cursor = getcurpos()
                                else
                                  let save_cursor = winsaveview()
                                endif
                                call cursor(c_lnum, c_col - before)
                              endif
                            
    1              0.000007   if !has("syntax") || !exists("g:syntax_on")
                                let s_skip = "0"
                              else
                                " Build an expression that detects whether the current cursor position is
                                " in certain syntax types (string, comment, etc.), for use as
                                " searchpairpos()'s skip argument.
                                " We match "escape" for special items, such as lispEscapeSpecial.
    1              0.000004     let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))'
                                " If executing the expression determines that the cursor is currently in
                                " one of the syntax types, then we want searchpairpos() to find the pair
                                " within those syntax types (i.e., not skip).  Otherwise, the cursor is
                                " outside of the syntax types and s_skip should keep its value so we skip
                                " any matching pair inside the syntax types.
                                " Catch if this throws E363: pattern uses more memory than 'maxmempattern'.
    1              0.000001     try
    1              0.000513       execute 'if ' . s_skip . ' | let s_skip = "0" | endif'
    1              0.000002     catch /^Vim\%((\a\+)\)\=:E363/
                                  " We won't find anything, so skip searching, should keep Vim responsive.
                                  return
                                endtry
    1              0.000001   endif
                            
                              " Limit the search to lines visible in the window.
    1              0.000003   let stoplinebottom = line('w$')
    1              0.000003   let stoplinetop = line('w0')
    1              0.000001   if i % 2 == 0
    1              0.000002     let stopline = stoplinebottom
    1              0.000000   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.
    1              0.000003   if mode() == 'i' || mode() == 'R'
                                let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout
                              else
    1              0.000004     let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout
    1              0.000001   endif
    1              0.000001   try
    1              0.002805     let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout)
    1              0.000002   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
                            
    1              0.000001   if before > 0
                                if has_getcurpos
                                  call setpos('.', save_cursor)
                                else
                                  call winrestview(save_cursor)
                                endif
                              endif
                            
                              " If a match is found setup match highlighting.
    1              0.000002   if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom 
    1              0.000003     if exists('*matchaddpos')
    1              0.000023       call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3)
    1              0.000001     else
                                  exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
                                endif
    1              0.000002     let w:paren_hl_on = 1
    1              0.000001   endif

FUNCTION  <SNR>210_GetCounts()
Called 114 times
Total time:   0.002351
 Self time:   0.002351

count  total (s)   self (s)
  114              0.000640     if !exists('g:ale_buffer_info') || !has_key(g:ale_buffer_info, a:buffer)
                                    return s:CreateCountDict()
                                endif
                            
                                " Cache is cold, so manually ask for an update.
  114              0.000378     if !has_key(g:ale_buffer_info[a:buffer], 'count')
                                    call ale#statusline#Update(a:buffer, g:ale_buffer_info[a:buffer].loclist)
                                endif
                            
  114              0.000260     return g:ale_buffer_info[a:buffer].count

FUNCTION  airline#check_mode()
Called 57 times
Total time:   0.008233
 Self time:   0.008233

count  total (s)   self (s)
   57              0.000256   if !has_key(s:contexts, a:winnr)
                                return ''
                              endif
   57              0.000214   let context = s:contexts[a:winnr]
                            
   57              0.000217   if get(w:, 'airline_active', 1)
   57              0.000213     let l:m = mode(1)
   57              0.000128     if l:m ==# "i"
                                  let l:mode = ['insert']
                                elseif l:m[0] ==# "i"
                                  let l:mode = ['insert']
                                elseif l:m ==# "Rv"
                                  let l:mode =['replace']
                                elseif l:m[0] ==# "R"
                                  let l:mode = ['replace']
                                elseif l:m[0] =~# '\v(v|V|�|s|S|�)'
                                  let l:mode = ['visual']
                                elseif l:m ==# "t"
                                  let l:mode = ['terminal']
                                elseif l:m[0] ==# "c"
                                  let l:mode = ['commandline']
                                elseif l:m ==# "no"   " does not work, most likely, Vim does not refresh the statusline in OP mode
                                  let l:mode = ['normal']
                                elseif l:m[0:1] ==# 'ni'
                                  let l:mode = ['normal']
                                  let l:m = 'ni'
                                else
   57              0.000135       let l:mode = ['normal']
   57              0.000046     endif
   57              0.000422     if index(['Rv', 'no', 'ni', 'ix', 'ic'], l:m) == -1
   57              0.000152       let l:m = l:m[0]
   57              0.000067     endif
   57              0.000312     let w:airline_current_mode = get(g:airline_mode_map, l:m, l:m)
   57              0.000063   else
                                let l:mode = ['inactive']
                                let w:airline_current_mode = get(g:airline_mode_map, '__')
                              endif
                            
   57              0.000254   if g:airline_detect_modified && &modified
                                call add(l:mode, 'modified')
                              endif
                            
   57              0.000105   if g:airline_detect_paste && &paste
                                call add(l:mode, 'paste')
                              endif
                            
   57              0.000303   if g:airline_detect_crypt && exists("+key") && !empty(&key)
                                call add(l:mode, 'crypt')
                              endif
                            
   57              0.000140   if g:airline_detect_spell && &spell
                                call add(l:mode, 'spell')
                              endif
                            
   57              0.000095   if &readonly || ! &modifiable
                                call add(l:mode, 'readonly')
                              endif
                            
   57              0.000240   let mode_string = join(l:mode)
   57              0.000291   if get(w:, 'airline_lastmode', '') != mode_string
                                call airline#highlighter#highlight_modified_inactive(context.bufnr)
                                call airline#highlighter#highlight(l:mode, context.bufnr)
                                call airline#util#doautocmd('AirlineModeChanged')
                                let w:airline_lastmode = mode_string
                              endif
                            
   57              0.000092   return ''

FUNCTION  <SNR>161_update_hg_branch()
Called 57 times
Total time:   0.005047
 Self time:   0.004776

count  total (s)   self (s)
   57   0.001863   0.001592   if airline#util#has_lawrencium()
                                let cmd='LC_ALL=C hg qtop'
                                let stl=lawrencium#statusline()
                                let file=expand('%:p')
                                if !empty(stl) && get(b:, 'airline_do_mq_check', 1)
                                  if g:airline#init#vim_async
                                    noa call airline#async#get_mq_async(cmd, file)
                                  elseif has("nvim")
                                    noa call airline#async#nvim_get_mq_async(cmd, file)
                                  else
                                    " remove \n at the end of the command
                                    let output=system(cmd)[0:-2]
                                    noa call airline#async#mq_output(output, file)
                                  endif
                                endif
                                " do not do mq check anymore
                                let b:airline_do_mq_check = 0
                                if exists("b:mq") && !empty(b:mq)
                                  if stl is# 'default'
                                    " Shorten default a bit
                                    let stl='def'
                                  endif
                                  let stl.=' ['.b:mq.']'
                                endif
                                let s:vcs_config['mercurial'].branch = stl
                              else
   57              0.000167     let s:vcs_config['mercurial'].branch = ''
   57              0.000041   endif

FUNCTION  airline#util#append()
Called 399 times
Total time:   0.004543
 Self time:   0.004543

count  total (s)   self (s)
  399              0.001078   if a:minwidth > 0 && winwidth(0) < a:minwidth
                                return ''
                              endif
  399              0.001313   let prefix = s:spc == "\ua0" ? s:spc : s:spc.s:spc
  399              0.001178   return empty(a:text) ? '' : prefix.g:airline_left_alt_sep.s:spc.a:text

FUNCTION  airline#extensions#branch#update_untracked_config()
Called 57 times
Total time:   0.000914
 Self time:   0.000914

count  total (s)   self (s)
   57              0.000261   if !has_key(s:vcs_config[a:vcs].untracked, a:file)
                                return
                              elseif s:vcs_config[a:vcs].untracked[a:file] != b:buffer_vcs_config[a:vcs].untracked
                                let b:buffer_vcs_config[a:vcs].untracked = s:vcs_config[a:vcs].untracked[a:file]
                                unlet! b:airline_head
                              endif

FUNCTION  airline#extensions#fugitiveline#bufname()
Called 57 times
Total time:   0.005551
 Self time:   0.005551

count  total (s)   self (s)
   57              0.000230   if !exists('b:fugitive_name')
                                let b:fugitive_name = ''
                                try
                                  if bufname('%') =~? '^fugitive:' && exists('*FugitiveReal')
                                    let b:fugitive_name = FugitiveReal(bufname('%'))
                                  elseif exists('b:git_dir')
                                    let buffer = fugitive#buffer()
                                    if buffer.type('blob')
                                      let b:fugitive_name = buffer.repo().translate(buffer.path('/'))
                                    endif
                                  endif
                                catch
                                endtry
                              endif
                            
   57              0.000131   if empty(b:fugitive_name)
   57              0.003865     return fnamemodify(bufname('%'), s:fmod)
                              else
                                return fnamemodify(b:fugitive_name, s:fmod)
                              endif

FUNCTION  <SNR>163_ale_refresh()
Called 2 times
Total time:   0.000022
 Self time:   0.000022

count  total (s)   self (s)
    2              0.000013   if get(g:, 'airline_skip_empty_sections', 0)
                                exe ':AirlineRefresh'
                              endif

FUNCTION  <SNR>115_not_git_dir()
Called 2 times
Total time:   0.000731
 Self time:   0.000158

count  total (s)   self (s)
    2   0.000729   0.000156   return s:dir(a:bufnr) !~ '[/\\]\.git\($\|[/\\]\)'

FUNCTION  airline#util#has_fugitive()
Called 57 times
Total time:   0.000365
 Self time:   0.000365

count  total (s)   self (s)
   57              0.000314   return exists('*fugitive#head') || exists('*FugitiveHead')

FUNCTION  airline#parts#filetype()
Called 57 times
Total time:   0.000369
 Self time:   0.000369

count  total (s)   self (s)
   57              0.000339   return winwidth(0) < 90 && strlen(&filetype) > 3 ? matchstr(&filetype, '...'). (&encoding is? 'utf-8' ? '…' : '>') : &filetype

FUNCTION  airline#parts#iminsert()
Called 57 times
Total time:   0.000442
 Self time:   0.000442

count  total (s)   self (s)
   57              0.000179   if g:airline_detect_iminsert && &iminsert && exists('b:keymap_name')
                                return toupper(b:keymap_name)
                              endif
   57              0.000041   return ''

FUNCTION  <SNR>200_AllowedToCompleteInBuffer()
Called 70 times
Total time:   0.005917
 Self time:   0.005426

count  total (s)   self (s)
   70              0.000512   let buffer_filetype = getbufvar( a:buffer, '&filetype' )
                            
   70              0.000558   if empty( buffer_filetype ) || getbufvar( a:buffer, '&buftype' ) ==# 'nofile' || buffer_filetype ==# 'qf'
                                return 0
                              endif
                            
   70   0.002390   0.001899   if s:DisableOnLargeFile( a:buffer )
                                return 0
                              endif
                            
   70              0.000677   let whitelist_allows = type( g:ycm_filetype_whitelist ) != type( {} ) || has_key( g:ycm_filetype_whitelist, '*' ) || has_key( g:ycm_filetype_whitelist, buffer_filetype )
   70              0.000461   let blacklist_allows = type( g:ycm_filetype_blacklist ) != type( {} ) || !has_key( g:ycm_filetype_blacklist, buffer_filetype )
                            
   70              0.000176   let allowed = whitelist_allows && blacklist_allows
   70              0.000072   if allowed
   70              0.000307     let s:previous_allowed_buffer_number = bufnr( a:buffer )
   70              0.000045   endif
   70              0.000074   return allowed

FUNCTION  gitgutter#utility#is_active()
Called 2 times
Total time:   0.001576
 Self time:   0.000233

count  total (s)   self (s)
    2   0.001573   0.000230   return g:gitgutter_enabled && !pumvisible() && s:is_file_buffer(a:bufnr) && s:exists_file(a:bufnr) && s:not_git_dir(a:bufnr)

FUNCTION  <SNR>196_has_fresh_changes()
Called 2 times
Total time:   0.000155
 Self time:   0.000105

count  total (s)   self (s)
    2   0.000152   0.000102   return getbufvar(a:bufnr, 'changedtick') != gitgutter#utility#getbufvar(a:bufnr, 'tick')

FUNCTION  <SNR>200_DisableOnLargeFile()
Called 70 times
Total time:   0.000491
 Self time:   0.000491

count  total (s)   self (s)
   70              0.000295   if exists( 'b:ycm_largefile' )
   70              0.000107     return b:ycm_largefile
                              endif
                            
                              let threshold = g:ycm_disable_for_files_larger_than_kb * 1024
                              let b:ycm_largefile = threshold > 0 && getfsize( expand( a:buffer ) ) > threshold
                              if b:ycm_largefile
                                exec s:python_command "vimsupport.PostVimMessage(" . "'YouCompleteMe is disabled in this buffer; " . "the file exceeded the max size (see YCM options).' )"
                              endif
                              return b:ycm_largefile

FUNCTION  <SNR>160_get_hunks()
Called 57 times
Total time:   0.010008
 Self time:   0.002756

count  total (s)   self (s)
   57              0.000360   if !exists('b:source_func') || get(b:, 'source_func', '') is# 's:get_hunks_empty'
                                if get(g:, 'loaded_signify') && sy#buffer_is_active()
                                  let b:source_func = 's:get_hunks_signify'
                                elseif exists('*GitGutterGetHunkSummary')
                                  let b:source_func = 's:get_hunks_gitgutter'
                                elseif exists('*changes#GetStats')
                                  let b:source_func = 's:get_hunks_changes'
                                elseif exists('*quickfixsigns#vcsdiff#GetHunkSummary')
                                  let b:source_func = 'quickfixsigns#vcsdiff#GetHunkSummary'
                                else
                                  let b:source_func = 's:get_hunks_empty'
                                endif
                              endif
   57   0.008675   0.001423   return {b:source_func}()

FUNCTION  gitgutter#utility#shellescape()
Called 2 times
Total time:   0.000188
 Self time:   0.000188

count  total (s)   self (s)
    2              0.000179   if a:arg =~ '^[A-Za-z0-9_/.-]\+$'
    2              0.000007     return a:arg
                              elseif s:winshell()
                                return '"' . substitute(substitute(a:arg, '"', '""', 'g'), '%', '"%"', 'g') . '"'
                              else
                                return shellescape(a:arg)
                              endif

FUNCTION  ale#ShouldDoNothing()
Called 31 times
Total time:   0.005748
 Self time:   0.004528

count  total (s)   self (s)
                                " The checks are split into separate if statements to make it possible to
                                " profile each check individually with Vim's profiling tools.
                                "
                                " Do nothing if ALE is disabled.
   31              0.000229     if !getbufvar(a:buffer, 'ale_enabled', get(g:, 'ale_enabled', 0))
                                    return 1
                                endif
                            
                                " Don't perform any checks when newer NeoVim versions are exiting.
   31              0.000178     if get(v:, 'exiting', v:null) isnot v:null
                                    return 1
                                endif
                            
   31              0.000153     let l:filetype = getbufvar(a:buffer, '&filetype')
                            
                                " Do nothing when there's no filetype.
   31              0.000061     if l:filetype is# ''
                                    return 1
                                endif
                            
                                " Do nothing for blacklisted files.
   31              0.000199     if index(get(g:, 'ale_filetype_blacklist', []), l:filetype) >= 0
                                    return 1
                                endif
                            
                                " Do nothing if running from command mode.
   31              0.000166     if s:getcmdwintype_exists && !empty(getcmdwintype())
                                    return 1
                                endif
                            
   31              0.000162     let l:filename = fnamemodify(bufname(a:buffer), ':t')
                            
                                " Do nothing for directories.
   31              0.000084     if l:filename is# '.'
                                    return 1
                                endif
                            
                                " Don't start linting and so on when an operator is pending.
   31   0.000960   0.000722     if ale#util#Mode(1) is# 'no'
                                    return 1
                                endif
                            
                                " Do nothing if running in the sandbox.
   31   0.001092   0.000500     if ale#util#InSandbox()
                                    return 1
                                endif
                            
                                " Do nothing if the file is too large.
   31   0.001024   0.000634     if ale#FileTooLarge(a:buffer)
                                    return 1
                                endif
                            
                                " Do nothing from CtrlP buffers with CtrlP-funky.
   31              0.000314     if exists(':CtrlPFunky') is 2&& getbufvar(a:buffer, '&l:statusline') =~# 'CtrlPMode.*funky'
                                    return 1
                                endif
                            
   31              0.000028     return 0

FUNCTION  airline#extensions#ale#get_error()
Called 57 times
Total time:   0.013919
 Self time:   0.001740

count  total (s)   self (s)
   57   0.013900   0.001721   return airline#extensions#ale#get('error')

FUNCTION  ale#Var()
Called 70 times
Total time:   0.001349
 Self time:   0.001349

count  total (s)   self (s)
   70              0.000259     let l:full_name = 'ale_' . a:variable_name
   70              0.000620     let l:vars = getbufvar(str2nr(a:buffer), '', {})
                            
   70              0.000343     return get(l:vars, l:full_name, g:[l:full_name])

FUNCTION  <SNR>160_get_hunks_gitgutter()
Called 57 times
Total time:   0.007252
 Self time:   0.003084

count  total (s)   self (s)
   57   0.002277   0.001756   if !get(g:, 'gitgutter_enabled', 0) || s:is_branch_empty()
                                return ''
                              endif
   57   0.004812   0.001165   return GitGutterGetHunkSummary()

FUNCTION  ale#util#Mode()
Called 31 times
Total time:   0.000238
 Self time:   0.000238

count  total (s)   self (s)
   31              0.000186     return call('mode', a:000)

FUNCTION  <SNR>107_matchadd()
Called 166 times
Total time:   0.005053
 Self time:   0.005053

count  total (s)   self (s)
  166              0.004878     return matchaddpos(a:hi,a:pos)

FUNCTION  ale#util#FindItemAtCursor()
Called 31 times
Total time:   0.001780
 Self time:   0.001392

count  total (s)   self (s)
   31              0.000195     let l:info = get(g:ale_buffer_info, a:buffer, {})
   31              0.000112     let l:loclist = get(l:info, 'loclist', [])
   31              0.000098     let l:pos = getcurpos()
   31   0.001146   0.000758     let l:index = ale#util#BinarySearch(l:loclist, a:buffer, l:pos[1], l:pos[2])
   31              0.000094     let l:loc = l:index >= 0 ? l:loclist[l:index] : {}
                            
   31              0.000062     return [l:info, l:loc]

FUNCTION  <SNR>164_ws_refresh()
Called 2 times
Total time:   0.000024
 Self time:   0.000024

count  total (s)   self (s)
    2              0.000016   if get(b:, 'airline_ws_changedtick', 0) == b:changedtick
    2              0.000003     return
                              endif
                              unlet! b:airline_whitespace_check
                              if get(g:, 'airline_skip_empty_sections', 0)
                                exe ':AirlineRefresh'
                              endif
                              let b:airline_ws_changedtick = b:changedtick

FUNCTION  ale#FileTooLarge()
Called 31 times
Total time:   0.000390
 Self time:   0.000390

count  total (s)   self (s)
   31              0.000212     let l:max = getbufvar(a:buffer, 'ale_maximum_file_size', get(g:, 'ale_maximum_file_size', 0))
                            
   31              0.000124     return l:max > 0 ? (line2byte(line('$') + 1) > l:max) : 0

FUNCTION  ale#engine#IsCheckingBuffer()
Called 114 times
Total time:   0.001651
 Self time:   0.001651

count  total (s)   self (s)
  114              0.000620     let l:info = get(g:ale_buffer_info, a:buffer, {})
                            
  114              0.000857     return !empty(get(l:info, 'active_linter_list', []))   || !empty(get(l:info, 'active_other_sources_list', []))

FUNCTION  FugitiveGitDir()
Called 57 times
Total time:   0.000358
 Self time:   0.000358

count  total (s)   self (s)
   57              0.000108   if !a:0 || a:1 ==# -1
   57              0.000179     return get(b:, 'git_dir', '')
                              elseif type(a:1) == type(0)
                                return getbufvar(a:1, 'git_dir')
                              elseif type(a:1) == type('')
                                return substitute(s:Slash(a:1), '/$', '', '')
                              else
                                return ''
                              endif

FUNCTION  airline#extensions#ale#get()
Called 114 times
Total time:   0.024978
 Self time:   0.017408

count  total (s)   self (s)
  114              0.000507   if !exists(':ALELint')
                                return ''
                              endif
                            
  114              0.000444   let error_symbol = get(g:, 'airline#extensions#ale#error_symbol', 'E:')
  114              0.000419   let warning_symbol = get(g:, 'airline#extensions#ale#warning_symbol', 'W:')
  114              0.000400   let checking_symbol = get(g:, 'airline#extensions#ale#checking_symbol', '...')
  114              0.000380   let show_line_numbers = get(g:, 'airline#extensions#ale#show_line_numbers', 1)
                            
  114              0.000247   let is_err = a:type ==# 'error'
                            
  114   0.004290   0.002639   if ale#engine#IsCheckingBuffer(bufnr('')) == 1
                                return is_err ? '' : checking_symbol
                              endif
                            
  114              0.000269   let symbol = is_err ? error_symbol : warning_symbol
                            
  114   0.007696   0.002479   let counts = ale#statusline#Count(bufnr(''))
  114              0.000591   if type(counts) == type({}) && has_key(counts, 'error')
                                " Use the current Dictionary format.
  114              0.000294     let errors = counts.error + counts.style_error
  114              0.000271     let num = is_err ? errors : counts.total - errors
  114              0.000099   else
                                " Use the old List format.
                                let num = is_err ? counts[0] : counts[1]
                              endif
                            
  114              0.000150   if show_line_numbers == 1
  114   0.007394   0.006692     return s:airline_ale_count(num, symbol) . <sid>airline_ale_get_line_number(num, a:type)
                              else
                                return s:airline_ale_count(num, symbol)
                              endif

FUNCTION  airline#util#wrap()
Called 570 times
Total time:   0.003620
 Self time:   0.003620

count  total (s)   self (s)
  570              0.001674   if a:minwidth > 0 && winwidth(0) < a:minwidth
                                return ''
                              endif
  570              0.000623   return a:text

FUNCTION  ale#statusline#Count()
Called 114 times
Total time:   0.005217
 Self time:   0.002866

count  total (s)   self (s)
                                " The Dictionary is copied here before exposing it to other plugins.
  114   0.005067   0.002716     return copy(s:GetCounts(a:buffer))

FUNCTION  ObsessionStatus()
Called 57 times
Total time:   0.002388
 Self time:   0.002388

count  total (s)   self (s)
   57              0.000247   let args = copy(a:000)
   57              0.000324   let numeric = !empty(v:this_session) + exists('g:this_obsession')
   57              0.000264   if type(get(args, 0, '')) == type(0)
                                if !remove(args, 0)
                                  return ''
                                endif
                              endif
   57              0.000086   if empty(args)
                                let args = ['[$]', '[S]']
                              endif
   57              0.000121   if len(args) == 1 && numeric == 1
                                let fmt = args[0]
                              else
   57              0.000176     let fmt = get(args, 2-numeric, '')
   57              0.000043   endif
   57              0.000516   return substitute(fmt, '%s', get(['', 'Session', 'Obsession'], numeric), 'g')

FUNCTION  ale#util#BinarySearch()
Called 31 times
Total time:   0.000388
 Self time:   0.000388

count  total (s)   self (s)
   31              0.000053     let l:min = 0
   31              0.000120     let l:max = len(a:loclist) - 1
                            
   31              0.000055     while 1
   31              0.000055         if l:max < l:min
   31              0.000034             return -1
                                    endif
                            
                                    let l:mid = (l:min + l:max) / 2
                                    let l:item = a:loclist[l:mid]
                            
                                    " Binary search for equal buffers, equal lines, then near columns.
                                    if l:item.bufnr < a:buffer
                                        let l:min = l:mid + 1
                                    elseif l:item.bufnr > a:buffer
                                        let l:max = l:mid - 1
                                    elseif l:item.lnum < a:line
                                        let l:min = l:mid + 1
                                    elseif l:item.lnum > a:line
                                        let l:max = l:mid - 1
                                    else
                                        " This part is a small sequential search.
                                        let l:index = l:mid
                            
                                        " Search backwards to find the first problem on the line.
                                        while l:index > 0&& a:loclist[l:index - 1].bufnr == a:buffer&& a:loclist[l:index - 1].lnum == a:line
                                            let l:index -= 1
                                        endwhile
                            
                                        " Find the last problem on or before this column.
                                        while l:index < l:max&& a:loclist[l:index + 1].bufnr == a:buffer&& a:loclist[l:index + 1].lnum == a:line&& a:loclist[l:index + 1].col <= a:column
                                            let l:index += 1
                                        endwhile
                            
                                        " Scan forwards to find the last item on the column for the item
                                        " we found, which will have the most serious problem.
                                        let l:item_column = a:loclist[l:index].col
                            
                                        while l:index < l:max&& a:loclist[l:index + 1].bufnr == a:buffer&& a:loclist[l:index + 1].lnum == a:line&& a:loclist[l:index + 1].col == l:item_column
                                            let l:index += 1
                                        endwhile
                            
                                        return l:index
                                    endif
                                endwhile

FUNCTION  FugitiveHead()
Called 57 times
Total time:   0.011319
 Self time:   0.002325

count  total (s)   self (s)
   57   0.001556   0.001198   let dir = FugitiveGitDir(a:0 > 1 ? a:2 : -1)
   57              0.000125   if empty(dir)
                                return ''
                              endif
   57   0.009478   0.000842   return fugitive#Head(a:0 ? a:1 : 0, dir)

FUNCTION  airline#parts#ffenc()
Called 57 times
Total time:   0.001524
 Self time:   0.001524

count  total (s)   self (s)
   57              0.000281   let expected = get(g:, 'airline#parts#ffenc#skip_expected_string', '')
   57              0.000123   let bomb     = &l:bomb ? '[BOM]' : ''
   57              0.000469   let ff       = strlen(&ff) ? '['.&ff.']' : ''
   57              0.000267   if expected is# &fenc.bomb.ff
                                return ''
                              else
   57              0.000196     return &fenc.bomb.ff
                              endif

FUNCTION  <SNR>115_dir()
Called 2 times
Total time:   0.000573
 Self time:   0.000155

count  total (s)   self (s)
    2   0.000571   0.000153   return gitgutter#utility#shellescape(fnamemodify(s:abs_path(a:bufnr, 0), ':h'))

FUNCTION  airline#util#ignore_buf()
Called 57 times
Total time:   0.002996
 Self time:   0.002996

count  total (s)   self (s)
   57              0.000512   let pat = '\c\v'. get(g:, 'airline#ignore_bufadd_pat', ''). get(g:, 'airline#extensions#tabline#ignore_bufadd_pat',  'gundo|undotree|vimfiler|tagbar|nerd_tree|startify|!')
   57              0.002419   return match(a:name, pat) > -1

FUNCTION  <SNR>163_airline_ale_count()
Called 114 times
Total time:   0.000334
 Self time:   0.000334

count  total (s)   self (s)
  114              0.000281   return a:cnt ? a:symbol. a:cnt : ''

FUNCTION  airline#parts#paste()
Called 57 times
Total time:   0.000203
 Self time:   0.000203

count  total (s)   self (s)
   57              0.000163   return g:airline_detect_paste && &paste ? g:airline_symbols.paste : ''

FUNCTION  PoppyInit()
Called 70 times
Total time:   2.174514
 Self time:   0.006555

count  total (s)   self (s)
   70   2.174318   0.006359   let s:pos = getpos('.')[1:2] | let w:poppies = get(w:,'poppies',[]) | silent! call filter(w:poppies,'matchdelete(v:val)>0') | call s:highpat()

FUNCTION  <SNR>107_endpart()
Called 1252 times
Total time:   1.228596
 Self time:   0.633205

count  total (s)   self (s)
 1252              0.013018   let i = stridx('[({',getline('.')[col('.')-1])
 1252   1.172588   0.582250   let p = searchpairpos('\V'.'[({'[i],'','\V'.'])}'[i],'nW',"s:SynAt(line('.'),col('.')) =~? 'regex\\|comment\\|string'" ,a:b,300)
 1252              0.017387   if p[0] && (line2byte(p[0])+p[1] > line2byte(s:pos[0]) + s:pos[1] || get(g:,'poppy_point_enable') && p == s:pos)
  166   0.011917   0.006864     let w:poppies += [s:matchadd(remove(add(s:poppyhigh,s:poppyhigh[0]),0), [getpos('.')[1:2],p])]
  166              0.000212   else
 1086              0.001216     return 1
                              endif

FUNCTION  airline#parts#readonly()
Called 57 times
Total time:   0.005129
 Self time:   0.002133

count  total (s)   self (s)
                              " only consider regular buffers (e.g. ones that represent actual files,
                              " but not special ones like e.g. NERDTree)
   57   0.004496   0.001500   if !empty(&buftype) || airline#util#ignore_buf(bufname('%'))
                                return ''
                              endif
   57              0.000157   if &readonly && !filereadable(bufname('%'))
                                return '[noperm]'
                              else
   57              0.000109     return &readonly ? g:airline_symbols.readonly : ''
                              endif

FUNCTION  fugitive#Head()
Called 57 times
Total time:   0.008636
 Self time:   0.008636

count  total (s)   self (s)
   57              0.000187   let dir = a:0 > 1 ? a:2 : get(b:, 'git_dir', '')
   57              0.003506   if empty(dir) || !filereadable(dir . '/HEAD')
                                return ''
                              endif
   57              0.002444   let head = readfile(dir . '/HEAD')[0]
   57              0.000486   if head =~# '^ref: '
   57              0.001742     return substitute(head, '\C^ref: \%(refs/\%(heads/\|remotes/\|tags/\)\=\)\=', '', '')
                              elseif head =~# '^\x\{40\}$'
                                let len = a:0 ? a:1 : 0
                                return len < 0 ? head : len ? head[0:len-1] : ''
                              else
                                return ''
                              endif

FUNCTION  <SNR>163_airline_ale_get_line_number()
Called 114 times
Total time:   0.000368
 Self time:   0.000368

count  total (s)   self (s)
  114              0.000177   if a:cnt == 0
  114              0.000103     return ''
                              endif
                            
                              let buffer       = bufnr('')
                              let problem_type = (a:type ==# 'error') ? 'E' : 'W'
                              let problems     = copy(ale#engine#GetLoclist(buffer))
                            
                              call filter(problems, 'v:val.bufnr is buffer && v:val.type is# problem_type')
                            
                              if empty(problems)
                                return ''
                              endif
                            
                              let open_lnum_symbol  = get(g:, 'airline#extensions#ale#open_lnum_symbol', '(L')
                              let close_lnum_symbol = get(g:, 'airline#extensions#ale#close_lnum_symbol', ')')
                            
                              return open_lnum_symbol . problems[0].lnum . close_lnum_symbol

FUNCTION  airline#extensions#obsession#get_status()
Called 57 times
Total time:   0.003443
 Self time:   0.001055

count  total (s)   self (s)
   57   0.003406   0.001018   return ObsessionStatus((g:airline#extensions#obsession#indicator_text . s:spc), '')

FUNCTION  airline#parts#mode()
Called 57 times
Total time:   0.002547
 Self time:   0.001433

count  total (s)   self (s)
   57   0.002506   0.001392   return airline#util#shorten(get(w:, 'airline_current_mode', ''), 79, 1)

FUNCTION  <SNR>107_SynAt()
Called 6766 times
Total time:   1.337025
 Self time:   1.337025

count  total (s)   self (s)
 6766              0.031534   let pos = a:l.','.a:c
 6766              0.021676   if !has_key(s:synid_cache,pos)
 4088              1.241168     let s:synid_cache[pos] = synIDattr(synID(a:l,a:c,0),'name')
 4088              0.007544   endif
 6766              0.014228   return s:synid_cache[pos]

FUNCTION  airline#parts#spell()
Called 57 times
Total time:   0.001641
 Self time:   0.001641

count  total (s)   self (s)
   57              0.000748   let spelllang = g:airline_detect_spelllang ? printf(" [%s]", toupper(substitute(&spelllang, ',', '/', 'g'))) : ''
   57              0.000098   if g:airline_detect_spell && &spell
                                if winwidth(0) >= 90
                                  return g:airline_symbols.spell . spelllang
                                elseif winwidth(0) >= 70
                                  return g:airline_symbols.spell
                                else
                                  return split(g:airline_symbols.spell, '\zs')[0]
                                endif
                              endif
   57              0.000048   return ''

FUNCTION  gitgutter#hunk#summary()
Called 57 times
Total time:   0.002324
 Self time:   0.001525

count  total (s)   self (s)
   57   0.002263   0.001464   return gitgutter#utility#getbufvar(a:bufnr, 'summary', [0,0,0])

FUNCTION  airline#extensions#whitespace#check()
Called 57 times
Total time:   0.008557
 Self time:   0.007632

count  total (s)   self (s)
   57              0.000253   let max_lines = get(g:, 'airline#extensions#whitespace#max_lines', 20000)
   57              0.000359   if &readonly || !&modifiable || !s:enabled || line('$') > max_lines || get(b:, 'airline_whitespace_disabled', 0)
                                return ''
                              endif
   57              0.000343   let skip_check_ft = extend(s:skip_check_ft, get(g:, 'airline#extensions#whitespace#skip_indent_check_ft', {}), 'force')
                            
   57              0.000219   if !exists('b:airline_whitespace_check')
                                let b:airline_whitespace_check = ''
                                let checks = get(b:, 'airline_whitespace_checks', get(g:, 'airline#extensions#whitespace#checks', s:default_checks))
                            
                                let trailing = 0
                                let check = 'trailing'
                                if index(checks, check) > -1 && index(get(skip_check_ft, &ft, []), check) < 0
                                  try
                                    let regexp = get(g:, 'airline#extensions#whitespace#trailing_regexp', '\s$')
                                    let trailing = search(regexp, 'nw')
                                  catch
                                    call airline#util#warning(printf('Whitespace: error occurred evaluating "%s"', regexp))
                                    echomsg v:exception
                                    return ''
                                  endtry
                                endif
                            
                                let mixed = 0
                                let check = 'indent'
                                if index(checks, check) > -1 && index(get(skip_check_ft, &ft, []), check) < 0
                                  let mixed = s:check_mixed_indent()
                                endif
                            
                                let mixed_file = ''
                                let check = 'mixed-indent-file'
                                if index(checks, check) > -1 && index(get(skip_check_ft, &ft, []), check) < 0
                                  let mixed_file = s:check_mixed_indent_file()
                                endif
                            
                                let long = 0
                                if index(checks, 'long') > -1 && &tw > 0
                                  let long = search('\%>'.&tw.'v.\+', 'nw')
                                endif
                            
                                if trailing != 0 || mixed != 0 || long != 0 || !empty(mixed_file)
                                  let b:airline_whitespace_check = s:symbol
                                  if strlen(s:symbol) > 0
                                    let space = (g:airline_symbols.space)
                                  else
                                    let space = ''
                                  endif
                            
                                  if s:show_message
                                    if trailing != 0
                                      let trailing_fmt = get(g:, 'airline#extensions#whitespace#trailing_format', '[%s]trailing')
                                      let b:airline_whitespace_check .= space.printf(trailing_fmt, trailing)
                                    endif
                                    if mixed != 0
                                      let mixed_indent_fmt = get(g:, 'airline#extensions#whitespace#mixed_indent_format', '[%s]mixed-indent')
                                      let b:airline_whitespace_check .= space.printf(mixed_indent_fmt, mixed)
                                    endif
                                    if long != 0
                                      let long_fmt = get(g:, 'airline#extensions#whitespace#long_format', '[%s]long')
                                      let b:airline_whitespace_check .= space.printf(long_fmt, long)
                                    endif
                                    if !empty(mixed_file)
                                      let mixed_indent_file_fmt = get(g:, 'airline#extensions#whitespace#mixed_indent_file_format', '[%s]mix-indent-file')
                                      let b:airline_whitespace_check .= space.printf(mixed_indent_file_fmt, mixed_file)
                                    endif
                                  endif
                                endif
                              endif
   57   0.002158   0.001233   return airline#util#shorten(b:airline_whitespace_check, 120, 9)

FUNCTION  <SNR>107_highpat()
Called 70 times
Total time:   2.167959
 Self time:   0.192676

count  total (s)   self (s)
   70              0.003197   let s:synid_cache = {}
   70              0.000483   let stoplinebottom = line('w$')
   70              0.000227   let stoplinetop = line('w0')
   70              0.000792   let s:poppyhigh = deepcopy(g:poppyhigh)
   70              0.000598   let inc = get(g:,'poppy_point_enable') && getline('.')[col('.')-1] =~ '[[({]' ? 'c' : ''
   70   2.162352   0.187069   call searchpair('\m[[({]','','noop',inc.(len(g:poppyhigh) > 1 ? 'r' : '').'nbW',"getline('.')[col('.')-1] == 'n' ||" ."s:SynAt(line('.'),col('.')) =~? 'regex\\|comment\\|string' ||" ."s:endpart(".stoplinebottom.")",stoplinetop,30)

FUNCTION  ale#util#InSandbox()
Called 31 times
Total time:   0.000592
 Self time:   0.000548

count  total (s)   self (s)
   31              0.000044     try
   31   0.000295   0.000251         let &l:equalprg=&l:equalprg
   31              0.000061     catch /E48/
                                    " E48 is the sandbox error.
                                    return 1
                                endtry
                            
   31              0.000029     return 0

FUNCTION  airline#parts#crypt()
Called 57 times
Total time:   0.000385
 Self time:   0.000385

count  total (s)   self (s)
   57              0.000347   return g:airline_detect_crypt && exists("+key") && !empty(&key) ? g:airline_symbols.crypt : ''

FUNCTION  airline#extensions#keymap#status()
Called 57 times
Total time:   0.000814
 Self time:   0.000814

count  total (s)   self (s)
   57              0.000396   if (get(g:, 'airline#extensions#keymap#enabled', 1) && has('keymap'))
   57              0.000341     return printf('%s', (!empty(&keymap) ? (g:airline_symbols.keymap . ' '. &keymap) : ''))
                              else
                                return ''
                              endif

FUNCTION  airline#extensions#branch#head()
Called 57 times
Total time:   0.040295
 Self time:   0.003541

count  total (s)   self (s)
   57              0.000204   if !exists('b:buffer_vcs_config')
                                call s:init_buffer()
                              endif
                            
   57   0.026758   0.001251   call s:update_branch()
   57   0.012594   0.001347   call s:update_untracked()
                            
   57              0.000272   if exists('b:airline_head') && !empty(b:airline_head)
   57              0.000081     return b:airline_head
                              endif
                            
                              let b:airline_head = ''
                              let vcs_priority = get(g:, "airline#extensions#branch#vcs_priority", ["git", "mercurial"])
                            
                              let heads = []
                              for vcs in vcs_priority
                                if !empty(b:buffer_vcs_config[vcs].branch)
                                  let heads += [vcs]
                                endif
                              endfor
                            
                              for vcs in heads
                                if !empty(b:airline_head)
                                  let b:airline_head .= ' | '
                                endif
                                if len(heads) > 1
                                  let b:airline_head .= s:vcs_config[vcs].exe .':'
                                endif
                                let b:airline_head .= s:format_name({s:vcs_config[vcs].display_branch}())
                                let b:airline_head .= b:buffer_vcs_config[vcs].untracked
                              endfor
                            
                              if empty(heads)
                                if airline#util#has_vcscommand()
                                  noa call VCSCommandEnableBufferSetup()
                                  if exists('b:VCSCommandBufferInfo')
                                    let b:airline_head = s:format_name(get(b:VCSCommandBufferInfo, 0, ''))
                                  endif
                                endif
                              endif
                            
                              if empty(heads)
                                if airline#util#has_custom_scm()
                                  try
                                    let Fn = function(g:airline#extensions#branch#custom_head)
                                    let b:airline_head = Fn()
                                  endtry
                                endif
                              endif
                            
                              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)].(&encoding ==? 'utf-8' ?  '…' : '.')
                                endif
                              endif
                            
                              let minwidth = empty(get(b:, 'airline_hunks', '')) ? 14 : 7
                              let b:airline_head = airline#util#shorten(b:airline_head, 120, minwidth)
                              return b:airline_head

FUNCTION  <SNR>200_OnCursorMovedNormalMode()
Called 70 times
Total time:   0.171073
 Self time:   0.162785

count  total (s)   self (s)
   70   0.010886   0.002598   if !s:AllowedToCompleteInCurrentBuffer()
                                return
                              endif
                            
   70              0.159943   exec s:python_command "ycm_state.OnCursorMoved()"

FUNCTION  <SNR>115_exists_file()
Called 2 times
Total time:   0.000572
 Self time:   0.000158

count  total (s)   self (s)
    2   0.000571   0.000157   return filereadable(s:abs_path(a:bufnr, 0))

FUNCTION  GitGutterGetHunkSummary()
Called 57 times
Total time:   0.003647
 Self time:   0.001323

count  total (s)   self (s)
   57   0.003602   0.001278   return gitgutter#hunk#summary(winbufnr(0))

FUNCTION  <SNR>161_update_git_branch()
Called 57 times
Total time:   0.014768
 Self time:   0.003084

count  total (s)   self (s)
   57   0.001590   0.001225   if !airline#util#has_fugitive()
                                let s:vcs_config['git'].branch = ''
                                return
                              endif
                            
   57   0.012435   0.001116   let s:vcs_config['git'].branch = exists("*FugitiveHead") ? FugitiveHead(s:sha1size) : fugitive#head(s:sha1size)
   57              0.000253   if s:vcs_config['git'].branch is# 'master' && winwidth(0) < 81
                                " Shorten default a bit
                                let s:vcs_config['git'].branch='mas'
                              endif

FUNCTION  <SNR>200_AllowedToCompleteInCurrentBuffer()
Called 70 times
Total time:   0.008288
 Self time:   0.002371

count  total (s)   self (s)
   70   0.008234   0.002317   return s:AllowedToCompleteInBuffer( '%' )

FUNCTION  airline#statusline()
Called 57 times
Total time:   0.001380
 Self time:   0.001380

count  total (s)   self (s)
   57              0.000720   if has_key(s:contexts, a:winnr)
   57              0.000499     return '%{airline#check_mode('.a:winnr.')}'.s:contexts[a:winnr].line
                              endif
                            
                              " in rare circumstances this happens...see #276
                              return ''

FUNCTION  <SNR>161_update_branch()
Called 57 times
Total time:   0.025507
 Self time:   0.005692

count  total (s)   self (s)
  171              0.000472   for vcs in keys(s:vcs_config)
  114   0.023171   0.003356     call {s:vcs_config[vcs].update_branch}()
  114              0.000570     if b:buffer_vcs_config[vcs].branch != s:vcs_config[vcs].branch
                                  let b:buffer_vcs_config[vcs].branch = s:vcs_config[vcs].branch
                                  unlet! b:airline_head
                                endif
  114              0.000099   endfor

FUNCTION  ale#cursor#EchoCursorWarning()
Called 31 times
Total time:   0.011087
 Self time:   0.003559

count  total (s)   self (s)
   31              0.000259     let l:buffer = bufnr('')
                            
   31              0.000086     if !g:ale_echo_cursor && !g:ale_cursor_detail
                                    return
                                endif
                            
                                " Only echo the warnings in normal mode, otherwise we will get problems.
   31              0.000115     if mode(1) isnot# 'n'
                                    return
                                endif
                            
   31   0.006526   0.000778     if ale#ShouldDoNothing(l:buffer)
                                    return
                                endif
                            
   31   0.002588   0.000808     let [l:info, l:loc] = ale#util#FindItemAtCursor(l:buffer)
                            
   31              0.000054     if g:ale_echo_cursor
   31              0.000067         if !empty(l:loc)
                                        let l:format = ale#Var(l:buffer, 'echo_msg_format')
                                        let l:msg = ale#GetLocItemMessage(l:loc, l:format)
                                        call ale#cursor#TruncatedEcho(l:msg)
                                        let l:info.echoed = 1
                                    elseif get(l:info, 'echoed')
                                        " We'll only clear the echoed message when moving off errors once,
                                        " so we don't continually clear the echo line.
                                        execute 'echo'
                                        let l:info.echoed = 0
                                    endif
   31              0.000026     endif
                            
   31              0.000045     if g:ale_cursor_detail
                                    if !empty(l:loc)
                                        call s:ShowCursorDetailForItem(l:loc, {'stay_here': 1})
                                    else
                                        call ale#preview#CloseIfTypeMatches('ale-preview')
                                    endif
                                endif

FUNCTION  airline#util#has_lawrencium()
Called 57 times
Total time:   0.000271
 Self time:   0.000271

count  total (s)   self (s)
   57              0.000239   return exists('*lawrencium#statusline')

FUNCTION  airline#util#shorten()
Called 114 times
Total time:   0.002039
 Self time:   0.002039

count  total (s)   self (s)
  114              0.000643   if winwidth(0) < a:winwidth && len(split(a:text, '\zs')) > a:minwidth
                                if get(a:000, 0, 0)
                                  " shorten from tail
                                  return '…'.matchstr(a:text, '.\{'.a:minwidth.'}$')
                                else
                                  " shorten from beginning of string
                                  return matchstr(a:text, '^.\{'.a:minwidth.'}').'…'
                                endif
                              else
  114              0.000144     return a:text
                              endif

FUNCTION  airline#extensions#branch#get_head()
Called 57 times
Total time:   0.042987
 Self time:   0.002692

count  total (s)   self (s)
   57   0.041892   0.001597   let head = airline#extensions#branch#head()
   57              0.000244   let empty_message = get(g:, 'airline#extensions#branch#empty_message', '')
   57              0.000271   let symbol = get(g:, 'airline#extensions#branch#symbol', g:airline_symbols.branch)
   57              0.000484   return empty(head) ? empty_message : printf('%s%s', empty(symbol) ? '' : symbol.(g:airline_symbols.space), head)

FUNCTION  airline#extensions#hunks#get_hunks()
Called 57 times
Total time:   0.016614
 Self time:   0.006606

count  total (s)   self (s)
   57              0.000211   if !get(w:, 'airline_active', 0)
                                return ''
                              endif
                              " Cache values, so that it isn't called too often
   57              0.000958   if exists("b:airline_hunks") && get(b:,  'airline_changenr', 0) == b:changedtick && winwidth(0) == get(s:, 'airline_winwidth', 0) && get(b:, 'source_func', '') isnot# 's:get_hunks_signify' && get(b:, 'source_func', '') isnot# 's:get_hunks_gitgutter' && get(b:, 'source_func', '') isnot# 's:get_hunks_empty' && get(b:, 'source_func', '') isnot# 's:get_hunks_changes'
                                return b:airline_hunks
                              endif
   57   0.011227   0.001219   let hunks = s:get_hunks()
   57              0.000087   let string = ''
   57              0.000116   if !empty(hunks)
  228              0.000384     for i in [0, 1, 2]
  171              0.000527       if (s:non_zero_only == 0 && winwidth(0) > 100) || hunks[i] > 0
  171              0.001044         let string .= printf('%s%s ', s:hunk_symbols[i], hunks[i])
  171              0.000121       endif
  171              0.000560     endfor
   57              0.000042   endif
   57              0.000116   let b:airline_hunks = string
   57              0.000112   let b:airline_changenr = b:changedtick
   57              0.000123   let s:airline_winwidth = winwidth(0)
   57              0.000068   return string

FUNCTION  <SNR>161_update_untracked()
Called 57 times
Total time:   0.011247
 Self time:   0.010333

count  total (s)   self (s)
   57              0.003603   let file = expand("%:p")
   57              0.000549   if empty(file) || isdirectory(file)
                                return
                              endif
                            
   57              0.000113   let needs_update = 1
  171              0.000394   for vcs in keys(s:vcs_config)
  114              0.000686     if file =~ s:vcs_config[vcs].exclude
                                  " Skip check for files that live in the exclude directory
                                  let needs_update = 0
                                endif
  114              0.000400     if has_key(s:vcs_config[vcs].untracked, file)
   57              0.000083       let needs_update = 0
   57   0.003658   0.002744       call airline#extensions#branch#update_untracked_config(file, vcs)
   57              0.000040     endif
  114              0.000073   endfor
                            
   57              0.000070   if !needs_update
   57              0.000049     return
                              endif
                            
                              for vcs in keys(s:vcs_config)
                                let config = s:vcs_config[vcs]
                                if g:airline#init#vim_async
                                  " Note that asynchronous update updates s:vcs_config only, and only
                                  " s:update_untracked updates b:buffer_vcs_config. If s:vcs_config is
                                  " invalidated again before s:update_untracked is called, then we lose the
                                  " result of the previous call, i.e. the head string is not updated. It
                                  " doesn't happen often in practice, so we let it be.
                                  noa call airline#async#vim_vcs_untracked(config, file)
                                else
                                  " nvim async or vim without job-feature
                                  noa call airline#async#nvim_vcs_untracked(config, file, vcs)
                                endif
                              endfor

FUNCTION  gitgutter#utility#getbufvar()
Called 59 times
Total time:   0.000849
 Self time:   0.000849

count  total (s)   self (s)
   59              0.000453   let dict = get(getbufvar(a:buffer, ''), 'gitgutter', {})
   59              0.000192   if has_key(dict, a:varname)
   59              0.000116     return dict[a:varname]
                              else
                                if a:0
                                  return a:1
                                endif
                              endif

FUNCTION  <SNR>201_StopCursorTimer()
Called 72 times
Total time:   0.000936
 Self time:   0.000936

count  total (s)   self (s)
   72              0.000195     if s:cursor_timer != -1
   70              0.000301         call timer_stop(s:cursor_timer)
   70              0.000146         let s:cursor_timer = -1
   70              0.000057     endif

FUNCTION  airline#util#prepend()
Called 114 times
Total time:   0.000893
 Self time:   0.000893

count  total (s)   self (s)
  114              0.000292   if a:minwidth > 0 && winwidth(0) < a:minwidth
                                return ''
                              endif
  114              0.000332   return empty(a:text) ? '' : a:text.s:spc.g:airline_right_alt_sep.s:spc

FUNCTION  <SNR>160_is_branch_empty()
Called 57 times
Total time:   0.000521
 Self time:   0.000521

count  total (s)   self (s)
   57              0.000471   return exists('*airline#extensions#branch#head') && empty(get(b:, 'airline_head', ''))

FUNCTION  ale#cursor#EchoCursorWarningWithDelay()
Called 72 times
Total time:   0.008525
 Self time:   0.006240

count  total (s)   self (s)
   72              0.000406     let l:buffer = bufnr('')
                            
   72              0.000176     if !g:ale_echo_cursor && !g:ale_cursor_detail
                                    return
                                endif
                            
                                " Only echo the warnings in normal mode, otherwise we will get problems.
   72              0.000305     if mode(1) isnot# 'n'
                                    return
                                endif
                            
   72   0.002865   0.001929     call s:StopCursorTimer()
                            
   72              0.000487     let l:pos = getcurpos()[0:2]
                            
                                " Check the current buffer, line, and column number against the last
                                " recorded position. If the position has actually changed, *then*
                                " we should echo something. Otherwise we can end up doing processing
                                " the echo message far too frequently.
   72              0.000201     if l:pos != s:last_pos
   70   0.002373   0.001024         let l:delay = ale#Var(l:buffer, 'echo_delay')
                            
   70              0.000212         let s:last_pos = l:pos
   70              0.000454         let s:cursor_timer = timer_start(   l:delay,   function('ale#cursor#EchoCursorWarning'))
   70              0.000059     endif

FUNCTION  <SNR>115_is_file_buffer()
Called 2 times
Total time:   0.000040
 Self time:   0.000040

count  total (s)   self (s)
    2              0.000035   return empty(getbufvar(a:bufnr, '&buftype'))

FUNCTION  airline#extensions#ale#get_warning()
Called 57 times
Total time:   0.014572
 Self time:   0.001773

count  total (s)   self (s)
   57   0.014522   0.001723   return airline#extensions#ale#get('warning')

FUNCTIONS SORTED ON TOTAL TIME
count  total (s)   self (s)  function
   70   2.174514   0.006555  PoppyInit()
   70   2.167959   0.192676  <SNR>107_highpat()
 6766   1.337025             <SNR>107_SynAt()
 1252   1.228596   0.633205  <SNR>107_endpart()
   70   0.171073   0.162785  <SNR>200_OnCursorMovedNormalMode()
   57   0.042987   0.002692  airline#extensions#branch#get_head()
   57   0.040295   0.003541  airline#extensions#branch#head()
   57   0.025507   0.005692  <SNR>161_update_branch()
  114   0.024978   0.017408  airline#extensions#ale#get()
   57   0.016614   0.006606  airline#extensions#hunks#get_hunks()
   57   0.014768   0.003084  <SNR>161_update_git_branch()
   57   0.014572   0.001773  airline#extensions#ale#get_warning()
   57   0.013919   0.001740  airline#extensions#ale#get_error()
   70   0.011501             <SNR>128_Highlight_Matching_Pair()
   57   0.011319   0.002325  FugitiveHead()
   57   0.011247   0.010333  <SNR>161_update_untracked()
   31   0.011087   0.003559  ale#cursor#EchoCursorWarning()
   57   0.010008   0.002756  <SNR>160_get_hunks()
   57   0.008636             fugitive#Head()
   57   0.008557   0.007632  airline#extensions#whitespace#check()

FUNCTIONS SORTED ON SELF TIME
count  total (s)   self (s)  function
 6766              1.337025  <SNR>107_SynAt()
 1252   1.228596   0.633205  <SNR>107_endpart()
   70   2.167959   0.192676  <SNR>107_highpat()
   70   0.171073   0.162785  <SNR>200_OnCursorMovedNormalMode()
  114   0.024978   0.017408  airline#extensions#ale#get()
   70              0.011501  <SNR>128_Highlight_Matching_Pair()
   57   0.011247   0.010333  <SNR>161_update_untracked()
   57              0.008636  fugitive#Head()
   57              0.008233  airline#check_mode()
   57   0.008557   0.007632  airline#extensions#whitespace#check()
   57   0.016614   0.006606  airline#extensions#hunks#get_hunks()
   70   2.174514   0.006555  PoppyInit()
   72   0.008525   0.006240  ale#cursor#EchoCursorWarningWithDelay()
   57   0.025507   0.005692  <SNR>161_update_branch()
   57              0.005551  airline#extensions#fugitiveline#bufname()
   70   0.005917   0.005426  <SNR>200_AllowedToCompleteInBuffer()
  166              0.005053  <SNR>107_matchadd()
   57   0.005047   0.004776  <SNR>161_update_hg_branch()
  399              0.004543  airline#util#append()
   31   0.005748   0.004528  ale#ShouldDoNothing()

Informative: change colors

Just a simple example for folks that haven't done much vimscript.

  • Edit your ~/.vimrc and paste the following to change the colors

" testing poppy instead of rainbowparentheses: https://github.com/bounceme/poppy.vim
au! cursormoved * call PoppyInit()
" ColorColumn = white
" Constant = Red
" rubyRegexpSpecial = purple
" Special = Green
" Function = Yellow
let g:poppyhigh = ['Constant', 'rubyRegexpSpecial', 'Special', 'Function', 'rubyModule']

  • Note: The strings 'Constant' etc. are highlight groups, and you can get a list of available highlight groups by simply typing :hi in vim (colon hi - in case the editor mangles that).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.