Skip to content

Instantly share code, notes, and snippets.

@aaronjensen
Created May 21, 2015 07:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronjensen/28a14a2e07bf7c70b379 to your computer and use it in GitHub Desktop.
Save aaronjensen/28a14a2e07bf7c70b379 to your computer and use it in GitHub Desktop.
FUNCTION neocomplete#handler#_on_write_post()
Called 1 time
Total time: 0.000068
Self time: 0.000068
count total (s) self (s)
" Restore foldinfo.
1 0.000040 for winnr in filter(range(1, winnr('$')), "!empty(getwinvar(v:val, 'neocomplete_foldinfo'))")
let neocomplete_foldinfo = getwinvar(winnr, 'neocomplete_foldinfo')
call setwinvar(winnr, '&foldmethod', neocomplete_foldinfo.foldmethod)
call setwinvar(winnr, '&foldexpr', neocomplete_foldinfo.foldexpr)
call setwinvar(winnr, 'neocomplete_foldinfo', {})
endfor
FUNCTION <SNR>192_syntax_match()
Called 1 time
Total time: 0.000208
Self time: 0.000208
count total (s) self (s)
1 0.000172 let stack = synstack(a:line, a:col)
1 0.000026 return (synIDattr(get(stack, -1, ''), 'name') =~? a:pat) || (synIDattr(get(stack, -2, ''), 'name') =~? a:pat)
FUNCTION <SNR>188_variableFallback()
Called 2 times
Total time: 0.000038
Self time: 0.000038
count total (s) self (s)
4 0.000007 for l:variable in a:variableList
4 0.000011 if exists(l:variable)
2 0.000006 let l:result_number = eval(l:variable)
2 0.000002 return l:result_number
endif
2 0.000001 endfor
throw "None of the variables exists: " . string(a:variableList)
FUNCTION neosnippet#helpers#get_filetype()
Called 1 time
Total time: 0.000021
Self time: 0.000021
count total (s) self (s)
1 0.000002 if !exists('s:exists_context_filetype')
" context_filetype.vim installation check.
try
call context_filetype#version()
let s:exists_context_filetype = 1
catch
let s:exists_context_filetype = 0
endtry
endif
1 0.000004 let context_filetype = s:exists_context_filetype ? context_filetype#get_filetype() : &filetype
1 0.000002 if context_filetype == ''
let context_filetype = 'nothing'
endif
1 0.000001 return context_filetype
FUNCTION neocomplete#helper#match_word()
Called 19 times
Total time: 0.000679
Self time: 0.000453
count total (s) self (s)
19 0.000292 0.000066 let pattern = a:0 >= 1 ? a:1 : neocomplete#get_keyword_pattern_end()
" Check wildcard.
19 0.000238 let complete_pos = match(a:cur_text, pattern)
19 0.000061 let complete_str = (complete_pos >=0) ? a:cur_text[complete_pos :] : ''
19 0.000036 return [complete_pos, complete_str]
FUNCTION <SNR>194_nrepl_prepare()
Called 1 time
Total time: 0.000046
Self time: 0.000028
count total (s) self (s)
1 0.000003 let msg = copy(a:msg)
1 0.000002 if !has_key(msg, 'id')
1 0.000026 0.000008 let msg.id = fireplace#nrepl#next_id()
1 0.000001 endif
1 0.000003 if empty(get(msg, 'ns', 1))
unlet msg.ns
endif
1 0.000002 if empty(get(msg, 'session', 1))
unlet msg.session
elseif !has_key(msg, 'session')
1 0.000002 let msg.session = self.session
1 0.000001 endif
1 0.000001 return msg
FUNCTION neocomplete#variables#get_source()
Called 19 times
Total time: 0.000145
Self time: 0.000145
count total (s) self (s)
19 0.000041 if !exists('s:sources')
let s:sources = {}
endif
19 0.000058 return get(s:sources, a:name, {})
FUNCTION <SNR>130_get_prelude()
Called 19 times
Total time: 0.000131
Self time: 0.000131
count total (s) self (s)
19 0.000046 if !exists('s:Prelude')
let s:Prelude = neocomplete#util#get_vital().import('Prelude')
endif
19 0.000014 return s:Prelude
FUNCTION neocomplete#is_cache_disabled()
Called 13 times
Total time: 0.000768
Self time: 0.000409
count total (s) self (s)
13 0.000064 let ignore_filetypes = ['fuf', 'ku']
13 0.000061 let bufnr = a:0 > 0 ? a:1 : bufnr('%')
13 0.000606 0.000247 return !neocomplete#is_enabled() || index(ignore_filetypes, &filetype) >= 0 || neocomplete#get_current_neocomplete().lock || (g:neocomplete#lock_buffer_name_pattern != '' && bufname(bufnr) =~ g:neocomplete#lock_buffer_name_pattern)
FUNCTION vimproc#util#iconv()
Called 17 times
Total time: 0.000316
Self time: 0.000249
count total (s) self (s)
17 0.000152 0.000085 if !vimproc#util#has_iconv() || a:expr == '' || a:from == '' || a:to == '' || a:from ==# a:to
return a:expr
endif
17 0.000098 let result = iconv(a:expr, a:from, a:to)
17 0.000026 return result != '' ? result : a:expr
FUNCTION neocomplete#get_context_filetype()
Called 36 times
Total time: 0.001159
Self time: 0.000740
count total (s) self (s)
36 0.000308 let neocomplete = exists('b:neocomplete') ? b:neocomplete : neocomplete#get_current_neocomplete()
36 0.000139 if a:0 != 0 || mode() !=# 'i' || neocomplete.context_filetype == ''
10 0.000516 0.000097 call neocomplete#context_filetype#set()
10 0.000009 endif
36 0.000044 return neocomplete.context_filetype
FUNCTION neocomplete#util#uniq()
Called 3 times
Total time: 0.001135
Self time: 0.000037
count total (s) self (s)
3 0.001132 0.000034 return call(s:get_list().uniq, a:000)
FUNCTION neocomplete#helper#get_force_omni_complete_pos()
Called 3 times
Total time: 0.000342
Self time: 0.000201
count total (s) self (s)
" Check eskk complete length.
3 0.000035 0.000018 if neocomplete#is_eskk_enabled() && exists('g:eskk#start_completion_length')
if !neocomplete#is_eskk_convertion(a:cur_text) || !neocomplete#is_multibyte_input(a:cur_text)
return -1
endif
let complete_pos = call(&l:omnifunc, [1, ''])
let complete_str = a:cur_text[complete_pos :]
return (neocomplete#util#mb_strlen(complete_str) >= g:eskk#start_completion_length) ? complete_pos : -1
endif
3 0.000121 0.000020 let filetype = neocomplete#get_context_filetype()
3 0.000006 let omnifunc = &l:omnifunc
3 0.000052 0.000029 if neocomplete#helper#check_invalid_omnifunc(omnifunc)
return -1
endif
3 0.000005 let pattern = ''
3 0.000013 if has_key(g:neocomplete#force_omni_input_patterns, omnifunc)
let pattern = g:neocomplete#force_omni_input_patterns[omnifunc]
elseif filetype != '' && get(g:neocomplete#force_omni_input_patterns, filetype, '') != ''
let pattern = g:neocomplete#force_omni_input_patterns[filetype]
endif
3 0.000005 if pattern == ''
3 0.000004 return -1
endif
return match(a:cur_text, '\%(' . pattern . '\m\)$')
FUNCTION neocomplete#sources#buffer#get_frequencies()
Called 2 times
Total time: 0.000010
Self time: 0.000010
count total (s) self (s)
2 0.000010 return get(get(s:buffer_sources, bufnr('%'), {}), 'frequencies', {})
FUNCTION neocomplete#helper#ftdictionary2list()
Called 30 times
Total time: 0.002690
Self time: 0.000362
count total (s) self (s)
30 0.002651 0.000323 return map(filter(neocomplete#get_source_filetypes(a:filetype), 'has_key(a:dictionary, v:val)'), 'a:dictionary[v:val]')
FUNCTION vimproc#util#substitute_path_separator()
Called 1 time
Total time: 0.000003
Self time: 0.000003
count total (s) self (s)
1 0.000002 return s:is_windows ? substitute(a:path, '\\', '/', 'g') : a:path
FUNCTION neocomplete#helper#get_syn_name()
Called 2 times
Total time: 0.000160
Self time: 0.000160
count total (s) self (s)
2 0.000158 return len(getline('.')) < 200 ? synIDattr(synIDtrans(synID(line('.'), mode() ==# 'i' ? col('.')-1 : col('.'), a:is_trans)), 'name') : ''
FUNCTION <SNR>133_escape_pattern()
Called 12 times
Total time: 0.000033
Self time: 0.000033
count total (s) self (s)
12 0.000027 return escape(a:str, '~"\.^$[]*')
FUNCTION vimproc#system_bg()
Called 1 time
Total time: 0.010758
Self time: 0.000086
count total (s) self (s)
" Open pipe.
1 0.000003 if type(a:cmdline) == type('')
if a:cmdline =~ '&\s*$'
let cmdline = substitute(a:cmdline, '&\s*$', '', '')
return vimproc#system_bg(cmdline)
endif
let args = vimproc#parser#parse_statements(a:cmdline)
for arg in args
let arg.statement = vimproc#parser#parse_pipe(arg.statement)
endfor
else
1 0.000010 let args = [{'statement' : [{ 'fd' : { 'stdin' : '', 'stdout' : '', 'stderr' : '' }, 'args' : a:cmdline }], 'condition' : 'always' }]
1 0.000000 endif
1 0.009358 0.000021 let subproc = vimproc#pgroup_open(args)
1 0.000008 if empty(subproc)
" Not supported path error.
return ''
endif
" Close handles.
1 0.001353 0.000018 call s:close_all(subproc)
1 0.000003 let s:bg_processes[subproc.pid] = subproc.pid
1 0.000001 return ''
FUNCTION 68()
Called 1 time
Total time: 0.000131
Self time: 0.000045
count total (s) self (s)
1 0.000001 let list = []
2 0.000088 0.000007 for ft in neocomplete#get_source_filetypes( neocomplete#get_context_filetype())
1 0.000003 if !has_key(s:dictionary_cache, ft)
call s:make_cache(ft)
endif
1 0.000018 0.000013 call neocomplete#cache#check_cache( 'dictionary_cache', ft, s:async_dictionary_list, s:dictionary_cache, 1)
1 0.000003 let list += get(s:dictionary_cache, ft, [])
1 0.000001 endfor
1 0.000000 return list
FUNCTION <SNR>157_make_cache_lines()
Called 5 times
Total time: 0.000054
Self time: 0.000054
count total (s) self (s)
5 0.000013 let filetype = a:filetype
5 0.000028 if get(g:neocomplete#sources#member#prefix_patterns, filetype, '') == ''
5 0.000004 return
endif
if !has_key(s:member_sources, a:srcname)
call s:initialize_source(a:srcname, filetype)
endif
let source = s:member_sources[a:srcname]
let member_pattern = s:get_member_pattern(filetype)
let prefix_pattern = member_pattern . '\m\%(' . g:neocomplete#sources#member#prefix_patterns[filetype] . '\m\)'
let keyword_pattern = prefix_pattern . member_pattern
" Cache member pattern.
for line in a:lines
let match = match(line, keyword_pattern)
while match >= 0 "{{{
let match_str = matchstr(line, '^'.keyword_pattern, match)
" Next match.
let match = matchend(line, prefix_pattern, match)
let member_name = matchstr(match_str, member_pattern . '$')
if member_name == ''
continue
endif
let var_name = match_str[ : -len(member_name)-1]
if !has_key(source.member_cache, var_name)
let source.member_cache[var_name] = {}
endif
if !has_key(source.member_cache[var_name], member_name)
let source.member_cache[var_name][member_name] = 1
endif
let match_str = matchstr(var_name, '^'.keyword_pattern)
endwhile"}}}
endfor
FUNCTION vimproc#plineopen3()
Called 1 time
Total time: 0.008307
Self time: 0.000526
count total (s) self (s)
1 0.000004 let commands = type(a:commands) == type('') ? vimproc#parser#parse_pipe(a:commands) : a:commands
1 0.000002 let is_pty = get(a:000, 0, 0)
1 0.008299 0.000518 return s:plineopen(3, commands, is_pty)
FUNCTION fireplace#message()
Called 1 time
Total time: 0.025599
Self time: 0.000068
count total (s) self (s)
1 0.000569 0.000007 let client = fireplace#client()
1 0.000003 let payload = copy(a:payload)
1 0.000001 if !has_key(payload, 'ns')
1 0.001292 0.000041 let payload.ns = fireplace#ns()
1 0.000002 elseif empty(payload.ns)
unlet payload.ns
endif
1 0.023728 0.000010 return call(client.message, [payload] + a:000, client)
FUNCTION <SNR>158_get_complete_pos()
Called 2 times
Total time: 0.000027
Self time: 0.000027
count total (s) self (s)
2 0.000004 if empty(a:complete_results)
1 0.000001 return -1
endif
1 0.000002 let complete_pos = col('.')
2 0.000004 for result in values(a:complete_results)
1 0.000002 if complete_pos > result.complete_pos
1 0.000002 let complete_pos = result.complete_pos
1 0.000001 endif
1 0.000001 endfor
1 0.000001 return complete_pos
FUNCTION recentcomplete#update_cache_eventually()
Called 3 times
Total time: 0.001292
Self time: 0.001292
count total (s) self (s)
3 0.001288 RCPython recentcomplete.update_cache_eventually()
FUNCTION <SNR>155_funcref()
Called 67 times
Total time: 0.002155
Self time: 0.001331
count total (s) self (s)
67 0.002115 0.001291 return function(s:SID_PREFIX().a:funcname)
FUNCTION neocomplete#cache#check_old_cache()
Called 1 time
Total time: 0.000257
Self time: 0.000017
count total (s) self (s)
1 0.000066 0.000006 let cache_dir = neocomplete#get_data_directory() . '/' . a:cache_dir
1 0.000191 0.000011 return s:Cache.check_old_cache(cache_dir, a:filename)
FUNCTION neocomplete#get_keyword_pattern()
Called 20 times
Total time: 0.000929
Self time: 0.000609
count total (s) self (s)
20 0.000091 0.000066 let filetype = a:0 != 0? a:1 : neocomplete#get_context_filetype()
20 0.000019 if a:0 < 2
1 0.000172 0.000022 return neocomplete#helper#unite_patterns( g:neocomplete#keyword_patterns, filetype)
endif
19 0.000257 0.000112 let source = neocomplete#variables#get_source(a:2)
19 0.000062 if !has_key(source, 'neocomplete__keyword_patterns')
let source.neocomplete__keyword_patterns = {}
endif
19 0.000070 if !has_key(source.neocomplete__keyword_patterns, filetype)
let source.neocomplete__keyword_patterns[filetype] = neocomplete#helper#unite_patterns( source.keyword_patterns, filetype)
endif
19 0.000038 return source.neocomplete__keyword_patterns[filetype]
FUNCTION neocomplete#handler#_do_auto_complete()
Called 3 times
Total time: 0.322481
Self time: 0.000431
count total (s) self (s)
3 0.000258 0.000026 if s:check_in_do_auto_complete()
return
endif
3 0.000038 0.000015 let neocomplete = neocomplete#get_current_neocomplete()
3 0.000007 let neocomplete.skipped = 0
3 0.000009 let neocomplete.event = a:event
3 0.000338 0.000028 let cur_text = neocomplete#get_cur_text(1)
3 0.000048 0.000027 call neocomplete#print_debug('cur_text = ' . cur_text)
" Prevent infinity loop.
3 0.000134 0.000032 if s:is_skip_auto_complete(cur_text)
call neocomplete#print_debug('Skipped.')
return
endif
3 0.000011 let neocomplete.old_cur_text = cur_text
3 0.000381 0.000039 let complete_pos = neocomplete#helper#get_force_omni_complete_pos(cur_text)
3 0.000005 if complete_pos >= 0
if !neocomplete#complete#_check_previous_position(cur_text, complete_pos)
call neocomplete#complete#_set_previous_position(cur_text, complete_pos)
call s:complete_key("\<Plug>(neocomplete_start_omni_complete)")
endif
return
endif
" Check multibyte input or eskk or spaces.
3 0.000070 0.000035 if cur_text =~ '^\s*$' || neocomplete#is_eskk_enabled() || neocomplete#is_multibyte_input(cur_text)
1 0.000013 0.000007 call neocomplete#print_debug('Skipped.')
1 0.000001 return
endif
2 0.000002 try
2 0.000004 let neocomplete.is_auto_complete = 1
" Do prefetch.
2 0.310383 0.000025 let neocomplete.complete_sources = neocomplete#complete#_get_results(cur_text)
2 0.000000 finally
2 0.000004 let neocomplete.is_auto_complete = 0
2 0.000002 endtry
2 0.000004 if empty(neocomplete.complete_sources)
1 0.000004 if !empty(g:neocomplete#fallback_mappings) && len(matchstr(cur_text, '\h\w*$')) >= g:neocomplete#auto_completion_start_length && !neocomplete.skip_next_complete
let key = ''
for i in range(0, len(g:neocomplete#fallback_mappings)-1)
let key .= '<C-r>=neocomplete#mappings#fallback(' . i . ')<CR>'
endfor
execute 'inoremap <silent> <Plug>(neocomplete_fallback)' key
" Fallback
call s:complete_key("\<Plug>(neocomplete_fallback)")
endif
1 0.000001 return
endif
1 0.000019 0.000005 let complete_pos = neocomplete#complete#_get_complete_pos( neocomplete.complete_sources)
1 0.000002 let base = cur_text[complete_pos :]
1 0.010530 0.000012 let neocomplete.candidates = neocomplete#complete#_get_words( neocomplete.complete_sources, complete_pos, base)
" Start auto complete.
1 0.000104 0.000015 call s:complete_key( "\<Plug>(neocomplete_start_auto_complete)")
FUNCTION neocomplete#sources#buffer#make_cache_current_line()
Called 3 times
Total time: 0.007125
Self time: 0.000073
count total (s) self (s)
3 0.000142 0.000009 if neocomplete#is_locked()
return
endif
" let start = reltime()
3 0.006969 0.000050 call s:make_cache_current_buffer( max([1, line('.')-10]), min([line('$'), line('.') + 10]))
" echomsg reltimestr(reltime(start))
FUNCTION <SNR>158_get_omni_funcs()
Called 2 times
Total time: 0.000437
Self time: 0.000303
count total (s) self (s)
2 0.000003 let funcs = []
6 0.000019 for ft in insert(split(a:filetype, '\.'), '_')
4 0.000059 0.000043 let omnifuncs = neocomplete#util#convert2list( get(g:neocomplete#sources#omni#functions, ft, &l:omnifunc))
8 0.000009 for omnifunc in omnifuncs
4 0.000033 0.000013 if neocomplete#helper#check_invalid_omnifunc(omnifunc)
" omnifunc is irregal.
continue
endif
4 0.000016 if get(g:neocomplete#sources#omni#input_patterns, omnifunc, '') != ''
let pattern = g:neocomplete#sources#omni#input_patterns[omnifunc]
elseif get(g:neocomplete#sources#omni#input_patterns, ft, '') != ''
2 0.000005 let pattern = g:neocomplete#sources#omni#input_patterns[ft]
2 0.000000 else
2 0.000002 let pattern = ''
2 0.000001 endif
4 0.000005 if pattern == ''
2 0.000002 continue
endif
2 0.000007 call add(funcs, [omnifunc, pattern])
2 0.000001 endfor
4 0.000003 endfor
2 0.000110 0.000012 return s:List.uniq(funcs)
FUNCTION localcomplete#getAllBufferMinPrefixLength()
Called 1 time
Total time: 0.000037
Self time: 0.000011
count total (s) self (s)
1 0.000005 let l:variableList = [ "b:LocalCompleteAllBuffersMinPrefixLength", "g:localcomplete#AllBuffersMinPrefixLength" ]
1 0.000032 0.000006 return s:numericVariableFallback(l:variableList, 1)
FUNCTION <SNR>155_garbage_collect()
Called 3 times
Total time: 0.000779
Self time: 0.000211
count total (s) self (s)
4 0.000038 for pid in values(s:bg_processes)
" Check processes.
1 0.000002 try
1 0.000583 0.000015 let [cond, _] = s:libcall('vp_waitpid', [pid])
" echomsg string([pid, cond, _])
1 0.000003 if cond !=# 'run' || a:is_force
if cond !=# 'exit'
" Kill process.
call vimproc#kill(pid, g:vimproc#SIGTERM)
endif
if vimproc#util#is_windows()
call s:libcall('vp_close_handle', [pid])
endif
call remove(s:bg_processes, pid)
endif
1 0.000001 catch
" Ignore error.
endtry
1 0.000001 endfor
FUNCTION neocomplete#complete#_get_results()
Called 2 times
Total time: 0.310358
Self time: 0.000186
count total (s) self (s)
2 0.000017 0.000009 call neocomplete#print_debug('start get_complete_sources')
2 0.000021 0.000007 let neocomplete = neocomplete#get_current_neocomplete()
2 0.000017 let neocomplete.start_time = reltime()
" Comment check.
2 0.000178 0.000018 let neocomplete.within_comment = neocomplete#helper#get_syn_name(1) ==# 'Comment'
2 0.006525 0.000037 let complete_sources = call( 'neocomplete#complete#_set_results_pos', [a:cur_text] + a:000)
2 0.000004 if empty(complete_sources)
1 0.000007 0.000004 call neocomplete#print_debug('Skipped.')
1 0.000001 return []
endif
1 0.000014 0.000003 if neocomplete#is_auto_complete()
1 0.000032 0.000012 let complete_pos = neocomplete#complete#_get_complete_pos(complete_sources)
1 0.000031 0.000013 call neocomplete#complete#_set_previous_position(a:cur_text, complete_pos)
1 0.000000 endif
1 0.303467 0.000017 call neocomplete#complete#_set_results_words(complete_sources)
1 0.000028 return filter(copy(complete_sources), '!empty(v:val.neocomplete__context.candidates)')
FUNCTION neocomplete#util#substitute_path_separator()
Called 7 times
Total time: 0.000165
Self time: 0.000079
count total (s) self (s)
7 0.000159 0.000073 return call(s:get_prelude().substitute_path_separator, a:000)
FUNCTION <SNR>101_candidate()
Called 52 times
Total time: 0.000804
Self time: 0.000804
count total (s) self (s)
52 0.000115 let type = get(a:val, 'type', '')
52 0.000151 let arglists = get(a:val, 'arglists', [])
52 0.000488 return { 'word': get(a:val, 'candidate'), 'kind': get(s:short_types, type, type), 'info': get(a:val, 'doc', ''), 'menu': empty(arglists) ? '' : '(' . join(arglists, ' ') . ')' }
FUNCTION <SNR>155_convert_args()
Called 1 time
Total time: 0.000623
Self time: 0.000157
count total (s) self (s)
1 0.000002 if empty(a:args)
return []
endif
1 0.000414 0.000098 let args = map(copy(a:args), 'vimproc#util#iconv( v:val, &encoding, vimproc#util#systemencoding())')
1 0.000005 0.000004 if vimproc#util#is_windows() && !executable(a:args[0])
" Search from internal commands.
let internal_commands = [ 'copy', 'date', 'del', 'dir', 'echo', 'erase', 'for', 'ftype', 'if', 'md', 'mkdir', 'move', 'path', 'rd', 'ren', 'rename', 'rmdir', 'start', 'time', 'type', 'ver', 'vol']
let index = index(internal_commands, a:args[0], 0, 1)
if index >= 0
" Use cmd.exe
return ['cmd', '/c', args[0]] + args[1:]
endif
endif
1 0.000111 0.000013 let command_name = vimproc#get_command_name(a:args[0])
1 0.000077 0.000026 return map(vimproc#analyze_shebang(command_name), 'vimproc#util#iconv( v:val, &encoding, vimproc#util#systemencoding())') + args[1:]
FUNCTION 54()
Called 6 times
Total time: 0.000369
Self time: 0.000369
count total (s) self (s)
6 0.000011 if empty(a:context.candidates)
return []
endif
6 0.000006 lua << EOF
do
local candidates = vim.eval('a:context.candidates')
local len = string.len(vim.eval('a:context.complete_str'))
for i = #candidates-1, 0, -1 do
local word = vim.type(candidates[i]) == 'dict' and
candidates[i].word or candidates[i]
if string.len(word) <= len then
candidates[i] = nil
end
end
end
EOF
6 0.000008 return a:context.candidates
FUNCTION <SNR>155_pgroup_open()
Called 1 time
Total time: 0.009291
Self time: 0.000444
count total (s) self (s)
1 0.000001 let proc = {}
1 0.008407 0.000100 let proc.current_proc = vimproc#plineopen{a:npipe}(a:statements[0].statement, a:is_pty)
1 0.000007 let proc.pid = proc.current_proc.pid
1 0.000009 let proc.pid_list = proc.current_proc.pid_list
1 0.000006 let proc.condition = a:statements[0].condition
1 0.000013 let proc.statements = a:statements[1:]
1 0.000460 0.000234 let proc.stdin = s:fdopen_pgroup(proc, proc.current_proc.stdin, 'vp_pgroup_close', 'read_pgroup', 'write_pgroup')
1 0.000159 0.000013 let proc.stdout = s:fdopen_pgroup(proc, proc.current_proc.stdout, 'vp_pgroup_close', 'read_pgroup', 'write_pgroup')
1 0.000145 0.000010 let proc.stderr = s:fdopen_pgroup(proc, proc.current_proc.stderr, 'vp_pgroup_close', 'read_pgroup', 'write_pgroup')
1 0.000023 0.000006 let proc.kill = s:funcref('vp_pgroup_kill')
1 0.000022 0.000006 let proc.waitpid = s:funcref('vp_pgroup_waitpid')
1 0.000002 let proc.is_valid = 1
1 0.000003 let proc.is_pty = 0
" echomsg expand('<sfile>')
" echomsg 'open:' string(map(copy(proc.current_proc.stdin.fd), 'v:val.fd'))
" echomsg 'open:' string(map(copy(proc.current_proc.stdout.fd), 'v:val.fd'))
" echomsg 'open:' string(map(copy(proc.current_proc.stderr.fd), 'v:val.fd'))
1 0.000008 return proc
FUNCTION <SNR>155_close_all()
Called 1 time
Total time: 0.001335
Self time: 0.000045
count total (s) self (s)
1 0.000004 if has_key(a:self, 'stdin')
1 0.000820 0.000018 call a:self.stdin.close()
1 0.000000 endif
1 0.000003 if has_key(a:self, 'stdout')
1 0.000317 0.000011 call a:self.stdout.close()
1 0.000001 endif
1 0.000002 if has_key(a:self, 'stderr')
1 0.000185 0.000003 call a:self.stderr.close()
1 0.000001 endif
FUNCTION <SNR>155_libcall()
Called 5 times
Total time: 0.003419
Self time: 0.002854
count total (s) self (s)
" End Of Value
5 0.000015 let EOV = "\xFF"
5 0.000084 let args = empty(a:args) ? '' : (join(reverse(copy(a:args)), EOV) . EOV)
5 0.002051 let stack_buf = libcall(g:vimproc#dll_path, a:func, args)
5 0.001056 0.000491 let result = s:split(stack_buf, EOV)
5 0.000066 if get(result, -1, 'error') != ''
if stack_buf[len(stack_buf) - 1] ==# EOV
" Note: If &encoding equals "cp932" and output ends multibyte first byte,
" will fail split.
return result
endif
let s:lasterr = result
let msg = vimproc#util#iconv(string(result), vimproc#util#systemencoding(), &encoding)
throw printf('vimproc: %s: %s', a:func, msg)
endif
5 0.000015 return result[:-2]
FUNCTION neocomplete#variables#get_sources()
Called 7 times
Total time: 0.000063
Self time: 0.000063
count total (s) self (s)
7 0.000022 if !exists('s:sources')
let s:sources = {}
endif
7 0.000008 return s:sources
FUNCTION <SNR>183_writefile()
Called 1 time
Total time: 0.000166
Self time: 0.000116
count total (s) self (s)
1 0.000055 0.000005 let cache_name = s:_encode_name(a:cache_dir, a:filename)
1 0.000110 call writefile(a:list, cache_name)
FUNCTION localcomplete#localMatches()
Called 1 time
Total time: 0.001876
Self time: 0.001600
count total (s) self (s)
" Suggest matches looking at the region around the current cursor position
" or the whole file. The configuration at the top of this file applies.
1 0.000001 if a:findstart
LCPython import localcomplete
LCPython localcomplete.findstart_local_matches()
return s:__localcomplete_lookup_result_findstart
else
1 0.000043 LCPython import localcomplete
1 0.001818 0.001542 LCPython localcomplete.complete_local_matches()
1 0.000002 return s:__localcomplete_lookup_result
endif
FUNCTION <SNR>155_fdopen_pipes()
Called 3 times
Total time: 0.002232
Self time: 0.000855
count total (s) self (s)
3 0.002190 0.000813 return { 'eof' : 0, '__eof' : 0, 'is_valid' : 1, 'buffer' : [], 'fd' : a:fd, 'f_close' : s:funcref(a:f_close), 'close' : s:funcref('close'), 'read' : s:funcref(a:f_read), 'write' : s:funcref(a:f_write), 'read_line' : s:funcref('read_line'), 'read_lines' : s:funcref('read_lines'),}
FUNCTION fireplace#nrepl_connection#bencode()
Called 17 times
Total time: 0.000321
Self time: 0.000308
count total (s) self (s)
17 0.000030 if type(a:value) == type(0)
return 'i'.a:value.'e'
elseif type(a:value) == type('')
15 0.000034 return strlen(a:value).':'.a:value
elseif type(a:value) == type([])
1 0.000006 return 'l'.join(map(copy(a:value),'fireplace#nrepl_connection#bencode(v:val)'),'').'e'
elseif type(a:value) == type({})
1 0.000008 return 'd'.join(values(map(copy(a:value),'fireplace#nrepl_connection#bencode(v:key).fireplace#nrepl_connection#bencode(v:val)')),'').'e'
else
throw "Can't bencode ".string(a:value)
endif
FUNCTION <SNR>155_vp_pipes_close()
Called 3 times
Total time: 0.001147
Self time: 0.000081
count total (s) self (s)
6 0.000019 for fd in self.fd
3 0.000004 try
3 0.001087 0.000021 call fd.close()
3 0.000004 catch /vimproc: vp_pipe_close: /
" Ignore error.
endtry
3 0.000002 endfor
FUNCTION neocomplete#util#escape_pattern()
Called 12 times
Total time: 0.000181
Self time: 0.000079
count total (s) self (s)
12 0.000178 0.000076 return call(s:get_prelude().escape_pattern, a:000)
FUNCTION vimproc#util#is_windows()
Called 5 times
Total time: 0.000008
Self time: 0.000008
count total (s) self (s)
5 0.000006 return s:is_windows
FUNCTION <SNR>85_py_run_commands()
Called 1 time
Total time: 0.010307
Self time: 0.010307
count total (s) self (s)
1 0.010305 RCPython recentcomplete.run_commands()
FUNCTION 77()
Called 1 time
Total time: 0.000106
Self time: 0.000053
count total (s) self (s)
1 0.000016 0.000008 if neocomplete#within_comment()
return []
endif
1 0.000005 if !has_key(s:include_info, bufnr('%'))
" Make cache automatically.
call s:check_buffer('', 0)
endif
1 0.000001 let keyword_list = []
" Make cache automatically.
2 0.000005 for include in s:include_info[bufnr('%')].include_files
1 0.000052 0.000007 call neocomplete#cache#check_cache( 'include_cache', include, s:async_include_cache, s:include_cache, 0)
1 0.000003 if has_key(s:include_cache, include)
1 0.000006 let s:cache_accessed_time[include] = localtime()
1 0.000002 let keyword_list += s:include_cache[include]
1 0.000001 endif
1 0.000000 endfor
1 0.000001 return keyword_list
FUNCTION neosnippet#helpers#get_snippets()
Called 1 time
Total time: 0.000566
Self time: 0.000328
count total (s) self (s)
1 0.000015 0.000009 call neosnippet#init#check()
1 0.000019 0.000011 let neosnippet = neosnippet#variables#current_neosnippet()
1 0.000003 let snippets = copy(neosnippet.snippets)
3 0.000134 0.000022 for filetype in s:get_sources_filetypes(neosnippet#helpers#get_filetype())
2 0.000076 0.000016 call neosnippet#commands#_make_cache(filetype)
2 0.000068 0.000058 call extend(snippets, neosnippet#variables#snippets()[filetype], 'keep')
2 0.000001 endfor
1 0.000031 0.000010 let cur_text = neosnippet#util#get_cur_text()
1 0.000002 if mode() ==# 'i'
" Special filters.
1 0.000033 0.000012 if !s:is_beginning_of_line(cur_text)
call filter(snippets, '!v:val.options.head')
endif
1 0.000000 endif
1 0.000166 call filter(snippets, "cur_text =~# get(v:val, 'regexp', '')")
1 0.000001 return snippets
FUNCTION neocomplete#init#_context()
Called 28 times
Total time: 0.001184
Self time: 0.001184
count total (s) self (s)
28 0.001172 return extend(a:context, { 'input' : '', 'prev_complete_pos' : -1, 'prev_candidates' : [], 'complete_pos' : -1, 'complete_str' : '', 'candidates' : [] })
FUNCTION <SNR>149_make_cache_current_buffer()
Called 3 times
Total time: 0.006919
Self time: 0.005504
count total (s) self (s)
3 0.000009 let srcname = bufnr('%')
" Make cache from current buffer.
3 0.000197 0.000023 if !s:should_create_cache(srcname)
return
endif
3 0.000127 0.000021 if !s:exists_current_source()
call s:initialize_source(srcname)
endif
3 0.000009 let source = s:buffer_sources[srcname]
3 0.000007 let keyword_pattern = source.keyword_pattern
3 0.000007 if keyword_pattern == ''
return
endif
3 0.000005 let words = []
3 0.000004 lua << EOF
do
local words = vim.eval('words')
local dup = {}
local b = vim.buffer()
local min_length = vim.eval('g:neocomplete#min_keyword_length')
for linenr = vim.eval('a:start'), vim.eval('a:end') do
local match = 0
while 1 do
local match_str = vim.eval('matchstr(getline('..linenr..
'), keyword_pattern, ' .. match .. ')')
if match_str == '' then
break
end
if dup[match_str] == nil
and string.len(match_str) >= min_length then
dup[match_str] = 1
words:add(match_str)
end
-- Next match.
match = vim.eval('matchend(getline(' .. linenr ..
'), keyword_pattern, ' .. match .. ')')
end
end
end
EOF
3 0.001199 0.000064 let source.words = neocomplete#util#uniq(source.words + words)
FUNCTION neocomplete#sources#member#make_cache_current_line()
Called 3 times
Total time: 0.000249
Self time: 0.000047
count total (s) self (s)
3 0.000020 0.000008 if !neocomplete#is_enabled()
call neocomplete#initialize()
endif
" Make cache from current line.
3 0.000208 0.000018 return s:make_cache_current_buffer(line('.')-1, line('.')+1)
FUNCTION <SNR>188_numericVariableFallback()
Called 9 times
Total time: 0.000239
Self time: 0.000239
count total (s) self (s)
18 0.000030 for l:variable in a:variableList
18 0.000047 if exists(l:variable)
9 0.000026 let l:result_number = eval(l:variable)
9 0.000015 if a:wantEnforceNonNegative && l:result_number < 0
throw "Variable " . l:variable . "less than zero"
endif
9 0.000011 return l:result_number
endif
9 0.000007 endfor
throw "None of the variables exists: " . string(a:variableList)
FUNCTION neocomplete#complete#_set_results_words()
Called 1 time
Total time: 0.303450
Self time: 0.000949
count total (s) self (s)
" Try source completion.
" Save options.
1 0.000002 let ignorecase_save = &ignorecase
1 0.000003 let pos = winsaveview()
1 0.000000 try
10 0.000014 for source in a:sources
9 0.000521 0.000029 if neocomplete#complete_check()
return
endif
9 0.000018 let context = source.neocomplete__context
9 0.000065 let &ignorecase = (g:neocomplete#enable_smart_case || g:neocomplete#enable_camel_case) ? context.complete_str !~ '\u' : g:neocomplete#enable_ignore_case
9 0.000025 if !source.is_volatile && context.prev_complete_pos == context.complete_pos && !empty(context.prev_candidates)
" Use previous candidates.
let context.candidates = context.prev_candidates
else
9 0.000005 try
9 0.299149 0.000079 let context.candidates = source.gather_candidates(context)
9 0.000007 catch
call neocomplete#print_error(v:throwpoint)
call neocomplete#print_error(v:exception)
call neocomplete#print_error( 'Source name is ' . source.name)
call neocomplete#print_error( 'Error occurred in source''s gather_candidates()!')
return
finally
9 0.000044 if winsaveview() != pos
call winrestview(pos)
endif
9 0.000009 endtry
9 0.000004 endif
9 0.000298 let context.prev_candidates = copy(context.candidates)
9 0.000014 let context.prev_complete_pos = context.complete_pos
9 0.000014 if !empty(context.candidates)
6 0.002951 0.000046 let context.candidates = neocomplete#helper#call_filters( source.neocomplete__matchers, source, {})
6 0.000004 endif
9 0.000077 0.000043 call neocomplete#print_debug(source.name)
9 0.000007 endfor
1 0.000001 finally
1 0.000002 let &ignorecase = ignorecase_save
1 0.000001 endtry
FUNCTION 26()
Called 1 time
Total time: 0.023718
Self time: 0.000025
count total (s) self (s)
1 0.000007 0.000006 if has_key(a:payload, 'ns') && a:payload.ns !=# self.user_ns()
1 0.000038 0.000007 let ignored_error = self.preload(a:payload.ns)
1 0.000001 endif
1 0.023670 0.000009 return call('s:conn_try', [self.connection, 'message', a:payload] + a:000, self)
FUNCTION 27()
Called 1 time
Total time: 0.000031
Self time: 0.000030
count total (s) self (s)
1 0.000007 0.000006 if !empty(a:lib) && a:lib !=# self.user_ns() && !get(self.requires, a:lib)
let reload = has_key(self.requires, a:lib) ? ' :reload' : ''
let self.requires[a:lib] = 0
let clone = s:conn_try(self.connection, 'clone')
if self.user_ns() ==# 'user'
let qsym = s:qsym(a:lib)
let expr = '(when-not (find-ns '.qsym.') (try' . ' (#''clojure.core/load-one '.qsym.' true true)' . ' (catch Exception e (when-not (find-ns '.qsym.') (throw e)))))'
else
let expr = '(ns '.self.user_ns().' (:require '.a:lib.reload.'))'
endif
try
let result = clone.eval(expr, {'ns': self.user_ns()})
finally
call clone.close()
endtry
let self.requires[a:lib] = !has_key(result, 'ex')
if has_key(result, 'ex')
return result
endif
endif
1 0.000000 return {}
FUNCTION <SNR>194_nrepl_call()
Called 1 time
Total time: 0.023567
Self time: 0.000017
count total (s) self (s)
1 0.000002 let terms = a:0 ? a:1 : ['done']
1 0.000002 let sels = a:0 > 1 ? a:2 : {}
1 0.023563 0.000013 return call(self.transport.call, [a:msg, terms, sels] + a:000[2:-1], self.transport)
FUNCTION neocomplete#handler#_on_text_changed()
Called 2 times
Total time: 0.000278
Self time: 0.000188
count total (s) self (s)
2 0.000085 0.000008 if neocomplete#is_cache_disabled()
return
endif
2 0.000021 0.000008 let neocomplete = neocomplete#get_current_neocomplete()
2 0.000004 if g:neocomplete#enable_insert_char_pre && neocomplete.skip_next_complete
call neocomplete#handler#_do_auto_complete('InsertCharPre')
endif
2 0.000005 if getline('.') == ''
call s:make_cache_current_line()
endif
" indent line matched by indentkeys
2 0.000022 let cur_text = matchstr(getline('.'), '^.*\%'.col('.').'c')
2 0.000014 if neocomplete.indent_text != matchstr(getline('.'), '\S.*$')
2 0.000075 for word in filter(map(split(&l:indentkeys, ','), "v:val =~ '^<.*>$' ? matchstr(v:val, '^<\\zs.*\\ze>$') : matchstr(v:val, '.*=\\zs.*')"), "v:val != ''")
if stridx(cur_text, word, len(cur_text)-len(word)-1) >= 0
call neocomplete#helper#indent_current_line()
let neocomplete.indent_text = matchstr(getline('.'), '\S.*$')
break
endif
endfor
2 0.000001 endif
FUNCTION neocomplete#cache#load_from_cache()
Called 1 time
Total time: 0.000357
Self time: 0.000184
count total (s) self (s)
1 0.000003 let is_string = get(a:000, 0, 0)
1 0.000001 try
" Note: For neocomplete.
1 0.000001 let list = []
1 0.000000 if is_string
1 0.000000 lua << EOF
do
local ret = vim.eval('list')
local list = {}
for line in io.lines(vim.eval(
'neocomplete#cache#encode_name(a:cache_dir, a:filename)')) do
list = loadstring('return ' .. line)()
end
for i = 1, #list do
ret:add(list[i])
end
end
EOF
1 0.000001 else
let list = eval(get(neocomplete#cache#readfile( a:cache_dir, a:filename), 0, '[]'))
endif
1 0.000005 if !empty(list) && is_string && type(list[0]) != type('')
" Type check.
throw 'Type error'
endif
1 0.000001 return list
catch
" echomsg string(v:errmsg)
" echomsg string(v:exception)
" Delete old cache file.
let cache_name = neocomplete#cache#encode_name(a:cache_dir, a:filename)
if filereadable(cache_name)
call delete(cache_name)
endif
return []
endtry
FUNCTION <SNR>149_check_source()
Called 1 time
Total time: 0.014982
Self time: 0.000178
count total (s) self (s)
" Check new buffer.
1 0.014494 0.000152 call map(filter(range(1, bufnr('$')), " (v:val != bufnr('%') || neocomplete#has_vimproc()) && (!has_key(s:buffer_sources, v:val) && buflisted(v:val) || (has_key(s:buffer_sources, v:val) && s:buffer_sources[v:val].cached_time < getftime(s:buffer_sources[v:val].path))) && (!neocomplete#is_locked(v:val) || g:neocomplete#disable_auto_complete) && s:should_create_cache(v:val) "), 's:make_cache_file(v:val)')
1 0.000472 0.000010 call s:check_async_cache()
" Remove unlisted buffers.
1 0.000011 call filter(s:buffer_sources, "v:key == bufnr('%') || buflisted(str2nr(v:key))")
FUNCTION <SNR>101_get_complete_context()
Called 1 time
Total time: 0.253308
Self time: 0.253308
count total (s) self (s)
" Find toplevel form
" If cursor is on start parenthesis we don't want to find the form
" If cursor is on end parenthesis we want to find the form
1 0.249835 let [line1, col1] = searchpairpos('(', '', ')', 'Wrnb', g:fireplace#skip)
1 0.003465 let [line2, col2] = searchpairpos('(', '', ')', 'Wrnc', g:fireplace#skip)
1 0.000003 if (line1 == 0 && col1 == 0) || (line2 == 0 && col2 == 0)
1 0.000001 return ""
endif
if line1 == line2
let expr = getline(line1)[col1-1 : col2-1]
else
let expr = getline(line1)[col1-1 : -1] . ' ' . join(getline(line1+1, line2-1), ' ') . getline(line2)[0 : col2-1]
endif
" Calculate the position of cursor inside the expr
if line1 == line('.')
let p = col('.') - col1
else
let p = strlen(getline(line1)[col1-1 : -1]) + strlen(join(getline(line1 + 1, line('.') - 1), ' ')) + col('.')
endif
return strpart(expr, 0, p) . '__prefix__' . strpart(expr, p)
FUNCTION neocomplete#util#is_sudo()
Called 2 times
Total time: 0.000011
Self time: 0.000011
count total (s) self (s)
2 0.000008 return $SUDO_USER != '' && $USER !=# $SUDO_USER && $HOME !=# expand('~'.$USER) && $HOME ==# expand('~'.$SUDO_USER)
FUNCTION neocomplete#is_text_mode()
Called 35 times
Total time: 0.000513
Self time: 0.000271
count total (s) self (s)
35 0.000397 0.000155 let neocomplete = neocomplete#get_current_neocomplete()
35 0.000101 return get(g:neocomplete#text_mode_filetypes, neocomplete.context_filetype, 0)
FUNCTION <SNR>149_check_async_cache()
Called 2 times
Total time: 0.001065
Self time: 0.000136
count total (s) self (s)
4 0.000468 0.000022 for source in s:get_sources_list()
2 0.000008 if !has_key(s:async_dictionary_list, source.path)
continue
endif
" Load from cache.
2 0.000510 0.000027 let [loaded, file_cache] = neocomplete#cache#get_cache_list( 'buffer_cache', s:async_dictionary_list[source.path])
2 0.000001 if loaded
1 0.000005 let source.words = file_cache
1 0.000001 endif
2 0.000008 if empty(s:async_dictionary_list[source.path])
1 0.000006 call remove(s:async_dictionary_list, source.path)
1 0.000000 endif
2 0.000002 endfor
FUNCTION vimproc#analyze_shebang()
Called 1 time
Total time: 0.000029
Self time: 0.000029
count total (s) self (s)
1 0.000026 if !filereadable(a:filename) || getfsize(a:filename) > 100000 || (vimproc#util#is_windows() && '.'.fnamemodify(a:filename, ':e') !~? '^'.substitute($PATHEXT, ';', '$\\|^', 'g').'$')
" Maybe a binary file.
1 0.000001 return [a:filename]
endif
let lines = readfile(a:filename, '', 1)
if empty(lines) || lines[0] !~ '^#!.\+'
" Shebang not found.
return [a:filename]
endif
" Get shebang line.
let shebang = split(matchstr(lines[0], '^#!\zs.\+'))
" Convert command name.
if vimproc#util#is_windows() && shebang[0] =~ '^/'
let shebang[0] = vimproc#get_command_name( fnamemodify(shebang[0], ':t'))
endif
return shebang + [a:filename]
FUNCTION neocomplete#is_enabled()
Called 17 times
Total time: 0.000148
Self time: 0.000112
count total (s) self (s)
17 0.000133 0.000097 return neocomplete#init#is_enabled()
FUNCTION neocomplete#helper#complete_check()
Called 16 times
Total time: 0.000714
Self time: 0.000448
count total (s) self (s)
16 0.000154 0.000053 let neocomplete = neocomplete#get_current_neocomplete()
16 0.000015 if g:neocomplete#enable_debug
echomsg split(reltimestr(reltime(neocomplete.start_time)))[0]
endif
16 0.000362 0.000197 let ret = neocomplete#is_auto_complete() && g:neocomplete#skip_auto_completion_time != '' && split(reltimestr(reltime(neocomplete.start_time)))[0] > g:neocomplete#skip_auto_completion_time
16 0.000011 if ret
let neocomplete = neocomplete#get_current_neocomplete()
let neocomplete.skipped = 1
call neocomplete#print_debug('Skipped.')
endif
16 0.000013 return ret
FUNCTION 53()
Called 6 times
Total time: 0.002135
Self time: 0.001973
count total (s) self (s)
6 0.000013 if len(a:context.complete_str) > 10
" Mix fuzzy mode.
let len = len(a:context.complete_str)
let fuzzy_len = len - len/(1 + len/10)
let pattern = neocomplete#filters#escape( a:context.complete_str[: fuzzy_len-1]) . neocomplete#filters#fuzzy_escape( a:context.complete_str[fuzzy_len :])
else
6 0.000194 0.000032 let pattern = neocomplete#filters#fuzzy_escape( a:context.complete_str)
6 0.000004 endif
" The first letter must be matched.
6 0.000011 let pattern = '^' . pattern
6 0.000006 lua << EOF
do
local pattern = vim.eval('pattern')
local input = vim.eval('a:context.complete_str')
local candidates = vim.eval('a:context.candidates')
if vim.eval('&ignorecase') ~= 0 then
pattern = string.lower(pattern)
input = string.lower(input)
for i = #candidates-1, 0, -1 do
local word = vim.type(candidates[i]) == 'dict' and
string.lower(candidates[i].word) or string.lower(candidates[i])
if string.find(word, pattern, 1) == nil then
candidates[i] = nil
end
end
else
for i = #candidates-1, 0, -1 do
local word = vim.type(candidates[i]) == 'dict' and
candidates[i].word or candidates[i]
if string.find(word, pattern, 1) == nil then
candidates[i] = nil
end
end
end
end
EOF
6 0.000011 return a:context.candidates
FUNCTION 55()
Called 6 times
Total time: 0.001222
Self time: 0.001222
count total (s) self (s)
6 0.000006 lua << EOF
do
local candidates = vim.eval('a:context.candidates')
local t = {}
local input = string.lower(vim.eval('a:context.input'))
for i = 1, #candidates do
t[i] = candidates[i-1]
local ti = t[i]
-- Match position.
ti.neocomplete__match = select(1, string.find(
string.lower(ti.word), input, 1, true))
if ti.neocomplete__match == nil then
ti.neocomplete__match = string.len(ti.word)
end
if ti.rank == nil then
ti.rank = 0
end
end
table.sort(t, function(a, b)
return (a.rank == b.rank) and (a.neocomplete__match
< b.neocomplete__match) or (a.rank > b.rank)
end)
for i = 0, #candidates-1 do
candidates[i] = t[i+1]
end
end
EOF
6 0.000012 return a:context.candidates
FUNCTION 57()
Called 6 times
Total time: 0.016000
Self time: 0.005307
count total (s) self (s)
6 0.000435 0.000065 let next = matchstr(getline('.')[ len(neocomplete#helper#get_cur_text()) :], '^\S\+')
6 0.000009 if next == ''
return a:context.candidates
endif
6 0.000052 0.000019 let neocomplete = neocomplete#get_current_neocomplete()
6 0.000010 let neocomplete.overlapped_items = {}
6 0.000007 let candidates = []
248 0.000186 for candidate in a:context.candidates
242 0.009129 0.001062 let overlapped_len = neocomplete#filters#converter_remove_overlap#length(candidate.word, next)
242 0.000225 if overlapped_len > 0
if !has_key(candidate, 'abbr')
let candidate.abbr = candidate.word
endif
let word = candidate.word
let candidate.word = candidate.word[: -overlapped_len-1]
if candidate.word != ''
let neocomplete.overlapped_items[candidate.word] = word
endif
call add(candidates, candidate)
elseif !neocomplete#is_auto_complete()
242 0.000438 call add(candidates, candidate)
242 0.000109 endif
242 0.000154 endfor
6 0.000008 if empty(candidates)
return a:context.candidates
endif
6 0.000196 let candidates = filter(candidates, 'v:val.word !=# a:context.complete_str')
6 0.000005 return candidates
FUNCTION 58()
Called 6 times
Total time: 0.001261
Self time: 0.000902
count total (s) self (s)
6 0.000010 if g:neocomplete#max_keyword_width < 0
return a:context.candidates
endif
" Delimiter check.
6 0.000079 0.000018 let filetype = neocomplete#get_context_filetype()
18 0.000035 for delimiter in get(g:neocomplete#delimiter_patterns, filetype, [])
" Count match.
12 0.000013 let delim_cnt = 0
12 0.000240 0.000059 let delimiter_vim = neocomplete#util#escape_pattern(delimiter)
12 0.000056 let matchend = matchend(a:context.complete_str, delimiter_vim)
12 0.000013 while matchend >= 0
let matchend = matchend(a:context.complete_str, delimiter_vim, matchend)
let delim_cnt += 1
endwhile
12 0.000304 0.000240 lua << EOF
do
local candidates = vim.eval('a:context.candidates')
local pattern = vim.eval('neocomplete#filters#escape(delimiter)')..'.'
for i = 0, #candidates-1 do
if string.find(candidates[i].word, pattern, 1) ~= nil then
vim.command('call s:process_delimiter(a:context, '..
'a:context.candidates['.. i ..
'], delimiter_vim, delim_cnt)')
end
end
end
EOF
12 0.000012 endfor
6 0.000007 return a:context.candidates
FUNCTION 59()
Called 6 times
Total time: 0.000292
Self time: 0.000292
count total (s) self (s)
6 0.000007 if g:neocomplete#max_keyword_width < 0
return a:context.candidates
endif
6 0.000015 lua << EOF
do
local candidates = vim.eval('a:context.candidates')
local max = vim.eval('g:neocomplete#max_keyword_width')
for i = 0, #candidates-1 do
local abbr = candidates[i].abbr == nil and
candidates[i].word or candidates[i].abbr
if string.len(abbr) > max then
vim.command("let a:context.candidates[".. i .."].abbr = neocomplete#util#truncate_smart("..
"get(a:context.candidates[".. i .."], 'abbr', " ..
"a:context.candidates[".. i .."].word), g:neocomplete#max_keyword_width," ..
"g:neocomplete#max_keyword_width/2, '..')")
end
end
end
EOF
6 0.000007 return a:context.candidates
FUNCTION <SNR>174_get_sources_filetypes()
Called 1 time
Total time: 0.000091
Self time: 0.000015
count total (s) self (s)
1 0.000087 0.000011 let filetypes = exists('*neocomplete#get_source_filetypes') ? neocomplete#get_source_filetypes(a:filetype) : exists('*neocomplcache#get_source_filetypes') ? neocomplcache#get_source_filetypes(a:filetype) : split(((a:filetype == '') ? 'nothing' : a:filetype), '\.')
1 0.000003 return filetypes + ['_']
FUNCTION fireplace#client()
Called 1 time
Total time: 0.000562
Self time: 0.000027
count total (s) self (s)
1 0.000051 0.000006 let buf = a:0 ? a:1 : s:buf()
1 0.000495 0.000005 let client = fireplace#platform(buf)
1 0.000003 if fnamemodify(bufname(buf), ':e') ==# 'cljs'
if !has_key(client, 'connection')
throw 'Fireplace: no live REPL connection'
endif
if empty(client.piggiebacks)
let result = client.piggieback('')
if has_key(result, 'ex')
return result
endif
endif
return client.piggiebacks[0]
endif
1 0.000000 return client
FUNCTION localcomplete#getLocalMinPrefixLength()
Called 1 time
Total time: 0.000053
Self time: 0.000021
count total (s) self (s)
1 0.000005 let l:variableList = [ "b:LocalCompleteLocalMinPrefixLength", "g:localcomplete#LocalMinPrefixLength" ]
1 0.000046 0.000014 return s:numericVariableFallback(l:variableList, 1)
FUNCTION <SNR>158_get_candidates()
Called 1 time
Total time: 0.000045
Self time: 0.000045
count total (s) self (s)
" Append prefix.
1 0.000002 let candidates = []
2 0.000007 for result in values(a:complete_results)
1 0.000002 if result.complete_pos > a:complete_pos
let prefix = a:complete_str[: result.complete_pos - a:complete_pos - 1]
for keyword in result.candidates
let keyword.word = prefix . keyword.word
endfor
endif
1 0.000007 let candidates += result.candidates
1 0.000001 endfor
1 0.000001 return candidates
FUNCTION fireplace#omnicomplete()
Called 2 times
Total time: 0.280671
Self time: 0.000314
count total (s) self (s)
2 0.000002 if a:findstart
1 0.000006 let line = getline('.')[0 : col('.')-2]
1 0.000009 return col('.') - strlen(matchstr(line, '\k\+$')) - 1
else
1 0.000000 try
1 0.000655 0.000009 if fireplace#op_available('complete')
1 0.278934 0.000027 let response = fireplace#message({ 'op': 'complete', 'symbol': a:base, 'extra-metadata': ['arglists', 'doc'], 'context': s:get_complete_context() })
1 0.000003 let trans = '{"word": (v:val =~# ''[./]'' ? "" : matchstr(a:base, ''^.\+/'')) . v:val}'
1 0.000006 let value = get(response[0], 'value', get(response[0], 'completions'))
1 0.000003 if type(value) == type([])
1 0.000004 if type(get(value, 0)) == type({})
1 0.000996 0.000192 return map(value, 's:candidate(v:val)')
elseif type(get(value, 0)) == type([])
return map(value[0], trans)
elseif type(get(value, 0)) == type('')
return map(value, trans)
else
return []
endif
endif
endif
let omnifier = '(fn [[k v]] (let [{:keys [arglists] :as m} (meta v)]' . ' {:word k :menu (pr-str (or arglists (symbol ""))) :info (str (when arglists (str arglists "\n")) " " (:doc m)) :kind (if arglists "f" "v")}))'
let ns = fireplace#ns()
let [aliases, namespaces, maps] = fireplace#evalparse( '[(ns-aliases '.s:qsym(ns).') (all-ns) '. '(sort-by :word (map '.omnifier.' (ns-map '.s:qsym(ns).')))]')
if a:base =~# '^[^/]*/[^/]*$'
let ns = matchstr(a:base, '^.*\ze/')
let prefix = ns . '/'
let ns = get(aliases, ns, ns)
let keyword = matchstr(a:base, '.*/\zs.*')
let results = fireplace#evalparse( '(sort-by :word (map '.omnifier.' (ns-publics '.s:qsym(ns).')))')
for r in results
let r.word = prefix . r.word
endfor
else
let keyword = a:base
let results = maps + map(sort(keys(aliases) + namespaces), '{"word": v:val."/", "kind": "t", "info": ""}')
endif
if type(results) == type([])
return filter(results, 'a:base ==# "" || a:base ==# v:val.word[0 : strlen(a:base)-1]')
else
return []
endif
catch /.*/
return []
endtry
endif
FUNCTION fireplace#ns()
Called 1 time
Total time: 0.001251
Self time: 0.001229
count total (s) self (s)
1 0.000025 0.000003 let buffer = a:0 ? a:1 : s:buf()
1 0.000002 if !empty(getbufvar(buffer, 'fireplace_ns'))
return getbufvar(buffer, 'fireplace_ns')
endif
1 0.000045 let head = getbufline(buffer, 1, 500)
1 0.000001 let blank = '^\s*\%(;.*\)\=$'
1 0.000749 call filter(head, 'v:val !~# blank')
1 0.000002 let keyword_group = '[A-Za-z0-9_?*!+/=<>.-]'
1 0.000027 let lines = join(head[0:49], ' ')
1 0.000182 let lines = substitute(lines, '"\%(\\.\|[^"]\)*"\|\\.', '', 'g')
1 0.000185 let lines = substitute(lines, '\^\={[^{}]*}', '', '')
1 0.000012 let lines = substitute(lines, '\^:'.keyword_group.'\+', '', 'g')
1 0.000014 let ns = matchstr(lines, '\C^(\s*\%(in-ns\s*''\|ns\s\+\)\zs'.keyword_group.'\+\ze')
1 0.000001 if ns !=# ''
1 0.000001 return ns
endif
let path = s:buffer_path(buffer)
return s:to_ns(path ==# '' ? fireplace#client(buffer).user_ns() : path)
FUNCTION <SNR>164_make_cache_current_line()
Called 1 time
Total time: 0.003294
Self time: 0.000032
count total (s) self (s)
1 0.000018 0.000007 let neocomplete = neocomplete#get_current_neocomplete()
1 0.000180 0.000008 if neocomplete#helper#is_enabled_source('buffer', neocomplete.context_filetype)
" Caching current cache line.
1 0.002921 0.000006 call neocomplete#sources#buffer#make_cache_current_line()
1 0.000001 endif
1 0.000095 0.000005 if neocomplete#helper#is_enabled_source('member', neocomplete.context_filetype)
" Caching current cache line.
1 0.000077 0.000003 call neocomplete#sources#member#make_cache_current_line()
1 0.000000 endif
FUNCTION neocomplete#get_data_directory()
Called 7 times
Total time: 0.001069
Self time: 0.000781
count total (s) self (s)
7 0.000097 let g:neocomplete#data_directory = get(g:, 'neocomplete#data_directory', ($XDG_CACHE_HOME != '' ? $XDG_CACHE_HOME . '/neocomplete' : '~/.cache/neocomplete'))
7 0.000866 0.000578 let directory = neocomplete#util#substitute_path_separator( neocomplete#util#expand(g:neocomplete#data_directory))
7 0.000031 if !isdirectory(directory)
if neocomplete#util#is_sudo()
call neocomplete#print_error(printf( 'Cannot create Directory "%s" in sudo session.', directory))
else
call mkdir(directory, 'p')
endif
endif
7 0.000007 return directory
FUNCTION neocomplete#cache#get_cache_list()
Called 2 times
Total time: 0.000483
Self time: 0.000126
count total (s) self (s)
2 0.000005 let cache_list = a:async_cache_list
2 0.000004 let loaded_keywords = []
2 0.000003 let loaded = 0
3 0.000047 for cache in filter(copy(cache_list), 'filereadable(v:val.cachename)')
1 0.000001 let loaded = 1
1 0.000370 0.000013 let loaded_keywords = neocomplete#cache#load_from_cache( a:cache_dir, cache.filename, 1)
1 0.000001 endfor
2 0.000029 call filter(cache_list, '!filereadable(v:val.cachename)')
2 0.000005 return [loaded, loaded_keywords]
FUNCTION 60()
Called 1 time
Total time: 0.001999
Self time: 0.000123
count total (s) self (s)
1 0.001889 0.000013 let result = localcomplete#localMatches(0, a:context.complete_str[0])
1 0.000108 call map(result, "{ 'word': v:val.word, 'menu': '[L]' }")
1 0.000001 return result
FUNCTION 61()
Called 1 time
Total time: 0.012210
Self time: 0.000038
count total (s) self (s)
1 0.012188 0.000016 let result = recentcomplete#matches(0, a:context.complete_str[0])
1 0.000017 call map(result, "{ 'word': v:val.word, 'menu': '[R]' }")
1 0.000002 return result
FUNCTION neocomplete#has_vimproc()
Called 2 times
Total time: 0.000050
Self time: 0.000018
count total (s) self (s)
2 0.000049 0.000017 return neocomplete#util#has_vimproc()
FUNCTION neocomplete#util#is_complete_select()
Called 1 time
Total time: 0.000003
Self time: 0.000003
count total (s) self (s)
1 0.000002 return get(g:, 'neocomplete#enable_complete_select', 0)
FUNCTION 69()
Called 2 times
Total time: 0.000312
Self time: 0.000095
count total (s) self (s)
2 0.000034 0.000007 let filetype = neocomplete#get_context_filetype()
2 0.000007 if filetype ==# 'vimshell' || filetype ==# 'unite' || filetype ==# 'int-ssh'
return -1
endif
" Filename pattern.
2 0.000121 0.000017 let pattern = neocomplete#get_keyword_pattern_end('filename', self.name)
2 0.000083 0.000023 let [complete_pos, complete_str] = neocomplete#helper#match_word(a:context.input, pattern)
2 0.000054 0.000028 if (complete_str =~ '//' || complete_str == '/' || (neocomplete#is_auto_complete() && (complete_str !~ '/' || len(complete_str) < g:neocomplete#auto_completion_start_length || complete_str =~# '\\[^ ;*?[]"={}'']\|\.\.\+$\|/c\%[ygdrive/]$')))
" Not filename pattern.
2 0.000002 return -1
endif
if complete_str =~ '/'
let complete_pos += strridx(complete_str, '/') + 1
endif
return complete_pos
FUNCTION neocomplete#get_cur_text()
Called 4 times
Total time: 0.000397
Self time: 0.000059
count total (s) self (s)
" Return cached text.
4 0.000042 0.000015 let neocomplete = neocomplete#get_current_neocomplete()
4 0.000351 0.000040 return (a:0 == 0 && mode() ==# 'i' && neocomplete.cur_text != '') ? neocomplete.cur_text : neocomplete#helper#get_cur_text()
FUNCTION 86()
Called 1 time
Total time: 0.000349
Self time: 0.000269
count total (s) self (s)
1 0.000002 if &filetype == ''
return []
endif
1 0.000001 let list = []
1 0.000002 if !has_key(s:syntax_list, &filetype)
call s:make_cache()
endif
2 0.000088 0.000008 for syntax in neocomplete#helper#ftdictionary2list( s:syntax_list, neocomplete#get_context_filetype())
1 0.000245 let list += syntax
1 0.000000 endfor
1 0.000000 return list
FUNCTION neocomplete#filters#fuzzy_escape()
Called 6 times
Total time: 0.000162
Self time: 0.000099
count total (s) self (s)
" Escape string for lua regexp.
6 0.000126 0.000063 let string = substitute(neocomplete#filters#escape(a:string), '\w', '\0.*', 'g')
6 0.000012 if g:neocomplete#enable_camel_case && string =~ '\u'
let string = substitute(string, '\l', '[\0\u\0\E]', 'g')
endif
6 0.000005 return string
FUNCTION 73()
Called 2 times
Total time: 0.000157
Self time: 0.000101
count total (s) self (s)
2 0.000040 0.000007 let filetype = neocomplete#get_context_filetype()
2 0.000005 if filetype ==# 'java' || filetype ==# 'haskell'
" Cannot complete include path.
" You should use omnifunc plugins..
return -1
endif
" Not Filename pattern.
2 0.000010 if exists('g:neocomplete#sources#include#patterns')
2 0.000009 let pattern = get(g:neocomplete#sources#include#patterns, filetype, &l:include)
2 0.000001 else
let pattern = ''
endif
2 0.000049 0.000026 if neocomplete#is_auto_complete() && (pattern == '' || a:context.input !~ pattern) && a:context.input =~ '\*$\|\.\.\+$\|/c\%[ygdrive/]$'
" Skip filename completion.
return -1
endif
" Check include pattern.
2 0.000007 let pattern = get(g:neocomplete#sources#include#patterns, filetype, &l:include)
2 0.000004 if pattern != ''
let pattern .= '\m\s\+'
endif
2 0.000003 if pattern == '' || a:context.input !~ pattern
2 0.000002 return -1
endif
let match_end = matchend(a:context.input, pattern)
let complete_str = matchstr(a:context.input[match_end :], '\f\+')
let complete_pos = len(a:context.input) - len(complete_str)
let delimiter = get(g:neocomplete#sources#file_include#delimiters, &filetype, '.')
if strridx(complete_str, delimiter) >= 0
let complete_pos += strridx(complete_str, delimiter) + 1
endif
return complete_pos
FUNCTION neocomplete#context_filetype#set()
Called 10 times
Total time: 0.000419
Self time: 0.000312
count total (s) self (s)
10 0.000227 0.000120 let neocomplete = neocomplete#get_current_neocomplete()
10 0.000046 let context_filetype = s:exists_context_filetype ? context_filetype#get_filetype() : &filetype
10 0.000018 if context_filetype == ''
let context_filetype = 'nothing'
endif
10 0.000047 let neocomplete.context_filetype = context_filetype
10 0.000016 return neocomplete.context_filetype
FUNCTION <SNR>149_initialize_source()
Called 1 time
Total time: 0.001153
Self time: 0.000373
count total (s) self (s)
1 0.000022 let path = fnamemodify(bufname(a:srcname), ':p')
1 0.000004 let filename = fnamemodify(path, ':t')
1 0.000002 if filename == ''
let filename = '[No Name]'
let path .= '/[No Name]'
endif
1 0.000003 let ft = getbufvar(a:srcname, '&filetype')
1 0.000001 if ft == ''
let ft = 'nothing'
endif
1 0.000130 0.000018 let keyword_pattern = neocomplete#get_keyword_pattern(ft, s:source.name)
1 0.000982 0.000314 let s:buffer_sources[a:srcname] = { 'words' : [], 'frequencies' : {}, 'name' : filename, 'filetype' : ft, 'keyword_pattern' : keyword_pattern, 'cached_time' : 0, 'path' : path, 'cache_name' : neocomplete#cache#encode_name('buffer_cache', path),}
FUNCTION neocomplete#util#has_vimproc()
Called 2 times
Total time: 0.000032
Self time: 0.000032
count total (s) self (s)
" Initialize.
2 0.000006 if !exists('g:neocomplete#use_vimproc')
" Check vimproc.
try
call vimproc#version()
let exists_vimproc = 1
catch
let exists_vimproc = 0
endtry
let g:neocomplete#use_vimproc = exists_vimproc
endif
2 0.000002 return g:neocomplete#use_vimproc
FUNCTION neocomplete#complete#_set_previous_position()
Called 1 time
Total time: 0.000018
Self time: 0.000011
count total (s) self (s)
1 0.000010 0.000003 let neocomplete = neocomplete#get_current_neocomplete()
1 0.000002 let neocomplete.old_complete_pos = a:complete_pos
1 0.000003 let neocomplete.old_linenr = line('.')
1 0.000002 let neocomplete.old_cur_text = a:cur_text
FUNCTION localcomplete#getLinesAboveCount()
Called 1 time
Total time: 0.000038
Self time: 0.000010
count total (s) self (s)
1 0.000004 let l:variableList = [ "b:LocalCompleteLinesAboveToSearchCount", "g:localcomplete#LinesAboveToSearchCount" ]
1 0.000034 0.000006 return s:numericVariableFallback(l:variableList, 0)
FUNCTION neocomplete#get_keyword_pattern_end()
Called 19 times
Total time: 0.001016
Self time: 0.000199
count total (s) self (s)
19 0.001009 0.000192 return '\%('.call('neocomplete#get_keyword_pattern', a:000).'\m\)$'
FUNCTION <SNR>154_check_cache()
Called 2 times
Total time: 0.001039
Self time: 0.000208
count total (s) self (s)
2 0.000909 0.000078 if !neocomplete#helper#is_enabled_source('include', neocomplete#get_context_filetype())
return
endif
2 0.000030 let release_accessd_time = localtime() - g:neocomplete#release_cache_time
4 0.000026 for key in keys(s:include_cache)
2 0.000013 if has_key(s:cache_accessed_time, key) && s:cache_accessed_time[key] < release_accessd_time
call remove(s:include_cache, key)
endif
2 0.000002 endfor
FUNCTION 82()
Called 2 times
Total time: 0.000761
Self time: 0.000068
count total (s) self (s)
2 0.000031 0.000007 let filetype = neocomplete#get_context_filetype()
2 0.000682 0.000040 let a:context.source__complete_results = s:set_complete_results_pos( s:get_omni_funcs(filetype), a:context.input)
2 0.000045 0.000018 return s:get_complete_pos(a:context.source__complete_results)
FUNCTION 83()
Called 1 time
Total time: 0.281481
Self time: 0.000090
count total (s) self (s)
1 0.281480 0.000089 return s:get_candidates( s:set_complete_results_words( a:context.source__complete_results), a:context.complete_pos, a:context.complete_str)
FUNCTION neocomplete#get_current_neocomplete()
Called 396 times
Total time: 0.002487
Self time: 0.002487
count total (s) self (s)
396 0.000817 if !exists('b:neocomplete')
call neocomplete#init#_current_neocomplete()
endif
396 0.000366 return b:neocomplete
FUNCTION neocomplete#within_comment()
Called 1 time
Total time: 0.000008
Self time: 0.000003
count total (s) self (s)
1 0.000008 0.000003 return neocomplete#get_current_neocomplete().within_comment
FUNCTION neocomplete#cache#encode_name()
Called 5 times
Total time: 0.001717
Self time: 0.000373
count total (s) self (s)
" Check cache directory.
5 0.001280 0.000321 let cache_dir = neocomplete#get_data_directory() . '/' . a:cache_dir
5 0.000423 0.000038 return s:Cache.getfilename(cache_dir, a:filename)
FUNCTION 95()
Called 1 time
Total time: 0.000656
Self time: 0.000090
count total (s) self (s)
1 0.000600 0.000034 let snippets = values(neosnippet#helpers#get_snippets())
1 0.000011 if matchstr(a:context.input, '\S\+$') !=# matchstr(a:context.input, '\w\+$')
" Word filtering
1 0.000041 call filter(snippets, 'v:val.options.word')
1 0.000001 endif
1 0.000001 return snippets
FUNCTION <SNR>165_save_foldinfo()
Called 1 time
Total time: 0.000028
Self time: 0.000028
count total (s) self (s)
" Save foldinfo.
1 0.000007 let winnrs = filter(range(1, winnr('$')), "winbufnr(v:val) == bufnr('%')")
" Note: for foldmethod=expr or syntax.
1 0.000010 call filter(winnrs, " (getwinvar(v:val, '&foldmethod') ==# 'expr' || getwinvar(v:val, '&foldmethod') ==# 'syntax') && getwinvar(v:val, '&modifiable')")
1 0.000002 for winnr in winnrs
call setwinvar(winnr, 'neocomplete_foldinfo', { 'foldmethod' : getwinvar(winnr, '&foldmethod'), 'foldexpr' : getwinvar(winnr, '&foldexpr') })
call setwinvar(winnr, '&foldmethod', 'manual')
call setwinvar(winnr, '&foldexpr', 0)
endfor
FUNCTION <SNR>61_addtomrufs()
Called 1 time
Total time: 0.000152
Self time: 0.000152
count total (s) self (s)
1 0.000032 let fn = fnamemodify(a:fname, get(g:, 'ctrlp_tilde_homedir', 0) ? ':p:~' : ':p')
1 0.000009 let fn = exists('+ssl') ? tr(fn, '/', '\') : fn
1 0.000008 let abs_fn = fnamemodify(fn,':p')
1 0.000075 if ( !empty({s:in}) && fn !~# {s:in} ) || ( !empty({s:ex}) && fn =~# {s:ex} ) || !empty(getbufvar('^' . abs_fn . '$', '&bt')) || !filereadable(abs_fn) | retu
en
1 0.000007 let idx = index(s:mrufs, fn, 0, !{s:cseno})
1 0.000001 if idx
cal filter(s:mrufs, 'v:val !='.( {s:cseno} ? '#' : '?' ).' fn')
cal insert(s:mrufs, fn)
if {s:soup} && idx < 0
cal s:savetofile(s:mergelists())
en
en
FUNCTION neocomplete#is_eskk_enabled()
Called 5 times
Total time: 0.000025
Self time: 0.000025
count total (s) self (s)
5 0.000021 return exists('*eskk#is_enabled') && eskk#is_enabled()
FUNCTION <SNR>149_check_changed_buffer()
Called 3 times
Total time: 0.000072
Self time: 0.000072
count total (s) self (s)
3 0.000009 let source = s:buffer_sources[a:bufnr]
3 0.000011 let ft = getbufvar(a:bufnr, '&filetype')
3 0.000004 if ft == ''
let ft = 'nothing'
endif
3 0.000013 let filename = fnamemodify(bufname(a:bufnr), ':t')
3 0.000005 if filename == ''
let filename = '[No Name]'
endif
3 0.000011 return source.name != filename || source.filetype != ft
FUNCTION localcomplete#allBufferMatches()
Called 1 time
Total time: 0.001260
Self time: 0.001139
count total (s) self (s)
" Search all buffers for matches. Results from the current buffer will
" come first. The ignore-case and keyword-chars configuration from the
" top of this file will be respected.
1 0.000001 if a:findstart
LCPython import localcomplete
LCPython localcomplete.findstart_local_matches()
return s:__localcomplete_lookup_result_findstart
else
1 0.000038 LCPython import localcomplete
1 0.001210 0.001089 LCPython localcomplete.complete_all_buffer_matches()
1 0.000002 return s:__buffercomplete_lookup_result
endif
FUNCTION neocomplete#helper#clear_result()
Called 2 times
Total time: 0.001670
Self time: 0.000445
count total (s) self (s)
2 0.000033 0.000012 let neocomplete = neocomplete#get_current_neocomplete()
2 0.000010 let neocomplete.complete_str = ''
2 0.000041 let neocomplete.candidates = []
2 0.000017 let neocomplete.complete_sources = []
2 0.000005 let neocomplete.complete_pos = -1
" Restore completeopt.
2 0.000011 if neocomplete.completeopt !=# &completeopt
" Restore completeopt.
let &completeopt = neocomplete.completeopt
endif
" Clear context.
30 0.000093 0.000073 for source in values(neocomplete#variables#get_sources())
28 0.001387 0.000203 let source.neocomplete__context = neocomplete#init#_context( source.neocomplete__context)
28 0.000029 endfor
FUNCTION 23()
Called 2 times
Total time: 0.000002
Self time: 0.000002
count total (s) self (s)
2 0.000002 return 'user'
FUNCTION <SNR>164_check_in_do_auto_complete()
Called 3 times
Total time: 0.000232
Self time: 0.000059
count total (s) self (s)
3 0.000193 0.000020 if neocomplete#is_locked()
return 1
endif
" Detect completefunc.
3 0.000020 if &l:completefunc != '' && &l:buftype =~ 'nofile'
return 1
endif
FUNCTION <SNR>102_connect()
Called 2 times
Total time: 0.000166
Self time: 0.000059
count total (s) self (s)
2 0.000012 if !exists('b:leiningen_root') || !exists(':FireplaceConnect')
return {}
endif
2 0.000056 0.000013 let portfile = s:portfile()
2 0.000010 if !exists('g:leiningen_no_auto_repl') && a:autostart && empty(portfile) && exists(':Start') ==# 2
call s:repl(1, '')
let portfile = s:portfile()
endif
2 0.000074 0.000010 return empty(portfile) ? {} : fireplace#register_port_file(portfile, b:leiningen_root)
FUNCTION vimproc#get_command_name()
Called 1 time
Total time: 0.000098
Self time: 0.000048
count total (s) self (s)
1 0.000004 let path = get(a:000, 0, $PATH)
1 0.000002 let cnt = a:0 < 2 ? 1 : a:2
1 0.000077 0.000027 let files = split(substitute(vimproc#util#substitute_path_separator( vimproc#filepath#which(a:command, path, cnt)), '//', '/', 'g'), '\n')
1 0.000001 if cnt < 0
return files
endif
1 0.000003 let file = get(files, cnt-1, '')
1 0.000001 if file == ''
throw printf( 'vimproc#get_command_name: File "%s" is not found.', a:command)
endif
1 0.000001 return file
FUNCTION <SNR>157_make_cache_current_buffer()
Called 5 times
Total time: 0.000467
Self time: 0.000204
count total (s) self (s)
5 0.000252 0.000043 let filetype = neocomplete#get_context_filetype(1)
5 0.000038 if !has_key(s:member_sources, bufnr('%'))
call s:initialize_source(bufnr('%'), filetype)
endif
5 0.000145 0.000091 call s:make_cache_lines(bufnr('%'), filetype, getline(a:start, a:end))
FUNCTION neocomplete#complete#_get_words()
Called 2 times
Total time: 0.021564
Self time: 0.001562
count total (s) self (s)
2 0.000074 0.000013 let frequencies = neocomplete#variables#get_frequencies()
2 0.000005 if exists('*neocomplete#sources#buffer#get_frequencies')
2 0.000029 0.000019 let frequencies = extend(copy( neocomplete#sources#buffer#get_frequencies()), frequencies)
2 0.000001 endif
" Append prefix.
2 0.000002 let candidates = []
2 0.000003 let len_words = 0
6 0.000078 0.000052 for source in sort(filter(copy(a:sources), '!empty(v:val.neocomplete__context.candidates)'), 's:compare_source_rank')
6 0.000009 let mark = source.mark
6 0.000008 let context = source.neocomplete__context
6 0.000239 let words = type(context.candidates[0]) == type('') ? map(copy(context.candidates), "{'word': v:val, 'menu' : mark}") : deepcopy(context.candidates)
6 0.000009 let context.candidates = words
6 0.000260 0.000032 call neocomplete#helper#call_hook( source, 'on_post_filter', {})
6 0.000010 if context.complete_pos > a:complete_pos
let prefix = a:complete_str[: context.complete_pos - a:complete_pos - 1]
" Fix complete position.
let context.complete_pos = a:complete_pos
let context.complete_str = prefix
for candidate in words
let candidate.word = prefix . candidate.word
endfor
endif
6 0.000219 lua << EOF
do
local frequencies = vim.eval('frequencies')
local candidates = vim.eval('words')
for i = 0, #candidates-1 do
if frequencies[candidates[i].word] ~= nil then
candidates[i].rank = frequencies[candidates[i].word]
end
end
end
EOF
6 0.001503 0.000036 let words = neocomplete#helper#call_filters( source.neocomplete__sorters, source, {})
6 0.000008 if source.max_candidates > 0
6 0.000025 let words = words[: len(source.max_candidates)-1]
6 0.000004 endif
" Set default menu.
6 0.000062 lua << EOF
do
local candidates = vim.eval('words')
local mark = vim.eval('mark')
for i = 0, #candidates-1 do
if candidates[i].menu == nil then
candidates[i].menu = mark
end
end
end
EOF
6 0.018019 0.000039 let words = neocomplete#helper#call_filters( source.neocomplete__converters, source, {})
6 0.000025 let candidates += words
6 0.000013 let len_words += len(words)
6 0.000013 if g:neocomplete#max_list > 0 && len_words > g:neocomplete#max_list
2 0.000002 break
endif
4 0.000170 0.000015 if neocomplete#complete_check()
return []
endif
4 0.000003 endfor
2 0.000002 if g:neocomplete#max_list > 0
2 0.000036 let candidates = candidates[: g:neocomplete#max_list]
2 0.000000 endif
" Check dup and set icase.
2 0.000015 let icase = g:neocomplete#enable_ignore_case && !((g:neocomplete#enable_smart_case || g:neocomplete#enable_camel_case) && a:complete_str =~ '\u')
2 0.000002 if icase
204 0.000118 for candidate in candidates
202 0.000194 let candidate.icase = 1
202 0.000104 endfor
2 0.000002 endif
2 0.000081 0.000006 if neocomplete#complete_check()
return []
endif
2 0.000001 return candidates
FUNCTION neosnippet#commands#_make_cache()
Called 2 times
Total time: 0.000060
Self time: 0.000040
count total (s) self (s)
2 0.000015 0.000006 call neosnippet#init#check()
2 0.000005 let filetype = a:filetype == '' ? &filetype : a:filetype
2 0.000004 if filetype ==# ''
let filetype = 'nothing'
endif
2 0.000023 0.000012 let snippets = neosnippet#variables#snippets()
2 0.000004 if has_key(snippets, filetype)
2 0.000002 return
endif
let snippets[filetype] = {}
let path = join(neosnippet#helpers#get_snippets_directory(), ',')
let snippets_files = []
for glob in s:get_list().flatten( map(split(get(g:neosnippet#scope_aliases, filetype, filetype), '\s*,\s*'), " [v:val . '.snip*', v:val . '/**/*.snip*'] + (filetype != '_' && !has_key(g:neosnippet#scope_aliases, filetype) ? [v:val . '_*.snip*'] : [])"))
let snippets_files += split(globpath(path, glob), '\n')
endfor
let snippets = neosnippet#variables#snippets()
for snippet_file in reverse(s:get_list().uniq(snippets_files))
let snippets[filetype] = extend(snippets[filetype], neosnippet#parser#_parse(snippet_file))
endfor
FUNCTION neocomplete#helper#call_filters()
Called 18 times
Total time: 0.022352
Self time: 0.001073
count total (s) self (s)
18 0.000053 let context = extend(a:source.neocomplete__context, a:context)
54 0.000066 for filter in a:filters
36 0.000024 try
36 0.021618 0.000339 let context.candidates = call(filter.filter, [context], filter)
36 0.000027 catch
call neocomplete#print_error(v:throwpoint)
call neocomplete#print_error(v:exception)
call neocomplete#print_error( '[unite.vim] Error occurred in calling filter ' . filter.name . '!')
call neocomplete#print_error( '[unite.vim] Source name is ' . a:source.name)
endtry
36 0.000038 endfor
18 0.000018 return context.candidates
FUNCTION <SNR>164_close_preview_window()
Called 3 times
Total time: 0.000027
Self time: 0.000027
count total (s) self (s)
3 0.000015 if g:neocomplete#enable_auto_close_preview && bufname('%') !=# '[Command Line]' && winnr('$') != 1 && !&l:previewwindow && !neocomplete#is_cache_disabled()
" Close preview window.
pclose!
endif
FUNCTION <SNR>182_search_vim_path()
Called 1 time
Total time: 0.000004
Self time: 0.000004
count total (s) self (s)
1 0.000003 if exists('s:vim_path')
1 0.000001 return s:vim_path
endif
let paths = vimproc#get_command_name(v:progname, $PATH, -1)
if empty(paths)
if has('gui_macvim')
" MacVim check.
if !executable('/Applications/MacVim.app/Contents/MacOS/Vim')
call neocomplete#print_error( 'You installed MacVim in not default directory!'. ' You must add MacVim installed path in $PATH.')
let g:neocomplete#use_vimproc = 0
return ''
endif
let s:vim_path = '/Applications/MacVim.app/Contents/MacOS/Vim'
else
call neocomplete#print_error( printf('Vim path : "%s" is not found.'. ' You must add "%s" installed path in $PATH.', v:progname, v:progname))
let g:neocomplete#use_vimproc = 0
return ''
endif
else
let base_path = neocomplete#util#substitute_path_separator( fnamemodify(paths[0], ':p:h'))
let s:vim_path = base_path . (neocomplete#util#is_windows() ? '/vim.exe' : '/vim')
if !executable(s:vim_path) && neocomplete#util#is_mac()
" Note: Search "Vim" instead of vim.
let s:vim_path = base_path. '/Vim'
endif
endif
return s:vim_path
FUNCTION <SNR>154_check_buffer()
Called 1 time
Total time: 0.000692
Self time: 0.000366
count total (s) self (s)
1 0.000344 0.000018 if !neocomplete#helper#is_enabled_source('include', neocomplete#get_context_filetype())
return
endif
1 0.000005 let bufnumber = (a:bufnumber == '') ? bufnr('%') : a:bufnumber
1 0.000046 let filename = fnamemodify(bufname(bufnumber), ':p')
1 0.000010 if !has_key(s:include_info, bufnumber)
" Initialize.
let s:include_info[bufnumber] = { 'include_files' : [], 'lines' : [], 'async_files' : {}, }
endif
1 0.000087 if !executable(g:neocomplete#ctags_command)
return
endif
1 0.000010 let include_info = s:include_info[bufnumber]
1 0.000090 if a:is_force || include_info.lines !=# getbufline(bufnumber, 1, 100)
let include_info.lines = getbufline(bufnumber, 1, 100)
" Check include files contained bufname.
let include_files = s:get_buffer_include_files(bufnumber)
" Check include files from function.
let filetype = getbufvar(a:bufnumber, '&filetype')
let function = get(g:neocomplete#sources#include#functions, filetype, '')
if function != '' && getbufvar(bufnumber, '&buftype') !~ 'nofile'
let path = get(g:neocomplete#sources#include#paths, filetype, getbufvar(a:bufnumber, '&path'))
let include_files += call(function, [getbufline(bufnumber, 1, (a:is_force ? '$' : 1000)), path])
endif
if getbufvar(bufnumber, '&buftype') !~ 'nofile' && filereadable(filename)
call add(include_files, filename)
endif
let include_info.include_files = neocomplete#util#uniq(include_files)
endif
1 0.000002 if g:neocomplete#sources#include#max_processes <= 0
return
endif
1 0.000004 let filetype = getbufvar(bufnumber, '&filetype')
1 0.000001 if filetype == ''
let filetype = 'nothing'
endif
2 0.000009 for filename in include_info.include_files
1 0.000010 if (a:is_force || !has_key(include_info.async_files, filename)) && !has_key(s:include_cache, filename)
if !a:is_force && has_key(s:async_include_cache, filename) && len(s:async_include_cache[filename]) >= g:neocomplete#sources#include#max_processes
break
endif
let s:async_include_cache[filename] = [ s:initialize_include(filename, filetype) ]
let include_info.async_files[filename] = 1
endif
1 0.000001 endfor
FUNCTION localcomplete#getLinesBelowCount()
Called 1 time
Total time: 0.000034
Self time: 0.000008
count total (s) self (s)
1 0.000004 let l:variableList = [ "b:LocalCompleteLinesBelowToSearchCount", "g:localcomplete#LinesBelowToSearchCount" ]
1 0.000030 0.000004 return s:numericVariableFallback(l:variableList, 0)
FUNCTION neosnippet#variables#snippets()
Called 4 times
Total time: 0.000021
Self time: 0.000021
count total (s) self (s)
4 0.000009 if !exists('s:snippets')
let s:snippets= {}
endif
4 0.000004 return s:snippets
FUNCTION <SNR>183__create_hash()
Called 7 times
Total time: 0.000255
Self time: 0.000255
count total (s) self (s)
7 0.000028 if len(a:dir) + len(a:str) < 150
7 0.000185 let hash = substitute(substitute( a:str, ':', '=-', 'g'), '[/\\]', '=+', 'g')
7 0.000005 else
let hash = s:S.hash(a:str)
endif
7 0.000008 return hash
FUNCTION vimproc#pgroup_open()
Called 1 time
Total time: 0.009337
Self time: 0.000046
count total (s) self (s)
1 0.000003 if type(a:statements) == type('')
let statements = vimproc#parser#parse_statements(a:statements)
for statement in statements
let statement.statement = vimproc#parser#parse_pipe(statement.statement)
endfor
else
1 0.000002 let statements = a:statements
1 0.000000 endif
1 0.000002 let is_pty = get(a:000, 0, 0)
1 0.000002 let npipe = get(a:000, 1, 3)
1 0.009317 0.000026 return s:pgroup_open(statements, is_pty && !vimproc#util#is_windows(), npipe)
FUNCTION <SNR>85_buffer_keywords()
Called 1 time
Total time: 0.000210
Self time: 0.000050
count total (s) self (s)
1 0.000002 let base = '/dev/null'
1 0.000017 if filereadable(expand('%'))
1 0.000002 let base = expand('%')
1 0.000001 endif
1 0.000128 0.000011 let buffer = strpart(s:buffer_contents(), 0, s:max_buffer_size)
1 0.000058 0.000015 return "echo '".s:shellescape(buffer)."' | ".s:git_diff('--no-index -- '.base.' -')
FUNCTION neosnippet#util#get_cur_text()
Called 1 time
Total time: 0.000021
Self time: 0.000021
count total (s) self (s)
1 0.000021 return (mode() ==# 'i' ? (col('.')-1) : col('.')) >= len(getline('.')) ? getline('.') : matchstr(getline('.'), '^.*\%' . col('.') . 'c' . (mode() ==# 'i' ? '' : '.'))
FUNCTION <SNR>158_get_omni_list()
Called 1 time
Total time: 0.000537
Self time: 0.000537
count total (s) self (s)
1 0.000001 let omni_list = []
" Convert string list.
53 0.000107 for val in deepcopy(a:list)
52 0.000162 let dict = (type(val) == type('') ? { 'word' : val } : val)
52 0.000106 call add(omni_list, dict)
52 0.000038 unlet val
52 0.000037 endfor
1 0.000001 return omni_list
FUNCTION localcomplete#getWantIgnoreCase()
Called 2 times
Total time: 0.000067
Self time: 0.000018
count total (s) self (s)
2 0.000006 let l:variableList = [ "b:LocalCompleteWantIgnoreCase", "g:localcomplete#WantIgnoreCase" ]
2 0.000058 0.000009 return s:numericVariableFallback(l:variableList, 1)
FUNCTION AutoSave()
Called 3 times
Total time: 0.025975
Self time: 0.007199
count total (s) self (s)
3 0.000026 if g:auto_save >= 1
3 0.000023 let was_modified = &modified
3 0.025846 0.007070 silent! wa
3 0.000009 if was_modified && !&modified
1 0.000005 if exists("g:auto_save_postsave_hook")
execute "" . g:auto_save_postsave_hook
endif
1 0.000002 if g:auto_save_silent == 0
echo "(AutoSaved at " . strftime("%H:%M:%S") . ")"
endif
1 0.000001 endif
3 0.000003 endif
FUNCTION <SNR>155_is_pseudo_device()
Called 2 times
Total time: 0.000021
Self time: 0.000018
count total (s) self (s)
2 0.000012 0.000009 if vimproc#util#is_windows() && ( a:filename ==# '/dev/stdin' || a:filename ==# '/dev/stdout' || a:filename ==# '/dev/stderr')
return 1
endif
2 0.000005 return a:filename == '' || a:filename ==# '/dev/clip' || a:filename ==# '/dev/quickfix'
FUNCTION <SNR>155_close()
Called 9 times
Total time: 0.003552
Self time: 0.000076
count total (s) self (s)
9 0.000014 if self.is_valid
9 0.001184 0.000194 call self.f_close()
9 0.000006 endif
9 0.000010 let self.is_valid = 0
9 0.000008 let self.eof = 1
9 0.000008 let self.__eof = 1
FUNCTION neocomplete#complete#_get_complete_pos()
Called 3 times
Total time: 0.000059
Self time: 0.000059
count total (s) self (s)
3 0.000004 if empty(a:sources)
return -1
endif
3 0.000047 return min([col('.')] + map(copy(a:sources), 'v:val.neocomplete__context.complete_pos'))
FUNCTION neocomplete#cache#writefile()
Called 1 time
Total time: 0.000242
Self time: 0.000021
count total (s) self (s)
1 0.000007 0.000002 if neocomplete#util#is_sudo()
return
endif
1 0.000055 0.000005 let cache_dir = neocomplete#get_data_directory() . '/' . a:cache_dir
1 0.000176 0.000010 return s:Cache.writefile(cache_dir, a:filename, a:list)
FUNCTION neocomplete#init#is_enabled()
Called 17 times
Total time: 0.000036
Self time: 0.000036
count total (s) self (s)
17 0.000025 return s:is_enabled
FUNCTION <SNR>183_check_old_cache()
Called 1 time
Total time: 0.000180
Self time: 0.000124
count total (s) self (s)
" Check old cache file.
1 0.000061 0.000005 let cache_name = s:_encode_name(a:cache_dir, a:filename)
1 0.000012 let ret = getftime(cache_name) == -1 || getftime(cache_name) <= getftime(a:filename)
1 0.000011 if ret && filereadable(cache_name)
" Delete old cache.
1 0.000090 call delete(cache_name)
1 0.000001 endif
1 0.000001 return ret
FUNCTION <SNR>158_set_complete_results_pos()
Called 2 times
Total time: 0.000205
Self time: 0.000166
count total (s) self (s)
" Try omnifunc completion. "{{{
2 0.000004 let complete_results = {}
4 0.000007 for [omnifunc, pattern] in a:funcs
2 0.000046 0.000024 if neocomplete#is_auto_complete() && (pattern == '' || a:cur_text !~# '\%(' . pattern . '\m\)$')
1 0.000001 continue
endif
" Save pos.
1 0.000003 let pos = getpos('.')
1 0.000001 try
1 0.000035 0.000018 let complete_pos = call(omnifunc, [1, ''])
1 0.000002 catch
call neocomplete#print_error( 'Error occurred calling omnifunction: ' . omnifunc)
call neocomplete#print_error(v:throwpoint)
call neocomplete#print_error(v:exception)
let complete_pos = -1
finally
1 0.000003 if getpos('.') != pos
call setpos('.', pos)
endif
1 0.000001 endtry
1 0.000001 if complete_pos < 0
continue
endif
1 0.000003 let complete_str = a:cur_text[complete_pos :]
1 0.000008 let complete_results[omnifunc] = { 'candidates' : [], 'complete_pos' : complete_pos, 'complete_str' : complete_str, 'omnifunc' : omnifunc,}
1 0.000001 endfor
"}}}
2 0.000002 return complete_results
FUNCTION <SNR>155_plineopen()
Called 1 time
Total time: 0.007781
Self time: 0.002186
count total (s) self (s)
1 0.000002 let pid_list = []
1 0.000001 let stdin_list = []
1 0.000001 let stdout_list = []
1 0.000001 let stderr_list = []
1 0.000001 let npipe = a:npipe
" Open input.
1 0.000007 let hstdin = (empty(a:commands) || a:commands[0].fd.stdin == '')? 0 : vimproc#fopen(a:commands[0].fd.stdin, 'r').fd
1 0.000012 0.000010 let is_pty = !vimproc#util#is_windows() && a:is_pty
1 0.000001 let cnt = 0
2 0.000016 for command in a:commands
1 0.000003 if is_pty && command.fd.stdout == '' && cnt == 0 && len(a:commands) != 1
" pty_open() use pipe.
let hstdout = 1
else
1 0.000005 if command.fd.stdout =~ '^>'
let mode = 'a'
let command.fd.stdout = command.fd.stdout[1:]
else
1 0.000001 let mode = 'w'
1 0.000002 endif
1 0.000025 0.000013 let hstdout = s:is_pseudo_device(command.fd.stdout) ? 0 : vimproc#fopen(command.fd.stdout, mode).fd
1 0.000000 endif
1 0.000002 if is_pty && command.fd.stderr == '' && cnt == 0 && len(a:commands) != 1
" pty_open() use pipe.
let hstderr = 1
else
1 0.000003 if command.fd.stderr =~ '^>'
let mode = 'a'
let command.fd.stderr = command.fd.stderr[1:]
else
1 0.000001 let mode = 'w'
1 0.000001 endif
1 0.000015 0.000006 let hstderr = s:is_pseudo_device(command.fd.stderr) ? 0 : vimproc#fopen(command.fd.stderr, mode).fd
1 0.000001 endif
1 0.000001 if command.fd.stderr ==# '/dev/stdout'
let npipe = 2
endif
1 0.000636 0.000013 let args = s:convert_args(command.args)
1 0.000005 let command_name = fnamemodify(args[0], ':t:r')
1 0.000011 let pty_npipe = cnt == 0 && hstdin == 0 && hstdout == 0 && hstderr == 0 && exists('g:vimproc#popen2_commands') && get(g:vimproc#popen2_commands, command_name, 0) != 0 ? 2 : npipe
1 0.000004 if is_pty && (cnt == 0 || cnt == len(a:commands)-1)
" Use pty_open().
let pipe = s:vp_pty_open(pty_npipe, s:get_winwidth(), winheight(0), hstdin, hstdout, hstderr, args)
else
1 0.002286 0.000022 let pipe = s:vp_pipe_open(pty_npipe, hstdin, hstdout, hstderr, args)
1 0.000001 endif
1 0.000001 if len(pipe) == 4
1 0.000003 let [pid, fd_stdin, fd_stdout, fd_stderr] = pipe
1 0.000136 0.000017 let stderr = s:fdopen(fd_stderr, 'vp_pipe_close', 'vp_pipe_read', 'vp_pipe_write')
1 0.000000 else
let [pid, fd_stdin, fd_stdout] = pipe
let stderr = s:closed_fdopen( 'vp_pipe_close', 'vp_pipe_read', 'vp_pipe_write')
endif
1 0.000003 call add(pid_list, pid)
1 0.000102 0.000005 let stdin = s:fdopen(fd_stdin, 'vp_pipe_close', 'vp_pipe_read', 'vp_pipe_write')
1 0.000003 let stdin.is_pty = is_pty && (cnt == 0 || cnt == len(a:commands)-1) && hstdin == 0
1 0.000002 call add(stdin_list, stdin)
1 0.000100 0.000004 let stdout = s:fdopen(fd_stdout, 'vp_pipe_close', 'vp_pipe_read', 'vp_pipe_write')
1 0.000003 let stdout.is_pty = is_pty && (cnt == 0 || cnt == len(a:commands)-1) && hstdout == 0
1 0.000002 call add(stdout_list, stdout)
1 0.000002 let stderr.is_pty = is_pty && (cnt == 0 || cnt == len(a:commands)-1) && hstderr == 0
1 0.000002 call add(stderr_list, stderr)
1 0.000037 let hstdin = stdout_list[-1].fd
1 0.000008 let cnt += 1
1 0.000022 endfor
1 0.000015 let proc = {}
1 0.000007 let proc.pid_list = pid_list
1 0.000012 let proc.pid = pid_list[-1]
1 0.001870 0.000386 let proc.stdin = s:fdopen_pipes(stdin_list, 'vp_pipes_close', 'read_pipes', 'write_pipes')
1 0.000154 0.000014 let proc.stdout = s:fdopen_pipes(stdout_list, 'vp_pipes_close', 'read_pipes', 'write_pipes')
1 0.000716 0.000108 let proc.stderr = s:fdopen_pipes(stderr_list, 'vp_pipes_close', 'read_pipes', 'write_pipes')
1 0.000085 0.000039 let proc.get_winsize = s:funcref('vp_get_winsize')
1 0.000041 0.000008 let proc.set_winsize = s:funcref('vp_set_winsize')
1 0.000023 0.000006 let proc.kill = s:funcref('vp_kill')
1 0.000035 0.000005 let proc.waitpid = s:funcref('vp_waitpid')
1 0.000021 0.000006 let proc.checkpid = s:funcref('vp_checkpid')
1 0.000002 let proc.is_valid = 1
1 0.000002 let proc.is_pty = is_pty
1 0.000001 if a:is_pty
let proc.ttyname = ''
let proc.width = winwidth(0) - &l:numberwidth - &l:foldcolumn
let proc.height = winheight(0)
let proc.get_winsize = s:funcref('vp_get_winsize')
let proc.set_winsize = s:funcref('vp_set_winsize')
endif
1 0.000048 return proc
FUNCTION neocomplete#is_multibyte_input()
Called 2 times
Total time: 0.000027
Self time: 0.000027
count total (s) self (s)
2 0.000026 return (exists('b:skk_on') && b:skk_on) || (!g:neocomplete#enable_multibyte_completion && char2nr(split(a:cur_text, '\zs')[-1]) > 0x80)
FUNCTION neocomplete#filters#escape()
Called 18 times
Total time: 0.000180
Self time: 0.000180
count total (s) self (s)
" Escape string for lua regexp.
18 0.000163 return substitute(a:string, '[%\[\]().*+?^$-]', '%\0', 'g')
FUNCTION neocomplete#complete_check()
Called 16 times
Total time: 0.000772
Self time: 0.000058
count total (s) self (s)
16 0.000767 0.000053 return neocomplete#helper#complete_check()
FUNCTION <SNR>61_record()
Called 1 time
Total time: 0.000213
Self time: 0.000061
count total (s) self (s)
1 0.000008 if s:exclnomod && &l:modifiable | retu | en
1 0.000003 if s:exclnomod && !&l:modifiable | retu | en
1 0.000003 if s:locked | retu | en
1 0.000004 let bufnr = a:bufnr + 0
1 0.000006 let bufname = bufname(bufnr)
1 0.000004 if bufnr > 0 && !empty(bufname)
1 0.000008 cal filter(s:mrbs, 'v:val != bufnr')
1 0.000003 cal insert(s:mrbs, bufnr)
1 0.000170 0.000018 cal s:addtomrufs(bufname)
1 0.000000 en
FUNCTION <SNR>101_conn_try()
Called 1 time
Total time: 0.023661
Self time: 0.000027
count total (s) self (s)
1 0.000000 try
1 0.023649 0.000015 return call(a:connection[a:function], a:000, a:connection)
catch /^\w\+ Connection Error:/
call s:unregister_connection(a:connection)
throw v:exception
endtry
FUNCTION <SNR>164_complete_key()
Called 1 time
Total time: 0.000089
Self time: 0.000022
count total (s) self (s)
1 0.000008 set completeopt-=longest
1 0.000076 0.000009 call neocomplete#helper#complete_configure()
1 0.000005 call feedkeys(a:key)
FUNCTION <SNR>133_substitute_path_separator()
Called 7 times
Total time: 0.000024
Self time: 0.000024
count total (s) self (s)
7 0.000020 return s:is_windows ? substitute(a:path, '\\', '/', 'g') : a:path
FUNCTION localcomplete#getAdditionalKeywordChars()
Called 2 times
Total time: 0.000061
Self time: 0.000023
count total (s) self (s)
2 0.000008 let l:variableList = [ "b:LocalCompleteAdditionalKeywordChars", "g:localcomplete#AdditionalKeywordChars" ]
2 0.000052 0.000014 return s:variableFallback(l:variableList)
FUNCTION <SNR>149_get_sources_list()
Called 3 times
Total time: 0.000540
Self time: 0.000102
count total (s) self (s)
3 0.000007 let filetypes_dict = {}
6 0.000466 0.000028 for filetype in neocomplete#get_source_filetypes( neocomplete#get_context_filetype())
3 0.000009 let filetypes_dict[filetype] = 1
3 0.000001 endfor
3 0.000045 return values(filter(copy(s:buffer_sources), "has_key(filetypes_dict, v:val.filetype) || has_key(filetypes_dict, '_') || bufnr('%') == v:key || (bufname('%') ==# '[Command Line]' && bufwinnr('#') == v:key)"))
FUNCTION fireplace#nrepl#next_id()
Called 1 time
Total time: 0.000018
Self time: 0.000018
count total (s) self (s)
1 0.000001 let s:id += 1
1 0.000016 return 'fireplace-'.hostname().'-'.s:vim_id.'-'.s:id
FUNCTION neocomplete#get_source_filetypes()
Called 35 times
Total time: 0.002724
Self time: 0.000239
count total (s) self (s)
35 0.002706 0.000221 return neocomplete#helper#get_source_filetypes(a:filetype)
FUNCTION <SNR>183__encode_name()
Called 7 times
Total time: 0.000458
Self time: 0.000203
count total (s) self (s)
" Check cache directory.
7 0.000032 if !isdirectory(a:cache_dir)
call mkdir(a:cache_dir, 'p')
endif
7 0.000015 let cache_dir = a:cache_dir
7 0.000061 if cache_dir !~ '/$'
7 0.000013 let cache_dir .= '/'
7 0.000003 endif
7 0.000299 0.000044 return cache_dir . s:_create_hash(cache_dir, a:filename)
FUNCTION fireplace#op_available()
Called 1 time
Total time: 0.000646
Self time: 0.000024
count total (s) self (s)
1 0.000001 try
1 0.000623 0.000006 let client = fireplace#platform()
1 0.000002 if has_key(client, 'connection')
1 0.000016 0.000011 return client.connection.has_op(a:op)
endif
catch /^Fireplace: :Connect to a REPL/
endtry
FUNCTION <SNR>149_make_cache_file()
Called 1 time
Total time: 0.014174
Self time: 0.000300
count total (s) self (s)
" Initialize source.
1 0.001163 0.000010 call s:initialize_source(a:srcname)
1 0.000003 let source = s:buffer_sources[a:srcname]
1 0.000033 if !filereadable(source.path) || getbufvar(a:srcname, '&modified') || getbufvar(a:srcname, '&buftype') =~ 'nofile\|acwrite'
call s:make_cache_buffer(a:srcname)
return
endif
1 0.000015 0.000007 call neocomplete#print_debug('make_cache_buffer: ' . source.path)
1 0.012787 0.000074 let source.cache_name = neocomplete#cache#async_load_from_file( 'buffer_cache', source.path, source.keyword_pattern, 'B')
1 0.000007 let source.cached_time = localtime()
1 0.000007 let source.filetype = getbufvar(a:srcname, '&filetype')
1 0.000013 let s:async_dictionary_list[source.path] = [{ 'filename' : source.path, 'cachename' : source.cache_name, }]
FUNCTION localcomplete#getWantOriginNote()
Called 2 times
Total time: 0.000069
Self time: 0.000019
count total (s) self (s)
2 0.000008 let l:variableList = [ "b:LocalCompleteShowOriginNote", "g:localcomplete#ShowOriginNote" ]
2 0.000058 0.000008 return s:numericVariableFallback(l:variableList, 1)
FUNCTION neocomplete#print_debug()
Called 17 times
Total time: 0.000080
Self time: 0.000080
count total (s) self (s)
17 0.000027 if g:neocomplete#enable_debug
echomsg string(a:expr)
endif
FUNCTION neosnippet#variables#current_neosnippet()
Called 1 time
Total time: 0.000008
Self time: 0.000008
count total (s) self (s)
1 0.000002 if !exists('b:neosnippet')
let b:neosnippet = { 'snippets' : {}, 'selected_text' : '', 'target' : '', 'trigger' : 0, 'optional_tabstop' : 0,}
endif
1 0.000001 return b:neosnippet
FUNCTION neocomplete#helper#get_source_filetypes()
Called 35 times
Total time: 0.002485
Self time: 0.001972
count total (s) self (s)
35 0.000124 let filetype = (a:filetype == '') ? 'nothing' : a:filetype
35 0.000061 let filetypes = [filetype]
35 0.000122 if filetype =~ '\.'
if exists('g:neocomplete#ignore_composite_filetypes') && has_key(g:neocomplete#ignore_composite_filetypes, filetype)
let filetypes = [g:neocomplete#ignore_composite_filetypes[filetype]]
else
" Set composite filetype.
let filetypes += split(filetype, '\.')
endif
endif
35 0.000108 if exists('g:neocomplete#same_filetypes')
70 0.000146 for ft in copy(filetypes)
35 0.000294 let filetypes += split(get(g:neocomplete#same_filetypes, ft, get(g:neocomplete#same_filetypes, '_', '')), ',')
35 0.000031 endfor
35 0.000027 endif
35 0.000669 0.000156 if neocomplete#is_text_mode()
call add(filetypes, 'text')
endif
35 0.000060 if len(filetypes) > 1
let filetypes = neocomplete#util#uniq(filetypes)
endif
35 0.000032 return filetypes
FUNCTION neocomplete#helper#get_cur_text()
Called 10 times
Total time: 0.000681
Self time: 0.000617
count total (s) self (s)
10 0.000097 0.000033 let neocomplete = neocomplete#get_current_neocomplete()
10 0.000030 let is_skip_char = get(a:000, 0, 0)
10 0.000213 let cur_text = ((neocomplete.event ==# 'InsertEnter' || mode() ==# 'i') ? (col('.')-1) : col('.')) >= len(getline('.')) ? getline('.') : matchstr(getline('.'), '^.*\%' . (mode() ==# 'i' && !is_skip_char ? col('.') : col('.') - 1) . 'c' . (mode() ==# 'i' ? '' : '.'))
10 0.000077 if cur_text =~ '^.\{-}\ze\S\+$'
9 0.000057 let complete_str = matchstr(cur_text, '\S\+$')
9 0.000046 let cur_text = matchstr(cur_text, '^.\{-}\ze\S\+$')
9 0.000009 else
1 0.000002 let complete_str = ''
1 0.000001 endif
10 0.000014 if neocomplete.event ==# 'InsertCharPre'
let complete_str .= v:char
endif
10 0.000033 let neocomplete.cur_text = cur_text . complete_str
" Save cur_text.
10 0.000013 return neocomplete.cur_text
FUNCTION neocomplete#cache#check_cache()
Called 2 times
Total time: 0.000050
Self time: 0.000050
count total (s) self (s)
2 0.000006 if !has_key(a:async_cache_dictionary, a:key)
1 0.000000 return
endif
1 0.000002 let cache_list = a:async_cache_dictionary[a:key]
1 0.000003 if !has_key(a:keyword_cache, a:key)
let a:keyword_cache[a:key] = []
endif
1 0.000018 for cache in filter(copy(cache_list), 'filereadable(v:val.cachename)')
let a:keyword_cache[a:key] += neocomplete#cache#load_from_cache( a:cache_dir, cache.filename, a:is_string)
endfor
1 0.000007 call filter(cache_list, '!filereadable(v:val.cachename)')
1 0.000002 if empty(cache_list)
" Delete from dictionary.
call remove(a:async_cache_dictionary, a:key)
return
endif
FUNCTION neocomplete#complete#_set_results_pos()
Called 2 times
Total time: 0.006488
Self time: 0.001713
count total (s) self (s)
" Initialize sources.
2 0.000022 0.000009 let neocomplete = neocomplete#get_current_neocomplete()
2 0.000037 0.000007 let filetype = neocomplete#get_context_filetype()
2 0.000014 let sources = (a:0 > 0) ? a:1 : (filetype ==# neocomplete.sources_filetype) ? neocomplete.sources : neocomplete#helper#get_sources_list()
2 0.000008 let pos = winsaveview()
" Try source completion. "{{{
2 0.000002 let complete_sources = []
26 0.002456 0.000162 for source in filter(values(sources), 'neocomplete#helper#is_enabled_source(v:val, filetype)')
24 0.000030 if !source.loaded
call neocomplete#helper#call_hook(source, 'on_init', {})
let source.loaded = 1
endif
24 0.000057 let context = source.neocomplete__context
24 0.000056 let context.input = a:cur_text
24 0.000017 try
24 0.002706 0.000380 let complete_pos = has_key(source, 'get_complete_position') ? source.get_complete_position(context) : neocomplete#helper#match_word(context.input, neocomplete#get_keyword_pattern_end(filetype, source.name))[0]
24 0.000021 catch
call neocomplete#print_error(v:throwpoint)
call neocomplete#print_error(v:exception)
call neocomplete#print_error( 'Error occurred in source''s get_complete_position()!')
call neocomplete#print_error( 'Source name is ' . source.name)
return complete_sources
finally
24 0.000114 if winsaveview() != pos
call winrestview(pos)
endif
24 0.000019 endtry
24 0.000028 if complete_pos < 0
15 0.000024 let context.complete_pos = -1
15 0.000027 let context.complete_str = ''
15 0.000016 continue
endif
9 0.000022 let complete_str = context.input[complete_pos :]
9 0.000159 0.000047 if neocomplete#is_auto_complete() && len(complete_str) < source.min_pattern_length
" Skip.
let context.complete_pos = -1
let context.complete_str = ''
continue
endif
9 0.000017 let context.complete_pos = complete_pos
9 0.000020 let context.complete_str = complete_str
9 0.000025 call add(complete_sources, source)
9 0.000008 endfor
"}}}
2 0.000002 return complete_sources
FUNCTION neocomplete#helper#check_invalid_omnifunc()
Called 7 times
Total time: 0.000043
Self time: 0.000043
count total (s) self (s)
7 0.000041 return a:omnifunc == '' || (a:omnifunc !~ '#' && !exists('*' . a:omnifunc))
FUNCTION neocomplete#mappings#popup_post()
Called 1 time
Total time: 0.000006
Self time: 0.000006
count total (s) self (s)
1 0.000005 return !pumvisible() ? "" : g:neocomplete#enable_auto_select ? "\<C-p>\<Down>" : "\<C-p>"
FUNCTION neocomplete#cache#async_load_from_file()
Called 1 time
Total time: 0.012713
Self time: 0.000095
count total (s) self (s)
1 0.000281 0.000018 if !neocomplete#cache#check_old_cache(a:cache_dir, a:filename) || neocomplete#util#is_sudo()
return neocomplete#cache#encode_name(a:cache_dir, a:filename)
endif
1 0.000145 0.000006 let pattern_file_name = neocomplete#cache#encode_name('keyword_patterns', a:filename)
1 0.000120 0.000005 let cache_name = neocomplete#cache#encode_name(a:cache_dir, a:filename)
" Create pattern file.
1 0.000256 0.000014 call neocomplete#cache#writefile( 'keyword_patterns', a:filename, [a:pattern])
" args: funcname, outputname, filename pattern mark
" minlen maxlen encoding
1 0.000006 let fileencoding = &fileencoding == '' ? &encoding : &fileencoding
1 0.000006 let argv = [ 'load_from_file', cache_name, a:filename, pattern_file_name, a:mark, g:neocomplete#min_keyword_length, fileencoding ]
1 0.011891 0.000032 return s:async_load(argv, a:cache_dir, a:filename)
FUNCTION <SNR>85_buffer_contents()
Called 1 time
Total time: 0.000117
Self time: 0.000117
count total (s) self (s)
1 0.000001 let eol = "\n"
1 0.000116 return join(getbufline(bufname('%'), 1, '$'), eol) . eol
FUNCTION 79()
Called 2 times
Total time: 0.000079
Self time: 0.000031
count total (s) self (s)
" Check member prefix pattern.
2 0.000061 0.000013 let filetype = neocomplete#get_context_filetype()
2 0.000012 if get(g:neocomplete#sources#member#prefix_patterns, filetype, '') == ''
2 0.000002 return -1
endif
let member = s:get_member_pattern(filetype)
let prefix = g:neocomplete#sources#member#prefix_patterns[filetype]
let complete_pos = matchend(a:context.input, member . '\m\%(' . prefix . '\m\)\ze\w*$')
return complete_pos
FUNCTION neocomplete#util#expand()
Called 7 times
Total time: 0.000123
Self time: 0.000123
count total (s) self (s)
7 0.000110 return expand(escape(a:path, '*?[]"={}'), 1)
FUNCTION neocomplete#handler#_on_insert_leave()
Called 1 time
Total time: 0.004625
Self time: 0.000049
count total (s) self (s)
1 0.001274 0.000008 call neocomplete#helper#clear_result()
1 0.000019 0.000008 call s:close_preview_window()
1 0.003317 0.000023 call s:make_cache_current_line()
1 0.000008 0.000003 let neocomplete = neocomplete#get_current_neocomplete()
1 0.000002 let neocomplete.cur_text = ''
1 0.000002 let neocomplete.completed_item = {}
1 0.000001 let neocomplete.overlapped_items = {}
FUNCTION <SNR>158_set_complete_results_words()
Called 1 time
Total time: 0.281346
Self time: 0.000105
count total (s) self (s)
" Try source completion.
2 0.000006 for [omnifunc, result] in items(a:complete_results)
1 0.000053 0.000003 if neocomplete#complete_check()
return a:complete_results
endif
1 0.000002 let pos = getpos('.')
1 0.000000 try
1 0.000002 call cursor(0, result.complete_pos)
1 0.280661 0.000007 let ret = call(omnifunc, [0, result.complete_str])
1 0.000004 let list = type(ret) == type([]) ? ret : ret.words
1 0.000001 catch
call neocomplete#print_error( 'Error occurred calling omnifunction: ' . omnifunc)
call neocomplete#print_error(v:throwpoint)
call neocomplete#print_error(v:exception)
let list = []
finally
1 0.000003 call setpos('.', pos)
1 0.000000 endtry
1 0.000548 0.000011 let list = s:get_omni_list(list)
1 0.000002 let result.candidates = list
1 0.000001 endfor
1 0.000001 return a:complete_results
FUNCTION <SNR>85_py_get_cache()
Called 1 time
Total time: 0.000091
Self time: 0.000091
count total (s) self (s)
1 0.000090 RCPython recentcomplete.get_cache()
FUNCTION <SNR>194_nrepl_message()
Called 1 time
Total time: 0.023634
Self time: 0.000021
count total (s) self (s)
1 0.000053 0.000007 let msg = self.prepare(a:msg)
1 0.000002 let sel = {'id': msg.id}
1 0.023579 0.000012 return call(self.call, [msg, ['done'], sel] + a:000, self)
FUNCTION <SNR>85_matches()
Called 1 time
Total time: 0.012156
Self time: 0.000408
count total (s) self (s)
1 0.000217 0.000007 let commands = [ s:buffer_keywords(), ]
1 0.010326 0.000019 let output = join(s:py_run_commands(commands))
1 0.000119 0.000028 let output .= s:py_get_cache()
1 0.001154 0.000014 let keywords = s:extract_keywords_from_diff(output)
1 0.000006 let base = escape(a:keyword_base, '\\/.*$^~[]')
1 0.000310 let result = filter(keywords, "v:val =~# '^".base."'")
1 0.000017 call map(result, "{ 'word': v:val, 'menu': '~' }")
1 0.000002 return result
FUNCTION <SNR>130_get_list()
Called 3 times
Total time: 0.000030
Self time: 0.000030
count total (s) self (s)
3 0.000010 if !exists('s:List')
let s:List = neocomplete#util#get_vital().import('Data.List')
endif
3 0.000004 return s:List
FUNCTION <SNR>85_extract_keywords_from_diff()
Called 1 time
Total time: 0.001140
Self time: 0.001140
count total (s) self (s)
1 0.001139 return split(substitute(a:diff, '\k\@!.', ' ', 'g'))
FUNCTION <SNR>193_nrepl_transport_dispatch()
Called 1 time
Total time: 0.023338
Self time: 0.023338
count total (s) self (s)
1 0.023330 python fireplace_repl_dispatch(vim.eval('a:command'), *vim.eval('a:000'))
1 0.000005 if !exists('err')
1 0.000002 return out
endif
throw 'nREPL Connection Error: '.err
FUNCTION neosnippet#init#check()
Called 3 times
Total time: 0.000015
Self time: 0.000015
count total (s) self (s)
3 0.000007 if !exists('s:is_initialized')
call neosnippet#init#_initialize()
endif
FUNCTION <SNR>155_fdopen()
Called 3 times
Total time: 0.000312
Self time: 0.000081
count total (s) self (s)
3 0.000310 0.000079 return { 'fd' : a:fd, 'eof' : 0, '__eof' : 0, 'is_valid' : 1, 'buffer' : [], 'f_close' : s:funcref(a:f_close), 'f_read' : s:funcref(a:f_read), 'f_write' : s:funcref(a:f_write), 'close' : s:funcref('close'), 'read' : s:funcref('read'), 'write' : s:funcref('write'), 'read_line' : s:funcref('read_line'), 'read_lines' : s:funcref('read_lines'),}
FUNCTION neocomplete#helper#complete_configure()
Called 1 time
Total time: 0.000067
Self time: 0.000031
count total (s) self (s)
1 0.000035 0.000007 call s:save_foldinfo()
1 0.000003 set completeopt-=menu
1 0.000001 set completeopt-=longest
1 0.000002 set completeopt+=menuone
" Set options.
1 0.000008 0.000003 let neocomplete = neocomplete#get_current_neocomplete()
1 0.000002 let neocomplete.completeopt = &completeopt
1 0.000010 0.000007 if neocomplete#util#is_complete_select()
if g:neocomplete#enable_auto_select
set completeopt-=noselect
set completeopt+=noinsert
else
set completeopt+=noinsert,noselect
endif
endif
FUNCTION <SNR>155_vp_pgroup_close()
Called 3 times
Total time: 0.001227
Self time: 0.000031
count total (s) self (s)
3 0.001222 0.000026 call self.fd.close()
FUNCTION vimproc#util#has_iconv()
Called 17 times
Total time: 0.000067
Self time: 0.000067
count total (s) self (s)
" On Windows, some encodings can be converted by iconv() even if
" libiconv.dll is not available.
17 0.000049 return (has('iconv') || (s:is_windows && exists('*iconv')))
FUNCTION <SNR>102_portfile()
Called 2 times
Total time: 0.000043
Self time: 0.000043
count total (s) self (s)
2 0.000006 if !exists('b:leiningen_root')
return ''
endif
2 0.000003 let root = b:leiningen_root
2 0.000008 let portfiles = [root.'/.nrepl-port', root.'/target/repl-port', root.'/target/repl/repl-port']
2 0.000004 for f in portfiles
2 0.000010 if getfsize(f) > 0
2 0.000002 return f
endif
endfor
return ''
FUNCTION neocomplete#mappings#auto_complete()
Called 1 time
Total time: 0.011412
Self time: 0.000248
count total (s) self (s)
1 0.000010 0.000004 let neocomplete = neocomplete#get_current_neocomplete()
1 0.000092 0.000005 let cur_text = neocomplete#get_cur_text(1)
1 0.000028 0.000003 let complete_pos = neocomplete#complete#_get_complete_pos( neocomplete.complete_sources)
1 0.000002 let base = cur_text[complete_pos :]
1 0.011061 0.000015 let neocomplete.candidates = neocomplete#complete#_get_words( neocomplete.complete_sources, complete_pos, base)
1 0.000002 let neocomplete.complete_str = base
" Start auto complete.
1 0.000212 call complete(complete_pos+1, neocomplete.candidates)
1 0.000001 return ''
FUNCTION <SNR>185_compare_source_rank()
Called 18 times
Total time: 0.000026
Self time: 0.000026
count total (s) self (s)
18 0.000019 return a:i2.rank - a:i1.rank
FUNCTION neocomplete#helper#is_enabled_source()
Called 31 times
Total time: 0.003372
Self time: 0.000708
count total (s) self (s)
31 0.000262 0.000219 let source = type(a:source) == type('') ? get(neocomplete#variables#get_sources(), a:source, {}) : a:source
31 0.003064 0.000443 return !empty(source) && (empty(source.filetypes) || !empty(neocomplete#helper#ftdictionary2list( source.filetypes, a:filetype))) && (!get(source.disabled_filetypes, '_', 0) && empty(neocomplete#helper#ftdictionary2list( source.disabled_filetypes, a:filetype)))
FUNCTION sexp#opening_insertion()
Called 1 time
Total time: 0.000307
Self time: 0.000099
count total (s) self (s)
1 0.000017 let [_b, line, col, _o] = getpos('.')
1 0.000230 0.000022 if s:syntax_match(s:ignored_region, line, col) && s:compare_pos(s:current_element_terminal(0), [0, line, col, 0]) < 0
return a:bra
endif
1 0.000004 let curline = getline(line)
1 0.000003 let cur = curline[col - 1]
1 0.000003 let prev = curline[col - 2]
1 0.000002 let pprev = curline[col - 3]
1 0.000002 if prev ==# '\' && pprev !=# '\'
return a:bra
endif
1 0.000001 let buf = ''
1 0.000001 let buftail = ''
1 0.000003 let ket = s:pairs[a:bra]
1 0.000007 if prev =~# '\v\S' && prev !~# s:opening_bracket && !s:is_macro_char(prev)
let buf .= ' '
endif
1 0.000003 let buf .= a:bra . ket
1 0.000005 let buftail .= "\<Left>"
1 0.000004 if cur =~# '\v\S' && cur !~# s:closing_bracket
let buf .= ' '
let buftail .= "\<Left>"
endif
1 0.000002 return buf . buftail
FUNCTION fireplace#platform()
Called 2 times
Total time: 0.001107
Self time: 0.000752
count total (s) self (s)
6 0.000019 for [k, v] in items(s:repl_portfiles)
4 0.000028 if getftime(k) != v.time
call s:unregister_connection(v.connection)
endif
4 0.000005 endfor
2 0.000438 let portfile = findfile('.nrepl-port', '.;')
2 0.000006 if !empty(portfile)
2 0.000110 0.000037 call fireplace#register_port_file(portfile, fnamemodify(portfile, ':p:h'))
2 0.000002 endif
2 0.000288 0.000037 silent doautocmd User FireplacePreConnect
2 0.000040 0.000009 let buf = a:0 ? a:1 : s:buf()
2 0.000063 let root = simplify(fnamemodify(bufname(buf), ':p:s?[\/]$??'))
2 0.000002 let previous = ""
8 0.000012 while root !=# previous
8 0.000015 if has_key(s:repl_paths, root)
2 0.000005 return s:repl_paths[root]
endif
6 0.000008 let previous = root
6 0.000015 let root = fnamemodify(root, ':h')
6 0.000004 endwhile
for repl in s:repls
if s:includes_file(fnamemodify(bufname(buf), ':p'), repl.path())
return repl
endif
endfor
let path = s:path_extract(getbufvar(buf, '&path'))
if !empty(path) && fnamemodify(bufname(buf), ':e') =~# '^cljx\=$'
return extend({'_path': path, 'nr': bufnr(buf)}, s:oneoff)
endif
throw 'Fireplace: :Connect to a REPL or install classpath.vim'
FUNCTION neocomplete#handler#_on_moved_i()
Called 2 times
Total time: 0.000085
Self time: 0.000052
count total (s) self (s)
2 0.000031 0.000014 let neocomplete = neocomplete#get_current_neocomplete()
2 0.000006 if neocomplete.linenr != line('.')
call neocomplete#helper#clear_result()
endif
2 0.000005 let neocomplete.linenr = line('.')
2 0.000033 0.000017 call s:close_preview_window()
FUNCTION <SNR>85_git_diff()
Called 1 time
Total time: 0.000012
Self time: 0.000012
count total (s) self (s)
1 0.000001 let extra = ''
1 0.000001 if a:0 > 0
let extra = a:1
endif
1 0.000007 return " git diff --diff-filter=AM --no-color " . a:args ." 2>/dev/null". " | grep \\^+\s*.. 2>/dev/null". " | grep -v '+++ [ab]/' 2>/dev/null". " | sed 's/^+//' 2>/dev/null". extra. " || true"
FUNCTION <SNR>174_is_beginning_of_line()
Called 1 time
Total time: 0.000021
Self time: 0.000021
count total (s) self (s)
1 0.000002 let keyword_pattern = '\S\+'
1 0.000007 let cur_keyword_str = matchstr(a:cur_text, keyword_pattern.'$')
1 0.000004 let line_part = a:cur_text[: -1-len(cur_keyword_str)]
1 0.000005 let prev_word_end = matchend(line_part, keyword_pattern)
1 0.000001 return prev_word_end <= 0
FUNCTION neobundle#config#get_autoload_bundles()
Called 1 time
Total time: 0.000155
Self time: 0.000155
count total (s) self (s)
1 0.000154 return filter(values(s:neobundles), "!v:val.sourced && v:val.lazy && !v:val.disabled")
FUNCTION <SNR>101_buf()
Called 3 times
Total time: 0.000098
Self time: 0.000098
count total (s) self (s)
3 0.000005 if exists('s:input')
return s:input
elseif has_key(s:qffiles, expand('%:p'))
return s:qffiles[expand('%:p')].buffer
else
3 0.000002 return '%'
endif
FUNCTION recentcomplete#update_cache()
Called 5 times
Total time: 0.011526
Self time: 0.011526
count total (s) self (s)
5 0.011471 RCPython recentcomplete.update_cache()
FUNCTION neobundle#autoload#insert()
Called 1 time
Total time: 0.000200
Self time: 0.000045
count total (s) self (s)
1 0.000186 0.000031 let bundles = filter(neobundle#config#get_autoload_bundles(), "get(v:val.autoload, 'insert', 0)")
1 0.000004 if !empty(bundles)
call neobundle#config#source_bundles(bundles)
doautocmd InsertEnter
endif
FUNCTION <SNR>149_exists_current_source()
Called 3 times
Total time: 0.000106
Self time: 0.000034
count total (s) self (s)
3 0.000103 0.000031 return has_key(s:buffer_sources, bufnr('%')) && !s:check_changed_buffer(bufnr('%'))
FUNCTION <SNR>155_vp_pipe_open()
Called 1 time
Total time: 0.002264
Self time: 0.000353
count total (s) self (s)
1 0.000002 try
1 0.000005 0.000003 if vimproc#util#is_windows()
let cmdline = s:quote_arg(substitute(a:argv[0], '/', '\', 'g'))
for arg in a:argv[1:]
let cmdline .= ' ' . s:quote_arg(arg)
endfor
let [pid; fdlist] = s:libcall('vp_pipe_open', [a:npipe, a:hstdin, a:hstdout, a:hstderr, cmdline])
else
1 0.002215 0.000306 let [pid; fdlist] = s:libcall('vp_pipe_open', [a:npipe, a:hstdin, a:hstdout, a:hstderr, len(a:argv)] + a:argv)
1 0.000002 endif
1 0.000001 catch
call s:print_error(v:throwpoint)
call s:print_error(v:exception)
call s:print_error( 'vimproc: Error occurred in calling s:vp_pipe_open()')
call s:print_error(printf( 'a:argv = %s', string(a:argv)))
call s:print_error(printf( 'original a:argv = %s', vimproc#util#iconv( string(a:argv), vimproc#util#systemencoding(), &encoding)))
endtry
1 0.000003 if a:npipe != len(fdlist)
call s:print_error(printf( 'a:npipe = %d, a:argv = %s', a:npipe, string(a:argv)))
call s:print_error(printf( 'pid = %d, fdlist = %s', pid, string(fdlist)))
echoerr 'Bug behavior is detected!: ' . pid
endif
1 0.000003 return [pid] + fdlist
FUNCTION neocomplete#handler#_on_insert_enter()
Called 1 time
Total time: 0.000502
Self time: 0.000062
count total (s) self (s)
1 0.000031 0.000012 if !neocomplete#is_enabled()
return
endif
1 0.000023 0.000006 let neocomplete = neocomplete#get_current_neocomplete()
1 0.000005 if neocomplete.linenr != line('.')
1 0.000420 0.000016 call neocomplete#helper#clear_result()
1 0.000001 endif
1 0.000004 let neocomplete.linenr = line('.')
1 0.000006 if &l:foldmethod ==# 'expr' && foldlevel('.') != 0
foldopen
endif
FUNCTION neocomplete#helper#call_hook()
Called 6 times
Total time: 0.000228
Self time: 0.000211
count total (s) self (s)
12 0.000049 0.000032 for source in neocomplete#util#convert2list(a:sources)
6 0.000006 try
6 0.000016 if has_key(source.hooks, a:hook_name)
call call(source.hooks[a:hook_name], [extend(source.neocomplete__context, a:context)], source.hooks)
endif
6 0.000005 catch
call neocomplete#print_error(v:throwpoint)
call neocomplete#print_error(v:exception)
call neocomplete#print_error( '[unite.vim] Error occurred in calling hook "' . a:hook_name . '"!')
call neocomplete#print_error( '[unite.vim] Source name is ' . source.name)
endtry
6 0.000004 endfor
FUNCTION neocomplete#handler#_on_complete_done()
Called 1 time
Total time: 0.001144
Self time: 0.000754
count total (s) self (s)
1 0.000034 0.000012 let neocomplete = neocomplete#get_current_neocomplete()
" Get cursor word.
1 0.000004 if exists('v:completed_item')
" Use v:completed_item feature.
if empty(v:completed_item)
return
endif
let complete_str = v:completed_item.word
if complete_str == ''
return
endif
if (v:completed_item.abbr != '' && len(v:completed_item.word) < len(v:completed_item.abbr)) || v:completed_item.info != ''
let neocomplete.completed_item = v:completed_item
endif
else
1 0.000035 let cur_text = matchstr(getline('.'), '^.*\%'.col('.').'c')
1 0.000299 0.000011 let complete_str = neocomplete#helper#match_word(cur_text)[1]
1 0.000003 if complete_str == ''
" Use default keyword pattern.
let complete_str = matchstr(cur_text, '\h\w*\(()\?\)\?$')
if complete_str == ''
return
endif
endif
1 0.000579 let candidates = filter(copy(neocomplete.candidates), "v:val.word ==# complete_str && ((get(v:val, 'abbr', '') != '' && v:val.word !=# v:val.abbr && v:val.abbr[-1] != '~') || get(v:val, 'info', '') != '')")
1 0.000009 if !empty(candidates)
let neocomplete.completed_item = candidates[0]
endif
1 0.000002 endif
" Restore overlapped item
1 0.000007 if exists('v:completed_item') && has_key(neocomplete.overlapped_items, complete_str)
" Move cursor
call cursor(0, col('.') - len(complete_str) + len(neocomplete.overlapped_items[complete_str]))
let complete_str = neocomplete.overlapped_items[complete_str]
endif
1 0.000092 0.000012 let frequencies = neocomplete#variables#get_frequencies()
1 0.000004 if !has_key(frequencies, complete_str)
let frequencies[complete_str] = 20
else
1 0.000007 let frequencies[complete_str] += 20
1 0.000001 endif
FUNCTION <SNR>149_should_create_cache()
Called 4 times
Total time: 0.000225
Self time: 0.000225
count total (s) self (s)
4 0.000145 let filepath = fnamemodify(bufname(a:bufnr), ':p')
4 0.000071 return getfsize(filepath) < g:neocomplete#sources#buffer#cache_limit_size && getbufvar(a:bufnr, '&modifiable') && !getwinvar(bufwinnr(a:bufnr), '&previewwindow') && (g:neocomplete#sources#buffer#disabled_pattern == '' || filepath !~# g:neocomplete#sources#buffer#disabled_pattern)
FUNCTION neocomplete#is_locked()
Called 7 times
Total time: 0.000392
Self time: 0.000070
count total (s) self (s)
7 0.000389 0.000067 return neocomplete#is_cache_disabled() || &paste || (&t_Co != '' && &t_Co < 8) || g:neocomplete#disable_auto_complete
FUNCTION <SNR>85_shellescape()
Called 1 time
Total time: 0.000031
Self time: 0.000031
count total (s) self (s)
1 0.000031 return substitute(a:str, "'", "'\"'\"'", 'g')
FUNCTION 65()
Called 1 time
Total time: 0.000740
Self time: 0.000043
count total (s) self (s)
1 0.000614 0.000011 call s:check_async_cache()
1 0.000001 let keyword_list = []
2 0.000102 0.000008 for source in s:get_sources_list()
1 0.000018 let keyword_list += source.words
1 0.000001 endfor
1 0.000001 return keyword_list
FUNCTION <SNR>183_getfilename()
Called 5 times
Total time: 0.000385
Self time: 0.000033
count total (s) self (s)
5 0.000383 0.000031 return s:_encode_name(a:cache_dir, a:filename)
FUNCTION <SNR>164_is_skip_auto_complete()
Called 3 times
Total time: 0.000102
Self time: 0.000079
count total (s) self (s)
3 0.000035 0.000012 let neocomplete = neocomplete#get_current_neocomplete()
3 0.000033 if (g:neocomplete#lock_iminsert && &l:iminsert) || (&l:formatoptions =~# '[tca]' && &l:textwidth > 0 && strwidth(a:cur_text) >= &l:textwidth)
let neocomplete.skip_next_complete = 0
return 1
endif
3 0.000007 let skip = neocomplete.skip_next_complete
3 0.000004 if !skip
3 0.000003 return 0
endif
" Check delimiter pattern.
let is_delimiter = 0
let filetype = neocomplete#get_context_filetype()
for delimiter in ['/', '.'] + get(g:neocomplete#delimiter_patterns, filetype, [])
if stridx(a:cur_text, delimiter, len(a:cur_text) - len(delimiter)) >= 0
let is_delimiter = 1
break
endif
endfor
let neocomplete.skip_next_complete = 0
return !(is_delimiter && skip == 2)
FUNCTION neocomplete#util#convert2list()
Called 10 times
Total time: 0.000033
Self time: 0.000033
count total (s) self (s)
10 0.000032 return type(a:expr) ==# type([]) ? a:expr : [a:expr]
FUNCTION neocomplete#filters#converter_remove_overlap#length()
Called 242 times
Total time: 0.008067
Self time: 0.008067
count total (s) self (s)
242 0.000405 if a:left == '' || a:right == ''
return 0
endif
242 0.000215 let ret = 0
242 0.000165 lua << EOF
do
local ret = vim.eval('ret')
local left = vim.eval('a:left')
local right = vim.eval('a:right')
local left_len = string.len(left)
local right_len = string.len(right)
if left_len > right_len then
left = string.sub(left, left_len-right_len, left_len)
elseif left_len < right_len then
right = string.sub(right, 0, left_len)
end
if left == right then
ret = math.min(left_len, right_len)
else
local length = 1
left_len = string.len(left)
while 1 do
local pattern = string.sub(left, left_len-length+1, left_len)
local pos = string.find(right, pattern, 1, 1)
if pos == nil then
break
end
length = length + pos - 1
if string.sub(left, left_len-length+1, left_len) ==
string.sub(right, 1, length) then
ret = length
length = length + 1
end
end
end
vim.command('let ret = ' .. ret)
end
EOF
242 0.000165 return ret
FUNCTION 52()
Called 1 time
Total time: 0.001398
Self time: 0.000138
count total (s) self (s)
1 0.001270 0.000010 let result = localcomplete#allBufferMatches(0, a:context.complete_str[0])
1 0.000127 call map(result, "{ 'word': v:val.word, 'menu': '[L]' }")
1 0.000001 return result
FUNCTION <SNR>155_vp_pipe_close()
Called 3 times
Total time: 0.000990
Self time: 0.000048
count total (s) self (s)
" echomsg 'close:'.self.fd
3 0.000007 if self.fd != 0
3 0.000969 0.000027 call s:libcall('vp_pipe_close', [self.fd])
3 0.000006 let self.fd = 0
3 0.000002 endif
FUNCTION <SNR>186_which()
Called 1 time
Total time: 0.000030
Self time: 0.000030
count total (s) self (s)
1 0.000005 let maxcount = (a:0 >= 2 && type(a:2) == type(0)) ? a:2 : 1
1 0.000003 if maxcount == 1 && exists('*exepath')
1 0.000012 let full = exepath(a:command)
1 0.000005 if s:is_windows && (full =~? '\.lnk$') && (getftype(full) ==# 'file')
return resolve(full)
endif
1 0.000002 return full
endif
let pathlist = a:command =~# s:path_sep_pattern ? [''] : !a:0 ? split($PATH, s:path_separator) : type(a:1) == type([]) ? copy(a:1) : split(a:1, s:path_separator)
let pathlist = vimproc#util#uniq(pathlist)
let pathext = s:path_extensions()
if index(pathext, '.' . tolower(fnamemodify(a:command, ':e'))) != -1
let pathext = ['']
endif
let dirsep = s:separator()
let cmdlist = []
for dir in pathlist
let head = dir ==# '' ? '' : dir . dirsep
for ext in pathext
let full = fnamemodify(head . a:command . ext, ':p')
if s:is_windows && (full =~? '\.lnk$') && (getftype(full) ==# 'file')
let full = resolve(full)
endif
if executable(full)
if s:is_case_tolerant()
let full = glob(substitute( vimproc#util#substitute_path_separator( toupper(full)), '\u:\@!', '[\0\L\0]', 'g'), 1)
endif
if full != ''
let cmdlist += [full]
if maxcount > 0 && len(cmdlist) >= maxcount
return join(cmdlist, "\n")
endif
endif
endif
endfor
endfor
return join(cmdlist, "\n")
FUNCTION neocomplete#variables#get_frequencies()
Called 3 times
Total time: 0.000141
Self time: 0.000091
count total (s) self (s)
3 0.000010 if !exists('s:filetype_frequencies')
let s:filetype_frequencies = {}
endif
3 0.000088 0.000038 let filetype = neocomplete#get_context_filetype()
3 0.000011 if !has_key(s:filetype_frequencies, filetype)
let s:filetype_frequencies[filetype] = {}
endif
3 0.000009 let frequencies = s:filetype_frequencies[filetype]
3 0.000004 return frequencies
FUNCTION <SNR>112_Highlight_Matching_Pair()
Called 6 times
Total time: 0.002165
Self time: 0.002165
count total (s) self (s)
" Remove any previous match.
6 0.000029 if exists('w:paren_hl_on') && w:paren_hl_on
4 0.000018 silent! call matchdelete(3)
4 0.000010 let w:paren_hl_on = 0
4 0.000003 endif
" Avoid that we remove the popup menu.
" Return when there are no colors (looks like the cursor jumps).
6 0.000026 if pumvisible() || (&t_Co < 8 && !has("gui_running"))
return
endif
" Get the character under the cursor and check if it's in 'matchpairs'.
6 0.000019 let c_lnum = line('.')
6 0.000016 let c_col = col('.')
6 0.000009 let before = 0
6 0.000025 let text = getline(c_lnum)
6 0.000021 let c = text[c_col - 1]
6 0.000119 let plist = split(&matchpairs, '.\zs[:,]')
6 0.000021 let i = index(plist, c)
6 0.000007 if i < 0
" not found, in Insert mode try character before the cursor
2 0.000007 if c_col > 1 && (mode() == 'i' || mode() == 'R')
let before = 1
let c = text[c_col - 2]
let i = index(plist, c)
endif
2 0.000002 if i < 0
" not found, nothing to do
2 0.000002 return
endif
endif
" Figure out the arguments for searchpairpos().
4 0.000006 if i % 2 == 0
let s_flags = 'nW'
let c2 = plist[i + 1]
else
4 0.000006 let s_flags = 'nbW'
4 0.000008 let c2 = c
4 0.000012 let c = plist[i - 1]
4 0.000004 endif
4 0.000009 if c == '['
let c = '\['
let c2 = '\]'
endif
" Find the match. When it was just before the cursor move it there for a
" moment.
4 0.000005 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
" 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.
4 0.000023 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.
4 0.000569 execute 'if' s_skip '| let s_skip = 0 | endif'
" Limit the search to lines visible in the window.
4 0.000015 let stoplinebottom = line('w$')
4 0.000012 let stoplinetop = line('w0')
4 0.000006 if i % 2 == 0
let stopline = stoplinebottom
else
4 0.000008 let stopline = stoplinetop
4 0.000003 endif
" Limit the search time to 300 msec to avoid a hang on very long lines.
" This fails when a timeout is not supported.
4 0.000013 if mode() == 'i' || mode() == 'R'
4 0.000024 let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout
4 0.000003 else
let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout
endif
4 0.000006 try
4 0.000461 let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout)
4 0.000008 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
4 0.000004 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.
4 0.000014 if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom
4 0.000013 if exists('*matchaddpos')
4 0.000045 call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3)
4 0.000003 else
exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
endif
4 0.000010 let w:paren_hl_on = 1
4 0.000002 endif
FUNCTION <SNR>194_nrepl_has_op()
Called 1 time
Total time: 0.000005
Self time: 0.000005
count total (s) self (s)
1 0.000004 return has_key(self.describe.ops, a:op)
FUNCTION <SNR>155_SID_PREFIX()
Called 67 times
Total time: 0.000824
Self time: 0.000824
count total (s) self (s)
67 0.000372 if !exists('s:sid_prefix')
let s:sid_prefix = matchstr(expand('<sfile>'), '<SNR>\d\+_\zeSID_PREFIX$')
endif
67 0.000080 return s:sid_prefix
FUNCTION localcomplete#getMatchResultOrder()
Called 1 time
Total time: 0.000038
Self time: 0.000010
count total (s) self (s)
1 0.000004 let l:variableList = [ "b:LocalCompleteMatchResultOrder", "g:localcomplete#MatchResultOrder" ]
1 0.000033 0.000005 return s:numericVariableFallback(l:variableList, 1)
FUNCTION <SNR>155_split()
Called 5 times
Total time: 0.000565
Self time: 0.000565
count total (s) self (s)
5 0.000027 let result = []
5 0.000009 lua << EOF
do
local result = vim.eval('result')
local str = vim.eval('a:str')
local sep = vim.eval('a:sep')
local last
if string.find(str, sep, 1, true) == nil then
result:add(str)
else
for part, pos in string.gmatch(str,
'(.-)' .. sep .. '()') do
result:add(part)
last = pos
end
result:add(string.sub(str, last))
end
end
EOF
5 0.000010 return result
FUNCTION neocomplete#handler#_on_insert_char_pre()
Called 4 times
Total time: 0.000510
Self time: 0.000111
count total (s) self (s)
4 0.000401 0.000032 if neocomplete#is_cache_disabled()
return
endif
4 0.000046 0.000016 let neocomplete = neocomplete#get_current_neocomplete()
4 0.000017 if neocomplete.old_char != ' ' && v:char == ' ' && v:count == 0
call s:make_cache_current_line()
endif
4 0.000013 let neocomplete.old_char = v:char
FUNCTION fireplace#register_port_file()
Called 4 times
Total time: 0.000137
Self time: 0.000137
count total (s) self (s)
4 0.000013 let old = get(s:repl_portfiles, a:portfile, {})
4 0.000018 if has_key(old, 'time') && getftime(a:portfile) !=# old.time
call s:unregister_connection(old.connection)
let old = {}
endif
4 0.000008 if empty(old) && getfsize(a:portfile) > 0
let port = matchstr(readfile(a:portfile, 'b', 1)[0], '\d\+')
try
let conn = fireplace#nrepl_connection#open(port)
let s:repl_portfiles[a:portfile] = { 'time': getftime(a:portfile), 'connection': conn}
call s:register_connection(conn, a:0 ? a:1 : '')
return conn
catch /^nREPL Connection Error:/
if &verbose
echohl WarningMSG
echomsg v:exception
echohl None
endif
return {}
endtry
else
4 0.000010 return get(old, 'connection', {})
endif
FUNCTION <SNR>159_uniq()
Called 5 times
Total time: 0.001166
Self time: 0.000040
count total (s) self (s)
5 0.001164 0.000038 return s:uniq_by(a:list, 'v:val')
FUNCTION neocomplete#helper#unite_patterns()
Called 1 time
Total time: 0.000150
Self time: 0.000150
count total (s) self (s)
1 0.000003 let keyword_patterns = []
1 0.000002 lua << EOF
do
local patterns = vim.eval('keyword_patterns')
local filetypes = vim.eval("split(a:filetype, '\\.')")
local pattern_var = vim.eval('a:pattern_var')
local same_filetypes = vim.eval('get(g:, "neocomplete#same_filetypes", {})')
local dup_check = {}
for i = 0, #filetypes-1 do
local ft = filetypes[i]
-- Composite filetype.
if pattern_var[ft] ~= nil and dup_check[ft] == nil then
dup_check[ft] = 1
patterns:add(pattern_var[ft])
end
-- Same filetype.
if same_filetypes[ft] ~= nil then
for ft in string.gmatch(same_filetypes[ft], '[^,]+') do
if pattern_var[ft] ~= nil and dup_check[ft] == nil then
dup_check[ft] = 1
patterns:add(pattern_var[ft])
end
end
end
end
if #patterns == 0 then
local default = pattern_var['_']
if default == nil then
default = pattern_var['default']
end
if default ~= nil and default ~= '' then
patterns:add(default)
end
end
end
EOF
1 0.000007 return join(keyword_patterns, '\m\|')
FUNCTION <SNR>193_nrepl_transport_call()
Called 1 time
Total time: 0.023550
Self time: 0.000030
count total (s) self (s)
1 0.000192 0.000010 let payload = fireplace#nrepl_connection#bencode(a:msg)
1 0.023354 0.000016 let response = self.dispatch('call', payload, a:terms, a:sels)
1 0.000001 if !a:0
1 0.000001 return response
elseif a:1 !=# 'ignore'
return map(response, 'fireplace#nrepl#callback(v:val, "synchronous", a:000)')
endif
FUNCTION <SNR>159_uniq_by()
Called 5 times
Total time: 0.001126
Self time: 0.001126
count total (s) self (s)
5 0.000125 let list = map(copy(a:list), printf('[v:val, %s]', a:f))
5 0.000008 let i = 0
5 0.000007 let seen = {}
79 0.000104 while i < len(list)
74 0.000216 let key = string(list[i][1])
74 0.000116 if has_key(seen, key)
18 0.000035 call remove(list, i)
18 0.000013 else
56 0.000088 let seen[key] = 1
56 0.000062 let i += 1
56 0.000026 endif
74 0.000059 endwhile
5 0.000071 return map(list, 'v:val[0]')
FUNCTION vimproc#filepath#which()
Called 1 time
Total time: 0.000047
Self time: 0.000017
count total (s) self (s)
1 0.000047 0.000017 return s:which(a:command, a:path, a:maxcount)
FUNCTION <SNR>182_async_load()
Called 1 time
Total time: 0.011859
Self time: 0.000456
count total (s) self (s)
" if 0
1 0.000023 0.000004 if neocomplete#has_vimproc()
1 0.000011 0.000007 let vim_path = s:search_vim_path()
1 0.000002 if vim_path == ''
" Error
return
elseif !executable(vim_path)
call neocomplete#print_error( printf('Vim path : "%s" is not executable.', vim_path))
let g:neocomplete#use_vimproc = 0
return
endif
1 0.000011 let args = [vim_path, '-u', 'NONE', '-i', 'NONE', '-n', '-N', '-S', s:sdir.'/async_cache.vim'] + a:argv
1 0.010948 0.000190 call vimproc#system_bg(args)
" call vimproc#system(args)
" call system(join(args))
1 0.000003 else
call neocomplete#async_cache#main(a:argv)
endif
1 0.000638 0.000016 return neocomplete#cache#encode_name(a:cache_dir, a:filename)
FUNCTION vimproc#util#systemencoding()
Called 17 times
Total time: 0.000022
Self time: 0.000022
count total (s) self (s)
17 0.000019 return s:is_windows ? 'utf-8' : 'char'
FUNCTION neocomplete#is_auto_complete()
Called 274 times
Total time: 0.002582
Self time: 0.001143
count total (s) self (s)
274 0.002196 0.000757 let neocomplete = neocomplete#get_current_neocomplete()
274 0.000256 return neocomplete.is_auto_complete
FUNCTION <SNR>155_fdopen_pgroup()
Called 3 times
Total time: 0.000507
Self time: 0.000134
count total (s) self (s)
3 0.000501 0.000128 return { 'eof' : 0, '__eof' : 0, 'is_valid' : 1, 'buffer' : [], 'proc' : a:proc, 'fd' : a:fd, 'f_close' : s:funcref(a:f_close), 'close' : s:funcref('close'), 'read' : s:funcref(a:f_read), 'write' : s:funcref(a:f_write), 'read_line' : s:funcref('read_line'), 'read_lines' : s:funcref('read_lines'),}
FUNCTION recentcomplete#matches()
Called 1 time
Total time: 0.012172
Self time: 0.000016
count total (s) self (s)
1 0.000001 if a:find_start
return s:find_start()
else
1 0.012167 0.000011 return s:matches(a:keyword_base)
endif
FUNCTIONS SORTED ON TOTAL TIME
count total (s) self (s) function
3 0.322481 0.000431 neocomplete#handler#_do_auto_complete()
2 0.310358 0.000186 neocomplete#complete#_get_results()
1 0.303450 0.000949 neocomplete#complete#_set_results_words()
1 0.281481 0.000090 83()
1 0.281346 0.000105 <SNR>158_set_complete_results_words()
2 0.280671 0.000314 fireplace#omnicomplete()
1 0.253308 <SNR>101_get_complete_context()
3 0.025975 0.007199 AutoSave()
1 0.025599 0.000068 fireplace#message()
1 0.023718 0.000025 26()
1 0.023661 0.000027 <SNR>101_conn_try()
1 0.023634 0.000021 <SNR>194_nrepl_message()
1 0.023567 0.000017 <SNR>194_nrepl_call()
1 0.023550 0.000030 <SNR>193_nrepl_transport_call()
1 0.023338 <SNR>193_nrepl_transport_dispatch()
18 0.022352 0.001073 neocomplete#helper#call_filters()
2 0.021564 0.001562 neocomplete#complete#_get_words()
6 0.016000 0.005307 57()
1 0.014982 0.000178 <SNR>149_check_source()
1 0.014174 0.000300 <SNR>149_make_cache_file()
FUNCTIONS SORTED ON SELF TIME
count total (s) self (s) function
1 0.253308 <SNR>101_get_complete_context()
1 0.023338 <SNR>193_nrepl_transport_dispatch()
5 0.011526 recentcomplete#update_cache()
1 0.010307 <SNR>85_py_run_commands()
242 0.008067 neocomplete#filters#converter_remove_overlap#length()
3 0.025975 0.007199 AutoSave()
3 0.006919 0.005504 <SNR>149_make_cache_current_buffer()
6 0.016000 0.005307 57()
5 0.003419 0.002854 <SNR>155_libcall()
396 0.002487 neocomplete#get_current_neocomplete()
1 0.007781 0.002186 <SNR>155_plineopen()
6 0.002165 <SNR>112_Highlight_Matching_Pair()
6 0.002135 0.001973 53()
35 0.002485 0.001972 neocomplete#helper#get_source_filetypes()
2 0.006488 0.001713 neocomplete#complete#_set_results_pos()
1 0.001876 0.001600 localcomplete#localMatches()
2 0.021564 0.001562 neocomplete#complete#_get_words()
67 0.002155 0.001331 <SNR>155_funcref()
3 0.001292 recentcomplete#update_cache_eventually()
1 0.001251 0.001229 fireplace#ns()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment