Skip to content

Instantly share code, notes, and snippets.

@itchyny
Created January 20, 2015 08:32
Show Gist options
  • Save itchyny/29258ad63493a0e12f6e to your computer and use it in GitHub Desktop.
Save itchyny/29258ad63493a0e12f6e to your computer and use it in GitHub Desktop.
FUNCTION neocomplete#custom#get()
Called 8 times
Total time: 0.000206
Self time: 0.000206
count total (s) self (s)
8 0.000060 if !exists('s:custom')
let s:custom = {}
let s:custom.sources = {}
let s:custom.sources._ = {}
endif
8 0.000029 return s:custom
FUNCTION gitbranch#name()
Called 42 times
Total time: 0.011444
Self time: 0.011444
count total (s) self (s)
42 0.004269 if get(b:, 'gitbranch_pwd', '') !=# expand('%:p:h') || !has_key(b:, 'gitbranch_path')
call gitbranch#detect(expand('%:p:h'))
endif
42 0.001688 if has_key(b:, 'gitbranch_path') && filereadable(b:gitbranch_path)
42 0.002555 let branch = get(readfile(b:gitbranch_path), 0, '')
42 0.000768 if branch =~# '^ref: '
42 0.001449 return substitute(branch, '^ref: \%(refs/\%(heads/\|remotes/\|tags/\)\=\)\=', '', '')
elseif branch =~# '^\x\{20\}'
return branch[:6]
endif
endif
return ''
FUNCTION neocomplete#available_sources()
Called 1 time
Total time: 0.000057
Self time: 0.000034
count total (s) self (s)
1 0.000056 0.000033 return copy(neocomplete#variables#get_sources())
FUNCTION 2()
Called 1 time
Total time: 0.227328
Self time: 0.000639
count total (s) self (s)
1 0.000007 let s:buffer_sources = {}
1 0.000006 augroup neocomplete "{{{
1 0.000177 autocmd BufEnter,BufRead,BufWinEnter,BufWritePost * call s:check_source()
1 0.000016 autocmd InsertEnter,InsertLeave * call neocomplete#sources#buffer#make_cache_current_line()
1 0.000003 augroup END"}}}
" Create cache directory.
1 0.014197 0.000290 call neocomplete#cache#make_directory('buffer_cache')
1 0.000460 0.000017 call neocomplete#cache#make_directory('buffer_temp')
" Initialize script variables. "{{{
1 0.000010 let s:buffer_sources = {}
1 0.000006 let s:async_dictionary_list = {}
"}}}
1 0.126078 0.000037 call s:make_cache_buffer(bufnr('%'))
1 0.086348 0.000050 call s:check_source()
FUNCTION 4()
Called 44 times
Total time: 0.001633
Self time: 0.001633
count total (s) self (s)
" Filters too long word.
44 0.001486 call filter(a:context.candidates, 'len(v:val.word) < g:neocomplete#sources#buffer#max_keyword_width')
FUNCTION 5()
Called 39 times
Total time: 0.056283
Self time: 0.006637
count total (s) self (s)
39 0.028901 0.000543 call s:check_async_cache()
39 0.000221 let keyword_list = []
78 0.022028 0.000740 for source in s:get_sources_list()
39 0.004407 let keyword_list += source.words
39 0.000108 endfor
39 0.000145 return keyword_list
FUNCTION 7()
Called 51 times
Total time: 0.002632
Self time: 0.002632
count total (s) self (s)
51 0.000381 if empty(a:context.candidates)
27 0.000095 return []
endif
24 0.000055 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
24 0.000137 return a:context.candidates
FUNCTION 8()
Called 50 times
Total time: 0.010548
Self time: 0.010548
count total (s) self (s)
50 0.000312 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
50 0.000370 return a:context.candidates
FUNCTION <SNR>120_which()
Called 2 times
Total time: 0.014933
Self time: 0.013787
count total (s) self (s)
2 0.000041 let maxcount = (a:0 >= 2 && type(a:2) == type(0)) ? a:2 : 1
2 0.000016 if maxcount == 1 && exists('*exepath')
1 0.000033 let full = exepath(a:command)
1 0.000008 if s:is_windows && (full =~? '\.lnk$') && (getftype(full) ==# 'file')
return resolve(full)
endif
1 0.000003 return full
endif
1 0.000053 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)
1 0.001062 0.000054 let pathlist = vimproc#util#uniq(pathlist)
1 0.000091 0.000027 let pathext = s:path_extensions()
1 0.000017 if index(pathext, '.' . tolower(fnamemodify(a:command, ':e'))) != -1
let pathext = ['']
endif
1 0.000044 0.000030 let dirsep = s:separator()
1 0.000005 let cmdlist = []
20 0.000065 for dir in pathlist
19 0.000149 let head = dir ==# '' ? '' : dir . dirsep
38 0.000135 for ext in pathext
19 0.000482 let full = fnamemodify(head . a:command . ext, ':p')
19 0.000149 if s:is_windows && (full =~? '\.lnk$') && (getftype(full) ==# 'file')
let full = resolve(full)
endif
19 0.000229 if executable(full)
3 0.000085 0.000060 if s:is_case_tolerant()
3 0.010002 0.009967 let full = glob(substitute( vimproc#util#substitute_path_separator( toupper(full)), '\u:\@!', '[\0\L\0]', 'g'), 1)
3 0.000022 endif
3 0.000023 if full != ''
3 0.000028 let cmdlist += [full]
3 0.000022 if maxcount > 0 && len(cmdlist) >= maxcount
return join(cmdlist, "\n")
endif
3 0.000004 endif
3 0.000006 endif
19 0.000062 endfor
19 0.000035 endfor
1 0.000010 return join(cmdlist, "\n")
FUNCTION <SNR>77_exists_current_source()
Called 164 times
Total time: 0.015259
Self time: 0.004106
count total (s) self (s)
164 0.015025 0.003872 return has_key(s:buffer_sources, bufnr('%')) && !s:check_changed_buffer(bufnr('%'))
FUNCTION neosnippet#helpers#get_filetype()
Called 41 times
Total time: 0.003223
Self time: 0.003077
count total (s) self (s)
41 0.000343 if !exists('s:exists_context_filetype')
" context_filetype.vim installation check.
1 0.000003 try
1 0.000692 0.000546 call context_filetype#version()
let s:exists_context_filetype = 1
catch
1 0.000008 let s:exists_context_filetype = 0
1 0.000005 endtry
1 0.000001 endif
41 0.000445 let context_filetype = s:exists_context_filetype ? context_filetype#get_filetype() : &filetype
41 0.000224 if context_filetype == ''
let context_filetype = 'nothing'
endif
41 0.000143 return context_filetype
FUNCTION vital#_neosnippet#new()
Called 2 times
Total time: 0.008341
Self time: 0.000053
count total (s) self (s)
2 0.008338 0.000050 return s:_import('')
FUNCTION neocomplete#helper#match_word()
Called 660 times
Total time: 0.119480
Self time: 0.111695
count total (s) self (s)
660 0.015352 0.007567 let pattern = a:0 >= 1 ? a:1 : neocomplete#get_keyword_pattern_end()
" Check wildcard.
660 0.084925 let complete_pos = match(a:cur_text, pattern)
660 0.009066 let complete_str = (complete_pos >=0) ? a:cur_text[complete_pos :] : ''
660 0.004435 return [complete_pos, complete_str]
FUNCTION <SNR>77_get_sources_list()
Called 79 times
Total time: 0.042980
Self time: 0.007106
count total (s) self (s)
79 0.000518 let filetypes_dict = {}
158 0.037822 0.001948 for filetype in neocomplete#get_source_filetypes( neocomplete#get_context_filetype())
79 0.000688 let filetypes_dict[filetype] = 1
79 0.000207 endfor
79 0.002758 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 <SNR>118_vp_pipe_open()
Called 1 time
Total time: 0.006951
Self time: 0.000344
count total (s) self (s)
1 0.000004 try
1 0.000016 0.000011 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.006779 0.000177 let [pid; fdlist] = s:libcall('vp_pipe_open', [a:npipe, a:hstdin, a:hstdout, a:hstderr, len(a:argv)] + a:argv)
1 0.000003 endif
1 0.000002 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.000007 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.000020 return [pid] + fdlist
FUNCTION <SNR>118_vp_pipes_close()
Called 3 times
Total time: 0.001463
Self time: 0.000160
count total (s) self (s)
6 0.000028 for fd in self.fd
3 0.000010 try
3 0.001337 0.000034 call fd.close()
3 0.000012 catch /vimproc: vp_pipe_close: /
" Ignore error.
endtry
3 0.000006 endfor
FUNCTION neocomplete#is_cache_disabled()
Called 778 times
Total time: 0.087234
Self time: 0.052208
count total (s) self (s)
778 0.007529 let ignore_filetypes = ['fuf', 'ku']
778 0.012488 let bufnr = a:0 > 0 ? a:1 : bufnr('%')
778 0.065071 0.030045 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 <SNR>101__redir()
Called 12 times
Total time: 0.010662
Self time: 0.010662
count total (s) self (s)
12 0.000157 let [save_verbose, save_verbosefile] = [&verbose, &verbosefile]
12 0.000120 set verbose=0 verbosefile=
12 0.000080 redir => res
12 0.009846 silent! execute a:cmd
12 0.000145 redir END
12 0.000187 let [&verbose, &verbosefile] = [save_verbose, save_verbosefile]
12 0.000076 return res
FUNCTION <SNR>70_import()
Called 4 times
Total time: 0.038161
Self time: 0.000578
count total (s) self (s)
4 0.000041 let target = {}
4 0.000019 let functions = []
4 0.000024 for a in a:000
if type(a) == type({})
let target = a
elseif type(a) == type([])
let functions = a
endif
unlet a
endfor
4 0.037667 0.000084 let module = s:_import(a:name)
4 0.000028 if empty(functions)
4 0.000128 call extend(target, module, 'keep')
4 0.000009 else
for f in functions
if has_key(module, f) && !has_key(target, f)
let target[f] = module[f]
endif
endfor
endif
4 0.000014 return target
FUNCTION neocomplete#init#_current_neocomplete()
Called 1 time
Total time: 0.000123
Self time: 0.000123
count total (s) self (s)
1 0.000121 let b:neocomplete = { 'context' : { 'input' : '', 'complete_pos' : -1, 'complete_str' : '', 'candidates' : [], }, 'lock' : 0, 'skip_next_complete' : 0, 'filetype' : '', 'context_filetype' : '', 'context_filetype_range' : [[1, 1], [line('$'), len(getline('$'))+1]], 'completion_length' : -1, 'update_time_save' : &updatetime, 'foldinfo' : [], 'skipped' : 0, 'event' : '', 'cur_text' : '', 'old_cur_text' : '', 'old_linenr' : line('.'), 'old_complete_pos' : -1, 'old_char' : '', 'complete_str' : '', 'complete_pos' : -1, 'candidates' : [], 'complete_sources' : [], 'manual_sources' : [], 'start_time' : reltime(), 'linenr' : 0, 'completeopt' : &completeopt, 'completed_item' : {}, 'overlapped_items' : {}, 'sources' : [], 'sources_filetype' : '', 'within_comment' : 0, 'is_auto_complete' : 0,}
FUNCTION neosnippet#get_sync_placeholder_marker_pattern()
Called 1 time
Total time: 0.000008
Self time: 0.000008
count total (s) self (s)
1 0.000006 return '<{\d\+\%(:.\{-}\)\?\\\@<!}>'
FUNCTION <SNR>118_pgroup_open()
Called 1 time
Total time: 0.014814
Self time: 0.000486
count total (s) self (s)
1 0.000005 let proc = {}
1 0.013608 0.000310 let proc.current_proc = vimproc#plineopen{a:npipe}(a:statements[0].statement, a:is_pty)
1 0.000009 let proc.pid = proc.current_proc.pid
1 0.000007 let proc.pid_list = proc.current_proc.pid_list
1 0.000011 let proc.condition = a:statements[0].condition
1 0.000008 let proc.statements = a:statements[1:]
1 0.000361 0.000034 let proc.stdin = s:fdopen_pgroup(proc, proc.current_proc.stdin, 'vp_pgroup_close', 'read_pgroup', 'write_pgroup')
1 0.000324 0.000019 let proc.stdout = s:fdopen_pgroup(proc, proc.current_proc.stdout, 'vp_pgroup_close', 'read_pgroup', 'write_pgroup')
1 0.000339 0.000020 let proc.stderr = s:fdopen_pgroup(proc, proc.current_proc.stderr, 'vp_pgroup_close', 'read_pgroup', 'write_pgroup')
1 0.000053 0.000013 let proc.kill = s:funcref('vp_pgroup_kill')
1 0.000054 0.000015 let proc.waitpid = s:funcref('vp_pgroup_waitpid')
1 0.000006 let proc.is_valid = 1
1 0.000004 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.000009 return proc
FUNCTION neocomplete#util#uniq()
Called 1433 times
Total time: 3.289262
Self time: 0.034024
count total (s) self (s)
1433 3.287029 0.031791 return call(s:get_list().uniq, a:000)
FUNCTION neocomplete#sources#buffer#get_frequencies()
Called 46 times
Total time: 0.000887
Self time: 0.000887
count total (s) self (s)
46 0.000805 return get(get(s:buffer_sources, bufnr('%'), {}), 'frequencies', {})
FUNCTION highlighturl#check_urlcursor()
Called 90 times
Total time: 0.004983
Self time: 0.003565
count total (s) self (s)
90 0.002448 if get(s:line, bufnr('')) != line('.') || get(s:cursorline, bufnr('')) != &l:cursorline
3 0.001491 0.000073 call highlighturl#set_urlcursor_match()
3 0.000008 endif
FUNCTION neocomplete#helper#ftdictionary2list()
Called 1153 times
Total time: 0.574559
Self time: 0.070205
count total (s) self (s)
1153 0.572824 0.068470 return map(filter(neocomplete#get_source_filetypes(a:filetype), 'has_key(a:dictionary, v:val)'), 'a:dictionary[v:val]')
FUNCTION <SNR>68_get_list()
Called 1433 times
Total time: 0.040534
Self time: 0.033263
count total (s) self (s)
1433 0.010942 if !exists('s:List')
1 0.007391 0.000120 let s:List = neocomplete#util#get_vital().import('Data.List')
1 0.000003 endif
1433 0.004504 return s:List
FUNCTION neocomplete#helper#get_syn_name()
Called 49 times
Total time: 0.055309
Self time: 0.055309
count total (s) self (s)
49 0.055210 return len(getline('.')) < 200 ? synIDattr(synIDtrans(synID(line('.'), mode() ==# 'i' ? col('.')-1 : col('.'), a:is_trans)), 'name') : ''
FUNCTION neocomplete#context_filetype#set()
Called 3 times
Total time: 0.000252
Self time: 0.000181
count total (s) self (s)
3 0.000131 0.000060 let neocomplete = neocomplete#get_current_neocomplete()
3 0.000037 let context_filetype = s:exists_context_filetype ? context_filetype#get_filetype() : &filetype
3 0.000017 if context_filetype == ''
let context_filetype = 'nothing'
endif
3 0.000020 let neocomplete.context_filetype = context_filetype
3 0.000013 return neocomplete.context_filetype
FUNCTION neocomplete#init#disable()
Called 2 times
Total time: 0.021533
Self time: 0.000803
count total (s) self (s)
2 0.000064 0.000030 if !neocomplete#is_enabled()
1 0.018240 0.000013 call neocomplete#init#enable()
1 0.000002 endif
2 0.000009 let s:is_enabled = 0
2 0.000010 augroup neocomplete
2 0.000583 autocmd!
2 0.000006 augroup END
2 0.000027 silent! delcommand NeoCompleteDisable
2 0.002567 0.000098 call neocomplete#helper#call_hook(filter(values( neocomplete#variables#get_sources()), 'v:val.loaded'), 'on_final', {})
FUNCTION vimproc#system_bg()
Called 1 time
Total time: 0.016891
Self time: 0.000182
count total (s) self (s)
" Open pipe.
1 0.000009 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.000020 let args = [{'statement' : [{ 'fd' : { 'stdin' : '', 'stdout' : '', 'stderr' : '' }, 'args' : a:cmdline }], 'condition' : 'always' }]
1 0.000002 endif
1 0.014955 0.000044 let subproc = vimproc#pgroup_open(args)
1 0.000010 if empty(subproc)
" Not supported path error.
return ''
endif
" Close handles.
1 0.001826 0.000028 call s:close_all(subproc)
1 0.000010 let s:bg_processes[subproc.pid] = subproc.pid
1 0.000003 return ''
FUNCTION neocomplete#sources#syntax#define()
Called 1 time
Total time: 0.000009
Self time: 0.000009
count total (s) self (s)
1 0.000007 return s:source
FUNCTION <SNR>106_uniq_by()
Called 2 times
Total time: 0.000377
Self time: 0.000377
count total (s) self (s)
2 0.000054 let list = map(copy(a:list), printf('[v:val, %s]', a:f))
2 0.000010 let i = 0
2 0.000008 let seen = {}
6 0.000034 while i < len(list)
4 0.000053 let key = string(list[i][1])
4 0.000029 if has_key(seen, key)
call remove(list, i)
else
4 0.000030 let seen[key] = 1
4 0.000015 let i += 1
4 0.000008 endif
4 0.000018 endwhile
2 0.000029 return map(list, 'v:val[0]')
FUNCTION 3()
Called 2 times
Total time: 0.001229
Self time: 0.000798
count total (s) self (s)
2 0.000018 silent! delcommand NeoCompleteBufferMakeCache
2 0.000161 let s:buffer_sources = {}
" Remove temporary files
2 0.001037 0.000606 call map(glob(printf('%s/%d_*', neocomplete#get_data_directory() . '/buffer_temp', getpid()), 1, 1), 'delete(v:val)')
FUNCTION <SNR>118_finalize()
Called 1 time
Total time: 0.000832
Self time: 0.000070
count total (s) self (s)
1 0.000119 0.000033 call s:garbage_collect(1)
1 0.000008 if exists('s:dll_handle')
1 0.000696 0.000020 call s:vp_dlclose(s:dll_handle)
1 0.000003 endif
FUNCTION neocomplete#helper#check_invalid_omnifunc()
Called 269 times
Total time: 0.004274
Self time: 0.004274
count total (s) self (s)
269 0.003863 return a:omnifunc == '' || (a:omnifunc !~ '#' && !exists('*' . a:omnifunc))
FUNCTION 6()
Called 100 times
Total time: 0.080358
Self time: 0.069068
count total (s) self (s)
100 0.000863 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
100 0.013246 0.001956 let pattern = neocomplete#filters#fuzzy_escape( a:context.complete_str)
100 0.000331 endif
" The first letter must be matched.
100 0.004107 let pattern = '^' . pattern
100 0.000308 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
100 0.000745 return a:context.candidates
FUNCTION <SNR>101__unify_path()
Called 23 times
Total time: 0.003257
Self time: 0.003257
count total (s) self (s)
" Note: On windows, vim can't expand path names from 8.3 formats.
" So if getting full path via <sfile> and $HOME was set as 8.3 format,
" vital load duplicated scripts. Below's :~ avoid this issue.
23 0.003123 return tolower(fnamemodify(resolve(fnamemodify( a:path, ':p:gs?[\\/]\+?/?')), ':~'))
FUNCTION <SNR>21_AutodateStub()
Called 1 time
Total time: 0.003528
Self time: 0.003013
count total (s) self (s)
" Verify pre-keyword.
1 0.000010 if exists('b:autodate_keyword_pre') && b:autodate_keyword_pre != ''
let pre = b:autodate_keyword_pre
else
1 0.000011 if exists('g:autodate_keyword_pre') && g:autodate_keyword_pre != ''
1 0.000006 let pre = g:autodate_keyword_pre
1 0.000002 else
let pre = '\cLast Change:'
endif
1 0.000002 endif
" Verify post-keyword.
1 0.000008 if exists('b:autodate_keyword_post') && b:autodate_keyword_post != ''
let post = b:autodate_keyword_post
else
1 0.000009 if exists('g:autodate_keyword_post') && g:autodate_keyword_post != ''
1 0.000005 let post = g:autodate_keyword_post
1 0.000002 else
let post = '\.'
endif
1 0.000001 endif
" Verify format.
1 0.000007 if exists('b:autodate_format') && b:autodate_format != ''
let format = b:autodate_format
else
1 0.000009 if exists('g:autodate_format') && g:autodate_format != ''
1 0.000005 let format = g:autodate_format
1 0.000002 else
let format = '%d-%3m-%Y'
endif
1 0.000002 endif
" Generate substitution pattern
1 0.000011 let pat = '\('.pre.'\s*\)\(\S.*\)\?\('.post.'\)'
1 0.000540 0.000025 let sub = Strftime2(format)
" For debug
1 0.000006 if s:debug
echo "range=".a:first."-".a:last
echo "pat= ".pat
echo "sub= ".sub
endif
" Process
1 0.000005 let i = a:first
51 0.000200 while i <= a:last
50 0.000338 let curline = getline(i)
50 0.000796 if curline =~ pat
1 0.000051 let newline = substitute(curline, pat, '\1' . sub . '\3', '')
1 0.000007 if curline !=# newline
1 0.000023 call setline(i, newline)
1 0.000003 endif
1 0.000002 endif
50 0.000288 let i = i + 1
50 0.000202 endwhile
FUNCTION cmdline_ranges#range()
Called 5 times
Total time: 0.002899
Self time: 0.000657
count total (s) self (s)
5 0.000145 if mode() == 'c' && getcmdtype() == ':'
5 0.000105 let endcu = "\<End>\<C-u>"
5 0.002452 0.000210 let range = s:parserange(getcmdline(), a:prev)
5 0.000042 if len(range)
return endcu . s:strrange(cmdline_ranges#{char2nr(a:motion)}(range, a:prev))
else
5 0.000026 return a:motion
endif
else
return a:motion
endif
FUNCTION vimproc#plineopen3()
Called 1 time
Total time: 0.013298
Self time: 0.000118
count total (s) self (s)
1 0.000016 let commands = type(a:commands) == type('') ? vimproc#parser#parse_pipe(a:commands) : a:commands
1 0.000007 let is_pty = get(a:000, 0, 0)
1 0.013267 0.000087 return s:plineopen(3, commands, is_pty)
FUNCTION neocomplete#init#enable()
Called 2 times
Total time: 0.123541
Self time: 0.000606
count total (s) self (s)
2 0.002561 0.000250 if neocomplete#is_enabled()
return
endif
2 0.000017 if !exists('b:neocomplete')
1 0.000150 0.000027 call neocomplete#init#_current_neocomplete()
1 0.000004 endif
2 0.000832 0.000043 call neocomplete#init#_autocmds()
2 0.056465 0.000052 call neocomplete#init#_others()
2 0.061424 0.000130 call neocomplete#init#_sources(get(g:neocomplete#sources, neocomplete#get_context_filetype(), ['_']))
2 0.002035 0.000030 doautocmd <nomodeline> neocomplete InsertEnter
2 0.000011 let s:is_enabled = 1
FUNCTION neosnippet#variables#snippets_dir()
Called 3 times
Total time: 0.000069
Self time: 0.000069
count total (s) self (s)
3 0.000029 if !exists('s:snippets_dir')
1 0.000007 let s:snippets_dir = []
1 0.000003 endif
3 0.000012 return s:snippets_dir
FUNCTION <SNR>91_make_cache()
Called 50 times
Total time: 0.000804
Self time: 0.000804
count total (s) self (s)
50 0.000377 if &filetype == '' || &filetype ==# 'vim'
50 0.000302 return
endif
for filetype in filter(neocomplete#get_source_filetypes(&filetype), '!has_key(s:syntax_list, v:val)')
" Check old cache.
let cache_name = neocomplete#cache#encode_name( 'syntax_cache', filetype)
if getftime(cache_name) < 0
if filetype ==# &filetype
" Make cache from syntax list.
let s:syntax_list[filetype] = s:make_cache_from_syntax(filetype)
endif
else
let s:syntax_list[filetype] = neocomplete#cache#load_from_cache( 'syntax_cache', filetype, 1)
endif
endfor
FUNCTION neocomplete#cache#check_old_cache()
Called 1 time
Total time: 0.002397
Self time: 0.000063
count total (s) self (s)
1 0.000226 0.000027 let cache_dir = neocomplete#get_data_directory() . '/' . a:cache_dir
1 0.002170 0.000035 return s:Cache.check_old_cache(cache_dir, a:filename)
FUNCTION neocomplete#get_keyword_pattern()
Called 655 times
Total time: 0.088377
Self time: 0.054124
count total (s) self (s)
655 0.008273 0.007187 let filetype = a:0 != 0? a:1 : neocomplete#get_context_filetype()
655 0.002576 if a:0 < 2
23 0.005676 0.000356 return neocomplete#helper#unite_patterns( g:neocomplete#keyword_patterns, filetype)
endif
632 0.034038 0.008678 let source = neocomplete#variables#get_source(a:2)
632 0.005264 if !has_key(source, 'neocomplete__keyword_patterns')
6 0.000047 let source.neocomplete__keyword_patterns = {}
6 0.000014 endif
632 0.004585 if !has_key(source.neocomplete__keyword_patterns, filetype)
6 0.002627 0.000140 let source.neocomplete__keyword_patterns[filetype] = neocomplete#helper#unite_patterns( source.keyword_patterns, filetype)
6 0.000019 endif
632 0.004165 return source.neocomplete__keyword_patterns[filetype]
FUNCTION vimproc#util#substitute_path_separator()
Called 6 times
Total time: 0.000071
Self time: 0.000071
count total (s) self (s)
6 0.000060 return s:is_windows ? substitute(a:path, '\\', '/', 'g') : a:path
FUNCTION neocomplete#sources#vim#helper#command()
Called 49 times
Total time: 0.170329
Self time: 0.015749
count total (s) self (s)
49 0.001280 if a:cur_text == '' || a:cur_text =~ '^[[:digit:],[:space:][:tab:]$''<>]*\h\w*$'
" Commands.
" Make cache.
3 0.000028 if !has_key(s:global_candidates_list, 'commands')
1 0.078053 0.000065 let s:global_candidates_list.commands = s:get_cmdlist()
1 0.000002 endif
3 0.000023 if !has_key(s:internal_candidates_list, 'commands')
1 0.066351 0.000864 let s:internal_candidates_list.commands = s:make_cache_commands()
1 0.000003 endif
3 0.001541 let list = copy(s:internal_candidates_list.commands) + copy(s:global_candidates_list.commands)
3 0.000011 else
" Commands args.
46 0.002771 0.000677 let command = neocomplete#sources#vim#get_command(a:cur_text)
46 0.004722 0.000761 let completion_name = neocomplete#sources#vim#helper#get_completion_name(command)
" Prevent infinite loop.
46 0.000541 let cur_text = completion_name ==# 'command' ? a:cur_text[len(command):] : a:cur_text
46 0.009683 0.004633 let list = neocomplete#sources#vim#helper#get_command_completion( command, cur_text, a:complete_str)
46 0.001448 if a:cur_text =~'[[(,{]\|`=[^`]*$'
" Expression.
let list += neocomplete#sources#vim#helper#expression( a:cur_text, a:complete_str)
endif
46 0.000077 endif
49 0.000154 return list
FUNCTION <SNR>21_GetAutodateLines()
Called 1 time
Total time: 0.000053
Self time: 0.000053
count total (s) self (s)
1 0.000010 if exists('b:autodate_lines') && b:autodate_lines > 0
return b:autodate_lines
elseif exists('g:autodate_lines') && g:autodate_lines > 0
1 0.000004 return g:autodate_lines
else
return 50
endif
FUNCTION neocomplete#util#expand()
Called 14 times
Total time: 0.000757
Self time: 0.000757
count total (s) self (s)
14 0.000722 return expand(escape(a:path, '*?[]"={}'), 1)
FUNCTION <SNR>101__build_module()
Called 5 times
Total time: 0.010228
Self time: 0.003489
count total (s) self (s)
5 0.000044 if has_key(s:loaded, a:sid)
1 0.000014 return copy(s:loaded[a:sid])
endif
4 0.006815 0.000076 let functions = s:_get_functions(a:sid)
4 0.000044 let prefix = '<SNR>' . a:sid . '_'
4 0.000019 let module = {}
101 0.000334 for func in functions
97 0.001244 let module[func] = function(prefix . func)
97 0.000301 endfor
4 0.000030 if has_key(module, '_vital_loaded')
let V = vital#{s:self_version}#new()
if has_key(module, '_vital_depends')
call call(V.load, module._vital_depends(), V)
endif
try
call module._vital_loaded(V)
catch
" FIXME: Show an error message for debug.
endtry
endif
4 0.000029 if !get(g:, 'vital_debug', 0)
4 0.000912 call filter(module, 'v:key =~# "^\\a"')
4 0.000013 endif
4 0.000042 let s:loaded[a:sid] = module
4 0.000084 return copy(module)
FUNCTION neocomplete#complete#_get_results()
Called 49 times
Total time: 1.216399
Self time: 0.007778
count total (s) self (s)
49 0.001300 0.000646 call neocomplete#print_debug('start get_complete_sources')
49 0.001592 0.000557 let neocomplete = neocomplete#get_current_neocomplete()
49 0.000465 let neocomplete.start_time = reltime()
" Comment check.
49 0.056079 0.000770 let neocomplete.within_comment = neocomplete#helper#get_syn_name(1) ==# 'Comment'
49 0.516651 0.002342 let complete_sources = call( 'neocomplete#complete#_set_results_pos', [a:cur_text] + a:000)
49 0.638302 0.000988 call neocomplete#complete#_set_results_words(complete_sources)
49 0.001397 return filter(copy(complete_sources), '!empty(v:val.neocomplete__context.candidates)')
FUNCTION neocomplete#filters#matcher_fuzzy#define()
Called 1 time
Total time: 0.000008
Self time: 0.000008
count total (s) self (s)
1 0.000007 return s:matcher
FUNCTION neocomplete#util#substitute_path_separator()
Called 17 times
Total time: 0.001235
Self time: 0.000596
count total (s) self (s)
17 0.001204 0.000565 return call(s:get_prelude().substitute_path_separator, a:000)
FUNCTION <SNR>9_funcUndefined()
Called 41 times
Total time: 0.010361
Self time: 0.005407
count total (s) self (s)
41 0.000516 let f = expand('<amatch>')
41 0.000555 if f =~# 'unite'
call miv#load('unite')
endif
41 0.000817 if f =~# 'vimproc'
2 0.005002 0.000048 call miv#load('vimproc')
2 0.000005 endif
41 0.000412 if f =~# 'vimshell'
call miv#load('vimshell')
endif
41 0.000384 if f =~# 'vimlint'
call miv#load('vimlint')
endif
41 0.000390 if f =~# 'tcomment'
call miv#load('tComment')
endif
41 0.000371 if f =~# 'themis'
call miv#load('themis')
endif
FUNCTION <SNR>77_check_source()
Called 1 time
Total time: 0.086298
Self time: 0.000317
count total (s) self (s)
" Check new buffer.
1 0.085288 0.000241 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.000978 0.000044 call s:check_async_cache()
" Remove unlisted buffers.
1 0.000020 call filter(s:buffer_sources, "v:key == bufnr('%') || buflisted(str2nr(v:key))")
FUNCTION neocomplete#sources#look#define()
Called 1 time
Total time: 0.000055
Self time: 0.000055
count total (s) self (s)
1 0.000052 return executable('look') ? s:source : {}
FUNCTION <SNR>102_wcswidth()
Called 8 times
Total time: 0.000070
Self time: 0.000070
count total (s) self (s)
8 0.000058 return strwidth(a:str)
FUNCTION <SNR>21_Autodate()
Called 1 time
Total time: 0.003840
Self time: 0.000201
count total (s) self (s)
" Check enable
1 0.000022 if (exists('b:autodate_disable') && b:autodate_disable != 0) || &modified == 0
return
endif
" Verify {firstline}
1 0.000005 if a:0 > 0 && a:1 > 0
let firstline = a:1
else
1 0.000095 0.000037 let firstline = s:GetAutodateStartLine()
1 0.000003 endif
" Verify {lastline}
1 0.000005 if a:0 > 1 && a:2 <= line('$')
let lastline = a:2
else
1 0.000088 0.000035 let lastline = firstline + s:GetAutodateLines() - 1
" Range check
1 0.000007 if lastline > line('$')
let lastline = line('$')
endif
1 0.000002 endif
1 0.000003 if firstline <= lastline
1 0.003567 0.000039 call s:AutodateStub(firstline, lastline)
1 0.000003 endif
FUNCTION neosnippet#util#option2list()
Called 1 time
Total time: 0.000040
Self time: 0.000040
count total (s) self (s)
1 0.000039 return type(a:str) == type('') ? split(a:str, '\s*,\s*') : a:str
FUNCTION neocomplete#variables#get_sources()
Called 335 times
Total time: 0.007839
Self time: 0.007839
count total (s) self (s)
335 0.003963 if !exists('s:sources')
1 0.000006 let s:sources = {}
1 0.000003 endif
335 0.001132 return s:sources
FUNCTION <SNR>102_strwidthpart()
Called 8 times
Total time: 0.000564
Self time: 0.000494
count total (s) self (s)
8 0.000040 if a:width <= 0
return ''
endif
8 0.000039 let ret = a:str
8 0.000180 0.000110 let width = s:wcswidth(a:str)
8 0.000042 while width > a:width
let char = matchstr(ret, '.$')
let ret = ret[: -1 - len(char)]
let width -= s:wcswidth(char)
endwhile
8 0.000026 return ret
FUNCTION neocomplete#get_context_filetype()
Called 751 times
Total time: 0.035718
Self time: 0.033699
count total (s) self (s)
751 0.011786 let neocomplete = exists('b:neocomplete') ? b:neocomplete : neocomplete#get_current_neocomplete()
751 0.008419 if a:0 != 0 || mode() !=# 'i' || neocomplete.context_filetype == ''
3 0.002241 0.000222 call neocomplete#context_filetype#set()
3 0.000007 endif
751 0.003257 return neocomplete.context_filetype
FUNCTION neocomplete#sources#vim#helper#get_command_completion()
Called 46 times
Total time: 0.005050
Self time: 0.001274
count total (s) self (s)
46 0.004500 0.000724 let completion_name = neocomplete#sources#vim#helper#get_completion_name(a:command_name)
46 0.000263 if completion_name == ''
" Not found.
46 0.000134 return []
endif
let args = (completion_name ==# 'custom' || completion_name ==# 'customlist')? [a:command_name, a:cur_text, a:complete_str] : [a:cur_text, a:complete_str]
return call('neocomplete#sources#vim#helper#' .completion_name, args)
FUNCTION neocomplete#util#split_rtp()
Called 6 times
Total time: 0.000543
Self time: 0.000543
count total (s) self (s)
6 0.000053 let rtp = a:0 ? a:1 : &runtimepath
6 0.000059 if type(rtp) == type([])
return rtp
endif
6 0.000131 if rtp !~ '\\'
6 0.000244 return split(rtp, ',')
endif
let split = split(rtp, '\\\@<!\%(\\\\\)*\zs,')
return map(split,'substitute(v:val, ''\\\([\\,]\)'', "\\1", "g")')
FUNCTION neocomplete#define_source()
Called 8 times
Total time: 0.032281
Self time: 0.000770
count total (s) self (s)
8 0.000276 0.000114 let sources = neocomplete#variables#get_sources()
16 0.000259 0.000154 for source in neocomplete#util#convert2list(a:source)
8 0.031426 0.000182 let source = neocomplete#init#_source(source)
8 0.000037 if !source.disabled
8 0.000069 let sources[source.name] = source
8 0.000021 endif
8 0.000017 endfor
FUNCTION <SNR>120_path_extensions()
Called 1 time
Total time: 0.000064
Self time: 0.000064
count total (s) self (s)
1 0.000009 if !exists('s:path_extensions')
1 0.000003 if s:is_windows
if exists('$PATHEXT')
let pathext = $PATHEXT
else
" get default PATHEXT
let pathext = matchstr(system('set pathext'), '^pathext=\zs.*\ze\n', 'i')
endif
let s:path_extensions = split(tolower(pathext), s:path_separator)
elseif s:is_cygwin
" cygwin is not use $PATHEXT
let s:path_extensions = ['', '.exe']
else
1 0.000006 let s:path_extensions = ['']
1 0.000002 endif
1 0.000001 endif
1 0.000003 return s:path_extensions
FUNCTION neocomplete#filters#fuzzy_escape()
Called 100 times
Total time: 0.010629
Self time: 0.007912
count total (s) self (s)
" Escape string for lua regexp.
100 0.005838 0.003121 let string = substitute(neocomplete#filters#escape(a:string), '\w', '\0.*', 'g')
100 0.000636 if g:neocomplete#enable_camel_case && string =~ '\u'
let string = substitute(string, '\l', '[\0\u\0\E]', 'g')
endif
100 0.000326 return string
FUNCTION vital#_neocomplete#new()
Called 1 time
Total time: 0.004019
Self time: 0.000026
count total (s) self (s)
1 0.004018 0.000025 return s:_import('')
FUNCTION <SNR>70__unify_path()
Called 28 times
Total time: 0.002188
Self time: 0.002188
count total (s) self (s)
28 0.000338 if has_key(s:_unify_path_cache, a:path)
19 0.000182 return s:_unify_path_cache[a:path]
endif
9 0.001347 let value = tolower(fnamemodify(resolve(fnamemodify( a:path, ':p')), ':~:gs?[\\/]\+?/?'))
9 0.000121 let s:_unify_path_cache[a:path] = value
9 0.000042 return value
FUNCTION neocomplete#util#escape_pattern()
Called 50 times
Total time: 0.003892
Self time: 0.001894
count total (s) self (s)
50 0.003824 0.001826 return call(s:get_prelude().escape_pattern, a:000)
FUNCTION <SNR>89_get_omni_funcs()
Called 105 times
Total time: 0.061229
Self time: 0.036904
count total (s) self (s)
105 0.000568 let funcs = []
315 0.002925 for ft in insert(split(a:filetype, '\.'), '_')
210 0.008744 0.004414 let omnifuncs = neocomplete#util#convert2list( get(g:neocomplete#sources#omni#functions, ft, &l:omnifunc))
420 0.001662 for omnifunc in omnifuncs
210 0.004728 0.002383 if neocomplete#helper#check_invalid_omnifunc(omnifunc)
" omnifunc is irregal.
210 0.000681 continue
endif
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, '') != ''
let pattern = g:neocomplete#sources#omni#input_patterns[ft]
else
let pattern = ''
endif
if pattern == ''
continue
endif
call add(funcs, [omnifunc, pattern])
endfor
210 0.000438 endfor
105 0.019018 0.001368 return s:List.uniq(funcs)
FUNCTION neocomplete#sources#neosnippet#define()
Called 1 time
Total time: 0.000010
Self time: 0.000010
count total (s) self (s)
1 0.000007 return s:source
FUNCTION 10()
Called 50 times
Total time: 0.018272
Self time: 0.002667
count total (s) self (s)
50 0.017544 0.001939 let next = matchstr(getline('.')[ len(neocomplete#helper#get_cur_text()) :], '^\S\+')
50 0.000305 if next == ''
50 0.000246 return a:context.candidates
endif
let neocomplete = neocomplete#get_current_neocomplete()
let neocomplete.overlapped_items = {}
let candidates = []
for candidate in a:context.candidates
let overlapped_len = neocomplete#filters#converter_remove_overlap#length(candidate.word, next)
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()
call add(candidates, candidate)
endif
endfor
if empty(candidates)
return a:context.candidates
endif
let candidates = filter(candidates, 'v:val.word !=# a:context.complete_str')
return candidates
FUNCTION 11()
Called 50 times
Total time: 0.021600
Self time: 0.013919
count total (s) self (s)
50 0.000318 if g:neocomplete#max_keyword_width < 0
return a:context.candidates
endif
" Delimiter check.
50 0.002788 0.000657 let filetype = neocomplete#get_context_filetype()
100 0.000773 for delimiter in get(g:neocomplete#delimiter_patterns, filetype, [])
" Count match.
50 0.000223 let delim_cnt = 0
50 0.004663 0.000771 let delimiter_vim = neocomplete#util#escape_pattern(delimiter)
50 0.001043 let matchend = matchend(a:context.complete_str, delimiter_vim)
50 0.000356 while matchend >= 0
let matchend = matchend(a:context.complete_str, delimiter_vim, matchend)
let delim_cnt += 1
endwhile
50 0.000257 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
50 0.000183 endfor
50 0.000242 return a:context.candidates
FUNCTION 12()
Called 50 times
Total time: 0.005394
Self time: 0.001309
count total (s) self (s)
50 0.005022 0.000937 if !neocomplete#is_text_mode() && !neocomplete#within_comment()
50 0.000234 return a:context.candidates
endif
if a:context.complete_str =~ '^\l\{2}$'
for candidate in s:get_convert_candidates(a:context.candidates)
let candidate.word = tolower(candidate.word)
if has_key(candidate, 'abbr')
let candidate.abbr = tolower(candidate.abbr)
endif
endfor
elseif a:context.complete_str =~ '^\u\{2}$'
for candidate in s:get_convert_candidates(a:context.candidates)
let candidate.word = toupper(candidate.word)
if has_key(candidate, 'abbr')
let candidate.abbr = toupper(candidate.abbr)
endif
endfor
elseif a:context.complete_str =~ '^\u\l\+$'
for candidate in s:get_convert_candidates(a:context.candidates)
let candidate.word = toupper(candidate.word[0]). candidate.word[1:]
if has_key(candidate, 'abbr')
let candidate.abbr = toupper(candidate.abbr[0]). tolower(candidate.abbr[1:])
endif
endfor
endif
return a:context.candidates
FUNCTION 13()
Called 50 times
Total time: 0.006530
Self time: 0.006530
count total (s) self (s)
50 0.000288 if g:neocomplete#max_keyword_width < 0
return a:context.candidates
endif
50 0.000144 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
50 0.000294 return a:context.candidates
FUNCTION 14()
Called 105 times
Total time: 0.057382
Self time: 0.016914
count total (s) self (s)
105 0.006833 0.001343 let filetype = neocomplete#get_context_filetype()
105 0.000985 if filetype ==# 'vimshell' || filetype ==# 'unite' || filetype ==# 'int-ssh'
return -1
endif
" Filename pattern.
105 0.016588 0.001765 let pattern = neocomplete#get_keyword_pattern_end('filename', self.name)
105 0.017968 0.002441 let [complete_pos, complete_str] = neocomplete#helper#match_word(a:context.input, pattern)
105 0.010480 0.005852 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.
49 0.000173 return -1
endif
56 0.000579 if complete_str =~ '/'
let complete_pos += strridx(complete_str, '/') + 1
endif
56 0.000206 return complete_pos
FUNCTION 17()
Called 1 time
Total time: 0.005244
Self time: 0.000536
count total (s) self (s)
" Initialize.
1 0.003674 0.000278 call neocomplete#sources#include#initialize()
" Initialize filename include expr. "{{{
1 0.000132 0.000016 call neocomplete#util#set_default_dictionary( 'g:neocomplete#sources#file_include#exprs', 'perl', 'substitute(v:fname, "/", "::", "g")')
1 0.000144 0.000016 call neocomplete#util#set_default_dictionary( 'g:neocomplete#sources#file_include#exprs', 'java,d', 'substitute(v:fname, "/", ".", "g")')
1 0.000120 0.000016 call neocomplete#util#set_default_dictionary( 'g:neocomplete#sources#file_include#exprs', 'ruby', 'substitute(v:fname, "\.rb$", "", "")')
1 0.000184 0.000072 call neocomplete#util#set_default_dictionary( 'g:neocomplete#sources#file_include#exprs', 'python', "substitute(substitute(v:fname, '\\v.*egg%(-info|-link)?$', '', ''), '/', '.', 'g')")
"}}}
" Initialize filename include extensions. "{{{
1 0.000133 0.000015 call neocomplete#util#set_default_dictionary( 'g:neocomplete#sources#file_include#exts', 'c', ['h'])
1 0.000121 0.000017 call neocomplete#util#set_default_dictionary( 'g:neocomplete#sources#file_include#exts', 'cpp', ['', 'h', 'hpp', 'hxx'])
1 0.000121 0.000017 call neocomplete#util#set_default_dictionary( 'g:neocomplete#sources#file_include#exts', 'perl', ['pm'])
1 0.000123 0.000017 call neocomplete#util#set_default_dictionary( 'g:neocomplete#sources#file_include#exts', 'java', ['java'])
1 0.000173 0.000017 call neocomplete#util#set_default_dictionary( 'g:neocomplete#sources#file_include#exts', 'ruby', ['rb'])
1 0.000130 0.000019 call neocomplete#util#set_default_dictionary( 'g:neocomplete#sources#file_include#exts', 'python', ['py', 'py3'])
"}}}
" Initialize filename include delimiter. "{{{
1 0.000168 0.000015 call neocomplete#util#set_default_dictionary( 'g:neocomplete#sources#file_include#delimiters', 'c,cpp,ruby', '/')
"}}}
FUNCTION 18()
Called 105 times
Total time: 0.022833
Self time: 0.014078
count total (s) self (s)
105 0.005829 0.001375 let filetype = neocomplete#get_context_filetype()
105 0.000577 if filetype ==# 'java'
" Cannot complete include path.
" You should use omnifunc plugins..
return -1
endif
" Not Filename pattern.
105 0.000921 if exists('g:neocomplete#sources#include#patterns')
105 0.001338 let pattern = get(g:neocomplete#sources#include#patterns, filetype, &l:include)
105 0.000267 else
let pattern = ''
endif
105 0.007365 0.003064 if neocomplete#is_auto_complete() && (pattern == '' || a:context.input !~ pattern) && a:context.input =~ '\*$\|\.\.\+$\|/c\%[ygdrive/]$'
" Skip filename completion.
return -1
endif
" Check include pattern.
105 0.001235 let pattern = get(g:neocomplete#sources#include#patterns, filetype, &l:include)
105 0.000544 if pattern != ''
let pattern .= '\m\s\+'
endif
105 0.000561 if pattern == '' || a:context.input !~ pattern
105 0.000313 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 neosnippet#helpers#get_snippets()
Called 39 times
Total time: 0.066542
Self time: 0.030699
count total (s) self (s)
39 0.001206 0.000418 call neosnippet#init#check()
39 0.001415 0.000477 let neosnippet = neosnippet#variables#current_neosnippet()
39 0.000354 let snippets = copy(neosnippet.snippets)
117 0.022349 0.001270 for filetype in s:get_sources_filetypes(neosnippet#helpers#get_filetype())
78 0.008220 0.001143 call neosnippet#commands#_make_cache(filetype)
78 0.005424 0.004047 call extend(snippets, neosnippet#variables#snippets()[filetype], 'keep')
78 0.000239 endfor
39 0.001652 0.000469 let cur_text = neosnippet#util#get_cur_text()
39 0.000236 if mode() ==# 'i'
" Special filters.
39 0.004006 0.000605 if !s:is_beginning_of_line(cur_text)
37 0.006416 call filter(snippets, '!v:val.options.head')
37 0.000107 endif
39 0.000064 endif
39 0.013344 call filter(snippets, "cur_text =~# get(v:val, 'regexp', '')")
39 0.000180 return snippets
FUNCTION <SNR>118_fdopen_pgroup()
Called 3 times
Total time: 0.000951
Self time: 0.000245
count total (s) self (s)
3 0.000947 0.000241 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 neocomplete#cache#load_from_cache()
Called 1 time
Total time: 0.001626
Self time: 0.001182
count total (s) self (s)
1 0.000010 let is_string = get(a:000, 0, 0)
1 0.000003 try
" Note: For neocomplete.
1 0.000004 let list = []
1 0.000003 if is_string
1 0.000003 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.000007 else
let list = eval(get(neocomplete#cache#readfile( a:cache_dir, a:filename), 0, '[]'))
endif
1 0.000019 if !empty(list) && is_string && type(list[0]) != type('')
" Type check.
throw 'Type error'
endif
1 0.000004 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 neocomplete#cache#encode_name()
Called 6 times
Total time: 0.023508
Self time: 0.000249
count total (s) self (s)
" Check cache directory.
6 0.022037 0.000117 let cache_dir = neocomplete#get_data_directory() . '/' . a:cache_dir
6 0.001450 0.000111 return s:Cache.getfilename(cache_dir, a:filename)
FUNCTION neocomplete#is_eskk_enabled()
Called 115 times
Total time: 0.001425
Self time: 0.001425
count total (s) self (s)
115 0.001236 return exists('*eskk#is_enabled') && eskk#is_enabled()
FUNCTION 20()
Called 1 time
Total time: 0.001475
Self time: 0.000230
count total (s) self (s)
" Initialize omni completion pattern. "{{{
1 0.000245 0.000018 call neocomplete#util#set_default_dictionary('g:neocomplete#sources#omni#input_patterns','html,xhtml,xml,markdown,mkd','<[^>]*')
1 0.000170 0.000018 call neocomplete#util#set_default_dictionary('g:neocomplete#sources#omni#input_patterns','css,scss,sass','^\s\+\w\+\|\w\+[):;]\?\s\+\w*\|[@!]')
1 0.000128 0.000016 call neocomplete#util#set_default_dictionary('g:neocomplete#sources#omni#input_patterns','javascript','[^. \t]\.\%(\h\w*\)\?')
1 0.000122 0.000017 call neocomplete#util#set_default_dictionary('g:neocomplete#sources#omni#input_patterns','actionscript','[^. \t][.:]\h\w*')
"call neocomplete#util#set_default_dictionary(
"\'g:neocomplete#sources#omni#input_patterns',
"\'php',
"\'[^. \t]->\h\w*\|\h\w*::\w*')
1 0.000120 0.000016 call neocomplete#util#set_default_dictionary('g:neocomplete#sources#omni#input_patterns','java','\%(\h\w*\|)\)\.\w*')
"call neocomplete#util#set_default_dictionary(
"\'g:neocomplete#sources#omni#input_patterns',
"\'perl',
"\'\h\w*->\h\w*\|\h\w*::\w*')
"call neocomplete#util#set_default_dictionary(
"\'g:neocomplete#sources#omni#input_patterns',
"\'c',
"\'[^.[:digit:] *\t]\%(\.\|->\)\w*'
"call neocomplete#util#set_default_dictionary(
"\'g:neocomplete#sources#omni#input_patterns',
"\'cpp',
"\'[^.[:digit:] *\t]\%(\.\|->\)\w*\|\h\w*::\w*')
1 0.000130 0.000016 call neocomplete#util#set_default_dictionary('g:neocomplete#sources#omni#input_patterns','objc','[^.[:digit:] *\t]\%(\.\|->\)\w*')
1 0.000124 0.000016 call neocomplete#util#set_default_dictionary('g:neocomplete#sources#omni#input_patterns','objj','[\[ \.]\w\+$\|:\w*$')
1 0.000121 0.000016 call neocomplete#util#set_default_dictionary('g:neocomplete#sources#omni#input_patterns','go','[^.[:digit:] *\t]\.\w*')
1 0.000120 0.000016 call neocomplete#util#set_default_dictionary('g:neocomplete#sources#omni#input_patterns','clojure','\%(([^)]\+\)\|\*[[:alnum:]_-]\+')
" External language interface check.
1 0.000009 if has('ruby')
" call neocomplete#util#set_default_dictionary(
"\'g:neocomplete#sources#omni#input_patterns', 'ruby',
"\'[^. *\t]\.\h\w*\|\h\w*::\w*')
1 0.000002 endif
1 0.000018 if has('python/dyn') || has('python3/dyn') || has('python') || has('python3')
1 0.000129 0.000015 call neocomplete#util#set_default_dictionary('g:neocomplete#sources#omni#input_patterns','python', '[^. \t]\.\w*')
1 0.000003 endif
"}}}
FUNCTION 21()
Called 105 times
Total time: 0.086992
Self time: 0.006827
count total (s) self (s)
105 0.005727 0.001327 let filetype = neocomplete#get_context_filetype()
105 0.078055 0.003640 let a:context.source__complete_results = s:set_complete_results_pos( s:get_omni_funcs(filetype), a:context.input)
105 0.002753 0.001403 return s:get_complete_pos(a:context.source__complete_results)
FUNCTION 23()
Called 1 time
Total time: 0.000339
Self time: 0.000073
count total (s) self (s)
1 0.000026 autocmd neocomplete Syntax * call s:make_cache()
" Create cache directory.
1 0.000268 0.000016 call neocomplete#cache#make_directory('syntax_cache')
" Initialize check.
1 0.000039 0.000025 call s:make_cache()
FUNCTION 24()
Called 2 times
Total time: 0.000021
Self time: 0.000021
count total (s) self (s)
2 0.000018 silent! delcommand NeoCompleteSyntaxMakeCache
FUNCTION 25()
Called 49 times
Total time: 0.029539
Self time: 0.004109
count total (s) self (s)
49 0.000335 if &filetype == ''
return []
endif
49 0.000226 let list = []
49 0.000378 if !has_key(s:syntax_list, &filetype)
49 0.001390 0.000600 call s:make_cache()
49 0.000105 endif
49 0.025821 0.001181 for syntax in neocomplete#helper#ftdictionary2list( s:syntax_list, neocomplete#get_context_filetype())
let list += syntax
endfor
49 0.000216 return list
FUNCTION 26()
Called 1 time
Total time: 0.033230
Self time: 0.000367
count total (s) self (s)
" Initialize.
1 0.000022 autocmd neocomplete FileType * call neocomplete#sources#vim#helper#on_filetype()
" Initialize check.
1 0.033157 0.000294 call neocomplete#sources#vim#helper#on_filetype()
" Add command.
1 0.000041 command! -nargs=? -complete=buffer NeoCompleteVimMakeCache call neocomplete#sources#vim#helper#make_cache(<q-args>)
FUNCTION 27()
Called 2 times
Total time: 0.000027
Self time: 0.000027
count total (s) self (s)
2 0.000023 silent! delcommand NeoCompleteVimMakeCache
FUNCTION <SNR>95_is_skip_auto_complete()
Called 91 times
Total time: 0.009316
Self time: 0.007261
count total (s) self (s)
91 0.003266 0.001211 let neocomplete = neocomplete#get_current_neocomplete()
91 0.003398 if (a:cur_text == neocomplete.old_cur_text && line('.') == neocomplete.old_linenr) || (g:neocomplete#lock_iminsert && &l:iminsert) || (&l:formatoptions =~# '[tca]' && &l:textwidth > 0 && strwidth(a:cur_text) >= &l:textwidth)
32 0.000222 let neocomplete.skip_next_complete = 0
32 0.000091 return 1
endif
59 0.000271 if !neocomplete.skip_next_complete
59 0.000168 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
if is_delimiter && neocomplete.skip_next_complete == 2
let neocomplete.skip_next_complete = 0
endif
return 0
FUNCTION 29()
Called 49 times
Total time: 0.275950
Self time: 0.018834
count total (s) self (s)
49 0.028679 0.000734 let cur_text = neocomplete#sources#vim#get_cur_text()
49 0.062548 0.003706 if neocomplete#is_auto_complete() && cur_text !~ '\h\w*\.\%(\h\w*\)\?$' && len(a:context.complete_str) < g:neocomplete#auto_completion_start_length && bufname('%') !=# '[Command Line]'
return []
endif
49 0.001247 if cur_text =~ '\h\w*\.\%(\h\w*\)\?$'
" Dictionary.
let complete_str = matchstr(cur_text, '.\%(\h\w*\)\?$')
return neocomplete#sources#vim#helper#var_dictionary( cur_text, complete_str)
elseif a:context.complete_str =~# '^&\%([gl]:\)\?'
" Options.
let prefix = matchstr(a:context.complete_str, '^&\%([gl]:\)\?')
let list = deepcopy( neocomplete#sources#vim#helper#option( cur_text, a:context.complete_str))
for keyword in list
let keyword.word = prefix . keyword.word
endfor
elseif a:context.complete_str =~? '^\c<sid>'
" SID functions.
let prefix = matchstr(a:context.complete_str, '^\c<sid>')
let complete_str = substitute( a:context.complete_str, '^\c<sid>', 's:', '')
let list = deepcopy( neocomplete#sources#vim#helper#function( cur_text, complete_str))
for keyword in list
let keyword.word = prefix . keyword.word[2:]
let keyword.abbr = prefix . get(keyword, 'abbr', keyword.word)[2:]
endfor
elseif cur_text =~# '\<has([''"]\w*$'
" Features.
let list = neocomplete#sources#vim#helper#feature( cur_text, a:context.complete_str)
elseif cur_text =~# '\<expand([''"][<>[:alnum:]]*$'
" Expand.
let list = neocomplete#sources#vim#helper#expand( cur_text, a:context.complete_str)
elseif a:context.complete_str =~ '^\$'
" Environment.
let list = neocomplete#sources#vim#helper#environment( cur_text, a:context.complete_str)
elseif cur_text =~ '^[[:digit:],[:space:][:tab:]$''<>]*!\s*\f\+$'
" Shell commands.
let list = neocomplete#sources#vim#helper#shellcmd( cur_text, a:context.complete_str)
else
" Commands.
49 0.171751 0.001422 let list = neocomplete#sources#vim#helper#command( cur_text, a:context.complete_str)
49 0.000126 endif
49 0.000144 return list
FUNCTION neocomplete#sources#vim#helper#on_filetype()
Called 1 time
Total time: 0.025770
Self time: 0.000143
count total (s) self (s)
1 0.000008 let bufnumber = 1
" Check buffer.
2 0.000016 while bufnumber <= bufnr('$')
1 0.000023 if getbufvar(bufnumber, '&filetype') == 'vim' && bufloaded(bufnumber)&& !has_key(s:script_candidates_list, bufnumber)
1 0.025677 0.000050 let s:script_candidates_list[bufnumber] = s:get_script_candidates(bufnumber)
1 0.000003 endif
1 0.000006 let bufnumber += 1
1 0.000003 endwhile
FUNCTION neocomplete#filters#sorter_filename#define()
Called 1 time
Total time: 0.000008
Self time: 0.000008
count total (s) self (s)
1 0.000006 return s:sorter
FUNCTION <SNR>68_get_prelude()
Called 72 times
Total time: 0.012499
Self time: 0.001978
count total (s) self (s)
72 0.000589 if !exists('s:Prelude')
1 0.010590 0.000069 let s:Prelude = neocomplete#util#get_vital().import('Prelude')
1 0.000003 endif
72 0.000248 return s:Prelude
FUNCTION 30()
Called 1 time
Total time: 0.000041
Self time: 0.000018
count total (s) self (s)
" Initialize.
1 0.000039 0.000016 call neosnippet#util#set_default( 'g:neosnippet#enable_preview', 0)
FUNCTION 31()
Called 39 times
Total time: 0.070976
Self time: 0.004434
count total (s) self (s)
39 0.068061 0.001519 let snippets = values(neosnippet#helpers#get_snippets())
39 0.002127 if matchstr(a:context.input, '\S\+$') !=# matchstr(a:context.input, '\w\+$')
" Word filtering
call filter(snippets, 'v:val.options.word')
endif
39 0.000141 return snippets
FUNCTION 32()
Called 2 times
Total time: 0.001364
Self time: 0.000401
count total (s) self (s)
10 0.000039 for snippet in a:context.candidates
8 0.000037 let snippet.dup = 1
8 0.001118 0.000155 let snippet.menu = neosnippet#util#strwidthpart( snippet.menu_template, winwidth(0)/3)
8 0.000037 if g:neosnippet#enable_preview
let snippet.info = snippet.snip
endif
8 0.000025 endfor
2 0.000008 return a:context.candidates
FUNCTION 33()
Called 2 times
Total time: 0.000209
Self time: 0.000053
count total (s) self (s)
2 0.000197 0.000041 if !(neocomplete#is_text_mode() || neocomplete#within_comment()) || a:context.complete_str !~ '^[[:alpha:]]\+$'
2 0.000006 return []
endif
let list = split(neocomplete#util#system( 'look ' . a:context.complete_str . '| head -n ' . self.max_candidates), "\n")
if neocomplete#util#get_last_status()
return []
endif
return list
FUNCTION neocomplete#util#join_rtp()
Called 3 times
Total time: 0.001588
Self time: 0.000649
count total (s) self (s)
3 0.001582 0.000643 return join(map(copy(a:list), 's:escape(v:val)'), ',')
FUNCTION neocomplete#sources#vim#get_command()
Called 145 times
Total time: 0.006716
Self time: 0.006716
count total (s) self (s)
145 0.006445 return matchstr(a:cur_text, '\<\%(\d\+\)\?\zs\h\w*\ze!\?\|'. '\<\%([[:digit:],[:space:]$''<>]\+\)\?\zs\h\w*\ze/.*')
FUNCTION neocomplete#init#_context()
Called 48 times
Total time: 0.003285
Self time: 0.003285
count total (s) self (s)
48 0.003198 return extend(a:context, { 'input' : '', 'prev_complete_pos' : -1, 'prev_candidates' : [], 'complete_pos' : -1, 'complete_str' : '', 'candidates' : [] })
FUNCTION vimproc#util#set_default()
Called 9 times
Total time: 0.000350
Self time: 0.000350
count total (s) self (s)
9 0.000120 if !exists(a:var) || type({a:var}) != type(a:val)
6 0.000057 let alternate_var = get(a:000, 0, '')
6 0.000084 let {a:var} = exists(alternate_var) ? {alternate_var} : a:val
6 0.000016 endif
FUNCTION neocomplete#util#is_sudo()
Called 2 times
Total time: 0.000031
Self time: 0.000031
count total (s) self (s)
2 0.000028 return $SUDO_USER != '' && $USER !=# $SUDO_USER && $HOME !=# expand('~'.$USER) && $HOME ==# expand('~'.$SUDO_USER)
FUNCTION <SNR>108_check_old_cache()
Called 4 times
Total time: 0.001117
Self time: 0.000335
count total (s) self (s)
" Check old cache file.
4 0.000868 0.000086 let cache_name = s:_encode_name(a:cache_dir, a:filename)
4 0.000162 let ret = getftime(cache_name) == -1 || getftime(cache_name) <= getftime(a:filename)
4 0.000026 if ret && filereadable(cache_name)
" Delete old cache.
call delete(cache_name)
endif
4 0.000011 return ret
FUNCTION <SNR>120_separator()
Called 1 time
Total time: 0.000014
Self time: 0.000014
count total (s) self (s)
1 0.000012 return !exists('+shellslash') || &shellslash ? '/' : '\'
FUNCTION lightline#link()
Called 139 times
Total time: 0.045314
Self time: 0.036868
count total (s) self (s)
139 0.004635 let mode = get(s:lightline._mode_, a:0 ? a:1 : mode(), 'normal')
139 0.001588 if s:mode == mode | return '' | endif
4 0.000023 let s:mode = mode
4 0.008533 0.000087 if !has_key(s:highlight, mode) | call lightline#highlight(mode) | endif
4 0.000082 let [left, right, types] = [s:lightline.active.left, s:lightline.active.right, values(s:lightline.component_type)]
16 0.000087 for i in range(len(left))
12 0.000744 exec printf('hi link LightLineLeft_active_%d LightLineLeft_%s_%d', i, mode, i)
12 0.000617 exec printf('hi link LightLineLeft_active_%d_%d LightLineLeft_%s_%d_%d', i, i + 1, mode, i, i + 1)
60 0.000274 for j in types
48 0.002360 exec printf('hi link LightLineLeft_active_%d_%s LightLineLeft_%s_%d_%s', i, j, mode, i, j)
48 0.002379 exec printf('hi link LightLineLeft_active_%s_%d LightLineLeft_%s_%s_%d', j, i, mode, j, i)
48 0.000131 endfor
12 0.000027 endfor
4 0.000162 exec printf('hi link LightLineMiddle_active LightLineMiddle_%s', mode)
16 0.000087 for i in range(len(right))
12 0.000559 exec printf('hi link LightLineRight_active_%d LightLineRight_%s_%d', i, mode, i)
12 0.000613 exec printf('hi link LightLineRight_active_%d_%d LightLineRight_%s_%d_%d', i, i + 1, mode, i, i + 1)
60 0.000226 for j in types
48 0.002314 exec printf('hi link LightLineRight_active_%d_%s LightLineRight_%s_%d_%s', i, j, mode, i, j)
48 0.002261 exec printf('hi link LightLineRight_active_%s_%d LightLineRight_%s_%s_%d', j, i, mode, j, i)
48 0.000139 endfor
12 0.000032 endfor
20 0.000069 for j in types
16 0.000601 exec printf('hi link LightLineLeft_active_%s LightLineLeft_%s_%s', j, mode, j)
16 0.000611 exec printf('hi link LightLineRight_active_%s LightLineRight_%s_%s', j, mode, j)
16 0.000740 exec printf('hi link LightLineLeft_active_%s_%d LightLineLeft_%s_%s_%d', j, len(left), mode, j, len(left))
16 0.000729 exec printf('hi link LightLineLeft_active_%d_%s LightLineLeft_%s_%d_%s', len(left), j, mode, len(left), j)
16 0.000729 exec printf('hi link LightLineRight_active_%s_%d LightLineRight_%s_%s_%d', j, len(right), mode, j, len(right))
16 0.000726 exec printf('hi link LightLineRight_active_%d_%s LightLineRight_%s_%d_%s', len(right), j, mode, len(right), j)
80 0.000279 for k in types
64 0.002593 exec printf('hi link LightLineLeft_active_%s_%s LightLineLeft_%s_%s_%s', j, k, mode, j, k)
64 0.002541 exec printf('hi link LightLineLeft_active_%s_%s LightLineLeft_%s_%s_%s', k, j, mode, k, j)
64 0.002610 exec printf('hi link LightLineRight_active_%s_%s LightLineRight_%s_%s_%s', j, k, mode, j, k)
64 0.002544 exec printf('hi link LightLineRight_active_%s_%s LightLineRight_%s_%s_%s', k, j, mode, k, j)
64 0.000170 endfor
16 0.000030 endfor
4 0.000013 return ''
FUNCTION vimproc#analyze_shebang()
Called 1 time
Total time: 0.000079
Self time: 0.000079
count total (s) self (s)
1 0.000069 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.000006 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#print_debug()
Called 408 times
Total time: 0.005690
Self time: 0.005690
count total (s) self (s)
408 0.002152 if g:neocomplete#enable_debug
echomsg string(a:expr)
endif
FUNCTION <SNR>70__redir()
Called 12 times
Total time: 0.009613
Self time: 0.009613
count total (s) self (s)
12 0.000167 let [save_verbose, save_verbosefile] = [&verbose, &verbosefile]
12 0.000142 set verbose=0 verbosefile=
12 0.000082 redir => res
12 0.008721 silent! execute a:cmd
12 0.000159 redir END
12 0.000204 let [&verbose, &verbosefile] = [save_verbose, save_verbosefile]
12 0.000082 return res
FUNCTION neocomplete#is_enabled()
Called 787 times
Total time: 0.015446
Self time: 0.009852
count total (s) self (s)
787 0.014415 0.008821 return neocomplete#init#is_enabled()
FUNCTION neocomplete#helper#complete_check()
Called 294 times
Total time: 0.051792
Self time: 0.029587
count total (s) self (s)
294 0.010311 0.003465 let neocomplete = neocomplete#get_current_neocomplete()
294 0.001264 if g:neocomplete#enable_debug
echomsg split(reltimestr(reltime(neocomplete.start_time)))[0]
endif
294 0.028168 0.012809 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
294 0.001228 if ret
let neocomplete = neocomplete#get_current_neocomplete()
let neocomplete.skipped = 1
call neocomplete#print_debug('Skipped.')
endif
294 0.000856 return ret
FUNCTION neocomplete#sources#vim#helper#get_completion_name()
Called 191 times
Total time: 0.108032
Self time: 0.019251
count total (s) self (s)
191 0.001957 if !has_key(s:internal_candidates_list, 'command_completions')
1 0.088837 0.000056 let s:internal_candidates_list.command_completions = s:make_cache_completion_from_dict('command_completions')
1 0.000003 endif
191 0.001536 if !has_key(s:global_candidates_list, 'command_completions')
let s:global_candidates_list.commands = s:get_cmdlist()
endif
191 0.002614 if has_key(s:internal_candidates_list.command_completions, a:command_name)&& exists('*neocomplete#sources#vim#helper#' .s:internal_candidates_list.command_completions[a:command_name])
return s:internal_candidates_list.command_completions[a:command_name]
elseif has_key(s:global_candidates_list.command_completions, a:command_name)&& exists('*neocomplete#sources#vim#helper#' .s:global_candidates_list.command_completions[a:command_name])
return s:global_candidates_list.command_completions[a:command_name]
else
191 0.000513 return ''
endif
FUNCTION <SNR>101__import()
Called 5 times
Total time: 0.036469
Self time: 0.001544
count total (s) self (s)
5 0.000050 if type(a:name) == type(0)
return s:_build_module(a:name)
endif
5 0.004730 0.000107 let path = s:_get_module_path(a:name)
5 0.000033 if path ==# ''
throw 'vital: module not found: ' . a:name
endif
5 0.010326 0.000194 let sid = get(s:_scripts(), path, 0)
5 0.000020 if !sid
3 0.000007 try
3 0.003587 0.000673 execute 'source' fnameescape(path)
3 0.000013 catch /^Vim\%((\a\+)\)\?:E484/
throw 'vital: module not found: ' . a:name
catch /^Vim\%((\a\+)\)\?:E127/
" Ignore.
endtry
3 0.007106 0.000078 let sid = s:_scripts()[path]
3 0.000009 endif
5 0.010363 0.000135 return s:_build_module(sid)
FUNCTION neocomplete#init#_variables()
Called 2 times
Total time: 0.053042
Self time: 0.004456
count total (s) self (s)
" Initialize keyword patterns. "{{{
2 0.009546 0.000301 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','_','\h\w*')
2 0.011015 0.000068 call neocomplete#util#set_default_dictionary( 'g:neocomplete#keyword_patterns','filename', neocomplete#util#is_windows() ?'\%(\a\+:/\)\?\%([/[:alnum:]()$+_~.{}\x80-\xff-]\|[^[:print:]]\|\\.\)\+' :'\%([/\[\][:alnum:]()$+_~.{}-]\|[^[:print:]]\|\\.\)\+')
2 0.000502 0.000045 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','lisp,scheme,clojure,int-gosh,int-clisp,int-clj','[[:alpha:]!$%&*+/:<=>?@\^_~\-][[:alnum:]!$%&*./:<=>?@\^_~\-]*')
2 0.000285 0.000034 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','ruby,int-irb','^=\%(b\%[egin]\|e\%[nd]\)\|\%(@@\|[$@]\)\h\w*\|\h\w*\%(::\w*\)*[!?]\?')
2 0.000310 0.000039 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','php,int-php','</\?\%(\h[[:alnum:]_-]*\s*\)\?\%(/\?>\)\?'.'\|\$\h\w*\|\h\w*\%(\%(\\\|::\)\w*\)*')
2 0.000286 0.000035 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','perl,int-perlsh','<\h\w*>\?\|[$@%&*]\h\w*\|\h\w*\%(::\w*\)*')
2 0.000311 0.000038 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','perl6,int-perl6','<\h\w*>\?\|[$@%&][!.*?]\?\h[[:alnum:]_-]*'.'\|\h[[:alnum:]_-]*\%(::[[:alnum:]_-]*\)*')
2 0.000234 0.000030 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','pir','[$@%.=]\?\h\w*')
2 0.000250 0.000031 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','pasm','[=]\?\h\w*')
2 0.000296 0.000046 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','vim,help','-\h[[:alnum:]-]*=\?\|\c\[:\%(\h\w*:\]\)\?\|&\h[[:alnum:]_:]*\|'.'<SID>\%(\h\w*\)\?\|<Plug>([^)]*)\?'.'\|<\h[[:alnum:]_-]*>\?\|\h[[:alnum:]_:#]*[!(]\?\|$\h\w*')
2 0.000266 0.000041 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','tex','\\\a{\a\{1,2}}\|\\[[:alpha:]@][[:alnum:]@]*'.'\%({\%([[:alnum:]:_]\+\*\?}\?\)\?\)\?\|\a[[:alnum:]:_]*\*\?')
2 0.000430 0.000033 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','sh,zsh,int-zsh,int-bash,int-sh','[[:alpha:]_.-][[:alnum:]_.-]*')
2 0.000242 0.000034 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','vimshell','\$\$\?\w*\|[[:alpha:]_.\\/~-][[:alnum:]_.\\/~-]*\|\d\+\%(\.\d\+\)\+')
2 0.000306 0.000035 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','ps1,int-powershell','\[\h\%([[:alnum:]_.]*\]::\)\?\|[$%@.]\?[[:alpha:]_.:-][[:alnum:]_.:-]*')
2 0.000234 0.000032 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','c','^\s*#\s*\h\w*\|\h\w*')
2 0.000232 0.000031 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','cpp','^\s*#\s*\h\w*\|\h\w*')
2 0.000231 0.000030 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','objc','^\s*#\s*\h\w*\|\h\w*\|@\h\w*')
2 0.000233 0.000031 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','objcpp','^\s*#\s*\h\w*\|\h\w*\|@\h\w*')
2 0.000252 0.000048 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','objj','\h\w*\|@\h\w*')
2 0.000230 0.000030 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','d','\h\w*')
2 0.000347 0.000032 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','python,int-python,int-ipython','[@]\?\h\w*')
2 0.000243 0.000032 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','cs','\h\w*')
2 0.000235 0.000032 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','java','[@]\?\h\w*')
2 0.000442 0.000033 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','javascript,actionscript,int-js,int-kjs,int-rhino','\h\w*')
2 0.000289 0.000031 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','coffee,int-coffee','[@]\?\h\w*')
2 0.000261 0.000029 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','awk','\h\w*')
2 0.000294 0.000037 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','haskell,int-ghci','\%(\u\w*\.\)\+[[:alnum:]_'']*\|[[:alpha:]_''][[:alnum:]_'']*')
2 0.000434 0.000034 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','ml,ocaml,int-ocaml,int-sml,int-smlsharp','[''`#.]\?\h[[:alnum:]_'']*')
2 0.000285 0.000035 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','erlang,int-erl','^\s*-\h\w*\|\%(\h\w*:\)*\h\w*\|\h[[:alnum:]_@]*')
2 0.000478 0.000043 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','html,xhtml,xml,markdown,mkd,eruby','</\?\%([[:alnum:]_:-]\+\s*\)\?\%(/\?>\)\?\|&\h\%(\w*;\)\?'.'\|\h[[:alnum:]_-]*="\%([^"]*"\?\)\?\|\h[[:alnum:]_:-]*')
2 0.000388 0.000035 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','css,stylus,scss,less','[@#.]\?[[:alpha:]_:-][[:alnum:]_:-]*')
2 0.000540 0.000033 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','tags','^[^!][^/[:blank:]]*')
2 0.000248 0.000036 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','pic','^\s*#\h\w*\|\h\w*')
2 0.000245 0.000037 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','arm','\h\w*')
2 0.000265 0.000032 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','asmh8300','[[:alpha:]_.][[:alnum:]_.]*')
2 0.000243 0.000035 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','masm','\.\h\w*\|[[:alpha:]_@?$][[:alnum:]_@?$]*\|\h\w*:\h\w*')
2 0.000238 0.000035 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','nasm','^\s*\[\h\w*\|[%.]\?\h\w*\|\%(\.\.@\?\|%[%$!]\)\%(\h\w*\)\?\|\h\w*:\h\w*')
2 0.000235 0.000031 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','asm','[%$.]\?\h\w*\%(\$\h\w*\)\?')
2 0.000233 0.000031 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','gas','[$.]\?\h\w*')
2 0.000304 0.000031 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','gdb,int-gdb','$\h\w*\|[[:alnum:]:._-]\+')
2 0.000239 0.000033 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','make','[[:alpha:]_.-][[:alnum:]_.-]*')
2 0.000306 0.000031 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','scala,int-scala','\h\w*')
2 0.000835 0.000034 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','int-termtter','\h[[:alnum:]_/-]*\|\$\a\+\|#\h\w*')
2 0.000271 0.000033 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','int-earthquake','[:#$]\h\w*\|\h[[:alnum:]_/-]*')
2 0.000289 0.000032 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','dosbatch,int-cmdproxy','\$\w+\|[[:alpha:]_./-][[:alnum:]_.-]*')
2 0.000260 0.000032 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','vb','\h\w*\|#\h\w*')
2 0.000237 0.000031 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','lua','\h\w*')
2 0.000233 0.000030 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns', 'zimbu','\h\w*')
2 0.000270 0.000030 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','konoha','[*$@%]\h\w*\|\h\w*')
2 0.000262 0.000032 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','cobol','\a[[:alnum:]-]*')
2 0.000236 0.000032 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','coq','\h[[:alnum:]_'']*')
2 0.000232 0.000029 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','tcl','[.-]\h\w*\|\h\w*')
2 0.000303 0.000030 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','nyaos,int-nyaos','\h\w*')
2 0.000234 0.000030 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','go','\h\w*')
2 0.000235 0.000032 call neocomplete#util#set_default_dictionary('g:neocomplete#keyword_patterns','toml','\h[[:alnum:]_.-]*')
"}}}
" Initialize same file types. "{{{
2 0.000230 0.000028 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'c', 'cpp')
2 0.000229 0.000028 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'cpp', 'c')
2 0.000253 0.000029 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'erb', 'ruby,html,xhtml')
2 0.000278 0.000030 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'html,xml', 'xhtml')
2 0.000275 0.000031 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'html,xhtml', 'css,stylus,less')
2 0.000254 0.000030 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'css', 'scss')
2 0.000234 0.000030 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'scss', 'css')
2 0.000235 0.000030 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'stylus', 'css')
2 0.000233 0.000029 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'less', 'css')
2 0.000256 0.000052 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'xhtml', 'html,xml')
2 0.000231 0.000028 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'help', 'vim')
2 0.000232 0.000029 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'tex', 'bib,plaintex')
2 0.000255 0.000031 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'plaintex', 'bib,tex')
2 0.000252 0.000032 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'lingr-say', 'lingr-messages,lingr-members')
2 0.000236 0.000030 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'J6uil_say', 'J6uil')
2 0.000256 0.000030 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'vimconsole', 'vim')
" Interactive filetypes.
2 0.000233 0.000030 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-irb', 'ruby')
2 0.000303 0.000031 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-ghci,int-hugs', 'haskell')
2 0.000285 0.000032 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-python,int-ipython', 'python')
2 0.000259 0.000031 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-gosh', 'scheme')
2 0.000236 0.000031 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-clisp', 'lisp')
2 0.000233 0.000031 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-erl', 'erlang')
2 0.000254 0.000031 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-zsh', 'zsh')
2 0.000394 0.000030 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-bash', 'bash')
2 0.000256 0.000035 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-sh', 'sh')
2 0.000270 0.000030 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-cmdproxy', 'dosbatch')
2 0.000239 0.000030 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-powershell', 'powershell')
2 0.000258 0.000031 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-perlsh', 'perl')
2 0.000237 0.000032 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-perl6', 'perl6')
2 0.000235 0.000032 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-ocaml', 'ocaml')
2 0.000304 0.000032 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-clj,int-lein', 'clojure')
2 0.000284 0.000031 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-sml,int-smlsharp', 'sml')
2 0.000347 0.000033 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-js,int-kjs,int-rhino', 'javascript')
2 0.000237 0.000031 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-coffee', 'coffee')
2 0.000242 0.000032 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-gdb', 'gdb')
2 0.000347 0.000042 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-scala', 'scala')
2 0.000322 0.000040 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-nyaos', 'nyaos')
2 0.000318 0.000040 call neocomplete#util#set_default_dictionary( 'g:neocomplete#same_filetypes', 'int-php', 'php')
"}}}
" Initialize delimiter patterns. "{{{
2 0.000407 0.000043 call neocomplete#util#set_default_dictionary( 'g:neocomplete#delimiter_patterns', 'vim,help', ['#'])
2 0.000440 0.000047 call neocomplete#util#set_default_dictionary( 'g:neocomplete#delimiter_patterns', 'erlang,lisp,int-clisp', [':'])
2 0.000405 0.000048 call neocomplete#util#set_default_dictionary( 'g:neocomplete#delimiter_patterns', 'lisp,int-clisp', ['/', ':'])
2 0.000365 0.000061 call neocomplete#util#set_default_dictionary( 'g:neocomplete#delimiter_patterns', 'clojure,int-clj', ['/', '.'])
2 0.000300 0.000035 call neocomplete#util#set_default_dictionary( 'g:neocomplete#delimiter_patterns', 'perl,cpp', ['::'])
2 0.000253 0.000035 call neocomplete#util#set_default_dictionary( 'g:neocomplete#delimiter_patterns', 'php', ['\', '::'])
2 0.000759 0.000046 call neocomplete#util#set_default_dictionary( 'g:neocomplete#delimiter_patterns', 'java,d,javascript,actionscript,'. 'ruby,eruby,haskell,int-ghci,coffee,zimbu,konoha', ['.'])
2 0.000257 0.000036 call neocomplete#util#set_default_dictionary( 'g:neocomplete#delimiter_patterns', 'lua', ['.', ':'])
2 0.000254 0.000035 call neocomplete#util#set_default_dictionary( 'g:neocomplete#delimiter_patterns', 'perl6', ['.', '::'])
"}}}
" Initialize ctags arguments. "{{{
2 0.000248 0.000031 call neocomplete#util#set_default_dictionary( 'g:neocomplete#ctags_arguments', '_', '')
2 0.000296 0.000071 call neocomplete#util#set_default_dictionary( 'g:neocomplete#ctags_arguments', 'vim', '--language-force=vim --extra=fq --fields=afmiKlnsStz ' . "--regex-vim='/function!? ([a-z#:_0-9A-Z]+)/\\1/function/'")
2 0.000172 0.000032 if neocomplete#util#is_mac()
2 0.000280 0.000056 call neocomplete#util#set_default_dictionary( 'g:neocomplete#ctags_arguments', 'c', '--c-kinds=+p --fields=+iaS --extra=+q -I__DARWIN_ALIAS,__DARWIN_ALIAS_C,__DARWIN_ALIAS_I,__DARWIN_INODE64 -I__DARWIN_1050,__DARWIN_1050ALIAS,__DARWIN_1050ALIAS_C,__DARWIN_1050ALIAS_I,__DARWIN_1050INODE64 -I__DARWIN_EXTSN,__DARWIN_EXTSN_C -I__DARWIN_LDBL_COMPAT,__DARWIN_LDBL_COMPAT2')
2 0.000005 else
call neocomplete#util#set_default_dictionary( 'g:neocomplete#ctags_arguments', 'c', '-R --sort=1 --c-kinds=+p --fields=+iaS --extra=+q ' . '-I __wur,__THROW,__attribute_malloc__,__nonnull+,'. '__attribute_pure__,__attribute_warn_unused_result__,__attribute__+')
endif
2 0.000271 0.000050 call neocomplete#util#set_default_dictionary( 'g:neocomplete#ctags_arguments', 'cpp', '--language-force=C++ -R --sort=1 --c++-kinds=+p --fields=+iaS --extra=+q '. '-I __wur,__THROW,__attribute_malloc__,__nonnull+,'. '__attribute_pure__,__attribute_warn_unused_result__,__attribute__+')
"}}}
" Initialize text mode filetypes. "{{{
2 0.000997 0.000044 call neocomplete#util#set_default_dictionary( 'g:neocomplete#text_mode_filetypes', 'hybrid,text,help,tex,gitcommit,gitrebase,vcs-commit,markdown,mkd,'. 'textile,creole,org,rdoc,mediawiki,rst,asciidoc,pod', 1)
"}}}
" Initialize tags filter patterns. "{{{
2 0.000302 0.000034 call neocomplete#util#set_default_dictionary('g:neocomplete#tags_filter_patterns', 'c,cpp','v:val.word !~ ''^[~_]''')
"}}}
" Initialize force omni completion patterns. "{{{
2 0.000280 0.000036 call neocomplete#util#set_default_dictionary('g:neocomplete#force_omni_input_patterns', 'objc','\h\w\+\|[^.[:digit:] *\t]\%(\.\|->\)')
"}}}
" Must g:neocomplete#auto_completion_start_length > 1.
2 0.000013 if g:neocomplete#auto_completion_start_length < 1
let g:neocomplete#auto_completion_start_length = 1
endif
" Must g:neocomplete#min_keyword_length > 1.
2 0.000008 if g:neocomplete#min_keyword_length < 1
let g:neocomplete#min_keyword_length = 1
endif
FUNCTION neocomplete#sources#vim#get_cur_text()
Called 154 times
Total time: 0.078509
Self time: 0.021285
count total (s) self (s)
154 0.059437 0.002213 let cur_text = neocomplete#get_cur_text(1)
154 0.001934 if &filetype == 'vimshell' && exists('*vimshell#get_secondary_prompt') && empty(b:vimshell.continuation)
return cur_text[len(vimshell#get_secondary_prompt()) :]
endif
154 0.001090 let line = line('.')
154 0.000588 let cnt = 0
154 0.003079 while cur_text =~ '^\s*\\' && line > 1 && cnt < 5
let cur_text = getline(line - 1) . substitute(cur_text, '^\s*\\', '', '')
let line -= 1
let cnt += 1
endwhile
154 0.006529 return split(cur_text, '\s\+|\s\+\|<bar>', 1)[-1]
FUNCTION <SNR>95_close_preview_window()
Called 90 times
Total time: 0.002608
Self time: 0.002608
count total (s) self (s)
90 0.001823 if g:neocomplete#enable_auto_close_preview && bufname('%') !=# '[Command Line]' && winnr('$') != 1 && !&l:previewwindow && !s:check_in_do_auto_complete()
" Close preview window.
pclose!
endif
FUNCTION <SNR>48_term()
Called 19 times
Total time: 0.000277
Self time: 0.000277
count total (s) self (s)
19 0.000246 return len(a:l) == 5 && type(a:l[4]) == 1 && strlen(a:l[4]) ? 'term='.a:l[4].' cterm='.a:l[4].' gui='.a:l[4] : ''
FUNCTION <SNR>113_get_script_candidates()
Called 1 time
Total time: 0.025627
Self time: 0.023012
count total (s) self (s)
" Get script candidate list.
1 0.000007 let function_dict = {}
1 0.000005 let variable_dict = {}
1 0.000008 let dictionary_variable_dict = {}
1 0.000005 let function_prototypes = {}
1 0.000006 let var_pattern = '\a:[[:alnum:]_:]*\.\h\w*\%(()\?\)\?'
186 0.000988 for line in getbufline(a:bufnumber, 1, '$')
185 0.002765 if line =~ '\<fu\%[nction]!\?\s\+s:'
call s:analyze_function_line(line, function_dict, function_prototypes)
elseif line =~ '\<let\s\+'
" Get script variable.
5 0.002729 0.000114 call s:analyze_variable_line(line, variable_dict)
5 0.000019 elseif line =~ var_pattern
while line =~ var_pattern
let var_name = matchstr(line, '\a:[[:alnum:]_:]*\ze\.\h\w*')
let candidates_dict = dictionary_variable_dict
if !has_key(candidates_dict, var_name)
let candidates_dict[var_name] = {}
endif
call s:analyze_dictionary_variable_line(line, candidates_dict[var_name], var_name)
let line = line[matchend(line, var_pattern) :]
endwhile
endif
185 0.001187 endfor
1 0.000016 return { 'functions' : function_dict, 'variables' : variable_dict, 'function_prototypes' : function_prototypes, 'dictionary_variables' : dictionary_variable_dict }
FUNCTION neocomplete#init#_filter()
Called 9 times
Total time: 0.000557
Self time: 0.000557
count total (s) self (s)
9 0.000045 let default = { }
9 0.000093 let filter = extend(default, a:filter)
9 0.000059 if !has_key(filter, 'kind')
9 0.000251 let filter.kind = (filter.name =~# '^matcher_') ? 'matcher' : (filter.name =~# '^sorter_') ? 'sorter' : 'converter'
9 0.000025 endif
9 0.000029 return filter
FUNCTION neocomplete#get_data_directory()
Called 14 times
Total time: 0.023979
Self time: 0.022222
count total (s) self (s)
14 0.000436 let g:neocomplete#data_directory = get(g:, 'neocomplete#data_directory', ($XDG_CACHE_HOME != '' ? $XDG_CACHE_HOME . '/neocomplete' : '~/.cache/neocomplete'))
14 0.022866 0.021109 let directory = neocomplete#util#substitute_path_separator( neocomplete#util#expand(g:neocomplete#data_directory))
14 0.000220 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
14 0.000051 return directory
FUNCTION neocomplete#cache#get_cache_list()
Called 11 times
Total time: 0.003141
Self time: 0.001515
count total (s) self (s)
11 0.000079 let cache_list = a:async_cache_list
11 0.000052 let loaded_keywords = []
11 0.000042 let loaded = 0
12 0.000608 for cache in filter(copy(cache_list), 'filereadable(v:val.cachename)')
1 0.000005 let loaded = 1
1 0.001663 0.000037 let loaded_keywords = neocomplete#cache#load_from_cache( a:cache_dir, cache.filename, 1)
1 0.000019 endfor
11 0.000327 call filter(cache_list, '!filereadable(v:val.cachename)')
11 0.000073 return [loaded, loaded_keywords]
FUNCTION lightline_powerful#filename()
Called 278 times
Total time: 0.020437
Self time: 0.020437
count total (s) self (s)
278 0.006075 let f = expand('%:t')
278 0.011815 if has_key(b:, 'lightline_filename') && get(b:, 'lightline_filename_', '') ==# f . &mod . &ma && index(s:f, &ft) < 0 && index(s:f, f) < 0
277 0.001515 return b:lightline_filename
endif
1 0.000017 let b:lightline_filename_ = f . &mod . &ma
1 0.000041 let default = join(filter([&ro ? s:ro : '', f, &mod ? '+' : &ma ? '' : '-'], 'len(v:val)'), ' ')
1 0.000042 let b:lightline_filename = f =~# '^NERD_tree' ? '' : f =~# '^\[preview' ? 'Preview' : eval(get(s:e, &ft, get(s:e, f, 'default')))
1 0.000011 if len(b:lightline_filename) > winwidth(0)
let b:lightline_filename = matchstr(b:lightline_filename, repeat('.', strchars(b:lightline_filename) * winwidth(0) / len(b:lightline_filename)))
endif
1 0.000005 return b:lightline_filename
FUNCTION vimproc#util#iconv()
Called 18 times
Total time: 0.001335
Self time: 0.001079
count total (s) self (s)
18 0.000583 0.000327 if !vimproc#util#has_iconv() || a:expr == '' || a:from == '' || a:to == '' || a:from ==# a:to
return a:expr
endif
18 0.000464 let result = iconv(a:expr, a:from, a:to)
18 0.000119 return result != '' ? result : a:expr
FUNCTION <SNR>9_insertEnter()
Called 1 time
Total time: 0.010145
Self time: 0.000367
count total (s) self (s)
1 0.002735 0.000037 call miv#load('closebuffer')
1 0.003174 0.000031 call miv#load('insert-mode-motion')
1 0.000274 autocmd! MivInsertEnter
1 0.000004 augroup! MivInsertEnter
1 0.003956 0.000019 silent! doautocmd InsertEnter
FUNCTION neocomplete#util#is_complete_select()
Called 23 times
Total time: 0.000244
Self time: 0.000244
count total (s) self (s)
23 0.000207 return get(g:, 'neocomplete#enable_complete_select', 0)
FUNCTION <SNR>118_fdopen_pipes()
Called 3 times
Total time: 0.000943
Self time: 0.000241
count total (s) self (s)
3 0.000940 0.000238 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 neocomplete#get_cur_text()
Called 268 times
Total time: 0.091263
Self time: 0.016506
count total (s) self (s)
" Return cached text.
268 0.009480 0.003453 let neocomplete = neocomplete#get_current_neocomplete()
268 0.080712 0.011982 return (a:0 == 0 && mode() ==# 'i' && neocomplete.cur_text != '') ? neocomplete.cur_text : neocomplete#helper#get_cur_text()
FUNCTION <SNR>118_SID_PREFIX()
Called 67 times
Total time: 0.001616
Self time: 0.001616
count total (s) self (s)
67 0.000519 if !exists('s:sid_prefix')
1 0.000163 let s:sid_prefix = matchstr(expand('<sfile>'), '<SNR>\d\+_\zeSID_PREFIX$')
1 0.000004 endif
67 0.000229 return s:sid_prefix
FUNCTION GetVimIndentIntern()
Called 2 times
Total time: 0.001158
Self time: 0.001158
count total (s) self (s)
" Find a non-blank line above the current line.
2 0.000034 let lnum = prevnonblank(v:lnum - 1)
" If the current line doesn't start with '\' and below a line that starts
" with '\', use the indent of the line above it.
2 0.000023 let cur_text = getline(v:lnum)
2 0.000053 if cur_text !~ '^\s*\\'
2 0.000072 while lnum > 0 && getline(lnum) =~ '^\s*\\'
let lnum = lnum - 1
endwhile
2 0.000005 endif
" At the start of the file use zero indent.
2 0.000015 if lnum == 0
return 0
endif
2 0.000017 let prev_text = getline(lnum)
" Add a 'shiftwidth' after :if, :while, :try, :catch, :finally, :function
" and :else. Add it three times for a line that starts with '\' after
" a line that doesn't (or g:vim_indent_cont if it exists).
2 0.000015 let ind = indent(lnum)
2 0.000034 if cur_text =~ '^\s*\\' && v:lnum > 1 && prev_text !~ '^\s*\\'
if exists("g:vim_indent_cont")
let ind = ind + g:vim_indent_cont
else
let ind = ind + &sw * 3
endif
elseif prev_text =~ '^\s*aug\%[roup]' && prev_text !~ '^\s*aug\%[roup]\s*!\=\s\+END'
let ind = ind + &sw
else
" A line starting with :au does not increment/decrement indent.
2 0.000034 if prev_text !~ '^\s*au\%[tocmd]'
2 0.000256 let i = match(prev_text, '\(^\||\)\s*\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\%[lly]\|fu\%[nction]\|el\%[seif]\)\>')
2 0.000012 if i >= 0
let ind += &sw
if strpart(prev_text, i, 1) == '|' && has('syntax_items') && synIDattr(synID(lnum, i, 1), "name") =~ '\(Comment\|String\)$'
let ind -= &sw
endif
endif
2 0.000003 endif
2 0.000004 endif
" If the previous line contains an "end" after a pipe, but not in an ":au"
" command. And not when there is a backslash before the pipe.
" And when syntax HL is enabled avoid a match inside a string.
2 0.000187 let i = match(prev_text, '[^\\]|\s*\(ene\@!\)')
2 0.000013 if i > 0 && prev_text !~ '^\s*au\%[tocmd]'
if !has('syntax_items') || synIDattr(synID(lnum, i + 2, 1), "name") !~ '\(Comment\|String\)$'
let ind = ind - &sw
endif
endif
" Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry,
" :endfun, :else and :augroup END.
2 0.000060 if cur_text =~ '^\s*\(ene\@!\|cat\|fina\|el\|aug\%[roup]\s*!\=\s\+[eE][nN][dD]\)'
let ind = ind - &sw
endif
2 0.000008 return ind
FUNCTION neocomplete#util#set_dictionary_helper()
Called 248 times
Total time: 0.019602
Self time: 0.019602
count total (s) self (s)
675 0.007448 for key in split(a:keys, '\s*,\s*')
427 0.003011 if !has_key(a:variable, key)
232 0.001727 let a:variable[key] = a:pattern
232 0.000524 endif
427 0.001537 endfor
FUNCTION vimproc#util#is_windows()
Called 8 times
Total time: 0.000073
Self time: 0.000073
count total (s) self (s)
8 0.000046 return s:is_windows
FUNCTION <SNR>70__import()
Called 5 times
Total time: 0.041576
Self time: 0.001625
count total (s) self (s)
5 0.000064 if type(a:name) == type(0)
return s:_build_module(a:name)
endif
5 0.008991 0.000107 let path = s:_get_module_path(a:name)
5 0.000026 if path ==# ''
throw 'vital: module not found: ' . a:name
endif
5 0.009939 0.000184 let sid = s:_get_sid_by_script(path)
5 0.000020 if !sid
3 0.000009 try
3 0.004018 0.000672 execute 'source' fnameescape(path)
3 0.000016 catch /^Vim\%((\a\+)\)\?:E484/
throw 'vital: module not found: ' . a:name
catch /^Vim\%((\a\+)\)\?:E127/
" Ignore.
endtry
3 0.007030 0.000082 let sid = s:_get_sid_by_script(path)
3 0.000017 endif
5 0.011202 0.000184 return s:_build_module(sid)
FUNCTION <SNR>106_uniq()
Called 2 times
Total time: 0.000418
Self time: 0.000041
count total (s) self (s)
2 0.000415 0.000038 return s:uniq_by(a:list, 'v:val')
FUNCTION neocomplete#util#has_vimproc()
Called 2 times
Total time: 0.020658
Self time: 0.001082
count total (s) self (s)
" Initialize.
2 0.000019 if !exists('g:neocomplete#use_vimproc')
" Check vimproc.
1 0.000003 try
1 0.020550 0.000974 call vimproc#version()
1 0.000007 let exists_vimproc = 1
1 0.000003 catch
let exists_vimproc = 0
endtry
1 0.000018 let g:neocomplete#use_vimproc = exists_vimproc
1 0.000003 endif
2 0.000008 return g:neocomplete#use_vimproc
FUNCTION neosnippet#variables#data_dir()
Called 4 times
Total time: 0.000695
Self time: 0.000695
count total (s) self (s)
4 0.000568 let g:neosnippet#data_directory = substitute(fnamemodify(get( g:, 'neosnippet#data_directory', ($XDG_CACHE_HOME != '' ? $XDG_CACHE_HOME . '/neosnippet' : expand('~/.cache/neosnippet'))), ':p'), '\\', '/', 'g')
4 0.000061 if !isdirectory(g:neosnippet#data_directory)
call mkdir(g:neosnippet#data_directory, 'p')
endif
4 0.000018 return g:neosnippet#data_directory
FUNCTION neocomplete#get_keyword_pattern_end()
Called 653 times
Total time: 0.103041
Self time: 0.015127
count total (s) self (s)
653 0.102124 0.014210 return '\%('.call('neocomplete#get_keyword_pattern', a:000).'\m\)$'
FUNCTION neocomplete#is_locked()
Called 94 times
Total time: 0.010941
Self time: 0.001631
count total (s) self (s)
94 0.010793 0.001483 return neocomplete#is_cache_disabled() || &paste || g:neocomplete#disable_auto_complete
FUNCTION <SNR>95_make_cache_current_line()
Called 158 times
Total time: 5.665150
Self time: 0.015553
count total (s) self (s)
158 0.005633 0.001958 let neocomplete = neocomplete#get_current_neocomplete()
158 0.095954 0.002424 if neocomplete#helper#is_enabled_source('buffer', neocomplete.context_filetype)
" Caching current cache line.
158 5.541932 0.002442 call neocomplete#sources#buffer#make_cache_current_line()
158 0.000559 endif
158 0.015934 0.003032 if neocomplete#helper#is_enabled_source('member', neocomplete.context_filetype)
" Caching current cache line.
call neocomplete#sources#member#make_cache_current_line()
endif
FUNCTION <SNR>97_initialize_others()
Called 1 time
Total time: 0.008757
Self time: 0.000932
count total (s) self (s)
1 0.000006 augroup neosnippet "{{{
1 0.000342 autocmd!
" Set make cache event.
1 0.000019 autocmd FileType * call neosnippet#commands#_make_cache(&filetype)
" Re make cache events
1 0.000022 autocmd BufWritePost *.snip,*.snippets call neosnippet#variables#set_snippets({})
1 0.000012 autocmd BufEnter * call neosnippet#mappings#_clear_select_mode_mappings()
1 0.000004 augroup END"}}}
1 0.000002 augroup neosnippet
1 0.000082 autocmd BufNewFile,BufRead,Syntax * execute 'syntax match neosnippetExpandSnippets' "'".neosnippet#get_placeholder_marker_pattern(). '\|' .neosnippet#get_sync_placeholder_marker_pattern().'\|' .neosnippet#get_mirror_placeholder_marker_pattern()."'" 'containedin=ALL oneline'
1 0.000009 if has('conceal')
1 0.000064 autocmd BufNewFile,BufRead,Syntax * syntax region neosnippetConcealExpandSnippets matchgroup=neosnippetExpandSnippets start='<`\d\+:\=\|<{\d\+:\=\|<|' end='`>\|}>\||>' containedin=ALL concealends oneline
1 0.000003 endif
1 0.000003 augroup END
1 0.000368 0.000020 doautocmd neosnippet BufRead
1 0.000024 hi def link neosnippetExpandSnippets Special
1 0.007750 0.000273 call neosnippet#mappings#_clear_select_mode_mappings()
1 0.000006 if g:neosnippet#enable_snipmate_compatibility "{{{
" For snipMate function.
function! Filename(...)
let filename = expand('%:t:r')
if filename == ''
return a:0 == 2 ? a:2 : ''
elseif a:0 == 0 || a:1 == ''
return filename
else
return substitute(a:1, '$1', filename, 'g')
endif
endfunction
endif"}}}
FUNCTION <SNR>118_libcall()
Called 9 times
Total time: 0.010602
Self time: 0.008794
count total (s) self (s)
" End Of Value
9 0.000064 let EOV = "\xFF"
9 0.000252 let args = empty(a:args) ? '' : (join(reverse(copy(a:args)), EOV) . EOV)
9 0.007580 let stack_buf = libcall(g:vimproc#dll_path, a:func, args)
9 0.002091 0.000283 let result = s:split(stack_buf, EOV)
9 0.000103 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
9 0.000101 return result[:-2]
FUNCTION <SNR>118_vp_pipe_close()
Called 3 times
Total time: 0.001192
Self time: 0.000110
count total (s) self (s)
" echomsg 'close:'.self.fd
3 0.000017 if self.fd != 0
3 0.001138 0.000056 call s:libcall('vp_pipe_close', [self.fd])
3 0.000017 let self.fd = 0
3 0.000006 endif
FUNCTION neocomplete#get_current_neocomplete()
Called 5581 times
Total time: 0.139080
Self time: 0.139080
count total (s) self (s)
5581 0.048597 if !exists('b:neocomplete')
call neocomplete#init#_current_neocomplete()
endif
5581 0.022656 return b:neocomplete
FUNCTION neocomplete#filters#converter_remove_overlap#define()
Called 1 time
Total time: 0.000008
Self time: 0.000008
count total (s) self (s)
1 0.000006 return s:converter
FUNCTION neocomplete#within_comment()
Called 98 times
Total time: 0.003193
Self time: 0.001152
count total (s) self (s)
98 0.003059 0.001018 return neocomplete#get_current_neocomplete().within_comment
FUNCTION <SNR>123_get_escape()
Called 1 time
Total time: 0.000504
Self time: 0.000504
count total (s) self (s)
1 0.000015 if getcmdtype() !=# a:type && a:type !=# ''
return [0, 1]
endif
1 0.000008 let line = getcmdline()
1 0.000006 let pos = getcmdpos()
1 0.000004 let noescape = 1
1 0.000004 let charlen = 1
1 0.000003 if pos
17 0.000070 for i in range(pos - 1)
16 0.000119 let charlen = (noescape ? 0 : charlen) + 1
16 0.000159 let noescape = !noescape || line[i] !=# '\'
16 0.000062 endfor
1 0.000003 endif
1 0.000006 return [noescape, charlen]
FUNCTION <SNR>116_check_old_cache()
Called 1 time
Total time: 0.002135
Self time: 0.001929
count total (s) self (s)
" Check old cache file.
1 0.000223 0.000017 let cache_name = s:_encode_name(a:cache_dir, a:filename)
1 0.001849 let ret = getftime(cache_name) == -1 || getftime(cache_name) <= getftime(a:filename)
1 0.000039 if ret && filereadable(cache_name)
" Delete old cache.
call delete(cache_name)
endif
1 0.000003 return ret
FUNCTION <SNR>113_make_cache_commands()
Called 1 time
Total time: 0.065487
Self time: 0.065487
count total (s) self (s)
1 0.004185 let helpfile = expand(findfile('doc/index.txt', &runtimepath))
1 0.000045 if !filereadable(helpfile)
return []
endif
1 0.001380 let lines = readfile(helpfile)
1 0.000006 let commands = []
1 0.001302 let start = match(lines, '^|:!|')
1 0.000910 let end = match(lines, '^|:\~|', start)
558 0.002389 for lnum in range(end, start, -1)
557 0.016360 let desc = substitute(lines[lnum], '^\s\+\ze', '', 'g')
557 0.021234 let _ = matchlist(desc, '^|:\(.\{-}\)|\s\+\S\+')
557 0.003495 if !empty(_)
528 0.008037 call add(commands, { 'word' : _[1], 'kind' : 'c', })
528 0.001403 endif
557 0.003382 endfor
1 0.000006 return commands
FUNCTION <SNR>115_search_vim_path()
Called 1 time
Total time: 0.016955
Self time: 0.000208
count total (s) self (s)
1 0.016682 0.000044 let paths = vimproc#get_command_name(v:progname, $PATH, -1)
1 0.000006 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 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
1 0.000106 0.000044 let base_path = neocomplete#util#substitute_path_separator( fnamemodify(paths[0], ':p:h'))
1 0.000063 0.000016 let vim_path = base_path . (neocomplete#util#is_windows() ? '/vim.exe' : '/vim')
1 0.000029 if !executable(vim_path) && neocomplete#util#is_mac()
" Note: Search "Vim" instead of vim.
let vim_path = base_path. '/Vim'
endif
1 0.000002 endif
1 0.000004 return vim_path
FUNCTION neocomplete#init#_filters()
Called 24 times
Total time: 0.027825
Self time: 0.021441
count total (s) self (s)
24 0.000141 let _ = []
24 0.000766 0.000310 let filters = neocomplete#variables#get_filters()
72 0.000303 for name in a:names
48 0.000345 if !has_key(filters, name)
" Search autoload.
17 0.012015 for filter_name in map(split(globpath(&runtimepath, 'autoload/neocomplete/filters/'. substitute(name,'^\%(matcher\|sorter\|converter\)_[^/_-]\+\zs[/_-].*$', '', '') .'*.vim'), '\n'), "fnamemodify(v:val, ':t:r')")
9 0.006443 0.001923 let filter = neocomplete#filters#{filter_name}#define()
9 0.000062 if empty(filter)
" Ignore.
continue
endif
9 0.001620 0.000212 call neocomplete#define_filter(filter)
9 0.000021 endfor
8 0.000052 if !has_key(filters, name)
" Not found.
call neocomplete#print_error( printf('filter name : %s is not found.', string(name)))
continue
endif
8 0.000012 endif
48 0.000381 if has_key(filters, name)
48 0.000437 call add(_, filters[name])
48 0.000112 endif
48 0.000096 endfor
24 0.000082 return _
FUNCTION <SNR>118_plineopen()
Called 1 time
Total time: 0.013180
Self time: 0.001437
count total (s) self (s)
1 0.000006 let pid_list = []
1 0.000004 let stdin_list = []
1 0.000004 let stdout_list = []
1 0.000004 let stderr_list = []
1 0.000004 let npipe = a:npipe
" Open input.
1 0.000018 let hstdin = (empty(a:commands) || a:commands[0].fd.stdin == '')? 0 : vimproc#fopen(a:commands[0].fd.stdin, 'r').fd
1 0.000029 0.000022 let is_pty = !vimproc#util#is_windows() && a:is_pty
1 0.000005 let cnt = 0
2 0.000015 for command in a:commands
1 0.000008 if is_pty && command.fd.stdout == '' && cnt == 0 && len(a:commands) != 1
" pty_open() use pipe.
let hstdout = 1
else
1 0.000012 if command.fd.stdout =~ '^>'
let mode = 'a'
let command.fd.stdout = command.fd.stdout[1:]
else
1 0.000004 let mode = 'w'
1 0.000004 endif
1 0.000074 0.000037 let hstdout = s:is_pseudo_device(command.fd.stdout) ? 0 : vimproc#fopen(command.fd.stdout, mode).fd
1 0.000003 endif
1 0.000007 if is_pty && command.fd.stderr == '' && cnt == 0 && len(a:commands) != 1
" pty_open() use pipe.
let hstderr = 1
else
1 0.000011 if command.fd.stderr =~ '^>'
let mode = 'a'
let command.fd.stderr = command.fd.stderr[1:]
else
1 0.000005 let mode = 'w'
1 0.000002 endif
1 0.000051 0.000017 let hstderr = s:is_pseudo_device(command.fd.stderr) ? 0 : vimproc#fopen(command.fd.stderr, mode).fd
1 0.000003 endif
1 0.000006 if command.fd.stderr ==# '/dev/stdout'
let npipe = 2
endif
1 0.002105 0.000034 let args = s:convert_args(command.args)
1 0.000015 let command_name = fnamemodify(args[0], ':t:r')
1 0.000023 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.000007 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.007035 0.000084 let pipe = s:vp_pipe_open(pty_npipe, hstdin, hstdout, hstderr, args)
1 0.000015 endif
1 0.000007 if len(pipe) == 4
1 0.000010 let [pid, fd_stdin, fd_stdout, fd_stderr] = pipe
1 0.000796 0.000137 let stderr = s:fdopen(fd_stderr, 'vp_pipe_close', 'vp_pipe_read', 'vp_pipe_write')
1 0.000003 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.000009 call add(pid_list, pid)
1 0.000445 0.000019 let stdin = s:fdopen(fd_stdin, 'vp_pipe_close', 'vp_pipe_read', 'vp_pipe_write')
1 0.000013 let stdin.is_pty = is_pty && (cnt == 0 || cnt == len(a:commands)-1) && hstdin == 0
1 0.000175 call add(stdin_list, stdin)
1 0.000444 0.000020 let stdout = s:fdopen(fd_stdout, 'vp_pipe_close', 'vp_pipe_read', 'vp_pipe_write')
1 0.000012 let stdout.is_pty = is_pty && (cnt == 0 || cnt == len(a:commands)-1) && hstdout == 0
1 0.000008 call add(stdout_list, stdout)
1 0.000010 let stderr.is_pty = is_pty && (cnt == 0 || cnt == len(a:commands)-1) && hstderr == 0
1 0.000007 call add(stderr_list, stderr)
1 0.000009 let hstdin = stdout_list[-1].fd
1 0.000019 let cnt += 1
1 0.000003 endfor
1 0.000005 let proc = {}
1 0.000006 let proc.pid_list = pid_list
1 0.000008 let proc.pid = pid_list[-1]
1 0.000363 0.000037 let proc.stdin = s:fdopen_pipes(stdin_list, 'vp_pipes_close', 'read_pipes', 'write_pipes')
1 0.000319 0.000018 let proc.stdout = s:fdopen_pipes(stdout_list, 'vp_pipes_close', 'read_pipes', 'write_pipes')
1 0.000335 0.000019 let proc.stderr = s:fdopen_pipes(stderr_list, 'vp_pipes_close', 'read_pipes', 'write_pipes')
1 0.000054 0.000015 let proc.get_winsize = s:funcref('vp_get_winsize')
1 0.000052 0.000014 let proc.set_winsize = s:funcref('vp_set_winsize')
1 0.000051 0.000013 let proc.kill = s:funcref('vp_kill')
1 0.000052 0.000014 let proc.waitpid = s:funcref('vp_waitpid')
1 0.000052 0.000014 let proc.checkpid = s:funcref('vp_checkpid')
1 0.000006 let proc.is_valid = 1
1 0.000005 let proc.is_pty = is_pty
1 0.000003 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.000003 return proc
FUNCTION <SNR>116__create_hash()
Called 9 times
Total time: 0.000990
Self time: 0.000990
count total (s) self (s)
9 0.000110 if len(a:dir) + len(a:str) < 150
9 0.000447 let hash = substitute(substitute( a:str, ':', '=-', 'g'), '[/\\]', '=+', 'g')
9 0.000049 elseif exists('*sha256')
let hash = sha256(a:str)
else
" Use simple hash.
let sum = 0
for i in range(len(a:str))
let sum += char2nr(a:str[i]) * (i + 1)
endfor
let hash = printf('%x', sum)
endif
9 0.000031 return hash
FUNCTION <SNR>118_close()
Called 9 times
Total time: 0.004589
Self time: 0.000111
count total (s) self (s)
9 0.000039 if self.is_valid
9 0.001417 0.000225 call self.f_close()
9 0.000019 endif
9 0.000034 let self.is_valid = 0
9 0.000031 let self.eof = 1
9 0.000028 let self.__eof = 1
FUNCTION <SNR>77_make_cache_file()
Called 1 time
Total time: 0.064186
Self time: 0.000227
count total (s) self (s)
" Initialize source.
1 0.000885 0.000029 call s:initialize_source(a:srcname)
1 0.000010 let source = s:buffer_sources[a:srcname]
1 0.000045 if !filereadable(source.path) || getbufvar(a:srcname, '&modified') || getbufvar(a:srcname, '&buftype') =~ 'nofile\|acwrite'
1 0.063231 0.000128 call s:make_cache_buffer(a:srcname)
1 0.000004 return
endif
call neocomplete#print_debug('make_cache_buffer: ' . source.path)
let source.cache_name = neocomplete#cache#async_load_from_file( 'buffer_cache', source.path, source.keyword_pattern, 'B')
let source.cached_time = localtime()
let source.filetype = getbufvar(a:srcname, '&filetype')
let s:async_dictionary_list[source.path] = [{ 'filename' : source.path, 'cachename' : source.cache_name, }]
FUNCTION <SNR>118_garbage_collect()
Called 3 times
Total time: 0.001436
Self time: 0.000604
count total (s) self (s)
4 0.000078 for pid in values(s:bg_processes)
" Check processes.
1 0.000006 try
1 0.000846 0.000041 let [cond, _] = s:libcall('vp_waitpid', [pid])
" echomsg string([pid, cond, _])
1 0.000011 if cond !=# 'run' || a:is_force
1 0.000007 if cond !=# 'exit'
" Kill process.
call vimproc#kill(pid, g:vimproc#SIGTERM)
endif
1 0.000044 0.000017 if vimproc#util#is_windows()
call s:libcall('vp_close_handle', [pid])
endif
1 0.000018 call remove(s:bg_processes, pid)
1 0.000004 endif
1 0.000004 catch
" Ignore error.
endtry
1 0.000027 endfor
FUNCTION neosnippet#init#_initialize()
Called 1 time
Total time: 0.068035
Self time: 0.000128
count total (s) self (s)
1 0.000008 let s:is_initialized = 1
1 0.022827 0.000051 call s:initialize_script_variables()
1 0.008796 0.000039 call s:initialize_others()
1 0.036398 0.000024 call s:initialize_cache()
FUNCTION neocomplete#cache#make_directory()
Called 3 times
Total time: 0.001313
Self time: 0.000251
count total (s) self (s)
3 0.001138 0.000076 let directory = neocomplete#get_data_directory() .'/'.a:directory
3 0.000050 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
FUNCTION <SNR>48_uniq()
Called 1 time
Total time: 0.000187
Self time: 0.000187
count total (s) self (s)
1 0.000012 let [l,i,s] = [a:l,0,{}]
4 0.000024 while i < len(l)
3 0.000029 let k = string(l[i])
3 0.000017 if has_key(s, k)
call remove(l, i)
else
3 0.000032 let [s[k],i] = [1,i+1]
3 0.000008 endif
3 0.000015 endwhile
1 0.000004 return l
FUNCTION <SNR>122_parserange()
Called 5 times
Total time: 0.002242
Self time: 0.001889
count total (s) self (s)
5 0.000048 let string = a:string
5 0.000498 0.000145 let [str, string] = s:getmatchstr(string, '^[: \t]\+')
5 0.000033 let range = []
5 0.000046 for i in [0, 1]
5 0.000022 let num = 0
5 0.000020 let flg = 0
5 0.000043 if string ==# a:prev && i == 0
return [s:cursor(), s:cursor()]
elseif string =~# '^\s*%\s*' . a:prev . '$' && i == 0
return [s:absolute(1), s:last()]
elseif string =~# '^\d\+\s*'
let str = matchstr(string, '^\d\+\s*')
let num = str + 0
let flg = 1
elseif string =~# '^\.\s*'
let str = matchstr(string, '^\.\s*')
call add(range, s:cursor())
elseif string =~# '^\$'
let str = matchstr(string, '^\$\s*')
call add(range, s:last())
elseif string =~# '^''[a-zA-Z()<>{}"''.[\]\^]'
let str = matchstr(string, '^''[a-zA-Z()<>{}"''.[\]\^]')
call add(range, s:mark(str))
elseif string =~# '^\(/\([^/]\|\\/\)\+/\s*\|?\([^?]\|\\?\)\+?\s*\)\+'
let str = matchstr(string, '^\(/\([^/]\|\\/\)\+/\s*\|?\([^?]\|\\?\)\+?\s*\)\+')
call add(range, s:pattern(str))
else
5 0.000019 return []
endif
let string = string[len(str):]
while string =~# '^[+-]\s*\d\+\s*'
let [str, string] = s:getmatchstr(string, '^[+-]\s*\d\+\s*')
if flg
let num += s:parsenumber(str)
elseif (range[-1].string ==# '.' || range[-1].string ==# '$') && str =~# '^[+-]\s*0'
let range[-1].string .= substitute(str, '\s\+', '', 'g')
else
let range[-1] = s:add(range[-1], s:parsenumber(str))
endif
endwhile
if i == 0
if string =~# '^\s*[,;]\s*'
let [str, string] = s:getmatchstr(string, '^\s*[,;]\s*')
let s:semicolon = str =~# ';'
if flg
call add(range, s:absolute(num))
endif
elseif flg && string ==# a:prev
return [s:cursor(), s:cursor(), num]
elseif string ==# a:prev
return range
else
return []
endif
else
if string ==# a:prev
if flg
call add(range, s:absolute(num))
endif
return len(range) == 2 ? range : []
else
return []
endif
endif
endfor
return []
FUNCTION <SNR>70__get_sid_by_script()
Called 8 times
Total time: 0.016703
Self time: 0.008699
count total (s) self (s)
8 0.000956 0.000131 let path = s:_unify_path(a:path)
22 0.012079 0.006086 for line in filter(split(s:_redir('scriptnames'), "\n"), 'stridx(v:val, s:self_version) > 0')
19 0.001387 let list = matchlist(line, '^\s*\(\d\+\):\s\+\(.\+\)\s*$')
19 0.001910 0.000724 if !empty(list) && s:_unify_path(list[2]) ==# path
5 0.000062 return list[1] - 0
endif
14 0.000032 endfor
3 0.000010 return 0
FUNCTION neocomplete#util#get_vital()
Called 4 times
Total time: 0.000032
Self time: 0.000032
count total (s) self (s)
4 0.000024 return s:V
FUNCTION vimproc#version()
Called 2 times
Total time: 0.000035
Self time: 0.000035
count total (s) self (s)
2 0.000031 return str2nr(printf('%2d%02d', 8, 0))
FUNCTION <SNR>118_vp_dlclose()
Called 1 time
Total time: 0.000676
Self time: 0.000020
count total (s) self (s)
1 0.000675 0.000019 call s:libcall('vp_dlclose', [a:handle])
FUNCTION neocomplete#exists_echodoc()
Called 2 times
Total time: 0.000025
Self time: 0.000025
count total (s) self (s)
2 0.000021 return exists('g:loaded_echodoc') && g:loaded_echodoc
FUNCTION <SNR>108__create_hash()
Called 8 times
Total time: 0.000917
Self time: 0.000917
count total (s) self (s)
8 0.000089 if len(a:dir) + len(a:str) < 150
8 0.000453 let hash = substitute(substitute( a:str, ':', '=-', 'g'), '[/\\]', '=+', 'g')
8 0.000047 elseif exists('*sha256')
let hash = sha256(a:str)
else
" Use simple hash.
let sum = 0
for i in range(len(a:str))
let sum += char2nr(a:str[i]) * (i + 1)
endfor
let hash = printf('%x', sum)
endif
8 0.000025 return hash
FUNCTION <SNR>108_readfile()
Called 4 times
Total time: 0.001372
Self time: 0.000642
count total (s) self (s)
4 0.000799 0.000069 let cache_name = s:_encode_name(a:cache_dir, a:filename)
4 0.000565 return filereadable(cache_name) ? readfile(cache_name) : []
FUNCTION neocomplete#init#_autocmds()
Called 2 times
Total time: 0.000789
Self time: 0.000789
count total (s) self (s)
2 0.000012 augroup neocomplete
2 0.000405 autocmd!
2 0.000041 autocmd InsertEnter * call neocomplete#handler#_on_insert_enter()
2 0.000028 autocmd InsertLeave * call neocomplete#handler#_on_insert_leave()
2 0.000032 autocmd CursorMovedI * call neocomplete#handler#_on_moved_i()
2 0.000023 autocmd BufWritePost * call neocomplete#handler#_on_write_post()
2 0.000030 autocmd VimLeavePre * call neocomplete#init#disable()
2 0.000024 autocmd InsertCharPre * call neocomplete#handler#_on_insert_char_pre()
2 0.000028 autocmd TextChangedI * call neocomplete#handler#_on_text_changed()
2 0.000023 autocmd VimLeavePre * call neocomplete#init#disable()
2 0.000005 augroup END
2 0.000010 if g:neocomplete#enable_insert_char_pre
autocmd neocomplete InsertCharPre * call neocomplete#handler#_do_auto_complete('InsertCharPre')
elseif g:neocomplete#enable_cursor_hold_i
augroup neocomplete
autocmd CursorHoldI * call neocomplete#handler#_do_auto_complete('CursorHoldI')
autocmd InsertEnter * call neocomplete#handler#_change_update_time()
autocmd InsertLeave * call neocomplete#handler#_restore_update_time()
augroup END
else
2 0.000015 autocmd neocomplete CursorMovedI * call neocomplete#handler#_do_auto_complete('CursorMovedI')
2 0.000019 autocmd neocomplete InsertEnter * call neocomplete#handler#_do_auto_complete('InsertEnter')
2 0.000004 endif
2 0.000021 autocmd neocomplete CompleteDone * call neocomplete#handler#_on_complete_done()
FUNCTION <SNR>118_vp_pgroup_close()
Called 3 times
Total time: 0.001611
Self time: 0.000047
count total (s) self (s)
3 0.001606 0.000042 call self.fd.close()
FUNCTION neocomplete#sources#omni#define()
Called 1 time
Total time: 0.000009
Self time: 0.000009
count total (s) self (s)
1 0.000007 return s:source
FUNCTION vimproc#util#termencoding()
Called 1 time
Total time: 0.000006
Self time: 0.000006
count total (s) self (s)
1 0.000005 return 'char'
FUNCTION neocomplete#sources#file_include#define()
Called 1 time
Total time: 0.000008
Self time: 0.000008
count total (s) self (s)
1 0.000006 return s:source
FUNCTION 28()
Called 105 times
Total time: 0.239174
Self time: 0.032504
count total (s) self (s)
105 0.052243 0.001679 let cur_text = neocomplete#sources#vim#get_cur_text()
105 0.001532 if cur_text =~ '^\s*"'
" Comment.
return -1
endif
105 0.018952 0.004441 let pattern = '\.\%(\h\w*\)\?$\|' . neocomplete#get_keyword_pattern_end('vim', self.name)
105 0.003024 if cur_text != '' && cur_text !~ '^[[:digit:],[:space:][:tab:]$''<>]*\h\w*$'
99 0.107664 0.002747 let command_completion = neocomplete#sources#vim#helper#get_completion_name( neocomplete#sources#vim#get_command(cur_text))
99 0.001965 if command_completion =~ '\%(dir\|file\|shellcmd\)'
let pattern = neocomplete#get_keyword_pattern_end('filename', self.name)
endif
99 0.000186 endif
105 0.033861 0.002516 let [complete_pos, complete_str] = neocomplete#helper#match_word(a:context.input, pattern)
105 0.000495 if complete_pos < 0
" Use args pattern.
7 0.000713 0.000224 let [complete_pos, complete_str] = neocomplete#helper#match_word(a:context.input, '\S\+$')
7 0.000017 endif
105 0.009178 0.004334 if a:context.input !~ '\.\%(\h\w*\)\?$' && neocomplete#is_auto_complete() && len(complete_str) < g:neocomplete#auto_completion_start_length
return -1
endif
105 0.000368 return complete_pos
FUNCTION neocomplete#has_vimproc()
Called 2 times
Total time: 0.020696
Self time: 0.000038
count total (s) self (s)
2 0.020693 0.000035 return neocomplete#util#has_vimproc()
FUNCTION <SNR>118_define_signals()
Called 1 time
Total time: 0.005047
Self time: 0.004674
count total (s) self (s)
1 0.000007 let s:signames = {}
1 0.000390 0.000017 let xs = s:libcall('vp_get_signals', [])
31 0.000088 for x in xs
30 0.000488 let [name, val] = split(x, ':')
30 0.003378 let nr = str2nr(val)
30 0.000292 let g:vimproc#{name} = nr
30 0.000245 let s:signames[nr] = name
30 0.000089 endfor
FUNCTION <SNR>120_is_case_tolerant()
Called 3 times
Total time: 0.000025
Self time: 0.000025
count total (s) self (s)
3 0.000017 return s:is_case_tolerant
FUNCTION <SNR>77_check_changed_buffer()
Called 163 times
Total time: 0.011153
Self time: 0.011153
count total (s) self (s)
163 0.001692 let source = s:buffer_sources[a:bufnr]
163 0.001634 let ft = getbufvar(a:bufnr, '&filetype')
163 0.000818 if ft == ''
let ft = 'nothing'
endif
163 0.001815 let filename = fnamemodify(bufname(a:bufnr), ':t')
163 0.000795 if filename == ''
let filename = '[No Name]'
endif
163 0.001511 return source.name != filename || source.filetype != ft
FUNCTION <SNR>71_substitute_path_separator()
Called 17 times
Total time: 0.000217
Self time: 0.000217
count total (s) self (s)
17 0.000168 return s:is_windows ? substitute(a:path, '\\', '/', 'g') : a:path
FUNCTION <SNR>118_is_pseudo_device()
Called 2 times
Total time: 0.000071
Self time: 0.000059
count total (s) self (s)
2 0.000039 0.000027 if vimproc#util#is_windows() && ( a:filename ==# '/dev/stdin' || a:filename ==# '/dev/stdout' || a:filename ==# '/dev/stderr')
return 1
endif
2 0.000013 return a:filename == '' || a:filename ==# '/dev/clip' || a:filename ==# '/dev/quickfix'
FUNCTION neosnippet#commands#_make_cache()
Called 80 times
Total time: 0.042312
Self time: 0.007437
count total (s) self (s)
80 0.002164 0.000800 call neosnippet#init#check()
80 0.000709 let filetype = a:filetype == '' ? &filetype : a:filetype
80 0.000386 if filetype ==# ''
let filetype = 'nothing'
endif
80 0.002349 0.000837 let snippets = neosnippet#variables#snippets()
80 0.000563 if has_key(snippets, filetype)
78 0.000178 return
endif
2 0.000015 let snippets[filetype] = {}
2 0.002147 0.000231 let path = join(neosnippet#helpers#get_snippets_directory(), ',')
2 0.000010 let snippets_files = []
7 0.013886 0.000203 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*'] : [])"))
5 0.001859 let snippets_files += split(globpath(path, glob), '\n')
5 0.000055 endfor
2 0.000066 0.000026 let snippets = neosnippet#variables#snippets()
6 0.000537 0.000079 for snippet_file in reverse(s:get_list().uniq(snippets_files))
4 0.016327 0.000425 let snippets[filetype] = extend(snippets[filetype], neosnippet#parser#_parse(snippet_file))
4 0.000050 endfor
FUNCTION neocomplete#helper#call_filters()
Called 200 times
Total time: 0.185865
Self time: 0.040531
count total (s) self (s)
200 0.002194 let context = extend(a:source.neocomplete__context, a:context)
601 0.002916 for filter in a:filters
401 0.001157 try
401 0.153839 0.008505 let context.candidates = call(filter.filter, [context], filter)
401 0.001262 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
401 0.003069 endfor
200 0.000840 return context.candidates
FUNCTION <SNR>112_compare_source_rank()
Called 6 times
Total time: 0.000047
Self time: 0.000047
count total (s) self (s)
6 0.000042 return a:i2.rank - a:i1.rank
FUNCTION lightline_powerful#ctrlpmark()
Called 139 times
Total time: 0.012302
Self time: 0.012302
count total (s) self (s)
139 0.001286 if expand('%:t') !=# 'ControlP'
139 0.004483 if &ft ==# 'calendar' && has_key(b:, 'calendar') && has_key(b:calendar, 'visual_mode')
call lightline#link("nvV\<C-v>"[b:calendar.visual_mode()])
endif
139 0.001626 if &ft ==# 'thumbnail' && has_key(b:, 'thumbnail') && has_key(b:thumbnail, 'visual_mode')
if b:thumbnail.visual_mode < 4
call lightline#link("nvV\<C-v>i"[get(b:thumbnail,'insert_mode') ? 4 : b:thumbnail.visual_mode])
endif
endif
139 0.000368 return ''
else
call lightline#link('iR'[get(g:lightline, 'ctrlp_regex', 0)])
if has_key(g:lightline, 'ctrlp_prev') && has_key(g:lightline, 'ctrlp_item') && has_key(g:lightline, 'ctrlp_next')
return lightline#concatenate([g:lightline.ctrlp_prev, g:lightline.ctrlp_item, g:lightline.ctrlp_next], 0)
else
return ''
endif
endif
FUNCTION cmdline_escape#backspace()
Called 1 time
Total time: 0.000568
Self time: 0.000064
count total (s) self (s)
1 0.000563 0.000059 return repeat("\<BS>", s:get_escape(a:type)[1])
FUNCTION <SNR>90_uniq()
Called 1538 times
Total time: 3.232354
Self time: 0.050899
count total (s) self (s)
1538 3.230449 0.048994 return s:uniq_by(a:list, 'v:val')
FUNCTION <SNR>115_async_load()
Called 1 time
Total time: 0.055538
Self time: 0.000381
count total (s) self (s)
" if 0
1 0.000067 0.000011 if neocomplete#has_vimproc()
1 0.016984 0.000029 let vim_path = s:search_vim_path()
1 0.000006 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.000029 let args = [vim_path, '-u', 'NONE', '-i', 'NONE', '-n', '-N', '-S', s:sdir.'/async_cache.vim'] + a:argv
1 0.017096 0.000205 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.021278 0.000023 return neocomplete#cache#encode_name(a:cache_dir, a:filename)
FUNCTION neocomplete#sources#file#define()
Called 1 time
Total time: 0.000008
Self time: 0.000008
count total (s) self (s)
1 0.000006 return s:source
FUNCTION neocomplete#variables#get_source()
Called 632 times
Total time: 0.025360
Self time: 0.025360
count total (s) self (s)
632 0.004902 if !exists('s:sources')
let s:sources = {}
endif
632 0.005556 return get(s:sources, a:name, {})
FUNCTION neocomplete#handler#_do_auto_complete()
Called 93 times
Total time: 2.461216
Self time: 0.035101
count total (s) self (s)
93 0.018132 0.001896 if s:check_in_do_auto_complete()
2 0.000005 return
endif
91 0.003225 0.001254 let neocomplete = neocomplete#get_current_neocomplete()
91 0.000496 let neocomplete.skipped = 0
91 0.000509 let neocomplete.event = a:event
91 0.028210 0.001228 let cur_text = neocomplete#get_cur_text(1)
91 0.003829 0.002418 call neocomplete#print_debug('cur_text = ' . cur_text)
91 0.000261 try
" Prevent infinity loop.
91 0.010595 0.001279 if s:is_skip_auto_complete(cur_text)
32 0.000796 0.000389 call neocomplete#print_debug('Skipped.')
32 0.000080 return
endif
59 0.015336 0.000963 if neocomplete#helper#is_omni(cur_text) && neocomplete.old_cur_text !=# cur_text
call s:complete_key("\<Plug>(neocomplete_start_omni_complete)")
return
endif
" Check multibyte input or eskk or spaces.
59 0.012210 0.002110 if cur_text =~ '^\s*$' || neocomplete#is_eskk_enabled() || neocomplete#is_multibyte_input(cur_text)
3 0.000086 0.000046 call neocomplete#print_debug('Skipped.')
3 0.000008 return
endif
" Check complete position.
56 1.042425 0.002386 let complete_sources = neocomplete#complete#_set_results_pos(cur_text)
56 0.000364 if empty(complete_sources)
7 0.000191 0.000089 call neocomplete#print_debug('Skipped.')
7 0.000017 return
endif
" Check previous position
49 0.003198 0.000726 let complete_pos = neocomplete#complete#_get_complete_pos(complete_sources)
49 0.000535 if neocomplete.skip_next_complete && complete_pos == neocomplete.old_complete_pos && stridx(cur_text, neocomplete.old_cur_text) == 0
" Same position.
return
endif
49 0.000101 finally
91 0.000613 let neocomplete.old_cur_text = cur_text
91 0.000665 let neocomplete.old_linenr = line('.')
91 0.000268 endtry
49 0.000241 let neocomplete.skip_next_complete = 0
49 0.000256 let neocomplete.old_complete_pos = complete_pos
49 0.000124 try
49 0.000210 let neocomplete.is_auto_complete = 1
" Do prefetch.
49 1.217431 0.001032 let neocomplete.complete_sources = neocomplete#complete#_get_results(cur_text)
49 0.000155 finally
49 0.000355 let neocomplete.is_auto_complete = 0
49 0.000150 endtry
49 0.000295 if empty(neocomplete.complete_sources)
26 0.000312 if !empty(g:neocomplete#fallback_mappings) && len(matchstr(cur_text, '\h\w*$')) >= g:neocomplete#auto_completion_start_length
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 to omnifunc
call s:complete_key("\<Plug>(neocomplete_fallback)")
else
26 0.000659 0.000316 call neocomplete#print_debug('Skipped.')
26 0.000063 return
endif
return
endif
23 0.001153 0.000331 let complete_pos = neocomplete#complete#_get_complete_pos( neocomplete.complete_sources)
23 0.000232 let base = cur_text[complete_pos :]
23 0.078916 0.000573 let neocomplete.candidates = neocomplete#complete#_get_words( neocomplete.complete_sources, complete_pos, base)
" Start auto complete.
23 0.007262 0.000503 call s:complete_key( "\<Plug>(neocomplete_start_auto_complete)")
FUNCTION <SNR>71_is_mac()
Called 2 times
Total time: 0.000014
Self time: 0.000014
count total (s) self (s)
2 0.000011 return s:is_mac
FUNCTION <SNR>71_is_windows()
Called 3 times
Total time: 0.000024
Self time: 0.000024
count total (s) self (s)
3 0.000015 return s:is_windows
FUNCTION neocomplete#complete#_set_results_words()
Called 49 times
Total time: 0.637314
Self time: 0.063426
count total (s) self (s)
" Try source completion.
" Save options.
49 0.000337 let ignorecase_save = &ignorecase
49 0.000463 let pos = winsaveview()
49 0.000125 try
247 0.000941 for source in a:sources
198 0.041583 0.002110 if neocomplete#complete_check()
return
endif
198 0.001180 let context = source.neocomplete__context
198 0.004595 let &ignorecase = (g:neocomplete#enable_smart_case || g:neocomplete#enable_camel_case) ? context.complete_str !~ '\u' : g:neocomplete#enable_ignore_case
198 0.002063 if !source.is_volatile && context.prev_complete_pos == context.complete_pos && !empty(context.prev_candidates)
" Use previous candidates.
20 0.000119 let context.candidates = context.prev_candidates
20 0.000048 else
178 0.000407 try
178 0.436316 0.003359 let context.candidates = source.gather_candidates(context)
178 0.000541 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
178 0.002476 if winsaveview() != pos
call winrestview(pos)
endif
178 0.000390 endtry
178 0.000296 endif
198 0.012596 let context.prev_candidates = copy(context.candidates)
198 0.001442 let context.prev_complete_pos = context.complete_pos
198 0.001117 if !empty(context.candidates)
100 0.101219 0.002465 let context.candidates = neocomplete#helper#call_filters( source.neocomplete__matchers, source, {})
100 0.000268 endif
198 0.005869 0.003165 call neocomplete#print_debug(source.name)
198 0.000455 endfor
49 0.000112 finally
49 0.000384 let &ignorecase = ignorecase_save
49 0.000152 endtry
FUNCTION <SNR>118_convert_args()
Called 1 time
Total time: 0.002071
Self time: 0.000516
count total (s) self (s)
1 0.000007 if empty(a:args)
return []
endif
1 0.001513 0.000355 let args = map(copy(a:args), 'vimproc#util#iconv( v:val, &encoding, vimproc#util#systemencoding())')
1 0.000018 0.000012 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.000253 0.000018 let command_name = vimproc#get_command_name(a:args[0])
1 0.000239 0.000083 return map(vimproc#analyze_shebang(command_name), 'vimproc#util#iconv( v:val, &encoding, vimproc#util#systemencoding())') + args[1:]
FUNCTION highlighturl#default_pattern()
Called 3 times
Total time: 0.000097
Self time: 0.000097
count total (s) self (s)
3 0.000091 return '\m\c\%(\%(h\?ttps\?\|ftp\|file\|ssh\|git\):\/\/\|[a-z]\+@[a-z]\+.[a-z]\+:\)\%('.'\%([&:#*@~%_\-=?!+;/.0-9A-Za-z]*\%([.,][&:#*@~%_\-=?!+;/0-9A-Za-z]\+\)\+\)\?'.'\%(([&:#*@~%_\-=?!+;/.0-9A-Za-z]*)\)\?'.'\%({\%([&:#*@~%_\-=?!+;/.0-9A-Za-z]*\|{[&:#*@~%_\-=?!+;/.0-9A-Za-z]*}\)}\)\?'.'\%(\[[&:#*@~%_\-=?!+;/.0-9A-Za-z]*\]\)\?'.'\)*[/0-9A-Za-z]*\%(:\d\d*\/\?\)\?'
FUNCTION neosnippet#variables#snippets()
Called 160 times
Total time: 0.002929
Self time: 0.002929
count total (s) self (s)
160 0.001154 if !exists('s:snippets')
1 0.000005 let s:snippets= {}
1 0.000002 endif
160 0.000511 return s:snippets
FUNCTION GetVimIndent()
Called 2 times
Total time: 0.001325
Self time: 0.000167
count total (s) self (s)
2 0.000036 let ignorecase_save = &ignorecase
2 0.000010 try
2 0.000025 let &ignorecase = 0
2 0.001206 0.000048 return GetVimIndentIntern()
finally
2 0.000018 let &ignorecase = ignorecase_save
2 0.000008 endtry
FUNCTION vimproc#pgroup_open()
Called 1 time
Total time: 0.014911
Self time: 0.000097
count total (s) self (s)
1 0.000009 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.000005 let statements = a:statements
1 0.000002 endif
1 0.000008 let is_pty = get(a:000, 0, 0)
1 0.000007 let npipe = get(a:000, 1, 3)
1 0.014851 0.000037 return s:pgroup_open(statements, is_pty && !vimproc#util#is_windows(), npipe)
FUNCTION lightline#mode()
Called 278 times
Total time: 0.005340
Self time: 0.005340
count total (s) self (s)
278 0.004105 return get(s:lightline.mode_map, mode(), s:lightline.mode_map['?'])
FUNCTION vimproc#util#is_mac()
Called 1 time
Total time: 0.000006
Self time: 0.000006
count total (s) self (s)
1 0.000005 return s:is_mac
FUNCTION neosnippet#util#get_cur_text()
Called 39 times
Total time: 0.001183
Self time: 0.001183
count total (s) self (s)
39 0.001109 return (mode() ==# 'i' ? (col('.')-1) : col('.')) >= len(getline('.')) ? getline('.') : matchstr(getline('.'), '^.*\%' . col('.') . 'c' . (mode() ==# 'i' ? '' : '.'))
FUNCTION vimproc#util#is_cygwin()
Called 1 time
Total time: 0.000007
Self time: 0.000007
count total (s) self (s)
1 0.000005 return s:is_cygwin
FUNCTION neocomplete#is_text_mode()
Called 1369 times
Total time: 0.068171
Self time: 0.036356
count total (s) self (s)
1369 0.051191 0.019376 let neocomplete = neocomplete#get_current_neocomplete()
1369 0.013672 return get(g:neocomplete#text_mode_filetypes, neocomplete.context_filetype, 0)
FUNCTION <SNR>77_check_async_cache()
Called 40 times
Total time: 0.029292
Self time: 0.004459
count total (s) self (s)
80 0.022732 0.001040 for source in s:get_sources_list()
40 0.000397 if !has_key(s:async_dictionary_list, source.path)
29 0.000100 continue
endif
" Load from cache.
11 0.003464 0.000323 let [loaded, file_cache] = neocomplete#cache#get_cache_list( 'buffer_cache', s:async_dictionary_list[source.path])
11 0.000043 if loaded
1 0.000027 let source.words = file_cache
1 0.000002 endif
11 0.000102 if empty(s:async_dictionary_list[source.path])
1 0.000011 call remove(s:async_dictionary_list, source.path)
1 0.000003 endif
11 0.000033 endfor
FUNCTION <SNR>116_writefile()
Called 1 time
Total time: 0.000654
Self time: 0.000394
count total (s) self (s)
1 0.000278 0.000018 let cache_name = s:_encode_name(a:cache_dir, a:filename)
1 0.000372 call writefile(a:list, cache_name)
FUNCTION neocomplete#sources#vim#define()
Called 1 time
Total time: 0.000010
Self time: 0.000010
count total (s) self (s)
1 0.000007 return s:source
FUNCTION neocomplete#complete#_get_complete_pos()
Called 95 times
Total time: 0.004254
Self time: 0.004254
count total (s) self (s)
95 0.000621 if empty(a:sources)
return -1
endif
95 0.002795 return min([col('.')] + map(copy(a:sources), 'v:val.neocomplete__context.complete_pos'))
FUNCTION neocomplete#cache#writefile()
Called 1 time
Total time: 0.000916
Self time: 0.000065
count total (s) self (s)
1 0.000024 0.000011 if neocomplete#util#is_sudo()
return
endif
1 0.000201 0.000017 let cache_dir = neocomplete#get_data_directory() . '/' . a:cache_dir
1 0.000682 0.000028 return s:Cache.writefile(cache_dir, a:filename, a:list)
FUNCTION neocomplete#init#is_enabled()
Called 787 times
Total time: 0.005594
Self time: 0.005594
count total (s) self (s)
787 0.004365 return s:is_enabled
FUNCTION neocomplete#filters#converter_delimiter#define()
Called 1 time
Total time: 0.000008
Self time: 0.000008
count total (s) self (s)
1 0.000007 return s:converter
FUNCTION vimproc#dll_version()
Called 1 time
Total time: 0.000394
Self time: 0.000032
count total (s) self (s)
1 0.000385 0.000023 let [dll_version] = s:libcall('vp_dlversion', [])
1 0.000007 return str2nr(dll_version)
FUNCTION neocomplete#define_filter()
Called 9 times
Total time: 0.001408
Self time: 0.000583
count total (s) self (s)
9 0.000282 0.000119 let filters = neocomplete#variables#get_filters()
18 0.000262 0.000157 for filter in neocomplete#util#convert2list(a:filter)
9 0.000717 0.000160 let filters[filter.name] = neocomplete#init#_filter(filter)
9 0.000035 endfor
FUNCTION neosnippet#helpers#get_snippets_directory()
Called 2 times
Total time: 0.001082
Self time: 0.000156
count total (s) self (s)
2 0.000084 0.000043 let snippets_dir = copy(neosnippet#variables#snippets_dir())
2 0.000905 0.000059 if !get(g:neosnippet#disable_runtime_snippets, neosnippet#helpers#get_filetype(), get(g:neosnippet#disable_runtime_snippets, '_', 0))
2 0.000075 0.000036 let snippets_dir += neosnippet#variables#runtime_dir()
2 0.000006 endif
2 0.000006 return snippets_dir
FUNCTION neocomplete#is_multibyte_input()
Called 56 times
Total time: 0.009394
Self time: 0.009394
count total (s) self (s)
56 0.009296 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 150 times
Total time: 0.004375
Self time: 0.004375
count total (s) self (s)
" Escape string for lua regexp.
150 0.003867 return substitute(a:string, '[%\[\]().*+?^$-]', '%\0', 'g')
FUNCTION neocomplete#complete_check()
Called 294 times
Total time: 0.055314
Self time: 0.003522
count total (s) self (s)
294 0.054926 0.003134 return neocomplete#helper#complete_check()
FUNCTION <SNR>40_Highlight_Matching_Pair()
Called 178 times
Total time: 0.035838
Self time: 0.035838
count total (s) self (s)
" Remove any previous match.
178 0.001691 if exists('w:paren_hl_on') && w:paren_hl_on
silent! call matchdelete(3)
let w:paren_hl_on = 0
endif
" Avoid that we remove the popup menu.
" Return when there are no colors (looks like the cursor jumps).
178 0.001652 if pumvisible() || (&t_Co < 8 && !has("gui_running"))
return
endif
" Get the character under the cursor and check if it's in 'matchpairs'.
178 0.001329 let c_lnum = line('.')
178 0.001358 let c_col = col('.')
178 0.000756 let before = 0
178 0.003710 let text = getline(c_lnum)
178 0.001716 let c = text[c_col - 1]
178 0.006536 let plist = split(&matchpairs, '.\zs[:,]')
178 0.001655 let i = index(plist, c)
178 0.000704 if i < 0
" not found, in Insert mode try character before the cursor
178 0.001662 if c_col > 1 && (mode() == 'i' || mode() == 'R')
172 0.000753 let before = 1
172 0.001536 let c = text[c_col - 2]
172 0.001365 let i = index(plist, c)
172 0.000411 endif
178 0.000525 if i < 0
" not found, nothing to do
178 0.000467 return
endif
endif
" Figure out the arguments for searchpairpos().
if i % 2 == 0
let s_flags = 'nW'
let c2 = plist[i + 1]
else
let s_flags = 'nbW'
let c2 = c
let c = plist[i - 1]
endif
if c == '['
let c = '\['
let c2 = '\]'
endif
" Find the match. When it was just before the cursor move it there for a
" moment.
if before > 0
let 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.
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.
execute 'if' s_skip '| let s_skip = 0 | endif'
" Limit the search to lines visible in the window.
let stoplinebottom = line('w$')
let stoplinetop = line('w0')
if i % 2 == 0
let stopline = stoplinebottom
else
let stopline = stoplinetop
endif
" Limit the search time to 300 msec to avoid a hang on very long lines.
" This fails when a timeout is not supported.
if mode() == 'i' || mode() == 'R'
let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout
else
let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout
endif
try
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout)
catch /E118/
" Can't use the timeout, restrict the stopline a bit more to avoid taking
" a long time on closed folds and long lines.
" The "viewable" variables give a range in which we can scroll while
" keeping the cursor at the same position.
" adjustedScrolloff accounts for very large numbers of scrolloff.
let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2])
let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2])
let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2])
" one of these stoplines will be adjusted below, but the current values are
" minimal boundaries within the current window
if i % 2 == 0
if has("byte_offset") && has("syntax_items") && &smc > 0
let stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2])
let stopline = min([bottom_viewable, byte2line(stopbyte)])
else
let stopline = min([bottom_viewable, c_lnum + 100])
endif
let stoplinebottom = stopline
else
if has("byte_offset") && has("syntax_items") && &smc > 0
let stopbyte = max([1, line2byte(".") + col(".") - &smc * 2])
let stopline = max([top_viewable, byte2line(stopbyte)])
else
let stopline = max([top_viewable, c_lnum - 100])
endif
let stoplinetop = stopline
endif
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline)
endtry
if before > 0
if has_getcurpos
call setpos('.', save_cursor)
else
call winrestview(save_cursor)
endif
endif
" If a match is found setup match highlighting.
if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom
if exists('*matchaddpos')
call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3)
else
exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
endif
let w:paren_hl_on = 1
endif
FUNCTION neocomplete#sources#include#initialize()
Called 1 time
Total time: 0.000922
Self time: 0.000129
count total (s) self (s)
" Initialize include pattern. "{{{
1 0.000167 0.000026 call neocomplete#util#set_default_dictionary( 'g:neocomplete#sources#include#patterns', 'java,haskell', '^\s*\<import')
1 0.000221 0.000016 call neocomplete#util#set_default_dictionary( 'g:neocomplete#sources#include#patterns', 'c,cpp', '^\s*#\s*include')
1 0.000151 0.000020 call neocomplete#util#set_default_dictionary( 'g:neocomplete#sources#include#patterns', 'cs', '^\s*\<using')
1 0.000127 0.000018 call neocomplete#util#set_default_dictionary( 'g:neocomplete#sources#include#patterns', 'ruby', '^\s*\<\%(load\|require\|require_relative\)\>')
"}}}
" Initialize include suffixes. "{{{
1 0.000119 0.000015 call neocomplete#util#set_default_dictionary( 'g:neocomplete#sources#include#suffixes', 'haskell', '.hs')
"}}}
" Initialize include functions. "{{{
" call neocomplete#util#set_default_dictionary(
" \ 'g:neocomplete#sources#include#functions', 'vim',
" \ 'neocomplete#sources#include#analyze_vim_include_files')
1 0.000120 0.000017 call neocomplete#util#set_default_dictionary( 'g:neocomplete#sources#include#functions', 'ruby', 'neocomplete#sources#include#analyze_ruby_include_files')
"}}}
FUNCTION neosnippet#get_placeholder_marker_pattern()
Called 1 time
Total time: 0.000009
Self time: 0.000009
count total (s) self (s)
1 0.000006 return '<`\d\+\%(:.\{-}\)\?\\\@<!`>'
FUNCTION neocomplete#util#set_default_dictionary()
Called 245 times
Total time: 0.032109
Self time: 0.012949
count total (s) self (s)
245 0.002108 if !exists('s:disable_dictionaries')
1 0.000008 let s:disable_dictionaries = {}
1 0.000003 endif
245 0.002351 if has_key(s:disable_dictionaries, a:variable)
return
endif
245 0.024258 0.005098 call neocomplete#util#set_dictionary_helper({a:variable}, a:keys, a:value)
FUNCTION <SNR>104_get_list()
Called 4 times
Total time: 0.013325
Self time: 0.000128
count total (s) self (s)
4 0.000027 if !exists('s:List')
1 0.013250 0.000053 let s:List = vital#of('neosnippet').import('Data.List')
1 0.000002 endif
4 0.000012 return s:List
FUNCTION neosnippet#parser#_parse()
Called 4 times
Total time: 0.006411
Self time: 0.003227
count total (s) self (s)
4 0.000149 if !filereadable(a:snippet_file)
call neosnippet#util#print_error( printf('snippet file "%s" is not found.', a:snippet_file))
return {}
endif
4 0.000769 0.000074 let cache_dir = neosnippet#variables#data_dir()
4 0.001196 0.000079 if s:Cache.check_old_cache(cache_dir, a:snippet_file)
let snippets = s:parse(a:snippet_file)
if len(snippets) > 5
call s:Cache.writefile(cache_dir, a:snippet_file, [string(snippets)])
endif
else
4 0.004083 0.002711 sandbox let snippets = eval(s:Cache.readfile(cache_dir, a:snippet_file)[0])
4 0.000016 endif
4 0.000023 return snippets
FUNCTION neosnippet#util#expand()
Called 1 time
Total time: 0.010851
Self time: 0.000082
count total (s) self (s)
1 0.010849 0.000080 return neosnippet#util#substitute_path_separator( expand(escape(a:path, '*?[]"={}'), 1))
FUNCTION neocomplete#helper#complete_configure()
Called 23 times
Total time: 0.005559
Self time: 0.001987
count total (s) self (s)
23 0.003106 0.000289 call s:save_foldinfo()
23 0.000165 set completeopt-=menu
23 0.000132 set completeopt-=longest
23 0.000141 set completeopt+=menuone
" Set options.
23 0.000799 0.000288 let neocomplete = neocomplete#get_current_neocomplete()
23 0.000162 let neocomplete.completeopt = &completeopt
23 0.000469 0.000225 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 neocomplete#cache#getfilename()
Called 1 time
Total time: 0.000410
Self time: 0.000044
count total (s) self (s)
1 0.000211 0.000028 let cache_dir = neocomplete#get_data_directory() . '/' . a:cache_dir
1 0.000198 0.000015 return s:Cache.getfilename(cache_dir, a:filename)
FUNCTION <SNR>71_escape_pattern()
Called 50 times
Total time: 0.000622
Self time: 0.000622
count total (s) self (s)
50 0.000552 return escape(a:str, '~"\.^$[]*')
FUNCTION neocomplete#sources#buffer#make_cache_current_line()
Called 161 times
Total time: 5.629905
Self time: 0.008454
count total (s) self (s)
" let start = reltime()
161 5.628912 0.007461 call s:make_cache_current_buffer( max([1, line('.')-10]), min([line('$'), line('.') + 10]))
" echomsg reltimestr(reltime(start))
FUNCTION neocomplete#init#_sources()
Called 3 times
Total time: 0.060082
Self time: 0.007980
count total (s) self (s)
3 0.000031 if !exists('s:loaded_source_files')
" Initialize.
1 0.000006 let s:loaded_source_files = {}
1 0.000006 let s:loaded_all_sources = 0
1 0.000004 let s:runtimepath_save = ''
1 0.000002 endif
" Initialize sources table.
3 0.000029 if s:loaded_all_sources && &runtimepath ==# s:runtimepath_save
return
endif
3 0.000327 0.000074 let runtimepath_save = neocomplete#util#split_rtp(s:runtimepath_save)
3 0.002540 0.000662 let runtimepath = neocomplete#util#join_rtp( filter(neocomplete#util#split_rtp(), 'index(runtimepath_save, v:val) < 0'))
3 0.000740 0.000226 let sources = neocomplete#variables#get_sources()
6 0.000068 for name in filter(copy(a:names), '!has_key(sources, v:val)')
" Search autoload.
11 0.003516 for source_name in map(filter(split(globpath(runtimepath, 'autoload/neocomplete/sources/*.vim'), '\n'), "index(g:neocomplete#ignore_source_files, fnamemodify(v:val, ':t')) < 0"), "fnamemodify(v:val, ':t:r')")
8 0.000070 if has_key(s:loaded_source_files, source_name)
continue
endif
8 0.000069 let s:loaded_source_files[source_name] = 1
8 0.019477 0.002301 let source = neocomplete#sources#{source_name}#define()
8 0.000059 if empty(source)
" Ignore.
continue
endif
8 0.032484 0.000203 call neocomplete#define_source(source)
8 0.000021 endfor
3 0.000016 if name == '_'
3 0.000019 let s:loaded_all_sources = 1
3 0.000029 let s:runtimepath_save = &runtimepath
3 0.000008 endif
3 0.000005 endfor
FUNCTION <SNR>102_substitute_path_separator()
Called 1 time
Total time: 0.000014
Self time: 0.000014
count total (s) self (s)
1 0.000012 return s:is_windows ? substitute(a:path, '\\', '/', 'g') : a:path
FUNCTION <SNR>77_make_cache_buffer()
Called 2 times
Total time: 0.189144
Self time: 0.002634
count total (s) self (s)
2 0.000458 0.000040 if !s:should_create_cache(a:srcname)
return
endif
2 0.000076 0.000047 call neocomplete#print_debug('make_cache_buffer: ' . a:srcname)
2 0.000144 0.000034 if !s:exists_current_source()
1 0.001076 0.000036 call s:initialize_source(a:srcname)
1 0.000007 if a:srcname ==# bufnr('%')
" Force sync cache
1 0.124490 0.000042 call s:make_cache_current_buffer(1, 1000)
1 0.000007 return
endif
endif
1 0.000009 let source = s:buffer_sources[a:srcname]
1 0.000441 0.000031 let temp = neocomplete#cache#getfilename( 'buffer_temp', getpid() . '_' . a:srcname)
1 0.000107 let lines = getbufline(a:srcname, 1, '$')
1 0.002071 call writefile(lines, temp)
" Create temporary file
1 0.060130 0.000075 let source.cache_name = neocomplete#cache#async_load_from_file( 'buffer_cache', temp, source.keyword_pattern, 'B')
1 0.000011 let source.cached_time = localtime()
1 0.000014 let source.filetype = getbufvar(a:srcname, '&filetype')
1 0.000006 if source.filetype == ''
let source.filetype = 'nothing'
endif
1 0.000018 let s:async_dictionary_list[source.path] = [{ 'filename' : temp, 'cachename' : source.cache_name, }]
FUNCTION <SNR>70__vital_files()
Called 4 times
Total time: 0.007785
Self time: 0.001672
count total (s) self (s)
4 0.000048 if s:_vital_files_cache_runtimepath !=# &runtimepath
2 0.000030 let path = printf('autoload/vital/%s/**/*.vim', s:self_version)
2 0.006180 0.000067 let s:_vital_files_cache = s:_runtime_files(path)
2 0.000021 let mod = ':p:gs?[\\/]\+?/?'
2 0.000703 call map(s:_vital_files_cache, 'fnamemodify(v:val, mod)')
2 0.000024 let s:_vital_files_cache_runtimepath = &runtimepath
2 0.000006 endif
4 0.000077 let target = substitute(a:pattern, '\.', '/', 'g')
4 0.000064 let target = substitute(target, '\*', '[^/]*', 'g')
4 0.000058 let regexp = printf('autoload/vital/%s/%s.vim', s:self_version, target)
4 0.000492 return filter(copy(s:_vital_files_cache), 'v:val =~# regexp')
FUNCTION neocomplete#get_source_filetypes()
Called 1271 times
Total time: 0.553930
Self time: 0.020245
count total (s) self (s)
1271 0.552376 0.018691 return neocomplete#helper#get_source_filetypes(a:filetype)
FUNCTION <SNR>53_highlight_name()
Called 3 times
Total time: 0.000031
Self time: 0.000031
count total (s) self (s)
3 0.000024 return a:cursor ? 'HighlightUrlCursor': 'HighlightUrl'
FUNCTION neosnippet#variables#current_neosnippet()
Called 39 times
Total time: 0.000938
Self time: 0.000938
count total (s) self (s)
39 0.000290 if !exists('b:neosnippet')
1 0.000020 let b:neosnippet = { 'snippets' : {}, 'selected_text' : '', 'target' : '', 'trigger' : 0, 'optional_tabstop' : 0,}
1 0.000003 endif
39 0.000142 return b:neosnippet
FUNCTION neosnippet#util#set_default()
Called 7 times
Total time: 0.000170
Self time: 0.000170
count total (s) self (s)
7 0.000066 if !exists(a:var)
6 0.000069 let {a:var} = a:val
6 0.000016 endif
FUNCTION neocomplete#helper#get_source_filetypes()
Called 1271 times
Total time: 0.533685
Self time: 0.205330
count total (s) self (s)
1271 0.012773 let filetype = (a:filetype == '') ? 'nothing' : a:filetype
1271 0.008271 let filetypes = [filetype]
1271 0.014413 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
1271 0.009522 if exists('g:neocomplete#same_filetypes')
2542 0.015954 for ft in copy(filetypes)
1271 0.030392 let filetypes += split(get(g:neocomplete#same_filetypes, ft, get(g:neocomplete#same_filetypes, '_', '')), ',')
1271 0.004144 endfor
1271 0.004175 endif
1271 0.077608 0.014331 if neocomplete#is_text_mode()
call add(filetypes, 'text')
endif
1271 0.279397 0.014319 return neocomplete#util#uniq(filetypes)
FUNCTION <SNR>101__runtime_files()
Called 5 times
Total time: 0.002873
Self time: 0.002873
count total (s) self (s)
5 0.002863 return split(globpath(&runtimepath, a:path, 1), "\n")
FUNCTION miv#load()
Called 4 times
Total time: 0.010795
Self time: 0.008941
count total (s) self (s)
4 0.000038 if has_key(s:loaded, a:name)
1 0.000002 return
endif
3 0.000024 let s:loaded[a:name] = 1
3 0.000030 for n in get(s:dependon, a:name, [])
call miv#load(n)
endfor
9 0.000056 for mode in get(s:mapmodes, a:name, [ 'n', 'v' ])
8 0.000893 for mapping in get(s:mappings, a:name, [])
2 0.000090 silent! execute mode . 'unmap' mapping
2 0.000013 endfor
6 0.000010 endfor
3 0.000098 let name = substitute(tolower(a:name), '[^a-z0-9]', '', 'g')
3 0.000038 let au = has_key(s:c, name) && get(s:au, s:c[name])
3 0.000011 if au
call miv#{s:c[name]}#before_{name}()
endif
3 0.000025 let newrtp = s:mivpath . a:name . '/'
3 0.000078 if !isdirectory(newrtp)
return
endif
3 0.000150 let rtps = split(&rtp, ',')
3 0.003343 let i = index(map(deepcopy(rtps), 'resolve(v:val)'), s:path)
3 0.000020 if i < 0
3 0.000971 let mivpath = get(filter(deepcopy(rtps), 'v:val =~# "miv.\\?$"'), 0, '')
3 0.000132 let i = max([0, index(deepcopy(rtps), mivpath)])
3 0.000009 endif
3 0.000147 let &rtp = join(insert(rtps, newrtp, i), ',')
3 0.000050 if isdirectory(newrtp . 'after/')
exec 'set rtp+=' . newrtp . 'after/'
endif
6 0.000184 for dir in filter(['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin'], 'isdirectory(newrtp . v:val)')
6 0.001250 for file in split(glob(newrtp . dir . '/**/*.vim'), '\n')
3 0.002687 0.000833 silent! source `=file`
3 0.000012 endfor
3 0.000006 endfor
3 0.000010 if au
call miv#{s:c[name]}#after_{name}()
endif
3 0.000028 for n in get(s:dependedby, a:name, [])
call miv#load(n)
endfor
FUNCTION neocomplete#helper#get_cur_text()
Called 318 times
Total time: 0.084335
Self time: 0.073154
count total (s) self (s)
318 0.015117 0.003936 let neocomplete = neocomplete#get_current_neocomplete()
318 0.002893 let is_skip_char = get(a:000, 0, 0)
318 0.010856 let cur_text = (mode() ==# 'i' ? (col('.')-1) : col('.')) >= len(getline('.')) ? getline('.') : matchstr(getline('.'), '^.*\%' . (mode() ==# 'i' && !is_skip_char ? col('.') : col('.') - 1) . 'c' . (mode() ==# 'i' ? '' : '.'))
318 0.014625 if cur_text =~ '^.\{-}\ze\S\+$'
290 0.009549 let complete_str = matchstr(cur_text, '\S\+$')
290 0.012012 let cur_text = matchstr(cur_text, '^.\{-}\ze\S\+$')
290 0.000919 else
28 0.000133 let complete_str = ''
28 0.000064 endif
318 0.002279 if neocomplete.event ==# 'InsertCharPre'
let complete_str .= v:char
endif
318 0.002733 let neocomplete.cur_text = cur_text . complete_str
" Save cur_text.
318 0.002091 return neocomplete.cur_text
FUNCTION vimproc#util#has_lua()
Called 1 time
Total time: 0.000020
Self time: 0.000020
count total (s) self (s)
" Note: Disabled if_lua feature if less than 7.3.885.
" Because if_lua has double free problem.
1 0.000016 return has('lua') && (v:version > 703 || v:version == 703 && has('patch885'))
FUNCTION neocomplete#complete#_set_results_pos()
Called 105 times
Total time: 1.552858
Self time: 0.198792
count total (s) self (s)
" Initialize sources.
105 0.003848 0.001427 let neocomplete = neocomplete#get_current_neocomplete()
105 0.005851 0.001283 let filetype = neocomplete#get_context_filetype()
105 0.011312 0.001752 let sources = (a:0 > 0) ? a:1 : (filetype ==# neocomplete.sources_filetype) ? neocomplete.sources : neocomplete#helper#get_sources_list()
105 0.001052 let pos = winsaveview()
" Try source completion. "{{{
105 0.000533 let complete_sources = []
945 0.526712 0.015298 for source in filter(values(sources), 'neocomplete#helper#is_enabled_source(v:val, filetype)')
840 0.003485 if !source.loaded
8 0.269064 0.000154 call neocomplete#helper#call_hook(source, 'on_init', {})
8 0.000043 let source.loaded = 1
8 0.000017 endif
840 0.004687 let context = source.neocomplete__context
840 0.004999 let context.input = a:cur_text
840 0.002061 try
840 0.562674 0.030005 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]
840 0.002786 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
840 0.011725 if winsaveview() != pos
call winrestview(pos)
endif
840 0.001894 endtry
840 0.003354 if complete_pos < 0
301 0.001600 let context.complete_pos = -1
301 0.001402 let context.complete_str = ''
301 0.001641 continue
endif
539 0.005817 let complete_str = context.input[complete_pos :]
539 0.037249 0.012725 if neocomplete#is_auto_complete() && len(complete_str) < source.min_pattern_length
" Skip.
47 0.000258 let context.complete_pos = -1
47 0.000206 let context.complete_str = ''
47 0.000145 continue
endif
492 0.002942 let context.complete_pos = complete_pos
492 0.002745 let context.complete_str = complete_str
492 0.003961 call add(complete_sources, source)
492 0.001459 endfor
"}}}
105 0.000417 return complete_sources
FUNCTION neocomplete#filters#converter_remove_last_paren#define()
Called 1 time
Total time: 0.000008
Self time: 0.000008
count total (s) self (s)
1 0.000006 return s:converter
FUNCTION <SNR>105_is_beginning_of_line()
Called 39 times
Total time: 0.003401
Self time: 0.003401
count total (s) self (s)
39 0.000256 let keyword_pattern = '\S\+'
39 0.001360 let cur_keyword_str = matchstr(a:cur_text, keyword_pattern.'$')
39 0.000577 let line_part = a:cur_text[: -1-len(cur_keyword_str)]
39 0.000805 let prev_word_end = matchend(line_part, keyword_pattern)
39 0.000213 return prev_word_end <= 0
FUNCTION <SNR>70__runtime_files()
Called 2 times
Total time: 0.006113
Self time: 0.006113
count total (s) self (s)
2 0.006108 return split(globpath(&runtimepath, a:path, 1), "\n")
FUNCTION neocomplete#helper#get_sources_list()
Called 1 time
Total time: 0.009560
Self time: 0.000357
count total (s) self (s)
1 0.000073 0.000025 let filetype = neocomplete#get_context_filetype()
1 0.000026 let source_names = exists('b:neocomplete_sources') ? b:neocomplete_sources : get(a:000, 0, get(g:neocomplete#sources, filetype, get(g:neocomplete#sources, '_', ['_'])))
1 0.001058 0.000032 call neocomplete#init#_sources(source_names)
1 0.000084 0.000027 let all_sources = neocomplete#available_sources()
1 0.000005 let sources = {}
1 0.000007 for source_name in source_names
1 0.000006 if source_name ==# '_'
" All sources.
1 0.000005 let sources = all_sources
1 0.000003 break
endif
if !has_key(all_sources, source_name)
call neocomplete#print_warning(printf( 'Invalid source name "%s" is given.', source_name))
continue
endif
let sources[source_name] = all_sources[source_name]
endfor
1 0.000038 0.000013 let neocomplete = neocomplete#get_current_neocomplete()
1 0.008179 0.000132 let neocomplete.sources = filter(sources, " (empty(v:val.filetypes) || !empty(neocomplete#helper#ftdictionary2list( v:val.filetypes, neocomplete.context_filetype)))")
1 0.000011 let neocomplete.sources_filetype = neocomplete.context_filetype
1 0.000005 return neocomplete.sources
FUNCTION neocomplete#mappings#popup_post()
Called 23 times
Total time: 0.000448
Self time: 0.000448
count total (s) self (s)
23 0.000387 return !pumvisible() ? "" : g:neocomplete#enable_auto_select ? "\<C-p>\<Down>" : "\<C-p>"
FUNCTION <SNR>90_uniq_by()
Called 1538 times
Total time: 3.181455
Self time: 3.181455
count total (s) self (s)
1538 0.221978 let list = map(copy(a:list), printf('[v:val, %s]', a:f))
1538 0.007399 let i = 0
1538 0.006860 let seen = {}
58192 0.354682 while i < len(list)
56654 0.661450 let key = string(list[i][1])
56654 0.384980 if has_key(seen, key)
7579 0.076319 call remove(list, i)
7579 0.016124 else
49075 0.354151 let seen[key] = 1
49075 0.178513 let i += 1
49075 0.129700 endif
56654 0.136290 endwhile
1538 0.154091 return map(list, 'v:val[0]')
FUNCTION neocomplete#util#is_mac()
Called 2 times
Total time: 0.000140
Self time: 0.000076
count total (s) self (s)
2 0.000138 0.000074 return call(s:get_prelude().is_mac, a:000)
FUNCTION <SNR>97_initialize_cache()
Called 1 time
Total time: 0.036374
Self time: 0.000257
count total (s) self (s)
" Make cache for _ snippets.
1 0.029046 0.000230 call neosnippet#commands#_make_cache('_')
" Initialize check.
1 0.007321 0.000020 call neosnippet#commands#_make_cache(&filetype)
FUNCTION neocomplete#filters#converter_abbr#define()
Called 1 time
Total time: 0.000008
Self time: 0.000008
count total (s) self (s)
1 0.000007 return s:converter
FUNCTION <SNR>122_getmatchstr()
Called 5 times
Total time: 0.000353
Self time: 0.000353
count total (s) self (s)
5 0.000242 let str = matchstr(a:str, a:pat)
5 0.000093 return [str, a:str[len(str):]]
FUNCTION neocomplete#handler#_on_text_changed()
Called 88 times
Total time: 0.161168
Self time: 0.067785
count total (s) self (s)
88 0.009754 0.001083 if neocomplete#is_cache_disabled()
return
endif
88 0.000622 if getline('.') == ''
2 0.084741 0.000029 call s:make_cache_current_line()
2 0.000004 endif
88 0.004627 let cur_text = matchstr(getline('.'), '^.*\%'.col('.').'c')
" indent line matched by indentkeys
528 0.042207 for word in filter(map(split(&l:indentkeys, ','), "v:val =~ '^<.*>$' ? matchstr(v:val, '^<\\zs.*\\ze>$') : matchstr(v:val, '.*=\\zs.*')"), "v:val != ''")
440 0.007106 if stridx(cur_text, word, len(cur_text)-len(word)-1) >= 0
call neocomplete#helper#indent_current_line()
break
endif
440 0.001917 endfor
FUNCTION neocomplete#handler#_on_insert_leave()
Called 2 times
Total time: 0.074631
Self time: 0.000218
count total (s) self (s)
2 0.003388 0.000063 call neocomplete#helper#clear_result()
2 0.000127 0.000043 call s:close_preview_window()
2 0.070997 0.000035 call s:make_cache_current_line()
2 0.000067 0.000025 let neocomplete = neocomplete#get_current_neocomplete()
2 0.000011 let neocomplete.cur_text = ''
2 0.000012 let neocomplete.completed_item = {}
2 0.000010 let neocomplete.overlapped_items = {}
FUNCTION neosnippet#util#get_vital()
Called 2 times
Total time: 0.000014
Self time: 0.000014
count total (s) self (s)
2 0.000009 return s:V
FUNCTION neosnippet#mappings#_clear_select_mode_mappings()
Called 1 time
Total time: 0.006419
Self time: 0.006419
count total (s) self (s)
1 0.000007 if !g:neosnippet#disable_select_mode_mappings
return
endif
1 0.000007 redir => mappings
1 0.001293 silent! smap
1 0.000012 redir END
47 0.003009 for map in map(filter(split(mappings, '\n'), "v:val !~# '^s' && v:val !~ '^\\a*\\s*<\\S\\+>'"), "matchstr(v:val, '^\\a*\\s*\\zs\\S\\+')")
46 0.000988 silent! execute 'sunmap' map
46 0.000846 silent! execute 'sunmap <buffer>' map
46 0.000129 endfor
" Define default select mode mappings.
1 0.000018 snoremap <CR> a<BS>
1 0.000015 snoremap <BS> a<BS>
1 0.000015 snoremap <Del> a<BS>
1 0.000015 snoremap <C-h> a<BS>
FUNCTION Strftime2()
Called 1 time
Total time: 0.000515
Self time: 0.000515
count total (s) self (s)
1 0.000005 if a:0 > 0
" Get {time} argument.
1 0.000003 if a:0 > 1
let time = a:2
else
1 0.000007 let time = localtime()
1 0.000002 endif
" Parse special format.
1 0.000005 let format = a:1
1 0.000033 let format = substitute(format, '%\(\d\+\)m', '\=MonthnameString(-1, submatch(1), time)', 'g')
1 0.000023 let format = substitute(format, '%\(\d\+\)a', '\=DaynameString(-1, submatch(1), time)', 'g')
1 0.000423 return strftime(format, time)
endif
" Genrate error!
return strftime()
FUNCTION neocomplete#util#is_windows()
Called 3 times
Total time: 0.010776
Self time: 0.000101
count total (s) self (s)
3 0.010773 0.000098 return call(s:get_prelude().is_windows, a:000)
FUNCTION lightline_powerful#mode()
Called 278 times
Total time: 0.016105
Self time: 0.010765
count total (s) self (s)
278 0.015627 0.010287 return get(s:m, expand('%:t'), get(s:p, &ft, winwidth(0) > 60 ? lightline#mode() : ''))
FUNCTION <SNR>101__is_absolute_path()
Called 5 times
Total time: 0.000051
Self time: 0.000051
count total (s) self (s)
5 0.000046 return a:path[0] ==# '/'
FUNCTION neocomplete#complete#_get_words()
Called 46 times
Total time: 0.166477
Self time: 0.042331
count total (s) self (s)
46 0.005212 0.000607 let frequencies = neocomplete#variables#get_frequencies()
46 0.000461 if exists('*neocomplete#sources#buffer#get_frequencies')
46 0.001771 0.000884 let frequencies = extend(copy( neocomplete#sources#buffer#get_frequencies()), frequencies)
46 0.000139 endif
" Append prefix.
46 0.000208 let candidates = []
46 0.000274 let len_words = 0
96 0.001290 0.001243 for source in sort(filter(copy(a:sources), '!empty(v:val.neocomplete__context.candidates)'), 's:compare_source_rank')
50 0.000303 let mark = source.mark
50 0.000262 let context = source.neocomplete__context
50 0.002261 let words = type(context.candidates[0]) == type('') ? map(copy(context.candidates), "{'word': v:val, 'menu' : mark}") : deepcopy(context.candidates)
50 0.000295 let context.candidates = words
50 0.012631 0.000822 call neocomplete#helper#call_hook( source, 'on_post_filter', {})
50 0.000412 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
50 0.000498 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
50 0.019318 0.001045 let words = neocomplete#helper#call_filters( source.neocomplete__sorters, source, {})
50 0.000265 if source.max_candidates > 0
let words = words[: len(source.max_candidates)-1]
endif
" Set default menu.
50 0.000300 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
50 0.069875 0.001037 let words = neocomplete#helper#call_filters( source.neocomplete__converters, source, {})
50 0.000380 let candidates += words
50 0.000360 let len_words += len(words)
50 0.000360 if g:neocomplete#max_list > 0 && len_words > g:neocomplete#max_list
break
endif
50 0.010145 0.001023 if neocomplete#complete_check()
return []
endif
50 0.000100 endfor
46 0.000226 if g:neocomplete#max_list > 0
46 0.000627 let candidates = candidates[: g:neocomplete#max_list]
46 0.000126 endif
" Check dup and set icase.
46 0.005600 0.001754 let icase = !neocomplete#is_text_mode() && !neocomplete#within_comment() && g:neocomplete#enable_ignore_case &&!((g:neocomplete#enable_smart_case || g:neocomplete#enable_camel_case) && a:complete_str =~ '\u')
46 0.000189 if icase
322 0.001107 for candidate in candidates
276 0.001193 let candidate.icase = 1
276 0.001232 endfor
46 0.000093 endif
46 0.007316 0.000597 if neocomplete#complete_check()
return []
endif
46 0.000161 return candidates
FUNCTION <SNR>77_initialize_source()
Called 2 times
Total time: 0.001896
Self time: 0.000500
count total (s) self (s)
2 0.000104 let path = fnamemodify(bufname(a:srcname), ':p')
2 0.000028 let filename = fnamemodify(path, ':t')
2 0.000011 if filename == ''
let filename = '[No Name]'
let path .= '/[No Name]'
endif
2 0.000018 let ft = getbufvar(a:srcname, '&filetype')
2 0.000009 if ft == ''
let ft = 'nothing'
endif
2 0.000502 0.000039 let keyword_pattern = neocomplete#get_keyword_pattern(ft, s:source.name)
2 0.001180 0.000247 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 neosnippet#init#check()
Called 119 times
Total time: 0.002152
Self time: 0.002152
count total (s) self (s)
119 0.001006 if !exists('s:is_initialized')
call neosnippet#init#_initialize()
endif
FUNCTION <SNR>114_initialize_variables()
Called 1 time
Total time: 0.000038
Self time: 0.000038
count total (s) self (s)
1 0.000007 let s:include_info = {}
1 0.000012 let s:include_cache = {}
1 0.000006 let s:cache_accessed_time = {}
1 0.000005 let s:async_include_cache = {}
1 0.000004 let s:cached_pattern = {}
FUNCTION neocomplete#filters#sorter_rank#define()
Called 1 time
Total time: 0.000008
Self time: 0.000008
count total (s) self (s)
1 0.000006 return s:sorter
FUNCTION neocomplete#init#_others()
Called 2 times
Total time: 0.056413
Self time: 0.000850
count total (s) self (s)
2 0.053106 0.000064 call neocomplete#init#_variables()
2 0.000912 0.000258 call neocomplete#commands#_initialize()
" For auto complete keymappings.
2 0.001538 0.000208 call neocomplete#mappings#define_default_mappings()
" Detect set paste.
2 0.000010 if &paste
redir => output
99verbose set paste
redir END
call neocomplete#print_error(output)
call neocomplete#print_error( 'Detected set paste! Disabled neocomplete.')
endif
2 0.000037 command! -nargs=0 -bar NeoCompleteDisable call neocomplete#init#disable()
" Set for echodoc.
2 0.000735 0.000198 call neocomplete#echodoc#init()
FUNCTION neosnippet#variables#runtime_dir()
Called 3 times
Total time: 0.000070
Self time: 0.000070
count total (s) self (s)
3 0.000028 if !exists('s:runtime_dir')
1 0.000007 let s:runtime_dir = []
1 0.000003 endif
3 0.000012 return s:runtime_dir
FUNCTION <SNR>101_import()
Called 3 times
Total time: 0.028571
Self time: 0.000390
count total (s) self (s)
3 0.000020 let target = {}
3 0.000013 let functions = []
3 0.000016 for a in a:000
if type(a) == type({})
let target = a
elseif type(a) == type([])
let functions = a
endif
unlet a
endfor
3 0.028237 0.000056 let module = s:_import(a:name)
3 0.000020 if empty(functions)
3 0.000086 call extend(target, module, 'keep')
3 0.000006 else
for f in functions
if has_key(module, f) && !has_key(target, f)
let target[f] = module[f]
endif
endfor
endif
3 0.000009 return target
FUNCTION <SNR>70__build_module()
Called 5 times
Total time: 0.011018
Self time: 0.005152
count total (s) self (s)
5 0.000053 if has_key(s:loaded, a:sid)
1 0.000039 return copy(s:loaded[a:sid])
endif
4 0.005942 0.000076 let functions = s:_get_functions(a:sid)
4 0.000043 let prefix = '<SNR>' . a:sid . '_'
4 0.000022 let module = {}
105 0.000347 for func in functions
101 0.001280 let module[func] = function(prefix . func)
101 0.000317 endfor
4 0.000028 if has_key(module, '_vital_loaded')
let V = vital#{s:self_version}#new()
if has_key(module, '_vital_depends')
let all = {}
let modules = s:_concat(map(module._vital_depends(), 's:expand_modules(v:val, all)'))
call call(V.load, modules, V)
endif
try
call module._vital_loaded(V)
catch
" FIXME: Show an error message for debug.
endtry
endif
4 0.000028 if !get(g:, 'vital_debug', 0)
4 0.002405 call filter(module, 'v:key =~# "^\\a"')
4 0.000017 endif
4 0.000047 let s:loaded[a:sid] = module
4 0.000086 return copy(module)
FUNCTION vimproc#util#has_iconv()
Called 18 times
Total time: 0.000256
Self time: 0.000256
count total (s) self (s)
" On Windows, some encodings can be converted by iconv() even if
" libiconv.dll is not available.
18 0.000185 return (has('iconv') || (s:is_windows && exists('*iconv')))
FUNCTION vimproc#util#uniq()
Called 1 time
Total time: 0.001008
Self time: 0.001008
count total (s) self (s)
1 0.000024 let list = a:0 ? map(copy(a:list), printf('[v:val, %s]', a:1)) : copy(a:list)
1 0.000004 let i = 0
1 0.000004 let seen = {}
22 0.000111 while i < len(list)
21 0.000249 let key = string(a:0 ? list[i][1] : list[i])
21 0.000136 if has_key(seen, key)
2 0.000014 call remove(list, i)
2 0.000003 else
19 0.000113 let seen[key] = 1
19 0.000067 let i += 1
19 0.000040 endif
21 0.000052 endwhile
1 0.000007 return a:0 ? map(list, 'v:val[0]') : list
FUNCTION <SNR>118_close_all()
Called 1 time
Total time: 0.001798
Self time: 0.000076
count total (s) self (s)
1 0.000009 if has_key(a:self, 'stdin')
1 0.000748 0.000018 call a:self.stdin.close()
1 0.000002 endif
1 0.000007 if has_key(a:self, 'stdout')
1 0.000534 0.000012 call a:self.stdout.close()
1 0.000002 endif
1 0.000007 if has_key(a:self, 'stderr')
1 0.000482 0.000012 call a:self.stderr.close()
1 0.000002 endif
FUNCTION <SNR>53_get()
Called 9 times
Total time: 0.000216
Self time: 0.000216
count total (s) self (s)
9 0.000193 return get(w:, 'highlighturl_' . a:name, get(g:, 'highlighturl_' . a:name, a:default))
FUNCTION neocomplete#mappings#auto_complete()
Called 23 times
Total time: 0.228470
Self time: 0.110663
count total (s) self (s)
23 0.002021 0.000487 let neocomplete = neocomplete#get_current_neocomplete()
23 0.007521 0.000464 let cur_text = neocomplete#get_cur_text(1)
23 0.001577 0.000617 let complete_pos = neocomplete#complete#_get_complete_pos( neocomplete.complete_sources)
23 0.000229 let base = cur_text[complete_pos :]
23 0.088713 0.000579 let neocomplete.candidates = neocomplete#complete#_get_words( neocomplete.complete_sources, complete_pos, base)
23 0.000145 let neocomplete.complete_str = base
" Start auto complete.
23 0.127713 0.107591 call complete(complete_pos+1, neocomplete.candidates)
23 0.000258 return ''
FUNCTION lightline#update_once()
Called 3 times
Total time: 0.000090
Self time: 0.000090
count total (s) self (s)
3 0.000079 if !exists('w:lightline') || w:lightline | call lightline#update() | endif
FUNCTION <SNR>118_split()
Called 9 times
Total time: 0.001808
Self time: 0.001808
count total (s) self (s)
9 0.000057 let result = []
9 0.000032 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
9 0.000055 return result
FUNCTION neosnippet#util#substitute_path_separator()
Called 1 time
Total time: 0.010769
Self time: 0.000075
count total (s) self (s)
1 0.010768 0.000074 return call(s:get_prelude().substitute_path_separator, a:000)
FUNCTION <SNR>106_flatten()
Called 4 times
Total time: 0.000624
Self time: 0.000398
count total (s) self (s)
4 0.000031 let limit = a:0 > 0 ? a:1 : -1
4 0.000016 let memo = []
4 0.000012 if limit == 0
return a:list
endif
4 0.000016 let limit -= 1
11 0.000041 for Value in a:list
7 0.000108 let memo += type(Value) == type([]) ? s:flatten(Value, limit) : [Value]
7 0.000024 unlet! Value
7 0.000014 endfor
4 0.000013 return memo
FUNCTION neocomplete#helper#is_enabled_source()
Called 1156 times
Total time: 0.617846
Self time: 0.066441
count total (s) self (s)
1156 0.030649 0.023218 let source = type(a:source) == type('') ? get(neocomplete#variables#get_sources(), a:source, {}) : a:source
1156 0.582813 0.038839 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 <SNR>70__is_absolute_path()
Called 5 times
Total time: 0.000063
Self time: 0.000063
count total (s) self (s)
5 0.000055 return a:path[0] ==# '/'
FUNCTION neocomplete#cache#async_load_from_file()
Called 1 time
Total time: 0.060055
Self time: 0.000310
count total (s) self (s)
1 0.002502 0.000087 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.000482 0.000018 let pattern_file_name = neocomplete#cache#encode_name('keyword_patterns', a:filename)
1 0.000439 0.000027 let cache_name = neocomplete#cache#encode_name(a:cache_dir, a:filename)
" Create pattern file.
1 0.000956 0.000040 call neocomplete#cache#writefile( 'keyword_patterns', a:filename, [a:pattern])
" args: funcname, outputname, filename pattern mark
" minlen maxlen encoding
1 0.000013 let fileencoding = &fileencoding == '' ? &encoding : &fileencoding
1 0.000017 let argv = [ 'load_from_file', cache_name, a:filename, pattern_file_name, a:mark, g:neocomplete#min_keyword_length, fileencoding ]
1 0.055622 0.000084 return s:async_load(argv, a:cache_dir, a:filename)
FUNCTION neocomplete#mappings#define_default_mappings()
Called 2 times
Total time: 0.000457
Self time: 0.000457
count total (s) self (s)
2 0.000157 inoremap <expr><silent> <Plug>(neocomplete_start_unite_complete) unite#sources#neocomplete#start_complete()
2 0.000097 inoremap <expr><silent> <Plug>(neocomplete_start_unite_quick_match) unite#sources#neocomplete#start_quick_match()
2 0.000069 inoremap <silent> <Plug>(neocomplete_start_omni_complete) <C-x><C-o><C-p>
2 0.000125 inoremap <silent> <Plug>(neocomplete_start_auto_complete) <C-r>=neocomplete#mappings#auto_complete()<CR><C-r>=neocomplete#mappings#popup_post()<CR>
FUNCTION <SNR>101__get_functions()
Called 4 times
Total time: 0.006739
Self time: 0.002200
count total (s) self (s)
4 0.004667 0.000128 let funcs = s:_redir(printf("function /\\%%#=2^\<SNR>%d_", a:sid))
4 0.000045 let map_pat = '<SNR>' . a:sid . '_\zs\w\+'
4 0.002016 return map(split(funcs, "\n"), 'matchstr(v:val, map_pat)')
FUNCTION <SNR>118_vp_dlopen()
Called 1 time
Total time: 0.000766
Self time: 0.000044
count total (s) self (s)
1 0.000760 0.000038 let [handle] = s:libcall('vp_dlopen', [a:path])
1 0.000004 return handle
FUNCTION <SNR>89_set_complete_results_pos()
Called 105 times
Total time: 0.013186
Self time: 0.013186
count total (s) self (s)
" Try omnifunc completion. "{{{
105 0.000726 let complete_results = {}
105 0.000579 for [omnifunc, pattern] in a:funcs
if neocomplete#is_auto_complete() && a:cur_text !~# '\%(' . pattern . '\m\)$'
continue
endif
" Save pos.
let pos = getpos('.')
try
let complete_pos = call(omnifunc, [1, ''])
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
if getpos('.') != pos
call setpos('.', pos)
endif
endtry
if complete_pos < 0
continue
endif
let complete_str = a:cur_text[complete_pos :]
let complete_results[omnifunc] = { 'candidates' : [], 'complete_pos' : complete_pos, 'complete_str' : complete_str, 'omnifunc' : omnifunc,}
endfor
"}}}
105 0.000431 return complete_results
FUNCTION <SNR>113_make_cache_completion_from_dict()
Called 1 time
Total time: 0.088781
Self time: 0.088781
count total (s) self (s)
1 0.000887 let dict_files = split(globpath(&runtimepath, 'autoload/neocomplete/sources/vim/'.a:dict_name.'.dict'), '\n')
1 0.000007 if empty(dict_files)
return {}
endif
1 0.000006 let keyword_dict = {}
499 0.002551 for line in readfile(dict_files[0])
498 0.012228 let word = matchstr(line, '^[[:alnum:]_\[\]]\+')
498 0.011929 let completion = matchstr(line[len(word):], '\h\w*')
498 0.002781 if completion != ''
226 0.002108 if word =~ '\['
199 0.003632 let [word_head, word_tail] = split(word, '\[')
199 0.003686 let word_tail = ' ' . substitute(word_tail, '\]', '', '')
199 0.000572 else
27 0.000129 let word_head = word
27 0.000100 let word_tail = ' '
27 0.000056 endif
1165 0.005189 for i in range(len(word_tail))
939 0.019350 let keyword_dict[word_head . word_tail[1:i]] = completion
939 0.004077 endfor
226 0.000404 endif
498 0.001797 endfor
1 0.000010 return keyword_dict
FUNCTION <SNR>101__get_module_path()
Called 5 times
Total time: 0.004623
Self time: 0.001004
count total (s) self (s)
5 0.000151 0.000100 if s:_is_absolute_path(a:name) && filereadable(a:name)
return s:_unify_path(a:name)
endif
5 0.000025 if a:name ==# ''
2 0.000026 let tailpath = printf('autoload/vital/%s.vim', s:self_version)
2 0.000008 elseif a:name =~# '\v^\u\w*%(\.\u\w*)*$'
3 0.000071 let target = substitute(a:name, '\W\+', '/', 'g')
3 0.000044 let tailpath = printf('autoload/vital/%s/%s.vim', s:self_version, target)
3 0.000009 else
throw 'vital: Invalid module name: ' . a:name
endif
5 0.002970 0.000097 let paths = s:_runtime_files(tailpath)
5 0.000226 call filter(paths, 'filereadable(v:val)')
5 0.000055 let path = get(paths, 0, '')
5 0.000799 0.000104 return path !=# '' ? s:_unify_path(path) : ''
FUNCTION neocomplete#handler#_on_insert_char_pre()
Called 596 times
Total time: 5.633766
Self time: 0.040585
count total (s) self (s)
596 0.077184 0.007931 if neocomplete#is_cache_disabled()
return
endif
596 0.022676 0.008224 let neocomplete = neocomplete#get_current_neocomplete()
596 0.006003 if neocomplete.old_char != ' ' && v:char == ' ' && v:count == 0
154 5.511797 0.002321 call s:make_cache_current_line()
154 0.000298 endif
596 0.004049 let neocomplete.old_char = v:char
FUNCTION <SNR>100_get_prelude()
Called 9 times
Total time: 0.010860
Self time: 0.000274
count total (s) self (s)
9 0.000066 if !exists('s:Prelude')
1 0.010660 0.000074 let s:Prelude = neosnippet#util#get_vital().import('Prelude')
1 0.000003 endif
9 0.000030 return s:Prelude
FUNCTION highlighturl#set_urlcursor_match()
Called 3 times
Total time: 0.001418
Self time: 0.001074
count total (s) self (s)
3 0.000030 let bufnr = bufnr('')
3 0.000038 let s:line[bufnr] = line('.')
3 0.000044 let s:cursorline[bufnr] = &l:cursorline
3 0.000032 if has_key(s:match_id, bufnr)
3 0.000053 silent! call matchdelete(s:match_id[bufnr])
3 0.000010 endif
3 0.000164 0.000087 if s:get('enable', get(s:, 'enable', 1))
3 0.000101 0.000070 let name = s:highlight_name(&l:cursorline)
3 0.000306 0.000135 let pattern = '\%' . line('.') . 'l' . s:get('pattern', highlighturl#default_pattern())
3 0.000596 0.000531 let s:match_id[bufnr] = matchadd(name, pattern, s:get('url_cursor_priority', 20))
3 0.000013 endif
FUNCTION neocomplete#commands#_initialize()
Called 2 times
Total time: 0.000072
Self time: 0.000072
count total (s) self (s)
2 0.000069 command! -nargs=1 NeoCompleteAutoCompletionLength call s:set_auto_completion_length(<args>)
FUNCTION neocomplete#sources#buffer#define()
Called 1 time
Total time: 0.000008
Self time: 0.000008
count total (s) self (s)
1 0.000006 return s:source
FUNCTION spellbad_pattern#update()
Called 4 times
Total time: 0.000316
Self time: 0.000316
count total (s) self (s)
4 0.000132 if !get(g:, 'spellbad_pattern_enable', 1) || get(w:, 'spellbad_pattern', -1) == &l:spell
3 0.000021 return
endif
1 0.000003 if &l:spell
for s in get(g:, 'spellbad_pattern', [])
silent! call matchadd('SpellBad', s)
endfor
else
4 0.000031 for m in getmatches()
3 0.000016 if m.group ==# 'SpellBad'
silent! call matchdelete(m.id)
endif
3 0.000015 endfor
1 0.000002 endif
1 0.000007 let w:spellbad_pattern = &l:spell
FUNCTION <SNR>118_fdopen()
Called 3 times
Total time: 0.001509
Self time: 0.000339
count total (s) self (s)
3 0.001504 0.000334 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 <SNR>116_getfilename()
Called 7 times
Total time: 0.001522
Self time: 0.000135
count total (s) self (s)
7 0.001509 0.000122 return s:_encode_name(a:cache_dir, a:filename)
FUNCTION neosnippet#get_mirror_placeholder_marker_pattern()
Called 1 time
Total time: 0.000007
Self time: 0.000007
count total (s) self (s)
1 0.000005 return '<|\d\+|>'
FUNCTION neocomplete#filters#matcher_length#define()
Called 1 time
Total time: 0.000008
Self time: 0.000008
count total (s) self (s)
1 0.000006 return s:matcher
FUNCTION neocomplete#handler#_on_insert_enter()
Called 5 times
Total time: 0.003094
Self time: 0.000443
count total (s) self (s)
5 0.000147 0.000056 if !neocomplete#is_enabled()
2 0.000005 return
endif
3 0.000099 0.000034 let neocomplete = neocomplete#get_current_neocomplete()
3 0.000024 if neocomplete.linenr != line('.')
1 0.002690 0.000195 call neocomplete#helper#clear_result()
1 0.000002 endif
3 0.000020 let neocomplete.linenr = line('.')
3 0.000024 if &l:foldmethod ==# 'expr' && foldlevel('.') != 0
foldopen
endif
FUNCTION neocomplete#helper#call_hook()
Called 60 times
Total time: 0.283148
Self time: 0.010466
count total (s) self (s)
134 0.001873 0.001122 for source in neocomplete#util#convert2list(a:sources)
74 0.000240 try
74 0.000597 if has_key(source.hooks, a:hook_name)
58 0.273375 0.001444 call call(source.hooks[a:hook_name], [extend(source.neocomplete__context, a:context)], source.hooks)
58 0.000159 endif
74 0.000156 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
74 0.000185 endfor
FUNCTION neocomplete#handler#_on_complete_done()
Called 23 times
Total time: 0.022458
Self time: 0.007661
count total (s) self (s)
23 0.000985 0.000347 let neocomplete = neocomplete#get_current_neocomplete()
" Get cursor word.
23 0.000174 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
23 0.001047 let cur_text = matchstr(getline('.'), '^.*\%'.col('.').'c')
23 0.012535 0.000782 let complete_str = neocomplete#helper#match_word(cur_text)[1]
23 0.000146 if complete_str == ''
" Use default keyword pattern.
1 0.000108 let complete_str = matchstr(cur_text, '\h\w*\(()\?\)\?$')
1 0.000010 if complete_str == ''
1 0.000004 return
endif
endif
22 0.001320 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', '') != '')")
22 0.000148 if !empty(candidates)
let neocomplete.completed_item = candidates[0]
endif
22 0.000041 endif
" Restore overlapped item
22 0.000223 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
22 0.002914 0.000508 let frequencies = neocomplete#variables#get_frequencies()
22 0.000171 if !has_key(frequencies, complete_str)
6 0.000052 let frequencies[complete_str] = 20
6 0.000014 else
16 0.000104 let frequencies[complete_str] += 20
16 0.000034 endif
FUNCTION <SNR>108__encode_name()
Called 8 times
Total time: 0.001512
Self time: 0.000595
count total (s) self (s)
" Check cache directory.
8 0.000119 if !isdirectory(a:cache_dir)
call mkdir(a:cache_dir, 'p')
endif
8 0.000043 let cache_dir = a:cache_dir
8 0.000123 if cache_dir !~ '/$'
let cache_dir .= '/'
endif
8 0.001071 0.000154 return cache_dir . s:_create_hash(cache_dir, a:filename)
FUNCTION neocomplete#echodoc#init()
Called 2 times
Total time: 0.000088
Self time: 0.000063
count total (s) self (s)
2 0.000066 0.000041 if neocomplete#exists_echodoc()
call echodoc#register(s:doc_dict.name, s:doc_dict)
endif
FUNCTION lightline_powerful#fugitive()
Called 278 times
Total time: 0.030816
Self time: 0.019372
count total (s) self (s)
278 0.011380 if has_key(b:, 'lightline_fugitive') && reltimestr(reltime(b:lightline_fugitive_)) =~# '^\s*0\.[0-3]'
236 0.001590 return b:lightline_fugitive
endif
42 0.000124 try
42 0.001641 if expand('%:t') !~? 'Tagbar\|Gundo\|NERD\|^$' && &ft !~? 'vimfiler'
42 0.000388 if exists('*gitbranch#name')
42 0.012069 0.000625 let _ = gitbranch#name()
42 0.000252 elseif exists('*fugitive#head')
let _ = fugitive#head()
else
return ''
endif
42 0.000514 let b:lightline_fugitive = strlen(_) ? s:fu._ : ''
42 0.000400 let b:lightline_fugitive_ = reltime()
42 0.000212 return b:lightline_fugitive
endif
catch
endtry
return ''
FUNCTION <SNR>105_get_sources_filetypes()
Called 39 times
Total time: 0.018702
Self time: 0.001628
count total (s) self (s)
39 0.018287 0.001213 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), '\.')
39 0.000318 return filetypes + ['_']
FUNCTION lightline#highlight()
Called 1 time
Total time: 0.008446
Self time: 0.007982
count total (s) self (s)
1 0.000016 let [c, f, g] = [s:lightline.palette, s:lightline.mode_fallback, s:lightline.component_type]
1 0.000018 if (has('win32') || has('win64')) && !has('gui_running')
for u in values(c)
for v in values(u)
for _ in v | let [_[2], _[3]] = [lightline#colortable#gui2cui(_[0], _[2]), lightline#colortable#gui2cui(_[1], _[3])] | endfor
endfor
endfor
endif
1 0.000015 let [s:lightline.llen, s:lightline.rlen] = [len(c.normal.left), len(c.normal.right)]
1 0.000029 let [s:lightline.tab_llen, s:lightline.tab_rlen] = [len(has_key(c,'tabline') && has_key(c.tabline, 'left') ? c.tabline.left : c.normal.left), len(has_key(c,'tabline') && has_key(c.tabline, 'right') ? c.tabline.right : c.normal.right)]
1 0.000239 0.000052 let h = s:uniq(filter(copy(values(g)), 'v:val !=# "raw"'))
1 0.000010 let modes = a:0 ? [a:1] : ['normal', 'insert', 'replace', 'visual', 'inactive', 'command', 'select', 'tabline']
2 0.000008 for mode in modes
1 0.000007 let s:highlight[mode] = 1
1 0.000013 let d = has_key(c, mode) ? mode : has_key(f, mode) && has_key(c, f[mode]) ? f[mode] : 'normal'
1 0.000013 let left = d ==# 'tabline' ? s:lightline.tabline.left : d ==# 'inactive' ? s:lightline.inactive.left : s:lightline.active.left
1 0.000011 let right = d ==# 'tabline' ? s:lightline.tabline.right : d ==# 'inactive' ? s:lightline.inactive.right : s:lightline.active.right
1 0.000021 let l = has_key(c,d) && has_key(c[d],'left') ? c[d].left : has_key(f,d) && has_key(c,f[d]) && has_key(c[f[d]],'left') ? c[f[d]].left : c.normal.left
1 0.000021 let r = has_key(c,d) && has_key(c[d],'right') ? c[d].right : has_key(f,d) && has_key(c,f[d]) && has_key(c[f[d]],'right') ? c[f[d]].right : c.normal.right
1 0.000024 let m = has_key(c,d) && has_key(c[d],'middle') ? c[d].middle[0] : has_key(f,d) && has_key(c,f[d]) && has_key(c[f[d]],'middle') ? c[f[d]].middle[0] : c.normal.middle[0]
1 0.000045 0.000030 let [w, x, n] = [len(left), len(right), s:term(m)]
4 0.000019 for i in range(w)
3 0.000054 let [li, lj] = [i < len(l) ? l[i] : m, i + 1 < len(l) ? l[i + 1] : m]
3 0.000090 0.000034 let p = s:term(li)
3 0.000213 exec printf('hi LightLineLeft_%s_%d guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, i, li[0], li[1], li[2], li[3], p)
3 0.000193 exec printf('hi LightLineLeft_%s_%d_%d guifg=%s guibg=%s ctermfg=%d ctermbg=%d', mode, i, i+1, i>=len(l) ? m[i+1==w] : li[1], i==w-1 ? m[1] : lj[1], i>=len(l) ? m[2+(i+1==w)] : li[3], i==w-1 ? m[3] : lj[3])
12 0.000039 for j in h
9 0.000246 let s = has_key(c,d) && has_key(c[d],j) ? c[d][j][0] : has_key(c,'tabline') && has_key(c.tabline,j) ? c.tabline[j][0] : has_key(c.normal,j) ? c.normal[j][0] : l[0]
9 0.000477 exec printf('hi LightLineLeft_%s_%d_%s guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, i, j, li[1], s[1], li[3], s[3], p)
9 0.000475 exec printf('hi LightLineLeft_%s_%s_%d guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, j, i, s[1], li[1], s[3], li[3], p)
9 0.000023 endfor
3 0.000005 endfor
1 0.000050 exec printf('hi LightLineMiddle_%s guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, m[0], m[1], m[2], m[3], n)
4 0.000017 for i in range(x)
3 0.000055 let [ri, rj] = [i < len(r) ? r[i] : m, i + 1 < len(r) ? r[i + 1] : m]
3 0.000088 0.000046 let p = s:term(ri)
3 0.000190 exec printf('hi LightLineRight_%s_%d_%d guifg=%s guibg=%s ctermfg=%d ctermbg=%d', mode, i, i+1, i>=len(r) ? m[i+1==x] : ri[1], i==x-1 ? m[1] : rj[1], i>=len(r) ? m[2+(i+1==x)] : ri[3], i==x-1 ? m[3] : rj[3])
3 0.000148 exec printf('hi LightLineRight_%s_%d guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, i, ri[0], ri[1], ri[2], ri[3], p)
12 0.000040 for j in h
9 0.000240 let s = has_key(c,d) && has_key(c[d],j) ? c[d][j][0] : has_key(c,'tabline') && has_key(c.tabline,j) ? c.tabline[j][0] : has_key(c.normal,j) ? c.normal[j][0] : l[0]
9 0.000473 exec printf('hi LightLineRight_%s_%d_%s guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, i, j, ri[1], s[1], ri[3], s[3], p)
9 0.000460 exec printf('hi LightLineRight_%s_%s_%d guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, j, i, s[1], ri[1], s[3], ri[3], p)
9 0.000023 endfor
3 0.000006 endfor
4 0.000011 for j in h
3 0.000080 let s = has_key(c,d) && has_key(c[d],j) ? c[d][j][0] : has_key(c,'tabline') && has_key(c.tabline,j) ? c.tabline[j][0] : has_key(c.normal,j) ? c.normal[j][0] : l[0]
3 0.000075 0.000033 let p = s:term(s)
3 0.000155 exec printf('hi LightLineLeft_%s_%s guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, j, s[0], s[1], s[2], s[3], p)
3 0.000151 exec printf('hi LightLineRight_%s_%s guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, j, s[0], s[1], s[2], s[3], p)
3 0.000153 exec printf('hi LightLineLeft_%s_%s_%d guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, j, w, s[1], m[1], s[3], m[3], p)
3 0.000155 exec printf('hi LightLineLeft_%s_%d_%s guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, w, j, m[1], s[1], m[3], s[3], n)
3 0.000152 exec printf('hi LightLineRight_%s_%s_%d guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, j, x, s[1], m[1], s[3], m[3], p)
3 0.000165 exec printf('hi LightLineRight_%s_%d_%s guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, x, j, m[1], s[1], m[3], s[3], n)
12 0.000041 for k in h
9 0.000240 let t = has_key(c,d) && has_key(c[d],k) ? c[d][k][0] : has_key(c,'tabline') && has_key(c.tabline,k) ? c.tabline[k][0] : has_key(c.normal,k) ? c.normal[k][0] : l[0]
9 0.000235 0.000113 let q = s:term(t)
9 0.000428 exec printf('hi LightLineLeft_%s_%s_%s guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, j, k, s[1], t[1], s[3], t[3], p)
9 0.000376 exec printf('hi LightLineLeft_%s_%s_%s guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, k, j, t[1], s[1], t[3], s[3], q)
9 0.000408 exec printf('hi LightLineRight_%s_%s_%s guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, j, k, s[1], t[1], s[3], t[3], p)
9 0.000364 exec printf('hi LightLineRight_%s_%s_%s guifg=%s guibg=%s ctermfg=%d ctermbg=%d %s', mode, k, j, t[1], s[1], t[3], s[3], q)
9 0.000020 endfor
3 0.000006 endfor
1 0.000004 endfor
FUNCTION <SNR>101__scripts()
Called 8 times
Total time: 0.017160
Self time: 0.008475
count total (s) self (s)
8 0.000052 let scripts = {}
26 0.012228 0.006105 for line in filter(split(s:_redir('scriptnames'), "\n"), 'stridx(v:val, s:self_version) > 0')
18 0.001077 let list = matchlist(line, '^\s*\(\d\+\):\s\+\(.\+\)\s*$')
18 0.000118 if !empty(list)
18 0.003156 0.000594 let scripts[s:_unify_path(list[2])] = list[1] - 0
18 0.000062 endif
18 0.000197 endfor
8 0.000034 return scripts
FUNCTION <SNR>111_save_foldinfo()
Called 23 times
Total time: 0.002817
Self time: 0.002817
count total (s) self (s)
" Save foldinfo.
23 0.000544 let winnrs = filter(range(1, winnr('$')), "winbufnr(v:val) == bufnr('%')")
" Note: for foldmethod=expr or syntax.
23 0.000710 call filter(winnrs, " (getwinvar(v:val, '&foldmethod') ==# 'expr' || getwinvar(v:val, '&foldmethod') ==# 'syntax') && getwinvar(v:val, '&modifiable')")
23 0.000128 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>77_should_create_cache()
Called 165 times
Total time: 0.021137
Self time: 0.021137
count total (s) self (s)
165 0.013415 let filepath = fnamemodify(bufname(a:bufnr), ':p')
165 0.007014 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#filters#converter_case#define()
Called 1 time
Total time: 0.000008
Self time: 0.000008
count total (s) self (s)
1 0.000006 return s:converter
FUNCTION neocomplete#util#convert2list()
Called 311 times
Total time: 0.005603
Self time: 0.005603
count total (s) self (s)
311 0.005120 return type(a:expr) ==# type([]) ? a:expr : [a:expr]
FUNCTION vimproc#get_command_name()
Called 2 times
Total time: 0.016873
Self time: 0.000858
count total (s) self (s)
2 0.000025 let path = get(a:000, 0, $PATH)
2 0.000014 let cnt = a:0 < 2 ? 1 : a:2
2 0.016771 0.000756 let files = split(substitute(vimproc#util#substitute_path_separator( vimproc#filepath#which(a:command, path, cnt)), '//', '/', 'g'), '\n')
2 0.000009 if cnt < 0
1 0.000004 return files
endif
1 0.000011 let file = get(files, cnt-1, '')
1 0.000005 if file == ''
throw printf( 'vimproc#get_command_name: File "%s" is not found.', a:command)
endif
1 0.000004 return file
FUNCTION neocomplete#handler#_on_moved_i()
Called 88 times
Total time: 0.011044
Self time: 0.005110
count total (s) self (s)
88 0.003408 0.001224 let neocomplete = neocomplete#get_current_neocomplete()
88 0.000745 if neocomplete.linenr != line('.')
2 0.001251 0.000025 call neocomplete#helper#clear_result()
2 0.000004 endif
88 0.000646 let neocomplete.linenr = line('.')
88 0.003875 0.001351 call s:close_preview_window()
FUNCTION <SNR>95_check_in_do_auto_complete()
Called 93 times
Total time: 0.016236
Self time: 0.005408
count total (s) self (s)
93 0.011808 0.000980 if neocomplete#is_locked()
2 0.000008 return 1
endif
" Detect completefunc.
91 0.000540 if &l:completefunc != '' && &l:buftype =~ 'nofile'
return 1
endif
" Detect AutoComplPop.
91 0.000712 if exists('g:acp_enableAtStartup') && g:acp_enableAtStartup
call neocomplete#print_error( 'Detected enabled AutoComplPop! Disabled neocomplete.')
NeoCompleteLock
return 1
endif
FUNCTION neocomplete#helper#clear_result()
Called 5 times
Total time: 0.005056
Self time: 0.001731
count total (s) self (s)
5 0.000286 0.000106 let neocomplete = neocomplete#get_current_neocomplete()
5 0.000043 let neocomplete.complete_str = ''
5 0.000048 let neocomplete.candidates = []
5 0.000035 let neocomplete.complete_sources = []
5 0.000029 let neocomplete.complete_pos = -1
" Restore completeopt.
5 0.000058 if neocomplete.completeopt !=# &completeopt
" Restore completeopt.
let &completeopt = neocomplete.completeopt
endif
" Clear context.
45 0.000419 0.000300 for source in values(neocomplete#variables#get_sources())
40 0.003736 0.000710 let source.neocomplete__context = neocomplete#init#_context( source.neocomplete__context)
40 0.000179 endfor
FUNCTION <SNR>97_initialize_script_variables()
Called 1 time
Total time: 0.022776
Self time: 0.001459
count total (s) self (s)
" Set runtime dir.
1 0.000950 0.000244 let runtime_dir = neosnippet#variables#runtime_dir()
1 0.000636 let runtime_dir += split(globpath(&runtimepath, 'neosnippets'), '\n')
1 0.000012 if empty(runtime_dir) && empty(g:neosnippet#disable_runtime_snippets)
call neosnippet#util#print_error( 'neosnippet default snippets cannot be loaded.')
call neosnippet#util#print_error( 'You must install neosnippet-snippets or disable runtime snippets.')
endif
1 0.009912 0.000220 if g:neosnippet#enable_snipmate_compatibility
" Load snipMate snippet directories.
let runtime_dir += split(globpath(&runtimepath, 'snippets'), '\n')
if exists('g:snippets_dir')
let runtime_dir += neosnippet#util#option2list(g:snippets_dir)
endif
endif
1 0.000045 call map(runtime_dir, 'substitute(v:val, "[\\\\/]$", "", "")')
" Set snippets_dir.
1 0.000068 0.000040 let snippets_dir = neosnippet#variables#snippets_dir()
2 0.000082 0.000042 for dir in neosnippet#util#option2list(g:neosnippet#snippets_directory)
1 0.010885 0.000034 let dir = neosnippet#util#expand(dir)
1 0.000024 if !isdirectory(dir) && !neosnippet#util#is_sudo()
call mkdir(dir, 'p')
endif
1 0.000009 call add(snippets_dir, dir)
1 0.000012 endfor
1 0.000041 call map(snippets_dir, 'substitute(v:val, "[\\\\/]$", "", "")')
FUNCTION <SNR>113_get_variable_type()
Called 3 times
Total time: 0.000508
Self time: 0.000508
count total (s) self (s)
" Analyze variable type.
3 0.000067 if a:expression =~ '^\%(\s*+\)\?\s*\d\+\.\d\+'
return '.'
elseif a:expression =~ '^\%(\s*+\)\?\s*\d\+'
return '0'
elseif a:expression =~ '^\%(\s*\.\)\?\s*["'']'
2 0.000010 return '""'
elseif a:expression =~ '\<function('
return '()'
elseif a:expression =~ '^\%(\s*+\)\?\s*\['
return '[]'
elseif a:expression =~ '^\s*{\|^\.\h[[:alnum:]_:]*'
return '{}'
elseif a:expression =~ '\<\h\w*('
" Function.
let func_name = matchstr(a:expression, '\<\zs\h\w*\ze(')
return has_key(s:function_return_types, func_name) ? s:function_return_types[func_name] : ''
else
1 0.000003 return ''
endif
FUNCTION <SNR>113_analyze_variable_line()
Called 5 times
Total time: 0.002615
Self time: 0.002107
count total (s) self (s)
5 0.000180 if a:line =~ '\<\%(let\|for\)\s\+\a[[:alnum:]_:]*'
" let var = pattern.
1 0.000036 let word = matchstr(a:line, '\<\%(let\|for\)\s\+\zs\a[[:alnum:]_:]*')
1 0.000034 let expression = matchstr(a:line, '\<let\s\+\a[[:alnum:]_:]*\s*=\s*\zs.*$')
1 0.000009 if !has_key(a:keyword_dict, word)
1 0.000101 0.000033 let a:keyword_dict[word] = { 'word' : word, 'kind' : s:get_variable_type(expression)}
1 0.000006 elseif expression != '' && a:keyword_dict[word].kind == ''
" Update kind.
let a:keyword_dict[word].kind = s:get_variable_type(expression)
endif
1 0.000004 elseif a:line =~ '\<\%(let\|for\)\s\+\[.\{-}\]'
" let [var1, var2] = pattern.
1 0.000054 let words = split(matchstr(a:line,'\<\%(let\|for\)\s\+\[\zs.\{-}\ze\]'), '[,[:space:]]\+')
1 0.000285 let expressions = split(matchstr(a:line,'\<let\s\+\[.\{-}\]\s*=\s*\[\zs.\{-}\ze\]$'), '[,[:space:];]\+')
1 0.000006 let i = 0
3 0.000024 while i < len(words)
2 0.000019 let expression = get(expressions, i, '')
2 0.000017 let word = words[i]
2 0.000120 if !has_key(a:keyword_dict, word)
2 0.000524 0.000084 let a:keyword_dict[word] = { 'word' : word, 'kind' : s:get_variable_type(expression)}
2 0.000012 elseif expression != '' && a:keyword_dict[word].kind == ''
" Update kind.
let a:keyword_dict[word].kind = s:get_variable_type(expression)
endif
2 0.000011 let i += 1
2 0.000027 endwhile
1 0.000003 elseif a:line =~ '\<fu\%[nction]!\?\s\+'
" Get function arguments.
for arg in split(matchstr(a:line, '^[^(]*(\zs[^)]*'), '\s*,\s*')
let word = 'a:' . (arg == '...' ? '000' : arg)
let a:keyword_dict[word] = { 'word' : word, 'kind' : (arg == '...' ? '[]' : '')}
endfor
if a:line =~ '\.\.\.)'
" Extra arguments.
for arg in range(5)
let word = 'a:' . arg
let a:keyword_dict[word] = { 'word' : word, 'kind' : (arg == 0 ? '0' : '')}
endfor
endif
endif
FUNCTION neocomplete#variables#get_frequencies()
Called 68 times
Total time: 0.007011
Self time: 0.004043
count total (s) self (s)
68 0.000636 if !exists('s:filetype_frequencies')
1 0.000006 let s:filetype_frequencies = {}
1 0.000002 endif
68 0.003820 0.000852 let filetype = neocomplete#get_context_filetype()
68 0.000579 if !has_key(s:filetype_frequencies, filetype)
1 0.000008 let s:filetype_frequencies[filetype] = {}
1 0.000002 endif
68 0.000518 let frequencies = s:filetype_frequencies[filetype]
68 0.000236 return frequencies
FUNCTION <SNR>68_escape()
Called 32 times
Total time: 0.000939
Self time: 0.000939
count total (s) self (s)
32 0.000893 return substitute(a:path, ',\|\\,\@=', '\\\0', 'g')
FUNCTION <SNR>70__get_module_path()
Called 5 times
Total time: 0.008884
Self time: 0.001036
count total (s) self (s)
5 0.000162 0.000099 if s:_is_absolute_path(a:name) && filereadable(a:name)
return a:name
endif
5 0.000024 if a:name ==# ''
1 0.000008 let paths = [s:self_file]
1 0.000004 elseif a:name =~# '\v^\u\w*%(\.\u\w*)*$'
4 0.007894 0.000109 let paths = s:_vital_files(a:name)
4 0.000013 else
throw 'vital: Invalid module name: ' . a:name
endif
5 0.000427 call filter(paths, 'filereadable(expand(v:val, 1))')
5 0.000056 let path = get(paths, 0, '')
5 0.000036 return path !=# '' ? path : ''
FUNCTION neocomplete#init#_source()
Called 8 times
Total time: 0.031244
Self time: 0.002642
count total (s) self (s)
8 0.000763 0.000504 let default = { 'is_volatile' : 0, 'max_candidates' : 0, 'filetypes' : {}, 'disabled' : 0, 'disabled_filetypes' : {}, 'hooks' : {}, 'mark' : '', 'matchers' : (g:neocomplete#enable_fuzzy_completion ? ['matcher_fuzzy'] : ['matcher_head']) + ['matcher_length'], 'sorters' : ['sorter_rank'], 'converters' : [ 'converter_remove_overlap', 'converter_delimiter', 'converter_case', 'converter_abbr', ], 'keyword_patterns' : g:neocomplete#keyword_patterns, 'neocomplete__context' : neocomplete#init#_context({}), }
8 0.000193 let source = extend(copy(default), a:source)
" Overwritten by user custom.
8 0.000323 0.000117 let custom = neocomplete#custom#get().sources
8 0.000141 let source = extend(source, get(custom, source.name, get(custom, '_', {})))
8 0.000047 let source.loaded = 0
" Source kind convertion.
8 0.000053 if !has_key(source, 'kind')
let source.kind = 'manual'
elseif source.kind ==# 'plugin'
1 0.000006 let source.kind = 'keyword'
1 0.000006 elseif source.kind ==# 'ftplugin' || source.kind ==# 'complfunc'
" For compatibility.
let source.kind = 'manual'
endif
8 0.000048 if !has_key(source, 'rank')
" Set default rank.
1 0.000012 let source.rank = (source.kind ==# 'keyword') ? 5 : empty(source.filetypes) ? 10 : 100
1 0.000003 endif
8 0.000052 if !has_key(source.keyword_patterns, '_')
" Set default keyword pattern.
let source.keyword_patterns['_'] = get(g:neocomplete#keyword_patterns, '_', '\h\w*')
endif
8 0.000052 if !has_key(source, 'min_pattern_length')
" Set min_pattern_length.
6 0.000068 let source.min_pattern_length = (source.kind ==# 'keyword') ? g:neocomplete#auto_completion_start_length : 0
6 0.000013 endif
8 0.007547 0.000215 let source.neocomplete__matchers = neocomplete#init#_filters( neocomplete#util#convert2list(source.matchers))
8 0.006799 0.000212 let source.neocomplete__sorters = neocomplete#init#_filters( neocomplete#util#convert2list(source.sorters))
8 0.014425 0.000207 let source.neocomplete__converters = neocomplete#init#_filters( neocomplete#util#convert2list(source.converters))
8 0.000072 let source.neocomplete__context.source_name = source.name
8 0.000028 return source
FUNCTION <SNR>21_GetAutodateStartLine()
Called 1 time
Total time: 0.000058
Self time: 0.000058
count total (s) self (s)
1 0.000007 let retval = 1
1 0.000008 if exists('b:autodate_start_line')
let retval = b:autodate_start_line
elseif exists('g:autodate_start_line')
1 0.000005 let retval = g:autodate_start_line
1 0.000003 endif
1 0.000003 if retval < 0
let retval = retval + line('$') + 1
endif
1 0.000003 if retval <= 0
let retval = 1
endif
1 0.000003 return retval
FUNCTION <SNR>77_make_cache_current_buffer()
Called 162 times
Total time: 5.745899
Self time: 2.685955
count total (s) self (s)
162 0.001499 let srcname = bufnr('%')
" Make cache from current buffer.
162 0.022946 0.002335 if !s:should_create_cache(srcname)
return
endif
162 0.017115 0.001966 if !s:exists_current_source()
call s:initialize_source(srcname)
endif
162 0.001399 let source = s:buffer_sources[srcname]
162 0.001136 let keyword_pattern = source.keyword_pattern
162 0.000832 if keyword_pattern == ''
return
endif
162 0.000680 let words = []
162 0.000477 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
162 3.116499 0.092315 let source.words = neocomplete#util#uniq(source.words + words)
FUNCTION neocomplete#variables#get_filters()
Called 33 times
Total time: 0.000619
Self time: 0.000619
count total (s) self (s)
33 0.000251 if !exists('s:filters')
1 0.000004 let s:filters = {}
1 0.000002 endif
33 0.000107 return s:filters
FUNCTION <SNR>89_get_complete_pos()
Called 105 times
Total time: 0.001350
Self time: 0.001350
count total (s) self (s)
105 0.000772 if empty(a:complete_results)
105 0.000338 return -1
endif
let complete_pos = col('.')
for result in values(a:complete_results)
if complete_pos > result.complete_pos
let complete_pos = result.complete_pos
endif
endfor
return complete_pos
FUNCTION <SNR>95_complete_key()
Called 23 times
Total time: 0.006759
Self time: 0.001200
count total (s) self (s)
23 0.000335 set completeopt-=longest
23 0.006050 0.000491 call neocomplete#helper#complete_configure()
23 0.000285 call feedkeys(a:key)
FUNCTION neocomplete#is_auto_complete()
Called 1197 times
Total time: 0.112498
Self time: 0.081952
count total (s) self (s)
1197 0.104314 0.073768 let neocomplete = neocomplete#get_current_neocomplete()
1197 0.005811 return neocomplete.is_auto_complete
FUNCTION <SNR>118_funcref()
Called 67 times
Total time: 0.002848
Self time: 0.001232
count total (s) self (s)
67 0.002769 0.001153 return function(s:SID_PREFIX().a:funcname)
FUNCTION neocomplete#helper#is_omni()
Called 59 times
Total time: 0.014373
Self time: 0.008864
count total (s) self (s)
" Check eskk complete length.
59 0.001425 0.000706 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 0
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
endif
59 0.006533 0.003672 let filetype = neocomplete#get_context_filetype()
59 0.000347 let omnifunc = &l:omnifunc
59 0.002635 0.000706 if neocomplete#helper#check_invalid_omnifunc(omnifunc)
59 0.000186 return 0
endif
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]
else
return 0
endif
if a:cur_text !~# '\%(' . pattern . '\m\)$'
return 0
endif
return 1
FUNCTION vital#of()
Called 3 times
Total time: 0.018453
Self time: 0.003164
count total (s) self (s)
3 0.002265 let files = globpath(&runtimepath, 'autoload/vital/' . a:name . '.vital')
3 0.000059 let file = split(files, "\n")
3 0.000019 if empty(file)
throw 'vital: version file not found: ' . a:name
endif
3 0.000189 let ver = readfile(file[0], 'b')
3 0.000021 if empty(ver)
throw 'vital: invalid version file: ' . a:name
endif
3 0.015839 0.000550 return vital#_{substitute(ver[0], '\W', '', 'g')}#new()
FUNCTION neosnippet#util#strwidthpart()
Called 8 times
Total time: 0.000963
Self time: 0.000219
count total (s) self (s)
8 0.000954 0.000210 return call(s:get_prelude().strwidthpart, a:000)
FUNCTION vimproc#util#expand()
Called 1 time
Total time: 0.000096
Self time: 0.000082
count total (s) self (s)
1 0.000094 0.000080 return vimproc#util#substitute_path_separator( (a:path =~ '^\~') ? fnamemodify(a:path, ':p') : (a:path =~ '^\$\h\w*') ? substitute(a:path, '^\$\h\w*', '\=eval(submatch(0))', '') : a:path)
FUNCTION cursorword#matchadd()
Called 90 times
Total time: 0.024525
Self time: 0.024525
count total (s) self (s)
90 0.003138 if !get(w:, 'cursorword_enable', get(g:, 'cursorword_enable', 1)) | return | endif
90 0.001172 let line = getline('.')
90 0.000846 let linenr = line('.')
90 0.009379 let word = matchstr(line[:(col('.')-1)], '\k*$')[:-2] . matchstr(line[(col('.')-1):], '^\k*')
90 0.001860 if get(w:, 'cursorword_linenr_word', []) ==# [ linenr, word ] | return | endif
59 0.000630 let w:cursorword_linenr_word = [ linenr, word ]
59 0.000988 silent! call matchdelete(w:cursorword_id1)
59 0.000732 silent! call matchdelete(w:cursorword_id2)
59 0.000843 if !len(word) || len(word) !=# strchars(word) | return | endif
34 0.000423 let pattern = '\<' . escape(word, '~"\.^$[]*') . '\>'
34 0.002236 let w:cursorword_id1 = matchadd('CursorWord', pattern, -1)
34 0.001520 let w:cursorword_id2 = matchadd(&l:cursorline ? 'CursorWordCurrentLine' : 'CursorWord', '\%' . line('.') . 'l' . pattern, -1)
FUNCTION neocomplete#helper#unite_patterns()
Called 29 times
Total time: 0.007807
Self time: 0.007807
count total (s) self (s)
29 0.000183 let keyword_patterns = []
29 0.000416 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
29 0.000383 return join(keyword_patterns, '\m\|')
FUNCTION vimproc#filepath#which()
Called 2 times
Total time: 0.014999
Self time: 0.000066
count total (s) self (s)
2 0.014996 0.000063 return s:which(a:command, a:path, a:maxcount)
FUNCTION <SNR>70__get_functions()
Called 4 times
Total time: 0.005866
Self time: 0.002246
count total (s) self (s)
4 0.003752 0.000132 let funcs = s:_redir(printf("function /\\%%#=2^\<SNR>%d_", a:sid))
4 0.000043 let map_pat = '<SNR>' . a:sid . '_\zs\w\+'
4 0.002059 return map(split(funcs, "\n"), 'matchstr(v:val, map_pat)')
FUNCTION <SNR>113_get_cmdlist()
Called 1 time
Total time: 0.077988
Self time: 0.077988
count total (s) self (s)
" Get command list.
1 0.000009 redir => redir
1 0.001896 silent! command
1 0.000016 redir END
1 0.000007 let keyword_list = []
1 0.000029 let completions = [ 'augroup', 'buffer', 'behave', 'color', 'command', 'compiler', 'cscope', 'dir', 'environment', 'event', 'expression', 'file', 'file_in_path', 'filetype', 'function', 'help', 'highlight', 'history', 'locale', 'mapping', 'menu', 'option', 'shellcmd', 'sign', 'syntax', 'tag', 'tag_listfiles', 'var', 'custom', 'customlist' ]
1 0.000004 let command_prototypes = {}
1 0.000004 let command_completions = {}
84 0.001187 for line in split(redir, '\n')[1:]
83 0.001945 let word = matchstr(line, '\a\w*')
" Analyze prototype.
83 0.001891 let end = matchend(line, '\a\w*')
83 0.003387 let args = matchstr(line, '[[:digit:]?+*]', end)
83 0.000653 if args != '0'
67 0.001764 let prototype = matchstr(line, '\a\w*', end)
67 0.000308 let found = 0
1899 0.006752 for comp in completions
1845 0.016135 if comp == prototype
13 0.000123 let command_completions[word] = prototype
13 0.000085 let found = 1
13 0.000031 break
endif
1832 0.007123 endfor
67 0.000280 if !found
54 0.000243 let prototype = 'arg'
54 0.000108 endif
67 0.000271 if args == '*'
53 0.000418 let prototype = '[' . prototype . '] ...'
53 0.000156 elseif args == '?'
9 0.000062 let prototype = '[' . prototype . ']'
9 0.000024 elseif args == '+'
2 0.000014 let prototype = prototype . ' ...'
2 0.000005 endif
67 0.002094 let command_prototypes[word] = ' ' . repeat(' ', 16 - len(word)) . prototype
67 0.000195 else
16 0.000138 let command_prototypes[word] = ''
16 0.000036 endif
83 0.000581 let prototype = command_prototypes[word]
83 0.001820 call add(keyword_list, { 'word' : word, 'abbr' : word . prototype, 'description' : word . prototype, 'kind' : 'c'})
83 0.000396 endfor
1 0.000010 let s:global_candidates_list.command_prototypes = command_prototypes
1 0.000008 let s:global_candidates_list.command_completions = command_completions
1 0.000004 return keyword_list
FUNCTION vimproc#util#systemencoding()
Called 17 times
Total time: 0.000121
Self time: 0.000121
count total (s) self (s)
17 0.000101 return s:is_windows ? 'utf-8' : 'char'
FUNCTION <SNR>116__encode_name()
Called 9 times
Total time: 0.001853
Self time: 0.000863
count total (s) self (s)
" Check cache directory.
9 0.000143 if !isdirectory(a:cache_dir)
call mkdir(a:cache_dir, 'p')
endif
9 0.000054 let cache_dir = a:cache_dir
9 0.000163 if cache_dir !~ '/$'
9 0.000066 let cache_dir .= '/'
9 0.000021 endif
9 0.001210 0.000220 return cache_dir . s:_create_hash(cache_dir, a:filename)
FUNCTIONS SORTED ON TOTAL TIME
count total (s) self (s) function
162 5.745899 2.685955 <SNR>77_make_cache_current_buffer()
158 5.665150 0.015553 <SNR>95_make_cache_current_line()
596 5.633766 0.040585 neocomplete#handler#_on_insert_char_pre()
161 5.629905 0.008454 neocomplete#sources#buffer#make_cache_current_line()
1433 3.289262 0.034024 neocomplete#util#uniq()
1538 3.232354 0.050899 <SNR>90_uniq()
1538 3.181455 <SNR>90_uniq_by()
93 2.461216 0.035101 neocomplete#handler#_do_auto_complete()
105 1.552858 0.198792 neocomplete#complete#_set_results_pos()
49 1.216399 0.007778 neocomplete#complete#_get_results()
49 0.637314 0.063426 neocomplete#complete#_set_results_words()
1156 0.617846 0.066441 neocomplete#helper#is_enabled_source()
1153 0.574559 0.070205 neocomplete#helper#ftdictionary2list()
1271 0.553930 0.020245 neocomplete#get_source_filetypes()
1271 0.533685 0.205330 neocomplete#helper#get_source_filetypes()
60 0.283148 0.010466 neocomplete#helper#call_hook()
49 0.275950 0.018834 29()
105 0.239174 0.032504 28()
23 0.228470 0.110663 neocomplete#mappings#auto_complete()
1 0.227328 0.000639 2()
FUNCTIONS SORTED ON SELF TIME
count total (s) self (s) function
1538 3.181455 <SNR>90_uniq_by()
162 5.745899 2.685955 <SNR>77_make_cache_current_buffer()
1271 0.533685 0.205330 neocomplete#helper#get_source_filetypes()
105 1.552858 0.198792 neocomplete#complete#_set_results_pos()
5581 0.139080 neocomplete#get_current_neocomplete()
660 0.119480 0.111695 neocomplete#helper#match_word()
23 0.228470 0.110663 neocomplete#mappings#auto_complete()
1 0.088781 <SNR>113_make_cache_completion_from_dict()
1197 0.112498 0.081952 neocomplete#is_auto_complete()
1 0.077988 <SNR>113_get_cmdlist()
318 0.084335 0.073154 neocomplete#helper#get_cur_text()
1153 0.574559 0.070205 neocomplete#helper#ftdictionary2list()
100 0.080358 0.069068 6()
88 0.161168 0.067785 neocomplete#handler#_on_text_changed()
1156 0.617846 0.066441 neocomplete#helper#is_enabled_source()
1 0.065487 <SNR>113_make_cache_commands()
49 0.637314 0.063426 neocomplete#complete#_set_results_words()
49 0.055309 neocomplete#helper#get_syn_name()
655 0.088377 0.054124 neocomplete#get_keyword_pattern()
778 0.087234 0.052208 neocomplete#is_cache_disabled()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment