Created
October 10, 2018 13:40
-
-
Save languitar/eecdacb3a81dd23fea6e37bc0e3b0b10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SCRIPT /usr/share/nvim/runtime/scripts.vim | |
Sourced 5 times | |
Total time: 0.001939 | |
Self time: 0.001939 | |
count total (s) self (s) | |
" Vim support file to detect file types in scripts | |
" | |
" Maintainer: Bram Moolenaar <[email protected]> | |
" Last change: 2017 Nov 11 | |
" This file is called by an autocommand for every file that has just been | |
" loaded into a buffer. It checks if the type of file can be recognized by | |
" the file contents. The autocommand is in $VIMRUNTIME/filetype.vim. | |
" | |
" Note that the pattern matches are done with =~# to avoid the value of the | |
" 'ignorecase' option making a difference. Where case is to be ignored use | |
" =~? instead. Do not use =~ anywhere. | |
" Only do the rest when the FileType autocommand has not been triggered yet. | |
5 0.000015 if did_filetype() | |
finish | |
endif | |
" Load the user defined scripts file first | |
" Only do this when the FileType autocommand has not been triggered yet | |
5 0.000017 if exists("myscriptsfile") && filereadable(expand(myscriptsfile)) | |
execute "source " . myscriptsfile | |
if did_filetype() | |
finish | |
endif | |
endif | |
" Line continuation is used here, remove 'C' from 'cpoptions' | |
5 0.000031 let s:cpo_save = &cpo | |
5 0.000028 set cpo&vim | |
5 0.000017 let s:line1 = getline(1) | |
5 0.000017 if s:line1 =~# "^#!" | |
" A script that starts with "#!". | |
" Check for a line like "#!/usr/bin/env VAR=val bash". Turn it into | |
" "#!/usr/bin/bash" to make matching easier. | |
if s:line1 =~# '^#!\s*\S*\<env\s' | |
let s:line1 = substitute(s:line1, '\S\+=\S\+', '', 'g') | |
let s:line1 = substitute(s:line1, '\<env\s\+', '', '') | |
endif | |
" Get the program name. | |
" Only accept spaces in PC style paths: "#!c:/program files/perl [args]". | |
" If the word env is used, use the first word after the space: | |
" "#!/usr/bin/env perl [path/args]" | |
" If there is no path use the first word: "#!perl [path/args]". | |
" Otherwise get the last word after a slash: "#!/usr/bin/perl [path/args]". | |
if s:line1 =~# '^#!\s*\a:[/\\]' | |
let s:name = substitute(s:line1, '^#!.*[/\\]\(\i\+\).*', '\1', '') | |
elseif s:line1 =~# '^#!.*\<env\>' | |
let s:name = substitute(s:line1, '^#!.*\<env\>\s\+\(\i\+\).*', '\1', '') | |
elseif s:line1 =~# '^#!\s*[^/\\ ]*\>\([^/\\]\|$\)' | |
let s:name = substitute(s:line1, '^#!\s*\([^/\\ ]*\>\).*', '\1', '') | |
else | |
let s:name = substitute(s:line1, '^#!\s*\S*[/\\]\(\i\+\).*', '\1', '') | |
endif | |
" tcl scripts may have #!/bin/sh in the first line and "exec wish" in the | |
" third line. Suggested by Steven Atkinson. | |
if getline(3) =~# '^exec wish' | |
let s:name = 'wish' | |
endif | |
" Bourne-like shell scripts: bash bash2 ksh ksh93 sh | |
if s:name =~# '^\(bash\d*\|\|ksh\d*\|sh\)\>' | |
call dist#ft#SetFileTypeSH(s:line1) " defined in filetype.vim | |
" csh scripts | |
elseif s:name =~# '^csh\>' | |
if exists("g:filetype_csh") | |
call dist#ft#SetFileTypeShell(g:filetype_csh) | |
else | |
call dist#ft#SetFileTypeShell("csh") | |
endif | |
" tcsh scripts | |
elseif s:name =~# '^tcsh\>' | |
call dist#ft#SetFileTypeShell("tcsh") | |
" Z shell scripts | |
elseif s:name =~# '^zsh\>' | |
set ft=zsh | |
" TCL scripts | |
elseif s:name =~# '^\(tclsh\|wish\|expectk\|itclsh\|itkwish\)\>' | |
set ft=tcl | |
" Expect scripts | |
elseif s:name =~# '^expect\>' | |
set ft=expect | |
" Gnuplot scripts | |
elseif s:name =~# '^gnuplot\>' | |
set ft=gnuplot | |
" Makefiles | |
elseif s:name =~# 'make\>' | |
set ft=make | |
" Lua | |
elseif s:name =~# 'lua' | |
set ft=lua | |
" Perl 6 | |
elseif s:name =~# 'perl6' | |
set ft=perl6 | |
" Perl | |
elseif s:name =~# 'perl' | |
set ft=perl | |
" PHP | |
elseif s:name =~# 'php' | |
set ft=php | |
" Python | |
elseif s:name =~# 'python' | |
set ft=python | |
" Groovy | |
elseif s:name =~# '^groovy\>' | |
set ft=groovy | |
" Ruby | |
elseif s:name =~# 'ruby' | |
set ft=ruby | |
" JavaScript | |
elseif s:name =~# 'node\(js\)\=\>' || s:name =~# 'rhino\>' | |
set ft=javascript | |
" BC calculator | |
elseif s:name =~# '^bc\>' | |
set ft=bc | |
" sed | |
elseif s:name =~# 'sed\>' | |
set ft=sed | |
" OCaml-scripts | |
elseif s:name =~# 'ocaml' | |
set ft=ocaml | |
" Awk scripts | |
elseif s:name =~# 'awk\>' | |
set ft=awk | |
" Website MetaLanguage | |
elseif s:name =~# 'wml' | |
set ft=wml | |
" Scheme scripts | |
elseif s:name =~# 'scheme' | |
set ft=scheme | |
" CFEngine scripts | |
elseif s:name =~# 'cfengine' | |
set ft=cfengine | |
" Erlang scripts | |
elseif s:name =~# 'escript' | |
set ft=erlang | |
" Haskell | |
elseif s:name =~# 'haskell' | |
set ft=haskell | |
" Scala | |
elseif s:name =~# 'scala\>' | |
set ft=scala | |
endif | |
unlet s:name | |
else | |
" File does not start with "#!". | |
5 0.000012 let s:line2 = getline(2) | |
5 0.000006 let s:line3 = getline(3) | |
5 0.000006 let s:line4 = getline(4) | |
5 0.000006 let s:line5 = getline(5) | |
" Bourne-like shell scripts: sh ksh bash bash2 | |
5 0.000011 if s:line1 =~# '^:$' | |
call dist#ft#SetFileTypeSH(s:line1) " defined in filetype.vim | |
" Z shell scripts | |
elseif s:line1 =~# '^#compdef\>' || s:line1 =~# '^#autoload\>' || | |
\ "\n".s:line1."\n".s:line2."\n".s:line3."\n".s:line4."\n".s:line5 =~# '\n\s*emulate\s\+\%(-[LR]\s\+\)\=[ckz]\=sh\>' | |
set ft=zsh | |
" ELM Mail files | |
elseif s:line1 =~# '^From \([a-zA-Z][a-zA-Z_0-9\.=-]*\(@[^ ]*\)\=\|-\) .* \(19\|20\)\d\d$' | |
set ft=mail | |
" Mason | |
elseif s:line1 =~# '^<[%&].*>' | |
set ft=mason | |
" Vim scripts (must have '" vim' as the first line to trigger this) | |
elseif s:line1 =~# '^" *[vV]im$' | |
set ft=vim | |
" MOO | |
elseif s:line1 =~# '^\*\* LambdaMOO Database, Format Version \%([1-3]\>\)\@!\d\+ \*\*$' | |
set ft=moo | |
" Diff file: | |
" - "diff" in first line (context diff) | |
" - "Only in " in first line | |
" - "--- " in first line and "+++ " in second line (unified diff). | |
" - "*** " in first line and "--- " in second line (context diff). | |
" - "# It was generated by makepatch " in the second line (makepatch diff). | |
" - "Index: <filename>" in the first line (CVS file) | |
" - "=== ", line of "=", "---", "+++ " (SVK diff) | |
" - "=== ", "--- ", "+++ " (bzr diff, common case) | |
" - "=== (removed|added|renamed|modified)" (bzr diff, alternative) | |
" - "# HG changeset patch" in first line (Mercurial export format) | |
elseif s:line1 =~# '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\|# HG changeset patch\)' | |
\ || (s:line1 =~# '^--- ' && s:line2 =~# '^+++ ') | |
\ || (s:line1 =~# '^\* looking for ' && s:line2 =~# '^\* comparing to ') | |
\ || (s:line1 =~# '^\*\*\* ' && s:line2 =~# '^--- ') | |
\ || (s:line1 =~# '^=== ' && ((s:line2 =~# '^=\{66\}' && s:line3 =~# '^--- ' && s:line4 =~# '^+++') || (s:line2 =~# '^--- ' && s:line3 =~# '^+++ '))) | |
\ || (s:line1 =~# '^=== \(removed\|added\|renamed\|modified\)') | |
set ft=diff | |
" PostScript Files (must have %!PS as the first line, like a2ps output) | |
elseif s:line1 =~# '^%![ \t]*PS' | |
set ft=postscr | |
" M4 scripts: Guess there is a line that starts with "dnl". | |
elseif s:line1 =~# '^\s*dnl\>' | |
\ || s:line2 =~# '^\s*dnl\>' | |
\ || s:line3 =~# '^\s*dnl\>' | |
\ || s:line4 =~# '^\s*dnl\>' | |
\ || s:line5 =~# '^\s*dnl\>' | |
set ft=m4 | |
" AmigaDos scripts | |
elseif $TERM == "amiga" | |
\ && (s:line1 =~# "^;" || s:line1 =~? '^\.bra') | |
set ft=amiga | |
" SiCAD scripts (must have procn or procd as the first line to trigger this) | |
elseif s:line1 =~? '^ *proc[nd] *$' | |
set ft=sicad | |
" Purify log files start with "**** Purify" | |
elseif s:line1 =~# '^\*\*\*\* Purify' | |
set ft=purifylog | |
" XML | |
elseif s:line1 =~# '<?\s*xml.*?>' | |
set ft=xml | |
" XHTML (e.g.: PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN") | |
elseif s:line1 =~# '\<DTD\s\+XHTML\s' | |
set ft=xhtml | |
" HTML (e.g.: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN") | |
" Avoid "doctype html", used by slim. | |
elseif s:line1 =~? '<!DOCTYPE\s\+html\>' | |
set ft=html | |
elseif s:line1 =~# '^%PDF-' | |
set ft=pdf | |
" XXD output | |
elseif s:line1 =~# '^\x\{7}: \x\{2} \=\x\{2} \=\x\{2} \=\x\{2} ' | |
set ft=xxd | |
" RCS/CVS log output | |
elseif s:line1 =~# '^RCS file:' || s:line2 =~# '^RCS file:' | |
set ft=rcslog | |
" CVS commit | |
elseif s:line2 =~# '^CVS:' || getline("$") =~# '^CVS: ' | |
set ft=cvs | |
" Prescribe | |
elseif s:line1 =~# '^!R!' | |
set ft=prescribe | |
" Send-pr | |
elseif s:line1 =~# '^SEND-PR:' | |
set ft=sendpr | |
" SNNS files | |
elseif s:line1 =~# '^SNNS network definition file' | |
set ft=snnsnet | |
elseif s:line1 =~# '^SNNS pattern definition file' | |
set ft=snnspat | |
elseif s:line1 =~# '^SNNS result file' | |
set ft=snnsres | |
" Virata | |
elseif s:line1 =~# '^%.\{-}[Vv]irata' | |
\ || s:line2 =~# '^%.\{-}[Vv]irata' | |
\ || s:line3 =~# '^%.\{-}[Vv]irata' | |
\ || s:line4 =~# '^%.\{-}[Vv]irata' | |
\ || s:line5 =~# '^%.\{-}[Vv]irata' | |
set ft=virata | |
" Strace | |
elseif s:line1 =~# '[0-9:.]* *execve(' || s:line1 =~# '^__libc_start_main' | |
set ft=strace | |
" VSE JCL | |
elseif s:line1 =~# '^\* $$ JOB\>' || s:line1 =~# '^// *JOB\>' | |
set ft=vsejcl | |
" TAK and SINDA | |
elseif s:line4 =~# 'K & K Associates' || s:line2 =~# 'TAK 2000' | |
set ft=takout | |
elseif s:line3 =~# 'S Y S T E M S I M P R O V E D ' | |
set ft=sindaout | |
elseif getline(6) =~# 'Run Date: ' | |
set ft=takcmp | |
elseif getline(9) =~# 'Node File 1' | |
set ft=sindacmp | |
" DNS zone files | |
elseif s:line1.s:line2.s:line3.s:line4 =~# '^; <<>> DiG [0-9.]\+.* <<>>\|$ORIGIN\|$TTL\|IN\s\+SOA' | |
set ft=bindzone | |
" BAAN | |
elseif s:line1 =~# '|\*\{1,80}' && s:line2 =~# 'VRC ' | |
\ || s:line2 =~# '|\*\{1,80}' && s:line3 =~# 'VRC ' | |
set ft=baan | |
" Valgrind | |
elseif s:line1 =~# '^==\d\+== valgrind' || s:line3 =~# '^==\d\+== Using valgrind' | |
set ft=valgrind | |
" Go docs | |
elseif s:line1 =~# '^PACKAGE DOCUMENTATION$' | |
set ft=godoc | |
" Renderman Interface Bytestream | |
elseif s:line1 =~# '^##RenderMan' | |
set ft=rib | |
" Scheme scripts | |
elseif s:line1 =~# 'exec\s\+\S*scheme' || s:line2 =~# 'exec\s\+\S*scheme' | |
set ft=scheme | |
" Git output | |
elseif s:line1 =~# '^\(commit\|tree\|object\) \x\{40\}\>\|^tag \S\+$' | |
set ft=git | |
" Gprof (gnu profiler) | |
elseif s:line1 == 'Flat profile:' | |
\ && s:line2 == '' | |
\ && s:line3 =~# '^Each sample counts as .* seconds.$' | |
set ft=gprof | |
" Erlang terms | |
" (See also: http://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html#Choosing-Modes) | |
elseif s:line1 =~? '-\*-.*erlang.*-\*-' | |
set ft=erlang | |
" CVS diff | |
else | |
5 0.000011 let s:lnum = 1 | |
5 0.000018 while getline(s:lnum) =~# "^? " && s:lnum < line("$") | |
let s:lnum += 1 | |
endwhile | |
5 0.000014 if getline(s:lnum) =~# '^Index:\s\+\f\+$' | |
set ft=diff | |
" locale input files: Formal Definitions of Cultural Conventions | |
" filename must be like en_US, fr_FR@euro or en_US.UTF-8 | |
elseif expand("%") =~# '\a\a_\a\a\($\|[.@]\)\|i18n$\|POSIX$\|translit_' | |
let s:lnum = 1 | |
while s:lnum < 100 && s:lnum < line("$") | |
if getline(s:lnum) =~# '^LC_\(IDENTIFICATION\|CTYPE\|COLLATE\|MONETARY\|NUMERIC\|TIME\|MESSAGES\|PAPER\|TELEPHONE\|MEASUREMENT\|NAME\|ADDRESS\)$' | |
setf fdcc | |
break | |
endif | |
let s:lnum += 1 | |
endwhile | |
endif | |
5 0.000009 unlet s:lnum | |
5 0.000003 endif | |
5 0.000007 unlet s:line2 s:line3 s:line4 s:line5 | |
5 0.000003 endif | |
" Restore 'cpoptions' | |
5 0.000028 let &cpo = s:cpo_save | |
5 0.000010 unlet s:cpo_save s:line1 | |
FUNCTION <SNR>32_airline_refresh() | |
Called 9 times | |
Total time: 4.072048 | |
Self time: 0.001118 | |
count total (s) self (s) | |
9 0.000336 if !exists("#airline") | |
" disabled | |
return | |
endif | |
9 0.005525 0.000177 call airline#util#doautocmd('AirlineBeforeRefresh') | |
9 0.051338 0.000194 call airline#highlighter#reset_hlcache() | |
9 3.840800 0.000225 call airline#load_theme() | |
9 0.173898 0.000035 call airline#update_statusline() | |
FUNCTION FugitiveExtractGitDir() | |
Called 5 times | |
Total time: 0.000550 | |
Self time: 0.000391 | |
count total (s) self (s) | |
5 0.000041 0.000018 let path = s:Slash(a:path) | |
5 0.000015 if path =~# '^fugitive:' | |
return matchstr(path, '\C^fugitive:\%(//\)\=\zs.\{-\}\ze\%(//\|::\|$\)') | |
elseif isdirectory(path) | |
let path = fnamemodify(path, ':p:s?/$??') | |
else | |
5 0.000030 let path = fnamemodify(path, ':p:h:s?/$??') | |
5 0.000003 endif | |
5 0.000029 let pre = substitute(matchstr(path, '^\a\a\+\ze:'), '^.', '\u&', '') | |
5 0.000010 if len(pre) && exists('*' . pre . 'Real') | |
let path = s:Slash({pre}Real(path)) | |
endif | |
5 0.000034 let root = resolve(path) | |
5 0.000005 if root !=# path | |
silent! exe haslocaldir() ? 'lcd .' : 'cd .' | |
endif | |
5 0.000005 let previous = "" | |
5 0.000007 while root !=# previous | |
5 0.000019 if root =~# '\v^//%([^/]+/?)?$' | |
break | |
endif | |
5 0.000019 if index(split($GIT_CEILING_DIRECTORIES, ':'), root) >= 0 | |
break | |
endif | |
5 0.000009 if root ==# $GIT_WORK_TREE && FugitiveIsGitDir($GIT_DIR) | |
return simplify(fnamemodify($GIT_DIR, ':p:s?[\/]$??')) | |
endif | |
5 0.000070 0.000019 if FugitiveIsGitDir($GIT_DIR) | |
call FugitiveWorkTree(simplify(fnamemodify($GIT_DIR, ':p:s?[\/]$??'))) | |
if has_key(s:dir_for_worktree, root) | |
return s:dir_for_worktree[root] | |
endif | |
endif | |
5 0.000027 let dir = substitute(root, '[\/]$', '', '') . '/.git' | |
5 0.000017 let type = getftype(dir) | |
5 0.000100 0.000015 if type ==# 'dir' && FugitiveIsGitDir(dir) | |
5 0.000004 return dir | |
elseif type ==# 'link' && FugitiveIsGitDir(dir) | |
return resolve(dir) | |
elseif type !=# '' && filereadable(dir) | |
let line = get(readfile(dir, '', 1), 0, '') | |
if line =~# '^gitdir: \.' && FugitiveIsGitDir(root.'/'.line[8:-1]) | |
return simplify(root.'/'.line[8:-1]) | |
elseif line =~# '^gitdir: ' && FugitiveIsGitDir(line[8:-1]) | |
return line[8:-1] | |
endif | |
elseif FugitiveIsGitDir(root) | |
return root | |
endif | |
let previous = root | |
let root = fnamemodify(root, ':h') | |
endwhile | |
return '' | |
FUNCTION <SNR>174_are_lines_prev_blank() | |
Called 48 times | |
Total time: 0.000690 | |
Self time: 0.000690 | |
count total (s) self (s) | |
48 0.000074 let lnum_prev = a:lnum - 1 | |
120 0.000103 while lnum_prev != 0 | |
117 0.000275 if !a:cache[lnum_prev]['is_blank'] && !a:cache[lnum_prev]['is_comment'] | |
45 0.000027 return 0 | |
endif | |
72 0.000063 let lnum_prev -= 1 | |
72 0.000027 endwhile | |
3 0.000002 return 1 | |
FUNCTION airline#extensions#quickfix#inactive_qf_window() | |
Called 121 times | |
Total time: 0.001411 | |
Self time: 0.001411 | |
count total (s) self (s) | |
121 0.000926 if getbufvar(a:2.bufnr, '&filetype') is# 'qf' && !empty(airline#util#getwinvar(a:2.winnr, 'quickfix_title', '')) | |
call setwinvar(a:2.winnr, 'airline_section_c', '[%{get(w:, "quickfix_title", "")}] %f %m') | |
endif | |
FUNCTION ncm2#_do_auto_trigger() | |
Called 9 times | |
Total time: 0.001085 | |
Self time: 0.000551 | |
count total (s) self (s) | |
9 0.000215 0.000090 let tick = s:context_tick() | |
9 0.000030 if tick == s:auto_trigger_tick | |
1 0.000001 return '' | |
endif | |
8 0.000042 let s:auto_trigger_tick = tick | |
" refresh the popup menu to reduce popup flickering | |
8 0.000327 0.000095 call s:feedkeys("\<Plug>(ncm2_complete_popup)") | |
8 0.000024 if g:ncm2#complete_delay == 0 | |
8 0.000247 0.000070 call s:feedkeys("\<Plug>(_ncm2_auto_trigger)") | |
8 0.000009 else | |
if s:complete_timer | |
call timer_stop(s:complete_timer) | |
endif | |
let s:complete_timer = timer_start( g:ncm2#complete_delay, {_ -> s:complete_timer_handler() }) | |
endif | |
8 0.000012 return '' | |
FUNCTION airline#extensions#languageclient#get_warning() | |
Called 1563 times | |
Total time: 0.171219 | |
Self time: 0.008986 | |
count total (s) self (s) | |
1563 0.170391 0.008158 return airline#extensions#languageclient#get(s:severity_warning) | |
FUNCTION signature#utils#IsValidMarker() | |
Called 2136 times | |
Total time: 0.006521 | |
Self time: 0.006521 | |
count total (s) self (s) | |
2136 0.005962 return ( (b:SignatureIncludeMarkers =~# a:marker) && (a:marker != ' ') ) | |
FUNCTION ncm2#_update_matches() | |
Called 21 times | |
Total time: 0.000813 | |
Self time: 0.000813 | |
count total (s) self (s) | |
21 0.000083 if g:ncm2#popup_delay | |
21 0.000394 let s:popup_timer_args = [a:ctx, a:startbcol, a:matches] | |
21 0.000035 if s:popup_timer | |
13 0.000026 if s:popup_timer_tick == a:ctx.tick | |
7 0.000006 return | |
endif | |
6 0.000012 let s:popup_timer_tick = a:ctx.tick | |
6 0.000034 call timer_stop(s:popup_timer) | |
6 0.000003 endif | |
14 0.000087 let s:popup_timer = timer_start(g:ncm2#popup_delay, funcref('s:popup_timed')) | |
14 0.000007 else | |
call ncm2#_real_update_matches(a:ctx, a:startbcol, a:matches) | |
endif | |
FUNCTION airline#extensions#denite#apply() | |
Called 72 times | |
Total time: 0.001208 | |
Self time: 0.001076 | |
count total (s) self (s) | |
72 0.000299 if &ft == 'denite' | |
10 0.000015 let w:airline_skip_empty_sections = 0 | |
10 0.000076 0.000047 call a:1.add_section('airline_a', ' Denite %{airline#extensions#denite#check_denite_mode('.a:2['bufnr'].')}') | |
10 0.000041 0.000023 call a:1.add_section('airline_c', ' %{denite#get_status_sources()}') | |
10 0.000052 0.000016 call a:1.split() | |
10 0.000035 0.000019 call a:1.add_section('airline_y', ' %{denite#get_status_path()} ') | |
10 0.000054 0.000020 call a:1.add_section('airline_z', ' %{denite#get_status_linenr()} ') | |
10 0.000006 return 1 | |
endif | |
FUNCTION yarp#core#jobstart() | |
Called 175 times | |
Total time: 0.001797 | |
Self time: 0.001797 | |
count total (s) self (s) | |
175 0.000327 if ! has_key(self, 'cmd') | |
call self.init() | |
if ! has_key(self, 'cmd') | |
call self.error("cmd of the job is not set") | |
return | |
endif | |
endif | |
175 0.000242 if has_key(self, 'job') | |
175 0.000107 return | |
endif | |
let opts = {'on_stderr': function('yarp#core#on_stderr'), 'on_exit': function('yarp#core#on_exit'), 'detach': self.job_detach, 'self': self} | |
try | |
let self.job = call(s:jobstart, [self.cmd, opts]) | |
if self.job == -1 | |
call self.error('Failed starting job: ' . string(self.cmd)) | |
endif | |
catch | |
let self.job = -1 | |
call self.error(['Failed starting job: ' . string(self.cmd), v:exception]) | |
endtry | |
FUNCTION ale#linter#Get() | |
Called 30 times | |
Total time: 0.011795 | |
Self time: 0.007714 | |
count total (s) self (s) | |
30 0.000079 let l:possibly_duplicated_linters = [] | |
" Handle dot-separated filetypes. | |
60 0.000281 for l:original_filetype in split(a:original_filetypes, '\.') | |
30 0.001907 0.000196 let l:filetype = ale#linter#ResolveFiletype(l:original_filetype) | |
30 0.000978 0.000169 let l:linter_names = s:GetLinterNames(l:original_filetype) | |
30 0.001717 0.000156 let l:all_linters = ale#linter#GetAll(l:filetype) | |
30 0.000055 let l:filetype_linters = [] | |
30 0.000109 if type(l:linter_names) is v:t_string && l:linter_names is# 'all' | |
10 0.000012 let l:filetype_linters = l:all_linters | |
10 0.000012 elseif type(l:linter_names) is v:t_list | |
" Select only the linters we or the user has specified. | |
200 0.000268 for l:linter in l:all_linters | |
180 0.000696 let l:name_list = [l:linter.name] + l:linter.aliases | |
340 0.000484 for l:name in l:name_list | |
180 0.000515 if index(l:linter_names, l:name) >= 0 | |
20 0.000073 call add(l:filetype_linters, l:linter) | |
20 0.000030 break | |
endif | |
160 0.000134 endfor | |
180 0.000130 endfor | |
20 0.000030 endif | |
30 0.000098 call extend(l:possibly_duplicated_linters, l:filetype_linters) | |
30 0.000025 endfor | |
30 0.000052 let l:name_list = [] | |
30 0.000053 let l:combined_linters = [] | |
" Make sure we override linters so we don't get two with the same name, | |
" like 'eslint' for both 'javascript' and 'typescript' | |
" | |
" Note that the reverse calls here modify the List variables. | |
50 0.000121 for l:linter in reverse(l:possibly_duplicated_linters) | |
20 0.000070 if index(l:name_list, l:linter.name) < 0 | |
20 0.000067 call add(l:name_list, l:linter.name) | |
20 0.000056 call add(l:combined_linters, l:linter) | |
20 0.000017 endif | |
20 0.000016 endfor | |
30 0.000064 return reverse(l:combined_linters) | |
FUNCTION gutentags#is_path_rooted() | |
Called 5 times | |
Total time: 0.000014 | |
Self time: 0.000014 | |
count total (s) self (s) | |
5 0.000013 return !empty(a:path) && a:path[0] == '/' | |
FUNCTION <SNR>194_StopCurrentJobs() | |
Called 10 times | |
Total time: 0.000571 | |
Self time: 0.000571 | |
count total (s) self (s) | |
10 0.000049 let l:info = get(g:ale_buffer_info, a:buffer, {}) | |
10 0.000023 let l:new_job_list = [] | |
10 0.000025 let l:new_active_linter_list = [] | |
10 0.000046 for l:job_id in get(l:info, 'job_list', []) | |
let l:job_info = get(s:job_info_map, l:job_id, {}) | |
if !empty(l:job_info) | |
if a:include_lint_file_jobs || !l:job_info.linter.lint_file | |
call ale#job#Stop(l:job_id) | |
call remove(s:job_info_map, l:job_id) | |
else | |
call add(l:new_job_list, l:job_id) | |
" Linters with jobs still running are still active. | |
call add(l:new_active_linter_list, l:job_info.linter.name) | |
endif | |
endif | |
endfor | |
" Remove duplicates from the active linter list. | |
10 0.000047 call uniq(sort(l:new_active_linter_list)) | |
" Update the List, so it includes only the jobs we still need. | |
10 0.000045 let l:info.job_list = l:new_job_list | |
" Update the active linter list, clearing out anything not running. | |
10 0.000032 let l:info.active_linter_list = l:new_active_linter_list | |
FUNCTION <SNR>223__path2project_directory_git() | |
Called 3 times | |
Total time: 0.000058 | |
Self time: 0.000058 | |
count total (s) self (s) | |
3 0.000008 let parent = a:path | |
3 0.000005 while 1 | |
3 0.000009 let path = parent . '/.git' | |
3 0.000020 if isdirectory(path) || filereadable(path) | |
3 0.000005 return parent | |
endif | |
let next = fnamemodify(parent, ':h') | |
if next == parent | |
return '' | |
endif | |
let parent = next | |
endwhile | |
FUNCTION LanguageClient#handleBufDelete() | |
Called 3 times | |
Total time: 0.000260 | |
Self time: 0.000066 | |
count total (s) self (s) | |
3 0.000010 if &buftype !=# '' || &filetype ==# '' | |
return | |
endif | |
3 0.000003 try | |
3 0.000225 0.000030 call LanguageClient#Notify('languageClient/handleBufDelete', { 'filename': LSP#filename(), }) | |
3 0.000003 catch | |
call s:Debug('LanguageClient caught exception: ' . string(v:exception)) | |
endtry | |
FUNCTION denite#helper#_get_wininfo() | |
Called 15 times | |
Total time: 0.000494 | |
Self time: 0.000494 | |
count total (s) self (s) | |
15 0.000292 let wininfo = getwininfo(win_getid())[0] | |
15 0.000157 return { 'bufnr': wininfo['bufnr'], 'winnr': wininfo['winnr'], 'winid': wininfo['winid'], 'tabnr': wininfo['tabnr'],} | |
FUNCTION LSP#line() | |
Called 17 times | |
Total time: 0.000066 | |
Self time: 0.000066 | |
count total (s) self (s) | |
17 0.000057 return line('.') - 1 | |
FUNCTION denite#init#_deprecated_options() | |
Called 10 times | |
Total time: 0.000064 | |
Self time: 0.000064 | |
count total (s) self (s) | |
10 0.000056 return { 'select': 'cursor_pos', 'force_quit': '', 'quit': '',} | |
FUNCTION airline#check_mode() | |
Called 1777 times | |
Total time: 38.952884 | |
Self time: 0.199075 | |
count total (s) self (s) | |
1777 0.006853 let context = s:contexts[a:winnr] | |
1777 0.005326 if get(w:, 'airline_active', 1) | |
1581 0.004669 let l:m = mode(1) | |
1581 0.002727 if l:m ==# "i" | |
22 0.000030 let l:mode = ['insert'] | |
22 0.000022 elseif l:m[0] ==# "i" | |
2 0.000002 let l:mode = ['insert'] | |
2 0.000001 elseif l:m ==# "Rv" | |
let l:mode =['replace'] | |
elseif l:m[0] ==# "R" | |
let l:mode = ['replace'] | |
elseif l:m[0] =~# '\v(v|V||s|S|)' | |
let l:mode = ['visual'] | |
elseif l:m ==# "t" | |
43 0.000077 let l:mode = ['terminal'] | |
43 0.000039 elseif l:m[0] ==# "c" | |
55 0.000234 let l:mode = ['commandline'] | |
55 0.000132 elseif l:m ==# "no" " does not work, most likely, Vim does not refresh the statusline in OP mode | |
let l:mode = ['normal'] | |
elseif l:m[0:1] ==# 'ni' | |
let l:mode = ['normal'] | |
let l:m = 'ni' | |
else | |
1459 0.002987 let l:mode = ['normal'] | |
1459 0.000942 endif | |
1581 0.007613 if index(['Rv', 'no', 'ni', 'ix', 'ic'], l:m) == -1 | |
1579 0.002898 let l:m = l:m[0] | |
1579 0.000852 endif | |
1581 0.007107 let w:airline_current_mode = get(g:airline_mode_map, l:m, l:m) | |
1581 0.000993 else | |
196 0.000409 let l:mode = ['inactive'] | |
196 0.000668 let w:airline_current_mode = get(g:airline_mode_map, '__') | |
196 0.000114 endif | |
1777 0.004778 if g:airline_detect_modified && &modified | |
265 0.000946 call add(l:mode, 'modified') | |
265 0.000179 endif | |
1777 0.002842 if g:airline_detect_paste && &paste | |
call add(l:mode, 'paste') | |
endif | |
1777 0.015393 if g:airline_detect_crypt && exists("+key") && !empty(&key) | |
call add(l:mode, 'crypt') | |
endif | |
1777 0.003188 if g:airline_detect_spell && &spell | |
687 0.002017 call add(l:mode, 'spell') | |
687 0.000474 endif | |
1777 0.002797 if &readonly || ! &modifiable | |
1072 0.002741 call add(l:mode, 'readonly') | |
1072 0.000592 endif | |
1777 0.010082 let mode_string = join(l:mode) | |
1777 0.006441 if get(w:, 'airline_lastmode', '') != mode_string | |
115 0.053608 0.000703 call airline#highlighter#highlight_modified_inactive(context.bufnr) | |
115 38.694357 0.000952 call airline#highlighter#highlight(l:mode, context.bufnr) | |
115 0.007971 0.000472 call airline#util#doautocmd('AirlineModeChanged') | |
115 0.000356 let w:airline_lastmode = mode_string | |
115 0.000060 endif | |
1777 0.001579 return '' | |
FUNCTION <SNR>217_add_sign() | |
Called 27 times | |
Total time: 0.034024 | |
Self time: 0.033985 | |
count total (s) self (s) | |
27 0.000054 call add(a:sy.lines, a:line) | |
27 0.000066 let a:sy.signtable[a:line] = 1 | |
27 0.000043 if has_key(a:sy.internal, a:line) | |
" There is a sign on this line already. | |
18 0.000037 if a:type == a:sy.internal[a:line].type | |
" Keep current sign since the new one is of the same type. | |
17 0.000024 return a:sy.internal[a:line].id | |
else | |
" Update sign by overwriting the ID of the current sign. | |
1 0.000003 let id = a:sy.internal[a:line].id | |
1 0.000000 endif | |
1 0.000000 endif | |
10 0.000013 if !exists('id') | |
9 0.000076 0.000037 let id = sy#sign#id_next(a:sy) | |
9 0.000004 endif | |
10 0.000056 if a:type =~# 'SignifyDelete' | |
execute printf('sign define %s text=%s texthl=SignifySignDelete linehl=%s', a:type, a:1, s:delete_highlight[g:signify_line_highlight]) | |
endif | |
10 0.033493 execute printf('sign place %d line=%d name=%s buffer=%s', id, a:line, a:type, a:sy.buffer) | |
10 0.000021 return id | |
FUNCTION <SNR>147_evaluate_tabline() | |
Called 953 times | |
Total time: 0.108096 | |
Self time: 0.069316 | |
count total (s) self (s) | |
953 0.001204 let tabline = a:tabline | |
953 0.050640 0.011861 let tabline = substitute(tabline, '%{\([^}]\+\)}', '\=eval(submatch(1))', 'g') | |
953 0.037267 let tabline = substitute(tabline, '%#[^#]\+#', '', 'g') | |
953 0.004992 let tabline = substitute(tabline, '%(\([^)]\+\)%)', '\1', 'g') | |
953 0.002941 let tabline = substitute(tabline, '%\d\+[TX]', '', 'g') | |
953 0.002211 let tabline = substitute(tabline, '%=', '', 'g') | |
953 0.002241 let tabline = substitute(tabline, '%\d*\*', '', 'g') | |
953 0.001998 if has('tablineat') | |
953 0.002395 let tabline = substitute(tabline, '%@[^@]\+@', '', 'g') | |
953 0.000441 endif | |
953 0.000711 return tabline | |
FUNCTION airline#extensions#branch#update_untracked_config() | |
Called 1535 times | |
Total time: 0.019204 | |
Self time: 0.019204 | |
count total (s) self (s) | |
1535 0.005123 if !has_key(s:vcs_config[a:vcs].untracked, a:file) | |
7 0.000006 return | |
elseif s:vcs_config[a:vcs].untracked[a:file] != b:buffer_vcs_config[a:vcs].untracked | |
let b:buffer_vcs_config[a:vcs].untracked = s:vcs_config[a:vcs].untracked[a:file] | |
unlet! b:airline_head | |
endif | |
FUNCTION <SNR>130_get_array() | |
Called 242947 times | |
Total time: 1.367399 | |
Self time: 1.367399 | |
count total (s) self (s) | |
242947 0.563171 let opts=empty(a:opts) ? '' : join(a:opts, ',') | |
242947 0.716849 return g:airline_gui_mode ==# 'gui' ? [ a:fg, a:bg, '', '', opts ] : [ '', '', a:fg, a:bg, opts ] | |
FUNCTION test#csharp#xunit#test_file() | |
Called 6 times | |
Total time: 0.000182 | |
Self time: 0.000182 | |
count total (s) self (s) | |
6 0.000056 if fnamemodify(a:file, ':t') =~# g:test#csharp#xunit#file_pattern | |
if exists('g:test#csharp#runner') | |
return g:test#csharp#runner ==# 'xunit' | |
else | |
return s:is_using_dotnet_xunit_cli(a:file) && (search('using Xunit', 'n') > 0) && (search('[(Fact|Theory).*]', 'n') > 0) | |
endif | |
endif | |
FUNCTION ncm2_path#on_complete_bufpath() | |
Called 3 times | |
Total time: 0.000237 | |
Self time: 0.000035 | |
count total (s) self (s) | |
3 0.000009 if empty(a:ctx.filepath) | |
return | |
endif | |
3 0.000219 0.000018 call g:ncm2_path#proc.try_notify('on_complete_bufpath', a:ctx, g:ncm2_path#path_pattern) | |
FUNCTION test#get_runners() | |
Called 6 times | |
Total time: 0.001687 | |
Self time: 0.000212 | |
count total (s) self (s) | |
6 0.000025 if exists('g:test#runners') | |
let custom_runners = g:test#runners | |
elseif exists('g:test#custom_runners') | |
let custom_runners = g:test#custom_runners | |
else | |
6 0.000022 let custom_runners = {} | |
6 0.000007 endif | |
6 0.001556 0.000081 return s:extend(custom_runners, g:test#default_runners) | |
FUNCTION <SNR>130_get_syn() | |
Called 485894 times | |
Total time: 20.537083 | |
Self time: 20.537083 | |
count total (s) self (s) | |
485894 0.758397 if !exists("g:airline_gui_mode") | |
let g:airline_gui_mode = airline#init#gui_mode() | |
endif | |
485894 0.372608 let color = '' | |
485894 6.518163 if hlexists(a:group) | |
424706 6.091394 let color = synIDattr(synIDtrans(hlID(a:group)), a:what, g:airline_gui_mode) | |
424706 0.198196 endif | |
485894 0.692891 if empty(color) || color == -1 | |
" should always exists | |
89862 2.140372 let color = synIDattr(synIDtrans(hlID('Normal')), a:what, g:airline_gui_mode) | |
" however, just in case | |
89862 0.137236 if empty(color) || color == -1 | |
let color = 'NONE' | |
endif | |
89862 0.030140 endif | |
485894 0.324104 return color | |
FUNCTION <SNR>144_buffer_getvar() | |
Called 26 times | |
Total time: 0.000067 | |
Self time: 0.000067 | |
count total (s) self (s) | |
26 0.000059 return getbufvar(self['#'],a:var) | |
FUNCTION test#clojure#fireplacetest#test_file() | |
Called 6 times | |
Total time: 0.000160 | |
Self time: 0.000160 | |
count total (s) self (s) | |
6 0.000154 return a:file =~# g:test#clojure#fireplacetest#file_pattern | |
FUNCTION ale#sign#FindCurrentSigns() | |
Called 10 times | |
Total time: 0.002666 | |
Self time: 0.000104 | |
count total (s) self (s) | |
10 0.000336 0.000059 let l:line_list = ale#sign#ReadSigns(a:buffer) | |
10 0.002321 0.000036 return ale#sign#ParseSigns(l:line_list) | |
FUNCTION <SNR>147_tabline_evaluated_length() | |
Called 953 times | |
Total time: 0.118853 | |
Self time: 0.007551 | |
count total (s) self (s) | |
953 0.118650 0.007348 return airline#util#strchars(s:evaluate_tabline(a:tabline)) | |
FUNCTION <SNR>145_IsTrue() | |
Called 1 time | |
Total time: 0.000029 | |
Self time: 0.000029 | |
count total (s) self (s) | |
1 0.000008 if type(a:v) ==# type(0) | |
return a:v ==# 0 ? v:false : v:true | |
elseif a:v is v:null | |
return v:false | |
else | |
1 0.000003 return v:true | |
endif | |
FUNCTION sy#repo#get_diff_start() | |
Called 7 times | |
Total time: 0.119041 | |
Self time: 0.118292 | |
count total (s) self (s) | |
7 0.000061 0.000036 call sy#verbose('get_diff_start()', a:vcs) | |
7 0.000021 let job_id = get(b:, 'sy_job_id_'.a:vcs) | |
" Neovim | |
7 0.000016 if has('nvim') | |
7 0.000006 if job_id | |
silent! call jobstop(job_id) | |
endif | |
7 0.000741 0.000047 let [cmd, options] = s:initialize_job(a:vcs) | |
7 0.000104 0.000074 call sy#verbose(printf('CMD: %s | CWD: %s', string(cmd), b:sy.info.dir), a:vcs) | |
7 0.117581 let b:sy_job_id_{a:vcs} = jobstart(cmd, extend(options, { 'cwd': b:sy.info.dir, 'on_stdout': function('s:callback_nvim_stdout'), 'on_exit': function('s:callback_nvim_exit'), })) | |
" Newer Vim | |
7 0.000034 elseif has('patch-7.4.1967') | |
if type(job_id) != type(0) | |
silent! call job_stop(job_id) | |
endif | |
let [cmd, options] = s:initialize_job(a:vcs) | |
let [cwd, chdir] = sy#util#chdir() | |
try | |
execute chdir fnameescape(b:sy.info.dir) | |
call sy#verbose(printf('CMD: %s | CWD: %s', string(cmd), getcwd()), a:vcs) | |
let opts = { 'in_io': 'null', 'out_cb': function('s:callback_vim_stdout', options), 'close_cb': function('s:callback_vim_close', options), } | |
let b:sy_job_id_{a:vcs} = job_start(cmd, opts) | |
finally | |
execute chdir fnameescape(cwd) | |
endtry | |
" Older Vim | |
else | |
let diff = split(s:run(a:vcs), '\n') | |
call sy#repo#get_diff_{a:vcs}(b:sy, v:shell_error, diff) | |
endif | |
FUNCTION <SNR>144_buffer_spec() | |
Called 35 times | |
Total time: 0.000618 | |
Self time: 0.000473 | |
count total (s) self (s) | |
35 0.000063 let bufname = bufname(self['#']) | |
35 0.000543 0.000398 return s:Slash(bufname == '' ? '' : fnamemodify(bufname,':p')) | |
FUNCTION ale#sign#GetSignName() | |
Called 16 times | |
Total time: 0.000545 | |
Self time: 0.000362 | |
count total (s) self (s) | |
16 0.000026 let l:priority = g:ale#util#style_warning_priority | |
" Determine the highest priority item for the line. | |
32 0.000027 for l:item in a:sublist | |
16 0.000247 0.000064 let l:item_priority = ale#util#GetItemPriority(l:item) | |
16 0.000018 if l:item_priority > l:priority | |
15 0.000017 let l:priority = l:item_priority | |
15 0.000007 endif | |
16 0.000006 endfor | |
16 0.000020 if l:priority is# g:ale#util#error_priority | |
2 0.000001 return 'ALEErrorSign' | |
endif | |
14 0.000017 if l:priority is# g:ale#util#warning_priority | |
return 'ALEWarningSign' | |
endif | |
14 0.000014 if l:priority is# g:ale#util#style_error_priority | |
13 0.000009 return 'ALEStyleErrorSign' | |
endif | |
1 0.000001 if l:priority is# g:ale#util#style_warning_priority | |
1 0.000001 return 'ALEStyleWarningSign' | |
endif | |
if l:priority is# g:ale#util#info_priority | |
return 'ALEInfoSign' | |
endif | |
" Use the error sign for invalid severities. | |
return 'ALEErrorSign' | |
FUNCTION airline#util#has_fugitive() | |
Called 1563 times | |
Total time: 0.006104 | |
Self time: 0.006104 | |
count total (s) self (s) | |
1563 0.005335 return exists('*fugitive#head') || exists('*FugitiveHead') | |
FUNCTION LanguageClient#handleBufNewFile() | |
Called 5 times | |
Total time: 0.000017 | |
Self time: 0.000017 | |
count total (s) self (s) | |
5 0.000011 if &buftype !=# '' || &filetype ==# '' | |
5 0.000002 return | |
endif | |
try | |
call LanguageClient#Notify('languageClient/handleBufNewFile', { 'filename': LSP#filename(), }) | |
catch | |
call s:Debug('LanguageClient caught exception: ' . string(v:exception)) | |
endtry | |
FUNCTION ncm2#_on_complete() | |
Called 11 times | |
Total time: 0.004564 | |
Self time: 0.000501 | |
count total (s) self (s) | |
11 0.000053 let l:manual = a:trigger_type == 1 | |
11 0.000020 if l:manual == 0 | |
11 0.000022 if g:ncm2#auto_popup == 0 | |
return '' | |
endif | |
11 0.000209 0.000090 if s:skip_tick == s:context_tick() | |
return '' | |
endif | |
11 0.000009 endif | |
" skip_tick is dated, we don't need it anymore | |
11 0.000040 let s:skip_tick = [] | |
11 0.004077 0.000132 call s:try_rnotify('on_complete', l:manual) | |
11 0.000012 return '' | |
FUNCTION <SNR>81_UpdateBuf() | |
Called 28 times | |
Total time: 0.407765 | |
Self time: 0.000563 | |
count total (s) self (s) | |
" skip if another session still loading | |
28 0.000089 if exists('g:SessionLoad') | return | endif | |
28 0.000089 let s:curbuf = bufnr('%') | |
28 0.402323 0.000123 call s:WinDo("if bufnr('%') is s:curbuf | call s:LeaveWin() | endif") | |
28 0.005156 0.000154 call s:WinDo("if bufnr('%') is s:curbuf | call s:EnterWin() | endif") | |
28 0.000041 if !a:feedback | return | endif | |
if !exists('w:lastfdm') | |
echomsg "'" . &l:foldmethod . "' folds already continuously updated" | |
else | |
echomsg "updated '" . w:lastfdm . "' folds" | |
endif | |
FUNCTION <SNR>184_replace() | |
Called 21 times | |
Total time: 0.000149 | |
Self time: 0.000149 | |
count total (s) self (s) | |
21 0.000082 let parts = split(a:cmd, a:pat, 1) | |
21 0.000057 return join(parts, a:sub) | |
FUNCTION ale#job#Start() | |
Called 10 times | |
Total time: 0.179741 | |
Self time: 0.179658 | |
count total (s) self (s) | |
10 0.000153 0.000069 call ale#job#ValidateArguments(a:command, a:options) | |
10 0.000056 let l:job_info = copy(a:options) | |
10 0.000039 let l:job_options = {} | |
10 0.000039 if has('nvim') | |
10 0.000030 if has_key(a:options, 'out_cb') | |
10 0.000055 let l:job_options.on_stdout = function('s:NeoVimCallback') | |
10 0.000025 let l:job_info.out_cb_line = '' | |
10 0.000008 endif | |
10 0.000025 if has_key(a:options, 'err_cb') | |
10 0.000043 let l:job_options.on_stderr = function('s:NeoVimCallback') | |
10 0.000019 let l:job_info.err_cb_line = '' | |
10 0.000006 endif | |
10 0.000024 if has_key(a:options, 'exit_cb') | |
10 0.000040 let l:job_options.on_exit = function('s:NeoVimCallback') | |
10 0.000006 endif | |
10 0.178439 let l:job_info.job = jobstart(a:command, l:job_options) | |
10 0.000080 let l:job_id = l:job_info.job | |
10 0.000014 else | |
let l:job_options = { 'in_mode': l:job_info.mode, 'out_mode': l:job_info.mode, 'err_mode': l:job_info.mode,} | |
if has_key(a:options, 'out_cb') | |
let l:job_options.out_cb = function('s:VimOutputCallback') | |
endif | |
if has_key(a:options, 'err_cb') | |
let l:job_options.err_cb = function('s:VimErrorCallback') | |
endif | |
if has_key(a:options, 'exit_cb') | |
" Set a close callback to which simply calls job_status() | |
" when the channel is closed, which can trigger the exit callback | |
" earlier on. | |
let l:job_options.close_cb = function('s:VimCloseCallback') | |
let l:job_options.exit_cb = function('s:VimExitCallback') | |
endif | |
" Use non-blocking writes for Vim versions that support the option. | |
if has('patch-8.1.350') | |
let l:job_options.noblock = 1 | |
endif | |
" Vim 8 will read the stdin from the file's buffer. | |
let l:job_info.job = job_start(a:command, l:job_options) | |
let l:job_id = ale#job#ParseVim8ProcessID(string(l:job_info.job)) | |
endif | |
10 0.000017 if l:job_id > 0 | |
" Store the job in the map for later only if we can get the ID. | |
10 0.000076 let s:job_map[l:job_id] = l:job_info | |
10 0.000006 endif | |
10 0.000029 return l:job_id | |
FUNCTION ncm2#_warmup_sources() | |
Called 31 times | |
Total time: 0.003093 | |
Self time: 0.002093 | |
count total (s) self (s) | |
31 0.000134 if bufnr('%') != a:ctx.bufnr | |
10 0.000006 return | |
endif | |
138 0.000107 for ele in a:calls | |
117 0.000162 let name = ele['name'] | |
117 0.000071 try | |
117 0.000219 let sr = s:sources[name] | |
117 0.000162 if !has_key(sr, 'on_warmup') | |
33 0.000020 continue | |
endif | |
84 0.000079 let ctx = ele.context | |
84 0.001338 0.000338 call call(sr.on_warmup, [ctx], sr) | |
84 0.000039 catch | |
call s:core.error(name . ' on_warmup: ' . v:exception) | |
endtry | |
84 0.000041 endfor | |
FUNCTION airline#parts#filetype() | |
Called 1759 times | |
Total time: 0.010413 | |
Self time: 0.010413 | |
count total (s) self (s) | |
1759 0.009274 return winwidth(0) < 90 && strlen(&filetype) > 3 ? matchstr(&filetype, '...'). (&encoding is? 'utf-8' ? '…' : '>') : &filetype | |
FUNCTION signature#sign#Remove() | |
Called 2132 times | |
Total time: 0.056060 | |
Self time: 0.049555 | |
count total (s) self (s) | |
" Description: Remove signs for marks/markers from the specified line number | |
" Arguments: | |
" sign : The mark/marker whose sign is to be placed/removed/toggled | |
" lnum : Line number from which the sign is to be removed | |
" If sign is a marker and lnum is 0, the sign will be removed from all lines | |
" If sign is a mark and lnum is 0, the lnum will be found and the sign will be removed from that line | |
"echom "DEBUG: sign = " . a:sign . ", lnum = " . a:lnum | |
" If Signature is not enabled, return | |
2132 0.003774 if !b:sig_enabled | return | endif | |
" Remove sign for markers | |
2132 0.012393 0.005888 if signature#utils#IsValidMarker(a:sign) | |
let b:sig_markers[a:lnum] = substitute(b:sig_markers[a:lnum], "\\C" . escape( a:sign, '$^' ), "", "") | |
" If there are no markers on the line, delete signs on that line | |
if b:sig_markers[a:lnum] == "" | |
call remove(b:sig_markers, a:lnum) | |
endif | |
call s:RefreshLine(a:lnum) | |
" Remove sign for marks | |
else | |
" For marks, if a:lnum == 0, find out the line where the mark was placed | |
2132 0.002031 if a:lnum == 0 | |
2132 0.007238 let l:arr = keys(filter(copy(b:sig_marks), 'v:val =~# a:sign')) | |
2132 0.003461 if empty(l:arr) | return | endif | |
else | |
let l:arr = [a:lnum] | |
endif | |
if (v:version >= 800) | |
call assert_true(len(l:arr) == 1, "Multiple marks found where one was expected") | |
elseif (len(l:arr) != 1) | |
echoerr "Multiple marks found where one was expected" | |
endif | |
for l:lnum in l:arr | |
" FIXME: Placed guard to avoid triggering issue #53 | |
if has_key(b:sig_marks, l:lnum) | |
let b:sig_marks[l:lnum] = substitute(b:sig_marks[l:lnum], "\\C" . a:sign, "", "") | |
" If there are no marks on the line, delete signs on that line | |
if b:sig_marks[l:lnum] == "" | |
call remove(b:sig_marks, l:lnum) | |
endif | |
endif | |
call s:RefreshLine(l:lnum) | |
endfor | |
endif | |
FUNCTION airline#extensions#netrw#apply() | |
Called 62 times | |
Total time: 0.000840 | |
Self time: 0.000840 | |
count total (s) self (s) | |
62 0.000175 if &ft == 'netrw' | |
let spc = g:airline_symbols.space | |
call a:1.add_section('airline_a', spc.'netrw'.spc) | |
if exists('*airline#extensions#branch#get_head') | |
call a:1.add_section('airline_b', spc.'%{airline#extensions#branch#get_head()}'.spc) | |
endif | |
call a:1.add_section('airline_c', spc.'%f'.spc) | |
call a:1.split() | |
call a:1.add_section('airline_y', spc.'%{airline#extensions#netrw#sortstring()}'.spc) | |
return 1 | |
endif | |
FUNCTION <SNR>74_default_highlight() | |
Called 10 times | |
Total time: 0.001760 | |
Self time: 0.001760 | |
count total (s) self (s) | |
10 0.000410 highlight default link OperatorSandwichBuns IncSearch | |
10 0.000375 highlight default link OperatorSandwichAdd DiffAdd | |
10 0.000367 highlight default link OperatorSandwichDelete DiffDelete | |
10 0.000199 if hlexists('OperatorSandwichStuff') | |
highlight default link OperatorSandwichChange OperatorSandwichStuff | |
else | |
" obsolete | |
10 0.000364 highlight default link OperatorSandwichChange DiffChange | |
10 0.000005 endif | |
FUNCTION airline#parts#iminsert() | |
Called 1563 times | |
Total time: 0.009660 | |
Self time: 0.009660 | |
count total (s) self (s) | |
1563 0.004025 if g:airline_detect_iminsert && &iminsert && exists('b:keymap_name') | |
return toupper(b:keymap_name) | |
endif | |
1563 0.001055 return '' | |
FUNCTION signature#sign#Refresh() | |
Called 41 times | |
Total time: 0.178934 | |
Self time: 0.018163 | |
count total (s) self (s) | |
" Description: Add signs for new marks/markers and remove signs for deleted marks/markers | |
" Arguments: Specify an argument to force a sign refresh | |
41 0.007157 0.000302 call s:InitializeVars(a:0 && a:1) | |
" If Signature is not enabled, return | |
41 0.000142 if !b:sig_enabled | return | endif | |
2173 0.076168 0.008778 for i in signature#mark#GetList('free', 'buf_curr') | |
" ... remove it | |
2132 0.062138 0.006078 call signature#sign#Remove(i, 0) | |
2132 0.001062 endfor | |
" Add signs for marks ... | |
41 0.029886 0.000196 for [l:mark, l:lnum, _] in signature#mark#GetList('used', 'buf_curr') | |
" ... if mark is not present in our b:sig_marks list or if it is present but at the wrong line, | |
" remove the old sign and add a new one | |
if ( !has_key(b:sig_marks, l:lnum) || (b:sig_marks[l:lnum] !~# l:mark) || a:0 ) | |
call signature#sign#Remove(l:mark, 0) | |
call signature#sign#Place (l:mark, l:lnum) | |
endif | |
endfor | |
41 0.000929 0.000154 call signature#sign#ToggleDummy() | |
" We do not add signs for markers as SignRefresh is executed periodically and we don't have a way to determine if the | |
" marker already has a sign or not | |
FUNCTION sy#verbose() | |
Called 56 times | |
Total time: 0.000259 | |
Self time: 0.000259 | |
count total (s) self (s) | |
56 0.000066 if &verbose | |
echomsg printf('[sy%s] %s', (a:0 ? ':'.a:1 : ''), a:msg) | |
endif | |
FUNCTION <SNR>136_cache_matches_cleanup() | |
Called 12 times | |
Total time: 0.000211 | |
Self time: 0.000211 | |
count total (s) self (s) | |
12 0.000129 let s:matches = [] | |
12 0.000033 let s:lnum = 0 | |
12 0.000024 let s:startbcol = 1 | |
FUNCTION test#csharp#dotnettest#test_file() | |
Called 6 times | |
Total time: 0.000176 | |
Self time: 0.000176 | |
count total (s) self (s) | |
6 0.000051 if fnamemodify(a:file, ':t') =~# g:test#csharp#dotnettest#file_pattern | |
if exists('g:test#csharp#runner') | |
return g:test#csharp#runner ==# 'dotnettest' | |
endif | |
return 1 | |
endif | |
FUNCTION <SNR>68_ShouldStripWhitespace() | |
Called 54 times | |
Total time: 0.000850 | |
Self time: 0.000584 | |
count total (s) self (s) | |
54 0.000431 0.000165 call s:InitVariable('b:strip_whitespace_on_save', -1) | |
54 0.000062 if b:strip_whitespace_on_save < 0 | |
13 0.000027 if !exists('b:better_whitespace_enabled') || b:better_whitespace_enabled < 0 | |
" We can't initialize buffer value properly yet, fall back to global one | |
8 0.000009 return g:strip_whitespace_on_save | |
else | |
5 0.000009 let b:strip_whitespace_on_save = b:better_whitespace_enabled && g:strip_whitespace_on_save | |
5 0.000002 endif | |
5 0.000002 endif | |
46 0.000041 return b:strip_whitespace_on_save | |
FUNCTION ale#events#ReadOrEnterEvent() | |
Called 31 times | |
Total time: 0.000689 | |
Self time: 0.000689 | |
count total (s) self (s) | |
" Apply pattern options if the variable is set. | |
31 0.000135 if get(g:, 'ale_pattern_options_enabled', 1)&& !empty(get(g:, 'ale_pattern_options')) | |
call ale#pattern_options#SetOptions(a:buffer) | |
endif | |
" When entering a buffer, we are no longer quitting it. | |
31 0.000111 call setbufvar(a:buffer, 'ale_quitting', 0) | |
31 0.000100 let l:filetype = getbufvar(a:buffer, '&filetype') | |
31 0.000096 call setbufvar(a:buffer, 'ale_original_filetype', l:filetype) | |
" If the file changed outside of Vim, check it on BufEnter,BufRead | |
31 0.000050 if getbufvar(a:buffer, 'ale_file_changed') | |
call ale#events#LintOnEnter(a:buffer) | |
endif | |
FUNCTION <SNR>184_get_diff_end() | |
Called 7 times | |
Total time: 0.044539 | |
Self time: 0.000118 | |
count total (s) self (s) | |
7 0.000050 0.000026 call sy#verbose('get_diff_end()', a:vcs) | |
7 0.000006 if a:found_diff | |
7 0.000015 if index(a:sy.vcs, a:vcs) == -1 | |
let a:sy.vcs += [a:vcs] | |
endif | |
7 0.044427 0.000031 call sy#set_signs(a:sy, a:vcs, a:diff) | |
7 0.000003 else | |
call sy#verbose('No valid diff found. Disabling this VCS.', a:vcs) | |
endif | |
FUNCTION <SNR>81_Skip() | |
Called 126 times | |
Total time: 0.003081 | |
Self time: 0.001530 | |
count total (s) self (s) | |
126 0.001500 0.000693 if !s:isReasonable() | return 1 | endif | |
114 0.000257 if !&l:modifiable | return 1 | endif | |
108 0.001128 0.000384 if s:inSkipList() | return 1 | endif | |
108 0.000073 return 0 | |
FUNCTION ale#engine#ManageDirectory() | |
Called 10 times | |
Total time: 0.000350 | |
Self time: 0.000176 | |
count total (s) self (s) | |
10 0.000241 0.000067 call ale#engine#InitBufferInfo(a:buffer) | |
10 0.000099 call add(g:ale_buffer_info[a:buffer].temporary_directory_list, a:directory) | |
FUNCTION ale#Var() | |
Called 840 times | |
Total time: 0.013561 | |
Self time: 0.013561 | |
count total (s) self (s) | |
840 0.002994 let l:full_name = 'ale_' . a:variable_name | |
840 0.005299 let l:vars = getbufvar(str2nr(a:buffer), '', {}) | |
840 0.004053 return get(l:vars, l:full_name, g:[l:full_name]) | |
FUNCTION <SNR>158_valid_dir() | |
Called 84 times | |
Total time: 0.000696 | |
Self time: 0.000696 | |
count total (s) self (s) | |
84 0.000369 if empty(a:dir) || !isdirectory(a:dir) | |
24 0.000084 return getcwd() | |
endif | |
60 0.000049 return a:dir | |
FUNCTION gutentags#start_job() | |
Called 7 times | |
Total time: 0.104763 | |
Self time: 0.104763 | |
count total (s) self (s) | |
7 0.104730 return jobstart(a:cmd, a:opts) | |
FUNCTION <SNR>68_WhitespaceInit() | |
Called 10 times | |
Total time: 0.000487 | |
Self time: 0.000487 | |
count total (s) self (s) | |
" Check if the user has already defined highlighting for this group | |
10 0.000422 if hlexists("ExtraWhitespace") == 0 || synIDattr(synIDtrans(hlID("ExtraWhitespace")), "bg") == -1 | |
execute 'highlight ExtraWhitespace ctermbg = '.g:better_whitespace_ctermcolor. ' guibg = '.g:better_whitespace_guicolor | |
endif | |
10 0.000028 let s:better_whitespace_initialized = 1 | |
FUNCTION <SNR>184_callback_nvim_exit() | |
Called 7 times | |
Total time: 0.045006 | |
Self time: 0.000056 | |
count total (s) self (s) | |
7 0.045002 0.000052 call s:job_exit(self.bufnr, self.vcs, a:exitval, self.stdoutbuf) | |
FUNCTION <SNR>150_is_sudo() | |
Called 18 times | |
Total time: 0.000161 | |
Self time: 0.000161 | |
count total (s) self (s) | |
18 0.000148 return $SUDO_USER != '' && $USER !=# $SUDO_USER && $HOME !=# expand('~'.$USER) && $HOME ==# expand('~'.$SUDO_USER) | |
FUNCTION <SNR>115_record_diagnostics() | |
Called 13 times | |
Total time: 1.171109 | |
Self time: 1.170993 | |
count total (s) self (s) | |
13 0.829481 let result = json_decode(a:state.result) | |
13 0.340708 let s:diagnostics = result.diagnostics | |
13 0.000886 0.000770 call s:languageclient_refresh() | |
FUNCTION <SNR>33_invoke_funcrefs() | |
Called 193 times | |
Total time: 1.783733 | |
Self time: 0.006354 | |
count total (s) self (s) | |
193 0.005722 0.001012 let builder = airline#builder#new(a:context) | |
193 0.108233 0.001685 let err = airline#util#exec_funcrefs(a:funcrefs + s:core_funcrefs, builder, a:context) | |
193 0.000185 if err == 1 | |
193 1.667105 0.000983 let a:context.line = builder.build() | |
193 0.000830 let s:contexts[a:context.winnr] = a:context | |
193 0.001300 call setwinvar(a:context.winnr, '&statusline', '%!airline#statusline('.a:context.winnr.')') | |
193 0.000095 endif | |
FUNCTION ale#sign#ParseSigns() | |
Called 10 times | |
Total time: 0.002285 | |
Self time: 0.002285 | |
count total (s) self (s) | |
" Matches output like : | |
" line=4 id=1 name=ALEErrorSign | |
" строка=1 id=1000001 имя=ALEErrorSign | |
" 行=1 識別子=1000001 名前=ALEWarningSign | |
" línea=12 id=1000001 nombre=ALEWarningSign | |
" riga=1 id=1000001, nome=ALEWarningSign | |
10 0.000025 let l:pattern = '\v^.*\=(\d+).*\=(\d+).*\=(ALE[a-zA-Z]+Sign)' | |
10 0.000010 let l:result = [] | |
10 0.000012 let l:is_dummy_sign_set = 0 | |
123 0.000081 for l:line in a:line_list | |
113 0.001234 let l:match = matchlist(l:line, l:pattern) | |
113 0.000131 if len(l:match) > 0 | |
16 0.000021 if l:match[3] is# 'ALEDummySign' | |
let l:is_dummy_sign_set = 1 | |
else | |
16 0.000066 call add(l:result, [ str2nr(l:match[1]), str2nr(l:match[2]), l:match[3],]) | |
16 0.000007 endif | |
16 0.000006 endif | |
113 0.000046 endfor | |
10 0.000017 return [l:is_dummy_sign_set, l:result] | |
FUNCTION signature#sign#ToggleDummy() | |
Called 41 times | |
Total time: 0.000775 | |
Self time: 0.000775 | |
count total (s) self (s) | |
" Description: Places a dummy sign to prevent flickering of the gutter when the mark is moved or the line containing | |
" a mark/marker is deleted and then the delete is undone | |
" Arguments: (optional) 0 : force remove | |
" 1 : force place | |
41 0.000199 let l:place = a:0 ? a:1 : (len(b:sig_marks) + len(b:sig_markers) == 1) && !b:sig_DummyExists | |
41 0.000138 let l:remove = a:0 ? !a:1 : (len(b:sig_marks) + len(b:sig_markers) == 0) && b:sig_DummyExists | |
41 0.000037 if (l:place) | |
sign define Signature_Dummy | |
execute 'sign place 666 line=1 name=Signature_Dummy buffer=' . bufnr('%') | |
let b:sig_DummyExists = 1 | |
elseif (l:remove) | |
silent! execute 'sign unplace 666 buffer=' . bufnr('%') | |
let b:sig_DummyExists = 0 | |
endif | |
FUNCTION airline#util#doautocmd() | |
Called 129 times | |
Total time: 0.013080 | |
Self time: 0.009559 | |
count total (s) self (s) | |
129 0.012996 0.009476 exe printf("silent doautocmd %s User %s", s:nomodeline, a:event) | |
FUNCTION ale#history#SetExitCode() | |
Called 10 times | |
Total time: 0.000381 | |
Self time: 0.000078 | |
count total (s) self (s) | |
10 0.000342 0.000038 let l:obj = s:FindHistoryItem(a:buffer, a:job_id) | |
" If we find a match, then set the code and status. | |
10 0.000019 let l:obj.exit_code = a:exit_code | |
10 0.000011 let l:obj.status = 'finished' | |
FUNCTION ncm2#_core_data() | |
Called 79 times | |
Total time: 0.007554 | |
Self time: 0.003023 | |
count total (s) self (s) | |
" data sync between ncm2.vim and ncm2_core.py | |
79 0.006675 0.002145 let data = extend(g:ncm2#core_data, { 'auto_popup': g:ncm2#auto_popup, 'skip_tick': s:skip_tick, 'complete_length': g:ncm2#complete_length, 'matcher': g:ncm2#matcher, 'sorter': g:ncm2#sorter, 'filter': g:ncm2#filter, 'popup_limit': g:ncm2#popup_limit, 'context': s:context(), 'sources': s:sources, 'subscope_detectors': s:subscope_detectors, 'lines': [] }, 'force') | |
" if subscope detector is available for this buffer, we need to send | |
" the whole buffer for on_complete event | |
79 0.000377 if has_key(s:subscope_detectors, &filetype) && (a:event == 'on_complete' || a:event == 'get_context' || a:event == 'on_warmup' || a:event == 'on_complete_done') | |
let data.lines = getline(1, '$') | |
endif | |
79 0.000076 return data | |
FUNCTION FugitiveIsGitDir() | |
Called 10 times | |
Total time: 0.000136 | |
Self time: 0.000136 | |
count total (s) self (s) | |
10 0.000053 let path = substitute(a:path, '[\/]$', '', '') . '/' | |
10 0.000077 return getfsize(path.'HEAD') > 10 && ( isdirectory(path.'objects') && isdirectory(path.'refs') || getftype(path.'commondir') ==# 'file') | |
FUNCTION <SNR>222_start() | |
Called 5 times | |
Total time: 21.609102 | |
Self time: 0.000304 | |
count total (s) self (s) | |
5 0.000187 0.000034 if denite#initialize() | |
return | |
endif | |
" Add current position to the jumplist. | |
5 0.000025 let pos = getpos('.') | |
5 0.000042 execute line('.') | |
5 0.000027 call setpos('.', pos) | |
5 0.001988 0.000053 let context = denite#init#_context(a:user_context) | |
5 21.606797 0.000087 return has('nvim') ? _denite_start(a:sources, context) : denite#vim#_start(a:sources, context) | |
FUNCTION ncm2_bufword#on_warmup() | |
Called 21 times | |
Total time: 0.000380 | |
Self time: 0.000122 | |
count total (s) self (s) | |
21 0.000368 0.000110 call g:ncm2_bufword#proc.jobstart() | |
FUNCTION test#erlang#commontest#test_file() | |
Called 6 times | |
Total time: 0.000031 | |
Self time: 0.000031 | |
count total (s) self (s) | |
6 0.000029 return a:file =~# g:test#erlang#commontest#file_pattern | |
FUNCTION test#racket#rackunit#test_file() | |
Called 6 times | |
Total time: 0.000118 | |
Self time: 0.000118 | |
count total (s) self (s) | |
6 0.000105 return a:file =~# g:test#racket#rackunit#file_pattern | |
FUNCTION test#php#dusk#test_file() | |
Called 6 times | |
Total time: 0.000135 | |
Self time: 0.000135 | |
count total (s) self (s) | |
6 0.000125 return a:file =~# g:test#php#dusk#file_pattern && !empty(filter(readfile(a:file), 'v:val =~# ''use Laravel\\Dusk\\Browser''')) | |
FUNCTION <SNR>113_display_git_branch() | |
Called 8 times | |
Total time: 0.000640 | |
Self time: 0.000221 | |
count total (s) self (s) | |
8 0.000014 let name = b:buffer_vcs_config['git'].branch | |
8 0.000007 try | |
8 0.000473 0.000054 let commit = fugitive#buffer().commit() | |
8 0.000032 if has_key(s:names, commit) | |
let name = get(s:names, commit)."(".name.")" | |
elseif !empty(commit) | |
let ref = fugitive#repo().git_chomp('describe', '--all', '--exact-match', commit) | |
if ref !~ "^fatal: no tag exactly matches" | |
let name = s:format_name(substitute(ref, '\v\C^%(heads/|remotes/|tags/)=','',''))."(".name.")" | |
else | |
let name = matchstr(commit, '.\{'.s:sha1size.'}')."(".name.")" | |
endif | |
endif | |
8 0.000007 catch | |
endtry | |
8 0.000006 return name | |
FUNCTION ncm2#_au_plugin() | |
Called 5 times | |
Total time: 0.000897 | |
Self time: 0.000809 | |
count total (s) self (s) | |
5 0.000005 try | |
5 0.000137 au User Ncm2Plugin silent | |
5 0.000138 0.000050 doau <nomodeline> User Ncm2Plugin | |
5 0.000566 au! User Ncm2Plugin | |
5 0.000004 catch | |
call s:core.error(v:exception) | |
endtry | |
5 0.000017 if has_key(s:subscope_detectors, &filetype) | |
call s:warmup() | |
endif | |
FUNCTION <SNR>184_expand_cmd() | |
Called 7 times | |
Total time: 0.000469 | |
Self time: 0.000165 | |
count total (s) self (s) | |
7 0.000020 let cmd = a:vcs_cmds[a:vcs] | |
7 0.000289 0.000064 let cmd = s:replace(cmd, '%f', s:get_vcs_path(a:vcs)) | |
7 0.000071 0.000030 let cmd = s:replace(cmd, '%d', s:difftool) | |
7 0.000063 0.000025 let cmd = s:replace(cmd, '%n', s:devnull) | |
7 0.000007 return cmd | |
FUNCTION airline#extensions#tabline#add_label() | |
Called 59 times | |
Total time: 0.001285 | |
Self time: 0.000611 | |
count total (s) self (s) | |
59 0.000195 if get(g:, 'airline#extensions#tabline#show_tab_type', 1) | |
59 0.001022 0.000348 call a:dict.add_section_spaced('airline_tablabel', get(g:, 'airline#extensions#tabline#'.a:type.'_label', a:type)) | |
59 0.000031 endif | |
FUNCTION yarp#core#try_notify() | |
Called 91 times | |
Total time: 0.010724 | |
Self time: 0.009646 | |
count total (s) self (s) | |
91 0.001395 0.000317 call self.jobstart() | |
91 0.000184 if get(self, 'job_is_dead', 0) | |
call self.error('try_notify ' . a:method . ' failed, job is dead') | |
return 0 | |
endif | |
91 0.000149 if !has_key(self, 'channel') | |
" not yet started | |
return 0 | |
endif | |
91 0.000323 let args = [self.channel, a:method] + a:000 | |
91 0.000096 try | |
91 0.007013 call call(s:rpcnotify, args) | |
91 0.000129 return 1 | |
catch | |
call self.error('try_notify ' . s:rpcnotify . ' ' . a:method . ' failed: ' . v:exception . ', ' . string(args)) | |
return 0 | |
endtry | |
FUNCTION <SNR>130_Get() | |
Called 14392 times | |
Total time: 0.056147 | |
Self time: 0.056147 | |
count total (s) self (s) | |
14392 0.022860 let res=get(a:dict, a:key, '') | |
14392 0.010174 if res is '' | |
6018 0.002590 return '' | |
else | |
8374 0.008573 return a:prefix. res | |
endif | |
FUNCTION <SNR>136_try_rnotify() | |
Called 79 times | |
Total time: 0.024722 | |
Self time: 0.004584 | |
count total (s) self (s) | |
79 0.000298 let g:ncm2#core_event = [a:event, a:000] | |
79 0.000165 let g:ncm2#core_data = {} | |
79 0.004825 0.002233 doau <nomodeline> User Ncm2CoreData | |
79 0.008023 0.000470 let data = ncm2#_core_data(a:event) | |
79 0.000122 let g:ncm2#core_data = {} | |
79 0.000128 let g:ncm2#core_event = [] | |
79 0.011062 0.001069 return call(s:core.try_notify, [a:event, data] + a:000, s:core) | |
FUNCTION <SNR>144_buffer_type() | |
Called 9 times | |
Total time: 0.001106 | |
Self time: 0.000538 | |
count total (s) self (s) | |
9 0.000043 0.000026 if !empty(self.getvar('fugitive_type')) | |
let type = self.getvar('fugitive_type') | |
elseif fnamemodify(self.spec(),':p') =~# '\.git/refs/\|\.git/\w*HEAD$' | |
let type = 'head' | |
elseif self.getline(1) =~ '^tree \x\{40\}$' && self.getline(2) == '' | |
let type = 'tree' | |
elseif self.getline(1) =~ '^\d\{6\} \w\{4\} \x\{40\}\>\t' | |
let type = 'tree' | |
elseif self.getline(1) =~ '^\d\{6\} \x\{40\}\> \d\t' | |
let type = 'index' | |
elseif isdirectory(self.spec()) | |
let type = 'directory' | |
elseif self.spec() == '' | |
let type = 'null' | |
else | |
9 0.000008 let type = 'file' | |
9 0.000004 endif | |
9 0.000005 if a:0 | |
9 0.000042 return !empty(filter(copy(a:000),'v:val ==# type')) | |
else | |
return type | |
endif | |
FUNCTION gutentags#setup_gutentags() | |
Called 5 times | |
Total time: 0.001762 | |
Self time: 0.000994 | |
count total (s) self (s) | |
5 0.000012 if exists('b:gutentags_files') && !g:gutentags_debug | |
" This buffer already has gutentags support. | |
return | |
endif | |
" Don't setup gutentags for anything that's not a normal buffer | |
" (so don't do anything for help buffers and quickfix windows and | |
" other such things) | |
" Also don't do anything for the default `[No Name]` buffer you get | |
" after starting Vim. | |
5 0.000019 if &buftype != '' || (bufname('%') == '' && !g:gutentags_generate_on_empty_buffer) | |
return | |
endif | |
" Let the user specify custom ways to disable Gutentags. | |
5 0.000015 if g:gutentags_init_user_func != '' &&!call(g:gutentags_init_user_func, [expand('%:p')]) | |
call gutentags#trace("Ignoring '" . bufname('%') . "' because of " ."custom user function.") | |
return | |
endif | |
" Try and find what tags file we should manage. | |
5 0.000053 0.000028 call gutentags#trace("Scanning buffer '" . bufname('%') . "' for gutentags setup...") | |
5 0.000006 try | |
5 0.000028 let l:buf_dir = expand('%:p:h', 1) | |
5 0.000006 if g:gutentags_resolve_symlinks | |
let l:buf_dir = fnamemodify(resolve(expand('%:p', 1)), ':p:h') | |
endif | |
5 0.000007 if !exists('b:gutentags_root') | |
5 0.000404 0.000028 let b:gutentags_root = gutentags#get_project_root(l:buf_dir) | |
5 0.000003 endif | |
5 0.000031 if filereadable(b:gutentags_root . '/.notags') | |
call gutentags#trace("'.notags' file found... no gutentags support.") | |
return | |
endif | |
5 0.000013 if !has_key(s:known_projects, b:gutentags_root) | |
call s:cache_project_root(b:gutentags_root) | |
endif | |
5 0.000004 if g:gutentags_trace | |
let l:projnfo = gutentags#get_project_info(b:gutentags_root) | |
if l:projnfo != {} | |
call gutentags#trace("Setting project type to ".l:projnfo['type']) | |
else | |
call gutentags#trace("No specific project type.") | |
endif | |
endif | |
5 0.000006 let b:gutentags_files = {} | |
10 0.000011 for module in g:gutentags_modules | |
5 0.000377 0.000030 call call("gutentags#".module."#init", [b:gutentags_root]) | |
5 0.000003 endfor | |
5 0.000005 catch /^gutentags\:/ | |
call gutentags#trace("No gutentags support for this buffer.") | |
return | |
endtry | |
" We know what tags file to manage! Now set things up. | |
5 0.000040 0.000021 call gutentags#trace("Setting gutentags for buffer '".bufname('%')."'") | |
" Autocommands for updating the tags on save. | |
" We need to pass the buffer number to the callback function in the rare | |
" case that the current buffer is changed by another `BufWritePost` | |
" callback. This will let us get that buffer's variables without causing | |
" errors. | |
5 0.000008 let l:bn = bufnr('%') | |
5 0.000076 execute 'augroup gutentags_buffer_' . l:bn | |
5 0.000187 execute ' autocmd!' | |
5 0.000071 execute ' autocmd BufWritePost <buffer=' . l:bn . '> call s:write_triggered_update_tags(' . l:bn . ')' | |
5 0.000008 execute 'augroup end' | |
" Miscellaneous commands. | |
5 0.000026 command! -buffer -bang GutentagsUpdate :call s:manual_update_tags(<bang>0) | |
" Add these tags files to the known tags files. | |
10 0.000018 for module in keys(b:gutentags_files) | |
5 0.000010 let l:tagfile = b:gutentags_files[module] | |
5 0.000015 let l:found = index(s:known_files, l:tagfile) | |
5 0.000005 if l:found < 0 | |
call add(s:known_files, l:tagfile) | |
" Generate this new file depending on settings and stuff. | |
if g:gutentags_enabled | |
if g:gutentags_generate_on_missing && !filereadable(l:tagfile) | |
call gutentags#trace("Generating missing tags file: " . l:tagfile) | |
call s:update_tags(l:bn, module, 1, 1) | |
elseif g:gutentags_generate_on_new | |
call gutentags#trace("Generating tags file: " . l:tagfile) | |
call s:update_tags(l:bn, module, 1, 1) | |
endif | |
endif | |
endif | |
5 0.000003 endfor | |
FUNCTION _denite_start() | |
Called 5 times | |
Total time: 21.606710 | |
Self time: 0.000091 | |
count total (s) self (s) | |
5 21.606706 0.000086 return remote#define#request(110, "/home/languitar/.local/share/nvim/bundle/denite.nvim/rplugin/python3/denite:function:_denite_start", a:000) | |
FUNCTION test#go#gotest#test_file() | |
Called 6 times | |
Total time: 0.000198 | |
Self time: 0.000048 | |
count total (s) self (s) | |
6 0.000195 0.000045 return test#go#test_file('gotest', g:test#go#gotest#file_pattern, a:file) | |
FUNCTION ale#engine#IsCheckingBuffer() | |
Called 30 times | |
Total time: 0.000266 | |
Self time: 0.000266 | |
count total (s) self (s) | |
30 0.000115 let l:info = get(g:ale_buffer_info, a:buffer, {}) | |
30 0.000111 return !empty(get(l:info, 'active_linter_list', [])) | |
FUNCTION airline#extensions#fugitiveline#bufname() | |
Called 1759 times | |
Total time: 0.059243 | |
Self time: 0.057986 | |
count total (s) self (s) | |
1759 0.005706 if !exists('b:fugitive_name') | |
12 0.000017 let b:fugitive_name = '' | |
12 0.000010 try | |
12 0.000119 if bufname('%') =~? '^fugitive:' && exists('*FugitiveReal') | |
let b:fugitive_name = FugitiveReal(bufname('%')) | |
elseif exists('b:git_dir') | |
9 0.000197 0.000047 let buffer = fugitive#buffer() | |
9 0.001136 0.000029 if buffer.type('blob') | |
let b:fugitive_name = buffer.repo().translate(buffer.path('/')) | |
endif | |
9 0.000003 endif | |
12 0.000007 catch | |
endtry | |
12 0.000005 endif | |
1759 0.002971 if empty(b:fugitive_name) | |
1759 0.017480 return fnamemodify(bufname('%'), s:fmod) | |
else | |
return fnamemodify(b:fugitive_name, s:fmod) | |
endif | |
FUNCTION ncm2_ultisnips#on_complete() | |
Called 5 times | |
Total time: 0.019348 | |
Self time: 0.000147 | |
count total (s) self (s) | |
5 0.017796 0.000060 let snips = UltiSnips#SnippetsInCurrentScope() | |
5 0.000043 let matches = map(keys(snips),'{"word":v:val, "dup":1, "icase":1, "menu": l:snips[v:val], "user_data": {"is_snippet": 1}}') | |
5 0.001503 0.000039 call ncm2#complete(a:ctx, a:ctx['startccol'], matches) | |
FUNCTION neoyank#_load() | |
Called 18 times | |
Total time: 0.002478 | |
Self time: 0.000682 | |
count total (s) self (s) | |
18 0.000523 if !filereadable(g:neoyank#file) || s:yank_histories_file_mtime == getftime(g:neoyank#file) | |
17 0.000012 return | |
endif | |
1 0.000070 let file = readfile(g:neoyank#file) | |
" Version check. | |
1 0.000004 if empty(file) || len(file) != 2 || file[0] !=# s:VERSION | |
return | |
endif | |
1 0.000001 try | |
1 0.000097 0.000009 let yank_histories = s:json2vim(file[1]) | |
1 0.000001 catch | |
unlet! yank_histories | |
let yank_histories = {} | |
endtry | |
1 0.000002 if type(yank_histories) != type({}) | |
unlet! yank_histories | |
let yank_histories = {} | |
endif | |
2 0.000003 for register in g:neoyank#save_registers | |
1 0.000002 if !has_key(s:yank_histories, register) | |
let s:yank_histories[register] = [] | |
endif | |
1 0.000011 let s:yank_histories[register] = get(yank_histories, register, []) + s:yank_histories[register] | |
1 0.001713 0.000005 call s:uniq(register) | |
1 0.000000 endfor | |
1 0.000005 let s:yank_histories_file_mtime = getftime(g:neoyank#file) | |
FUNCTION <SNR>145_IsFalse() | |
Called 1 time | |
Total time: 0.000055 | |
Self time: 0.000026 | |
count total (s) self (s) | |
1 0.000054 0.000025 return s:IsTrue(a:v) ? v:false : v:true | |
FUNCTION <SNR>144_PlatformSlash() | |
Called 5 times | |
Total time: 0.000022 | |
Self time: 0.000022 | |
count total (s) self (s) | |
5 0.000008 if exists('+shellslash') && !&shellslash | |
return tr(a:path, '/', '\') | |
else | |
5 0.000004 return a:path | |
endif | |
FUNCTION <SNR>133_section_is_empty() | |
Called 3718 times | |
Total time: 0.020751 | |
Self time: 0.020751 | |
count total (s) self (s) | |
3718 0.003507 let start=1 | |
" do not check for inactive windows or the tabline | |
3718 0.003593 if a:self._context.active == 0 | |
605 0.000412 return 0 | |
elseif get(a:self._context, 'tabline', 0) | |
2505 0.001225 return 0 | |
endif | |
" only check, if airline#skip_empty_sections == 1 | |
608 0.001044 if get(g:, 'airline_skip_empty_sections', 0) == 0 | |
608 0.000318 return 0 | |
endif | |
" only check, if airline#skip_empty_sections == 1 | |
if get(w:, 'airline_skip_empty_sections', -1) == 0 | |
return 0 | |
endif | |
" assume accents sections to be never empty | |
" (avoides, that on startup the mode message becomes empty) | |
if match(a:content, '%#__accent_[^#]*#.*__restore__#') > -1 | |
return 0 | |
endif | |
if empty(a:content) | |
return 1 | |
endif | |
let list=matchlist(a:content, '%{\zs.\{-}\ze}', 1, start) | |
if empty(list) | |
return 0 " no function in statusline text | |
endif | |
while len(list) > 0 | |
let expr = list[0] | |
try | |
" catch all exceptions, just in case | |
if !empty(eval(expr)) | |
return 0 | |
endif | |
catch | |
return 0 | |
endtry | |
let start += 1 | |
let list=matchlist(a:content, '%{\zs.\{-}\ze}', 1, start) | |
endw | |
return 1 | |
FUNCTION <SNR>144_cpath() | |
Called 5 times | |
Total time: 0.000097 | |
Self time: 0.000075 | |
count total (s) self (s) | |
5 0.000010 if exists('+fileignorecase') && &fileignorecase | |
let path = s:PlatformSlash(tolower(a:path)) | |
else | |
5 0.000039 0.000018 let path = s:PlatformSlash(a:path) | |
5 0.000002 endif | |
5 0.000028 return a:0 ? path ==# s:cpath(a:1) : path | |
FUNCTION FugitiveGitDir() | |
Called 1563 times | |
Total time: 0.008236 | |
Self time: 0.008236 | |
count total (s) self (s) | |
1563 0.002723 if !a:0 || a:1 ==# -1 | |
1563 0.004150 return get(b:, 'git_dir', '') | |
elseif type(a:1) == type(0) | |
return getbufvar(a:1, 'git_dir') | |
elseif type(a:1) == type('') | |
return substitute(s:Slash(a:1), '/$', '', '') | |
else | |
return '' | |
endif | |
FUNCTION ale#events#FileTypeEvent() | |
Called 5 times | |
Total time: 0.001202 | |
Self time: 0.000088 | |
count total (s) self (s) | |
" The old filetype will be set to an empty string by the BuFEnter event, | |
" and not linting when the old filetype hasn't been set yet prevents | |
" buffers being checked when you enter them when linting on enter is off. | |
5 0.000016 let l:old_filetype = getbufvar(a:buffer, 'ale_original_filetype', v:null) | |
5 0.000016 if l:old_filetype isnot v:null&& !empty(a:new_filetype)&& a:new_filetype isnot# l:old_filetype | |
" Remember what the new filetype is. | |
5 0.000012 call setbufvar(a:buffer, 'ale_original_filetype', a:new_filetype) | |
5 0.000007 if g:ale_lint_on_filetype_changed | |
5 0.001133 0.000018 call ale#Queue(300, 'lint_file', a:buffer) | |
5 0.000002 endif | |
5 0.000002 endif | |
FUNCTION ale#engine#ProcessChain() | |
Called 10 times | |
Total time: 0.052285 | |
Self time: 0.001647 | |
count total (s) self (s) | |
10 0.000047 let l:output_stream = get(a:linter, 'output_stream', 'stdout') | |
10 0.000031 let l:read_buffer = a:linter.read_buffer | |
10 0.000025 let l:chain_index = a:chain_index | |
10 0.000021 let l:input = a:input | |
10 0.000029 if has_key(a:linter, 'command_chain') | |
20 0.000083 while l:chain_index < len(a:linter.command_chain) | |
" Run a chain of commands, one asynchronous command after the other, | |
" so that many programs can be run in a sequence. | |
20 0.000078 let l:chain_item = a:linter.command_chain[l:chain_index] | |
20 0.000036 if l:chain_index == 0 | |
" The first callback in the chain takes only a buffer number. | |
10 0.024707 0.000114 let l:command = ale#util#GetFunction(l:chain_item.callback)( a:buffer) | |
10 0.000010 else | |
" The second callback in the chain takes some input too. | |
10 0.026169 0.000124 let l:command = ale#util#GetFunction(l:chain_item.callback)( a:buffer, l:input) | |
10 0.000010 endif | |
" If we have a command to run, execute that. | |
20 0.000051 if !empty(l:command) | |
" The chain item can override the output_stream option. | |
10 0.000033 if has_key(l:chain_item, 'output_stream') | |
10 0.000033 let l:output_stream = l:chain_item.output_stream | |
10 0.000009 endif | |
" The chain item can override the read_buffer option. | |
10 0.000030 if has_key(l:chain_item, 'read_buffer') | |
let l:read_buffer = l:chain_item.read_buffer | |
elseif l:chain_index != len(a:linter.command_chain) - 1 | |
" Don't read the buffer for commands besides the last one | |
" in the chain by default. | |
let l:read_buffer = 0 | |
endif | |
10 0.000014 break | |
endif | |
" Command chain items can return an empty string to indicate that | |
" a command should be skipped, so we should try the next item | |
" with no input. | |
10 0.000021 let l:input = [] | |
10 0.000028 let l:chain_index += 1 | |
10 0.000010 endwhile | |
10 0.000010 else | |
let l:command = ale#linter#GetCommand(a:buffer, a:linter) | |
endif | |
10 0.000107 return { 'command': l:command, 'buffer': a:buffer, 'linter': a:linter, 'output_stream': l:output_stream, 'next_chain_index': l:chain_index + 1, 'read_buffer': l:read_buffer,} | |
FUNCTION <SNR>130_CheckDefined() | |
Called 143654 times | |
Total time: 1.959243 | |
Self time: 1.959243 | |
count total (s) self (s) | |
" Checks, whether the definition of the colors is valid and is not empty or NONE | |
" e.g. if the colors would expand to this: | |
" hi airline_c ctermfg=NONE ctermbg=NONE | |
" that means to clear that highlighting group, therefore, fallback to Normal | |
" highlighting group for the cterm values | |
" This only works, if the Normal highlighting group is actually defined, so | |
" return early, if it has been cleared | |
143654 0.290045 if !exists("g:airline#highlighter#normal_fg_hi") | |
10 0.000633 let g:airline#highlighter#normal_fg_hi = synIDattr(synIDtrans(hlID('Normal')), 'fg', 'cterm') | |
10 0.000009 endif | |
143654 0.298491 if empty(g:airline#highlighter#normal_fg_hi) || g:airline#highlighter#normal_fg_hi < 0 | |
return a:colors | |
endif | |
143654 0.208932 for val in a:colors | |
143654 0.223970 if !empty(val) && val !=# 'NONE' | |
143654 0.101541 return a:colors | |
endif | |
endfor | |
" this adds the bold attribute to the term argument of the :hi command, | |
" but at least this makes sure, the group will be defined | |
let fg = g:airline#highlighter#normal_fg_hi | |
let bg = synIDattr(synIDtrans(hlID('Normal')), 'bg', 'cterm') | |
if bg < 0 | |
" in case there is no background color defined for Normal | |
let bg = a:colors[3] | |
endif | |
return a:colors[0:1] + [fg, bg] + [a:colors[4]] | |
FUNCTION denite#get_status_mode() | |
Called 18 times | |
Total time: 0.000271 | |
Self time: 0.000122 | |
count total (s) self (s) | |
18 0.000256 0.000107 return denite#get_status('mode') | |
FUNCTION gutentags#statusline() | |
Called 1759 times | |
Total time: 0.055584 | |
Self time: 0.013872 | |
count total (s) self (s) | |
1759 0.049056 0.007344 let l:modules_in_progress = gutentags#inprogress() | |
1759 0.003096 if empty(l:modules_in_progress) | |
1737 0.001381 return '' | |
endif | |
22 0.000026 let l:prefix = '' | |
22 0.000020 let l:suffix = '' | |
22 0.000040 if a:0 > 0 | |
let l:prefix = a:1 | |
endif | |
22 0.000017 if a:0 > 1 | |
let l:suffix = a:2 | |
endif | |
22 0.000015 if a:0 > 2 | |
let l:genmsg = a:3 | |
else | |
22 0.000067 let l:genmsg = join(l:modules_in_progress, ',') | |
22 0.000025 endif | |
22 0.000046 return l:prefix.l:genmsg.l:suffix | |
FUNCTION ncm2#menu_selected() | |
Called 10 times | |
Total time: 0.000097 | |
Self time: 0.000097 | |
count total (s) self (s) | |
" Note: If arrow key is used instead of <c-n> and <c-p>, | |
" ncm2#menu_selected will not work. | |
10 0.000061 return pumvisible() && !empty(v:completed_item) | |
FUNCTION denite#util#substitute_path_separator() | |
Called 16 times | |
Total time: 0.000138 | |
Self time: 0.000138 | |
count total (s) self (s) | |
16 0.000118 return s:is_windows ? substitute(a:path, '\\', '/', 'g') : a:path | |
FUNCTION airline#extensions#tabline#get() | |
Called 187 times | |
Total time: 1.694350 | |
Self time: 0.011939 | |
count total (s) self (s) | |
187 0.002126 let show_buffers = get(g:, 'airline#extensions#tabline#show_buffers', 1) | |
187 0.000827 let show_tabs = get(g:, 'airline#extensions#tabline#show_tabs', 1) | |
187 0.000743 let curtabcnt = tabpagenr('$') | |
187 0.000629 if curtabcnt != s:current_tabcnt | |
let s:current_tabcnt = curtabcnt | |
call airline#extensions#tabline#tabs#invalidate() | |
call airline#extensions#tabline#buffers#invalidate() | |
call airline#extensions#tabline#ctrlspace#invalidate() | |
endif | |
187 0.000980 if !exists('#airline#BufAdd#*') | |
autocmd airline BufAdd * call <sid>update_tabline() | |
endif | |
187 0.000251 if s:ctrlspace | |
return airline#extensions#tabline#ctrlspace#get() | |
elseif show_buffers && curtabcnt == 1 || !show_tabs | |
187 1.684139 0.001728 return airline#extensions#tabline#buffers#get() | |
else | |
return airline#extensions#tabline#tabs#get() | |
endif | |
FUNCTION airline#async#nvim_vcs_untracked() | |
Called 84 times | |
Total time: 0.241304 | |
Self time: 0.240608 | |
count total (s) self (s) | |
84 0.000387 let cmd = a:cfg.cmd . shellescape(a:file) | |
84 0.000101 let id = -1 | |
84 0.001808 0.001112 let config = { 'buf': '', 'vcs': a:vcs, 'cfg': a:cfg, 'file': a:file, 'cwd': s:valid_dir(fnamemodify(a:file, ':p:h')) } | |
84 0.000269 if has("nvim") | |
84 0.001108 call extend(config, { 'on_stdout': function('s:nvim_output_handler'), 'on_exit': function('s:nvim_untracked_job_handler')}) | |
84 0.000228 if has_key(s:untracked_jobs, config.file) | |
" still running | |
68 0.000041 return | |
endif | |
16 0.000012 try | |
16 0.236321 let id = jobstart(cmd, config) | |
16 0.000076 catch | |
" catch-all, jobstart() failed, fall back to system() | |
let id=-1 | |
endtry | |
16 0.000159 let s:untracked_jobs[a:file] = id | |
16 0.000035 endif | |
" vim without job feature or nvim jobstart failed | |
16 0.000031 if id < 1 | |
let output=system(cmd) | |
call s:untracked_output(config, output) | |
call airline#extensions#branch#update_untracked_config(a:file, a:vcs) | |
endif | |
FUNCTION denite#custom#_get() | |
Called 5 times | |
Total time: 0.000070 | |
Self time: 0.000070 | |
count total (s) self (s) | |
5 0.000026 if !exists('s:custom') | |
call denite#custom#_init() | |
endif | |
5 0.000011 return s:custom | |
FUNCTION LSP#character() | |
Called 4 times | |
Total time: 0.000025 | |
Self time: 0.000025 | |
count total (s) self (s) | |
4 0.000021 return col('.') - 1 | |
FUNCTION <SNR>133_get_transitioned_seperator() | |
Called 1121 times | |
Total time: 1.788703 | |
Self time: 0.032073 | |
count total (s) self (s) | |
1121 0.001161 let line = '' | |
1121 0.897306 0.004531 call airline#highlighter#add_separator(a:prev_group, a:group, a:side) | |
1121 0.004106 if get(a:self._context, 'tabline', 0) && get(g:, 'airline#extensions#tabline#alt_sep', 0) && a:group ==# 'airline_tabsel' && a:side | |
call airline#highlighter#add_separator(a:prev_group, a:group, 0) | |
let line .= '%#'.a:prev_group.'_to_'.a:group.'#' | |
let line .= a:self._context.right_sep.'%#'.a:group.'#' | |
else | |
1121 0.868548 0.004693 call airline#highlighter#add_separator(a:prev_group, a:group, a:side) | |
1121 0.003705 let line .= '%#'.a:prev_group.'_to_'.a:group.'#' | |
1121 0.003266 let line .= a:side ? a:self._context.left_sep : a:self._context.right_sep | |
1121 0.001938 let line .= '%#'.a:group.'#' | |
1121 0.000501 endif | |
1121 0.000901 return line | |
FUNCTION airline#builder#get_prev_group() | |
Called 3777 times | |
Total time: 0.035094 | |
Self time: 0.035094 | |
count total (s) self (s) | |
3777 0.004541 let x = a:i - 1 | |
6003 0.004414 while x >= 0 | |
5577 0.007545 let group = a:sections[x][0] | |
5577 0.006304 if group != '' && group != '|' | |
3351 0.002291 return group | |
endif | |
2226 0.001824 let x = x - 1 | |
2226 0.000923 endwhile | |
426 0.000282 return '' | |
FUNCTION <SNR>150_uniq() | |
Called 1 time | |
Total time: 0.001708 | |
Self time: 0.000026 | |
count total (s) self (s) | |
1 0.001695 0.000012 let history = s:uniq_by(s:yank_histories[a:name], 'v:val') | |
1 0.000002 if g:neoyank#limit < len(history) | |
let history = history[ : g:neoyank#limit - 1] | |
endif | |
1 0.000009 let s:yank_histories[a:name] = history | |
FUNCTION test#execute() | |
Called 3 times | |
Total time: 0.212931 | |
Self time: 0.000202 | |
count total (s) self (s) | |
3 0.000047 0.000018 let strategy = s:extract_strategy_from_command(a:args) | |
3 0.000004 if empty(strategy) | |
3 0.000004 if !empty(a:000) | |
let strategy = a:1 | |
else | |
3 0.000007 let strategy = get(g:, 'test#strategy') | |
3 0.000002 endif | |
3 0.000002 endif | |
3 0.000004 if empty(strategy) | |
let strategy = 'basic' | |
endif | |
3 0.000004 let args = a:args | |
3 0.000048 0.000011 let args = test#base#options(a:runner) + args | |
3 0.000010 call filter(args, '!empty(v:val)') | |
3 0.000045 0.000013 let executable = test#base#executable(a:runner) | |
3 0.000034 0.000013 let args = test#base#build_args(a:runner, args) | |
3 0.000006 let cmd = [executable] + args | |
3 0.000012 call filter(cmd, '!empty(v:val)') | |
3 0.212664 0.000055 call test#shell(join(cmd), strategy) | |
FUNCTION gutentags#ctags#generate() | |
Called 7 times | |
Total time: 0.107823 | |
Self time: 0.001535 | |
count total (s) self (s) | |
7 0.000016 let l:write_mode = a:gen_opts['write_mode'] | |
7 0.000053 let l:tags_file_exists = filereadable(a:tags_file) | |
7 0.000038 let l:tags_file_relative = fnamemodify(a:tags_file, ':.') | |
7 0.000022 let l:tags_file_is_local = len(l:tags_file_relative) < len(a:tags_file) | |
7 0.000011 if l:tags_file_exists && g:gutentags_ctags_check_tagfile | |
let l:first_lines = readfile(a:tags_file, '', 1) | |
if len(l:first_lines) == 0 || stridx(l:first_lines[0], '!_TAG_') != 0 | |
call gutentags#throw("File ".a:tags_file." doesn't appear to be "."a ctags file. Please delete it and run ".":GutentagsUpdate!.") | |
return | |
endif | |
endif | |
7 0.000015 if empty(g:gutentags_cache_dir) && l:tags_file_is_local | |
" If we don't use the cache directory, we can pass relative paths | |
" around. | |
" | |
" Note that if we don't do this and pass a full path for the project | |
" root, some `ctags` implementations like Exhuberant Ctags can get | |
" confused if the paths have spaces -- but not if you're *in* the root | |
" directory, for some reason... (which we are, our caller in | |
" `autoload/gutentags.vim` changed it). | |
7 0.000009 let l:actual_proj_dir = '.' | |
7 0.000010 let l:actual_tags_file = l:tags_file_relative | |
7 0.000003 else | |
" else: the tags file goes in a cache directory, so we need to specify | |
" all the paths absolutely for `ctags` to do its job correctly. | |
let l:actual_proj_dir = a:proj_dir | |
let l:actual_tags_file = a:tags_file | |
endif | |
" Build the command line. | |
7 0.000015 let l:cmd = [s:runner_exe] | |
7 0.000296 0.000045 let l:cmd += ['-e', '"' . s:get_ctags_executable(a:proj_dir) . '"'] | |
7 0.000017 let l:cmd += ['-t', '"' . l:actual_tags_file . '"'] | |
7 0.000013 let l:cmd += ['-p', '"' . l:actual_proj_dir . '"'] | |
7 0.000010 if l:write_mode == 0 && l:tags_file_exists | |
7 0.000067 let l:cur_file_path = expand('%:p') | |
7 0.000013 if empty(g:gutentags_cache_dir) && l:tags_file_is_local | |
7 0.000023 let l:cur_file_path = fnamemodify(l:cur_file_path, ':.') | |
7 0.000003 endif | |
7 0.000014 let l:cmd += ['-s', '"' . l:cur_file_path . '"'] | |
7 0.000003 else | |
let l:file_list_cmd = gutentags#get_project_file_list_cmd(l:actual_proj_dir) | |
if !empty(l:file_list_cmd) | |
if match(l:file_list_cmd, '///') > 0 | |
let l:suffopts = split(l:file_list_cmd, '///') | |
let l:suffoptstr = l:suffopts[1] | |
let l:file_list_cmd = l:suffopts[0] | |
if l:suffoptstr == 'absolute' | |
let l:cmd += ['-A'] | |
endif | |
endif | |
let l:cmd += ['-L', '"' . l:file_list_cmd. '"'] | |
endif | |
endif | |
7 0.000015 if empty(get(l:, 'file_list_cmd', '')) | |
" Pass the Gutentags recursive options file before the project | |
" options file, so that users can override --recursive. | |
" Omit --recursive if this project uses a file list command. | |
7 0.000053 0.000035 let l:cmd += ['-o', '"' . gutentags#get_res_file('ctags_recursive.options') . '"'] | |
7 0.000022 endif | |
7 0.000019 if !empty(g:gutentags_ctags_extra_args) | |
let l:cmd += ['-O', shellescape(join(g:gutentags_ctags_extra_args))] | |
endif | |
7 0.000011 if !empty(g:gutentags_ctags_post_process_cmd) | |
let l:cmd += ['-P', shellescape(g:gutentags_ctags_post_process_cmd)] | |
endif | |
7 0.000018 let l:proj_options_file = a:proj_dir . '/' .g:gutentags_ctags_options_file | |
7 0.000029 if filereadable(l:proj_options_file) | |
let l:proj_options_file = s:process_options_file(a:proj_dir, l:proj_options_file) | |
let l:cmd += ['-o', '"' . l:proj_options_file . '"'] | |
endif | |
7 0.000008 if g:gutentags_ctags_exclude_wildignore | |
14 0.000034 for ign in split(&wildignore, ',') | |
7 0.000036 let l:cmd += ['-x', shellescape(ign, 1)] | |
7 0.000005 endfor | |
7 0.000003 endif | |
7 0.000010 for exc in g:gutentags_ctags_exclude | |
let l:cmd += ['-x', '"' . exc . '"'] | |
endfor | |
7 0.000007 if g:gutentags_pause_after_update | |
let l:cmd += ['-c'] | |
endif | |
7 0.000006 if g:gutentags_trace | |
let l:cmd += ['-l', '"' . l:actual_tags_file . '.log"'] | |
endif | |
7 0.000962 0.000032 let l:cmd = gutentags#make_args(l:cmd) | |
7 0.000108 0.000057 call gutentags#trace("Running: " . string(l:cmd)) | |
7 0.000054 0.000027 call gutentags#trace("In: " . getcwd()) | |
7 0.000006 if !g:gutentags_fake | |
7 0.000167 0.000028 let l:job_opts = gutentags#build_default_job_options('ctags') | |
7 0.104898 0.000135 let l:job = gutentags#start_job(l:cmd, l:job_opts) | |
7 0.000289 0.000181 call gutentags#add_job('ctags', a:tags_file, l:job) | |
7 0.000014 else | |
call gutentags#trace("(fake... not actually running)") | |
endif | |
FUNCTION airline#extensions#whitespace#check() | |
Called 1563 times | |
Total time: 0.109658 | |
Self time: 0.083204 | |
count total (s) self (s) | |
1563 0.005867 let max_lines = get(g:, 'airline#extensions#whitespace#max_lines', 20000) | |
1563 0.007664 if &readonly || !&modifiable || !s:enabled || line('$') > max_lines || get(b:, 'airline_whitespace_disabled', 0) | |
951 0.000639 return '' | |
endif | |
612 0.005923 let skip_check_ft = extend(s:skip_check_ft, get(g:, 'airline#extensions#whitespace#skip_indent_check_ft', {}), 'force') | |
612 0.001888 if !exists('b:airline_whitespace_check') | |
8 0.000024 let b:airline_whitespace_check = '' | |
8 0.000059 let checks = get(b:, 'airline_whitespace_checks', get(g:, 'airline#extensions#whitespace#checks', s:default_checks)) | |
8 0.000010 let trailing = 0 | |
8 0.000010 let check = 'trailing' | |
8 0.000039 if index(checks, check) > -1 && index(get(skip_check_ft, &ft, []), check) < 0 | |
try | |
let regexp = get(g:, 'airline#extensions#whitespace#trailing_regexp', '\s$') | |
let trailing = search(regexp, 'nw') | |
catch | |
echomsg 'airline#whitespace: error occurred evaluating '. regexp | |
echomsg v:exception | |
return '' | |
endtry | |
endif | |
8 0.000010 let mixed = 0 | |
8 0.000009 let check = 'indent' | |
8 0.000062 if index(checks, check) > -1 && index(get(skip_check_ft, &ft, []), check) < 0 | |
8 0.014237 0.000053 let mixed = s:check_mixed_indent() | |
8 0.000009 endif | |
8 0.000014 let mixed_file = '' | |
8 0.000012 let check = 'mixed-indent-file' | |
8 0.000068 if index(checks, check) > -1 && index(get(skip_check_ft, &ft, []), check) < 0 | |
8 0.000723 0.000054 let mixed_file = s:check_mixed_indent_file() | |
8 0.000004 endif | |
8 0.000010 let long = 0 | |
8 0.000018 if index(checks, 'long') > -1 && &tw > 0 | |
let long = search('\%>'.&tw.'v.\+', 'nw') | |
endif | |
8 0.000027 if trailing != 0 || mixed != 0 || long != 0 || !empty(mixed_file) | |
let b:airline_whitespace_check = s:symbol | |
if strlen(s:symbol) > 0 | |
let space = (g:airline_symbols.space) | |
else | |
let space = '' | |
endif | |
if s:show_message | |
if trailing != 0 | |
let trailing_fmt = get(g:, 'airline#extensions#whitespace#trailing_format', '[%s]trailing') | |
let b:airline_whitespace_check .= space.printf(trailing_fmt, trailing) | |
endif | |
if mixed != 0 | |
let mixed_indent_fmt = get(g:, 'airline#extensions#whitespace#mixed_indent_format', '[%s]mixed-indent') | |
let b:airline_whitespace_check .= space.printf(mixed_indent_fmt, mixed) | |
endif | |
if long != 0 | |
let long_fmt = get(g:, 'airline#extensions#whitespace#long_format', '[%s]long') | |
let b:airline_whitespace_check .= space.printf(long_fmt, long) | |
endif | |
if !empty(mixed_file) | |
let mixed_indent_file_fmt = get(g:, 'airline#extensions#whitespace#mixed_indent_file_format', '[%s]mix-indent-file') | |
let b:airline_whitespace_check .= space.printf(mixed_indent_file_fmt, mixed_file) | |
endif | |
endif | |
endif | |
8 0.000005 endif | |
612 0.018600 0.006999 return airline#util#shorten(b:airline_whitespace_check, 120, 9) | |
FUNCTION <SNR>81_isReasonable() | |
Called 126 times | |
Total time: 0.000807 | |
Self time: 0.000807 | |
count total (s) self (s) | |
126 0.000555 if (&l:foldmethod is# 'syntax' || &l:foldmethod is# 'expr') || g:fastfold_force == 1 | |
114 0.000116 return 1 | |
else | |
12 0.000005 return 0 | |
endif | |
FUNCTION <SNR>221_internal_options() | |
Called 5 times | |
Total time: 0.000353 | |
Self time: 0.000353 | |
count total (s) self (s) | |
5 0.000344 return { 'encoding': &encoding, 'error_messages': [], 'is_windows': ((has('win32') || has('win64')) ? v:true : v:false), 'messages': [], 'prev_winid': win_getid(), 'has_preview_window': len(filter(range(1, winnr('$')), 'getwinvar(v:val, ''&previewwindow'')')) > 0, 'quick_move_table': { 'a' : 0, 's' : 1, 'd' : 2, 'f' : 3, 'g' : 4, 'h' : 5, 'j' : 6, 'k' : 7, 'l' : 8, ';' : 9, 'q' : 10, 'w' : 11, 'e' : 12, 'r' : 13, 't' : 14, 'y' : 15, 'u' : 16, 'i' : 17, 'o' : 18, 'p' : 19, '1' : 20, '2' : 21, '3' : 22, '4' : 23, '5' : 24, '6' : 25, '7' : 26, '8' : 27, '9' : 28, '0' : 29, }, 'runtimepath': &runtimepath, 'selected_icon': '*',} | |
FUNCTION test#java#maventest#test_file() | |
Called 6 times | |
Total time: 0.000084 | |
Self time: 0.000084 | |
count total (s) self (s) | |
6 0.000082 return a:file =~? g:test#java#maventest#file_pattern | |
FUNCTION <SNR>136_context_tick() | |
Called 132 times | |
Total time: 0.001001 | |
Self time: 0.001001 | |
count total (s) self (s) | |
" FIXME b:changedtick ticks when <c-y> is typed. curswant of | |
" getcurpos() also ticks sometimes after <c-y> is typed. Use cursor | |
" position to filter the requests. | |
132 0.000726 return [getcurpos()[0:2], s:context_tick_extra] | |
FUNCTION airline#themes#patch() | |
Called 19 times | |
Total time: 0.005881 | |
Self time: 0.005881 | |
count total (s) self (s) | |
228 0.000441 for mode in keys(a:palette) | |
209 0.000678 if !has_key(a:palette[mode], 'airline_warning') | |
57 0.000296 let a:palette[mode]['airline_warning'] = [ '#000000', '#df5f00', 232, 166 ] | |
57 0.000034 endif | |
209 0.000496 if !has_key(a:palette[mode], 'airline_error') | |
57 0.000244 let a:palette[mode]['airline_error'] = [ '#000000', '#990000', 232, 160 ] | |
57 0.000031 endif | |
209 0.000528 if !has_key(a:palette[mode], 'airline_term') | |
152 0.000601 let a:palette[mode]['airline_term'] = [ '#9cffd3', '#202020', 85, 232] | |
152 0.000078 endif | |
209 0.000174 endfor | |
19 0.000096 let a:palette.accents = get(a:palette, 'accents', {}) | |
19 0.000052 let a:palette.accents.none = [ '', '', '', '', '' ] | |
19 0.000066 let a:palette.accents.bold = [ '', '', '', '', 'bold' ] | |
19 0.000071 let a:palette.accents.italic = [ '', '', '', '', 'italic' ] | |
19 0.000056 if !has_key(a:palette.accents, 'red') | |
let a:palette.accents.red = [ '#ff0000' , '' , 160 , '' ] | |
endif | |
19 0.000039 if !has_key(a:palette.accents, 'green') | |
19 0.000071 let a:palette.accents.green = [ '#008700' , '' , 22 , '' ] | |
19 0.000013 endif | |
19 0.000049 if !has_key(a:palette.accents, 'blue') | |
19 0.000053 let a:palette.accents.blue = [ '#005fff' , '' , 27 , '' ] | |
19 0.000011 endif | |
19 0.000043 if !has_key(a:palette.accents, 'yellow') | |
19 0.000078 let a:palette.accents.yellow = [ '#dfff00' , '' , 190 , '' ] | |
19 0.000012 endif | |
19 0.000049 if !has_key(a:palette.accents, 'orange') | |
19 0.000053 let a:palette.accents.orange = [ '#df5f00' , '' , 166 , '' ] | |
19 0.000012 endif | |
19 0.000062 if !has_key(a:palette.accents, 'purple') | |
19 0.000064 let a:palette.accents.purple = [ '#af00df' , '' , 128 , '' ] | |
19 0.000012 endif | |
FUNCTION <SNR>130_exec_separator() | |
Called 48285 times | |
Total time: 28.323897 | |
Self time: 1.073271 | |
count total (s) self (s) | |
48285 0.046554 if pumvisible() | |
return | |
endif | |
48285 8.889253 0.155140 let l:from = airline#themes#get_highlight(a:from.a:suffix) | |
48285 9.389411 0.152682 let l:to = airline#themes#get_highlight(a:to.a:suffix) | |
48285 0.102607 let group = a:from.'_to_'.a:to.a:suffix | |
48285 0.034140 if a:inverse | |
3624 0.009493 let colors = [ l:from[1], l:to[1], l:from[3], l:to[3] ] | |
3624 0.001420 else | |
44661 0.118332 let colors = [ l:to[1], l:from[1], l:to[3], l:from[3] ] | |
44661 0.016966 endif | |
48285 0.103283 let a:dict[group] = colors | |
48285 9.441340 0.161556 call airline#highlighter#exec(group, colors) | |
FUNCTION test#python#pytest#test_file() | |
Called 6 times | |
Total time: 0.000114 | |
Self time: 0.000114 | |
count total (s) self (s) | |
6 0.000080 if fnamemodify(a:file, ':t') =~# g:test#python#pytest#file_pattern | |
4 0.000009 if exists('g:test#python#runner') | |
4 0.000006 return g:test#python#runner ==# 'pytest' | |
else | |
return executable("pytest") || executable("py.test") | |
endif | |
endif | |
FUNCTION sy#repo#get_diff_git() | |
Called 7 times | |
Total time: 0.044660 | |
Self time: 0.000101 | |
count total (s) self (s) | |
7 0.000048 0.000027 call sy#verbose('get_diff_git()', 'git') | |
7 0.000024 let [found_diff, diff] = a:exitval ? [0, []] : [1, a:diff] | |
7 0.044572 0.000033 call s:get_diff_end(a:sy, found_diff, 'git', diff) | |
FUNCTION denite#util#execute_path() | |
Called 5 times | |
Total time: 0.349185 | |
Self time: 0.020960 | |
count total (s) self (s) | |
5 0.000591 0.000194 let dir = denite#util#path2directory(a:path) | |
" Auto make directory. | |
5 0.000220 if dir !~# '^\a\+:' && !isdirectory(dir) && denite#util#input_yesno( printf('"%s" does not exist. Create?', dir)) | |
call mkdir(dir, 'p') | |
endif | |
5 0.000051 let save_wildignore = &wildignore | |
5 0.000017 try | |
5 0.000107 0.000092 let &wildignore = '' | |
5 0.348073 0.020263 execute a:command '`=s:expand(a:path)`' | |
5 0.000005 catch /^Vim\%((\a\+)\)\=:E325/ | |
" Ignore swap file error | |
catch | |
call denite#util#print_error(v:throwpoint) | |
call denite#util#print_error(v:exception) | |
finally | |
5 0.000016 0.000013 let &wildignore = save_wildignore | |
5 0.000003 endtry | |
FUNCTION <SNR>220_parse_options() | |
Called 5 times | |
Total time: 0.008266 | |
Self time: 0.007146 | |
count total (s) self (s) | |
5 0.000032 let args = [] | |
5 0.000019 let options = {} | |
" Eval | |
5 0.005931 0.005518 let cmdline = (a:cmdline =~# '\\\@<!`.*\\\@<!`') ? s:eval_cmdline(a:cmdline) : a:cmdline | |
10 0.000558 0.000466 for s in split(cmdline, s:re_unquoted_match('\%(\\\@<!\s\)\+')) | |
5 0.000067 let arg = substitute(s, '\\\( \)', '\1', 'g') | |
5 0.000060 let arg_key = substitute(arg, '=\zs.*$', '', '') | |
5 0.000061 let name = substitute(tr(arg_key, '-', '_'), '=$', '', '')[1:] | |
5 0.000034 if name =~# '^no_' | |
let name = name[3:] | |
let value = v:false | |
else | |
5 0.000061 let value = (arg_key =~# '=$') ? s:remove_quote_pairs(arg[len(arg_key) :]) : v:true | |
5 0.000012 endif | |
5 0.001006 0.000392 if index(keys(denite#init#_user_options()) + keys(denite#init#_deprecated_options()), name) >= 0 | |
let options[name] = value | |
else | |
5 0.000030 call add(args, arg) | |
5 0.000006 endif | |
5 0.000009 endfor | |
5 0.000019 return [args, options] | |
FUNCTION ale#Queue() | |
Called 28 times | |
Total time: 0.293153 | |
Self time: 0.001748 | |
count total (s) self (s) | |
28 0.000056 if a:0 > 2 | |
throw 'too many arguments!' | |
endif | |
" Default linting_flag to '' | |
28 0.000086 let l:linting_flag = get(a:000, 0, '') | |
28 0.000107 let l:buffer = get(a:000, 1, bufnr('')) | |
28 0.000068 if l:linting_flag isnot# '' && l:linting_flag isnot# 'lint_file' | |
throw "linting_flag must be either '' or 'lint_file'" | |
endif | |
28 0.000069 if type(l:buffer) isnot v:t_number | |
throw 'buffer_number must be a Number' | |
endif | |
28 0.002100 0.000099 if ale#ShouldDoNothing(l:buffer) | |
8 0.000003 return | |
endif | |
" Remember that we want to check files for this buffer. | |
" We will remember this until we finally run the linters, via any event. | |
20 0.000033 if l:linting_flag is# 'lint_file' | |
20 0.000144 let s:should_lint_file_for_buffer[l:buffer] = 1 | |
20 0.000014 endif | |
20 0.000031 if s:lint_timer != -1 | |
call timer_stop(s:lint_timer) | |
let s:lint_timer = -1 | |
endif | |
20 0.007063 0.000200 let l:linters = ale#linter#Get(getbufvar(l:buffer, '&filetype')) | |
" Don't set up buffer data and so on if there are no linters to run. | |
20 0.000039 if empty(l:linters) | |
" If we have some previous buffer data, then stop any jobs currently | |
" running and clear everything. | |
10 0.000018 if has_key(g:ale_buffer_info, l:buffer) | |
call ale#engine#RunLinters(l:buffer, [], 1) | |
endif | |
10 0.000004 return | |
endif | |
10 0.000018 if a:delay > 0 | |
let s:queued_buffer_number = l:buffer | |
let s:lint_timer = timer_start(a:delay, function('ale#Lint')) | |
else | |
10 0.282674 0.000133 call ale#Lint(-1, l:buffer) | |
10 0.000015 endif | |
FUNCTION gutentags#inprogress() | |
Called 1759 times | |
Total time: 0.041712 | |
Self time: 0.032665 | |
count total (s) self (s) | |
" Does this buffer have gutentags enabled? | |
1759 0.004669 if !exists('b:gutentags_files') | |
1072 0.001032 return [] | |
endif | |
" Find any module that has a job in progress for any of this buffer's | |
" tags files. | |
687 0.001604 let l:modules_in_progress = [] | |
1374 0.004881 for [module, tags_file] in items(b:gutentags_files) | |
687 0.015222 0.006176 let l:jobidx = gutentags#find_job_index_by_tags_file(module, tags_file) | |
687 0.001025 if l:jobidx >= 0 | |
22 0.000060 call add(l:modules_in_progress, module) | |
22 0.000012 endif | |
687 0.001013 endfor | |
687 0.001054 return l:modules_in_progress | |
FUNCTION denite#get_status() | |
Called 72 times | |
Total time: 0.000460 | |
Self time: 0.000460 | |
count total (s) self (s) | |
72 0.000422 return !exists('b:denite_statusline') ? '' : get(b:denite_statusline, a:name, '') | |
FUNCTION gutentags#ctags#on_job_exit() | |
Called 7 times | |
Total time: 0.000832 | |
Self time: 0.000070 | |
count total (s) self (s) | |
7 0.000789 0.000027 call gutentags#remove_job_by_data('ctags', a:job) | |
7 0.000008 if a:exit_val != 0 | |
call gutentags#warning("gutentags: ctags job failed, returned: ".string(a:exit_val)) | |
endif | |
FUNCTION test#scala#sbttest#test_file() | |
Called 6 times | |
Total time: 0.000185 | |
Self time: 0.000185 | |
count total (s) self (s) | |
6 0.000035 let current_file = fnamemodify(a:file, ':t') | |
6 0.000144 return current_file =~? g:test#scala#sbttest#file_pattern | |
FUNCTION ale#engine#IsExecutable() | |
Called 10 times | |
Total time: 0.000179 | |
Self time: 0.000179 | |
count total (s) self (s) | |
10 0.000026 if empty(a:executable) | |
" Don't log the executable check if the executable string is empty. | |
return 0 | |
endif | |
" Check for a cached executable() check. | |
10 0.000054 let l:result = get(s:executable_cache_map, a:executable, v:null) | |
10 0.000023 if l:result isnot v:null | |
10 0.000015 return l:result | |
endif | |
" Check if the file is executable, and convert -1 to 1. | |
let l:result = executable(a:executable) isnot 0 | |
" Cache the executable check if we found it, or if the option to cache | |
" failing checks is on. | |
if l:result || get(g:, 'ale_cache_executable_check_failures', 0) | |
let s:executable_cache_map[a:executable] = l:result | |
endif | |
if g:ale_history_enabled | |
call ale#history#Add(a:buffer, l:result, 'executable', a:executable) | |
endif | |
return l:result | |
FUNCTION ale#Escape() | |
Called 40 times | |
Total time: 0.000750 | |
Self time: 0.000750 | |
count total (s) self (s) | |
40 0.000193 if fnamemodify(&shell, ':t') is? 'cmd.exe' | |
" If the string contains spaces, it will be surrounded by quotes. | |
" Otherwise, special characters will be escaped with carets (^). | |
return substitute( a:str =~# ' ' ? '"' . substitute(a:str, '"', '""', 'g') . '"' : substitute(a:str, '\v([&|<>^])', '^\1', 'g'), '%', '%%', 'g',) | |
endif | |
40 0.000156 return shellescape (a:str) | |
FUNCTION gutentags#stripslash() | |
Called 15 times | |
Total time: 0.000106 | |
Self time: 0.000106 | |
count total (s) self (s) | |
15 0.000101 return fnamemodify(a:path, ':s?[/\\]$??') | |
FUNCTION airline#update_statusline_inactive() | |
Called 81 times | |
Total time: 0.882422 | |
Self time: 0.004949 | |
count total (s) self (s) | |
81 0.000878 0.000522 if airline#util#getwinvar(winnr(), 'airline_disabled', 0) | |
return | |
endif | |
202 0.000368 for nr in a:range | |
121 0.000992 0.000553 if airline#util#getwinvar(nr, 'airline_disabled', 0) | |
continue | |
endif | |
121 0.000403 call setwinvar(nr, 'airline_active', 0) | |
121 0.000666 let context = { 'winnr': nr, 'active': 0, 'bufnr': winbufnr(nr) } | |
121 0.877778 0.001100 call s:invoke_funcrefs(context, s:inactive_funcrefs) | |
121 0.000078 endfor | |
FUNCTION <SNR>174_matchstrpos() | |
Called 546 times | |
Total time: 0.015379 | |
Self time: 0.015379 | |
count total (s) self (s) | |
546 0.000491 if s:exists_matchstrpos | |
546 0.014658 return matchstrpos(a:expr, a:pat) | |
else | |
return [matchstr(a:expr, a:pat), match(a:expr, a:pat), matchend(a:expr, a:pat)] | |
endif | |
FUNCTION airline#extensions#tabline#group_of_bufnr() | |
Called 2151 times | |
Total time: 0.030995 | |
Self time: 0.030995 | |
count total (s) self (s) | |
2151 0.002995 let cur = bufnr('%') | |
2151 0.001856 if cur == a:bufnr | |
27 0.000072 if g:airline_detect_modified && getbufvar(a:bufnr, '&modified') | |
let group = 'airline_tabmod' | |
else | |
27 0.000025 let group = 'airline_tabsel' | |
27 0.000010 endif | |
27 0.000010 else | |
2124 0.004825 if g:airline_detect_modified && getbufvar(a:bufnr, '&modified') | |
let group = 'airline_tabmod_unsel' | |
elseif index(a:tab_bufs, a:bufnr) > -1 | |
150 0.000150 let group = 'airline_tab' | |
150 0.000062 else | |
1974 0.001883 let group = 'airline_tabhid' | |
1974 0.000724 endif | |
2124 0.000776 endif | |
2151 0.001455 return group | |
FUNCTION <SNR>163_get_ctags_executable() | |
Called 7 times | |
Total time: 0.000251 | |
Self time: 0.000205 | |
count total (s) self (s) | |
"Only consider the main filetype in cases like 'python.django' | |
7 0.000054 let l:ftype = get(split(&filetype, '\.'), 0, '') | |
7 0.000077 0.000031 let l:proj_info = gutentags#get_project_info(a:proj_dir) | |
7 0.000015 let l:type = get(l:proj_info, 'type', l:ftype) | |
7 0.000047 let exepath = exists('g:gutentags_ctags_executable_{l:type}') ? g:gutentags_ctags_executable_{l:type} : g:gutentags_ctags_executable | |
7 0.000040 return expand(exepath, 1) | |
FUNCTION <SNR>201_UpdateLineNumbers() | |
Called 10 times | |
Total time: 0.000396 | |
Self time: 0.000396 | |
count total (s) self (s) | |
10 0.000017 let l:line_map = {} | |
10 0.000014 let l:line_numbers_changed = 0 | |
26 0.000036 for [l:line, l:sign_id, l:name] in a:current_sign_list | |
16 0.000032 let l:line_map[l:sign_id] = l:line | |
16 0.000009 endfor | |
26 0.000021 for l:item in a:loclist | |
16 0.000018 if l:item.bufnr == a:buffer | |
16 0.000045 let l:lnum = get(l:line_map, get(l:item, 'sign_id', 0), 0) | |
16 0.000018 if l:lnum && l:item.lnum != l:lnum | |
let l:item.lnum = l:lnum | |
let l:line_numbers_changed = 1 | |
endif | |
16 0.000006 endif | |
16 0.000006 endfor | |
" When the line numbers change, sort the list again | |
10 0.000009 if l:line_numbers_changed | |
call sort(a:loclist, 'ale#util#LocItemCompare') | |
endif | |
FUNCTION gutentags#get_res_file() | |
Called 7 times | |
Total time: 0.000018 | |
Self time: 0.000018 | |
count total (s) self (s) | |
7 0.000015 return g:gutentags_res_dir . a:filename | |
FUNCTION test#php#kahlan#test_file() | |
Called 6 times | |
Total time: 0.000234 | |
Self time: 0.000083 | |
count total (s) self (s) | |
6 0.000218 0.000066 if empty(test#php#kahlan#executable()) | |
6 0.000010 return 0 | |
endif | |
return a:file =~# g:test#php#kahlan#file_pattern | |
FUNCTION <SNR>113_reset_untracked_cache() | |
Called 7 times | |
Total time: 0.000798 | |
Self time: 0.000607 | |
count total (s) self (s) | |
" shellcmdpost - whether function was called as a result of ShellCmdPost hook | |
7 0.000057 if !g:airline#init#vim_async && !has('nvim') | |
if a:shellcmdpost | |
" Clear cache only if there was no error or the script uses an | |
" asynchronous interface. Otherwise, cache clearing would overwrite | |
" v:shell_error with a system() call inside get_*_untracked. | |
if v:shell_error | |
return | |
endif | |
endif | |
endif | |
7 0.000152 let file = expand("%:p") | |
21 0.000051 for vcs in keys(s:vcs_config) | |
" Dump the value of the cache for the current file. Partially mitigates the | |
" issue of cache invalidation happening before a call to | |
" s:update_untracked() | |
14 0.000303 0.000112 call airline#extensions#branch#update_untracked_config(file, vcs) | |
14 0.000093 let s:vcs_config[vcs].untracked = {} | |
14 0.000013 endfor | |
FUNCTION <SNR>28_expand() | |
Called 5 times | |
Total time: 0.000182 | |
Self time: 0.000145 | |
count total (s) self (s) | |
5 0.000176 0.000139 return denite#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 <SNR>158_nvim_untracked_job_handler() | |
Called 16 times | |
Total time: 0.000594 | |
Self time: 0.000306 | |
count total (s) self (s) | |
16 0.000064 if a:event == 'exit' | |
16 0.000398 0.000110 call s:untracked_output(self, self.buf) | |
16 0.000050 if has_key(s:untracked_jobs, self.file) | |
16 0.000034 call remove(s:untracked_jobs, self.file) | |
16 0.000007 endif | |
16 0.000006 endif | |
FUNCTION <SNR>116_check_mixed_indent_file() | |
Called 8 times | |
Total time: 0.000670 | |
Self time: 0.000670 | |
count total (s) self (s) | |
8 0.000054 let c_like_langs = get(g:, 'airline#extensions#c_like_langs', [ 'arduino', 'c', 'cpp', 'cuda', 'go', 'javascript', 'ld', 'php' ]) | |
8 0.000039 if index(c_like_langs, &ft) > -1 | |
" for C-like languages: allow /** */ comment style with one space before the '*' | |
let head_spc = '\v(^ +\*@!)' | |
else | |
8 0.000010 let head_spc = '\v(^ +)' | |
8 0.000005 endif | |
8 0.000370 let indent_tabs = search('\v(^\t+)', 'nw') | |
8 0.000106 let indent_spc = search(head_spc, 'nw') | |
8 0.000015 if indent_tabs > 0 && indent_spc > 0 | |
return printf("%d:%d", indent_tabs, indent_spc) | |
else | |
8 0.000006 return '' | |
endif | |
FUNCTION <SNR>148_ExcludeOther() | |
Called 619 times | |
Total time: 0.003744 | |
Self time: 0.003744 | |
count total (s) self (s) | |
619 0.003023 if (getbufvar(a:nr, 'current_syntax') == 'qf') || (a:exclude_preview && getbufvar(a:nr, '&bufhidden') == 'wipe' && getbufvar(a:nr, '&buftype') == 'nofile') | |
return 1 | endif | |
FUNCTION denite#get_status_path() | |
Called 18 times | |
Total time: 0.000178 | |
Self time: 0.000081 | |
count total (s) self (s) | |
18 0.000170 0.000073 return denite#get_status('path') | |
FUNCTION airline#extensions#wordcount#formatters#default#update_fmt() | |
Called 62 times | |
Total time: 0.000509 | |
Self time: 0.000509 | |
count total (s) self (s) | |
62 0.000220 let s:fmt = get(g:, 'airline#extensions#wordcount#formatter#default#fmt', '%s words') | |
62 0.000248 let s:fmt_short = get(g:, 'airline#extensions#wordcount#formatter#default#fmt_short', s:fmt == '%s words' ? '%sW' : s:fmt) | |
FUNCTION denite#init#_context() | |
Called 5 times | |
Total time: 0.001935 | |
Self time: 0.001010 | |
count total (s) self (s) | |
5 0.000035 let buffer_name = get(a:user_context, 'buffer_name', 'default') | |
5 0.000397 0.000044 let context = s:internal_options() | |
5 0.000817 0.000346 call extend(context, denite#init#_user_options()) | |
5 0.000138 0.000069 let context.custom = denite#custom#_get() | |
5 0.000027 if has_key(context.custom.option, '_') | |
5 0.000054 call extend(context, context.custom.option['_']) | |
5 0.000006 endif | |
5 0.000022 if has_key(context.custom.option, buffer_name) | |
call extend(context, context.custom.option[buffer_name]) | |
endif | |
5 0.000034 call extend(context, a:user_context) | |
" For compatibility(deprecated variables) | |
5 0.000195 0.000165 for [old_option, new_option] in filter(items( denite#init#_deprecated_options()), "has_key(context, v:val[0]) && v:val[1] !=# ''") | |
let context[new_option] = context[old_option] | |
endfor | |
5 0.000026 if get(context, 'short_source_names', v:false) | |
let context['source_names'] = 'short' | |
endif | |
5 0.000019 if has_key(context, 'quit') && !context['quit'] | |
let context['post_action'] = 'open' | |
endif | |
5 0.000018 if get(context, 'force_quit', v:false) | |
let context['post_action'] = 'quit' | |
endif | |
5 0.000010 return context | |
FUNCTION airline#update_statusline() | |
Called 72 times | |
Total time: 1.636722 | |
Self time: 0.003634 | |
count total (s) self (s) | |
72 0.000738 0.000400 if airline#util#getwinvar(winnr(), 'airline_disabled', 0) | |
return | |
endif | |
72 0.000654 let range = filter(range(1, winnr('$')), 'v:val != winnr()') | |
" create inactive statusline | |
72 0.726079 0.000385 call airline#update_statusline_inactive(range) | |
72 0.000133 unlet! w:airline_render_left w:airline_render_right | |
72 0.000711 exe 'unlet! ' 'w:airline_section_'. join(s:sections, ' w:airline_section_') | |
72 0.000106 let w:airline_active = 1 | |
72 0.000330 let context = { 'winnr': winnr(), 'active': 1, 'bufnr': winbufnr(winnr()) } | |
72 0.907638 0.000583 call s:invoke_funcrefs(context, g:airline_statusline_funcrefs) | |
FUNCTION <SNR>150_json2vim() | |
Called 1 time | |
Total time: 0.000088 | |
Self time: 0.000088 | |
count total (s) self (s) | |
1 0.000087 sandbox return (exists('*json_encode') ? json_decode(a:expr) : eval(a:expr)) | |
FUNCTION airline#parts#paste() | |
Called 1563 times | |
Total time: 0.005929 | |
Self time: 0.005929 | |
count total (s) self (s) | |
1563 0.005119 return g:airline_detect_paste && &paste ? g:airline_symbols.paste : '' | |
FUNCTION airline#extensions#load_theme() | |
Called 19 times | |
Total time: 0.075002 | |
Self time: 0.000157 | |
count total (s) self (s) | |
19 0.074987 0.000143 call airline#util#exec_funcrefs(s:ext._theme_funcrefs, g:airline#themes#{g:airline_theme}#palette) | |
FUNCTION test#php#kahlan#executable() | |
Called 6 times | |
Total time: 0.000152 | |
Self time: 0.000152 | |
count total (s) self (s) | |
6 0.000079 if filereadable('./vendor/bin/kahlan') | |
return './vendor/bin/kahlan' | |
elseif filereadable('./bin/kahlan') | |
return './bin/kahlan' | |
endif | |
FUNCTION <SNR>202_FixList() | |
Called 10 times | |
Total time: 0.001162 | |
Self time: 0.000407 | |
count total (s) self (s) | |
10 0.000126 0.000045 let l:format = ale#Var(a:buffer, 'loclist_msg_format') | |
10 0.000025 let l:new_list = [] | |
26 0.000026 for l:item in a:list | |
16 0.000048 let l:fixed_item = copy(l:item) | |
16 0.000745 0.000071 let l:fixed_item.text = ale#GetLocItemMessage(l:item, l:format) | |
16 0.000017 if l:item.bufnr == -1 | |
" If the buffer number is invalid, remove it. | |
call remove(l:fixed_item, 'bufnr') | |
endif | |
16 0.000030 call add(l:new_list, l:fixed_item) | |
16 0.000007 endfor | |
10 0.000009 return l:new_list | |
FUNCTION ale#util#GetLineCount() | |
Called 10 times | |
Total time: 0.001328 | |
Self time: 0.001328 | |
count total (s) self (s) | |
10 0.001324 return len(getbufline(a:buffer, 1, '$')) | |
FUNCTION <SNR>174_blanks_adj() | |
Called 1713 times | |
Total time: 0.031196 | |
Self time: 0.031196 | |
count total (s) self (s) | |
1713 0.002664 let lnum_prev = a:lnum - 1 | |
3942 0.015934 while lnum_prev != 0 && ( a:cache[lnum_prev]['is_blank'] || ( a:cache[lnum_prev]['is_comment'] && a:cache[lnum_prev]['indent'] <= a:cache[(a:lnum)]['indent'] ) ) | |
2229 0.004011 let a:cache[lnum_prev]['foldexpr'] = a:foldlevel | |
2229 0.002127 let lnum_prev -= 1 | |
2229 0.001291 endwhile | |
FUNCTION test#base#test_file() | |
Called 284 times | |
Total time: 0.007847 | |
Self time: 0.002662 | |
count total (s) self (s) | |
284 0.007712 0.002526 return test#{a:runner}#test_file(a:file) | |
FUNCTION <SNR>116_ws_refresh() | |
Called 17 times | |
Total time: 0.000237 | |
Self time: 0.000237 | |
count total (s) self (s) | |
17 0.000093 if get(b:, 'airline_ws_changedtick', 0) == b:changedtick | |
8 0.000009 return | |
endif | |
9 0.000028 unlet! b:airline_whitespace_check | |
9 0.000029 if get(g:, 'airline_skip_empty_sections', 0) | |
exe ':AirlineRefresh' | |
endif | |
9 0.000026 let b:airline_ws_changedtick = b:changedtick | |
FUNCTION ale#events#SaveEvent() | |
Called 7 times | |
Total time: 0.238365 | |
Self time: 0.000556 | |
count total (s) self (s) | |
7 0.000332 0.000122 let l:should_lint = ale#Var(a:buffer, 'enabled') && g:ale_lint_on_save | |
7 0.000017 if l:should_lint | |
7 0.000052 call setbufvar(a:buffer, 'ale_save_event_fired', 1) | |
7 0.000010 endif | |
7 0.000180 0.000049 if ale#Var(a:buffer, 'fix_on_save') | |
let l:will_fix = ale#fix#Fix(a:buffer, 'save_file') | |
let l:should_lint = l:should_lint && !l:will_fix | |
endif | |
7 0.000158 0.000056 if l:should_lint && !ale#events#QuitRecently(a:buffer) | |
7 0.237466 0.000100 call ale#Queue(0, 'lint_file', a:buffer) | |
7 0.000010 endif | |
FUNCTION UltiSnips#TrackChange() | |
Called 6 times | |
Total time: 0.007469 | |
Self time: 0.007469 | |
count total (s) self (s) | |
6 0.007464 exec g:_uspy "UltiSnips_Manager._track_change()" | |
FUNCTION LanguageClient#handleCursorMoved() | |
Called 398 times | |
Total time: 0.027388 | |
Self time: 0.011848 | |
count total (s) self (s) | |
398 0.001960 let l:cursor_line = getcurpos()[1] - 1 | |
398 0.001090 if l:cursor_line == s:last_cursor_line | |
53 0.000092 return | |
endif | |
345 0.000726 let s:last_cursor_line = l:cursor_line | |
345 0.003323 if &buftype !=# '' || &filetype ==# '' | |
286 0.000200 return | |
endif | |
59 0.000125 try | |
59 0.017556 0.002016 call LanguageClient#Notify('languageClient/handleCursorMoved', { 'buftype': &buftype, 'filename': LSP#filename(), 'line': l:cursor_line, 'LSP#visible_line_start()': LSP#visible_line_start(), 'LSP#visible_line_end()': LSP#visible_line_end(), }) | |
59 0.000167 catch | |
call s:Debug('LanguageClient caught exception: ' . string(v:exception)) | |
endtry | |
FUNCTION 11383() | |
Called 12 times | |
Total time: 0.000823 | |
Self time: 0.000282 | |
count total (s) self (s) | |
12 0.000021 let bufnum = get(self.buffers, a:i, -1) | |
12 0.000317 0.000025 let group = self.get_group(a:i) | |
12 0.000276 0.000027 let pgroup = self.get_group(a:i - 1) | |
" always add a space when powerline_fonts are used | |
" or for the very first item | |
12 0.000021 if get(g:, 'airline_powerline_fonts', 0) || a:i == 0 | |
1 0.000001 let space = s:spc | |
1 0.000000 else | |
11 0.000019 let space= (pgroup == group ? s:spc : '') | |
11 0.000004 endif | |
12 0.000018 if get(g:, 'airline#extensions#tabline#buffer_idx_mode', 0) | |
if len(s:number_map) > 0 | |
return space. get(s:number_map, a:i+1, '') . '%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)' . s:spc | |
else | |
return '['.(a:i+1).s:spc.'%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)'.']' | |
endif | |
else | |
12 0.000031 return space.'%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)'.s:spc | |
endif | |
FUNCTION ale#engine#RunLinters() | |
Called 10 times | |
Total time: 0.275090 | |
Self time: 0.001546 | |
count total (s) self (s) | |
" Initialise the buffer information if needed. | |
10 0.000291 0.000093 let l:new_buffer = ale#engine#InitBufferInfo(a:buffer) | |
10 0.000662 0.000091 call s:StopCurrentJobs(a:buffer, a:should_lint_file) | |
10 0.000423 0.000086 call s:RemoveProblemsForDisabledLinters(a:buffer, a:linters) | |
" We can only clear the results if we aren't checking the buffer. | |
10 0.000177 0.000072 let l:can_clear_results = !ale#engine#IsCheckingBuffer(a:buffer) | |
10 0.001017 0.000562 silent doautocmd <nomodeline> User ALELintPre | |
20 0.000069 for l:linter in a:linters | |
" Only run lint_file linters if we should. | |
10 0.000049 if !l:linter.lint_file || a:should_lint_file | |
10 0.271997 0.000118 if s:RunLinter(a:buffer, l:linter) | |
" If a single linter ran, we shouldn't clear everything. | |
10 0.000024 let l:can_clear_results = 0 | |
10 0.000008 endif | |
10 0.000008 else | |
" If we skipped running a lint_file linter still in the list, | |
" we shouldn't clear everything. | |
let l:can_clear_results = 0 | |
endif | |
10 0.000015 endfor | |
" Clear the results if we can. This needs to be done when linters are | |
" disabled, or ALE itself is disabled. | |
10 0.000011 if l:can_clear_results | |
call ale#engine#SetResults(a:buffer, []) | |
elseif l:new_buffer | |
call s:AddProblemsFromOtherBuffers(a:buffer, a:linters) | |
endif | |
FUNCTION <SNR>115_get_diagnostics() | |
Called 13 times | |
Total time: 0.001296 | |
Self time: 0.000194 | |
count total (s) self (s) | |
13 0.001291 0.000189 call LanguageClient#getState(function("s:record_diagnostics")) | |
FUNCTION <SNR>113_format_name() | |
Called 8 times | |
Total time: 0.000009 | |
Self time: 0.000009 | |
count total (s) self (s) | |
8 0.000007 return a:name | |
FUNCTION gutentags#get_cachefile() | |
Called 5 times | |
Total time: 0.000198 | |
Self time: 0.000101 | |
count total (s) self (s) | |
5 0.000034 0.000020 if gutentags#is_path_rooted(a:filename) | |
return a:filename | |
endif | |
5 0.000049 0.000018 let l:tag_path = gutentags#stripslash(a:root_dir) . '/' . a:filename | |
5 0.000008 if g:gutentags_cache_dir != "" | |
" Put the tag file in the cache dir instead of inside the | |
" project root. | |
let l:tag_path = g:gutentags_cache_dir . '/' .tr(l:tag_path, '\/: ', '---_') | |
let l:tag_path = substitute(l:tag_path, '/\-', '/', '') | |
endif | |
5 0.000068 0.000017 let l:tag_path = gutentags#normalizepath(l:tag_path) | |
5 0.000004 return l:tag_path | |
FUNCTION airline#highlighter#exec() | |
Called 143654 times | |
Total time: 27.155910 | |
Self time: 5.138749 | |
count total (s) self (s) | |
143654 0.133853 if pumvisible() | |
return | |
endif | |
143654 0.146900 let colors = a:colors | |
143654 0.101515 if s:is_win32term | |
let colors[2] = s:gui2cui(get(colors, 0, ''), get(colors, 2, '')) | |
let colors[3] = s:gui2cui(get(colors, 1, ''), get(colors, 3, '')) | |
endif | |
143654 17.266587 0.402067 let old_hi = airline#highlighter#get_highlight(a:group) | |
143654 0.173875 if len(colors) == 4 | |
48425 0.070516 call add(colors, '') | |
48425 0.015641 endif | |
143654 0.126060 if g:airline_gui_mode ==# 'gui' | |
143654 0.352408 let new_hi = [colors[0], colors[1], '', '', colors[4]] | |
143654 0.053490 else | |
let new_hi = ['', '', printf("%s", colors[2]), printf("%s", colors[3]), colors[4]] | |
endif | |
143654 2.316179 0.356936 let colors = s:CheckDefined(colors) | |
143654 3.611753 0.474503 if old_hi != new_hi || !s:hl_group_exists(a:group) | |
2056 0.088974 0.032827 let cmd = printf('hi %s %s %s %s %s %s %s %s', a:group, s:Get(colors, 0, 'guifg='), s:Get(colors, 1, 'guibg='), s:Get(colors, 2, 'ctermfg='), s:Get(colors, 3, 'ctermbg='), s:Get(colors, 4, 'gui='), s:Get(colors, 4, 'cterm='), s:Get(colors, 4, 'term=')) | |
2056 0.055117 exe cmd | |
2056 0.004664 if has_key(s:hl_groups, a:group) | |
2056 0.003829 let s:hl_groups[a:group] = colors | |
2056 0.000982 endif | |
2056 0.000826 endif | |
FUNCTION test#python#djangotest#test_file() | |
Called 6 times | |
Total time: 0.000073 | |
Self time: 0.000073 | |
count total (s) self (s) | |
6 0.000029 if fnamemodify(a:file, ':t') =~# g:test#python#djangotest#file_pattern | |
if exists('g:test#python#runner') | |
return index(['djangotest', 'djangonose'], g:test#python#runner) != -1 | |
else | |
return filereadable('manage.py') && executable('django-admin') | |
endif | |
endif | |
FUNCTION test#ruby#rspec#test_file() | |
Called 6 times | |
Total time: 0.000114 | |
Self time: 0.000114 | |
count total (s) self (s) | |
6 0.000111 return a:file =~# g:test#ruby#rspec#file_pattern | |
FUNCTION LanguageClient#handleBufWritePost() | |
Called 7 times | |
Total time: 0.000823 | |
Self time: 0.000217 | |
count total (s) self (s) | |
7 0.000037 if &buftype !=# '' || &filetype ==# '' | |
return | |
endif | |
7 0.000008 try | |
7 0.000695 0.000089 call LanguageClient#Notify('languageClient/handleBufWritePost', { 'filename': LSP#filename(), }) | |
7 0.000009 catch | |
call s:Debug('LanguageClient caught exception: ' . string(v:exception)) | |
endtry | |
FUNCTION <SNR>145_HandleOutput() | |
Called 7 times | |
Total time: 0.000345 | |
Self time: 0.000116 | |
count total (s) self (s) | |
7 0.000029 let l:quiet = get(a:000, 0) | |
7 0.000022 if has_key(a:output, 'result') | |
" let l:result = string(a:result) | |
" if l:result !=# 'v:null' | |
" echomsg l:result | |
" endif | |
6 0.000016 return get(a:output, 'result') | |
elseif has_key(a:output, 'error') | |
1 0.000003 let l:error = get(a:output, 'error') | |
1 0.000002 let l:message = get(l:error, 'message') | |
1 0.000001 if !l:quiet | |
1 0.000238 0.000009 call s:Echoerr(l:message) | |
1 0.000001 endif | |
1 0.000002 return v:null | |
else | |
if !l:quiet | |
call s:Echoerr('Unknown output type: ' . json_encode(a:output)) | |
endif | |
return v:null | |
endif | |
FUNCTION ale#path#CdString() | |
Called 10 times | |
Total time: 0.000294 | |
Self time: 0.000077 | |
count total (s) self (s) | |
10 0.000288 0.000070 return 'cd ' . ale#Escape(a:directory) . ' && ' | |
FUNCTION <SNR>23_SynSet() | |
Called 5 times | |
Total time: 0.002888 | |
Self time: 0.002888 | |
count total (s) self (s) | |
" clear syntax for :set syntax=OFF and any syntax name that doesn't exist | |
5 0.000013 syn clear | |
5 0.000008 if exists("b:current_syntax") | |
unlet b:current_syntax | |
endif | |
5 0.000009 let s = expand("<amatch>") | |
5 0.000005 if s == "ON" | |
" :set syntax=ON | |
if &filetype == "" | |
echohl ErrorMsg | |
echo "filetype unknown" | |
echohl None | |
endif | |
let s = &filetype | |
elseif s == "OFF" | |
let s = "" | |
endif | |
5 0.000003 if s != "" | |
" Load the syntax file(s). When there are several, separated by dots, | |
" load each in sequence. | |
10 0.000018 for name in split(s, '\.') | |
5 0.002776 exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim" | |
5 0.000003 endfor | |
5 0.000002 endif | |
FUNCTION remote#define#request() | |
Called 5 times | |
Total time: 21.606619 | |
Self time: 16.738998 | |
count total (s) self (s) | |
5 0.000050 let s:busy[a:chan] = get(s:busy, a:chan, 0)+1 | |
5 21.606394 16.738773 let val = call('rpcrequest', [a:chan]+a:000) | |
5 0.000027 let s:busy[a:chan] -= 1 | |
5 0.000039 if s:busy[a:chan] == 0 | |
5 0.000033 for msg in get(s:pending_notifications, a:chan, []) | |
call call('rpcnotify', [a:chan] + msg) | |
endfor | |
5 0.000012 let s:pending_notifications[a:chan] = [] | |
5 0.000002 endif | |
5 0.000008 return val | |
FUNCTION test#javascript#webdriverio#test_file() | |
Called 6 times | |
Total time: 0.000083 | |
Self time: 0.000083 | |
count total (s) self (s) | |
6 0.000079 return a:file =~# g:test#javascript#webdriverio#file_pattern && test#javascript#has_package('webdriverio') && !empty(glob('wdio.conf.js')) | |
FUNCTION ale#engine#Cleanup() | |
Called 3 times | |
Total time: 0.000040 | |
Self time: 0.000040 | |
count total (s) self (s) | |
" Don't bother with cleanup code when newer NeoVim versions are exiting. | |
3 0.000012 if get(v:, 'exiting', v:null) isnot v:null | |
return | |
endif | |
3 0.000011 if !has_key(g:ale_buffer_info, a:buffer) | |
3 0.000002 return | |
endif | |
call ale#engine#RunLinters(a:buffer, [], 1) | |
call remove(g:ale_buffer_info, a:buffer) | |
FUNCTION test#lua#busted#test_file() | |
Called 6 times | |
Total time: 0.000040 | |
Self time: 0.000040 | |
count total (s) self (s) | |
6 0.000037 return a:file =~# g:test#lua#busted#file_pattern | |
FUNCTION <SNR>116_check_mixed_indent() | |
Called 8 times | |
Total time: 0.014183 | |
Self time: 0.014183 | |
count total (s) self (s) | |
8 0.000039 let indent_algo = get(g:, 'airline#extensions#whitespace#mixed_indent_algo', 0) | |
8 0.000010 if indent_algo == 1 | |
" [<tab>]<space><tab> | |
" spaces before or between tabs are not allowed | |
let t_s_t = '(^\t* +\t\s*\S)' | |
" <tab>(<space> x count) | |
" count of spaces at the end of tabs should be less than tabstop value | |
let t_l_s = '(^\t+ {' . &ts . ',}' . '\S)' | |
return search('\v' . t_s_t . '|' . t_l_s, 'nw') | |
elseif indent_algo == 2 | |
return search('\v(^\t* +\t\s*\S)', 'nw') | |
else | |
8 0.014045 return search('\v(^\t+ +)|(^ +\t+)', 'nw') | |
endif | |
FUNCTION <SNR>133_get_seperator() | |
Called 1469 times | |
Total time: 1.671402 | |
Self time: 0.011673 | |
count total (s) self (s) | |
1469 0.397104 0.004786 if airline#builder#should_change_group(a:prev_group, a:group) | |
810 1.271021 0.003609 return s:get_transitioned_seperator(a:self, a:prev_group, a:group, a:side) | |
else | |
659 0.001187 return a:side ? a:self._context.left_alt_sep : a:self._context.right_alt_sep | |
endif | |
FUNCTION <SNR>246_rails_version() | |
Called 6 times | |
Total time: 0.000260 | |
Self time: 0.000260 | |
count total (s) self (s) | |
6 0.000052 if filereadable('Gemfile.lock') | |
for line in readfile('Gemfile.lock') | |
let version_string = matchstr(line, '\v^ *rails \(\zs\d+\.\d+\..+\ze\)') | |
if version_string | |
break | |
endif | |
endfor | |
if version_string | |
let rails_version = matchlist(version_string, '\v(\d+)\.(\d+)\.(\d+)%(\.(\d+))?')[1:-1] | |
call filter(rails_version, '!empty(v:val)') | |
call map(rails_version, 'str2nr(v:val)') | |
return rails_version | |
end | |
endif | |
FUNCTION LSP#text() | |
Called 19 times | |
Total time: 0.002428 | |
Self time: 0.002428 | |
count total (s) self (s) | |
19 0.002138 let l:lines = getline(1, '$') | |
19 0.000104 if l:lines[-1] !=# '' && &fixendofline | |
19 0.000090 let l:lines += [''] | |
19 0.000021 endif | |
19 0.000029 return l:lines | |
FUNCTION fugitive#ReloadStatus() | |
Called 12 times | |
Total time: 0.001281 | |
Self time: 0.001281 | |
count total (s) self (s) | |
12 0.000028 if exists('s:reloading_status') | |
return | |
endif | |
12 0.000010 try | |
12 0.000022 let s:reloading_status = 1 | |
12 0.000019 let mytab = tabpagenr() | |
36 0.000056 for tab in [mytab] + range(1,tabpagenr('$')) | |
72 0.000083 for winnr in range(1,tabpagewinnr(tab,'$')) | |
48 0.000140 if getbufvar(tabpagebuflist(tab)[winnr-1],'fugitive_type') ==# 'index' | |
execute 'tabnext '.tab | |
if winnr != winnr() | |
execute winnr.'wincmd w' | |
let restorewinnr = 1 | |
endif | |
try | |
if !&modified | |
call fugitive#BufReadStatus() | |
endif | |
finally | |
if exists('restorewinnr') | |
wincmd p | |
endif | |
execute 'tabnext '.mytab | |
endtry | |
endif | |
48 0.000018 endfor | |
24 0.000010 endfor | |
12 0.000008 finally | |
12 0.000015 unlet! s:reloading_status | |
12 0.000010 endtry | |
FUNCTION sy#sign#process_diff() | |
Called 7 times | |
Total time: 0.039851 | |
Self time: 0.004153 | |
count total (s) self (s) | |
7 0.000060 let a:sy.signtable = {} | |
7 0.000083 let a:sy.hunks = [] | |
7 0.000017 let [added, modified, deleted] = [0, 0, 0] | |
7 0.001466 0.000038 call sy#sign#get_current_signs(a:sy) | |
" Determine where we have to put our signs. | |
29 0.000198 for line in filter(a:diff, 'v:val =~ "^@@ "') | |
22 0.000044 let a:sy.lines = [] | |
22 0.000020 let ids = [] | |
22 0.000341 let tokens = matchlist(line, '^@@ -\v(\d+),?(\d*) \+(\d+),?(\d*)') | |
22 0.000053 let old_line = str2nr(tokens[1]) | |
22 0.000033 let new_line = str2nr(tokens[3]) | |
22 0.000065 let old_count = empty(tokens[2]) ? 1 : str2nr(tokens[2]) | |
22 0.000050 let new_count = empty(tokens[4]) ? 1 : str2nr(tokens[4]) | |
" 2 lines added: | |
" @@ -5,0 +6,2 @@ this is line 5 | |
" +this is line 5 | |
" +this is line 5 | |
22 0.000030 if (old_count == 0) && (new_count >= 1) | |
let added += new_count | |
let offset = 0 | |
while offset < new_count | |
let line = new_line + offset | |
let offset += 1 | |
if s:external_sign_present(a:sy, line) | continue | endif | |
call add(ids, s:add_sign(a:sy, line, 'SignifyAdd')) | |
endwhile | |
" 2 lines removed: | |
" @@ -6,2 +5,0 @@ this is line 5 | |
" -this is line 6 | |
" -this is line 7 | |
elseif (old_count >= 1) && (new_count == 0) | |
if s:external_sign_present(a:sy, new_line) | continue | endif | |
let deleted += old_count | |
if new_line == 0 | |
call add(ids, s:add_sign(a:sy, 1, 'SignifyRemoveFirstLine')) | |
elseif s:sign_show_count | |
let text = s:sign_delete . (old_count <= 99 ? old_count : '>') | |
while strwidth(text) > 2 | |
let text = substitute(text, '.', '', '') | |
endwhile | |
call add(ids, s:add_sign(a:sy, new_line, 'SignifyDelete'. old_count, text)) | |
else | |
call add(ids, s:add_sign(a:sy, new_line, 'SignifyDeleteMore', s:sign_delete)) | |
endif | |
" 2 lines changed: | |
" @@ -5,2 +5,2 @@ this is line 4 | |
" -this is line 5 | |
" -this is line 6 | |
" +this os line 5 | |
" +this os line 6 | |
elseif old_count == new_count | |
22 0.000031 let modified += old_count | |
22 0.000023 let offset = 0 | |
49 0.000057 while offset < new_count | |
27 0.000037 let line = new_line + offset | |
27 0.000027 let offset += 1 | |
27 0.000327 0.000110 if s:external_sign_present(a:sy, line) | continue | endif | |
27 0.034178 0.000154 call add(ids, s:add_sign(a:sy, line, 'SignifyChange')) | |
27 0.000033 endwhile | |
22 0.000009 else | |
" 2 lines changed; 2 lines removed: | |
" @@ -5,4 +5,2 @@ this is line 4 | |
" -this is line 5 | |
" -this is line 6 | |
" -this is line 7 | |
" -this is line 8 | |
" +this os line 5 | |
" +this os line 6 | |
if old_count > new_count | |
let modified += new_count | |
let removed = old_count - new_count | |
let deleted += removed | |
let offset = 0 | |
while offset < new_count - 1 | |
let line = new_line + offset | |
let offset += 1 | |
if s:external_sign_present(a:sy, line) | continue | endif | |
call add(ids, s:add_sign(a:sy, line, 'SignifyChange')) | |
endwhile | |
let line = new_line + offset | |
if s:external_sign_present(a:sy, line) | continue | endif | |
call add(ids, s:add_sign(a:sy, line, (removed > 9) ? 'SignifyChangeDeleteMore' : 'SignifyChangeDelete'. removed)) | |
" lines changed and added: | |
" @@ -5 +5,3 @@ this is line 4 | |
" -this is line 5 | |
" +this os line 5 | |
" +this is line 42 | |
" +this is line 666 | |
else | |
let modified += old_count | |
let offset = 0 | |
while offset < old_count | |
let line = new_line + offset | |
let offset += 1 | |
if s:external_sign_present(a:sy, line) | continue | endif | |
call add(ids, s:add_sign(a:sy, line, 'SignifyChange')) | |
let added += 1 | |
endwhile | |
while offset < new_count | |
let line = new_line + offset | |
let offset += 1 | |
if s:external_sign_present(a:sy, line) | continue | endif | |
call add(ids, s:add_sign(a:sy, line, 'SignifyAdd')) | |
endwhile | |
endif | |
endif | |
22 0.000032 if !empty(ids) | |
22 0.000098 call add(a:sy.hunks, { 'ids' : ids, 'start': a:sy.lines[0], 'end' : a:sy.lines[-1] }) | |
22 0.000010 endif | |
22 0.000010 endfor | |
" Remove obsoleted signs. | |
9 0.000062 for line in filter(keys(a:sy.internal), '!has_key(a:sy.signtable, v:val)') | |
2 0.000010 execute 'sign unplace' a:sy.internal[line].id 'buffer='.a:sy.buffer | |
2 0.000001 endfor | |
7 0.000041 if has('gui_macvim') && has('gui_running') && mode() == 'n' | |
" MacVim needs an extra kick in the butt, when setting signs from the | |
" exit handler. :redraw would trigger a "hanging cursor" issue. | |
call feedkeys("\<c-l>", 'n') | |
endif | |
7 0.000014 if empty(a:sy.updated_by) && empty(a:sy.hunks) | |
call sy#verbose('Successful exit value, but no diff. Keep VCS for time being.', a:vcs) | |
return | |
endif | |
7 0.000058 0.000030 call sy#verbose('Signs updated.', a:vcs) | |
7 0.000016 let a:sy.updated_by = a:vcs | |
7 0.000021 if len(a:sy.vcs) > 1 | |
call sy#verbose('Disable all other VCS.', a:vcs) | |
let a:sy.vcs = [a:vcs] | |
endif | |
7 0.000028 let a:sy.stats = [added, modified, deleted] | |
FUNCTION <SNR>143_nvim_job_exit_wrapper() | |
Called 7 times | |
Total time: 0.000923 | |
Self time: 0.000091 | |
count total (s) self (s) | |
7 0.000914 0.000082 call call(a:real_cb, [a:job, a:exit_code]) | |
FUNCTION <SNR>62_Slash() | |
Called 5 times | |
Total time: 0.000023 | |
Self time: 0.000023 | |
count total (s) self (s) | |
5 0.000009 if exists('+shellslash') | |
return tr(a:path, '\', '/') | |
else | |
5 0.000004 return a:path | |
endif | |
FUNCTION <SNR>134_get_section() | |
Called 1287 times | |
Total time: 0.035866 | |
Self time: 0.032462 | |
count total (s) self (s) | |
1287 0.002673 if has_key(s:section_truncate_width, a:key) | |
859 0.001945 if winwidth(a:winnr) < s:section_truncate_width[a:key] | |
return '' | |
endif | |
859 0.000382 endif | |
1287 0.001990 let spc = g:airline_symbols.space | |
1287 0.003738 if !exists('g:airline_section_{a:key}') | |
return '' | |
endif | |
1287 0.010479 0.007075 let text = airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key}) | |
1287 0.006142 let [prefix, suffix] = [get(a:000, 0, '%('.spc), get(a:000, 1, spc.'%)')] | |
1287 0.003637 return empty(text) ? '' : prefix.text.suffix | |
FUNCTION <SNR>68_InitVariable() | |
Called 182 times | |
Total time: 0.000958 | |
Self time: 0.000958 | |
count total (s) self (s) | |
182 0.000433 if !exists(a:var) | |
16 0.000073 execute 'let ' . a:var . ' = ' . string(a:value) | |
16 0.000006 endif | |
FUNCTION airline#parts#spell() | |
Called 1563 times | |
Total time: 0.035339 | |
Self time: 0.035339 | |
count total (s) self (s) | |
1563 0.018391 let spelllang = g:airline_detect_spelllang ? printf(" [%s]", toupper(substitute(&spelllang, ',', '/', 'g'))) : '' | |
1563 0.003352 if g:airline_detect_spell && &spell | |
612 0.001358 if winwidth(0) >= 90 | |
612 0.002021 return g:airline_symbols.spell . spelllang | |
elseif winwidth(0) >= 70 | |
return g:airline_symbols.spell | |
else | |
return split(g:airline_symbols.spell, '\zs')[0] | |
endif | |
endif | |
951 0.000534 return '' | |
FUNCTION ale#linter#GetAll() | |
Called 30 times | |
Total time: 0.001562 | |
Self time: 0.001249 | |
count total (s) self (s) | |
" Don't return linters in the sandbox. | |
" Otherwise a sandboxed script could modify them. | |
30 0.000404 0.000092 if ale#util#InSandbox() | |
return [] | |
endif | |
30 0.000065 let l:combined_linters = [] | |
60 0.000122 for l:filetype in a:filetypes | |
" Load linters from runtimepath if we haven't done that yet. | |
30 0.000097 if !has_key(s:runtime_loaded_map, l:filetype) | |
execute 'silent! runtime! ale_linters/' . l:filetype . '/*.vim' | |
let s:runtime_loaded_map[l:filetype] = 1 | |
endif | |
30 0.000189 call extend(l:combined_linters, get(s:linters, l:filetype, [])) | |
30 0.000028 endfor | |
30 0.000045 return l:combined_linters | |
FUNCTION <SNR>113_update_untracked() | |
Called 1563 times | |
Total time: 0.374098 | |
Self time: 0.113781 | |
count total (s) self (s) | |
1563 0.018528 let file = expand("%:p") | |
1563 0.006562 if empty(file) || isdirectory(file) | |
return | |
endif | |
1563 0.002414 let needs_update = 1 | |
4689 0.007315 for vcs in keys(s:vcs_config) | |
3126 0.012559 if file =~ s:vcs_config[vcs].exclude | |
" Skip check for files that live in the exclude directory | |
let needs_update = 0 | |
endif | |
3126 0.008548 if has_key(s:vcs_config[vcs].untracked, file) | |
1521 0.002014 let needs_update = 0 | |
1521 0.027510 0.008497 call airline#extensions#branch#update_untracked_config(file, vcs) | |
1521 0.000853 endif | |
3126 0.010158 endfor | |
1563 0.001721 if !needs_update | |
1521 0.001090 return | |
endif | |
126 0.000239 for vcs in keys(s:vcs_config) | |
84 0.000186 let config = s:vcs_config[vcs] | |
84 0.000095 if g:airline#init#vim_async | |
" Note that asynchronous update updates s:vcs_config only, and only | |
" s:update_untracked updates b:buffer_vcs_config. If s:vcs_config is | |
" invalidated again before s:update_untracked is called, then we lose the | |
" result of the previous call, i.e. the head string is not updated. It | |
" doesn't happen often in practice, so we let it be. | |
noa call airline#async#vim_vcs_untracked(config, file) | |
else | |
" nvim async or vim without job-feature | |
84 0.242452 0.001147 noa call airline#async#nvim_vcs_untracked(config, file, vcs) | |
84 0.000077 endif | |
84 0.000088 endfor | |
FUNCTION <SNR>143_update_tags() | |
Called 7 times | |
Total time: 0.111675 | |
Self time: 0.000767 | |
count total (s) self (s) | |
" Figure out where to save. | |
7 0.000036 let l:buf_gutentags_files = getbufvar(a:bufno, 'gutentags_files') | |
7 0.000018 let l:tags_file = l:buf_gutentags_files[a:module] | |
7 0.000015 let l:proj_dir = getbufvar(a:bufno, 'gutentags_root') | |
" Check that there's not already an update in progress. | |
7 0.000133 0.000049 let l:in_progress_idx = gutentags#find_job_index_by_tags_file(a:module, l:tags_file) | |
7 0.000007 if l:in_progress_idx >= 0 | |
if a:queue_mode == 2 | |
let l:needs_queuing = 1 | |
for qu_info in s:update_queue[a:module] | |
if qu_info[0] == l:tags_file | |
let l:needs_queuing = 0 | |
break | |
endif | |
endfor | |
if l:needs_queuing | |
call add(s:update_queue[a:module], [l:tags_file, a:bufno, a:write_mode]) | |
endif | |
call gutentags#trace("Tag file '" . l:tags_file . "' is already being updated. Queuing it up...") | |
elseif a:queue_mode == 1 | |
call gutentags#trace("Tag file '" . l:tags_file ."' is already being updated. Skipping...") | |
elseif a:queue_mode == 0 | |
echom "gutentags: The tags file is already being updated, " ."please try again later." | |
else | |
call gutentags#throw("Unknown queue mode: " . a:queue_mode) | |
endif | |
" Don't update the tags right now. | |
return | |
endif | |
" Switch to the project root to make the command line smaller, and make | |
" it possible to get the relative path of the filename to parse if we're | |
" doing an incremental update. | |
7 0.000034 let l:prev_cwd = getcwd() | |
7 0.001522 0.000045 call gutentags#chdir(fnameescape(l:proj_dir)) | |
7 0.000008 try | |
7 0.108051 0.000228 call call("gutentags#".a:module."#generate",[l:proj_dir, l:tags_file, { 'write_mode': a:write_mode, }]) | |
7 0.000009 catch /^gutentags\:/ | |
echom "Error while generating ".a:module." file:" | |
echom v:exception | |
finally | |
" Restore the current directory... | |
7 0.001598 0.000074 call gutentags#chdir(fnameescape(l:prev_cwd)) | |
7 0.000011 endtry | |
FUNCTION ale#linter#ResolveFiletype() | |
Called 30 times | |
Total time: 0.001711 | |
Self time: 0.000363 | |
count total (s) self (s) | |
30 0.001542 0.000194 let l:filetype = s:GetAliasedFiletype(a:original_filetype) | |
30 0.000075 if type(l:filetype) isnot v:t_list | |
30 0.000049 return [l:filetype] | |
endif | |
return l:filetype | |
FUNCTION ale#engine#RemoveManagedFiles() | |
Called 10 times | |
Total time: 0.001407 | |
Self time: 0.001333 | |
count total (s) self (s) | |
10 0.000054 let l:info = get(g:ale_buffer_info, a:buffer, {}) | |
" We can't delete anything in a sandbox, so wait until we escape from | |
" it to delete temporary files and directories. | |
10 0.000098 0.000024 if ale#util#InSandbox() | |
return | |
endif | |
" Delete files with a call akin to a plan `rm` command. | |
10 0.000018 if has_key(l:info, 'temporary_file_list') | |
10 0.000016 for l:filename in l:info.temporary_file_list | |
call delete(l:filename) | |
endfor | |
10 0.000032 let l:info.temporary_file_list = [] | |
10 0.000005 endif | |
" Delete directories like `rm -rf`. | |
" Directories are handled differently from files, so paths that are | |
" intended to be single files can be set up for automatic deletion without | |
" accidentally deleting entire directories. | |
10 0.000017 if has_key(l:info, 'temporary_directory_list') | |
20 0.000025 for l:directory in l:info.temporary_directory_list | |
10 0.000990 call delete(l:directory, 'rf') | |
10 0.000013 endfor | |
10 0.000030 let l:info.temporary_directory_list = [] | |
10 0.000005 endif | |
FUNCTION airline#extensions#tabline#buflist#invalidate() | |
Called 55 times | |
Total time: 0.000289 | |
Self time: 0.000289 | |
count total (s) self (s) | |
55 0.000198 unlet! s:current_buffer_list | |
FUNCTION ale#semver#GTE() | |
Called 10 times | |
Total time: 0.000168 | |
Self time: 0.000168 | |
count total (s) self (s) | |
10 0.000026 if empty(a:lhs) | |
return 0 | |
endif | |
10 0.000034 if a:lhs[0] > a:rhs[0] | |
return 1 | |
elseif a:lhs[0] == a:rhs[0] | |
10 0.000022 if a:lhs[1] > a:rhs[1] | |
10 0.000012 return 1 | |
elseif a:lhs[1] == a:rhs[1] | |
return get(a:lhs, 2) >= get(a:rhs, 2) | |
endif | |
endif | |
return 0 | |
FUNCTION <SNR>174_multi_string() | |
Called 1725 times | |
Total time: 0.043947 | |
Self time: 0.028568 | |
count total (s) self (s) | |
" 2x performance for general case | |
1725 0.007682 if a:line !~# '[''"]' | |
1485 0.002410 return [a:in_string, 0, 0, '', ''] | |
endif | |
240 0.011980 0.000982 let string_match = s:matchstrpos(a:line, a:first_re) | |
240 0.000364 if string_match[1] == -1 | |
return [a:in_string, 0, 0, '', ''] | |
endif | |
" Anything before first match? | |
240 0.000224 if string_match[1] >= 1 | |
234 0.000506 let before_first = a:line[:(string_match[1] - 1)] | |
234 0.000105 else | |
6 0.000007 let before_first = '' | |
6 0.000003 endif | |
240 0.000313 let in_string = a:in_string | |
240 0.000250 let next_re = '' | |
240 0.000281 let line_slice = a:line | |
240 0.000218 let found_ends = 0 | |
546 0.000664 while string_match[1] != -1 | |
420 0.000313 if in_string | |
210 0.000192 let in_string = 0 | |
210 0.000243 let found_ends += 1 | |
210 0.000241 let next_re = s:string_start_re | |
210 0.000080 else | |
210 0.000194 let in_string = 1 | |
210 0.001271 let quotes = string_match[0][matchend(string_match[0], s:string_prefix_re):] | |
210 0.000344 let next_re = '\\\@<!' . quotes | |
210 0.000092 endif | |
420 0.000772 let line_slice = line_slice[(string_match[2]):] | |
420 0.000518 if empty(line_slice) | |
114 0.000070 break | |
endif | |
306 0.005447 0.001065 let string_match = s:matchstrpos(line_slice, next_re) | |
306 0.000199 endwhile | |
240 0.000168 if in_string | |
" Check if in single quoted string and line continues | |
48 0.000179 let single_quoted = quotes =~# '^[''"]$' | |
48 0.000069 if single_quoted && line_slice !~# s:line_cont_re | |
return [0, single_quoted, (found_ends >= 1), '', before_first] | |
else | |
48 0.000115 return [1, single_quoted, (found_ends >= 1), next_re, before_first] | |
endif | |
else | |
192 0.000336 return [0, 0, (found_ends >= 2), '', before_first] | |
endif | |
FUNCTION ale#sign#GetSignCommands() | |
Called 10 times | |
Total time: 0.000758 | |
Self time: 0.000758 | |
count total (s) self (s) | |
10 0.000013 let l:command_list = [] | |
10 0.000015 let l:is_dummy_sign_set = a:was_sign_set | |
" Set the dummy sign if we need to. | |
" The dummy sign is needed to keep the sign column open while we add | |
" and remove signs. | |
10 0.000025 if !l:is_dummy_sign_set && (!empty(a:sign_map) || g:ale_sign_column_always) | |
10 0.000039 call add(l:command_list, 'sign place ' . g:ale_sign_offset . ' line=1 name=ALEDummySign buffer=' . a:buffer) | |
10 0.000013 let l:is_dummy_sign_set = 1 | |
10 0.000005 endif | |
" Place new items first. | |
27 0.000044 for [l:line_str, l:info] in items(a:sign_map) | |
17 0.000013 if l:info.new_id | |
" Save the sign IDs we are setting back on our loclist objects. | |
" These IDs will be used to preserve items which are set many times. | |
32 0.000024 for l:item in l:info.items | |
16 0.000022 let l:item.sign_id = l:info.new_id | |
16 0.000007 endfor | |
16 0.000025 if index(l:info.current_id_list, l:info.new_id) < 0 | |
1 0.000005 call add(l:command_list, 'sign place ' . (l:info.new_id) . ' line=' . l:line_str . ' name=' . (l:info.new_name) . ' buffer=' . a:buffer) | |
1 0.000000 endif | |
16 0.000006 endif | |
17 0.000006 endfor | |
" Remove signs without new IDs. | |
27 0.000028 for l:info in values(a:sign_map) | |
33 0.000025 for l:current_id in l:info.current_id_list | |
16 0.000016 if l:current_id isnot l:info.new_id | |
1 0.000003 call add(l:command_list, 'sign unplace ' . l:current_id . ' buffer=' . a:buffer) | |
1 0.000000 endif | |
16 0.000007 endfor | |
17 0.000007 endfor | |
" Remove the dummy sign to close the sign column if we need to. | |
10 0.000015 if l:is_dummy_sign_set && !g:ale_sign_column_always | |
10 0.000032 call add(l:command_list, 'sign unplace ' . g:ale_sign_offset . ' buffer=' . a:buffer) | |
10 0.000004 endif | |
10 0.000009 return l:command_list | |
FUNCTION LanguageClient#getState() | |
Called 13 times | |
Total time: 0.001102 | |
Self time: 0.000077 | |
count total (s) self (s) | |
13 0.001085 0.000060 return LanguageClient#Call('languageClient/getState', {}, a:callback) | |
FUNCTION <SNR>220_re_unquoted_match() | |
Called 6 times | |
Total time: 0.000113 | |
Self time: 0.000113 | |
count total (s) self (s) | |
" Don't match a:match if it is located in-between unescaped single or double | |
" quotes | |
6 0.000090 return a:match . '\v\ze([^"' . "'" . '\\]*(\\.|"([^"\\]*\\.)*[^"\\]*"|' . "'" . '([^' . "'" . '\\]*\\.)*[^' . "'" . '\\]*' . "'" . '))*[^"' . "'" . ']*$' | |
FUNCTION <SNR>11_isAnsible() | |
Called 5 times | |
Total time: 0.000634 | |
Self time: 0.000634 | |
count total (s) self (s) | |
5 0.000030 let filepath = expand("%:p") | |
5 0.000009 let filename = expand("%:t") | |
5 0.000048 if filepath =~ '\v/(tasks|roles|handlers)/.*\.ya?ml$' | return 1 | en | |
5 0.000025 if filepath =~ '\v/(group|host)_vars/' | return 1 | en | |
5 0.000462 if filename =~ '\v(playbook|site|main|local)\.ya?ml$' | return 1 | en | |
5 0.000009 let shebang = getline(1) | |
5 0.000020 if shebang =~# '^#!.*/bin/env\s\+ansible-playbook\>' | return 1 | en | |
5 0.000015 if shebang =~# '^#!.*/bin/ansible-playbook\>' | return 1 | en | |
5 0.000004 return 0 | |
FUNCTION <SNR>94_LocalBrowse() | |
Called 31 times | |
Total time: 0.000957 | |
Self time: 0.000957 | |
count total (s) self (s) | |
" Unfortunate interaction -- only DechoMsg debugging calls can be safely used here. | |
" Otherwise, the BufEnter event gets triggered when attempts to write to | |
" the DBG buffer are made. | |
31 0.000056 if !exists("s:vimentered") | |
" If s:vimentered doesn't exist, then the VimEnter event hasn't fired. It will, | |
" and so s:VimEnter() will then be calling this routine, but this time with s:vimentered defined. | |
" call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered doesn't exist)") | |
" call Dret("s:LocalBrowse") | |
return | |
endif | |
" call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered=".s:vimentered.")") | |
31 0.000103 if has("amiga") | |
" The check against '' is made for the Amiga, where the empty | |
" string is the current directory and not checking would break | |
" things such as the help command. | |
" call Decho("(LocalBrowse) dirname<".a:dirname."> (isdirectory, amiga)") | |
if a:dirname != '' && isdirectory(a:dirname) | |
sil! call netrw#LocalBrowseCheck(a:dirname) | |
if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt | |
exe w:netrw_bannercnt | |
endif | |
endif | |
elseif isdirectory(a:dirname) | |
" call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)") | |
" call Dredir("LocalBrowse ft last set: ","verbose set ft") | |
" call Decho("(s:LocalBrowse) COMBAK#23: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) | |
sil! call netrw#LocalBrowseCheck(a:dirname) | |
" call Decho("(s:LocalBrowse) COMBAK#24: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) | |
if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt | |
exe w:netrw_bannercnt | |
" call Decho("(s:LocalBrowse) COMBAK#25: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) | |
endif | |
else | |
" not a directory, ignore it | |
" call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...") | |
31 0.000022 endif | |
" call Decho("(s:LocalBrowse) COMBAK#26: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) | |
" call Dret("s:LocalBrowse") | |
FUNCTION <SNR>145_getInput() | |
Called 3 times | |
Total time: 0.001510 | |
Self time: 0.001510 | |
count total (s) self (s) | |
3 0.000013 call inputsave() | |
3 0.001400 let l:input = input(a:prompt, a:default) | |
3 0.000057 call inputrestore() | |
3 0.000022 return l:input | |
FUNCTION ale#path#Simplify() | |
Called 2550 times | |
Total time: 0.021721 | |
Self time: 0.021721 | |
count total (s) self (s) | |
2550 0.004609 if has('unix') | |
2550 0.015530 return substitute(simplify(a:path), '^//\+', '/', 'g') " no-custom-checks | |
endif | |
let l:win_path = substitute(a:path, '/', '\\', 'g') | |
return substitute(simplify(l:win_path), '^\\\+', '\', 'g') " no-custom-checks | |
FUNCTION test#javascript#intern#test_file() | |
Called 6 times | |
Total time: 0.000106 | |
Self time: 0.000106 | |
count total (s) self (s) | |
6 0.000100 return a:file =~# g:test#javascript#intern#file_pattern && filereadable(g:test#javascript#intern#config_module . '.js') && test#javascript#has_package('intern') | |
FUNCTION airline#util#strchars() | |
Called 953 times | |
Total time: 0.003206 | |
Self time: 0.003206 | |
count total (s) self (s) | |
953 0.001524 if exists('*strchars') | |
953 0.001335 return strchars(a:str) | |
else | |
return strlen(substitute(a:str, '.', 'a', 'g')) | |
endif | |
FUNCTION airline#extensions#tabline#formatters#default#format() | |
Called 2792 times | |
Total time: 0.162922 | |
Self time: 0.120910 | |
count total (s) self (s) | |
2792 0.008507 let fmod = get(g:, 'airline#extensions#tabline#fnamemod', ':~:.') | |
2792 0.003037 let _ = '' | |
2792 0.007135 let name = bufname(a:bufnr) | |
2792 0.004504 if empty(name) | |
237 0.000594 let _ .= '[No Name]' | |
237 0.000178 else | |
2555 0.002819 if s:fnamecollapse | |
" Does not handle non-ascii characters like Cyrillic: 'D/Учёба/t.c' | |
"let _ .= substitute(fnamemodify(name, fmod), '\v\w\zs.{-}\ze(\\|/)', '', 'g') | |
2555 0.033744 let _ .= pathshorten(fnamemodify(name, fmod)) | |
2555 0.001757 else | |
let _ .= fnamemodify(name, fmod) | |
endif | |
2555 0.009144 if a:bufnr != bufnr('%') && s:fnametruncate && strlen(_) > s:fnametruncate | |
let _ = strpart(_, 0, s:fnametruncate) | |
endif | |
2555 0.001467 endif | |
2792 0.061664 0.019651 return airline#extensions#tabline#formatters#default#wrap_name(a:bufnr, _) | |
FUNCTION airline#extensions#branch#head() | |
Called 1563 times | |
Total time: 0.869459 | |
Self time: 0.116400 | |
count total (s) self (s) | |
1563 0.005368 if !exists('b:buffer_vcs_config') | |
3 0.000083 0.000023 call s:init_buffer() | |
3 0.000001 endif | |
1563 0.366513 0.008679 call s:update_branch() | |
1563 0.383697 0.009599 call s:update_untracked() | |
1563 0.005851 if exists('b:airline_head') && !empty(b:airline_head) | |
604 0.000853 return b:airline_head | |
endif | |
959 0.001412 let b:airline_head = '' | |
959 0.003831 let vcs_priority = get(g:, "airline#extensions#branch#vcs_priority", ["git", "mercurial"]) | |
959 0.001142 let heads = [] | |
2877 0.002709 for vcs in vcs_priority | |
1918 0.003699 if !empty(b:buffer_vcs_config[vcs].branch) | |
8 0.000015 let heads += [vcs] | |
8 0.000003 endif | |
1918 0.000987 endfor | |
967 0.001224 for vcs in heads | |
8 0.000008 if !empty(b:airline_head) | |
let b:airline_head .= ' | ' | |
endif | |
8 0.000009 if len(heads) > 1 | |
let b:airline_head .= s:vcs_config[vcs].exe .':' | |
endif | |
8 0.000720 0.000071 let b:airline_head .= s:format_name({s:vcs_config[vcs].display_branch}()) | |
8 0.000029 let b:airline_head .= b:buffer_vcs_config[vcs].untracked | |
8 0.000004 endfor | |
959 0.001364 if empty(heads) | |
951 0.006496 0.002838 if airline#util#has_vcscommand() | |
noa call VCSCommandEnableBufferSetup() | |
if exists('b:VCSCommandBufferInfo') | |
let b:airline_head = s:format_name(get(b:VCSCommandBufferInfo, 0, '')) | |
endif | |
endif | |
951 0.000473 endif | |
959 0.001107 if empty(heads) | |
951 0.005322 0.002309 if airline#util#has_custom_scm() | |
try | |
let Fn = function(g:airline#extensions#branch#custom_head) | |
let b:airline_head = Fn() | |
endtry | |
endif | |
951 0.000383 endif | |
959 0.002717 if exists("g:airline#extensions#branch#displayed_head_limit") | |
959 0.002370 let w:displayed_head_limit = g:airline#extensions#branch#displayed_head_limit | |
959 0.002457 if len(b:airline_head) > w:displayed_head_limit - 1 | |
let b:airline_head = b:airline_head[0:(w:displayed_head_limit - 1)].(&encoding ==? 'utf-8' ? '…' : '.') | |
endif | |
959 0.000360 endif | |
959 0.003084 let minwidth = empty(get(b:, 'airline_hunks', '')) ? 14 : 7 | |
959 0.018076 0.004330 let b:airline_head = airline#util#shorten(b:airline_head, 120, minwidth) | |
959 0.001060 return b:airline_head | |
FUNCTION denite#start() | |
Called 5 times | |
Total time: 21.609389 | |
Self time: 0.000286 | |
count total (s) self (s) | |
5 0.000039 call inputsave() | |
5 0.000012 try | |
5 0.000038 let user_context = get(a:000, 0, {}) | |
5 21.609265 0.000162 return s:start(a:sources, user_context) | |
finally | |
5 0.000009 call inputrestore() | |
5 0.000007 endtry | |
FUNCTION gutentags#chdir() | |
Called 14 times | |
Total time: 0.003002 | |
Self time: 0.003002 | |
count total (s) self (s) | |
14 0.000077 if has('nvim') | |
14 0.000055 let chdir = haslocaldir() ? 'lcd' : haslocaldir(-1, 0) ? 'tcd' : 'cd' | |
14 0.000007 else | |
let chdir = haslocaldir() ? 'lcd' : 'cd' | |
endif | |
14 0.002787 execute chdir a:path | |
FUNCTION neoyank#_append() | |
Called 18 times | |
Total time: 0.003460 | |
Self time: 0.000417 | |
count total (s) self (s) | |
18 0.002533 0.000056 call neoyank#_load() | |
36 0.000049 for register in g:neoyank#save_registers | |
18 0.000316 0.000140 call s:add_register(register, [getreg(register), getregtype(register)]) | |
18 0.000015 endfor | |
18 0.000428 0.000038 call neoyank#_save() | |
FUNCTION airline#parts#mode() | |
Called 1563 times | |
Total time: 0.084600 | |
Self time: 0.055170 | |
count total (s) self (s) | |
1563 0.083543 0.054112 return airline#util#shorten(get(w:, 'airline_current_mode', ''), 79, 1) | |
FUNCTION <SNR>50_UseConfigFiles() | |
Called 5 times | |
Total time: 0.000504 | |
Self time: 0.000291 | |
count total (s) self (s) | |
5 0.000030 let l:buffer_name = expand('%:p') | |
" ignore buffers without a name | |
5 0.000007 if empty(l:buffer_name) | |
return | |
endif | |
" Check if any .editorconfig does exist | |
5 0.000252 0.000038 let l:conf_files = s:GetFilenames(expand('%:p:h'), '.editorconfig') | |
5 0.000005 let l:conf_found = 0 | |
30 0.000021 for conf_file in conf_files | |
25 0.000092 if filereadable(conf_file) | |
let l:conf_found = 1 | |
break | |
endif | |
25 0.000025 endfor | |
5 0.000004 if !l:conf_found | |
5 0.000003 return | |
endif | |
if g:EditorConfig_verbose | |
echo 'Applying EditorConfig on file "' . l:buffer_name . '"' | |
endif | |
if !s:initialized | |
if s:Initialize() | |
return | |
endif | |
endif | |
" Ignore specific patterns | |
for pattern in g:EditorConfig_exclude_patterns | |
if l:buffer_name =~ pattern | |
return | |
endif | |
endfor | |
if s:editorconfig_core_mode == 'external_command' | |
call s:UseConfigFiles_ExternalCommand() | |
elseif s:editorconfig_core_mode == 'python_builtin' | |
call s:UseConfigFiles_Python_Builtin() | |
elseif s:editorconfig_core_mode == 'python_external' | |
call s:UseConfigFiles_Python_External() | |
else | |
echohl Error | echo "Unknown EditorConfig Core: " . s:editorconfig_core_mode | echohl None | |
endif | |
FUNCTION denite#helper#call_denite() | |
Called 5 times | |
Total time: 21.619627 | |
Self time: 0.000490 | |
count total (s) self (s) | |
5 0.009422 0.000140 let [args, context] = denite#helper#_parse_options_args(a:args) | |
5 0.000024 let context.firstline = a:line1 | |
5 0.000015 let context.lastline = a:line2 | |
5 0.000030 let context.bufnr = bufnr('%') | |
5 0.000018 if a:command ==# 'DeniteCursorWord' | |
let context.input = expand('<cword>') | |
elseif a:command ==# 'DeniteBufferDir' | |
let context.path = expand('%:p:h') | |
elseif a:command ==# 'DeniteProjectDir' | |
3 0.000533 0.000068 let context.path = denite#project#path2project_directory( get(context, 'path', getcwd()), get(context, 'root_markers', '')) | |
3 0.000003 endif | |
5 21.609469 0.000081 call denite#start(args, context) | |
FUNCTION airline#extensions#gutentags#status() | |
Called 1759 times | |
Total time: 0.072093 | |
Self time: 0.016509 | |
count total (s) self (s) | |
1759 0.067276 0.011692 let msg = gutentags#statusline() | |
1759 0.003827 return empty(msg) ? '' : 'Gen. ' . msg | |
FUNCTION LanguageClient#Write() | |
Called 190 times | |
Total time: 0.005827 | |
Self time: 0.005827 | |
count total (s) self (s) | |
190 0.001372 let l:message = a:message . "\n" | |
190 0.000983 if has('nvim') | |
" jobsend respond 1 for success. | |
190 0.003031 return !jobsend(s:job, l:message) | |
elseif has('channel') | |
return ch_sendraw(s:job, l:message) | |
else | |
echoerr 'Not supported: not nvim nor vim with +channel.' | |
endif | |
FUNCTION neoyank#_save() | |
Called 18 times | |
Total time: 0.000390 | |
Self time: 0.000229 | |
count total (s) self (s) | |
18 0.000365 0.000204 if g:neoyank#file == '' || s:is_sudo() || (exists('g:neoyank#disable_write') && g:neoyank#disable_write) || s:yank_histories ==# s:yank_histories_old | |
18 0.000009 return | |
endif | |
call s:writefile(g:neoyank#file, [s:VERSION, s:vim2json(s:yank_histories)]) | |
let s:yank_histories_file_mtime = getftime(g:neoyank#file) | |
let s:yank_histories_old = copy(s:yank_histories) | |
FUNCTION airline#extensions#wordcount#apply() | |
Called 62 times | |
Total time: 0.001437 | |
Self time: 0.001437 | |
count total (s) self (s) | |
62 0.000242 let filetypes = get(g:, 'airline#extensions#wordcount#filetypes', s:filetypes) | |
" Check if filetype needs testing | |
62 0.000139 if did_filetype() || filetypes isnot s:filetypes | |
let s:filetypes = filetypes | |
" Select test based on type of "filetypes": new=list, old=string | |
if type(filetypes) == get(v:, 't_list', type([])) ? index(filetypes, &filetype) > -1 || index(filetypes, 'all') > -1 : match(&filetype, filetypes) > -1 | |
let b:airline_changedtick = -1 | |
call s:update_wordcount(1) " force update: ensures initial worcount exists | |
elseif exists('b:airline_wordcount') " cleanup when filetype is removed | |
unlet b:airline_wordcount | |
endif | |
endif | |
62 0.000120 if exists('b:airline_wordcount') | |
call airline#extensions#prepend_to_section( 'z', '%{airline#extensions#wordcount#get()}') | |
endif | |
FUNCTION ale#util#GetMatches() | |
Called 10 times | |
Total time: 0.000594 | |
Self time: 0.000594 | |
count total (s) self (s) | |
10 0.000016 let l:matches = [] | |
10 0.000026 let l:lines = type(a:lines) is v:t_list ? a:lines : [a:lines] | |
10 0.000026 let l:patterns = type(a:patterns) is v:t_list ? a:patterns : [a:patterns] | |
26 0.000021 for l:line in l:lines | |
16 0.000018 for l:pattern in l:patterns | |
16 0.000308 let l:match = matchlist(l:line, l:pattern) | |
16 0.000022 if !empty(l:match) | |
16 0.000025 call add(l:matches, l:match) | |
16 0.000010 break | |
endif | |
endfor | |
16 0.000007 endfor | |
10 0.000008 return l:matches | |
FUNCTION <SNR>144_buffer_commit() | |
Called 8 times | |
Total time: 0.000256 | |
Self time: 0.000097 | |
count total (s) self (s) | |
8 0.000250 0.000091 return matchstr(self.spec(),'^fugitive:\%(//\)\=.\{-\}\%(//\|::\)\zs\w*') | |
FUNCTION <SNR>199_TemporaryFilename() | |
Called 10 times | |
Total time: 0.000557 | |
Self time: 0.000286 | |
count total (s) self (s) | |
10 0.000052 let l:filename = fnamemodify(bufname(a:buffer), ':t') | |
10 0.000021 if empty(l:filename) | |
" If the buffer's filename is empty, create a dummy filename. | |
let l:ft = getbufvar(a:buffer, '&filetype') | |
let l:filename = 'file' . ale#filetypes#GuessExtension(l:ft) | |
endif | |
" Create a temporary filename, <temp_dir>/<original_basename> | |
" The file itself will not be created by this function. | |
10 0.000386 0.000114 return ale#util#Tempname() . (has('win32') ? '\' : '/') . l:filename | |
FUNCTION denite#get_status_linenr() | |
Called 18 times | |
Total time: 0.000165 | |
Self time: 0.000074 | |
count total (s) self (s) | |
18 0.000156 0.000065 return denite#get_status('linenr') | |
FUNCTION airline#extensions#tabline#buffers#get() | |
Called 187 times | |
Total time: 1.682411 | |
Self time: 0.015548 | |
count total (s) self (s) | |
187 0.000408 try | |
187 0.043928 0.001460 call <sid>map_keys() | |
187 0.000251 catch | |
" no-op | |
endtry | |
187 0.000947 let cur = bufnr('%') | |
187 0.000982 if cur == s:current_bufnr && &columns == s:column_width | |
159 0.001138 if !g:airline_detect_modified || getbufvar(cur, '&modified') == s:current_modified | |
128 0.000467 return s:current_tabline | |
endif | |
31 0.000017 endif | |
59 0.004701 0.000324 let b = airline#extensions#tabline#new_builder() | |
59 0.000205 let tab_bufs = tabpagebuflist(tabpagenr()) | |
59 0.000091 let show_buf_label_first = 0 | |
59 0.000135 if get(g:, 'airline#extensions#tabline#buf_label_first', 0) | |
let show_buf_label_first = 1 | |
endif | |
59 0.000059 if show_buf_label_first | |
call airline#extensions#tabline#add_label(b, 'buffers') | |
endif | |
59 0.000229 let b.tab_bufs = tabpagebuflist(tabpagenr()) | |
59 0.000107 let b.overflow_group = 'airline_tabhid' | |
59 0.346080 0.001502 let b.buffers = airline#extensions#tabline#buflist#list() | |
59 0.000143 if get(g:, 'airline#extensions#tabline#current_first', 0) | |
if index(b.buffers, cur) > -1 | |
call remove(b.buffers, index(b.buffers, cur)) | |
endif | |
let b.buffers = [cur] + b.buffers | |
endif | |
59 0.000176 function! b.get_group(i) dict | |
let bufnum = get(self.buffers, a:i, -1) | |
if bufnum == -1 | |
return '' | |
endif | |
let group = airline#extensions#tabline#group_of_bufnr(self.tab_bufs, bufnum) | |
if bufnum == bufnr('%') | |
let s:current_modified = (group == 'airline_tabmod') ? 1 : 0 | |
endif | |
return group | |
endfunction | |
59 0.000200 if has("tablineat") | |
59 0.000081 function! b.get_pretitle(i) dict | |
let bufnum = get(self.buffers, a:i, -1) | |
return '%'.bufnum.'@airline#extensions#tabline#buffers#clickbuf@' | |
endfunction | |
59 0.000064 function! b.get_posttitle(i) dict | |
return '%X' | |
endfunction | |
59 0.000033 endif | |
59 0.000058 function! b.get_title(i) dict | |
let bufnum = get(self.buffers, a:i, -1) | |
let group = self.get_group(a:i) | |
let pgroup = self.get_group(a:i - 1) | |
" always add a space when powerline_fonts are used | |
" or for the very first item | |
if get(g:, 'airline_powerline_fonts', 0) || a:i == 0 | |
let space = s:spc | |
else | |
let space= (pgroup == group ? s:spc : '') | |
endif | |
if get(g:, 'airline#extensions#tabline#buffer_idx_mode', 0) | |
if len(s:number_map) > 0 | |
return space. get(s:number_map, a:i+1, '') . '%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)' . s:spc | |
else | |
return '['.(a:i+1).s:spc.'%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)'.']' | |
endif | |
else | |
return space.'%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)'.s:spc | |
endif | |
endfunction | |
59 0.000316 let current_buffer = max([index(b.buffers, cur), 0]) | |
59 0.000139 let last_buffer = len(b.buffers) - 1 | |
59 0.001180 0.000277 call b.insert_titles(current_buffer, 0, last_buffer) | |
59 0.000403 0.000187 call b.add_section('airline_tabfill', '') | |
59 0.000320 0.000119 call b.split() | |
59 0.000291 0.000130 call b.add_section('airline_tabfill', '') | |
59 0.000070 if !show_buf_label_first | |
59 0.001537 0.000251 call airline#extensions#tabline#add_label(b, 'buffers') | |
59 0.000023 endif | |
59 0.000100 if tabpagenr('$') > 1 | |
call b.add_section_spaced('airline_tabmod', printf('%s %d/%d', "tab", tabpagenr(), tabpagenr('$'))) | |
endif | |
59 0.000097 let s:current_bufnr = cur | |
59 0.000114 let s:column_width = &columns | |
59 1.272953 0.000279 let s:current_tabline = b.build() | |
59 0.000264 let s:current_visible_buffers = copy(b.buffers) | |
59 0.000068 if b._right_title <= last_buffer | |
56 0.000157 call remove(s:current_visible_buffers, b._right_title, last_buffer) | |
56 0.000023 endif | |
59 0.000044 if b._left_title > 0 | |
3 0.000008 call remove(s:current_visible_buffers, 0, b._left_title) | |
3 0.000001 endif | |
59 0.000067 return s:current_tabline | |
FUNCTION SimpylFold#FoldExpr() | |
Called 6400 times | |
Total time: 0.386296 | |
Self time: 0.029066 | |
count total (s) self (s) | |
6400 0.008812 if !exists('b:SimpylFold_cache') | |
6 0.357525 0.000294 let b:SimpylFold_cache = s:cache() | |
6 0.000003 endif | |
6400 0.009599 return b:SimpylFold_cache[(a:lnum)]['foldexpr'] | |
FUNCTION <SNR>134_build_sections() | |
Called 245 times | |
Total time: 0.055799 | |
Self time: 0.010176 | |
count total (s) self (s) | |
1346 0.001210 for key in a:keys | |
1101 0.002396 if (key == 'warning' || key == 'error') && !a:context.active | |
242 0.000205 continue | |
endif | |
859 0.048816 0.003192 call s:add_section(a:builder, a:context, key) | |
859 0.000496 endfor | |
FUNCTION <SNR>113_update_hg_branch() | |
Called 1563 times | |
Total time: 0.083843 | |
Self time: 0.078837 | |
count total (s) self (s) | |
1563 0.014597 0.009591 if airline#util#has_lawrencium() | |
let cmd='LC_ALL=C hg qtop' | |
let stl=lawrencium#statusline() | |
let file=expand('%:p') | |
if !empty(stl) && get(b:, 'airline_do_mq_check', 1) | |
if g:airline#init#vim_async | |
noa call airline#async#get_mq_async(cmd, file) | |
elseif has("nvim") | |
noa call airline#async#nvim_get_mq_async(cmd, file) | |
else | |
" remove \n at the end of the command | |
let output=system(cmd)[0:-2] | |
noa call airline#async#mq_output(output, file) | |
endif | |
endif | |
" do not do mq check anymore | |
let b:airline_do_mq_check = 0 | |
if exists("b:mq") && !empty(b:mq) | |
if stl is# 'default' | |
" Shorten default a bit | |
let stl='def' | |
endif | |
let stl.=' ['.b:mq.']' | |
endif | |
let s:vcs_config['mercurial'].branch = stl | |
else | |
1563 0.003692 let s:vcs_config['mercurial'].branch = '' | |
1563 0.000949 endif | |
FUNCTION test#rust#cargotest#test_file() | |
Called 6 times | |
Total time: 0.000054 | |
Self time: 0.000054 | |
count total (s) self (s) | |
6 0.000050 return a:file =~# g:test#rust#cargotest#file_pattern | |
FUNCTION gutentags#remove_job_by_data() | |
Called 7 times | |
Total time: 0.000763 | |
Self time: 0.000060 | |
count total (s) self (s) | |
7 0.000104 0.000033 let l:idx = gutentags#find_job_index_by_data(a:module, a:data) | |
7 0.000655 0.000023 call gutentags#remove_job(a:module, l:idx) | |
FUNCTION test#elixir#exunit#test_file() | |
Called 6 times | |
Total time: 0.000054 | |
Self time: 0.000054 | |
count total (s) self (s) | |
6 0.000046 return a:file =~# g:test#elixir#exunit#file_pattern | |
FUNCTION airline#statusline() | |
Called 1777 times | |
Total time: 0.028013 | |
Self time: 0.028013 | |
count total (s) self (s) | |
1777 0.011409 if has_key(s:contexts, a:winnr) | |
1777 0.013558 return '%{airline#check_mode('.a:winnr.')}'.s:contexts[a:winnr].line | |
endif | |
" in rare circumstances this happens...see #276 | |
return '' | |
FUNCTION test#php#phpspec#test_file() | |
Called 6 times | |
Total time: 0.000095 | |
Self time: 0.000095 | |
count total (s) self (s) | |
6 0.000090 return a:file =~# g:test#php#phpspec#file_pattern && !empty(filter(readfile(a:file), 'v:val =~# ''PhpSpec\\ObjectBehavior''')) | |
FUNCTION ncm2#enable_for_buffer() | |
Called 31 times | |
Total time: 0.003252 | |
Self time: 0.001118 | |
count total (s) self (s) | |
31 0.000088 if get(b:, 'ncm2_enable', 0) | |
23 0.000014 return | |
endif | |
8 0.000011 let b:ncm2_enable = 1 | |
8 0.000012 augroup ncm2_buf_hooks | |
8 0.000487 au! * <buffer> | |
8 0.000088 au Insertenter,InsertLeave <buffer> call s:cache_cleanup() | |
8 0.000065 au BufEnter <buffer> call s:warmup() | |
8 0.000092 au InsertEnter,InsertCharPre,TextChangedI <buffer> call ncm2#auto_trigger() | |
8 0.000033 if has("patch-8.0.1493") | |
8 0.000079 au CompleteDone <buffer> call s:on_complete_done() | |
8 0.000005 endif | |
8 0.000005 augroup END | |
8 0.002228 0.000093 doau <nomodeline> User Ncm2EnableForBuffer | |
FUNCTION airline#extensions#apply() | |
Called 183 times | |
Total time: 0.014616 | |
Self time: 0.007159 | |
count total (s) self (s) | |
183 0.008219 0.000762 if s:is_excluded_window() | |
return -1 | |
endif | |
183 0.000333 if &buftype == 'help' | |
call airline#extensions#apply_left_override('Help', '%f') | |
let w:airline_section_x = '' | |
let w:airline_section_y = '' | |
let w:airline_render_right = 1 | |
endif | |
183 0.000193 if &previewwindow | |
let w:airline_section_a = 'Preview' | |
let w:airline_section_b = '' | |
let w:airline_section_c = bufname(winbufnr(winnr())) | |
endif | |
183 0.001014 if has_key(s:filetype_overrides, &ft) | |
let args = s:filetype_overrides[&ft] | |
call airline#extensions#apply_left_override(args[0], args[1]) | |
endif | |
183 0.000533 for item in items(s:filetype_regex_overrides) | |
if match(&ft, item[0]) >= 0 | |
call airline#extensions#apply_left_override(item[1][0], item[1][1]) | |
endif | |
endfor | |
FUNCTION gutentags#default_io_cb() | |
Called 26 times | |
Total time: 0.000357 | |
Self time: 0.000188 | |
count total (s) self (s) | |
26 0.000348 0.000178 call gutentags#trace(string(a:msg)) | |
FUNCTION <SNR>86_alternate_file() | |
Called 3 times | |
Total time: 0.000241 | |
Self time: 0.000241 | |
count total (s) self (s) | |
3 0.000046 if get(g:, 'test#no_alternate') | return '' | endif | |
3 0.000021 let alternate_file = '' | |
3 0.000034 if empty(alternate_file) && exists('g:loaded_projectionist') | |
let alternate_file = get(filter(projectionist#query_file('alternate'), 'filereadable(v:val)'), 0, '') | |
endif | |
3 0.000039 if empty(alternate_file) && exists('g:loaded_rails') && !empty(rails#app()) | |
let alternate_file = rails#buffer().alternate() | |
endif | |
3 0.000013 return alternate_file | |
FUNCTION airline#highlighter#get_highlight() | |
Called 242776 times | |
Total time: 35.010703 | |
Self time: 13.158425 | |
count total (s) self (s) | |
242776 0.571586 if get(g:, 'airline_highlighting_cache', 0) && has_key(s:hl_groups, a:group) | |
return s:hl_groups[a:group] | |
else | |
242776 11.028551 0.864509 let fg = s:get_syn(a:group, 'fg') | |
242776 10.980697 0.657196 let bg = s:get_syn(a:group, 'bg') | |
242776 4.391113 let reverse = g:airline_gui_mode ==# 'gui' ? synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'gui') : synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'cterm')|| synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'term') | |
242776 3.593823 let bold = synIDattr(synIDtrans(hlID(a:group)), 'bold') | |
242776 0.256505 let opts = a:000 | |
242776 0.154007 if bold | |
33621 0.034188 let opts = ['bold'] | |
33621 0.012950 endif | |
242776 2.445875 1.081140 let res = reverse ? s:get_array(bg, fg, opts) : s:get_array(fg, bg, opts) | |
242776 0.102437 endif | |
242776 0.489024 let s:hl_groups[a:group] = res | |
242776 0.143270 return res | |
FUNCTION denite#init#_user_options() | |
Called 10 times | |
Total time: 0.001053 | |
Self time: 0.001053 | |
count total (s) self (s) | |
10 0.001035 return { 'auto_accel': v:false, 'auto_highlight': v:false, 'auto_preview': v:false, 'auto_resize': v:false, 'auto_resume': v:false, 'buffer_name': 'default', 'cursor_pos': '', 'cursor_wrap': v:false, 'cursor_shape': (has('gui_running') ? v:true : v:false), 'cursorline': v:true, 'default_action': 'default', 'direction': 'botright', 'do': '', 'empty': v:true, 'highlight_cursor': 'Cursor', 'highlight_matched_range': 'Underlined', 'highlight_matched_char': 'Search', 'highlight_mode_normal': 'WildMenu', 'highlight_mode_insert': 'CursorLine', 'highlight_preview_line': 'Search', 'ignorecase': v:true, 'immediately': v:false, 'immediately_1': v:false, 'input': '', 'matchers': '', 'max_candidate_width': 200, 'mode': '', 'path': getcwd(), 'previewheight': &previewheight, 'prompt': '#', 'prompt_highlight': 'Statement', 'post_action': 'none', 'refresh': v:false, 'resume': v:false, 'reversed': v:false, 'root_markers': '', 'scroll': 0, 'smartcase': v:false, 'sorters': '', 'split': 'horizontal', 'source_names': '', 'statusline': v:true, 'updatetime': 100, 'skiptime': 500, 'unique': v:false, 'use_default_mappings': v:true, 'vertical_preview': v:false, 'winheight': 20, 'winwidth': 90, 'winminheight': -1,} | |
FUNCTION ale#history#Add() | |
Called 10 times | |
Total time: 0.000763 | |
Self time: 0.000763 | |
count total (s) self (s) | |
10 0.000034 if g:ale_max_buffer_history_size <= 0 | |
" Don't save anything if the history isn't a positive number. | |
call setbufvar(a:buffer, 'ale_history', []) | |
return | |
endif | |
10 0.000103 let l:history = getbufvar(a:buffer, 'ale_history', []) | |
" Remove the first item if we hit the max history size. | |
10 0.000027 if len(l:history) >= g:ale_max_buffer_history_size | |
10 0.000214 let l:history = l:history[1:] | |
10 0.000005 endif | |
10 0.000054 call add(l:history, { 'status': a:status, 'job_id': a:job_id, 'command': a:command,}) | |
10 0.000237 call setbufvar(a:buffer, 'ale_history', l:history) | |
FUNCTION ale#util#JoinNeovimOutput() | |
Called 30 times | |
Total time: 0.000786 | |
Self time: 0.000666 | |
count total (s) self (s) | |
30 0.000033 if a:mode is# 'raw' | |
call a:callback(a:job, join(a:data, "\n")) | |
return '' | |
endif | |
30 0.000053 let l:lines = a:data[:-2] | |
30 0.000037 if len(a:data) > 1 | |
10 0.000038 let l:lines[0] = a:last_line . l:lines[0] | |
10 0.000016 let l:new_last_line = a:data[-1] | |
10 0.000004 else | |
20 0.000050 let l:new_last_line = a:last_line . get(a:data, 0, '') | |
20 0.000008 endif | |
46 0.000053 for l:line in l:lines | |
16 0.000182 0.000061 call a:callback(a:job, l:line) | |
16 0.000010 endfor | |
30 0.000026 return l:new_last_line | |
FUNCTION airline#util#shorten() | |
Called 3134 times | |
Total time: 0.054777 | |
Self time: 0.054777 | |
count total (s) self (s) | |
3134 0.017718 if winwidth(0) < a:winwidth && len(split(a:text, '\zs')) > a:minwidth | |
if get(a:000, 0, 0) | |
" shorten from tail | |
return '…'.matchstr(a:text, '.\{'.a:minwidth.'}$') | |
else | |
" shorten from beginning of string | |
return matchstr(a:text, '^.\{'.a:minwidth.'}').'…' | |
endif | |
else | |
3134 0.003509 return a:text | |
endif | |
FUNCTION test#crystal#crystalspec#test_file() | |
Called 6 times | |
Total time: 0.000044 | |
Self time: 0.000044 | |
count total (s) self (s) | |
6 0.000040 return a:file =~# g:test#crystal#crystalspec#file_pattern | |
FUNCTION ncm2#auto_trigger() | |
Called 12 times | |
Total time: 0.000522 | |
Self time: 0.000186 | |
count total (s) self (s) | |
" Use feedkeys, to make sure that the auto complete check works for au | |
" InsertEnter, it is not yet in insert mode at the time. | |
12 0.000494 0.000158 call s:feedkeys("\<Plug>(ncm2_auto_trigger)") | |
FUNCTION ale#job#PrepareCommand() | |
Called 10 times | |
Total time: 0.000782 | |
Self time: 0.000619 | |
count total (s) self (s) | |
10 0.000232 0.000069 let l:wrapper = ale#Var(a:buffer, 'command_wrapper') | |
10 0.000073 let l:command = !empty(l:wrapper) ? s:PrepareWrappedCommand(l:wrapper, a:command) : a:command | |
" The command will be executed in a subshell. This fixes a number of | |
" issues, including reading the PATH variables correctly, %PATHEXT% | |
" expansion on Windows, etc. | |
" | |
" NeoVim handles this issue automatically if the command is a String, | |
" but we'll do this explicitly, so we use the same exact command for both | |
" versions. | |
10 0.000051 if has('win32') | |
return 'cmd /s/c "' . l:command . '"' | |
endif | |
10 0.000104 if &shell =~? 'fish$\|pwsh$' | |
return ['/bin/sh', '-c', l:command] | |
endif | |
10 0.000198 return split(&shell) + split(&shellcmdflag) + [l:command] | |
FUNCTION <SNR>136_popup_timed() | |
Called 8 times | |
Total time: 0.000891 | |
Self time: 0.000251 | |
count total (s) self (s) | |
8 0.000105 let s:popup_timer = 0 | |
8 0.000764 0.000124 call call('ncm2#_real_update_matches', s:popup_timer_args) | |
FUNCTION sy#set_signs() | |
Called 7 times | |
Total time: 0.044396 | |
Self time: 0.000461 | |
count total (s) self (s) | |
7 0.000060 0.000038 call sy#verbose('set_signs()', a:vcs) | |
7 0.000020 if a:sy.stats == [-1, -1, -1] | |
let a:sy.stats = [0, 0, 0] | |
endif | |
7 0.000008 if empty(a:diff) | |
call sy#verbose('No changes found.', a:vcs) | |
let a:sy.stats = [0, 0, 0] | |
call sy#sign#remove_all_signs(a:sy.buffer) | |
return | |
endif | |
7 0.000014 if get(g:, 'signify_line_highlight') | |
call sy#highlight#line_enable() | |
else | |
7 0.004088 0.000025 call sy#highlight#line_disable() | |
7 0.000003 endif | |
7 0.039906 0.000055 call sy#sign#process_diff(a:sy, a:vcs, a:diff) | |
7 0.000208 if exists('#User#Signify') | |
execute 'doautocmd' (s:has_doau_modeline ? '<nomodeline>' : '') 'User Signify' | |
endif | |
FUNCTION test#perl#prove#test_file() | |
Called 6 times | |
Total time: 0.000058 | |
Self time: 0.000058 | |
count total (s) self (s) | |
6 0.000053 return a:file =~# g:test#perl#prove#file_pattern | |
FUNCTION <SNR>194_CreateTemporaryFileForJob() | |
Called 10 times | |
Total time: 0.004895 | |
Self time: 0.002328 | |
count total (s) self (s) | |
10 0.000024 if empty(a:temporary_file) | |
" There is no file, so we didn't create anything. | |
return 0 | |
endif | |
10 0.000048 let l:temporary_directory = fnamemodify(a:temporary_file, ':h') | |
" Create the temporary directory for the file, unreadable by 'other' | |
" users. | |
10 0.000627 call mkdir(l:temporary_directory, '', 0750) | |
" Automatically delete the directory later. | |
10 0.000464 0.000114 call ale#engine#ManageDirectory(a:buffer, l:temporary_directory) | |
" Write the buffer out to a file. | |
10 0.001325 let l:lines = getbufline(a:buffer, 1, '$') | |
10 0.002312 0.000094 call ale#util#Writefile(a:buffer, l:lines, a:temporary_file) | |
10 0.000022 return 1 | |
FUNCTION gutentags#get_project_info() | |
Called 7 times | |
Total time: 0.000046 | |
Self time: 0.000046 | |
count total (s) self (s) | |
7 0.000037 return get(s:known_projects, a:path, {}) | |
FUNCTION <SNR>145_Echoerr() | |
Called 1 time | |
Total time: 0.000229 | |
Self time: 0.000229 | |
count total (s) self (s) | |
1 0.000228 echohl Error | echomsg a:message | echohl None | |
FUNCTION <SNR>32_init() | |
Called 54 times | |
Total time: 0.000275 | |
Self time: 0.000275 | |
count total (s) self (s) | |
54 0.000144 if s:airline_initialized | |
54 0.000060 return | |
endif | |
let s:airline_initialized = 1 | |
call airline#extensions#load() | |
call airline#init#sections() | |
let s:theme_in_vimrc = exists('g:airline_theme') | |
if s:theme_in_vimrc | |
try | |
let palette = g:airline#themes#{g:airline_theme}#palette | |
catch | |
echom 'Could not resolve airline theme "' . g:airline_theme . '". Themes have been migrated to github.com/vim-airline/vim-airline-themes.' | |
let g:airline_theme = 'dark' | |
endtry | |
silent call airline#switch_theme(g:airline_theme) | |
else | |
let g:airline_theme = 'dark' | |
silent call s:on_colorscheme_changed() | |
endif | |
call airline#util#doautocmd('AirlineAfterInit') | |
FUNCTION <SNR>144_Slash() | |
Called 40 times | |
Total time: 0.000171 | |
Self time: 0.000171 | |
count total (s) self (s) | |
40 0.000066 if exists('+shellslash') | |
return tr(a:path, '\', '/') | |
else | |
40 0.000028 return a:path | |
endif | |
FUNCTION test#python#nose#build_position() | |
Called 3 times | |
Total time: 0.000036 | |
Self time: 0.000036 | |
count total (s) self (s) | |
3 0.000004 if a:type ==# 'nearest' | |
let name = s:nearest_test(a:position) | |
if !empty(name) | |
return [a:position['file'].':'.name] | |
else | |
return [a:position['file']] | |
endif | |
elseif a:type ==# 'file' | |
return [a:position['file']] | |
else | |
3 0.000002 return [] | |
endif | |
FUNCTION LSP#visible_line_end() | |
Called 72 times | |
Total time: 0.001253 | |
Self time: 0.001253 | |
count total (s) self (s) | |
72 0.001189 return line('w$') - 1 | |
FUNCTION <SNR>32_on_window_changed() | |
Called 64 times | |
Total time: 1.120869 | |
Self time: 0.002973 | |
count total (s) self (s) | |
64 0.000281 let s:active_winnr = winnr() | |
64 0.000191 if pumvisible() && (!&previewwindow || g:airline_exclude_preview) | |
return | |
endif | |
" Handle each window only once, since we might come here several times for | |
" different autocommands. | |
64 0.000721 let l:key = [bufnr('%'), s:active_winnr, winnr('$'), tabpagenr(), &ft] | |
64 0.000562 if get(g:, 'airline_last_window_changed', []) == l:key && &stl is# '%!airline#statusline('.s:active_winnr.')' && &ft !~? 'gitcommit' | |
" fugitive is special, it changes names and filetypes several times, | |
" make sure the caching does not get into its way | |
20 0.000013 return | |
endif | |
44 0.000240 let g:airline_last_window_changed = l:key | |
44 0.000435 0.000252 call s:init() | |
44 1.117936 0.000222 call airline#update_statusline() | |
FUNCTION test#javascript#mocha#test_file() | |
Called 6 times | |
Total time: 0.000080 | |
Self time: 0.000080 | |
count total (s) self (s) | |
6 0.000077 return a:file =~# g:test#javascript#mocha#file_pattern && test#javascript#has_package('mocha') | |
FUNCTION airline#util#prepend() | |
Called 3518 times | |
Total time: 0.023397 | |
Self time: 0.023397 | |
count total (s) self (s) | |
3518 0.007880 if a:minwidth > 0 && winwidth(0) < a:minwidth | |
return '' | |
endif | |
3518 0.009334 return empty(a:text) ? '' : a:text.s:spc.g:airline_right_alt_sep.s:spc | |
FUNCTION LSP#visible_line_start() | |
Called 72 times | |
Total time: 0.000518 | |
Self time: 0.000518 | |
count total (s) self (s) | |
72 0.000473 return line('w0') - 1 | |
FUNCTION airline#util#has_vcscommand() | |
Called 951 times | |
Total time: 0.003658 | |
Self time: 0.003658 | |
count total (s) self (s) | |
951 0.003243 return get(g:, 'airline#extensions#branch#use_vcscommand', 0) && exists('*VCSCommandGetStatusLine') | |
FUNCTION ale#cursor#EchoCursorWarningWithDelay() | |
Called 408 times | |
Total time: 0.038128 | |
Self time: 0.025905 | |
count total (s) self (s) | |
408 0.002498 let l:buffer = bufnr('') | |
408 0.001225 if !g:ale_echo_cursor && !g:ale_cursor_detail | |
return | |
endif | |
" Only echo the warnings in normal mode, otherwise we will get problems. | |
408 0.001437 if mode(1) isnot# 'n' | |
return | |
endif | |
408 0.008588 0.003599 call s:StopCursorTimer() | |
408 0.002915 let l:pos = getcurpos()[0:2] | |
" Check the current buffer, line, and column number against the last | |
" recorded position. If the position has actually changed, *then* | |
" we should echo something. Otherwise we can end up doing processing | |
" the echo message far too frequently. | |
408 0.001149 if l:pos != s:last_pos | |
380 0.009980 0.002746 let l:delay = ale#Var(l:buffer, 'echo_delay') | |
380 0.001295 let s:last_pos = l:pos | |
380 0.002863 let s:cursor_timer = timer_start( l:delay, function('ale#cursor#EchoCursorWarning')) | |
380 0.000362 endif | |
FUNCTION test#php#peridot#executable() | |
Called 6 times | |
Total time: 0.000109 | |
Self time: 0.000109 | |
count total (s) self (s) | |
6 0.000044 if filereadable('./vendor/bin/peridot') | |
return './vendor/bin/peridot' | |
elseif filereadable('./bin/peridot') | |
return './bin/peridot' | |
endif | |
FUNCTION <SNR>136_warmup() | |
Called 31 times | |
Total time: 0.008620 | |
Self time: 0.000623 | |
count total (s) self (s) | |
31 0.000062 if !get(b:, 'ncm2_enable', 0) | |
return | |
endif | |
31 0.008315 0.000318 call s:try_rnotify('on_warmup', a:000) | |
" the FZF terminal window somehow gets empty without this check | |
" https://github.com/ncm2/ncm2/issues/50 | |
31 0.000072 if mode() == 'i' | |
call s:feedkeys("\<Plug>(_ncm2_auto_trigger)") | |
endif | |
FUNCTION <SNR>200_NeoVimCallback() | |
Called 40 times | |
Total time: 0.027423 | |
Self time: 0.001643 | |
count total (s) self (s) | |
40 0.000135 let l:info = s:job_map[a:job] | |
40 0.000061 if a:event is# 'stdout' | |
20 0.000929 0.000195 let l:info.out_cb_line = ale#util#JoinNeovimOutput( a:job, l:info.out_cb_line, a:data, l:info.mode, ale#util#GetFunction(l:info.out_cb),) | |
20 0.000015 elseif a:event is# 'stderr' | |
10 0.000311 0.000079 let l:info.err_cb_line = ale#util#JoinNeovimOutput( a:job, l:info.err_cb_line, a:data, l:info.mode, ale#util#GetFunction(l:info.err_cb),) | |
10 0.000004 else | |
10 0.000027 if has_key(l:info, 'out_cb') && !empty(l:info.out_cb_line) | |
call ale#util#GetFunction(l:info.out_cb)(a:job, l:info.out_cb_line) | |
endif | |
10 0.000032 if has_key(l:info, 'err_cb') && !empty(l:info.err_cb_line) | |
call ale#util#GetFunction(l:info.err_cb)(a:job, l:info.err_cb_line) | |
endif | |
10 0.000023 try | |
10 0.024993 0.000179 call ale#util#GetFunction(l:info.exit_cb)(a:job, a:data) | |
10 0.000028 finally | |
" Automatically forget about the job after it's done. | |
10 0.000052 if has_key(s:job_map, a:job) | |
10 0.000025 call remove(s:job_map, a:job) | |
10 0.000005 endif | |
10 0.000007 endtry | |
10 0.000004 endif | |
FUNCTION 11380() | |
Called 36 times | |
Total time: 0.000842 | |
Self time: 0.000349 | |
count total (s) self (s) | |
36 0.000057 let bufnum = get(self.buffers, a:i, -1) | |
36 0.000024 if bufnum == -1 | |
return '' | |
endif | |
36 0.000600 0.000108 let group = airline#extensions#tabline#group_of_bufnr(self.tab_bufs, bufnum) | |
36 0.000038 if bufnum == bufnr('%') | |
let s:current_modified = (group == 'airline_tabmod') ? 1 : 0 | |
endif | |
36 0.000022 return group | |
FUNCTION 11381() | |
Called 11 times | |
Total time: 0.000042 | |
Self time: 0.000042 | |
count total (s) self (s) | |
11 0.000021 let bufnum = get(self.buffers, a:i, -1) | |
11 0.000018 return '%'.bufnum.'@airline#extensions#tabline#buffers#clickbuf@' | |
FUNCTION 11382() | |
Called 11 times | |
Total time: 0.000008 | |
Self time: 0.000008 | |
count total (s) self (s) | |
11 0.000007 return '%X' | |
FUNCTION 11384() | |
Called 36 times | |
Total time: 0.000821 | |
Self time: 0.000351 | |
count total (s) self (s) | |
36 0.000058 let bufnum = get(self.buffers, a:i, -1) | |
36 0.000024 if bufnum == -1 | |
return '' | |
endif | |
36 0.000579 0.000109 let group = airline#extensions#tabline#group_of_bufnr(self.tab_bufs, bufnum) | |
36 0.000038 if bufnum == bufnr('%') | |
let s:current_modified = (group == 'airline_tabmod') ? 1 : 0 | |
endif | |
36 0.000022 return group | |
FUNCTION 11387() | |
Called 12 times | |
Total time: 0.000789 | |
Self time: 0.000266 | |
count total (s) self (s) | |
12 0.000021 let bufnum = get(self.buffers, a:i, -1) | |
12 0.000299 0.000026 let group = self.get_group(a:i) | |
12 0.000278 0.000028 let pgroup = self.get_group(a:i - 1) | |
" always add a space when powerline_fonts are used | |
" or for the very first item | |
12 0.000021 if get(g:, 'airline_powerline_fonts', 0) || a:i == 0 | |
1 0.000001 let space = s:spc | |
1 0.000000 else | |
11 0.000020 let space= (pgroup == group ? s:spc : '') | |
11 0.000004 endif | |
12 0.000018 if get(g:, 'airline#extensions#tabline#buffer_idx_mode', 0) | |
if len(s:number_map) > 0 | |
return space. get(s:number_map, a:i+1, '') . '%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)' . s:spc | |
else | |
return '['.(a:i+1).s:spc.'%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)'.']' | |
endif | |
else | |
12 0.000031 return space.'%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)'.s:spc | |
endif | |
FUNCTION 11388() | |
Called 36 times | |
Total time: 0.000927 | |
Self time: 0.000408 | |
count total (s) self (s) | |
36 0.000064 let bufnum = get(self.buffers, a:i, -1) | |
36 0.000027 if bufnum == -1 | |
return '' | |
endif | |
36 0.000642 0.000124 let group = airline#extensions#tabline#group_of_bufnr(self.tab_bufs, bufnum) | |
36 0.000055 if bufnum == bufnr('%') | |
3 0.000007 let s:current_modified = (group == 'airline_tabmod') ? 1 : 0 | |
3 0.000001 endif | |
36 0.000023 return group | |
FUNCTION 11389() | |
Called 11 times | |
Total time: 0.000049 | |
Self time: 0.000049 | |
count total (s) self (s) | |
11 0.000024 let bufnum = get(self.buffers, a:i, -1) | |
11 0.000021 return '%'.bufnum.'@airline#extensions#tabline#buffers#clickbuf@' | |
FUNCTION <SNR>204_FindItemAtCursor() | |
Called 85 times | |
Total time: 0.010209 | |
Self time: 0.002938 | |
count total (s) self (s) | |
85 0.000580 let l:info = get(g:ale_buffer_info, a:buffer, {}) | |
85 0.000379 let l:loclist = get(l:info, 'loclist', []) | |
85 0.000289 let l:pos = getcurpos() | |
85 0.008216 0.000946 let l:index = ale#util#BinarySearch(l:loclist, a:buffer, l:pos[1], l:pos[2]) | |
85 0.000307 let l:loc = l:index >= 0 ? l:loclist[l:index] : {} | |
85 0.000226 return [l:info, l:loc] | |
FUNCTION LanguageClient#handleTextChanged() | |
Called 24 times | |
Total time: 0.001585 | |
Self time: 0.000555 | |
count total (s) self (s) | |
24 0.000107 if &buftype !=# '' || &filetype ==# '' | |
12 0.000013 return | |
endif | |
12 0.000018 try | |
" Note: do not add 'text' as it might be huge. | |
12 0.001204 0.000175 call LanguageClient#Notify('languageClient/handleTextChanged', { 'filename': LSP#filename(), }) | |
12 0.000016 catch | |
call s:Debug('LanguageClient caught exception: ' . string(v:exception)) | |
endtry | |
FUNCTION <SNR>133_get_accented_line() | |
Called 2091 times | |
Total time: 0.060409 | |
Self time: 0.060409 | |
count total (s) self (s) | |
2091 0.002183 if a:self._context.active | |
1607 0.001649 let contents = [] | |
1607 0.006260 let content_parts = split(a:contents, '__accent') | |
3102 0.003279 for cpart in content_parts | |
1495 0.008173 let accent = matchstr(cpart, '_\zs[^#]*\ze') | |
1495 0.002620 call add(contents, cpart) | |
1495 0.000834 endfor | |
1607 0.003524 let line = join(contents, a:group) | |
1607 0.005715 let line = substitute(line, '__restore__', a:group, 'g') | |
1607 0.000705 else | |
484 0.004689 let line = substitute(a:contents, '%#__accent[^#]*#', '', 'g') | |
484 0.002126 let line = substitute(line, '%#__restore__#', '', 'g') | |
484 0.000241 endif | |
2091 0.001597 return line | |
FUNCTION gutentags#build_default_job_options() | |
Called 7 times | |
Total time: 0.000139 | |
Self time: 0.000139 | |
count total (s) self (s) | |
" Neovim kills jobs on exit, which is what we want. | |
7 0.000103 let l:job_opts = {'on_exit': function( '<SID>nvim_job_exit_wrapper', ['gutentags#'.a:module.'#on_job_exit']),'on_stdout': function( '<SID>nvim_job_out_wrapper', ['gutentags#default_io_cb']),'on_stderr': function( '<SID>nvim_job_out_wrapper', ['gutentags#default_io_cb'])} | |
7 0.000007 return l:job_opts | |
FUNCTION airline#extensions#languageclient#get_error() | |
Called 1563 times | |
Total time: 0.148297 | |
Self time: 0.007247 | |
count total (s) self (s) | |
1563 0.147744 0.006694 return airline#extensions#languageclient#get(s:severity_error) | |
FUNCTION <SNR>169_GetLinterNames() | |
Called 30 times | |
Total time: 0.000808 | |
Self time: 0.000808 | |
count total (s) self (s) | |
30 0.000109 let l:buffer_ale_linters = get(b:, 'ale_linters', {}) | |
" b:ale_linters can be set to 'all' | |
30 0.000051 if l:buffer_ale_linters is# 'all' | |
return 'all' | |
endif | |
" b:ale_linters can be set to a List. | |
30 0.000071 if type(l:buffer_ale_linters) is v:t_list | |
return l:buffer_ale_linters | |
endif | |
" Try to get a buffer-local setting for the filetype | |
30 0.000077 if has_key(l:buffer_ale_linters, a:original_filetype) | |
return l:buffer_ale_linters[a:original_filetype] | |
endif | |
" Try to get a global setting for the filetype | |
30 0.000089 if has_key(g:ale_linters, a:original_filetype) | |
20 0.000057 return g:ale_linters[a:original_filetype] | |
endif | |
" If the user has configured ALE to only enable linters explicitly, then | |
" don't enable any linters by default. | |
10 0.000008 if g:ale_linters_explicit | |
return [] | |
endif | |
" Try to get a default setting for the filetype | |
10 0.000014 if has_key(s:default_ale_linters, a:original_filetype) | |
return s:default_ale_linters[a:original_filetype] | |
endif | |
10 0.000005 return 'all' | |
FUNCTION 11390() | |
Called 11 times | |
Total time: 0.000009 | |
Self time: 0.000009 | |
count total (s) self (s) | |
11 0.000007 return '%X' | |
FUNCTION 11391() | |
Called 12 times | |
Total time: 0.000896 | |
Self time: 0.000295 | |
count total (s) self (s) | |
12 0.000025 let bufnum = get(self.buffers, a:i, -1) | |
12 0.000351 0.000029 let group = self.get_group(a:i) | |
12 0.000310 0.000031 let pgroup = self.get_group(a:i - 1) | |
" always add a space when powerline_fonts are used | |
" or for the very first item | |
12 0.000023 if get(g:, 'airline_powerline_fonts', 0) || a:i == 0 | |
1 0.000001 let space = s:spc | |
1 0.000000 else | |
11 0.000022 let space= (pgroup == group ? s:spc : '') | |
11 0.000004 endif | |
12 0.000020 if get(g:, 'airline#extensions#tabline#buffer_idx_mode', 0) | |
if len(s:number_map) > 0 | |
return space. get(s:number_map, a:i+1, '') . '%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)' . s:spc | |
else | |
return '['.(a:i+1).s:spc.'%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)'.']' | |
endif | |
else | |
12 0.000035 return space.'%(%{airline#extensions#tabline#get_buffer_name('.bufnum.')}%)'.s:spc | |
endif | |
FUNCTION gutentags#add_job() | |
Called 7 times | |
Total time: 0.000108 | |
Self time: 0.000108 | |
count total (s) self (s) | |
7 0.000085 call add(s:update_in_progress[a:module], [a:tags_file, a:data]) | |
FUNCTION test#php#peridot#test_file() | |
Called 6 times | |
Total time: 0.000170 | |
Self time: 0.000061 | |
count total (s) self (s) | |
6 0.000157 0.000048 if empty(test#php#peridot#executable()) | |
6 0.000008 return 0 | |
endif | |
return a:file =~? g:test#php#peridot#file_pattern | |
FUNCTION <SNR>143_nvim_job_out_wrapper() | |
Called 26 times | |
Total time: 0.000567 | |
Self time: 0.000210 | |
count total (s) self (s) | |
26 0.000556 0.000198 call call(a:real_cb, [a:job, a:lines]) | |
FUNCTION ale#events#LintOnEnter() | |
Called 16 times | |
Total time: 0.055018 | |
Self time: 0.000203 | |
count total (s) self (s) | |
" Unmark a file as being changed outside of Vim after we try to check it. | |
16 0.000040 call setbufvar(a:buffer, 'ale_file_changed', 0) | |
16 0.000198 0.000057 if ale#Var(a:buffer, 'enabled') && g:ale_lint_on_enter | |
16 0.054743 0.000070 call ale#Queue(0, 'lint_file', a:buffer) | |
16 0.000009 endif | |
FUNCTION airline#util#exec_funcrefs() | |
Called 212 times | |
Total time: 0.181393 | |
Self time: 0.008748 | |
count total (s) self (s) | |
1041 0.001314 for Fn in a:list | |
1022 0.177177 0.004533 let code = call(Fn, a:000) | |
1022 0.000928 if code != 0 | |
193 0.000159 return code | |
endif | |
829 0.000430 endfor | |
19 0.000010 return 0 | |
FUNCTION test#swift#swiftpm#test_file() | |
Called 6 times | |
Total time: 0.000051 | |
Self time: 0.000051 | |
count total (s) self (s) | |
6 0.000047 return a:file =~# g:test#swift#swiftpm#file_pattern | |
FUNCTION denite#util#path2directory() | |
Called 8 times | |
Total time: 0.000484 | |
Self time: 0.000397 | |
count total (s) self (s) | |
8 0.000463 0.000376 return denite#util#substitute_path_separator( isdirectory(a:path) ? a:path : fnamemodify(a:path, ':p:h')) | |
FUNCTION test#php#behat#test_file() | |
Called 6 times | |
Total time: 0.000099 | |
Self time: 0.000099 | |
count total (s) self (s) | |
6 0.000062 if a:file =~# g:test#php#behat#file_pattern | |
return !empty(glob('features/bootstrap/**/*.php')) | |
endif | |
FUNCTION test#elixir#espec#test_file() | |
Called 6 times | |
Total time: 0.000047 | |
Self time: 0.000047 | |
count total (s) self (s) | |
6 0.000039 return a:file =~# g:test#elixir#espec#file_pattern | |
FUNCTION <SNR>174_cache() | |
Called 6 times | |
Total time: 0.357231 | |
Self time: 0.250454 | |
count total (s) self (s) | |
6 0.000019 let cache = [{}] " With padding for lnum offset | |
6 0.000742 let lines = getbufline(bufnr('%'), 1, '$') | |
6 0.000017 let lnum_last = len(lines) | |
6 0.000015 call insert(lines, '') " Padding for lnum offset | |
6 0.000088 0.000047 let ind_spaces = s:indent_spaces() | |
6 0.000013 let defs_stack = [] | |
6 0.000007 let ind_def = -1 | |
6 0.000006 let in_string = 0 | |
6 0.000008 let docstring_start = -1 | |
6 0.000007 let in_import = 0 | |
6 0.000007 let was_import = 0 | |
2769 0.001986 for lnum in range(1, lnum_last) | |
2763 0.003597 let line = lines[lnum] | |
" Multiline strings | |
2763 0.001717 if in_string | |
393 0.000528 let foldlevel = len(defs_stack) | |
393 0.000990 call add(cache, {'is_blank': 0, 'is_comment': 0, 'foldexpr': foldlevel}) | |
393 0.006077 0.001374 let string_match = s:multi_string(line, string_end_re, 1) | |
393 0.000345 if string_match[0] | |
" Starting new multiline string? | |
345 0.000256 if string_match[2] | |
let in_string_single = string_match[1] | |
let string_end_re = string_match[3] | |
let docstring_start = -1 " Invalid docstring | |
elseif in_string_single && line !~# s:line_cont_re | |
let in_string = 0 | |
endif | |
345 0.000122 else | |
48 0.000044 if docstring_start != -1 | |
48 0.000049 let foldlevel += 1 | |
48 0.000126 let cache[docstring_start]['foldexpr'] = '>' . foldlevel | |
441 0.000348 for lnum_docstring in range((docstring_start + 1), lnum) | |
393 0.000587 let cache[lnum_docstring]['foldexpr'] = foldlevel | |
393 0.000158 endfor | |
48 0.000048 let docstring_start = -1 | |
48 0.000020 endif | |
48 0.000039 let in_string = 0 | |
48 0.000018 endif | |
393 0.000270 continue | |
endif | |
" Blank lines | |
2370 0.007312 if line =~# s:blank_re | |
600 0.000579 if lnum == lnum_last | |
call add(cache, {'is_blank': 1, 'is_comment': 0, 'foldexpr': 0}) | |
call s:blanks_adj(cache, lnum, 0) | |
else | |
600 0.001992 call add(cache, {'is_blank': 1, 'is_comment': 0, 'foldexpr': len(defs_stack)}) | |
600 0.000261 endif | |
600 0.000449 continue | |
endif | |
1770 0.035755 0.005662 let ind = s:indent(line, ind_spaces) | |
" Comments | |
1770 0.004837 if line =~# s:comment_re | |
192 0.000641 call add(cache, {'is_blank': 0, 'is_comment': 1, 'indent': ind}) | |
192 0.000208 let foldlevel = 0 | |
192 0.000372 let defs_stack_len = len(defs_stack) | |
198 0.000391 for idx in range(defs_stack_len) | |
57 0.000113 if ind > cache[defs_stack[idx]]['indent'] | |
51 0.000065 let foldlevel = defs_stack_len - idx | |
51 0.000031 break | |
endif | |
6 0.000002 endfor | |
192 0.000386 let cache[lnum]['foldexpr'] = foldlevel | |
192 0.014555 0.000712 call s:blanks_adj(cache, lnum, foldlevel) | |
192 0.000169 continue | |
endif | |
1578 0.023519 call add(cache, {'is_blank': 0, 'is_comment': 0, 'is_def': line =~# b:SimpylFold_def_re, 'indent': ind}) | |
" Definitions | |
1578 0.002097 if cache[lnum]['is_def'] | |
246 0.000282 if empty(defs_stack) | |
6 0.000010 let defs_stack = [lnum] | |
6 0.000005 elseif ind == ind_def | |
135 0.000209 let defs_stack[0] = lnum | |
135 0.000099 elseif ind > ind_def | |
72 0.000120 call insert(defs_stack, lnum) | |
72 0.000052 elseif ind < ind_def | |
33 0.000765 0.000165 let defs_stack = [lnum] + s:defs_stack_prune(cache, defs_stack, ind) | |
33 0.000015 endif | |
246 0.000411 let foldlevel = len(defs_stack) - 1 | |
246 0.000245 let ind_def = ind | |
246 0.004776 0.000808 call s:blanks_adj(cache, lnum, foldlevel) | |
246 0.000623 let cache[lnum]['foldexpr'] = '>' . (foldlevel + 1) | |
246 0.000192 continue | |
endif | |
" Everything else | |
1332 0.001655 if !empty(defs_stack) | |
1293 0.001118 if ind == ind_def | |
12 0.000036 let defs_stack = defs_stack[1:] | |
12 0.000026 let ind_def = cache[defs_stack[0]]['indent'] | |
12 0.000008 elseif ind < ind_def | |
12 0.000255 0.000045 let defs_stack = s:defs_stack_prune(cache, defs_stack, ind) | |
12 0.000013 if !empty(defs_stack) | |
12 0.000021 let ind_def = cache[defs_stack[0]]['indent'] | |
12 0.000005 else | |
let ind_def = -1 | |
endif | |
12 0.000004 endif | |
1293 0.000469 endif | |
1332 0.002012 let foldlevel = len(defs_stack) | |
" Multiline strings start | |
1332 0.044715 0.005470 let string_match = s:multi_string(line, s:string_start_re, 0) | |
1332 0.001256 if string_match[0] | |
48 0.000042 let in_string = 1 | |
48 0.000067 let in_string_single = string_match[1] | |
48 0.000066 let string_end_re = string_match[3] | |
" Docstrings | |
48 0.000229 if b:SimpylFold_fold_docstring && !string_match[2] && string_match[4] =~# s:blank_re | |
48 0.000060 let lnum_prev = lnum - 1 | |
48 0.001058 0.000368 if lnum == 1 || s:are_lines_prev_blank(cache, lnum) || ( !cache[lnum_prev]['is_blank'] && !cache[lnum_prev]['is_comment'] && ( cache[lnum_prev]['is_def'] || lines[lnum_prev] =~# s:multi_def_end_re ) ) | |
48 0.000056 let docstring_start = lnum | |
48 0.000025 endif | |
48 0.000018 endif | |
48 0.000095 let cache[lnum]['foldexpr'] = foldlevel | |
48 0.000041 continue | |
endif | |
" Imports | |
1284 0.001178 if b:SimpylFold_fold_import | |
1284 0.000766 if in_import | |
if line =~# import_end_re | |
let in_import = 0 | |
endif | |
call s:blanks_adj(cache, lnum, foldlevel + 1) | |
let cache[lnum]['foldexpr'] = foldlevel + 1 | |
continue | |
elseif match(line, s:import_start_re) != -1 | |
42 0.000551 let import_cont_match = matchlist(line, s:import_cont_re) | |
42 0.000071 if !empty(import_cont_match) | |
if import_cont_match[1] ==# '(' | |
let import_end_re = s:import_end_paren_re | |
let in_import = 1 | |
elseif import_cont_match[2] ==# '\' | |
let import_end_re = s:import_end_esc_re | |
let in_import = 1 | |
endif | |
endif | |
42 0.000033 if was_import | |
33 0.000531 0.000142 call s:blanks_adj(cache, lnum, foldlevel + 1) | |
33 0.000077 let cache[lnum]['foldexpr'] = foldlevel + 1 | |
33 0.000016 else | |
9 0.000035 let cache[lnum]['foldexpr'] = '>' . (foldlevel + 1) | |
9 0.000004 endif | |
42 0.000044 let was_import = 1 | |
42 0.000041 continue | |
else | |
1242 0.001168 let was_import = 0 | |
1242 0.000497 endif | |
1242 0.000425 endif | |
" Normal | |
1242 0.017104 0.004109 call s:blanks_adj(cache, lnum, foldlevel) | |
1242 0.002170 let cache[lnum]['foldexpr'] = foldlevel | |
1242 0.000580 endfor | |
6 0.000007 return cache | |
FUNCTION <SNR>93_Highlight_Matching_Pair() | |
Called 462 times | |
Total time: 0.057710 | |
Self time: 0.057710 | |
count total (s) self (s) | |
" Remove any previous match. | |
462 0.001886 if exists('w:paren_hl_on') && w:paren_hl_on | |
6 0.000035 silent! call matchdelete(3) | |
6 0.000017 let w:paren_hl_on = 0 | |
6 0.000007 endif | |
" Avoid that we remove the popup menu. | |
" Return when there are no colors (looks like the cursor jumps). | |
462 0.002219 if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
return | |
endif | |
" Get the character under the cursor and check if it's in 'matchpairs'. | |
462 0.001427 let c_lnum = line('.') | |
462 0.001128 let c_col = col('.') | |
462 0.000676 let before = 0 | |
462 0.001442 let text = getline(c_lnum) | |
462 0.011619 let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
462 0.001249 if empty(matches) | |
let [c_before, c] = ['', ''] | |
else | |
462 0.003075 let [c_before, c] = matches[1:2] | |
462 0.000388 endif | |
462 0.006820 let plist = split(&matchpairs, '.\zs[:,]') | |
462 0.002018 let i = index(plist, c) | |
462 0.000649 if i < 0 | |
" not found, in Insert mode try character before the cursor | |
456 0.001870 if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
7 0.000014 let before = strlen(c_before) | |
7 0.000008 let c = c_before | |
7 0.000025 let i = index(plist, c) | |
7 0.000004 endif | |
456 0.000562 if i < 0 | |
" not found, nothing to do | |
456 0.000370 return | |
endif | |
endif | |
" Figure out the arguments for searchpairpos(). | |
6 0.000014 if i % 2 == 0 | |
2 0.000014 let s_flags = 'nW' | |
2 0.000013 let c2 = plist[i + 1] | |
2 0.000004 else | |
4 0.000007 let s_flags = 'nbW' | |
4 0.000023 let c2 = c | |
4 0.000010 let c = plist[i - 1] | |
4 0.000003 endif | |
6 0.000014 if c == '[' | |
let c = '\[' | |
let c2 = '\]' | |
endif | |
" Find the match. When it was just before the cursor move it there for a | |
" moment. | |
6 0.000012 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. | |
6 0.000045 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. | |
6 0.003519 execute 'if' s_skip '| let s_skip = 0 | endif' | |
" Limit the search to lines visible in the window. | |
6 0.000034 let stoplinebottom = line('w$') | |
6 0.000025 let stoplinetop = line('w0') | |
6 0.000014 if i % 2 == 0 | |
2 0.000015 let stopline = stoplinebottom | |
2 0.000003 else | |
4 0.000012 let stopline = stoplinetop | |
4 0.000003 endif | |
" Limit the search time to 300 msec to avoid a hang on very long lines. | |
" This fails when a timeout is not supported. | |
6 0.000029 if mode() == 'i' || mode() == 'R' | |
1 0.000005 let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
1 0.000000 else | |
5 0.000043 let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
5 0.000006 endif | |
6 0.000012 try | |
6 0.003244 let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
6 0.000020 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 | |
6 0.000014 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. | |
6 0.000031 if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
6 0.000026 if exists('*matchaddpos') | |
6 0.000757 call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
6 0.000008 else | |
exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
endif | |
6 0.000028 let w:paren_hl_on = 1 | |
6 0.000007 endif | |
FUNCTION airline#util#append() | |
Called 10941 times | |
Total time: 0.109630 | |
Self time: 0.109630 | |
count total (s) self (s) | |
10941 0.023964 if a:minwidth > 0 && winwidth(0) < a:minwidth | |
return '' | |
endif | |
10941 0.034063 let prefix = s:spc == "\ua0" ? s:spc : s:spc.s:spc | |
10941 0.031959 return empty(a:text) ? '' : prefix.g:airline_left_alt_sep.s:spc.a:text | |
FUNCTION airline#extensions#vimtex#apply() | |
Called 62 times | |
Total time: 0.000398 | |
Self time: 0.000398 | |
count total (s) self (s) | |
62 0.000096 if exists("b:vimtex") | |
let w:airline_section_x = get(w:, 'airline_section_x', g:airline_section_x) | |
let w:airline_section_x.=s:spc.g:airline_left_alt_sep.s:spc.'%{airline#extensions#vimtex#get_scope()}' | |
endif | |
FUNCTION ale#events#QuitRecently() | |
Called 7 times | |
Total time: 0.000102 | |
Self time: 0.000102 | |
count total (s) self (s) | |
7 0.000045 let l:time = getbufvar(a:buffer, 'ale_quitting', 0) | |
7 0.000036 return l:time && ale#events#ClockMilliseconds() - l:time < 1000 | |
FUNCTION test#ruby#rails#test_file() | |
Called 6 times | |
Total time: 0.000360 | |
Self time: 0.000101 | |
count total (s) self (s) | |
6 0.000345 0.000085 if empty(s:rails_version()) || s:rails_version()[0] < 5 | |
6 0.000010 return 0 | |
end | |
return a:file =~# g:test#ruby#rails#file_pattern | |
FUNCTION gutentags#find_job_index_by_tags_file() | |
Called 694 times | |
Total time: 0.009131 | |
Self time: 0.009131 | |
count total (s) self (s) | |
694 0.001368 let l:idx = -1 | |
694 0.002432 for upd_info in s:update_in_progress[a:module] | |
22 0.000038 let l:idx += 1 | |
22 0.000069 if upd_info[0] == a:tags_file | |
22 0.000022 return l:idx | |
endif | |
endfor | |
672 0.000639 return -1 | |
FUNCTION <SNR>115_languageclient_refresh() | |
Called 13 times | |
Total time: 0.000117 | |
Self time: 0.000117 | |
count total (s) self (s) | |
13 0.000068 if get(g:, 'airline_skip_empty_sections', 0) | |
exe ':AirlineRefresh' | |
endif | |
FUNCTION airline#themes#get_highlight() | |
Called 96646 times | |
Total time: 18.008990 | |
Self time: 0.370215 | |
count total (s) self (s) | |
96646 17.988605 0.349830 return call('airline#highlighter#get_highlight', [a:group] + a:000) | |
FUNCTION ale#highlight#RemoveHighlights() | |
Called 47 times | |
Total time: 0.001007 | |
Self time: 0.001007 | |
count total (s) self (s) | |
122 0.000296 for l:match in getmatches() | |
75 0.000286 if l:match.group =~# '^ALE' | |
39 0.000080 call matchdelete(l:match.id) | |
39 0.000016 endif | |
75 0.000034 endfor | |
FUNCTION <SNR>136_context() | |
Called 79 times | |
Total time: 0.004531 | |
Self time: 0.004032 | |
count total (s) self (s) | |
79 0.000188 let s:context_id += 1 | |
79 0.000295 let pos = getcurpos() | |
79 0.000144 let bcol = pos[2] | |
79 0.000367 let typed = strpart(getline('.'), 0, bcol-1) | |
79 0.002953 0.002455 let ctx = { 'bufnr': bufnr('%'), 'curpos': pos, 'changedtick': b:changedtick, 'lnum': pos[1], 'bcol': bcol, 'ccol': strchars(typed) + 1, 'filetype': &filetype, 'scope': &filetype, 'filepath': expand('%:p'), 'typed': strpart(getline('.'), 0, pos[2]-1), 'tick': s:context_tick(), 'context_id': s:context_id } | |
79 0.000159 if ctx.filepath == '' | |
" FIXME this is necessary here, otherwise empty filepath is | |
" somehow converted to None in vim8's python binding. | |
3 0.000004 let ctx.filepath = "" | |
3 0.000002 endif | |
79 0.000075 return ctx | |
FUNCTION airline#themes#base16#refresh() | |
Called 19 times | |
Total time: 0.142430 | |
Self time: 0.037815 | |
count total (s) self (s) | |
19 0.031159 let g:airline#themes#base16#palette = {} | |
19 0.012039 0.000339 let g:airline#themes#base16#palette.accents = { 'red': airline#themes#get_highlight('Constant'), } | |
19 0.006409 0.000260 let s:N1 = airline#themes#get_highlight2(['DiffText', 'bg'], ['DiffText', 'fg'], 'bold') | |
19 0.007278 0.000187 let s:N2 = airline#themes#get_highlight2(['Visual', 'fg'], ['Visual', 'bg']) | |
19 0.009078 0.000123 let s:N3 = airline#themes#get_highlight('CursorLine') | |
19 0.001475 0.000191 let g:airline#themes#base16#palette.normal = airline#themes#generate_color_map(s:N1, s:N2, s:N3) | |
19 0.008886 0.000115 let group = airline#themes#get_highlight('vimCommand') | |
19 0.000270 let g:airline#themes#base16#palette.normal_modified = { 'statusline': [ group[0], '', group[2], '', '' ] } | |
19 0.007064 0.000229 let s:I1 = airline#themes#get_highlight2(['DiffText', 'bg'], ['DiffAdded', 'fg'], 'bold') | |
19 0.006754 0.000233 let s:I2 = airline#themes#get_highlight2(['DiffAdded', 'fg'], ['Normal', 'bg']) | |
19 0.000049 let s:I3 = s:N3 | |
19 0.001735 0.000192 let g:airline#themes#base16#palette.insert = airline#themes#generate_color_map(s:I1, s:I2, s:I3) | |
19 0.000094 let g:airline#themes#base16#palette.insert_modified = g:airline#themes#base16#palette.normal_modified | |
19 0.007317 0.000340 let s:R1 = airline#themes#get_highlight2(['DiffText', 'bg'], ['WarningMsg', 'fg'], 'bold') | |
19 0.000066 let s:R2 = s:N2 | |
19 0.000035 let s:R3 = s:N3 | |
19 0.001410 0.000180 let g:airline#themes#base16#palette.replace = airline#themes#generate_color_map(s:R1, s:R2, s:R3) | |
19 0.000084 let g:airline#themes#base16#palette.replace_modified = g:airline#themes#base16#palette.normal_modified | |
19 0.006549 0.000200 let s:V1 = airline#themes#get_highlight2(['DiffText', 'bg'], ['Constant', 'fg'], 'bold') | |
19 0.006104 0.000200 let s:V2 = airline#themes#get_highlight2(['Constant', 'fg'], ['Normal', 'bg']) | |
19 0.000050 let s:V3 = s:N3 | |
19 0.001513 0.000208 let g:airline#themes#base16#palette.visual = airline#themes#generate_color_map(s:V1, s:V2, s:V3) | |
19 0.000119 let g:airline#themes#base16#palette.visual_modified = g:airline#themes#base16#palette.normal_modified | |
" Use VertSplit's bg and default fg (reversed) for inactive statusline. | |
19 0.008880 0.000159 let s:VS = airline#themes#get_highlight('VertSplit') | |
19 0.000035 if s:improved_contrast | |
let s:IA = [ s:VS[1], 'NONE', s:VS[2], s:cterm_lightlight_gray, 'reverse'] | |
else | |
19 0.000096 let s:IA = [ s:VS[1], 'NONE', s:VS[2], 'NONE', 'reverse'] | |
19 0.000013 endif | |
19 0.001369 0.000213 let g:airline#themes#base16#palette.inactive = airline#themes#generate_color_map(s:IA, s:IA, s:IA, s:IA, s:IA, s:IA) | |
19 0.000095 let s:IM = [ s:VS[1], 'NONE', s:VS[2], 'NONE', 'reverse'] | |
19 0.001271 0.000177 let g:airline#themes#base16#palette.inactive_modified = airline#themes#generate_color_map(s:IM, s:IM, s:IM, s:IM, s:IM, s:IM) | |
" Warnings | |
19 0.007444 0.000213 let s:WI = airline#themes#get_highlight2(['WarningMsg', 'bg'], ['WarningMsg', 'fg'], 'bold') | |
19 0.000137 let g:airline#themes#base16#palette.normal.airline_warning = [ s:WI[0], s:WI[1], s:WI[2], s:WI[3] ] | |
19 0.000085 let g:airline#themes#base16#palette.normal_modified.airline_warning = g:airline#themes#base16#palette.normal.airline_warning | |
19 0.000067 let g:airline#themes#base16#palette.insert.airline_warning = g:airline#themes#base16#palette.normal.airline_warning | |
19 0.000061 let g:airline#themes#base16#palette.insert_modified.airline_warning = g:airline#themes#base16#palette.normal.airline_warning | |
19 0.000059 let g:airline#themes#base16#palette.visual.airline_warning = g:airline#themes#base16#palette.normal.airline_warning | |
19 0.000062 let g:airline#themes#base16#palette.visual_modified.airline_warning = g:airline#themes#base16#palette.normal.airline_warning | |
19 0.000058 let g:airline#themes#base16#palette.replace.airline_warning = g:airline#themes#base16#palette.normal.airline_warning | |
19 0.000056 let g:airline#themes#base16#palette.replace_modified.airline_warning = g:airline#themes#base16#palette.normal.airline_warning | |
" Errors | |
19 0.005995 0.000197 let s:ER = airline#themes#get_highlight2(['ErrorMsg', 'bg'], ['ErrorMsg', 'fg'], 'bold') | |
19 0.000112 let g:airline#themes#base16#palette.normal.airline_error = [ s:ER[0], s:ER[1], s:ER[2], s:ER[3] ] | |
19 0.000075 let g:airline#themes#base16#palette.normal_modified.airline_error = g:airline#themes#base16#palette.normal.airline_error | |
19 0.000058 let g:airline#themes#base16#palette.insert.airline_error = g:airline#themes#base16#palette.normal.airline_error | |
19 0.000060 let g:airline#themes#base16#palette.insert_modified.airline_error = g:airline#themes#base16#palette.normal.airline_error | |
19 0.000056 let g:airline#themes#base16#palette.visual.airline_error = g:airline#themes#base16#palette.normal.airline_error | |
19 0.000056 let g:airline#themes#base16#palette.visual_modified.airline_error = g:airline#themes#base16#palette.normal.airline_error | |
19 0.000056 let g:airline#themes#base16#palette.replace.airline_error = g:airline#themes#base16#palette.normal.airline_error | |
19 0.000058 let g:airline#themes#base16#palette.replace_modified.airline_error = g:airline#themes#base16#palette.normal.airline_error | |
FUNCTION <SNR>145_AddHighlights() | |
Called 6 times | |
Total time: 0.000508 | |
Self time: 0.000508 | |
count total (s) self (s) | |
20 0.000030 for hl in a:highlights | |
14 0.000431 call nvim_buf_add_highlight(0, a:source, hl.group, hl.line, hl.character_start, hl.character_end) | |
14 0.000009 endfor | |
FUNCTION airline#util#has_custom_scm() | |
Called 951 times | |
Total time: 0.003013 | |
Self time: 0.003013 | |
count total (s) self (s) | |
951 0.002638 return !empty(get(g:, 'airline#extensions#branch#custom_head', '')) | |
FUNCTION <SNR>21_LoadIndent() | |
Called 5 times | |
Total time: 0.001382 | |
Self time: 0.001382 | |
count total (s) self (s) | |
5 0.000024 if exists("b:undo_indent") | |
exe b:undo_indent | |
unlet! b:undo_indent b:did_indent | |
endif | |
5 0.000011 let s = expand("<amatch>") | |
5 0.000005 if s != "" | |
5 0.000025 if exists("b:did_indent") | |
unlet b:did_indent | |
endif | |
" When there is a dot it is used to separate filetype names. Thus for | |
" "aaa.bbb" load "indent/aaa.vim" and then "indent/bbb.vim". | |
10 0.000020 for name in split(s, '\.') | |
5 0.001243 exe 'runtime! indent/' . name . '.vim' | |
5 0.000003 endfor | |
5 0.000002 endif | |
FUNCTION <SNR>136_on_complete_done() | |
Called 2 times | |
Total time: 0.000006 | |
Self time: 0.000006 | |
count total (s) self (s) | |
2 0.000004 if empty(v:completed_item) | |
2 0.000001 return | |
endif | |
" The user has accepted the item, don't popup old s:matches again. | |
call ncm2#skip_auto_trigger() | |
call s:try_rnotify('on_complete_done', v:completed_item) | |
FUNCTION <SNR>105_dopopd() | |
Called 33 times | |
Total time: 0.000134 | |
Self time: 0.000134 | |
count total (s) self (s) | |
33 0.000100 if !exists('w:fzf_dir') || s:fzf_getcwd() != w:fzf_dir[1] | |
33 0.000017 return | |
endif | |
execute 'lcd' s:escape(w:fzf_dir[0]) | |
unlet w:fzf_dir | |
FUNCTION ale#highlight#UpdateHighlights() | |
Called 41 times | |
Total time: 0.005245 | |
Self time: 0.004198 | |
count total (s) self (s) | |
41 0.000206 let l:item_list = get(b:, 'ale_enabled', 1) && g:ale_enabled ? get(b:, 'ale_highlight_items', []) : [] | |
41 0.000987 0.000124 call ale#highlight#RemoveHighlights() | |
83 0.000093 for l:item in l:item_list | |
42 0.000056 if l:item.type is# 'W' | |
3 0.000005 if get(l:item, 'sub_type', '') is# 'style' | |
3 0.000003 let l:group = 'ALEStyleWarning' | |
3 0.000001 else | |
let l:group = 'ALEWarning' | |
endif | |
3 0.000002 elseif l:item.type is# 'I' | |
let l:group = 'ALEInfo' | |
elseif get(l:item, 'sub_type', '') is# 'style' | |
33 0.000044 let l:group = 'ALEStyleError' | |
33 0.000013 else | |
6 0.000006 let l:group = 'ALEError' | |
6 0.000003 endif | |
42 0.000048 let l:line = l:item.lnum | |
42 0.000045 let l:col = l:item.col | |
42 0.000082 let l:end_line = get(l:item, 'end_lnum', l:line) | |
42 0.000071 let l:end_col = get(l:item, 'end_col', l:col) | |
" Set all of the positions, which are chunked into Lists which | |
" are as large as will be accepted by matchaddpos. | |
42 0.001682 0.001498 call map( ale#highlight#CreatePositions(l:line, l:col, l:end_line, l:end_col), 'matchaddpos(l:group, v:val)') | |
42 0.000046 endfor | |
" If highlights are enabled and signs are not enabled, we should still | |
" offer line highlights by adding a separate set of highlights. | |
41 0.000049 if !g:ale_set_signs | |
let l:available_groups = { 'ALEWarningLine': hlexists('ALEWarningLine'), 'ALEInfoLine': hlexists('ALEInfoLine'), 'ALEErrorLine': hlexists('ALEErrorLine'),} | |
for l:item in l:item_list | |
if l:item.type is# 'W' | |
let l:group = 'ALEWarningLine' | |
elseif l:item.type is# 'I' | |
let l:group = 'ALEInfoLine' | |
else | |
let l:group = 'ALEErrorLine' | |
endif | |
if l:available_groups[l:group] | |
call matchaddpos(l:group, [l:item.lnum]) | |
endif | |
endfor | |
endif | |
FUNCTION <SNR>50_GetFilenames() | |
Called 5 times | |
Total time: 0.000214 | |
Self time: 0.000214 | |
count total (s) self (s) | |
" Yield full filepath for filename in each directory in and above path | |
5 0.000006 let l:path_list = [] | |
5 0.000005 let l:path = a:path | |
25 0.000012 while 1 | |
25 0.000050 let l:path_list += [l:path . '/' . a:filename] | |
25 0.000044 let l:newpath = fnamemodify(l:path, ':h') | |
25 0.000026 if l:path == l:newpath | |
5 0.000003 break | |
endif | |
20 0.000018 let l:path = l:newpath | |
20 0.000008 endwhile | |
5 0.000005 return l:path_list | |
FUNCTION ale_linters#python#flake8#Handle() | |
Called 10 times | |
Total time: 0.001754 | |
Self time: 0.001160 | |
count total (s) self (s) | |
26 0.000032 for l:line in a:lines[:10] | |
16 0.000062 if match(l:line, '^Traceback') >= 0 | |
return [{ 'lnum': 1, 'text': 'An exception was thrown. See :ALEDetail', 'detail': join(a:lines, "\n"),}] | |
endif | |
16 0.000009 endfor | |
" Matches patterns line the following: | |
" | |
" Matches patterns line the following: | |
" | |
" stdin:6:6: E111 indentation is not a multiple of four | |
10 0.000016 let l:pattern = '\v^[a-zA-Z]?:?[^:]+:(\d+):?(\d+)?: ([[:alnum:]]+) (.*)$' | |
10 0.000009 let l:output = [] | |
26 0.000651 0.000057 for l:match in ale#util#GetMatches(a:lines, l:pattern) | |
16 0.000023 let l:code = l:match[3] | |
16 0.000040 if (l:code is# 'W291' || l:code is# 'W293') && !ale#Var(a:buffer, 'warn_about_trailing_whitespace') | |
" Skip warnings for trailing whitespace if the option is off. | |
continue | |
endif | |
16 0.000023 if l:code is# 'W391'&& !ale#Var(a:buffer, 'warn_about_trailing_blank_lines') | |
" Skip warnings for trailing blank lines if the option is off | |
continue | |
endif | |
16 0.000081 let l:item = { 'lnum': l:match[1] + 0, 'col': l:match[2] + 0, 'text': l:match[4], 'code': l:code, 'type': 'W',} | |
16 0.000017 if l:code[:0] is# 'F' | |
2 0.000002 if l:code isnot# 'F401' | |
2 0.000002 let l:item.type = 'E' | |
2 0.000001 endif | |
2 0.000001 elseif l:code[:0] is# 'E' | |
13 0.000017 let l:item.type = 'E' | |
13 0.000018 if l:code isnot# 'E999' && l:code isnot# 'E112' | |
13 0.000015 let l:item.sub_type = 'style' | |
13 0.000005 endif | |
13 0.000010 elseif l:code[:0] is# 'W' | |
1 0.000001 let l:item.sub_type = 'style' | |
1 0.000000 endif | |
16 0.000047 let l:end_col_pattern = get(s:end_col_pattern_map, l:code, '') | |
16 0.000021 if !empty(l:end_col_pattern) | |
2 0.000018 let l:end_col_match = matchlist(l:match[4], l:end_col_pattern) | |
2 0.000002 if !empty(l:end_col_match) | |
2 0.000005 let l:item.end_col = l:item.col + len(l:end_col_match[1]) - 1 | |
2 0.000001 endif | |
2 0.000001 endif | |
16 0.000025 call add(l:output, l:item) | |
16 0.000009 endfor | |
10 0.000008 return l:output | |
FUNCTION ale#semver#HasVersion() | |
Called 10 times | |
Total time: 0.000054 | |
Self time: 0.000054 | |
count total (s) self (s) | |
10 0.000047 return has_key(s:version_cache, a:executable) | |
FUNCTION test#go#ginkgo#test_file() | |
Called 6 times | |
Total time: 0.000160 | |
Self time: 0.000033 | |
count total (s) self (s) | |
6 0.000158 0.000031 return test#go#test_file('ginkgo', g:test#go#ginkgo#file_pattern, a:file) | |
FUNCTION <SNR>86_extend() | |
Called 6 times | |
Total time: 0.001475 | |
Self time: 0.001475 | |
count total (s) self (s) | |
6 0.000045 let result = {} | |
6 0.000036 for [key, value] in items(a:source) | |
let result[key] = value | |
endfor | |
126 0.000349 for [key, value] in items(a:dict) | |
120 0.000804 let result[key] = get(result, key, []) + value | |
120 0.000117 endfor | |
6 0.000014 return result | |
FUNCTION <SNR>204_StopCursorTimer() | |
Called 408 times | |
Total time: 0.004989 | |
Self time: 0.004989 | |
count total (s) self (s) | |
408 0.001058 if s:cursor_timer != -1 | |
379 0.001769 call timer_stop(s:cursor_timer) | |
379 0.000872 let s:cursor_timer = -1 | |
379 0.000344 endif | |
FUNCTION <SNR>158_untracked_output() | |
Called 16 times | |
Total time: 0.000288 | |
Self time: 0.000288 | |
count total (s) self (s) | |
16 0.000129 if a:buf =~? ('^'. a:dict.cfg['untracked_mark']) | |
let a:dict.cfg.untracked[a:dict.file] = get(g:, 'airline#extensions#branch#notexists', g:airline_symbols.notexists) | |
else | |
16 0.000068 let a:dict.cfg.untracked[a:dict.file] = '' | |
16 0.000008 endif | |
FUNCTION ale_linters#python#flake8#GetCommand() | |
Called 10 times | |
Total time: 0.025967 | |
Self time: 0.000682 | |
count total (s) self (s) | |
10 0.000789 0.000111 let l:cd_string = ale#Var(a:buffer, 'python_flake8_change_directory') ? ale#path#BufferCdString(a:buffer) : '' | |
10 0.023932 0.000070 let l:executable = ale_linters#python#flake8#GetExecutable(a:buffer) | |
10 0.000327 0.000077 let l:version = ale#semver#GetVersion(l:executable, a:version_output) | |
10 0.000069 let l:exec_args = l:executable =~? 'pipenv$' ? ' run flake8' : '' | |
" Only include the --stdin-display-name argument if we can parse the | |
" flake8 version, and it is recent enough to support it. | |
10 0.000260 0.000092 let l:display_name_args = ale#semver#GTE(l:version, [3, 0, 0]) ? ' --stdin-display-name %s' : '' | |
10 0.000189 0.000055 let l:options = ale#Var(a:buffer, 'python_flake8_options') | |
10 0.000323 0.000131 return l:cd_string . ale#Escape(l:executable) . l:exec_args . (!empty(l:options) ? ' ' . l:options : '') . ' --format=default' . l:display_name_args . ' -' | |
FUNCTION ncm2#_notify_complete() | |
Called 8 times | |
Total time: 0.023103 | |
Self time: 0.000901 | |
count total (s) self (s) | |
8 0.000116 0.000062 if s:context_tick() != a:ctx.tick | |
3 0.001003 0.000040 call s:try_rnotify('on_notify_dated', a:ctx, a:calls) | |
" we need skip check, and auto_popup check in ncm2#_on_complete | |
" we don't need duplicate check in ncm2#auto_trigger | |
3 0.000628 0.000014 call ncm2#_on_complete(get(a:ctx, 'manual', 0)) | |
3 0.000001 return | |
endif | |
25 0.000030 for ele in a:calls | |
20 0.000038 let name = ele['name'] | |
20 0.000019 try | |
20 0.000076 let s:completion_notified[name] = a:ctx.context_id | |
20 0.000042 let sr = s:sources[name] | |
20 0.000023 let ctx = ele.context | |
20 0.000054 if type(sr.on_complete) == v:t_list | |
call call(sr.on_complete[0], sr.on_complete[1:] + [ctx], sr) | |
else | |
20 0.020723 0.000152 call call(sr.on_complete, [ctx], sr) | |
20 0.000034 endif | |
20 0.000012 catch | |
call s:core.error(name . ' on_complete: ' . v:exception) | |
endtry | |
20 0.000018 endfor | |
FUNCTION ncm2_path#on_complete_rootpath() | |
Called 3 times | |
Total time: 0.000217 | |
Self time: 0.000021 | |
count total (s) self (s) | |
3 0.000215 0.000019 call g:ncm2_path#proc.try_notify('on_complete_rootpath', a:ctx, g:ncm2_path#path_pattern) | |
FUNCTION airline#builder#get_next_group() | |
Called 59 times | |
Total time: 0.000923 | |
Self time: 0.000923 | |
count total (s) self (s) | |
59 0.000079 let x = a:i + 1 | |
59 0.000089 let l = len(a:sections) | |
118 0.000105 while x < l | |
118 0.000199 let group = a:sections[x][0] | |
118 0.000169 if group != '' && group != '|' | |
59 0.000046 return group | |
endif | |
59 0.000056 let x = x + 1 | |
59 0.000039 endwhile | |
return '' | |
FUNCTION <SNR>145_Edit() | |
Called 2 times | |
Total time: 0.002898 | |
Self time: 0.002764 | |
count total (s) self (s) | |
" If editing current file, push current location to jump list. | |
2 0.002663 let l:bufnr = bufnr(a:path) | |
2 0.000005 if l:bufnr == bufnr('%') | |
2 0.000225 0.000091 execute 'normal m`' | |
2 0.000001 return | |
endif | |
let l:action = a:action | |
" Avoid the 'not saved' warning. | |
if l:action ==# 'edit' && l:bufnr != -1 | |
execute 'buffer' l:bufnr | |
return | |
endif | |
execute l:action . ' ' . fnameescape(a:path) | |
FUNCTION signature#utils#IsValidMark() | |
Called 2 times | |
Total time: 0.000006 | |
Self time: 0.000006 | |
count total (s) self (s) | |
2 0.000005 return (b:SignatureIncludeMarks =~# a:mark) | |
FUNCTION <SNR>134_add_section() | |
Called 859 times | |
Total time: 0.045623 | |
Self time: 0.017384 | |
count total (s) self (s) | |
859 0.003141 let condition = (a:key is# "warning" || a:key is# "error") && (v:version == 704 && !has("patch1511")) | |
" i have no idea why the warning section needs special treatment, but it's | |
" needed to prevent separators from showing up | |
859 0.005956 0.003117 if ((a:key == 'error' || a:key == 'warning') && empty(s:get_section(a:context.winnr, a:key))) | |
return | |
endif | |
859 0.000617 if condition | |
call a:builder.add_raw('%(') | |
endif | |
859 0.030448 0.005048 call a:builder.add_section('airline_'.a:key, s:get_section(a:context.winnr, a:key)) | |
859 0.000671 if condition | |
call a:builder.add_raw('%)') | |
endif | |
FUNCTION test#python#nose2#test_file() | |
Called 2 times | |
Total time: 0.000027 | |
Self time: 0.000027 | |
count total (s) self (s) | |
2 0.000016 if fnamemodify(a:file, ':t') =~# g:test#python#nose2#file_pattern | |
if exists('g:test#python#runner') | |
return g:test#python#runner ==# 'Nose2' | |
else | |
return executable('nose2') | |
endif | |
endif | |
FUNCTION provider#python3#Call() | |
Called 11 times | |
Total time: 0.024957 | |
Self time: 0.024957 | |
count total (s) self (s) | |
11 0.000022 if s:err != '' | |
return | |
endif | |
11 0.000020 if !exists('s:host') | |
let s:rpcrequest = function('rpcrequest') | |
" Ensure that we can load the Python3 host before bootstrapping | |
try | |
let s:host = remote#host#Require('legacy-python3-provider') | |
catch | |
let s:err = v:exception | |
echohl WarningMsg | |
echomsg v:exception | |
echohl None | |
return | |
endtry | |
endif | |
11 0.024732 return call(s:rpcrequest, insert(insert(a:args, 'python_'.a:method), s:host)) | |
FUNCTION test#javascript#cucumberjs#test_file() | |
Called 6 times | |
Total time: 0.000078 | |
Self time: 0.000078 | |
count total (s) self (s) | |
6 0.000046 if a:file =~# g:test#javascript#cucumberjs#file_pattern | |
return test#javascript#has_package('cucumber') | |
endif | |
FUNCTION <SNR>147_get_separator_change_with_end() | |
Called 842 times | |
Total time: 0.152687 | |
Self time: 0.016813 | |
count total (s) self (s) | |
842 0.000962 let sep_change = 0 | |
842 0.001194 if !empty(a:new_end_group) " Separator between title and the end | |
776 0.061847 0.004401 let sep_change += airline#builder#should_change_group(a:new_group, a:new_end_group) ? a:sep_size : a:alt_sep_size | |
776 0.000323 endif | |
842 0.000966 if !empty(a:old_group) " Separator between the title and the one adjacent | |
658 0.052661 0.002416 let sep_change += airline#builder#should_change_group(a:new_group, a:old_group) ? a:sep_size : a:alt_sep_size | |
658 0.000770 if !empty(a:old_end_group) " Remove mis-predicted separator | |
658 0.030568 0.002386 let sep_change -= airline#builder#should_change_group(a:old_group, a:old_end_group) ? a:sep_size : a:alt_sep_size | |
658 0.000290 endif | |
658 0.000215 endif | |
842 0.000630 return sep_change | |
FUNCTION airline#extensions#tabline#buflist#list() | |
Called 2851 times | |
Total time: 0.357732 | |
Self time: 0.344259 | |
count total (s) self (s) | |
2851 0.007899 if exists('s:current_buffer_list') | |
2823 0.003859 return s:current_buffer_list | |
endif | |
28 0.000069 let exclude_buffers = get(g:, 'airline#extensions#tabline#exclude_buffers', []) | |
28 0.000070 let exclude_paths = get(g:, 'airline#extensions#tabline#excludes', []) | |
28 0.000060 let exclude_preview = get(g:, 'airline#extensions#tabline#exclude_preview', 1) | |
28 0.001324 let list = (exists('g:did_bufmru') && g:did_bufmru) ? BufMRUList() : range(1, bufnr("$")) | |
28 0.000047 let buffers = [] | |
" If this is too slow, we can switch to a different algorithm. | |
" Basically branch 535 already does it, but since it relies on | |
" BufAdd autocommand, I'd like to avoid this if possible. | |
28684 0.011759 for nr in list | |
28656 0.024035 if buflisted(nr) | |
" Do not add to the bufferlist, if either | |
" 1) bufnr is exclude_buffers list | |
" 2) buffername matches one of exclude_paths patterns | |
" 3) buffer is a quickfix buffer | |
" 4) when excluding preview windows: | |
" 'bufhidden' == wipe | |
" 'buftype' == nofile | |
" 5) ignore buffers matching airline#extensions#tabline#ignore_bufadd_pat | |
" check buffer numbers first | |
619 0.000848 if index(exclude_buffers, nr) >= 0 | |
continue | |
" check paths second | |
elseif !empty(exclude_paths) && s:ExcludePaths(nr, exclude_paths) | |
continue | |
" ignore buffers matching airline#extensions#tabline#ignore_bufadd_pat | |
elseif airline#util#ignore_buf(bufname(nr)) | |
continue | |
" check other types last | |
elseif s:ExcludeOther(nr, exclude_preview) | |
continue | |
endif | |
619 0.000833 call add(buffers, nr) | |
619 0.000232 endif | |
28656 0.009276 endfor | |
28 0.000045 let s:current_buffer_list = buffers | |
28 0.000021 return buffers | |
FUNCTION 12() | |
Called 252 times | |
Total time: 0.000856 | |
Self time: 0.000856 | |
count total (s) self (s) | |
252 0.000752 call add(self._sections, ['|', a:0 ? a:1 : '%=']) | |
FUNCTION 13() | |
Called 59 times | |
Total time: 0.000675 | |
Self time: 0.000503 | |
count total (s) self (s) | |
59 0.000191 let spc = empty(a:contents) ? '' : g:airline_symbols.space | |
59 0.000459 0.000287 call self.add_section(a:group, spc.a:contents.spc) | |
FUNCTION 14() | |
Called 1197 times | |
Total time: 0.003431 | |
Self time: 0.003431 | |
count total (s) self (s) | |
1197 0.003117 call add(self._sections, [a:group, a:contents]) | |
FUNCTION 16() | |
Called 717 times | |
Total time: 0.001791 | |
Self time: 0.001791 | |
count total (s) self (s) | |
717 0.001638 call insert(self._sections, [a:group, a:contents], a:position) | |
FUNCTION 17() | |
Called 1316 times | |
Total time: 0.003267 | |
Self time: 0.003267 | |
count total (s) self (s) | |
1316 0.003007 call insert(self._sections, ['', a:text], a:position) | |
FUNCTION 18() | |
Called 59 times | |
Total time: 0.000156 | |
Self time: 0.000156 | |
count total (s) self (s) | |
59 0.000134 return len(self._sections) | |
FUNCTION 19() | |
Called 311 times | |
Total time: 2.514554 | |
Self time: 0.206119 | |
count total (s) self (s) | |
311 0.000370 let side = 1 | |
311 0.000264 let line = '' | |
311 0.000328 let i = 0 | |
311 0.000581 let length = len(self._sections) | |
311 0.000286 let split = 0 | |
311 0.000341 let is_empty = 0 | |
311 0.000347 let prev_group = '' | |
4029 0.003703 while i < length | |
3718 0.005298 let section = self._sections[i] | |
3718 0.004337 let group = section[0] | |
3718 0.004111 let contents = section[1] | |
3718 0.003585 let pgroup = prev_group | |
3718 0.046974 0.012393 let prev_group = airline#builder#get_prev_group(self._sections, i) | |
3718 0.006050 if group ==# 'airline_c' && &buftype ==# 'terminal' && self._context.active | |
6 0.000008 let group = 'airline_term' | |
6 0.000021 elseif group ==# 'airline_c' && !self._context.active && has_key(self._context, 'bufnr') | |
let group = 'airline_c'. self._context.bufnr | |
elseif prev_group ==# 'airline_c' && !self._context.active && has_key(self._context, 'bufnr') | |
let prev_group = 'airline_c'. self._context.bufnr | |
endif | |
3718 0.002296 if is_empty | |
let prev_group = pgroup | |
endif | |
3718 0.031839 0.011088 let is_empty = s:section_is_empty(self, contents) | |
3718 0.002122 if is_empty | |
" need to fix highlighting groups, since we | |
" have skipped a section, we actually need | |
" the previous previous group and so the | |
" seperator goes from the previous previous group | |
" to the current group | |
let pgroup = group | |
endif | |
3718 0.002887 if group == '' | |
1316 0.001728 let line .= contents | |
1316 0.000732 elseif group == '|' | |
311 0.000265 let side = 0 | |
311 0.000522 let line .= contents | |
311 0.000247 let split = 1 | |
311 0.000131 else | |
2091 0.001628 if prev_group == '' | |
311 0.001122 let line .= '%#'.group.'#' | |
311 0.000213 elseif split | |
311 0.000211 if !is_empty | |
311 0.522919 0.001628 let line .= s:get_transitioned_seperator(self, prev_group, group, side) | |
311 0.000178 endif | |
311 0.000329 let split = 0 | |
311 0.000143 else | |
1469 0.000923 if !is_empty | |
1469 1.677605 0.006203 let line .= s:get_seperator(self, prev_group, group, side) | |
1469 0.000697 endif | |
1469 0.000506 endif | |
2091 0.079093 0.018684 let line .= is_empty ? '' : s:get_accented_line(self, group, contents) | |
2091 0.000866 endif | |
3718 0.003845 let i = i + 1 | |
3718 0.006717 endwhile | |
311 0.000301 if !self._context.active | |
"let line = substitute(line, '%#airline_c#', '%#airline_c'.self._context.bufnr.'#', '') | |
121 0.004170 let line = substitute(line, '%#.\{-}\ze#', '\0_inactive', 'g') | |
121 0.000084 endif | |
311 0.000276 return line | |
FUNCTION ale#history#RememberOutput() | |
Called 10 times | |
Total time: 0.000184 | |
Self time: 0.000083 | |
count total (s) self (s) | |
10 0.000153 0.000053 let l:obj = s:FindHistoryItem(a:buffer, a:job_id) | |
10 0.000016 let l:obj.output = a:output | |
FUNCTION <SNR>86_after_run() | |
Called 3 times | |
Total time: 0.000040 | |
Self time: 0.000040 | |
count total (s) self (s) | |
3 0.000021 if exists('g:test#project_root') | |
execute 'cd -' | |
endif | |
FUNCTION <SNR>86_before_run() | |
Called 3 times | |
Total time: 0.000130 | |
Self time: 0.000130 | |
count total (s) self (s) | |
3 0.000043 if &autowrite || &autowriteall | |
silent! wall | |
endif | |
3 0.000026 if exists('g:test#project_root') | |
execute 'cd' g:test#project_root | |
endif | |
FUNCTION LanguageClient#textDocument_references() | |
Called 1 time | |
Total time: 0.008500 | |
Self time: 0.000130 | |
count total (s) self (s) | |
1 0.000013 let l:Callback = get(a:000, 1, v:null) | |
1 0.000415 0.000076 let l:params = { 'filename': LSP#filename(), 'text': LSP#text(), 'line': LSP#line(), 'character': LSP#character(), 'includeDeclaration': v:true, 'handle': s:IsFalse(l:Callback), 'gotoCmd': v:null, } | |
1 0.000021 call extend(l:params, get(a:000, 0, {})) | |
1 0.008048 0.000017 return LanguageClient#Call('textDocument/references', l:params, l:Callback) | |
FUNCTION ale#ShouldDoNothing() | |
Called 210 times | |
Total time: 0.017577 | |
Self time: 0.013174 | |
count total (s) self (s) | |
" The checks are split into separate if statements to make it possible to | |
" profile each check individually with Vim's profiling tools. | |
" | |
" Do nothing if ALE is disabled. | |
210 0.001294 if !getbufvar(a:buffer, 'ale_enabled', get(g:, 'ale_enabled', 0)) | |
return 1 | |
endif | |
" Don't perform any checks when newer NeoVim versions are exiting. | |
210 0.000837 if get(v:, 'exiting', v:null) isnot v:null | |
return 1 | |
endif | |
210 0.000916 let l:filetype = getbufvar(a:buffer, '&filetype') | |
" Do nothing when there's no filetype. | |
210 0.000331 if l:filetype is# '' | |
85 0.000097 return 1 | |
endif | |
" Do nothing for blacklisted files. | |
125 0.000794 if index(get(g:, 'ale_filetype_blacklist', []), l:filetype) >= 0 | |
return 1 | |
endif | |
" Do nothing if running from command mode. | |
125 0.000531 if s:getcmdwintype_exists && !empty(getcmdwintype()) | |
return 1 | |
endif | |
125 0.000697 let l:filename = fnamemodify(bufname(a:buffer), ':t') | |
" Do nothing for directories. | |
125 0.000218 if l:filename is# '.' | |
return 1 | |
endif | |
" Don't start linting and so on when an operator is pending. | |
125 0.001445 0.000747 if ale#util#Mode(1) is# 'no' | |
return 1 | |
endif | |
" Do nothing if running in the sandbox. | |
125 0.002633 0.000477 if ale#util#InSandbox() | |
return 1 | |
endif | |
" Do nothing if the file is too large. | |
125 0.002113 0.000565 if ale#FileTooLarge(a:buffer) | |
return 1 | |
endif | |
" Do nothing from CtrlP buffers with CtrlP-funky. | |
125 0.001074 if exists(':CtrlPFunky') is 2&& getbufvar(a:buffer, '&l:statusline') =~# 'CtrlPMode.*funky' | |
return 1 | |
endif | |
125 0.000109 return 0 | |
FUNCTION airline#extensions#po#apply() | |
Called 62 times | |
Total time: 0.000397 | |
Self time: 0.000397 | |
count total (s) self (s) | |
62 0.000184 if &ft ==# 'po' | |
call airline#extensions#prepend_to_section('z', '%{airline#extensions#po#stats()}') | |
autocmd airline BufWritePost * unlet! b:airline_po_stats | |
endif | |
FUNCTION 21() | |
Called 59 times | |
Total time: 0.000903 | |
Self time: 0.000747 | |
count total (s) self (s) | |
59 0.000120 let self._first_title = a:first " lowest index | |
59 0.000101 let self._last_title = a:last " highest index | |
59 0.000076 let self._left_title = a:current " next index to add on the left | |
59 0.000085 let self._right_title = a:current + 1 " next index to add on the right | |
59 0.000378 0.000222 let self._left_position = self.get_position() " left end of titles | |
59 0.000084 let self._right_position = self._left_position " right end of the titles | |
FUNCTION 22() | |
Called 717 times | |
Total time: 0.159681 | |
Self time: 0.023568 | |
count total (s) self (s) | |
717 0.053883 0.002146 let title = self.get_title(a:index) | |
717 0.078776 0.002673 let title_size = s:tabline_evaluated_length(title) + a:sep_size | |
717 0.001124 if a:force || self._remaining_space >= title_size | |
658 0.000703 let pos = a:pos | |
658 0.001028 if has_key(self, "get_pretitle") | |
658 0.007837 0.003119 call self.insert_raw(self.get_pretitle(a:index), pos) | |
658 0.000801 let self._right_position += 1 | |
658 0.000625 let pos += 1 | |
658 0.000260 endif | |
658 0.003403 0.001786 call self.insert_section(a:group, title, pos) | |
658 0.000599 let self._right_position += 1 | |
658 0.000541 let pos += 1 | |
658 0.000889 if has_key(self, "get_posttitle") | |
658 0.004292 0.002353 call self.insert_raw(self.get_posttitle(a:index), pos) | |
658 0.000575 let self._right_position += 1 | |
658 0.000562 let pos += 1 | |
658 0.000231 endif | |
658 0.000799 let self._remaining_space -= title_size | |
658 0.000344 return 1 | |
endif | |
59 0.000030 return 0 | |
FUNCTION 23() | |
Called 59 times | |
Total time: 1.272674 | |
Self time: 0.043992 | |
count total (s) self (s) | |
59 0.000195 if has_key(self, '_left_position') && self._first_title <= self._last_title | |
59 0.302537 0.000486 let self._remaining_space = &columns - s:tabline_evaluated_length(self._build()) | |
59 0.000177 let center_active = get(g:, 'airline#extensions#tabline#center_active', 0) | |
59 0.002112 0.000212 let sep_size = s:tabline_evaluated_length(self._context.left_sep) | |
59 0.013693 0.011930 let alt_sep_size = s:tabline_evaluated_length(self._context.left_alt_sep) | |
59 0.000762 0.000249 let outer_left_group = airline#builder#get_prev_group(self._sections, self._left_position) | |
59 0.001186 0.000262 let outer_right_group = airline#builder#get_next_group(self._sections, self._right_position) | |
59 0.000212 let overflow_marker = get(g:, 'airline#extensions#tabline#overflow_marker', g:airline_symbols.ellipsis) | |
59 0.002152 0.000202 let overflow_marker_size = s:tabline_evaluated_length(overflow_marker) | |
" Allow space for the markers before we begin filling in titles. | |
59 0.000075 if self._left_title > self._first_title | |
10 0.000266 0.000057 let self._remaining_space -= overflow_marker_size + s:get_separator_change(self.overflow_group, "", outer_left_group, sep_size, alt_sep_size) | |
10 0.000006 endif | |
59 0.000064 if self._left_title < self._last_title | |
56 0.027048 0.000381 let self._remaining_space -= overflow_marker_size + s:get_separator_change(self.overflow_group, "", outer_right_group, sep_size, alt_sep_size) | |
56 0.000025 endif | |
" Add the current title | |
59 0.002363 0.000417 let group = self.get_group(self._left_title) | |
59 0.000069 if self._left_title == self._first_title | |
49 0.001225 0.000260 let sep_change = s:get_separator_change(group, "", outer_left_group, sep_size, alt_sep_size) | |
49 0.000022 else | |
10 0.004377 0.000042 let sep_change = s:get_separator_change(group, "", self.overflow_group, sep_size, alt_sep_size) | |
10 0.000004 endif | |
59 0.000063 if self._left_title == self._last_title | |
3 0.001313 0.000015 let sep_change += s:get_separator_change(group, "", outer_right_group, sep_size, alt_sep_size) | |
3 0.000001 else | |
56 0.005187 0.000233 let sep_change += s:get_separator_change(group, "", self.overflow_group, sep_size, alt_sep_size) | |
56 0.000024 endif | |
59 0.000070 let left_group = group | |
59 0.000073 let right_group = group | |
59 0.015010 0.000301 let self._left_title -= self.try_insert_title(self._left_title, group, self._left_position, sep_change, 1) | |
59 0.000125 if get(g:, 'airline#extensions#tabline#current_first', 0) | |
" always have current title first | |
let self._left_position += 1 | |
endif | |
59 0.000099 if !center_active && self._right_title <= self._last_title | |
" Add the title to the right | |
56 0.001727 0.000161 let group = self.get_group(self._right_title) | |
56 0.000065 if self._right_title == self._last_title | |
let sep_change = s:get_separator_change_with_end(group, right_group, outer_right_group, self.overflow_group, sep_size, alt_sep_size) - overflow_marker_size | |
else | |
56 0.050748 0.000278 let sep_change = s:get_separator_change(group, right_group, self.overflow_group, sep_size, alt_sep_size) | |
56 0.000025 endif | |
56 0.000071 let right_group = group | |
56 0.013703 0.000296 let self._right_title += self.try_insert_title(self._right_title, group, self._right_position, sep_change, 1) | |
56 0.000022 endif | |
602 0.000568 while self._remaining_space > 0 | |
602 0.000468 let done = 0 | |
602 0.000603 if self._left_title >= self._first_title | |
" Insert next title to the left | |
56 0.001594 0.000146 let group = self.get_group(self._left_title) | |
56 0.000053 if self._left_title == self._first_title | |
7 0.005506 0.000042 let sep_change = s:get_separator_change_with_end(group, left_group, outer_left_group, self.overflow_group, sep_size, alt_sep_size) - overflow_marker_size | |
7 0.000003 else | |
49 0.005907 0.000209 let sep_change = s:get_separator_change(group, left_group, self.overflow_group, sep_size, alt_sep_size) | |
49 0.000021 endif | |
56 0.000064 let left_group = group | |
56 0.012309 0.000235 let done = self.try_insert_title(self._left_title, group, self._left_position, sep_change, 0) | |
56 0.000065 let self._left_title -= done | |
56 0.000023 endif | |
" If center_active is set, this |if| operates as an independent |if|, | |
" otherwise as an |elif|. | |
602 0.001064 if self._right_title <= self._last_title && (center_active || !done) | |
" Insert next title to the right | |
546 0.016015 0.001514 let group = self.get_group(self._right_title) | |
546 0.000540 if self._right_title == self._last_title | |
let sep_change = s:get_separator_change_with_end(group, right_group, outer_right_group, self.overflow_group, sep_size, alt_sep_size) - overflow_marker_size | |
else | |
546 0.059099 0.002415 let sep_change = s:get_separator_change(group, right_group, self.overflow_group, sep_size, alt_sep_size) | |
546 0.000228 endif | |
546 0.000618 let right_group = group | |
546 0.121790 0.002298 let done = self.try_insert_title(self._right_title, group, self._right_position, sep_change, 0) | |
546 0.000625 let self._right_title += done | |
546 0.000223 endif | |
602 0.000413 if !done | |
59 0.000036 break | |
endif | |
543 0.000280 endwhile | |
59 0.000060 if self._left_title >= self._first_title | |
3 0.000006 if get(g:, 'airline#extensions#tabline#current_first', 0) | |
let self._left_position -= 1 | |
endif | |
3 0.000020 0.000011 call self.insert_section(self.overflow_group, overflow_marker, self._left_position) | |
3 0.000003 let self._right_position += 1 | |
3 0.000001 endif | |
59 0.000054 if self._right_title <= self._last_title | |
56 0.000353 0.000189 call self.insert_section(self.overflow_group, overflow_marker, self._right_position) | |
56 0.000022 endif | |
59 0.000021 endif | |
59 0.583684 0.000165 return self._build() | |
FUNCTION LanguageClient#Notify() | |
Called 81 times | |
Total time: 0.009332 | |
Self time: 0.005872 | |
count total (s) self (s) | |
81 0.000288 let l:params = a:params | |
81 0.000380 if type(params) == s:TYPE.dict | |
81 0.001163 let l:params = extend({ 'buftype': &buftype, 'languageId': &filetype, }, l:params) | |
81 0.000087 endif | |
81 0.007224 0.003763 return LanguageClient#Write(json_encode({ 'jsonrpc': '2.0', 'method': a:method, 'params': l:params, })) | |
FUNCTION test#ruby#cucumber#test_file() | |
Called 6 times | |
Total time: 0.000079 | |
Self time: 0.000079 | |
count total (s) self (s) | |
6 0.000042 if a:file =~# g:test#ruby#cucumber#file_pattern | |
return !empty(glob('features/**/*.rb')) | |
endif | |
FUNCTION test#strategy#neovim() | |
Called 3 times | |
Total time: 0.212477 | |
Self time: 0.024805 | |
count total (s) self (s) | |
3 0.000012 let term_position = get(g:, 'test#neovim#term_position', 'botright') | |
3 0.189010 0.002356 execute term_position . ' new' | |
3 0.023310 0.022291 call termopen(a:cmd) | |
3 0.000127 au BufDelete <buffer> wincmd p " switch back to last window | |
3 0.000004 startinsert | |
FUNCTION test#test_file() | |
Called 3 times | |
Total time: 0.016698 | |
Self time: 0.000049 | |
count total (s) self (s) | |
3 0.016695 0.000046 return !empty(test#determine_runner(a:file)) | |
FUNCTION sy#sign#get_current_signs() | |
Called 7 times | |
Total time: 0.001428 | |
Self time: 0.001428 | |
count total (s) self (s) | |
7 0.000049 let a:sy.internal = {} | |
7 0.000011 let a:sy.external = {} | |
7 0.000018 redir => signlist | |
7 0.000102 silent! execute 'sign place buffer='. a:sy.buffer | |
7 0.000014 redir END | |
36 0.000079 for signline in split(signlist, '\n')[2:] | |
29 0.000487 let tokens = matchlist(signline, '\v^\s+\S+\=(\d+)\s+\S+\=(\d+)\s+\S+\=(.*)$') | |
29 0.000063 let line = str2nr(tokens[1]) | |
29 0.000044 let id = str2nr(tokens[2]) | |
29 0.000033 let type = tokens[3] | |
29 0.000097 if type =~# '^Signify' | |
" Handle ambiguous signs. Assume you have signs on line 3 and 4. | |
" Removing line 3 would lead to the second sign to be shifted up | |
" to line 3. Now there are still 2 signs, both one line 3. | |
20 0.000038 if has_key(a:sy.internal, line) | |
execute 'sign unplace' a:sy.internal[line].id 'buffer='.a:sy.buffer | |
endif | |
20 0.000053 let a:sy.internal[line] = { 'type': type, 'id': id } | |
20 0.000008 else | |
9 0.000022 let a:sy.external[line] = id | |
9 0.000005 endif | |
29 0.000015 endfor | |
FUNCTION sy#sign#id_next() | |
Called 9 times | |
Total time: 0.000039 | |
Self time: 0.000039 | |
count total (s) self (s) | |
9 0.000015 let id = a:sy.signid | |
9 0.000012 let a:sy.signid += 1 | |
9 0.000006 return id | |
FUNCTION test#determine_runner() | |
Called 6 times | |
Total time: 0.022266 | |
Self time: 0.012731 | |
count total (s) self (s) | |
122 0.002058 0.000371 for [language, runners] in items(test#get_runners()) | |
400 0.000593 for runner in runners | |
284 0.001627 let runner = tolower(language).'#'.tolower(runner) | |
284 0.000900 if exists("g:test#enabled_runners") | |
if index(g:test#enabled_runners, runner) < 0 | |
continue | |
endif | |
endif | |
284 0.012627 0.004779 if test#base#test_file(runner, fnamemodify(a:file, ':.')) | |
4 0.000004 return runner | |
endif | |
280 0.000251 endfor | |
116 0.000088 endfor | |
FUNCTION <SNR>68_SetupAutoCommands() | |
Called 54 times | |
Total time: 0.011585 | |
Self time: 0.008066 | |
count total (s) self (s) | |
" Auto commands group | |
54 0.000161 augroup better_whitespace | |
54 0.004026 autocmd! | |
54 0.000074 if g:better_whitespace_enabled == 1 | |
54 0.000077 if s:better_whitespace_initialized == 0 | |
call <SID>WhitespaceInit() | |
endif | |
" Check if current line is disabled softly | |
54 0.000070 if g:current_line_whitespace_disabled_soft == 0 | |
" Highlight all whitespace upon entering buffer | |
54 0.002902 0.000233 call <SID>PerformMatchHighlight(s:eol_whitespace_pattern) | |
" Check if current line highlighting is disabled | |
54 0.000078 if g:current_line_whitespace_disabled_hard == 1 | |
" Never highlight whitespace on current line | |
autocmd InsertEnter,CursorMoved,CursorMovedI * call <SID>HighlightEOLWhitespaceExceptCurrentLine('match') | |
else | |
" When in insert mode, do not highlight whitespace on the current line | |
54 0.001294 autocmd InsertEnter,CursorMovedI * call <SID>HighlightEOLWhitespaceExceptCurrentLine('match') | |
54 0.000031 endif | |
" Highlight all whitespace when exiting insert mode | |
54 0.000559 autocmd InsertLeave,BufReadPost * call <SID>HighlightEOLWhitespace('match') | |
" Clear whitespace highlighting when leaving buffer | |
54 0.000445 autocmd BufWinLeave * match ExtraWhitespace '' | |
54 0.000026 else | |
" Highlight extraneous whitespace at the end of lines, but not the | |
" current line. | |
call <SID>HighlightEOLWhitespace('syntax') | |
autocmd InsertEnter * call <SID>HighlightEOLWhitespaceExceptCurrentLine('syntax') | |
autocmd InsertLeave,BufReadPost * call <SID>HighlightEOLWhitespace('syntax') | |
endif | |
54 0.000024 endif | |
" Strip whitespace on save if enabled. | |
54 0.001000 0.000150 if <SID>ShouldStripWhitespace() | |
autocmd BufWritePre * call <SID>StripWhitespace( 0, line("$") ) | |
endif | |
54 0.000040 augroup END | |
FUNCTION <SNR>144_map() | |
Called 10 times | |
Total time: 0.000830 | |
Self time: 0.000830 | |
count total (s) self (s) | |
10 0.000043 let flags = (a:0 ? a:1 : '') . (a:rhs =~# '<Plug>' ? '' : '<script>') | |
10 0.000010 let head = a:lhs | |
10 0.000007 let tail = '' | |
10 0.000026 let keys = get(g:, a:mode.'remap', {}) | |
10 0.000017 if type(keys) == type([]) | |
return | |
endif | |
30 0.000035 while !empty(head) | |
20 0.000025 if has_key(keys, head) | |
let head = keys[head] | |
if empty(head) | |
return | |
endif | |
break | |
endif | |
20 0.000093 let tail = matchstr(head, '<[^<>]*>$\|.$') . tail | |
20 0.000082 let head = substitute(head, '<[^<>]*>$\|.$', '', '') | |
20 0.000012 endwhile | |
10 0.000032 if flags !~# '<unique>' || empty(mapcheck(head.tail, a:mode)) | |
10 0.000235 exe a:mode.'map <buffer>' flags head.tail a:rhs | |
10 0.000011 if a:0 > 1 | |
let b:undo_ftplugin = get(b:, 'undo_ftplugin', 'exe') . '|sil! exe "' . a:mode . 'unmap <buffer> ' . head.tail . '"' | |
endif | |
10 0.000004 endif | |
FUNCTION gutentags#normalizepath() | |
Called 5 times | |
Total time: 0.000052 | |
Self time: 0.000052 | |
count total (s) self (s) | |
5 0.000010 if exists('+shellslash') && &shellslash | |
return substitute(a:path, '\v/', '\\', 'g') | |
elseif has('win32') | |
return substitute(a:path, '\v/', '\\', 'g') | |
else | |
5 0.000004 return a:path | |
endif | |
FUNCTION <SNR>201_GroupLoclistItems() | |
Called 10 times | |
Total time: 0.000283 | |
Self time: 0.000283 | |
count total (s) self (s) | |
10 0.000018 let l:grouped_items = [] | |
10 0.000011 let l:last_lnum = -1 | |
26 0.000021 for l:obj in a:loclist | |
16 0.000016 if l:obj.bufnr != a:buffer | |
continue | |
endif | |
" Create a new sub-List when we hit a new line. | |
16 0.000015 if l:obj.lnum != l:last_lnum | |
16 0.000022 call add(l:grouped_items, []) | |
16 0.000007 endif | |
16 0.000027 call add(l:grouped_items[-1], l:obj) | |
16 0.000018 let l:last_lnum = l:obj.lnum | |
16 0.000006 endfor | |
10 0.000010 return l:grouped_items | |
FUNCTION SimpylFold#Recache() | |
Called 37 times | |
Total time: 0.006749 | |
Self time: 0.006749 | |
count total (s) self (s) | |
37 0.000136 if exists('b:SimpylFold_cache') | |
7 0.006495 unlet b:SimpylFold_cache | |
7 0.000011 endif | |
FUNCTION ale#cursor#EchoCursorWarning() | |
Called 168 times | |
Total time: 0.033531 | |
Self time: 0.009575 | |
count total (s) self (s) | |
168 0.001666 let l:buffer = bufnr('') | |
168 0.000531 if !g:ale_echo_cursor && !g:ale_cursor_detail | |
return | |
endif | |
" Only echo the warnings in normal mode, otherwise we will get problems. | |
168 0.000640 if mode(1) isnot# 'n' | |
6 0.000003 return | |
endif | |
162 0.014914 0.001166 if ale#ShouldDoNothing(l:buffer) | |
77 0.000054 return | |
endif | |
85 0.011012 0.000803 let [l:info, l:loc] = s:FindItemAtCursor(l:buffer) | |
85 0.000151 if g:ale_echo_cursor | |
85 0.000204 if !empty(l:loc) | |
let l:format = ale#Var(l:buffer, 'echo_msg_format') | |
let l:msg = ale#GetLocItemMessage(l:loc, l:format) | |
call ale#cursor#TruncatedEcho(l:msg) | |
let l:info.echoed = 1 | |
elseif get(l:info, 'echoed') | |
" We'll only clear the echoed message when moving off errors once, | |
" so we don't continually clear the echo line. | |
execute 'echo' | |
let l:info.echoed = 0 | |
endif | |
85 0.000068 endif | |
85 0.000141 if g:ale_cursor_detail | |
if !empty(l:loc) | |
call s:ShowCursorDetailForItem(l:loc, {'stay_here': 1}) | |
else | |
call ale#preview#CloseIfTypeMatches('ale-preview') | |
endif | |
endif | |
FUNCTION airline#extensions#tabline#get_buffer_name() | |
Called 2792 times | |
Total time: 0.219599 | |
Self time: 0.043523 | |
count total (s) self (s) | |
2792 0.028536 0.015382 let buffers = a:0 ? a:1 : airline#extensions#tabline#buflist#list() | |
2792 0.009464 let formatter = get(g:, 'airline#extensions#tabline#formatter', 'default') | |
2792 0.179553 0.016630 return airline#extensions#tabline#formatters#{formatter}#format(a:nr, buffers) | |
FUNCTION <SNR>32_on_colorscheme_changed() | |
Called 10 times | |
Total time: 4.021432 | |
Self time: 0.001170 | |
count total (s) self (s) | |
10 0.000215 0.000122 call s:init() | |
10 0.000617 unlet! g:airline#highlighter#normal_fg_hi | |
10 0.013529 0.000101 call airline#highlighter#reset_hlcache() | |
10 0.000305 0.000128 let g:airline_gui_mode = airline#init#gui_mode() | |
10 0.000029 if !s:theme_in_vimrc | |
call airline#switch_matching_theme() | |
endif | |
" couldn't find a match, or theme was defined, just refresh | |
10 4.006632 0.000068 call airline#load_theme() | |
FUNCTION <SNR>184_job_exit() | |
Called 7 times | |
Total time: 0.044950 | |
Self time: 0.000240 | |
count total (s) self (s) | |
7 0.000085 0.000035 call sy#verbose('job_exit()', a:vcs) | |
7 0.000020 let sy = getbufvar(a:bufnr, 'sy') | |
7 0.000009 if empty(sy) | |
call sy#verbose(printf('No b:sy found for %s', bufname(a:bufnr)), a:vcs) | |
return | |
elseif !empty(sy.updated_by) && sy.updated_by != a:vcs | |
call sy#verbose(printf('Signs already got updated by %s.', sy.updated_by), a:vcs) | |
return | |
elseif empty(sy.vcs) && sy.active | |
let sy.detecting -= 1 | |
endif | |
7 0.044704 0.000044 call sy#repo#get_diff_{a:vcs}(sy, a:exitval, a:diff) | |
7 0.000034 call setbufvar(a:bufnr, 'sy_job_id_'.a:vcs, 0) | |
FUNCTION airline#extensions#keymap#status() | |
Called 1563 times | |
Total time: 0.018210 | |
Self time: 0.018210 | |
count total (s) self (s) | |
1563 0.009077 if (get(g:, 'airline#extensions#keymap#enabled', 1) && has('keymap')) | |
1563 0.007780 return printf('%s', (!empty(&keymap) ? (g:airline_symbols.keymap . ' '. &keymap) : '')) | |
else | |
return '' | |
endif | |
FUNCTION ale#GetLocItemMessage() | |
Called 16 times | |
Total time: 0.000674 | |
Self time: 0.000674 | |
count total (s) self (s) | |
16 0.000021 let l:msg = a:format_string | |
16 0.000023 let l:severity = g:ale_echo_msg_warning_str | |
16 0.000028 let l:code = get(a:item, 'code', '') | |
16 0.000024 let l:type = get(a:item, 'type', 'E') | |
16 0.000029 let l:linter_name = get(a:item, 'linter_name', '') | |
16 0.000036 let l:code_repl = !empty(l:code) ? '\=submatch(1) . l:code . submatch(2)' : '' | |
16 0.000015 if l:type is# 'E' | |
15 0.000022 let l:severity = g:ale_echo_msg_error_str | |
15 0.000011 elseif l:type is# 'I' | |
let l:severity = g:ale_echo_msg_info_str | |
endif | |
" Replace special markers with certain information. | |
" \=l:variable is used to avoid escaping issues. | |
16 0.000087 let l:msg = substitute(l:msg, '\V%severity%', '\=l:severity', 'g') | |
16 0.000064 let l:msg = substitute(l:msg, '\V%linter%', '\=l:linter_name', 'g') | |
16 0.000170 let l:msg = substitute(l:msg, '\v\%([^\%]*)code([^\%]*)\%', l:code_repl, 'g') | |
" Replace %s with the text. | |
16 0.000057 let l:msg = substitute(l:msg, '\V%s', '\=a:item.text', 'g') | |
16 0.000013 return l:msg | |
FUNCTION ale#sign#SetSigns() | |
Called 10 times | |
Total time: 0.008734 | |
Self time: 0.002868 | |
count total (s) self (s) | |
10 0.000025 if !bufexists(str2nr(a:buffer)) | |
" Stop immediately when attempting to set signs for a buffer which | |
" does not exist. | |
return | |
endif | |
" Find the current markers | |
10 0.002733 0.000067 let [l:is_dummy_sign_set, l:current_sign_list] = ale#sign#FindCurrentSigns(a:buffer) | |
" Update the line numbers for items from before which may have moved. | |
10 0.000453 0.000057 call s:UpdateLineNumbers(a:buffer, l:current_sign_list, a:loclist) | |
" Group items after updating the line numbers. | |
10 0.000328 0.000045 let l:grouped_items = s:GroupLoclistItems(a:buffer, a:loclist) | |
" Build a map of current and new signs, with the lines as the keys. | |
10 0.001813 0.000051 let l:sign_map = s:BuildSignMap( a:buffer, l:current_sign_list, l:grouped_items,) | |
10 0.000810 0.000052 let l:command_list = ale#sign#GetSignCommands( a:buffer, l:is_dummy_sign_set, l:sign_map,) | |
" Change the sign column color if the option is on. | |
10 0.000017 if g:ale_change_sign_column_color && !empty(a:loclist) | |
highlight clear SignColumn | |
highlight link SignColumn ALESignColumnWithErrors | |
endif | |
32 0.000028 for l:command in l:command_list | |
22 0.002375 silent! execute l:command | |
22 0.000014 endfor | |
" Reset the sign column color when there are no more errors. | |
10 0.000016 if g:ale_change_sign_column_color && empty(a:loclist) | |
highlight clear SignColumn | |
highlight link SignColumn ALESignColumnWithoutErrors | |
endif | |
FUNCTION ale#job#Stop() | |
Called 10 times | |
Total time: 0.000240 | |
Self time: 0.000240 | |
count total (s) self (s) | |
10 0.000027 if !has_key(s:job_map, a:job_id) | |
return | |
endif | |
10 0.000028 if has('nvim') | |
" FIXME: NeoVim kills jobs on a timer, but will not kill any processes | |
" which are child processes on Unix. Some work needs to be done to | |
" kill child processes to stop long-running processes like pylint. | |
10 0.000024 silent! call jobstop(a:job_id) | |
10 0.000004 else | |
let l:job = s:job_map[a:job_id].job | |
" We must close the channel for reading the buffer if it is open | |
" when stopping a job. Otherwise, we will get errors in the status line. | |
if ch_status(job_getchannel(l:job)) is# 'open' | |
call ch_close_in(job_getchannel(l:job)) | |
endif | |
" Ask nicely for the job to stop. | |
call job_stop(l:job) | |
if ale#job#IsRunning(l:job) | |
" Set a 100ms delay for killing the job with SIGKILL. | |
let s:job_kill_timers[timer_start(100, function('s:KillHandler'))] = l:job | |
endif | |
endif | |
FUNCTION <SNR>86_get_position() | |
Called 1 time | |
Total time: 0.000026 | |
Self time: 0.000026 | |
count total (s) self (s) | |
1 0.000004 let filename_modifier = get(g:, 'test#filename_modifier', ':.') | |
1 0.000002 let position = {} | |
1 0.000009 let position['file'] = fnamemodify(a:path, filename_modifier) | |
1 0.000005 let position['line'] = a:path == expand('%') ? line('.') : 1 | |
1 0.000004 let position['col'] = a:path == expand('%') ? col('.') : 1 | |
1 0.000001 return position | |
FUNCTION ale#engine#InitBufferInfo() | |
Called 20 times | |
Total time: 0.000372 | |
Self time: 0.000372 | |
count total (s) self (s) | |
20 0.000090 if !has_key(g:ale_buffer_info, a:buffer) | |
" job_list will hold the list of job IDs | |
" active_linter_list will hold the list of active linter names | |
" loclist holds the loclist items after all jobs have completed. | |
" temporary_file_list holds temporary files to be cleaned up | |
" temporary_directory_list holds temporary directories to be cleaned up | |
let g:ale_buffer_info[a:buffer] = { 'job_list': [], 'active_linter_list': [], 'loclist': [], 'temporary_file_list': [], 'temporary_directory_list': [],} | |
return 1 | |
endif | |
20 0.000036 return 0 | |
FUNCTION <SNR>202_BufWinId() | |
Called 10 times | |
Total time: 0.000043 | |
Self time: 0.000043 | |
count total (s) self (s) | |
10 0.000039 return exists('*bufwinid') ? bufwinid(str2nr(a:buffer)) : 0 | |
FUNCTION <SNR>147_get_separator_change() | |
Called 835 times | |
Total time: 0.151281 | |
Self time: 0.004058 | |
count total (s) self (s) | |
835 0.151041 0.003818 return s:get_separator_change_with_end(a:new_group, a:old_group, a:end_group, a:end_group, a:sep_size, a:alt_sep_size) | |
FUNCTION test#ruby#m#test_file() | |
Called 6 times | |
Total time: 0.000071 | |
Self time: 0.000071 | |
count total (s) self (s) | |
6 0.000065 return a:file =~# g:test#ruby#m#file_pattern && test#base#executable('ruby#minitest') ==# 'm' | |
FUNCTION <SNR>81_WinDo() | |
Called 56 times | |
Total time: 0.407202 | |
Self time: 0.019153 | |
count total (s) self (s) | |
" avoid errors in CmdWin | |
56 0.000227 if exists('*getcmdwintype') && !empty(getcmdwintype()) | |
return | |
endif | |
" Work around Vim bug. | |
" See https://groups.google.com/forum/#!topic/vim_dev/LLTw8JV6wKg | |
56 0.000155 let curaltwin = winnr('#') ? winnr('#') : 1 | |
56 0.000100 let currwin=winnr() | |
56 0.000457 if &scrollopt =~# '\<jump\>' | |
56 0.000234 set scrollopt-=jump | |
56 0.000077 let l:restore = 'set scrollopt+=jump' | |
56 0.000022 endif | |
56 0.403622 0.015573 silent! execute 'keepjumps noautocmd windo ' . a:command | |
56 0.000713 silent! execute 'noautocmd ' . curaltwin . 'wincmd w' | |
56 0.000838 silent! execute 'noautocmd ' . currwin . 'wincmd w' | |
56 0.000171 if exists('l:restore') | |
56 0.000253 exe l:restore | |
56 0.000038 endif | |
FUNCTION airline#extensions#default#apply() | |
Called 183 times | |
Total time: 0.075986 | |
Self time: 0.008115 | |
count total (s) self (s) | |
183 0.000383 let winnr = a:context.winnr | |
183 0.000278 let active = a:context.active | |
183 0.001679 0.001082 if airline#util#getwinvar(winnr, 'airline_render_left', active || (!active && !g:airline_inactive_collapse)) | |
62 0.010881 0.000263 call s:build_sections(a:builder, a:context, s:layout[0]) | |
62 0.000029 else | |
121 0.005164 0.000559 let text = s:get_section(winnr, 'c') | |
121 0.000178 if empty(text) | |
let text = ' %f%m ' | |
endif | |
121 0.001240 0.000761 call a:builder.add_section('airline_c'.(a:context.bufnr), text) | |
121 0.000078 endif | |
183 0.007197 0.001249 call a:builder.split(s:get_section(winnr, 'gutter', '', '')) | |
183 0.001067 0.000625 if airline#util#getwinvar(winnr, 'airline_render_right', 1) | |
183 0.046054 0.000874 call s:build_sections(a:builder, a:context, s:layout[1]) | |
183 0.000103 endif | |
183 0.000120 return 1 | |
FUNCTION ale#FileTooLarge() | |
Called 125 times | |
Total time: 0.001548 | |
Self time: 0.001548 | |
count total (s) self (s) | |
125 0.000788 let l:max = getbufvar(a:buffer, 'ale_maximum_file_size', get(g:, 'ale_maximum_file_size', 0)) | |
125 0.000582 return l:max > 0 ? (line2byte(line('$') + 1) > l:max) : 0 | |
FUNCTION test#base#options() | |
Called 6 times | |
Total time: 0.000086 | |
Self time: 0.000086 | |
count total (s) self (s) | |
6 0.000022 let options = get(g:, 'test#'.a:runner.'#options') | |
6 0.000016 if empty(a:000) && type(options) == type('') | |
return split(options) | |
elseif !empty(a:000) && type(options) == type({}) | |
return split(get(options, a:000[0], '')) | |
else | |
6 0.000004 return [] | |
endif | |
FUNCTION <SNR>115_diagnostics_for_buffer() | |
Called 4248 times | |
Total time: 0.044006 | |
Self time: 0.044006 | |
count total (s) self (s) | |
4248 0.042419 return get(s:diagnostics, expand('%:p'), []) | |
FUNCTION <SNR>119_update_tabline() | |
Called 8 times | |
Total time: 0.000540 | |
Self time: 0.000195 | |
count total (s) self (s) | |
8 0.000021 if get(g:, 'airline#extensions#tabline#disable_refresh', 0) | |
return | |
endif | |
8 0.000028 let match = expand('<afile>') | |
8 0.000009 if pumvisible() | |
return | |
elseif !get(g:, 'airline#extensions#tabline#enabled', 0) | |
return | |
" return, if buffer matches ignore pattern or is directory (netrw) | |
elseif empty(match) || airline#util#ignore_buf(match) || isdirectory(expand("<afile>")) | |
3 0.000002 return | |
endif | |
5 0.000249 0.000016 call airline#util#doautocmd('BufMRUChange') | |
" sometimes, the tabline is not correctly updated see #1580 | |
" so force redraw here | |
5 0.000014 let &tabline = &tabline | |
FUNCTION airline#highlighter#get_highlight2() | |
Called 171 times | |
Total time: 0.056508 | |
Self time: 0.004303 | |
count total (s) self (s) | |
171 0.028339 0.001452 let fg = s:get_syn(a:fg[0], a:fg[1]) | |
171 0.024117 0.001463 let bg = s:get_syn(a:bg[0], a:bg[1]) | |
171 0.003899 0.001235 return s:get_array(fg, bg, a:000) | |
FUNCTION gutentags#remove_job() | |
Called 7 times | |
Total time: 0.000632 | |
Self time: 0.000509 | |
count total (s) self (s) | |
7 0.000019 let l:tags_file = s:update_in_progress[a:module][a:job_idx][0] | |
7 0.000018 call remove(s:update_in_progress[a:module], a:job_idx) | |
" Run the user callback for finished jobs. | |
7 0.000287 0.000197 silent doautocmd User GutentagsUpdated | |
" See if we had any more updates queued up for this. | |
7 0.000013 let l:qu_idx = -1 | |
7 0.000018 for qu_info in s:update_queue[a:module] | |
let l:qu_idx += 1 | |
if qu_info[0] == l:tags_file | |
break | |
endif | |
endfor | |
7 0.000007 if l:qu_idx >= 0 | |
let l:qu_info = s:update_queue[a:module][l:qu_idx] | |
call remove(s:update_queue[a:module], l:qu_idx) | |
if bufexists(l:qu_info[1]) | |
call gutentags#trace("Finished ".a:module." job, "."running queued update for '".l:tags_file."'.") | |
call s:update_tags(l:qu_info[1], a:module, l:qu_info[2], 2) | |
else | |
call gutentags#trace("Finished ".a:module." job, "."but skipping queued update for '".l:tags_file."' "."because originating buffer doesn't exist anymore.") | |
endif | |
else | |
7 0.000065 0.000031 call gutentags#trace("Finished ".a:module." job.") | |
7 0.000004 endif | |
FUNCTION test#python#nose#executable() | |
Called 3 times | |
Total time: 0.000003 | |
Self time: 0.000003 | |
count total (s) self (s) | |
3 0.000003 return 'nosetests' | |
FUNCTION ale#job#ValidateArguments() | |
Called 10 times | |
Total time: 0.000083 | |
Self time: 0.000083 | |
count total (s) self (s) | |
10 0.000040 if a:options.mode isnot# 'nl' && a:options.mode isnot# 'raw' | |
throw 'Invalid mode: ' . a:options.mode | |
endif | |
FUNCTION airline#highlighter#add_separator() | |
Called 2242 times | |
Total time: 1.756630 | |
Self time: 0.022161 | |
count total (s) self (s) | |
2242 0.009246 let s:separators[a:from.a:to] = [a:from, a:to, a:inverse] | |
2242 1.746648 0.012179 call <sid>exec_separator({}, a:from, a:to, a:inverse, '') | |
FUNCTION test#php#phpunit#test_file() | |
Called 6 times | |
Total time: 0.000072 | |
Self time: 0.000072 | |
count total (s) self (s) | |
6 0.000068 return a:file =~# g:test#php#phpunit#file_pattern | |
FUNCTION ncm2_path#on_complete_cwdpath() | |
Called 3 times | |
Total time: 0.000190 | |
Self time: 0.000031 | |
count total (s) self (s) | |
3 0.000188 0.000030 call g:ncm2_path#proc.try_notify('on_complete_cwdpath', a:ctx, g:ncm2_path#path_pattern, getcwd()) | |
FUNCTION ale#command#FormatCommand() | |
Called 10 times | |
Total time: 0.001979 | |
Self time: 0.001082 | |
count total (s) self (s) | |
10 0.000025 let l:temporary_file = '' | |
10 0.000021 let l:command = a:command | |
" First replace all uses of %%, used for literal percent characters, | |
" with an ugly string. | |
10 0.000069 let l:command = substitute(l:command, '%%', '<<PERCENTS>>', 'g') | |
" Replace %e with the escaped executable, if available. | |
10 0.000052 if !empty(a:executable) && l:command =~# '%e' | |
let l:command = substitute(l:command, '%e', '\=ale#Escape(a:executable)', 'g') | |
endif | |
" Replace all %s occurrences in the string with the name of the current | |
" file. | |
10 0.000027 if l:command =~# '%s' | |
10 0.000195 let l:filename = fnamemodify(bufname(a:buffer), ':p') | |
10 0.000323 0.000144 let l:command = substitute(l:command, '%s', '\=ale#Escape(l:filename)', 'g') | |
10 0.000010 endif | |
10 0.000031 if l:command =~# '%t' | |
" Create a temporary filename, <temp_dir>/<original_basename> | |
" The file itself will not be created by this function. | |
let l:temporary_file = s:TemporaryFilename(a:buffer) | |
let l:command = substitute(l:command, '%t', '\=ale#Escape(l:temporary_file)', 'g') | |
endif | |
" Finish formatting so %% becomes %. | |
10 0.000071 let l:command = substitute(l:command, '<<PERCENTS>>', '%', 'g') | |
10 0.000037 if a:pipe_file_if_needed && empty(l:temporary_file) | |
" If we are to send the Vim buffer to a command, we'll do it | |
" in the shell. We'll write out the file to a temporary file, | |
" and then read it back in, in the shell. | |
10 0.000622 0.000065 let l:temporary_file = s:TemporaryFilename(a:buffer) | |
10 0.000232 0.000072 let l:command = l:command . ' < ' . ale#Escape(l:temporary_file) | |
10 0.000008 endif | |
10 0.000031 return [l:temporary_file, l:command] | |
FUNCTION LanguageClient_runSync() | |
Called 1 time | |
Total time: 0.110284 | |
Self time: 0.101482 | |
count total (s) self (s) | |
1 0.000018 let s:LanguageClient_runSync_outputs = [] | |
1 0.000017 let l:arguments = add(a:000[:], s:LanguageClient_runSync_outputs) | |
1 0.008570 0.000070 call call(a:fn, l:arguments) | |
2 0.000032 while len(s:LanguageClient_runSync_outputs) == 0 | |
1 0.101519 0.101252 sleep 100m | |
1 0.000012 endwhile | |
1 0.000023 let l:output = remove(s:LanguageClient_runSync_outputs, 0) | |
1 0.000070 0.000034 return s:HandleOutput(l:output, v:true) | |
FUNCTION <SNR>145_HandleMessage() | |
Called 189 times | |
Total time: 2.465652 | |
Self time: 1.282707 | |
count total (s) self (s) | |
189 0.001015 if a:event ==# 'stdout' | |
795 0.001827 while len(a:lines) > 0 | |
606 0.001859 let l:line = remove(a:lines, 0) | |
606 0.015544 if l:line ==# '' | |
286 0.000352 continue | |
elseif s:content_length == 0 | |
139 0.002215 let s:content_length = str2nr(substitute(l:line, '.*Content-Length:', '', '')) | |
139 0.000162 continue | |
endif | |
181 0.086515 let s:input .= strpart(l:line, 0, s:content_length) | |
181 0.019672 if s:content_length < strlen(l:line) | |
call insert(a:lines, strpart(l:line, s:content_length), 0) | |
let s:content_length = 0 | |
else | |
181 0.013899 let s:content_length = s:content_length - strlen(l:line) | |
181 0.000119 endif | |
181 0.000183 if s:content_length > 0 | |
42 0.000292 continue | |
endif | |
139 0.000133 try | |
139 0.928787 let l:message = json_decode(s:input) | |
139 0.000439 if type(l:message) !=# s:TYPE.dict | |
throw 'Messsage is not dict.' | |
endif | |
139 0.000090 catch | |
call s:Debug('Error decoding message: ' . string(v:exception) . ' Message: ' . s:input) | |
continue | |
finally | |
139 0.000250 let s:input = '' | |
139 0.000090 endtry | |
139 0.000247 if has_key(l:message, 'method') | |
119 0.000291 let l:id = get(l:message, 'id', v:null) | |
119 0.000203 let l:method = get(l:message, 'method') | |
119 0.000195 let l:params = get(l:message, 'params') | |
119 0.000081 try | |
119 0.000124 if l:method ==# 'execute' | |
27 0.000029 for l:cmd in l:params | |
21 0.024655 0.024653 execute l:cmd | |
21 0.000021 endfor | |
6 0.000041 let l:result = 0 | |
6 0.000002 else | |
113 0.000338 let l:params = type(l:params) == s:TYPE.list ? l:params : [l:params] | |
113 0.146605 0.136891 let l:result = call(l:method, l:params) | |
113 0.000102 endif | |
119 0.000186 if l:id != v:null | |
89 0.008735 0.006924 call LanguageClient#Write(json_encode({ 'jsonrpc': '2.0', 'id': l:id, 'result': l:result, })) | |
89 0.000089 endif | |
119 0.000214 catch | |
let l:exception = v:exception | |
if l:id != v:null | |
try | |
call LanguageClient#Write(json_encode({ 'jsonrpc': '2.0', 'id': l:id, 'error': { 'code': -32603, 'message': string(v:exception) } })) | |
catch | |
" TODO | |
endtry | |
endif | |
call s:Debug(string(l:exception)) | |
endtry | |
119 0.000322 elseif has_key(l:message, 'result') || has_key(l:message, 'error') | |
20 0.000043 let l:id = get(l:message, 'id') | |
20 0.000088 let l:Handle = get(s:handlers, l:id) | |
20 0.000045 unlet s:handlers[l:id] | |
20 0.000039 let l:type = type(l:Handle) | |
20 0.000035 if l:type == s:TYPE.funcref || l:type == s:TYPE.string | |
19 1.178584 0.007166 call call(l:Handle, [l:message]) | |
19 0.000031 elseif l:type == s:TYPE.list | |
1 0.000003 call add(l:Handle, l:message) | |
1 0.000002 elseif l:type == s:TYPE.string && exists(l:Handle) | |
let l:outputs = eval(l:Handle) | |
call add(l:outputs, l:message) | |
else | |
call s:Echoerr('Unknown Handle type: ' . string(l:Handle)) | |
endif | |
20 0.000008 else | |
call s:Echoerr('Unknown message: ' . string(l:message)) | |
endif | |
139 0.000124 endwhile | |
189 0.000199 elseif a:event ==# 'stderr' | |
call s:Echoerr('LanguageClient stderr: ' . string(a:lines)) | |
elseif a:event ==# 'exit' | |
if type(a:lines) == type(0) && a:lines == 0 | |
return | |
endif | |
call s:Debug('LanguageClient exited with: ' . string(a:lines)) | |
else | |
call s:Debug('LanguageClient unknown event: ' . a:event) | |
endif | |
FUNCTION airline#util#wrap() | |
Called 13092 times | |
Total time: 0.061693 | |
Self time: 0.061693 | |
count total (s) self (s) | |
13092 0.028557 if a:minwidth > 0 && winwidth(0) < a:minwidth | |
return '' | |
endif | |
13092 0.012130 return a:text | |
FUNCTION test#base#executable() | |
Called 3 times | |
Total time: 0.000032 | |
Self time: 0.000029 | |
count total (s) self (s) | |
3 0.000009 if exists('g:test#'.a:runner.'#executable') | |
return g:test#{a:runner}#executable | |
else | |
3 0.000017 0.000014 return test#{a:runner}#executable() | |
endif | |
FUNCTION test#viml#vader#test_file() | |
Called 6 times | |
Total time: 0.000049 | |
Self time: 0.000049 | |
count total (s) self (s) | |
6 0.000042 return a:file =~# g:test#viml#vader#file_pattern | |
FUNCTION ale_linters#python#flake8#GetExecutable() | |
Called 30 times | |
Total time: 0.074148 | |
Self time: 0.000963 | |
count total (s) self (s) | |
30 0.001261 0.000383 if (ale#Var(a:buffer, 'python_auto_pipenv') || ale#Var(a:buffer, 'python_flake8_auto_pipenv')) && ale#python#PipenvPresent(a:buffer) | |
return 'pipenv' | |
endif | |
30 0.000999 0.000161 if !s:UsingModule(a:buffer) | |
30 0.071704 0.000235 return ale#python#FindExecutable(a:buffer, 'python_flake8', ['flake8']) | |
endif | |
return ale#Var(a:buffer, 'python_flake8_executable') | |
FUNCTION sy#start() | |
Called 7 times | |
Total time: 0.120513 | |
Self time: 0.001139 | |
count total (s) self (s) | |
7 0.000012 if g:signify_locked | |
call sy#verbose('Locked.') | |
return | |
endif | |
7 0.000171 let sy_path = resolve(expand('%:p')) | |
7 0.000029 if has('win32') | |
let sy_path = substitute(sy_path, '\v^(\w):\\\\', '\1:\\', '') | |
endif | |
7 0.000312 0.000039 if s:skip(sy_path) | |
call sy#verbose('Skip file: '. sy_path) | |
if exists('b:sy') | |
call sy#sign#remove_all_signs(bufnr('')) | |
unlet! b:sy | |
endif | |
return | |
endif | |
7 0.000037 if !exists('b:sy') || b:sy.path != sy_path | |
call sy#verbose('Register new file: '. sy_path) | |
let b:sy = { 'path': sy_path, 'buffer': bufnr(''), 'active': 0, 'detecting': 0, 'vcs': [], 'hunks': [], 'signid': 0x100, 'updated_by': '', 'stats': [-1, -1, -1], 'info': { 'dir': fnamemodify(sy_path, ':p:h'), 'path': sy#util#escape(sy_path), 'file': sy#util#escape(fnamemodify(sy_path, ':t')) }} | |
if get(g:, 'signify_disable_by_default') | |
call sy#verbose('Disabled by default.') | |
return | |
endif | |
let b:sy.active = 1 | |
call sy#repo#detect() | |
elseif has('vim_starting') | |
call sy#verbose("Don't run Sy more than once during startup.") | |
return | |
elseif !b:sy.active | |
call sy#verbose('Inactive buffer.') | |
return | |
elseif empty(b:sy.vcs) | |
if get(b:sy, 'retry') | |
let b:sy.retry = 0 | |
call sy#verbose('Redetecting VCS.') | |
call sy#repo#detect() | |
else | |
if get(b:sy, 'detecting') | |
call sy#verbose('Detection is already in progress.') | |
else | |
call sy#verbose('No VCS found. Disabling.') | |
call sy#disable() | |
endif | |
endif | |
else | |
14 0.000035 for vcs in b:sy.vcs | |
7 0.000034 let job_id = get(b:, 'sy_job_id_'. vcs) | |
7 0.000021 if type(job_id) != type(0) || job_id > 0 | |
call sy#verbose('Update is already in progress.', vcs) | |
else | |
7 0.000097 0.000037 call sy#verbose('Updating signs.', vcs) | |
7 0.119168 0.000127 call sy#repo#get_diff_start(vcs) | |
7 0.000017 endif | |
7 0.000017 endfor | |
7 0.000004 endif | |
FUNCTION <SNR>174_indent_spaces() | |
Called 6 times | |
Total time: 0.000040 | |
Self time: 0.000040 | |
count total (s) self (s) | |
6 0.000018 if &softtabstop > 0 | |
6 0.000008 return &softtabstop | |
elseif &softtabstop < 0 && &shiftwidth > 0 | |
return &shiftwidth | |
endif | |
return &tabstop | |
FUNCTION gutentags#ctags#init() | |
Called 5 times | |
Total time: 0.000348 | |
Self time: 0.000149 | |
count total (s) self (s) | |
" Figure out the path to the tags file. | |
" Check the old name for this option, too, before falling back to the | |
" globally defined name. | |
5 0.000020 let l:tagfile = getbufvar("", 'gutentags_ctags_tagfile',getbufvar("", 'gutentags_tagfile', g:gutentags_ctags_tagfile)) | |
5 0.000224 0.000026 let b:gutentags_files['ctags'] = gutentags#get_cachefile(a:project_root, l:tagfile) | |
" Set the tags file for Vim to use. | |
5 0.000006 if g:gutentags_ctags_auto_set_tags | |
5 0.000038 execute 'setlocal tags^=' . fnameescape(b:gutentags_files['ctags']) | |
5 0.000002 endif | |
" Check if the ctags executable exists. | |
5 0.000006 if s:did_check_exe == 0 | |
if g:gutentags_enabled && executable(expand(g:gutentags_ctags_executable, 1)) == 0 | |
let g:gutentags_enabled = 0 | |
echoerr "Executable '".g:gutentags_ctags_executable."' can't be found. "."Gutentags will be disabled. You can re-enable it by "."setting g:gutentags_enabled back to 1." | |
endif | |
let s:did_check_exe = 1 | |
endif | |
FUNCTION <SNR>194_InvokeChain() | |
Called 10 times | |
Total time: 0.244865 | |
Self time: 0.000391 | |
count total (s) self (s) | |
10 0.052380 0.000095 let l:options = ale#engine#ProcessChain(a:buffer, a:linter, a:chain_index, a:input) | |
10 0.000037 let l:options.executable = a:executable | |
10 0.192392 0.000203 return s:RunJob(l:options) | |
FUNCTION <SNR>165_skip() | |
Called 7 times | |
Total time: 0.000273 | |
Self time: 0.000273 | |
count total (s) self (s) | |
7 0.000062 if &diff || !filereadable(a:path) | |
return 1 | |
endif | |
7 0.000024 if exists('g:signify_skip_filetype') | |
if has_key(g:signify_skip_filetype, &filetype) | |
return 1 | |
elseif has_key(g:signify_skip_filetype, 'help') && (&buftype == 'help') | |
return 1 | |
endif | |
endif | |
7 0.000023 if exists('g:signify_skip_filename') && has_key(g:signify_skip_filename, a:path) | |
return 1 | |
endif | |
7 0.000014 if exists('g:signify_skip_filename_pattern') | |
for pattern in g:signify_skip_filename_pattern | |
if a:path =~ pattern | |
return 1 | |
endif | |
endfor | |
endif | |
7 0.000006 return 0 | |
FUNCTION denite#helper#_parse_options_args() | |
Called 5 times | |
Total time: 0.009283 | |
Self time: 0.000861 | |
count total (s) self (s) | |
5 0.000035 let _ = [] | |
5 0.008423 0.000156 let [args, options] = s:parse_options(a:cmdline) | |
10 0.000027 for arg in args | |
" Add source name. | |
5 0.000080 let source_name = matchstr(arg, '^[^:]*') | |
5 0.000035 let source_arg = arg[len(source_name)+1 :] | |
5 0.000015 let source_args = [] | |
5 0.000015 if source_arg !=# '' | |
4 0.000147 0.000126 for s in split(source_arg, s:re_unquoted_match('\\\@<!:'), 1) | |
3 0.000191 0.000056 call add(source_args, s:remove_quote_pairs(s)) | |
3 0.000006 endfor | |
1 0.000002 endif | |
5 0.000045 call add(_, { 'name': source_name, 'args': source_args }) | |
5 0.000007 endfor | |
5 0.000016 return [_, options] | |
FUNCTION ale#python#FindVirtualenv() | |
Called 30 times | |
Total time: 0.069351 | |
Self time: 0.040927 | |
count total (s) self (s) | |
210 0.005652 0.001043 for l:path in ale#path#Upwards(expand('#' . a:buffer . ':p:h')) | |
" Skip empty path components returned in MSYS. | |
180 0.000393 if empty(l:path) | |
continue | |
endif | |
1440 0.005318 0.002753 for l:dirname in ale#Var(a:buffer, 'virtualenv_dir_names') | |
1260 0.020711 0.009617 let l:venv_dir = ale#path#Simplify( join([l:path, l:dirname], s:sep)) | |
1260 0.020585 0.010428 let l:script_filename = ale#path#Simplify( join([l:venv_dir, s:bin_dir, 'activate'], s:sep)) | |
1260 0.008436 if filereadable(l:script_filename) | |
return l:venv_dir | |
endif | |
1260 0.000890 endfor | |
180 0.000125 endfor | |
30 0.000100 return $VIRTUAL_ENV | |
FUNCTION denite#initialize() | |
Called 5 times | |
Total time: 0.000153 | |
Self time: 0.000054 | |
count total (s) self (s) | |
5 0.000149 0.000051 return denite#init#_initialize() | |
FUNCTION airline#util#getwinvar() | |
Called 1927 times | |
Total time: 0.005577 | |
Self time: 0.005577 | |
count total (s) self (s) | |
1927 0.005000 return getwinvar(a:winnr, a:key, a:def) | |
FUNCTION FugitiveDetect() | |
Called 5 times | |
Total time: 0.003554 | |
Self time: 0.000091 | |
count total (s) self (s) | |
5 0.000011 if exists('b:git_dir') && b:git_dir =~# '^$\|/$\|^fugitive:' | |
unlet b:git_dir | |
endif | |
5 0.000006 if !exists('b:git_dir') | |
5 0.000569 0.000019 let dir = FugitiveExtractGitDir(a:path) | |
5 0.000004 if dir !=# '' | |
5 0.000006 let b:git_dir = dir | |
5 0.000002 endif | |
5 0.000002 endif | |
5 0.000007 if exists('b:git_dir') | |
5 0.002932 0.000019 return fugitive#Init() | |
endif | |
FUNCTION airline#extensions#tabline#buffers#invalidate() | |
Called 8 times | |
Total time: 0.000015 | |
Self time: 0.000015 | |
count total (s) self (s) | |
8 0.000012 let s:current_bufnr = -1 | |
FUNCTION <SNR>11_SelectJavascript() | |
Called 5 times | |
Total time: 0.000028 | |
Self time: 0.000028 | |
count total (s) self (s) | |
5 0.000020 if getline(1) =~# '^#!.*/bin/\%(env\s\+\)\?node\>' | |
set ft=javascript | |
endif | |
FUNCTION <SNR>113_update_git_branch() | |
Called 1563 times | |
Total time: 0.196893 | |
Self time: 0.043505 | |
count total (s) self (s) | |
1563 0.012310 0.006206 if !airline#util#has_fugitive() | |
let s:vcs_config['git'].branch = '' | |
return | |
endif | |
1563 0.169194 0.021910 let s:vcs_config['git'].branch = exists("*FugitiveHead") ? FugitiveHead(s:sha1size) : fugitive#head(s:sha1size) | |
1563 0.004918 if s:vcs_config['git'].branch is# 'master' && winwidth(0) < 81 | |
" Shorten default a bit | |
let s:vcs_config['git'].branch='mas' | |
endif | |
FUNCTION test#run() | |
Called 3 times | |
Total time: 0.236285 | |
Self time: 0.000499 | |
count total (s) self (s) | |
3 0.000219 0.000089 call s:before_run() | |
3 0.000295 0.000054 let alternate_file = s:alternate_file() | |
3 0.016743 0.000045 if test#test_file(expand('%')) | |
1 0.000035 0.000008 let position = s:get_position(expand('%')) | |
1 0.000008 let g:test#last_position = position | |
1 0.000004 elseif !empty(alternate_file) && test#test_file(alternate_file) && (!exists('g:test#last_position') || alternate_file !=# g:test#last_position['file']) | |
let position = s:get_position(alternate_file) | |
elseif exists('g:test#last_position') | |
2 0.000004 let position = g:test#last_position | |
2 0.000001 else | |
call s:echo_failure('Not a test file') | return | |
endif | |
3 0.005633 0.000016 let runner = test#determine_runner(position['file']) | |
3 0.000077 0.000023 let args = test#base#build_position(runner, a:type, position) | |
3 0.000006 let args = a:arguments + args | |
3 0.000065 0.000016 let args = test#base#options(runner, a:type) + args | |
3 0.000009 if type(get(g:, 'test#strategy')) == type({}) | |
let strategy = get(g:test#strategy, a:type) | |
call test#execute(runner, args, strategy) | |
else | |
3 0.213010 0.000079 call test#execute(runner, args) | |
3 0.000002 endif | |
3 0.000079 0.000039 call s:after_run() | |
FUNCTION LSP#filename() | |
Called 112 times | |
Total time: 0.006848 | |
Self time: 0.006848 | |
count total (s) self (s) | |
112 0.006719 return expand('%:p') | |
FUNCTION airline#themes#get_highlight2() | |
Called 171 times | |
Total time: 0.058855 | |
Self time: 0.002347 | |
count total (s) self (s) | |
171 0.058737 0.002230 return call('airline#highlighter#get_highlight2', [a:fg, a:bg] + a:000) | |
FUNCTION <SNR>217_external_sign_present() | |
Called 27 times | |
Total time: 0.000217 | |
Self time: 0.000217 | |
count total (s) self (s) | |
27 0.000061 if has_key(a:sy.external, a:line) | |
if has_key(a:sy.internal, a:line) | |
" Remove Sy signs from lines with other signs. | |
execute 'sign unplace' a:sy.internal[a:line].id 'buffer='.a:sy.buffer | |
endif | |
return 1 | |
endif | |
FUNCTION ale#path#BufferCdString() | |
Called 10 times | |
Total time: 0.000533 | |
Self time: 0.000239 | |
count total (s) self (s) | |
10 0.000514 0.000220 return ale#path#CdString(fnamemodify(bufname(a:buffer), ':p:h')) | |
FUNCTION test#base#build_position() | |
Called 3 times | |
Total time: 0.000054 | |
Self time: 0.000018 | |
count total (s) self (s) | |
3 0.000053 0.000017 return test#{a:runner}#build_position(a:type, a:position) | |
FUNCTION signature#mark#GetList() | |
Called 82 times | |
Total time: 0.097081 | |
Self time: 0.097081 | |
count total (s) self (s) | |
" Arguments: mode = 'used' : Returns list of [ [used marks, line no., buf no.] ] | |
" 'free' : Returns list of [ free marks ] | |
" scope = 'buf_curr' : Limits scope to current buffer i.e used/free marks in current buffer | |
" 'buf_all' : Set scope to all buffers i.e used/free marks from all buffers | |
" [type] = 'global' : Return only global marks | |
82 0.000152 let l:marks_list = [] | |
82 0.000172 let l:line_tot = line('$') | |
82 0.000216 let l:buf_curr = bufnr('%') | |
82 0.000188 let l:type = (a:0 ? a:1 : "") | |
" Respect order specified in g:SignatureIncludeMarks | |
4346 0.018420 for i in split(b:SignatureIncludeMarks, '\zs') | |
4264 0.015897 if (i =~# "[A-Z]") | |
2132 0.006804 let [ l:buf, l:line, l:col, l:off ] = getpos( "'" . i ) | |
2132 0.005318 let l:marks_list = add(l:marks_list, [i, l:line, l:buf]) | |
2132 0.001728 elseif (l:type !=? "global") | |
2132 0.007870 let l:marks_list = add(l:marks_list, [i, line("'" .i), l:buf_curr]) | |
2132 0.000967 endif | |
4264 0.001810 endfor | |
82 0.000134 if (a:mode ==? 'used') | |
41 0.000055 if (a:scope ==? 'buf_curr') | |
41 0.003613 call filter( l:marks_list, '(v:val[2] == l:buf_curr) && (v:val[1] > 0)' ) | |
41 0.000024 else | |
call filter( l:marks_list, 'v:val[1] > 0' ) | |
endif | |
41 0.000019 else | |
41 0.000071 if (a:scope ==? 'buf_all') | |
call filter( l:marks_list, 'v:val[1] == 0' ) | |
else | |
41 0.002886 call filter( l:marks_list, '(v:val[1] == 0) || (v:val[2] != l:buf_curr)' ) | |
41 0.000031 endif | |
41 0.012247 call map( l:marks_list, 'v:val[0]' ) | |
41 0.000037 endif | |
82 0.000110 return l:marks_list | |
FUNCTION LanguageClient_textDocument_rename() | |
Called 3 times | |
Total time: 0.006868 | |
Self time: 0.000410 | |
count total (s) self (s) | |
3 0.006853 0.000395 return call('LanguageClient#textDocument_rename', a:000) | |
FUNCTION <SNR>144_DirCommitFile() | |
Called 5 times | |
Total time: 0.000103 | |
Self time: 0.000076 | |
count total (s) self (s) | |
5 0.000088 0.000061 let vals = matchlist(s:Slash(a:path), '\c^fugitive:\%(//\)\=\(.\{-\}\)\%(//\|::\)\(\x\{40\}\|[0-3]\)\(/.*\)\=$') | |
5 0.000006 if empty(vals) | |
5 0.000005 return ['', '', ''] | |
endif | |
return vals[1:3] | |
FUNCTION <SNR>202_ShouldOpen() | |
Called 20 times | |
Total time: 0.000344 | |
Self time: 0.000189 | |
count total (s) self (s) | |
20 0.000241 0.000086 let l:val = ale#Var(a:buffer, 'open_list') | |
20 0.000046 let l:saved = getbufvar(a:buffer, 'ale_save_event_fired', 0) | |
20 0.000034 return l:val is 1 || (l:val is# 'on_save' && l:saved) | |
FUNCTION airline#highlighter#highlight_modified_inactive() | |
Called 139 times | |
Total time: 0.069229 | |
Self time: 0.004198 | |
count total (s) self (s) | |
139 0.000561 if getbufvar(a:bufnr, '&modified') | |
28 0.000212 let colors = exists('g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_c') ? g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_c : [] | |
28 0.000014 else | |
111 0.001115 let colors = exists('g:airline#themes#{g:airline_theme}#palette.inactive.airline_c') ? g:airline#themes#{g:airline_theme}#palette.inactive.airline_c : [] | |
111 0.000070 endif | |
139 0.000219 if !empty(colors) | |
139 0.066012 0.000981 call airline#highlighter#exec('airline_c'.(a:bufnr).'_inactive', colors) | |
139 0.000065 endif | |
FUNCTION <SNR>144_RehighlightBlame() | |
Called 10 times | |
Total time: 0.000099 | |
Self time: 0.000099 | |
count total (s) self (s) | |
10 0.000032 for [hash, cterm] in items(s:hash_colors) | |
if !empty(cterm) || has('gui_running') || has('termguicolors') && &termguicolors | |
exe 'hi FugitiveblameHash'.hash.' guifg=#'.hash.get(s:hash_colors, hash, '') | |
else | |
exe 'hi link FugitiveblameHash'.hash.' Identifier' | |
endif | |
endfor | |
FUNCTION <SNR>194_RunJob() | |
Called 10 times | |
Total time: 0.192189 | |
Self time: 0.003411 | |
count total (s) self (s) | |
10 0.000033 let l:command = a:options.command | |
10 0.000022 if empty(l:command) | |
return 0 | |
endif | |
10 0.000028 let l:executable = a:options.executable | |
10 0.000024 let l:buffer = a:options.buffer | |
10 0.000021 let l:linter = a:options.linter | |
10 0.000027 let l:output_stream = a:options.output_stream | |
10 0.000027 let l:next_chain_index = a:options.next_chain_index | |
10 0.000025 let l:read_buffer = a:options.read_buffer | |
10 0.000039 let l:info = g:ale_buffer_info[l:buffer] | |
10 0.002095 0.000115 let [l:temporary_file, l:command] = ale#command#FormatCommand( l:buffer, l:executable, l:command, l:read_buffer,) | |
10 0.005461 0.000566 if s:CreateTemporaryFileForJob(l:buffer, l:temporary_file) | |
" If a temporary filename has been formatted in to the command, then | |
" we do not need to send the Vim buffer to the command. | |
10 0.000031 let l:read_buffer = 0 | |
10 0.000011 endif | |
" Add a newline to commands which need it. | |
" This is only used for Flow for now, and is not documented. | |
10 0.000023 if l:linter.add_newline | |
if has('win32') | |
let l:command = l:command . '; echo.' | |
else | |
let l:command = l:command . '; echo' | |
endif | |
endif | |
10 0.000877 0.000095 let l:command = ale#job#PrepareCommand(l:buffer, l:command) | |
10 0.000102 let l:job_options = { 'mode': 'nl', 'exit_cb': function('s:HandleExit'),} | |
10 0.000026 if l:output_stream is# 'stderr' | |
let l:job_options.err_cb = function('s:GatherOutput') | |
elseif l:output_stream is# 'both' | |
10 0.000058 let l:job_options.out_cb = function('s:GatherOutput') | |
10 0.000039 let l:job_options.err_cb = function('s:GatherOutput') | |
10 0.000009 else | |
let l:job_options.out_cb = function('s:GatherOutput') | |
endif | |
10 0.000037 if get(g:, 'ale_run_synchronously') == 1 | |
" Find a unique Job value to use, which will be the same as the ID for | |
" running commands synchronously. This is only for test code. | |
let l:job_id = len(s:job_info_map) + 1 | |
while has_key(s:job_info_map, l:job_id) | |
let l:job_id += 1 | |
endwhile | |
else | |
10 0.179949 0.000208 let l:job_id = ale#job#Start(l:command, l:job_options) | |
10 0.000009 endif | |
10 0.000018 let l:status = 'failed' | |
" Only proceed if the job is being run. | |
10 0.000009 if l:job_id | |
" Add the job to the list of jobs, so we can track them. | |
10 0.000068 call add(l:info.job_list, l:job_id) | |
10 0.000058 if index(l:info.active_linter_list, l:linter.name) < 0 | |
10 0.000020 call add(l:info.active_linter_list, l:linter.name) | |
10 0.000005 endif | |
10 0.000013 let l:status = 'started' | |
" Store the ID for the job in the map to read back again. | |
10 0.000112 let s:job_info_map[l:job_id] = { 'linter': l:linter, 'buffer': l:buffer, 'executable': l:executable, 'output': [], 'next_chain_index': l:next_chain_index,} | |
10 0.001299 0.000683 silent doautocmd <nomodeline> User ALEJobStarted | |
10 0.000010 endif | |
10 0.000018 if g:ale_history_enabled | |
10 0.000896 0.000133 call ale#history#Add(l:buffer, l:status, l:job_id, l:command) | |
10 0.000005 endif | |
10 0.000041 if get(g:, 'ale_run_synchronously') == 1 | |
" Run a command synchronously if this test option is set. | |
let s:job_info_map[l:job_id].output = systemlist( type(l:command) is v:t_list ? join(l:command[0:1]) . ' ' . ale#Escape(l:command[2]) : l:command) | |
call l:job_options.exit_cb(l:job_id, v:shell_error) | |
endif | |
10 0.000024 return l:job_id != 0 | |
FUNCTION airline#highlighter#load_theme() | |
Called 19 times | |
Total time: 7.277207 | |
Self time: 0.001261 | |
count total (s) self (s) | |
19 0.000048 if pumvisible() | |
return | |
endif | |
43 0.000340 for winnr in filter(range(1, winnr('$')), 'v:val != winnr()') | |
24 0.016528 0.000204 call airline#highlighter#highlight_modified_inactive(winbufnr(winnr)) | |
24 0.000027 endfor | |
19 3.379471 0.000173 call airline#highlighter#highlight(['inactive']) | |
19 0.000112 if getbufvar( bufnr('%'), '&modified' ) | |
3 1.000003 0.000020 call airline#highlighter#highlight(['normal', 'modified']) | |
3 0.000001 else | |
16 2.880449 0.000106 call airline#highlighter#highlight(['normal']) | |
16 0.000007 endif | |
FUNCTION <SNR>71_default_highlight() | |
Called 10 times | |
Total time: 0.000410 | |
Self time: 0.000410 | |
count total (s) self (s) | |
10 0.000405 highlight default link HighlightedyankRegion IncSearch | |
FUNCTION airline#init#gui_mode() | |
Called 10 times | |
Total time: 0.000177 | |
Self time: 0.000177 | |
count total (s) self (s) | |
10 0.000166 return has('gui_running') || (has("termguicolors") && &termguicolors == 1) ? 'gui' : 'cterm' | |
FUNCTION airline#extensions#branch#get_head() | |
Called 1563 times | |
Total time: 0.904381 | |
Self time: 0.034923 | |
count total (s) self (s) | |
1563 0.883462 0.014003 let head = airline#extensions#branch#head() | |
1563 0.005367 let empty_message = get(g:, 'airline#extensions#branch#empty_message', '') | |
1563 0.005596 let symbol = get(g:, 'airline#extensions#branch#symbol', g:airline_symbols.branch) | |
1563 0.008563 return empty(head) ? empty_message : printf('%s%s', empty(symbol) ? '' : symbol.(g:airline_symbols.space), head) | |
FUNCTION test#python#nose#test_file() | |
Called 6 times | |
Total time: 0.000084 | |
Self time: 0.000084 | |
count total (s) self (s) | |
6 0.000057 if fnamemodify(a:file, ':t') =~# g:test#python#nose#file_pattern | |
4 0.000009 if exists('g:test#python#runner') | |
4 0.000005 return g:test#python#runner ==# 'nose' | |
else | |
return executable('nosetests') | |
endif | |
endif | |
FUNCTION gutentags#get_project_root() | |
Called 5 times | |
Total time: 0.000376 | |
Self time: 0.000301 | |
count total (s) self (s) | |
5 0.000008 if g:gutentags_project_root_finder != '' | |
return call(g:gutentags_project_root_finder, [a:path]) | |
endif | |
5 0.000060 0.000020 let l:path = gutentags#stripslash(a:path) | |
5 0.000006 let l:previous_path = "" | |
5 0.000016 let l:markers = g:gutentags_project_root[:] | |
5 0.000008 if exists('g:ctrlp_root_markers') | |
for crm in g:ctrlp_root_markers | |
if index(l:markers, crm) < 0 | |
call add(l:markers, crm) | |
endif | |
endfor | |
endif | |
5 0.000008 while l:path != l:previous_path | |
5 0.000009 for root in l:markers | |
5 0.000045 if !empty(globpath(l:path, root, 1)) | |
5 0.000024 let l:proj_dir = simplify(fnamemodify(l:path, ':p')) | |
5 0.000051 0.000017 let l:proj_dir = gutentags#stripslash(l:proj_dir) | |
5 0.000006 if l:proj_dir == '' | |
call gutentags#trace("Found project marker '" . root ."' at the root of your file-system! " ." That's probably wrong, disabling " ."gutentags for this file...",1) | |
call gutentags#throw("Marker found at root, aborting.") | |
endif | |
10 0.000012 for ign in g:gutentags_exclude_project_root | |
5 0.000007 if l:proj_dir == ign | |
call gutentags#trace("Ignoring project root '" . l:proj_dir ."' because it is in the list of ignored" ." projects.") | |
call gutentags#throw("Ignore project: " . l:proj_dir) | |
endif | |
5 0.000003 endfor | |
5 0.000004 return l:proj_dir | |
endif | |
endfor | |
let l:previous_path = l:path | |
let l:path = fnamemodify(l:path, ':h') | |
endwhile | |
call gutentags#throw("Can't figure out what tag file to use for: " . a:path) | |
FUNCTION gutentags#find_job_index_by_data() | |
Called 7 times | |
Total time: 0.000071 | |
Self time: 0.000071 | |
count total (s) self (s) | |
7 0.000010 let l:idx = -1 | |
7 0.000021 for upd_info in s:update_in_progress[a:module] | |
7 0.000009 let l:idx += 1 | |
7 0.000010 if upd_info[1] == a:data | |
7 0.000006 return l:idx | |
endif | |
endfor | |
return -1 | |
FUNCTION <SNR>194_HandleExit() | |
Called 10 times | |
Total time: 0.024743 | |
Self time: 0.000812 | |
count total (s) self (s) | |
10 0.000027 if !has_key(s:job_info_map, a:job_id) | |
return | |
endif | |
10 0.000032 let l:job_info = s:job_info_map[a:job_id] | |
10 0.000024 let l:linter = l:job_info.linter | |
10 0.000011 let l:output = l:job_info.output | |
10 0.000010 let l:buffer = l:job_info.buffer | |
10 0.000013 let l:executable = l:job_info.executable | |
10 0.000015 let l:next_chain_index = l:job_info.next_chain_index | |
10 0.000011 if g:ale_history_enabled | |
10 0.000423 0.000042 call ale#history#SetExitCode(l:buffer, a:job_id, a:exit_code) | |
10 0.000005 endif | |
" Remove this job from the list. | |
10 0.000274 0.000033 call ale#job#Stop(a:job_id) | |
10 0.000021 call remove(s:job_info_map, a:job_id) | |
10 0.000055 call filter(g:ale_buffer_info[l:buffer].job_list, 'v:val isnot# a:job_id') | |
10 0.000038 call filter(g:ale_buffer_info[l:buffer].active_linter_list, 'v:val isnot# l:linter.name') | |
" Stop here if we land in the handle for a job completing if we're in | |
" a sandbox. | |
10 0.000128 0.000023 if ale#util#InSandbox() | |
return | |
endif | |
10 0.000042 if has('nvim') && !empty(l:output) && empty(l:output[-1]) | |
call remove(l:output, -1) | |
endif | |
10 0.000037 if l:next_chain_index < len(get(l:linter, 'command_chain', [])) | |
call s:InvokeChain(l:buffer, l:executable, l:linter, l:next_chain_index, l:output) | |
return | |
endif | |
" Log the output of the command for ALEInfo if we should. | |
10 0.000014 if g:ale_history_enabled && g:ale_history_log_output | |
10 0.000231 0.000047 call ale#history#RememberOutput(l:buffer, a:job_id, l:output[:]) | |
10 0.000004 endif | |
10 0.000006 try | |
10 0.001887 0.000079 let l:loclist = ale#util#GetFunction(l:linter.callback)(l:buffer, l:output) | |
" Handle the function being unknown, or being deleted. | |
10 0.000007 catch /E700/ | |
let l:loclist = [] | |
endtry | |
10 0.021275 0.000063 call ale#engine#HandleLoclist(l:linter.name, l:buffer, l:loclist) | |
FUNCTION <SNR>202_SetListsImpl() | |
Called 10 times | |
Total time: 0.002739 | |
Self time: 0.000960 | |
count total (s) self (s) | |
10 0.000160 let l:title = expand('#' . a:buffer . ':p') | |
10 0.000010 if g:ale_set_quickfix | |
let l:quickfix_list = ale#list#GetCombinedList() | |
if has('nvim') | |
call setqflist(s:FixList(a:buffer, l:quickfix_list), ' ', l:title) | |
else | |
call setqflist(s:FixList(a:buffer, l:quickfix_list)) | |
call setqflist([], 'r', {'title': l:title}) | |
endif | |
elseif g:ale_set_loclist | |
" If windows support is off, bufwinid() may not exist. | |
" We'll set result in the current window, which might not be correct, | |
" but it's better than nothing. | |
10 0.000081 0.000038 let l:id = s:BufWinId(a:buffer) | |
10 0.000025 if has('nvim') | |
10 0.001295 0.000132 call setloclist(l:id, s:FixList(a:buffer, a:loclist), ' ', l:title) | |
10 0.000006 else | |
call setloclist(l:id, s:FixList(a:buffer, a:loclist)) | |
call setloclist(l:id, [], 'r', {'title': l:title}) | |
endif | |
10 0.000004 endif | |
" Open a window to show the problems if we need to. | |
" | |
" We'll check if the current buffer's List is not empty here, so the | |
" window will only be opened if the current buffer has problems. | |
10 0.000225 0.000037 if s:ShouldOpen(a:buffer) && !empty(a:loclist) | |
let l:winnr = winnr() | |
let l:mode = mode() | |
let l:reset_visual_selection = l:mode is? 'v' || l:mode is# "\<c-v>" | |
let l:reset_character_selection = l:mode is? 's' || l:mode is# "\<c-s>" | |
" open windows vertically instead of default horizontally | |
let l:open_type = '' | |
if ale#Var(a:buffer, 'list_vertical') == 1 | |
let l:open_type = 'vert ' | |
endif | |
if g:ale_set_quickfix | |
if !ale#list#IsQuickfixOpen() | |
silent! execute l:open_type . 'copen ' . str2nr(ale#Var(a:buffer, 'list_window_size')) | |
endif | |
elseif g:ale_set_loclist | |
silent! execute l:open_type . 'lopen ' . str2nr(ale#Var(a:buffer, 'list_window_size')) | |
endif | |
" If focus changed, restore it (jump to the last window). | |
if l:winnr isnot# winnr() | |
wincmd p | |
endif | |
if l:reset_visual_selection || l:reset_character_selection | |
" If we were in a selection mode before, select the last selection. | |
normal! gv | |
if l:reset_character_selection | |
" Switch back to Select mode, if we were in that. | |
normal! "\<c-g>" | |
endif | |
endif | |
endif | |
" If ALE isn't currently checking for more problems, close the window if | |
" needed now. This check happens inside of this timer function, so | |
" the window can be closed reliably. | |
10 0.000101 0.000028 if !ale#engine#IsCheckingBuffer(a:buffer) | |
10 0.000345 0.000033 call s:CloseWindowIfNeeded(a:buffer) | |
10 0.000004 endif | |
FUNCTION FugitiveHead() | |
Called 1563 times | |
Total time: 0.147284 | |
Self time: 0.017789 | |
count total (s) self (s) | |
1563 0.017204 0.008968 let dir = FugitiveGitDir(a:0 > 1 ? a:2 : -1) | |
1563 0.002497 if empty(dir) | |
951 0.000556 return '' | |
endif | |
612 0.124904 0.003646 return fugitive#Head(a:0 ? a:1 : 0, dir) | |
FUNCTION <SNR>184_initialize_job() | |
Called 7 times | |
Total time: 0.000694 | |
Self time: 0.000225 | |
count total (s) self (s) | |
7 0.000531 0.000061 let vcs_cmd = s:expand_cmd(a:vcs, g:signify_vcs_cmds) | |
7 0.000021 if has('win32') | |
if has('nvim') | |
let cmd = &shell =~ 'cmd' ? vcs_cmd : ['sh', '-c', vcs_cmd] | |
else | |
let cmd = join([&shell, &shellcmdflag, vcs_cmd]) | |
endif | |
else | |
7 0.000015 let cmd = ['sh', '-c', vcs_cmd] | |
7 0.000004 endif | |
7 0.000038 let options = { 'stdoutbuf': [], 'vcs': a:vcs, 'bufnr': bufnr('%'), } | |
7 0.000013 return [cmd, options] | |
FUNCTION airline#highlighter#highlight() | |
Called 158 times | |
Total time: 46.939884 | |
Self time: 2.611961 | |
count total (s) self (s) | |
158 0.000375 let bufnr = a:0 ? a:1 : '' | |
158 0.000519 let p = g:airline#themes#{g:airline_theme}#palette | |
" draw the base mode, followed by any overrides | |
158 0.001409 let mapped = map(a:modes, 'v:val == a:modes[0] ? v:val : a:modes[0]."_".v:val') | |
158 0.000336 let suffix = a:modes[0] == 'inactive' ? '_inactive' : '' | |
455 0.000526 for mode in mapped | |
297 0.000618 if mode == 'inactive' && winnr('$') == 1 | |
" there exist no inactive windows, don't need to create all those | |
" highlighting groups | |
continue | |
endif | |
297 0.001269 if exists('g:airline#themes#{g:airline_theme}#palette[mode]') | |
164 0.000503 let dict = g:airline#themes#{g:airline_theme}#palette[mode] | |
31825 0.047322 for kvp in items(dict) | |
31661 0.042778 let mode_colors = kvp[1] | |
31661 0.034419 let name = kvp[0] | |
31661 0.058383 if name is# 'airline_c' && !empty(bufnr) && suffix is# '_inactive' | |
33 0.000049 let name = 'airline_c'.bufnr | |
33 0.000012 endif | |
31661 6.053457 0.117027 call airline#highlighter#exec(name.suffix, mode_colors) | |
94983 0.106834 for accent in keys(s:accents) | |
63322 0.101376 if !has_key(p.accents, accent) | |
continue | |
endif | |
63322 0.126361 let colors = copy(mode_colors) | |
63322 0.092623 if p.accents[accent][0] != '' | |
31661 0.051861 let colors[0] = p.accents[accent][0] | |
31661 0.012004 endif | |
63322 0.070656 if p.accents[accent][2] != '' | |
let colors[2] = p.accents[accent][2] | |
endif | |
63322 0.070166 if len(colors) >= 5 | |
63322 0.125389 let colors[4] = get(p.accents[accent], 4, '') | |
63322 0.023754 else | |
call add(colors, get(p.accents[accent], 4, '')) | |
endif | |
63322 12.075529 0.273462 call airline#highlighter#exec(name.suffix.'_'.accent, colors) | |
63322 0.032134 endfor | |
31661 0.012682 endfor | |
" TODO: optimize this | |
46207 0.082916 for sep in items(s:separators) | |
46043 26.855034 0.265606 call <sid>exec_separator(dict, sep[1][0], sep[1][1], sep[1][2], suffix) | |
46043 0.026030 endfor | |
164 0.000225 endif | |
297 0.000129 endfor | |
FUNCTION <SNR>158_nvim_output_handler() | |
Called 23 times | |
Total time: 0.000233 | |
Self time: 0.000233 | |
count total (s) self (s) | |
23 0.000053 if a:event == 'stdout' || a:event == 'stderr' | |
23 0.000099 let self.buf .= join(a:data) | |
23 0.000014 endif | |
FUNCTION fugitive#buffer() | |
Called 17 times | |
Total time: 0.000314 | |
Self time: 0.000264 | |
count total (s) self (s) | |
17 0.000059 let buffer = {'#': bufnr(a:0 ? a:1 : '%')} | |
17 0.000116 call extend(buffer, s:buffer_prototype, 'keep') | |
17 0.000114 0.000063 if buffer.getvar('git_dir') !=# '' | |
17 0.000012 return buffer | |
endif | |
call s:throw('not a git repository: '.bufname(buffer['#'])) | |
FUNCTION signature#utils#Set() | |
Called 328 times | |
Total time: 0.003979 | |
Self time: 0.003979 | |
count total (s) self (s) | |
" Description: Assign value to var if var is unset or if an optional 3rd arg is provided to force | |
328 0.001016 if (!exists(a:var) || a:0 && a:1) | |
64 0.000076 if type(a:value) | |
24 0.000113 execute 'let' a:var '=' string(a:value) | |
24 0.000011 else | |
40 0.000142 execute 'let' a:var '=' a:value | |
40 0.000019 endif | |
64 0.000026 endif | |
328 0.000343 return a:var | |
FUNCTION <SNR>81_EnterWin() | |
Called 126 times | |
Total time: 0.004875 | |
Self time: 0.001793 | |
count total (s) self (s) | |
126 0.003527 0.000445 if s:Skip() | |
18 0.000043 if exists('w:lastfdm') | |
3 0.000013 unlet w:lastfdm | |
3 0.000005 endif | |
18 0.000013 else | |
108 0.000199 let w:lastfdm = &l:foldmethod | |
108 0.000385 setlocal foldmethod=manual | |
108 0.000062 endif | |
FUNCTION airline#parts#ffenc() | |
Called 1759 times | |
Total time: 0.045545 | |
Self time: 0.045545 | |
count total (s) self (s) | |
1759 0.007169 let expected = get(g:, 'airline#parts#ffenc#skip_expected_string', '') | |
1759 0.004020 let bomb = &l:bomb ? '[BOM]' : '' | |
1759 0.014591 let ff = strlen(&ff) ? '['.&ff.']' : '' | |
1759 0.008725 if expected is# &fenc.bomb.ff | |
return '' | |
else | |
1759 0.006766 return &fenc.bomb.ff | |
endif | |
FUNCTION test#javascript#ava#test_file() | |
Called 6 times | |
Total time: 0.000108 | |
Self time: 0.000108 | |
count total (s) self (s) | |
6 0.000103 return a:file =~# g:test#javascript#ava#file_pattern && test#javascript#has_package('ava') | |
FUNCTION denite#project#path2project_directory() | |
Called 3 times | |
Total time: 0.000466 | |
Self time: 0.000307 | |
count total (s) self (s) | |
3 0.000117 0.000030 let search_directory = denite#util#path2directory(a:path) | |
3 0.000006 let directory = '' | |
" Search VCS directory. | |
3 0.000012 for vcs in s:vcs_markers | |
3 0.000006 if vcs ==# '.git' | |
3 0.000091 0.000033 let directory = s:_path2project_directory_git(search_directory) | |
3 0.000004 elseif vcs ==# '.svn' | |
let directory = s:_path2project_directory_svn(search_directory) | |
else | |
let directory = s:_path2project_directory_others(vcs, search_directory) | |
endif | |
3 0.000005 if directory !=# '' | |
3 0.000004 break | |
endif | |
endfor | |
" Search project root marker file. | |
3 0.000005 if directory ==# '' | |
for d in s:default_markers + split(a:root_markers, ',') | |
let d = findfile(d, s:escape_file_searching(search_directory) . ';') | |
if d !=# '' | |
let directory = fnamemodify(d, ':p:h') | |
break | |
else | |
" Allow the directory. | |
let d = finddir(d, s:escape_file_searching(search_directory) . ';') | |
if d !=# '' | |
let directory = fnamemodify(d, ':p') | |
break | |
endif | |
endif | |
endfor | |
endif | |
3 0.000005 if directory ==# '' | |
" Search /src/ directory. | |
let base = denite#util#substitute_path_separator(search_directory) | |
if base =~# '/src/' | |
let directory = base[: strridx(base, '/src/') + 3] | |
endif | |
endif | |
3 0.000004 if directory ==# '' | |
" Use original path. | |
let directory = search_directory | |
endif | |
3 0.000033 0.000019 return denite#util#substitute_path_separator(directory) | |
FUNCTION airline#util#ignore_buf() | |
Called 1311 times | |
Total time: 0.097445 | |
Self time: 0.097445 | |
count total (s) self (s) | |
1311 0.008149 let pat = '\c\v'. get(g:, 'airline#ignore_bufadd_pat', ''). get(g:, 'airline#extensions#tabline#ignore_bufadd_pat', 'gundo|undotree|vimfiler|tagbar|nerd_tree|startify|!') | |
1311 0.088251 return match(a:name, pat) > -1 | |
FUNCTION test#shell() | |
Called 3 times | |
Total time: 0.212609 | |
Self time: 0.000132 | |
count total (s) self (s) | |
3 0.000013 let g:test#last_command = a:cmd | |
3 0.000005 let g:test#last_strategy = a:strategy | |
3 0.000004 let cmd = a:cmd | |
3 0.000006 if has_key(g:, 'test#transformation') | |
let cmd = g:test#custom_transformations[g:test#transformation](cmd) | |
endif | |
3 0.000007 if cmd =~# '^:' | |
let strategy = 'vimscript' | |
else | |
3 0.000004 let strategy = a:strategy | |
3 0.000002 endif | |
3 0.000006 if has_key(g:test#custom_strategies, strategy) | |
call g:test#custom_strategies[strategy](cmd) | |
else | |
3 0.212511 0.000034 call test#strategy#{strategy}(cmd) | |
3 0.000009 endif | |
FUNCTION <SNR>144_define_commands() | |
Called 5 times | |
Total time: 0.001075 | |
Self time: 0.001075 | |
count total (s) self (s) | |
145 0.000109 for command in s:commands | |
140 0.000887 exe 'command! -buffer '.command | |
140 0.000052 endfor | |
FUNCTION LanguageClient_NCM2OnComplete() | |
Called 3 times | |
Total time: 0.000383 | |
Self time: 0.000035 | |
count total (s) self (s) | |
3 0.000379 0.000031 return LanguageClient#Call('LanguageClient_NCM2OnComplete', { 'ctx': a:context, }, v:null) | |
FUNCTION airline#load_theme() | |
Called 19 times | |
Total time: 7.847140 | |
Self time: 0.001474 | |
count total (s) self (s) | |
19 0.000220 let g:airline_theme = get(g:, 'airline_theme', 'dark') | |
19 0.000198 if exists('*airline#themes#{g:airline_theme}#refresh') | |
19 0.142682 0.000252 call airline#themes#{g:airline_theme}#refresh() | |
19 0.000014 endif | |
19 0.000095 let palette = g:airline#themes#{g:airline_theme}#palette | |
19 0.006020 0.000139 call airline#themes#patch(palette) | |
19 0.000061 if exists('g:airline_theme_patch_func') | |
let Fn = function(g:airline_theme_patch_func) | |
call Fn(palette) | |
endif | |
19 7.277344 0.000137 call airline#highlighter#load_theme() | |
19 0.075081 0.000079 call airline#extensions#load_theme() | |
19 0.345217 0.000072 call airline#update_statusline() | |
FUNCTION sy#highlight#line_disable() | |
Called 7 times | |
Total time: 0.004063 | |
Self time: 0.004063 | |
count total (s) self (s) | |
7 0.000540 execute 'sign define SignifyAdd text='. s:sign_add 'texthl=SignifySignAdd linehl=' | |
7 0.000304 execute 'sign define SignifyChange text='. s:sign_change 'texthl=SignifySignChange linehl=' | |
7 0.000285 execute 'sign define SignifyRemoveFirstLine text='. s:sign_delete_first_line 'texthl=SignifySignDeleteFirstLine linehl=' | |
7 0.000008 if s:sign_show_count | |
7 0.000025 while strwidth(s:sign_changedelete) > 1 | |
let s:sign_changedelete = substitute(s:sign_changedelete, '.', '', '') | |
endwhile | |
70 0.000099 for n in range(1, 9) | |
63 0.002382 execute 'sign define SignifyChangeDelete'. n 'text='. s:sign_changedelete . n 'texthl=SignifySignChangeDelete linehl=' | |
63 0.000036 endfor | |
7 0.000258 execute 'sign define SignifyChangeDeleteMore text='. s:sign_changedelete .'> texthl=SignifySignChangeDelete linehl=' | |
7 0.000004 else | |
for n in range(1, 9) | |
execute 'sign define SignifyChangeDelete'. n 'text='. s:sign_changedelete 'texthl=SignifySignChangeDelete linehl=' | |
endfor | |
execute 'sign define SignifyChangeDeleteMore text='. s:sign_changedelete 'texthl=SignifySignChangeDelete linehl=' | |
endif | |
7 0.000011 let g:signify_line_highlight = 0 | |
FUNCTION <SNR>113_update_branch() | |
Called 1563 times | |
Total time: 0.357834 | |
Self time: 0.077098 | |
count total (s) self (s) | |
4689 0.012851 for vcs in keys(s:vcs_config) | |
3126 0.305045 0.024309 call {s:vcs_config[vcs].update_branch}() | |
3126 0.010704 if b:buffer_vcs_config[vcs].branch != s:vcs_config[vcs].branch | |
let b:buffer_vcs_config[vcs].branch = s:vcs_config[vcs].branch | |
unlet! b:airline_head | |
endif | |
3126 0.004258 endfor | |
FUNCTION ale#util#BinarySearch() | |
Called 85 times | |
Total time: 0.007270 | |
Self time: 0.007270 | |
count total (s) self (s) | |
85 0.000203 let l:min = 0 | |
85 0.000298 let l:max = len(a:loclist) - 1 | |
184 0.000252 while 1 | |
184 0.000361 if l:max < l:min | |
85 0.000102 return -1 | |
endif | |
99 0.000282 let l:mid = (l:min + l:max) / 2 | |
99 0.000295 let l:item = a:loclist[l:mid] | |
" Binary search for equal buffers, equal lines, then near columns. | |
99 0.000225 if l:item.bufnr < a:buffer | |
let l:min = l:mid + 1 | |
elseif l:item.bufnr > a:buffer | |
let l:max = l:mid - 1 | |
elseif l:item.lnum < a:line | |
95 0.000182 let l:min = l:mid + 1 | |
95 0.000160 elseif l:item.lnum > a:line | |
4 0.000004 let l:max = l:mid - 1 | |
4 0.000002 else | |
" This part is a small sequential search. | |
let l:index = l:mid | |
" Search backwards to find the first problem on the line. | |
while l:index > 0&& a:loclist[l:index - 1].bufnr == a:buffer&& a:loclist[l:index - 1].lnum == a:line | |
let l:index -= 1 | |
endwhile | |
" Find the last problem on or before this column. | |
while l:index < l:max&& a:loclist[l:index + 1].bufnr == a:buffer&& a:loclist[l:index + 1].lnum == a:line&& a:loclist[l:index + 1].col <= a:column | |
let l:index += 1 | |
endwhile | |
" Scan forwards to find the last item on the column for the item | |
" we found, which will have the most serious problem. | |
let l:item_column = a:loclist[l:index].col | |
while l:index < l:max&& a:loclist[l:index + 1].bufnr == a:buffer&& a:loclist[l:index + 1].lnum == a:line&& a:loclist[l:index + 1].col == l:item_column | |
let l:index += 1 | |
endwhile | |
return l:index | |
endif | |
99 0.000115 endwhile | |
FUNCTION denite#init#_initialize() | |
Called 5 times | |
Total time: 0.000098 | |
Self time: 0.000063 | |
count total (s) self (s) | |
5 0.000083 0.000047 if s:is_initialized() | |
5 0.000007 return | |
endif | |
augroup denite | |
autocmd! | |
augroup END | |
if !has('nvim') | |
return denite#vim#_initialize() | |
endif | |
if !has('python3') | |
call denite#util#print_error( 'denite.nvim does not work with this version.') | |
call denite#util#print_error( 'It requires Neovim with Python3 support("+python3").') | |
return 1 | |
endif | |
if !exists('*execute') | |
call denite#util#print_error( 'denite.nvim does not work with this version.') | |
call denite#util#print_error( 'It requires Neovim +v0.1.5.') | |
return 1 | |
endif | |
try | |
if !exists('g:loaded_remote_plugins') | |
runtime! plugin/rplugin.vim | |
endif | |
call _denite_init() | |
catch | |
call denite#util#print_error( 'denite.nvim is not registered as Neovim remote plugins.') | |
call denite#util#print_error( 'Please execute :UpdateRemotePlugins command and restart Neovim.') | |
return 1 | |
endtry | |
FUNCTION test#ruby#minitest#test_file() | |
Called 6 times | |
Total time: 0.000043 | |
Self time: 0.000043 | |
count total (s) self (s) | |
6 0.000039 return a:file =~# g:test#ruby#minitest#file_pattern | |
FUNCTION airline#parts#readonly() | |
Called 1759 times | |
Total time: 0.110204 | |
Self time: 0.022600 | |
count total (s) self (s) | |
" only consider regular buffers (e.g. ones that represent actual files, | |
" but not special ones like e.g. NERDTree) | |
1759 0.100405 0.012800 if !empty(&buftype) || airline#util#ignore_buf(bufname('%')) | |
1072 0.000782 return '' | |
endif | |
687 0.002029 if &readonly && !filereadable(bufname('%')) | |
return '[noperm]' | |
else | |
687 0.001434 return &readonly ? g:airline_symbols.readonly : '' | |
endif | |
FUNCTION fugitive#Head() | |
Called 612 times | |
Total time: 0.121258 | |
Self time: 0.121258 | |
count total (s) self (s) | |
612 0.002127 let dir = a:0 > 1 ? a:2 : get(b:, 'git_dir', '') | |
612 0.010830 if empty(dir) || !filereadable(dir . '/HEAD') | |
return '' | |
endif | |
612 0.014865 let head = readfile(dir . '/HEAD')[0] | |
612 0.014497 if head =~# '^ref: ' | |
612 0.076607 return substitute(head, '\C^ref: \%(refs/\%(heads/\|remotes/\|tags/\)\=\)\=', '', '') | |
elseif head =~# '^\x\{40\}$' | |
let len = a:0 ? a:1 : 0 | |
return len < 0 ? head : len ? head[0:len-1] : '' | |
else | |
return '' | |
endif | |
FUNCTION <SNR>122_map_keys() | |
Called 187 times | |
Total time: 0.042468 | |
Self time: 0.042468 | |
count total (s) self (s) | |
187 0.000780 if get(g:, 'airline#extensions#tabline#buffer_idx_mode', 1) | |
187 0.009281 noremap <silent> <Plug>AirlineSelectTab1 :call <SID>select_tab(0)<CR> | |
187 0.003787 noremap <silent> <Plug>AirlineSelectTab2 :call <SID>select_tab(1)<CR> | |
187 0.003252 noremap <silent> <Plug>AirlineSelectTab3 :call <SID>select_tab(2)<CR> | |
187 0.003154 noremap <silent> <Plug>AirlineSelectTab4 :call <SID>select_tab(3)<CR> | |
187 0.003013 noremap <silent> <Plug>AirlineSelectTab5 :call <SID>select_tab(4)<CR> | |
187 0.002942 noremap <silent> <Plug>AirlineSelectTab6 :call <SID>select_tab(5)<CR> | |
187 0.002889 noremap <silent> <Plug>AirlineSelectTab7 :call <SID>select_tab(6)<CR> | |
187 0.002878 noremap <silent> <Plug>AirlineSelectTab8 :call <SID>select_tab(7)<CR> | |
187 0.002873 noremap <silent> <Plug>AirlineSelectTab9 :call <SID>select_tab(8)<CR> | |
187 0.003542 noremap <silent> <Plug>AirlineSelectPrevTab :<C-u>call <SID>jump_to_tab(-v:count1)<CR> | |
187 0.003035 noremap <silent> <Plug>AirlineSelectNextTab :<C-u>call <SID>jump_to_tab(v:count1)<CR> | |
187 0.000183 endif | |
FUNCTION LanguageClient#handleCompleteDone() | |
Called 2 times | |
Total time: 0.000012 | |
Self time: 0.000012 | |
count total (s) self (s) | |
2 0.000007 let user_data = get(v:completed_item, 'user_data', '') | |
2 0.000002 if user_data ==# '' | |
2 0.000001 return | |
endif | |
try | |
call LanguageClient#Notify('languageClient/handleCompleteDone', { 'filename': LSP#filename(), 'completed_item': v:completed_item, 'line': LSP#line(), 'character': LSP#character(), }) | |
catch | |
call s:Debug('LanguageClient caught exception: ' . string(v:exception)) | |
endtry | |
FUNCTION <SNR>194_GatherOutput() | |
Called 16 times | |
Total time: 0.000120 | |
Self time: 0.000120 | |
count total (s) self (s) | |
16 0.000045 if has_key(s:job_info_map, a:job_id) | |
16 0.000045 call add(s:job_info_map[a:job_id].output, a:line) | |
16 0.000006 endif | |
FUNCTION ale#util#GetItemPriority() | |
Called 16 times | |
Total time: 0.000183 | |
Self time: 0.000183 | |
count total (s) self (s) | |
16 0.000019 if a:item.type is# 'I' | |
return g:ale#util#info_priority | |
endif | |
16 0.000012 if a:item.type is# 'W' | |
1 0.000001 if get(a:item, 'sub_type', '') is# 'style' | |
1 0.000001 return g:ale#util#style_warning_priority | |
endif | |
return g:ale#util#warning_priority | |
endif | |
15 0.000026 if get(a:item, 'sub_type', '') is# 'style' | |
13 0.000014 return g:ale#util#style_error_priority | |
endif | |
2 0.000002 return g:ale#util#error_priority | |
FUNCTION airline#builder#should_change_group() | |
Called 3561 times | |
Total time: 0.528192 | |
Self time: 0.020783 | |
count total (s) self (s) | |
3561 0.004380 if a:group1 == a:group2 | |
2323 0.001144 return 0 | |
endif | |
1238 0.261169 0.004263 let color1 = airline#highlighter#get_highlight(a:group1) | |
1238 0.254524 0.004022 let color2 = airline#highlighter#get_highlight(a:group2) | |
1238 0.001317 if g:airline_gui_mode ==# 'gui' | |
1238 0.002997 return color1[1] != color2[1] || color1[0] != color2[0] | |
else | |
return color1[3] != color2[3] || color1[2] != color2[2] | |
endif | |
FUNCTION <SNR>202_CloseWindowIfNeeded() | |
Called 10 times | |
Total time: 0.000312 | |
Self time: 0.000065 | |
count total (s) self (s) | |
10 0.000301 0.000055 if ale#Var(a:buffer, 'keep_list_window_open') || !s:ShouldOpen(a:buffer) | |
10 0.000006 return | |
endif | |
try | |
" Only close windows if the quickfix list or loclist is completely empty, | |
" including errors set through other means. | |
if g:ale_set_quickfix | |
if empty(getqflist()) | |
cclose | |
endif | |
else | |
let l:win_id = s:BufWinId(a:buffer) | |
if g:ale_set_loclist && empty(getloclist(l:win_id)) | |
lclose | |
endif | |
endif | |
" Ignore 'Cannot close last window' errors. | |
catch /E444/ | |
endtry | |
FUNCTION UltiSnips#SnippetsInCurrentScope() | |
Called 5 times | |
Total time: 0.017737 | |
Self time: 0.017737 | |
count total (s) self (s) | |
5 0.000031 let g:current_ulti_dict = {} | |
5 0.000014 let all = get(a:, 1, 0) | |
5 0.000004 if all | |
let g:current_ulti_dict_info = {} | |
endif | |
5 0.017652 exec g:_uspy "UltiSnips_Manager.snippets_in_current_scope(" . all . ")" | |
5 0.000015 return g:current_ulti_dict | |
FUNCTION <SNR>143_write_triggered_update_tags() | |
Called 7 times | |
Total time: 0.112535 | |
Self time: 0.000650 | |
count total (s) self (s) | |
7 0.000015 if g:gutentags_enabled && g:gutentags_generate_on_write | |
14 0.000071 for module in g:gutentags_modules | |
7 0.111751 0.000075 call s:update_tags(a:bufno, module, 0, 2) | |
7 0.000026 endfor | |
7 0.000003 endif | |
7 0.000620 0.000411 silent doautocmd User GutentagsUpdating | |
FUNCTION denite#get_status_sources() | |
Called 18 times | |
Total time: 0.000236 | |
Self time: 0.000113 | |
count total (s) self (s) | |
18 0.000220 0.000097 return denite#get_status('sources') | |
FUNCTION test#viml#vspec#test_file() | |
Called 6 times | |
Total time: 0.000093 | |
Self time: 0.000093 | |
count total (s) self (s) | |
6 0.000088 return a:file =~# g:test#viml#vspec#file_pattern | |
FUNCTION ale#util#LocItemCompare() | |
Called 7 times | |
Total time: 0.000072 | |
Self time: 0.000072 | |
count total (s) self (s) | |
7 0.000008 if a:left.bufnr < a:right.bufnr | |
return -1 | |
endif | |
7 0.000005 if a:left.bufnr > a:right.bufnr | |
return 1 | |
endif | |
7 0.000005 if a:left.bufnr == -1 | |
if a:left.filename < a:right.filename | |
return -1 | |
endif | |
if a:left.filename > a:right.filename | |
return 1 | |
endif | |
endif | |
7 0.000006 if a:left.lnum < a:right.lnum | |
7 0.000003 return -1 | |
endif | |
if a:left.lnum > a:right.lnum | |
return 1 | |
endif | |
if a:left.col < a:right.col | |
return -1 | |
endif | |
if a:left.col > a:right.col | |
return 1 | |
endif | |
" When either of the items lacks a problem type, then the two items should | |
" be considered equal. This is important for loclist jumping. | |
if !has_key(a:left, 'type') || !has_key(a:right, 'type') | |
return 0 | |
endif | |
let l:left_priority = ale#util#GetItemPriority(a:left) | |
let l:right_priority = ale#util#GetItemPriority(a:right) | |
if l:left_priority < l:right_priority | |
return -1 | |
endif | |
if l:left_priority > l:right_priority | |
return 1 | |
endif | |
return 0 | |
FUNCTION test#shell#bats#test_file() | |
Called 6 times | |
Total time: 0.000059 | |
Self time: 0.000059 | |
count total (s) self (s) | |
6 0.000049 return a:file =~# g:test#shell#bats#file_pattern | |
FUNCTION <SNR>136_feedkeys() | |
Called 34 times | |
Total time: 0.000913 | |
Self time: 0.000913 | |
count total (s) self (s) | |
34 0.000304 if !get(b:,'ncm2_enable',0) || &paste != 0 || !empty(s:lock) | |
return | |
endif | |
34 0.000085 let m = 'm' | |
34 0.000090 if len(a:000) | |
let m = a:1 | |
endif | |
34 0.000209 call feedkeys(a:key, m) | |
FUNCTION ale#highlight#CreatePositions() | |
Called 42 times | |
Total time: 0.000184 | |
Self time: 0.000184 | |
count total (s) self (s) | |
42 0.000053 if a:line >= a:end_line | |
" For single lines, just return the one position. | |
42 0.000095 return [[[a:line, a:col, a:end_col - a:col + 1]]] | |
endif | |
" Get positions from the first line at the first column, up to a large | |
" integer for highlighting up to the end of the line, followed by | |
" the lines in-between, for highlighting entire lines, and | |
" a highlight for the last line, up to the end column. | |
let l:all_positions = [[a:line, a:col, s:MAX_COL_SIZE]] + range(a:line + 1, a:end_line - 1) + [[a:end_line, 1, a:end_col]] | |
return map( range(0, len(l:all_positions) - 1, s:MAX_POS_VALUES), 'l:all_positions[v:val : v:val + s:MAX_POS_VALUES - 1]',) | |
FUNCTION test#javascript#jasmine#test_file() | |
Called 6 times | |
Total time: 0.000094 | |
Self time: 0.000094 | |
count total (s) self (s) | |
6 0.000091 return a:file =~? g:test#javascript#jasmine#file_pattern && test#javascript#has_package('jasmine') | |
FUNCTION signature#utils#SetupHighlightGroups() | |
Called 10 times | |
Total time: 0.001644 | |
Self time: 0.000582 | |
count total (s) self (s) | |
" Description: Sets up the highlight groups | |
10 0.000029 function! CheckAndSetHL(curr_hl, prefix, attr, targ_color) | |
let l:curr_color = synIDattr(synIDtrans(hlID(a:curr_hl)), a:attr, a:prefix) | |
if ( ( (l:curr_color == "") || (l:curr_color < 0) ) && (a:targ_color != "") && (a:targ_color >= 0) ) | |
" echom "DEBUG: HL=" . a:curr_hl . " (" . a:prefix . a:attr . ") Curr=" . l:curr_color . ", To=" . a:targ_color | |
execute 'highlight ' . a:curr_hl . ' ' . a:prefix . a:attr . '=' . a:targ_color | |
endif | |
endfunction | |
10 0.000066 let l:prefix = (has('gui_running') || (has('termguicolors') && &termguicolors) ? 'gui' : 'cterm') | |
10 0.000234 let l:sign_col_color = synIDattr(synIDtrans(hlID('SignColumn')), 'bg', l:prefix) | |
10 0.000369 0.000065 call CheckAndSetHL('SignatureMarkText', l:prefix, 'fg', 'Red') | |
10 0.000297 0.000035 call CheckAndSetHL('SignatureMarkText', l:prefix, 'bg', l:sign_col_color) | |
10 0.000280 0.000028 call CheckAndSetHL('SignatureMarkerText', l:prefix, 'fg', 'Green') | |
10 0.000276 0.000030 call CheckAndSetHL('SignatureMarkerText', l:prefix, 'bg', l:sign_col_color) | |
10 0.000016 delfunction CheckAndSetHL | |
FUNCTION <SNR>144_can_diffoff() | |
Called 27 times | |
Total time: 0.000290 | |
Self time: 0.000290 | |
count total (s) self (s) | |
27 0.000247 return getwinvar(bufwinnr(a:buf), '&diff') && !empty(getbufvar(a:buf, 'git_dir')) && !empty(getwinvar(bufwinnr(a:buf), 'fugitive_diff_restore')) | |
FUNCTION <SNR>81_LeaveWin() | |
Called 126 times | |
Total time: 0.004705 | |
Self time: 0.004705 | |
count total (s) self (s) | |
126 0.000409 if exists('w:predifffdm') | |
if empty(&l:foldmethod) || &l:foldmethod is# 'manual' | |
let &l:foldmethod = w:predifffdm | |
unlet w:predifffdm | |
return | |
elseif &l:foldmethod isnot# 'diff' | |
unlet w:predifffdm | |
endif | |
endif | |
126 0.000427 if exists('w:lastfdm') && &l:foldmethod is# 'diff' | |
let w:predifffdm = w:lastfdm | |
endif | |
126 0.000286 if exists('w:lastfdm') && &l:foldmethod is# 'manual' | |
111 0.000518 let &l:foldmethod = w:lastfdm | |
111 0.000071 endif | |
FUNCTION <SNR>136_cache_cleanup() | |
Called 12 times | |
Total time: 0.006727 | |
Self time: 0.000481 | |
count total (s) self (s) | |
12 0.000378 0.000168 call s:cache_matches_cleanup() | |
12 0.000050 let s:auto_trigger_tick = [] | |
12 0.000030 let s:skip_tick = [] | |
12 0.006240 0.000205 call s:try_rnotify('cache_cleanup') | |
FUNCTION ale#Lint() | |
Called 10 times | |
Total time: 0.282541 | |
Self time: 0.001189 | |
count total (s) self (s) | |
10 0.000020 if a:0 > 1 | |
" Use the buffer number given as the optional second argument. | |
10 0.000026 let l:buffer = a:2 | |
10 0.000023 elseif a:0 > 0 && a:1 == s:lint_timer | |
" Use the buffer number for the buffer linting was queued for. | |
let l:buffer = s:queued_buffer_number | |
else | |
" Use the current buffer number. | |
let l:buffer = bufnr('') | |
endif | |
10 0.001189 0.000050 if ale#ShouldDoNothing(l:buffer) | |
return | |
endif | |
" Use the filetype from the buffer | |
10 0.000041 let l:filetype = getbufvar(l:buffer, '&filetype') | |
10 0.005016 0.000084 let l:linters = ale#linter#Get(l:filetype) | |
10 0.000024 let l:should_lint_file = 0 | |
" Check if we previously requested checking the file. | |
10 0.000043 if has_key(s:should_lint_file_for_buffer, l:buffer) | |
10 0.000036 unlet s:should_lint_file_for_buffer[l:buffer] | |
" Lint files if they exist. | |
10 0.000372 let l:should_lint_file = filereadable(expand('#' . l:buffer . ':p')) | |
10 0.000013 endif | |
" Apply ignore lists for linters only if needed. | |
10 0.000272 0.000081 let l:ignore_config = ale#Var(l:buffer, 'linters_ignore') | |
10 0.000077 let l:linters = !empty(l:ignore_config) ? ale#engine#ignore#Exclude(l:filetype, l:linters, l:ignore_config) : l:linters | |
10 0.275214 0.000125 call ale#engine#RunLinters(l:buffer, l:linters, l:should_lint_file) | |
FUNCTION <SNR>115_airline_languageclient_get_line_number() | |
Called 1122 times | |
Total time: 0.064234 | |
Self time: 0.051076 | |
count total (s) self (s) | |
1122 0.002463 let linenumber_of_first_problem = 0 | |
3344 0.019965 0.006808 for d in s:diagnostics_for_buffer() | |
3344 0.006570 if has_key(d, 'severity') && d.severity == a:type | |
1122 0.002572 let linenumber_of_first_problem = d.range.start.line | |
1122 0.000989 break | |
endif | |
2222 0.012699 endfor | |
1122 0.001697 if linenumber_of_first_problem == 0 | |
541 0.000483 return '' | |
endif | |
581 0.002337 let open_lnum_symbol = get(g:, 'airline#extensions#languageclient#open_lnum_symbol', '(L') | |
581 0.002053 let close_lnum_symbol = get(g:, 'airline#extensions#languageclient#close_lnum_symbol', ')') | |
581 0.002040 return open_lnum_symbol . linenumber_of_first_problem . close_lnum_symbol | |
FUNCTION <SNR>185_UsingModule() | |
Called 30 times | |
Total time: 0.000838 | |
Self time: 0.000425 | |
count total (s) self (s) | |
30 0.000801 0.000388 return ale#Var(a:buffer, 'python_flake8_options') =~# ' *-m flake8' | |
FUNCTION <SNR>68_HighlightEOLWhitespaceExceptCurrentLine() | |
Called 14 times | |
Total time: 0.002851 | |
Self time: 0.000487 | |
count total (s) self (s) | |
14 0.000183 let a:exclude_current_line_eol_whitespace_pattern = '\%<' . line(".") . 'l' . s:eol_whitespace_pattern . '\|\%>' . line(".") . 'l' . s:eol_whitespace_pattern | |
14 0.000036 if (a:type == 'match') | |
14 0.002488 0.000123 call s:PerformMatchHighlight(a:exclude_current_line_eol_whitespace_pattern) | |
14 0.000027 elseif (a:type == 'syntax') | |
call s:PerformSyntaxHighlight(a:exclude_current_line_eol_whitespace_pattern) | |
endif | |
FUNCTION <SNR>141_InitializeVars() | |
Called 41 times | |
Total time: 0.006855 | |
Self time: 0.002875 | |
count total (s) self (s) | |
" Description: Initialize variables | |
" Arguments: Specify an argument to re-init | |
41 0.000148 if !exists('b:sig_marks') | |
" b:sig_marks = { lnum => signs_str } | |
8 0.000012 let b:sig_marks = {} | |
8 0.000004 else | |
" Lines can be removed using an external tool. Hence, we need to filter out marks placed on line numbers that are | |
" now greater than the total number of lines in the file. | |
33 0.000097 let l:line_tot = line('$') | |
33 0.000137 call filter( b:sig_marks, 'v:key <= l:line_tot' ) | |
33 0.000025 endif | |
41 0.000097 if !exists('b:sig_markers') | |
" b:sig_markers = { lnum => marker } | |
8 0.000010 let b:sig_markers = {} | |
8 0.000003 else | |
" Lines can be removed using an external tool. Hence, we need to filter out marks placed on line numbers that are | |
" now greater than the total number of lines in the file. | |
33 0.000066 let l:line_tot = line('$') | |
33 0.000086 call filter( b:sig_markers, 'v:key <= l:line_tot' ) | |
33 0.000020 endif | |
41 0.000959 0.000282 call signature#utils#Set('b:sig_DummyExists' , 0 , a:0 && a:1) | |
41 0.000713 0.000227 call signature#utils#Set('b:sig_enabled' , g:SignatureEnabledAtStartup, a:0 && a:1) | |
41 0.000715 0.000209 call signature#utils#Set('b:SignatureIncludeMarks' , g:SignatureIncludeMarks , a:0 && a:1) | |
41 0.000689 0.000207 call signature#utils#Set('b:SignatureIncludeMarkers' , g:SignatureIncludeMarkers , a:0 && a:1) | |
41 0.000667 0.000200 call signature#utils#Set('b:SignatureMarkOrder' , g:SignatureMarkOrder , a:0 && a:1) | |
41 0.000637 0.000185 call signature#utils#Set('b:SignaturePrioritizeMarks', g:SignaturePrioritizeMarks , a:0 && a:1) | |
41 0.000628 0.000184 call signature#utils#Set('b:SignatureDeferPlacement' , g:SignatureDeferPlacement , a:0 && a:1) | |
41 0.000649 0.000183 call signature#utils#Set('b:SignatureWrapJumps' , g:SignatureWrapJumps , a:0 && a:1) | |
FUNCTION LanguageClient#Call() | |
Called 20 times | |
Total time: 0.014197 | |
Self time: 0.013641 | |
count total (s) self (s) | |
20 0.000059 let l:id = s:id | |
20 0.000039 let s:id = s:id + 1 | |
20 0.000047 if a:callback is v:null | |
6 0.000079 let s:handlers[l:id] = function('s:HandleOutput') | |
6 0.000008 else | |
14 0.000042 let s:handlers[l:id] = a:callback | |
14 0.000007 endif | |
20 0.000081 let l:skipAddParams = get(a:000, 0, v:false) | |
20 0.000040 let l:params = a:params | |
20 0.000075 if type(a:params) == s:TYPE.dict && !skipAddParams | |
20 0.000238 let l:params = extend({ 'buftype': &buftype, 'languageId': &filetype, }, l:params) | |
20 0.000015 endif | |
20 0.013351 0.012796 return LanguageClient#Write(json_encode({ 'jsonrpc': '2.0', 'id': l:id, 'method': a:method, 'params': l:params, })) | |
FUNCTION <SNR>115_airline_languageclient_count() | |
Called 1122 times | |
Total time: 0.003568 | |
Self time: 0.003568 | |
count total (s) self (s) | |
1122 0.003146 return a:cnt ? a:symbol. a:cnt : '' | |
FUNCTION ale#util#Mode() | |
Called 125 times | |
Total time: 0.000698 | |
Self time: 0.000698 | |
count total (s) self (s) | |
125 0.000522 return call('mode', a:000) | |
FUNCTION ale#util#Writefile() | |
Called 10 times | |
Total time: 0.002218 | |
Self time: 0.002218 | |
count total (s) self (s) | |
10 0.000131 let l:corrected_lines = getbufvar(a:buffer, '&fileformat') is# 'dos' ? map(copy(a:lines), 'substitute(v:val, ''\r*$'', ''\r'', '''')') : a:lines | |
10 0.002065 call writefile(l:corrected_lines, a:filename) " no-custom-checks | |
FUNCTION <SNR>174_indent() | |
Called 1770 times | |
Total time: 0.030093 | |
Self time: 0.030093 | |
count total (s) self (s) | |
1770 0.007974 let ind = matchend(a:line, '^ *') / a:ind_spaces | |
1770 0.001495 if ind == 0 | |
222 0.000589 let ind = matchend(a:line, '^\t*') | |
222 0.000125 endif | |
" Fix indent for solo def multiline endings | |
1770 0.011943 if a:line =~# s:multi_def_end_solo_re | |
return ind + 1 | |
endif | |
1770 0.001241 return ind | |
FUNCTION <SNR>201_BuildSignMap() | |
Called 10 times | |
Total time: 0.001762 | |
Self time: 0.001136 | |
count total (s) self (s) | |
10 0.000126 0.000044 let l:max_signs = ale#Var(a:buffer, 'max_signs') | |
10 0.000011 if l:max_signs is 0 | |
let l:selected_grouped_items = [] | |
elseif type(l:max_signs) is v:t_number && l:max_signs > 0 | |
let l:selected_grouped_items = a:grouped_items[:l:max_signs - 1] | |
else | |
10 0.000015 let l:selected_grouped_items = a:grouped_items | |
10 0.000004 endif | |
10 0.000010 let l:sign_map = {} | |
10 0.000015 let l:sign_offset = g:ale_sign_offset | |
26 0.000033 for [l:line, l:sign_id, l:name] in a:current_sign_list | |
16 0.000116 let l:sign_info = get(l:sign_map, l:line, { 'current_id_list': [], 'current_name_list': [], 'new_id': 0, 'new_name': '', 'items': [],}) | |
" Increment the sign offset for new signs, by the maximum sign ID. | |
16 0.000018 if l:sign_id > l:sign_offset | |
14 0.000016 let l:sign_offset = l:sign_id | |
14 0.000006 endif | |
" Remember the sign names and IDs in separate Lists, so they are easy | |
" to work with. | |
16 0.000027 call add(l:sign_info.current_id_list, l:sign_id) | |
16 0.000022 call add(l:sign_info.current_name_list, l:name) | |
16 0.000027 let l:sign_map[l:line] = l:sign_info | |
16 0.000008 endfor | |
26 0.000024 for l:group in l:selected_grouped_items | |
16 0.000020 let l:line = l:group[0].lnum | |
16 0.000086 let l:sign_info = get(l:sign_map, l:line, { 'current_id_list': [], 'current_name_list': [], 'new_id': 0, 'new_name': '', 'items': [],}) | |
16 0.000600 0.000055 let l:sign_info.new_name = ale#sign#GetSignName(l:group) | |
16 0.000020 let l:sign_info.items = l:group | |
16 0.000036 let l:index = index( l:sign_info.current_name_list, l:sign_info.new_name) | |
16 0.000013 if l:index >= 0 | |
" We have a sign with this name already, so use the same ID. | |
15 0.000025 let l:sign_info.new_id = l:sign_info.current_id_list[l:index] | |
15 0.000006 else | |
" This sign name replaces the previous name, so use a new ID. | |
1 0.000001 let l:sign_info.new_id = l:sign_offset + 1 | |
1 0.000001 let l:sign_offset += 1 | |
1 0.000000 endif | |
16 0.000026 let l:sign_map[l:line] = l:sign_info | |
16 0.000007 endfor | |
10 0.000008 return l:sign_map | |
FUNCTION <SNR>145_ExecuteAutocmd() | |
Called 15 times | |
Total time: 0.002185 | |
Self time: 0.000598 | |
count total (s) self (s) | |
15 0.000382 if exists('#User#' . a:event) | |
13 0.001764 0.000178 execute 'doautocmd <nomodeline> User ' . a:event | |
13 0.000006 endif | |
FUNCTION <SNR>150_uniq_by() | |
Called 1 time | |
Total time: 0.001683 | |
Self time: 0.001683 | |
count total (s) self (s) | |
1 0.000102 let list = map(copy(a:list), printf('[v:val, %s]', a:f)) | |
1 0.000001 let i = 0 | |
1 0.000001 let seen = {} | |
201 0.000193 while i < len(list) | |
200 0.000429 let key = string(list[i][1]) | |
200 0.000236 if has_key(seen, key) | |
100 0.000101 call remove(list, i) | |
100 0.000026 else | |
100 0.000130 let seen[key] = 1 | |
100 0.000055 let i += 1 | |
100 0.000028 endif | |
200 0.000062 endwhile | |
1 0.000043 return map(list, 'v:val[0]') | |
FUNCTION test#go#test_file() | |
Called 12 times | |
Total time: 0.000277 | |
Self time: 0.000277 | |
count total (s) self (s) | |
12 0.000116 if fnamemodify(a:file, ':t') =~# a:file_pattern | |
" given the current runner, check if is can be used with the file | |
if exists('g:test#go#runner') | |
return a:runner == g:test#go#runner | |
endif | |
let contains_ginkgo_import = (search('github.com/onsi/ginkgo', 'n') > 0) | |
if a:runner ==# 'ginkgo' | |
return contains_ginkgo_import | |
else | |
return !contains_ginkgo_import | |
endif | |
endif | |
FUNCTION <SNR>144_buffer_getline() | |
Called 27 times | |
Total time: 0.000092 | |
Self time: 0.000092 | |
count total (s) self (s) | |
27 0.000085 return get(getbufline(self['#'], a:lnum), 0, '') | |
FUNCTION <SNR>86_extract_strategy_from_command() | |
Called 3 times | |
Total time: 0.000029 | |
Self time: 0.000029 | |
count total (s) self (s) | |
3 0.000013 for idx in range(0, len(a:arguments) - 1) | |
if a:arguments[idx] =~# '^-strategy=' | |
return substitute(remove(a:arguments, idx), '-strategy=', '', '') | |
endif | |
endfor | |
FUNCTION ale#list#SetLists() | |
Called 10 times | |
Total time: 0.002071 | |
Self time: 0.000163 | |
count total (s) self (s) | |
10 0.000059 if get(g:, 'ale_set_lists_synchronously') == 1|| getbufvar(a:buffer, 'ale_save_event_fired', 0) | |
" Update lists immediately if running a test synchronously, or if the | |
" buffer was saved. | |
" | |
" The lists need to be updated immediately when saving a buffer so | |
" that we can reliably close window automatically, if so configured. | |
7 0.001904 0.000028 call s:SetListsImpl(-1, a:buffer, a:loclist) | |
7 0.000003 else | |
3 0.000055 0.000023 call ale#util#StartPartialTimer( 0, function('s:SetListsImpl'), [a:buffer, a:loclist],) | |
3 0.000001 endif | |
FUNCTION ale#util#InSandbox() | |
Called 175 times | |
Total time: 0.002648 | |
Self time: 0.002406 | |
count total (s) self (s) | |
175 0.000276 try | |
175 0.001197 0.000954 let &l:equalprg=&l:equalprg | |
175 0.000298 catch /E48/ | |
" E48 is the sandbox error. | |
return 1 | |
endtry | |
175 0.000162 return 0 | |
FUNCTION <SNR>46_persist() | |
Called 31 times | |
Total time: 0.001076 | |
Self time: 0.001076 | |
count total (s) self (s) | |
31 0.000062 if exists('g:SessionLoad') | |
return '' | |
endif | |
31 0.000063 let sessionoptions = &sessionoptions | |
31 0.000066 if exists('g:this_obsession') | |
try | |
set sessionoptions-=blank sessionoptions-=options sessionoptions+=tabpages | |
execute 'mksession! '.fnameescape(g:this_obsession) | |
let body = readfile(g:this_obsession) | |
call insert(body, 'let g:this_session = v:this_session', -3) | |
call insert(body, 'let g:this_obsession = v:this_session', -3) | |
call insert(body, 'let g:this_obsession_status = 2', -3) | |
if type(get(g:, 'obsession_append')) == type([]) | |
for line in g:obsession_append | |
call insert(body, line, -3) | |
endfor | |
endif | |
call writefile(body, g:this_obsession) | |
let g:this_session = g:this_obsession | |
exe s:doautocmd_user('Obsession') | |
catch | |
unlet g:this_obsession | |
let &l:readonly = &l:readonly | |
return 'echoerr '.string(v:exception) | |
finally | |
let &sessionoptions = sessionoptions | |
endtry | |
endif | |
31 0.000020 return '' | |
FUNCTION airline#parts#crypt() | |
Called 1563 times | |
Total time: 0.018038 | |
Self time: 0.018038 | |
count total (s) self (s) | |
1563 0.016968 return g:airline_detect_crypt && exists("+key") && !empty(&key) ? g:airline_symbols.crypt : '' | |
FUNCTION <SNR>130_hl_group_exists() | |
Called 141598 times | |
Total time: 3.137250 | |
Self time: 3.137250 | |
count total (s) self (s) | |
141598 1.333655 if !hlexists(a:group) | |
return 0 | |
elseif empty(synIDattr(hlID(a:group), 'fg')) | |
return 0 | |
endif | |
141598 0.065905 return 1 | |
FUNCTION airline#extensions#tabline#formatters#default#wrap_name() | |
Called 2792 times | |
Total time: 0.042013 | |
Self time: 0.042013 | |
count total (s) self (s) | |
2792 0.008592 let _ = s:buf_nr_show ? printf(s:buf_nr_format, a:bufnr) : '' | |
2792 0.013686 let _ .= substitute(a:buffer_name, '\\', '/', 'g') | |
2792 0.008691 if getbufvar(a:bufnr, '&modified') == 1 | |
let _ .= s:buf_modified_symbol | |
endif | |
2792 0.002659 return _ | |
FUNCTION ale#python#FindExecutable() | |
Called 30 times | |
Total time: 0.071470 | |
Self time: 0.001279 | |
count total (s) self (s) | |
30 0.000569 0.000173 if ale#Var(a:buffer, a:base_var_name . '_use_global') | |
return ale#Var(a:buffer, a:base_var_name . '_executable') | |
endif | |
30 0.069545 0.000194 let l:virtualenv = ale#python#FindVirtualenv(a:buffer) | |
30 0.000083 if !empty(l:virtualenv) | |
for l:path in a:path_list | |
let l:ve_executable = ale#path#Simplify( join([l:virtualenv, s:bin_dir, l:path], s:sep)) | |
if executable(l:ve_executable) | |
return l:ve_executable | |
endif | |
endfor | |
endif | |
30 0.000659 0.000215 return ale#Var(a:buffer, a:base_var_name . '_executable') | |
FUNCTION fugitive#Init() | |
Called 5 times | |
Total time: 0.002913 | |
Self time: 0.000452 | |
count total (s) self (s) | |
5 0.000050 if exists('#User#FugitiveBoot') | |
try | |
let [save_mls, &modelines] = [&mls, 0] | |
doautocmd User FugitiveBoot | |
finally | |
let &mls = save_mls | |
endtry | |
endif | |
5 0.000009 if !exists('g:fugitive_no_maps') | |
5 0.000518 0.000028 call s:map('c', '<C-R><C-G>', '<SID>fnameescape(fugitive#Object(@%))', '<expr>') | |
5 0.000362 0.000022 call s:map('n', 'y<C-G>', ':<C-U>call setreg(v:register, fugitive#Object(@%))<CR>', '<silent>') | |
5 0.000002 endif | |
5 0.000031 if expand('%:p') =~# ':[\/][\/]' | |
let &l:path = s:sub(&path, '^\.%(,|$)', '') | |
endif | |
5 0.000020 if stridx(&tags, escape(b:git_dir, ', ')) == -1 | |
5 0.000028 if filereadable(b:git_dir.'/tags') | |
let &l:tags = escape(b:git_dir.'/tags', ', ').','.&tags | |
endif | |
5 0.000010 if &filetype !=# '' && filereadable(b:git_dir.'/'.&filetype.'.tags') | |
let &l:tags = escape(b:git_dir.'/'.&filetype.'.tags', ', ').','.&tags | |
endif | |
5 0.000002 endif | |
5 0.000004 try | |
5 0.000035 let [save_mls, &modelines] = [&mls, 0] | |
5 0.001103 0.000028 call s:define_commands() | |
5 0.000616 0.000060 doautocmd User Fugitive | |
5 0.000004 finally | |
5 0.000043 let &mls = save_mls | |
5 0.000003 endtry | |
FUNCTION ale#path#Upwards() | |
Called 30 times | |
Total time: 0.004609 | |
Self time: 0.004139 | |
count total (s) self (s) | |
30 0.000242 let l:pattern = has('win32') ? '\v/+|\\+' : '\v/+' | |
30 0.000162 let l:sep = has('win32') ? '\' : '/' | |
30 0.001001 0.000531 let l:parts = split(ale#path#Simplify(a:path), l:pattern) | |
30 0.000070 let l:path_list = [] | |
180 0.000482 while !empty(l:parts) | |
150 0.000884 call add(l:path_list, join(l:parts, l:sep)) | |
150 0.000490 let l:parts = l:parts[:-2] | |
150 0.000136 endwhile | |
30 0.000159 if has('win32') && a:path =~# '^[a-zA-z]:\' | |
" Add \ to C: for C:\, etc. | |
let l:path_list[-1] .= '\' | |
elseif a:path[0] is# '/' | |
" If the path starts with /, even on Windows, add / and / to all paths. | |
30 0.000298 call map(l:path_list, '''/'' . v:val') | |
30 0.000070 call add(l:path_list, '/') | |
30 0.000027 endif | |
30 0.000050 return l:path_list | |
FUNCTION <SNR>144_SetupTemp() | |
Called 5 times | |
Total time: 0.000198 | |
Self time: 0.000101 | |
count total (s) self (s) | |
5 0.000125 0.000028 if has_key(s:temp_files, s:cpath(a:file)) | |
let dict = s:temp_files[s:cpath(a:file)] | |
let b:git_dir = dict.dir | |
call extend(b:, {'fugitive_type': 'temp'}, 'keep') | |
if has_key(dict, 'filetype') && dict.filetype !=# &l:filetype | |
let &l:filetype = dict.filetype | |
endif | |
setlocal foldmarker=<<<<<<<,>>>>>>> | |
setlocal bufhidden=delete nobuflisted | |
setlocal buftype=nowrite | |
nnoremap <buffer> <silent> q :<C-U>bdelete<CR> | |
if getline(1) !~# '^diff ' | |
setlocal nomodifiable | |
endif | |
call FugitiveDetect(a:file) | |
endif | |
5 0.000003 return '' | |
FUNCTION airline#extensions#tabline#buflist#clean() | |
Called 8 times | |
Total time: 0.000077 | |
Self time: 0.000050 | |
count total (s) self (s) | |
8 0.000037 0.000024 call airline#extensions#tabline#buflist#invalidate() | |
8 0.000037 0.000022 call airline#extensions#tabline#buffers#invalidate() | |
FUNCTION <SNR>68_HighlightEOLWhitespace() | |
Called 6 times | |
Total time: 0.000546 | |
Self time: 0.000065 | |
count total (s) self (s) | |
6 0.000011 if (a:type == 'match') | |
6 0.000508 0.000026 call s:PerformMatchHighlight(s:eol_whitespace_pattern) | |
6 0.000006 elseif (a:type == 'syntax') | |
call s:PerformSyntaxHighlight(s:eol_whitespace_pattern) | |
endif | |
FUNCTION <SNR>81_inSkipList() | |
Called 108 times | |
Total time: 0.000744 | |
Self time: 0.000744 | |
count total (s) self (s) | |
108 0.000481 if index(g:fastfold_skip_filetypes, &l:filetype) >= 0 | |
return 1 | |
else | |
108 0.000065 return 0 | |
endif | |
FUNCTION <SNR>221_is_initialized() | |
Called 5 times | |
Total time: 0.000035 | |
Self time: 0.000035 | |
count total (s) self (s) | |
5 0.000032 return exists('g:denite#_channel_id') | |
FUNCTION airline#extensions#unicode#apply() | |
Called 62 times | |
Total time: 0.000790 | |
Self time: 0.000790 | |
count total (s) self (s) | |
62 0.000383 if exists(":UnicodeTable") == 2 && bufname('') ==# 'UnicodeTable' | |
call airline#parts#define('unicode', { 'text': '[UnicodeTable]', 'accent': 'bold' }) | |
let w:airline_section_a = airline#section#create(['unicode']) | |
let w:airline_section_b = '' | |
let w:airline_section_c = ' ' | |
let w:airline_section_y = '' | |
endif | |
FUNCTION ale#engine#FixLocList() | |
Called 10 times | |
Total time: 0.003169 | |
Self time: 0.001733 | |
count total (s) self (s) | |
10 0.000012 let l:bufnr_map = {} | |
10 0.000010 let l:new_loclist = [] | |
" Some errors have line numbers beyond the end of the file, | |
" so we need to adjust them so they set the error at the last line | |
" of the file instead. | |
10 0.001371 0.000043 let l:last_line_number = ale#util#GetLineCount(a:buffer) | |
26 0.000028 for l:old_item in a:loclist | |
" Copy the loclist item with some default values and corrections. | |
" | |
" line and column numbers will be converted to numbers. | |
" The buffer will default to the buffer being checked. | |
" The vcol setting will default to 0, a byte index. | |
" The error type will default to 'E' for errors. | |
" The error number will default to -1. | |
" | |
" The line number and text are the only required keys. | |
" | |
" The linter_name will be set on the errors so it can be used in | |
" output, filtering, etc.. | |
16 0.000148 let l:item = { 'bufnr': a:buffer, 'text': l:old_item.text, 'lnum': str2nr(l:old_item.lnum), 'col': str2nr(get(l:old_item, 'col', 0)), 'vcol': 0, 'type': get(l:old_item, 'type', 'E'), 'nr': get(l:old_item, 'nr', -1), 'linter_name': a:linter_name,} | |
16 0.000022 if has_key(l:old_item, 'code') | |
16 0.000022 let l:item.code = l:old_item.code | |
16 0.000007 endif | |
16 0.000034 if has_key(l:old_item, 'filename')&& !ale#path#IsTempName(l:old_item.filename) | |
" Use the filename given. | |
" Temporary files are assumed to be for this buffer, | |
" and the filename is not included then, because it looks bad | |
" in the loclist window. | |
let l:filename = l:old_item.filename | |
let l:item.filename = l:filename | |
if has_key(l:old_item, 'bufnr') | |
" If a buffer number is also given, include that too. | |
" If Vim detects that he buffer number is valid, it will | |
" be used instead of the filename. | |
let l:item.bufnr = l:old_item.bufnr | |
elseif has_key(l:bufnr_map, l:filename) | |
" Get the buffer number from the map, which can be faster. | |
let l:item.bufnr = l:bufnr_map[l:filename] | |
else | |
" Look up the buffer number. | |
let l:item.bufnr = bufnr(l:filename) | |
let l:bufnr_map[l:filename] = l:item.bufnr | |
endif | |
elseif has_key(l:old_item, 'bufnr') | |
let l:item.bufnr = l:old_item.bufnr | |
endif | |
16 0.000017 if has_key(l:old_item, 'detail') | |
let l:item.detail = l:old_item.detail | |
endif | |
" Pass on a end_col key if set, used for highlights. | |
16 0.000017 if has_key(l:old_item, 'end_col') | |
2 0.000004 let l:item.end_col = str2nr(l:old_item.end_col) | |
2 0.000001 endif | |
16 0.000017 if has_key(l:old_item, 'end_lnum') | |
let l:item.end_lnum = str2nr(l:old_item.end_lnum) | |
endif | |
16 0.000017 if has_key(l:old_item, 'sub_type') | |
14 0.000020 let l:item.sub_type = l:old_item.sub_type | |
14 0.000005 endif | |
16 0.000014 if l:item.lnum < 1 | |
" When errors appear before line 1, put them at line 1. | |
let l:item.lnum = 1 | |
elseif l:item.bufnr == a:buffer && l:item.lnum > l:last_line_number | |
" When errors go beyond the end of the file, put them at the end. | |
" This is only done for the current buffer. | |
let l:item.lnum = l:last_line_number | |
elseif get(l:old_item, 'vcol', 0) | |
" Convert virtual column positions to byte positions. | |
" The positions will be off if the buffer has changed recently. | |
let l:line = getbufline(a:buffer, l:item.lnum)[0] | |
let l:item.col = ale#util#Col(l:line, l:item.col) | |
if has_key(l:item, 'end_col') | |
let l:end_line = get(l:item, 'end_lnum', l:line) != l:line ? getbufline(a:buffer, l:item.end_lnum)[0] : l:line | |
let l:item.end_col = ale#util#Col(l:end_line, l:item.end_col) | |
endif | |
endif | |
16 0.000026 call add(l:new_loclist, l:item) | |
16 0.000009 endfor | |
10 0.000166 0.000059 let l:type_map = get(ale#Var(a:buffer, 'type_map'), a:linter_name, {}) | |
10 0.000014 if !empty(l:type_map) | |
call s:RemapItemTypes(l:type_map, l:new_loclist) | |
endif | |
10 0.000009 return l:new_loclist | |
FUNCTION test#php#codeception#test_file() | |
Called 6 times | |
Total time: 0.000260 | |
Self time: 0.000260 | |
count total (s) self (s) | |
6 0.000209 if a:file =~# g:test#php#codeception#file_pattern | |
return filereadable('./codeception.yml') | |
endif | |
FUNCTION test#python#nose#build_args() | |
Called 3 times | |
Total time: 0.000007 | |
Self time: 0.000007 | |
count total (s) self (s) | |
3 0.000006 return ['--doctest-tests'] + a:args | |
FUNCTION test#viml#themis#test_file() | |
Called 6 times | |
Total time: 0.000074 | |
Self time: 0.000074 | |
count total (s) self (s) | |
6 0.000068 return a:file =~# g:test#viml#themis#file_pattern && !empty(filter(readfile(a:file), 'v:val =~# ''\<themis#suite\s*(''')) | |
FUNCTION <SNR>169_GetAliasedFiletype() | |
Called 30 times | |
Total time: 0.001348 | |
Self time: 0.001348 | |
count total (s) self (s) | |
30 0.000127 let l:buffer_aliases = get(b:, 'ale_linter_aliases', {}) | |
" b:ale_linter_aliases can be set to a List. | |
30 0.000085 if type(l:buffer_aliases) is v:t_list | |
return l:buffer_aliases | |
endif | |
" Check for aliased filetypes first in a buffer variable, | |
" then the global variable, | |
" then in the default mapping, | |
" otherwise use the original filetype. | |
120 0.000252 for l:dict in [ l:buffer_aliases, g:ale_linter_aliases, s:default_ale_linter_aliases,] | |
90 0.000223 if has_key(l:dict, a:original_filetype) | |
return l:dict[a:original_filetype] | |
endif | |
90 0.000071 endfor | |
30 0.000045 return a:original_filetype | |
FUNCTION ale#highlight#BufferHidden() | |
Called 6 times | |
Total time: 0.000213 | |
Self time: 0.000069 | |
count total (s) self (s) | |
" Remove highlights right away when buffers are hidden. | |
" They will be restored later when buffers are entered. | |
6 0.000188 0.000044 call ale#highlight#RemoveHighlights() | |
FUNCTION ale#highlight#SetHighlights() | |
Called 10 times | |
Total time: 0.002046 | |
Self time: 0.000256 | |
count total (s) self (s) | |
10 0.000076 let l:new_list = getbufvar(a:buffer, 'ale_enabled', 1) && g:ale_enabled ? filter(copy(a:loclist), 'v:val.bufnr == a:buffer && v:val.col > 0') : [] | |
" Set the list in the buffer variable. | |
10 0.000099 call setbufvar(str2nr(a:buffer), 'ale_highlight_items', l:new_list) | |
" Update highlights for the current buffer, which may or may not | |
" be the buffer we just set highlights for. | |
10 0.001835 0.000044 call ale#highlight#UpdateHighlights() | |
FUNCTION airline#extensions#quickfix#apply() | |
Called 72 times | |
Total time: 0.000530 | |
Self time: 0.000530 | |
count total (s) self (s) | |
72 0.000167 if &buftype == 'quickfix' | |
let w:airline_section_a = airline#extensions#quickfix#get_type() | |
let w:airline_section_b = '%{get(w:, "quickfix_title", "")}' | |
let w:airline_section_c = '' | |
let w:airline_section_x = '' | |
endif | |
FUNCTION ale#engine#SetResults() | |
Called 10 times | |
Total time: 0.016873 | |
Self time: 0.000836 | |
count total (s) self (s) | |
10 0.000138 0.000049 let l:linting_is_done = !ale#engine#IsCheckingBuffer(a:buffer) | |
" Set signs first. This could potentially fix some line numbers. | |
" The List could be sorted again here by SetSigns. | |
10 0.000011 if g:ale_set_signs | |
10 0.008796 0.000063 call ale#sign#SetSigns(a:buffer, a:loclist) | |
10 0.000004 endif | |
10 0.000016 if g:ale_set_quickfix || g:ale_set_loclist | |
10 0.002116 0.000045 call ale#list#SetLists(a:buffer, a:loclist) | |
10 0.000003 endif | |
10 0.000020 if exists('*ale#statusline#Update') | |
" Don't load/run if not already loaded. | |
call ale#statusline#Update(a:buffer, a:loclist) | |
endif | |
10 0.000010 if g:ale_set_highlights | |
10 0.002085 0.000039 call ale#highlight#SetHighlights(a:buffer, a:loclist) | |
10 0.000005 endif | |
10 0.000009 if l:linting_is_done | |
10 0.000009 if g:ale_echo_cursor | |
" Try and echo the warning now. | |
" This will only do something meaningful if we're in normal mode. | |
10 0.001584 0.000033 call ale#cursor#EchoCursorWarning() | |
10 0.000004 endif | |
" Reset the save event marker, used for opening windows, etc. | |
10 0.000032 call setbufvar(a:buffer, 'ale_save_event_fired', 0) | |
" Set a marker showing how many times a buffer has been checked. | |
10 0.000052 call setbufvar( a:buffer, 'ale_linted', getbufvar(a:buffer, 'ale_linted', 0) + 1) | |
" Automatically remove all managed temporary files and directories | |
" now that all jobs have completed. | |
10 0.001449 0.000042 call ale#engine#RemoveManagedFiles(a:buffer) | |
" Call user autocommands. This allows users to hook into ALE's lint cycle. | |
10 0.000422 0.000282 silent doautocmd <nomodeline> User ALELintPost | |
10 0.000007 endif | |
FUNCTION airline#extensions#languageclient#get() | |
Called 3126 times | |
Total time: 0.303284 | |
Self time: 0.204633 | |
count total (s) self (s) | |
3126 0.007998 let is_err = a:type == s:severity_error | |
3126 0.007574 let symbol = is_err ? s:error_symbol : s:warning_symbol | |
3126 0.003735 let cnt = 0 | |
15232 0.062632 0.031784 for d in s:diagnostics_for_buffer() | |
12106 0.025191 if has_key(d, 'severity') && d.severity == a:type | |
6053 0.006469 let cnt += 1 | |
6053 0.002733 endif | |
12106 0.068759 endfor | |
3126 0.003195 if cnt == 0 | |
2004 0.001324 return '' | |
endif | |
1122 0.001560 if s:show_line_numbers == 1 | |
1122 0.081269 0.013466 return s:airline_languageclient_count(cnt, symbol) . <sid>airline_languageclient_get_line_number(a:type) | |
else | |
return s:airline_languageclient_count(cnt, symbol) | |
endif | |
FUNCTION test#base#build_args() | |
Called 3 times | |
Total time: 0.000021 | |
Self time: 0.000014 | |
count total (s) self (s) | |
3 0.000020 0.000013 return test#{a:runner}#build_args(a:args) | |
FUNCTION ncm2#_real_popup() | |
Called 10 times | |
Total time: 0.082575 | |
Self time: 0.082114 | |
count total (s) self (s) | |
10 0.000062 let pos = getcurpos() | |
10 0.000031 if s:lnum != pos[1] | |
6 0.000023 let s:lnum = pos[1] | |
6 0.000018 let s:matches = [] | |
6 0.000009 endif | |
10 0.000025 if pos[2] < s:startbcol | |
let s:matches = [] | |
endif | |
10 0.000155 0.000058 if ncm2#menu_selected() | |
return '' | |
endif | |
10 0.000024 if empty(s:matches) | |
" this enables the vanilla <c-n> and <c-p> keys behavior when | |
" there's no popup | |
8 0.000015 if pumvisible() | |
call s:feedkeys("\<c-e>", "ni") | |
endif | |
8 0.000602 0.000385 doau <nomodeline> User Ncm2PopupClose | |
8 0.000032 return '' | |
endif | |
2 0.000126 0.000087 doau <nomodeline> User Ncm2PopupOpen | |
2 0.081252 0.081146 call complete(s:startbcol, s:matches) | |
2 0.000004 return '' | |
FUNCTION <SNR>184_get_vcs_path() | |
Called 7 times | |
Total time: 0.000156 | |
Self time: 0.000156 | |
count total (s) self (s) | |
7 0.000145 return (a:vcs =~# '\v(git|cvs|accurev|tfs)') ? b:sy.info.file : b:sy.info.path | |
FUNCTION <SNR>174_defs_stack_prune() | |
Called 45 times | |
Total time: 0.000810 | |
Self time: 0.000810 | |
count total (s) self (s) | |
90 0.000178 for idx in range(len(a:defs_stack)) | |
90 0.000226 let ind_stack = a:cache[(a:defs_stack[idx])]['indent'] | |
90 0.000081 if a:ind == ind_stack | |
45 0.000078 return a:defs_stack[(idx + 1):] | |
elseif a:ind > ind_stack | |
return a:defs_stack[(idx):] | |
endif | |
45 0.000023 endfor | |
return [] | |
FUNCTION gutentags#make_args() | |
Called 7 times | |
Total time: 0.000931 | |
Self time: 0.000931 | |
count total (s) self (s) | |
7 0.000029 let l:outcmd = [] | |
98 0.000065 for cmdarg in a:cmd | |
" Thanks Vimscript... you can use negative integers for strings | |
" in the slice notation, but not for indexing characters :( | |
91 0.000116 let l:arglen = strlen(cmdarg) | |
91 0.000221 if (cmdarg[0] == '"' && cmdarg[l:arglen - 1] == '"') || (cmdarg[0] == "'" && cmdarg[l:arglen - 1] == "'") | |
42 0.000067 call add(l:outcmd, cmdarg[1:-2]) | |
42 0.000021 else | |
49 0.000060 call add(l:outcmd, cmdarg) | |
49 0.000027 endif | |
91 0.000074 endfor | |
7 0.000006 return l:outcmd | |
FUNCTION ncm2#_real_update_matches() | |
Called 8 times | |
Total time: 0.000641 | |
Self time: 0.000369 | |
count total (s) self (s) | |
8 0.000181 0.000078 if s:context_tick() != a:ctx.tick | |
2 0.000001 return | |
endif | |
" The popup is expected to be opened while it has been closed | |
6 0.000035 if !empty(s:matches) && !pumvisible() | |
if empty(v:completed_item) | |
" the user closed the popup with <c-e> | |
" TODO suppress future completion unless another word started | |
call s:cache_matches_cleanup() | |
return | |
else | |
" this should have been handled in CompleteDone, but we have newer | |
" matches now. It's ok to proceed | |
endif | |
endif | |
6 0.000019 let s:startbcol = a:startbcol | |
6 0.000015 let s:matches = a:matches | |
6 0.000014 let s:lnum = a:ctx.lnum | |
6 0.000248 0.000079 call s:feedkeys("\<Plug>(ncm2_complete_popup)") | |
FUNCTION airline#extensions#tabline#builder#new() | |
Called 59 times | |
Total time: 0.002462 | |
Self time: 0.000963 | |
count total (s) self (s) | |
59 0.001822 0.000323 let builder = airline#builder#new(a:context) | |
59 0.000125 let builder._build = builder.build | |
59 0.000368 call extend(builder, s:prototype, 'force') | |
59 0.000055 return builder | |
FUNCTION ale#engine#HandleLoclist() | |
Called 10 times | |
Total time: 0.021213 | |
Self time: 0.000409 | |
count total (s) self (s) | |
10 0.000038 let l:info = get(g:ale_buffer_info, a:buffer, {}) | |
10 0.000011 if empty(l:info) | |
return | |
endif | |
" Remove this linter from the list of active linters. | |
" This may have already been done when the job exits. | |
10 0.000024 call filter(l:info.active_linter_list, 'v:val isnot# a:linter_name') | |
" Make some adjustments to the loclists to fix common problems, and also | |
" to set default values for loclist items. | |
10 0.003221 0.000051 let l:linter_loclist = ale#engine#FixLocList(a:buffer, a:linter_name, a:loclist) | |
" Remove previous items for this linter. | |
10 0.000062 call filter(l:info.loclist, 'v:val.linter_name isnot# a:linter_name') | |
" We don't need to add items or sort the list when this list is empty. | |
10 0.000014 if !empty(l:linter_loclist) | |
" Add the new items. | |
10 0.000019 call extend(l:info.loclist, l:linter_loclist) | |
" Sort the loclist again. | |
" We need a sorted list so we can run a binary search against it | |
" for efficient lookup of the messages in the cursor handler. | |
10 0.000108 0.000036 call sort(l:info.loclist, 'ale#util#LocItemCompare') | |
10 0.000004 endif | |
10 0.000716 0.000027 if ale#ShouldDoNothing(a:buffer) | |
return | |
endif | |
10 0.016912 0.000039 call ale#engine#SetResults(a:buffer, l:info.loclist) | |
FUNCTION gutentags#trace() | |
Called 57 times | |
Total time: 0.000327 | |
Self time: 0.000327 | |
count total (s) self (s) | |
57 0.000117 if g:gutentags_trace || (a:0 && a:1) | |
let l:message = "gutentags: " . a:message | |
echom l:message | |
endif | |
FUNCTION LanguageClient#textDocument_rename() | |
Called 3 times | |
Total time: 0.006457 | |
Self time: 0.000418 | |
count total (s) self (s) | |
3 0.001429 0.000183 let l:params = { 'filename': LSP#filename(), 'text': LSP#text(), 'line': LSP#line(), 'character': LSP#character(), 'cword': expand('<cword>'), 'handle': v:true, } | |
3 0.000131 call extend(l:params, a:0 >= 1 ? a:1 : {}) | |
3 0.000025 let l:Callback = a:0 >= 2 ? a:2 : v:null | |
3 0.004853 0.000059 return LanguageClient#Call('textDocument/rename', l:params, v:null) | |
FUNCTION <SNR>150_add_register() | |
Called 18 times | |
Total time: 0.000176 | |
Self time: 0.000176 | |
count total (s) self (s) | |
" Append register value. | |
18 0.000044 if !has_key(s:yank_histories, a:name) | |
let s:yank_histories[a:name] = [] | |
endif | |
18 0.000062 if get(s:yank_histories[a:name], 0, []) ==# a:reg | |
" Skip same register value. | |
18 0.000009 return | |
endif | |
let len_history = len(a:reg[0]) | |
" Ignore too long yank. | |
if len_history < 2 || len_history > 10000 || a:reg[0] =~ '[\x00-\x08\x10-\x1a\x1c-\x1f]\{3,}' | |
return | |
endif | |
" Error check | |
try | |
call s:vim2json(a:reg) | |
catch | |
return | |
endtry | |
let s:prev_registers[a:name] = a:reg | |
call insert(s:yank_histories[a:name], a:reg) | |
call s:uniq(a:name) | |
FUNCTION ale#history#Get() | |
Called 20 times | |
Total time: 0.000222 | |
Self time: 0.000222 | |
count total (s) self (s) | |
20 0.000210 return copy(getbufvar(a:buffer, 'ale_history', [])) | |
FUNCTION <SNR>194_RunLinter() | |
Called 10 times | |
Total time: 0.271879 | |
Self time: 0.000505 | |
count total (s) self (s) | |
10 0.000035 if !empty(a:linter.lsp) | |
return ale#lsp_linter#CheckWithLSP(a:buffer, a:linter) | |
else | |
10 0.026406 0.000077 let l:executable = ale#linter#GetExecutable(a:buffer, a:linter) | |
10 0.000246 0.000067 if ale#engine#IsExecutable(a:buffer, l:executable) | |
10 0.245035 0.000170 return s:InvokeChain(a:buffer, l:executable, a:linter, 0, []) | |
endif | |
endif | |
return 0 | |
FUNCTION ncm2_bufword#on_complete() | |
Called 3 times | |
Total time: 0.000197 | |
Self time: 0.000021 | |
count total (s) self (s) | |
3 0.000196 0.000020 call g:ncm2_bufword#proc.try_notify('on_complete', a:ctx) | |
FUNCTION ncm2#complete() | |
Called 17 times | |
Total time: 0.005461 | |
Self time: 0.000594 | |
count total (s) self (s) | |
17 0.000062 let refresh = 0 | |
17 0.000032 if len(a:000) | |
12 0.000018 let refresh = a:1 | |
12 0.000017 endif | |
17 0.000224 0.000122 let dated = s:context_tick() != a:ctx.tick | |
17 0.000033 let a:ctx.dated = dated | |
17 0.004942 0.000177 call s:try_rnotify('complete', a:ctx, a:startccol, a:matches, refresh) | |
17 0.000021 if dated && refresh | |
call ncm2#_on_complete(2) | |
endif | |
FUNCTION ncm2_path#on_warmup() | |
Called 63 times | |
Total time: 0.000620 | |
Self time: 0.000159 | |
count total (s) self (s) | |
63 0.000602 0.000141 call g:ncm2_path#proc.jobstart() | |
FUNCTION airline#util#has_lawrencium() | |
Called 1563 times | |
Total time: 0.005006 | |
Self time: 0.005006 | |
count total (s) self (s) | |
1563 0.004303 return exists('*lawrencium#statusline') | |
FUNCTION ale#semver#GetVersion() | |
Called 10 times | |
Total time: 0.000250 | |
Self time: 0.000250 | |
count total (s) self (s) | |
10 0.000051 let l:version = get(s:version_cache, a:executable, []) | |
10 0.000026 for l:line in a:version_lines | |
let l:match = matchlist(l:line, '\v(\d+)\.(\d+)\.(\d+)') | |
if !empty(l:match) | |
let l:version = [l:match[1] + 0, l:match[2] + 0, l:match[3] + 0] | |
let s:version_cache[a:executable] = l:version | |
break | |
endif | |
endfor | |
10 0.000015 return l:version | |
FUNCTION <SNR>184_callback_nvim_stdout() | |
Called 14 times | |
Total time: 0.000207 | |
Self time: 0.000207 | |
count total (s) self (s) | |
14 0.000049 if empty(self.stdoutbuf) || empty(self.stdoutbuf[-1]) | |
14 0.000087 let self.stdoutbuf += a:data | |
14 0.000007 else | |
let self.stdoutbuf = self.stdoutbuf[:-2] + [self.stdoutbuf[-1] . get(a:data, 0, '')] + a:data[1:] | |
endif | |
FUNCTION 11385() | |
Called 11 times | |
Total time: 0.000043 | |
Self time: 0.000043 | |
count total (s) self (s) | |
11 0.000021 let bufnum = get(self.buffers, a:i, -1) | |
11 0.000019 return '%'.bufnum.'@airline#extensions#tabline#buffers#clickbuf@' | |
FUNCTION 11386() | |
Called 11 times | |
Total time: 0.000009 | |
Self time: 0.000009 | |
count total (s) self (s) | |
11 0.000007 return '%X' | |
FUNCTION ale#util#StartPartialTimer() | |
Called 3 times | |
Total time: 0.000032 | |
Self time: 0.000032 | |
count total (s) self (s) | |
3 0.000014 let l:timer_id = timer_start(a:delay, function('s:ApplyPartialTimer')) | |
3 0.000012 let s:partial_timers[l:timer_id] = [a:callback, a:args] | |
3 0.000003 return l:timer_id | |
FUNCTION test#javascript#tap#test_file() | |
Called 6 times | |
Total time: 0.000078 | |
Self time: 0.000078 | |
count total (s) self (s) | |
6 0.000073 return a:file =~# g:test#javascript#tap#file_pattern && test#javascript#has_package('tap') | |
FUNCTION ale#linter#GetExecutable() | |
Called 10 times | |
Total time: 0.026330 | |
Self time: 0.000230 | |
count total (s) self (s) | |
10 0.026310 0.000211 return has_key(a:linter, 'executable_callback') ? ale#util#GetFunction(a:linter.executable_callback)(a:buffer) : a:linter.executable | |
FUNCTION test#python#pyunit#test_file() | |
Called 6 times | |
Total time: 0.000061 | |
Self time: 0.000061 | |
count total (s) self (s) | |
6 0.000030 if fnamemodify(a:file, ':t') =~# g:test#python#pyunit#file_pattern | |
if exists('g:test#python#runner') | |
return g:test#python#runner ==# 'pyunit' | |
else | |
return executable('python') | |
endif | |
endif | |
FUNCTION test#javascript#karma#test_file() | |
Called 6 times | |
Total time: 0.000154 | |
Self time: 0.000154 | |
count total (s) self (s) | |
6 0.000149 return a:file =~? g:test#javascript#karma#file_pattern && test#javascript#has_package('karma') | |
FUNCTION ale#util#GetFunction() | |
Called 80 times | |
Total time: 0.000564 | |
Self time: 0.000564 | |
count total (s) self (s) | |
80 0.000247 if type(a:string_or_ref) is v:t_string | |
40 0.000132 return function(a:string_or_ref) | |
endif | |
40 0.000039 return a:string_or_ref | |
FUNCTION airline#extensions#tabline#new_builder() | |
Called 59 times | |
Total time: 0.004376 | |
Self time: 0.001914 | |
count total (s) self (s) | |
59 0.000627 let builder_context = { 'active' : 1, 'tabline' : 1, 'right_sep' : get(g:, 'airline#extensions#tabline#right_sep' , g:airline_right_sep), 'right_alt_sep' : get(g:, 'airline#extensions#tabline#right_alt_sep', g:airline_right_alt_sep), } | |
59 0.000116 if get(g:, 'airline_powerline_fonts', 0) | |
let builder_context.left_sep = get(g:, 'airline#extensions#tabline#left_sep' , g:airline_left_sep) | |
let builder_context.left_alt_sep = get(g:, 'airline#extensions#tabline#left_alt_sep' , g:airline_left_alt_sep) | |
else | |
59 0.000198 let builder_context.left_sep = get(g:, 'airline#extensions#tabline#left_sep' , ' ') | |
59 0.000171 let builder_context.left_alt_sep = get(g:, 'airline#extensions#tabline#left_alt_sep' , '|') | |
59 0.000029 endif | |
59 0.002760 0.000298 return airline#extensions#tabline#builder#new(builder_context) | |
FUNCTION airline#extensions#tabline#tabs#invalidate() | |
Called 3 times | |
Total time: 0.000012 | |
Self time: 0.000012 | |
count total (s) self (s) | |
3 0.000009 let s:current_bufnr = -1 | |
FUNCTION ale#util#Tempname() | |
Called 10 times | |
Total time: 0.000272 | |
Self time: 0.000272 | |
count total (s) self (s) | |
10 0.000025 let l:clear_tempdir = 0 | |
10 0.000044 if exists('$TMPDIR') && empty($TMPDIR) | |
let l:clear_tempdir = 1 | |
let $TMPDIR = '/tmp' | |
endif | |
10 0.000015 try | |
10 0.000040 let l:name = tempname() " no-custom-checks | |
10 0.000015 finally | |
10 0.000016 if l:clear_tempdir | |
let $TMPDIR = '' | |
endif | |
10 0.000011 endtry | |
10 0.000015 return l:name | |
FUNCTION ale#sign#ReadSigns() | |
Called 10 times | |
Total time: 0.000277 | |
Self time: 0.000277 | |
count total (s) self (s) | |
10 0.000026 redir => l:output | |
10 0.000164 silent execute 'sign place buffer=' . a:buffer | |
10 0.000021 redir end | |
10 0.000047 return split(l:output, "\n") | |
FUNCTION <SNR>197_FindHistoryItem() | |
Called 20 times | |
Total time: 0.000404 | |
Self time: 0.000182 | |
count total (s) self (s) | |
" Search backwards to find a matching job ID. IDs might be recycled, | |
" so finding the last one should be good enough. | |
20 0.000314 0.000093 for l:obj in reverse(ale#history#Get(a:buffer)) | |
20 0.000025 if l:obj.job_id == a:job_id | |
20 0.000022 return l:obj | |
endif | |
endfor | |
return {} | |
FUNCTION <SNR>109_is_excluded_window() | |
Called 183 times | |
Total time: 0.007457 | |
Self time: 0.007457 | |
count total (s) self (s) | |
183 0.000459 for matchft in g:airline_exclude_filetypes | |
if matchft ==# &ft | |
return 1 | |
endif | |
endfor | |
732 0.000789 for matchw in g:airline_exclude_filenames | |
549 0.002987 if matchstr(expand('%'), matchw) ==# matchw | |
return 1 | |
endif | |
549 0.000289 endfor | |
183 0.000309 if g:airline_exclude_preview && &previewwindow | |
return 1 | |
endif | |
183 0.000144 return 0 | |
FUNCTION airline#themes#generate_color_map() | |
Called 114 times | |
Total time: 0.007612 | |
Self time: 0.007612 | |
count total (s) self (s) | |
114 0.002493 let palette = { 'airline_a': [ a:sect1[0] , a:sect1[1] , a:sect1[2] , a:sect1[3] , get(a:sect1 , 4 , '') ] , 'airline_b': [ a:sect2[0] , a:sect2[1] , a:sect2[2] , a:sect2[3] , get(a:sect2 , 4 , '') ] , 'airline_c': [ a:sect3[0] , a:sect3[1] , a:sect3[2] , a:sect3[3] , get(a:sect3 , 4 , '') ] , } | |
114 0.000190 if a:0 > 0 | |
38 0.000896 call extend(palette, { 'airline_x': [ a:1[0] , a:1[1] , a:1[2] , a:1[3] , get(a:1 , 4 , '' ) ] , 'airline_y': [ a:2[0] , a:2[1] , a:2[2] , a:2[3] , get(a:2 , 4 , '' ) ] , 'airline_z': [ a:3[0] , a:3[1] , a:3[2] , a:3[3] , get(a:3 , 4 , '' ) ] , }) | |
38 0.000032 else | |
76 0.002078 call extend(palette, { 'airline_x': [ a:sect3[0] , a:sect3[1] , a:sect3[2] , a:sect3[3] , '' ] , 'airline_y': [ a:sect2[0] , a:sect2[1] , a:sect2[2] , a:sect2[3] , '' ] , 'airline_z': [ a:sect1[0] , a:sect1[1] , a:sect1[2] , a:sect1[3] , '' ] , }) | |
76 0.000091 endif | |
114 0.000178 return palette | |
FUNCTION ncm2#context_dated() | |
Called 4 times | |
Total time: 0.000018 | |
Self time: 0.000018 | |
count total (s) self (s) | |
4 0.000016 return a:ctx.context_id < get(s:completion_notified, a:ctx.source.name, 0) | |
FUNCTION <SNR>68_PerformMatchHighlight() | |
Called 74 times | |
Total time: 0.005514 | |
Self time: 0.004085 | |
count total (s) self (s) | |
74 0.001650 0.000222 if <SID>ShouldHighlight() | |
59 0.003643 exe 'match ExtraWhitespace "' . a:pattern . '"' | |
59 0.000047 else | |
15 0.000016 match ExtraWhitespace '' | |
15 0.000005 endif | |
FUNCTION <SNR>220_remove_quote_pairs() | |
Called 3 times | |
Total time: 0.000134 | |
Self time: 0.000134 | |
count total (s) self (s) | |
" remove leading/ending quote pairs | |
3 0.000013 let s = a:s | |
3 0.000022 if s[0] ==# '"' && s[len(s) - 1] ==# '"' | |
let s = s[1: len(s) - 2] | |
elseif s[0] ==# "'" && s[len(s) - 1] ==# "'" | |
let s = s[1: len(s) - 2] | |
else | |
3 0.000033 let s = substitute(a:s, '\\\(.\)', "\\1", 'g') | |
3 0.000005 endif | |
3 0.000007 return s | |
FUNCTION <SNR>20_LoadFTPlugin() | |
Called 5 times | |
Total time: 0.006545 | |
Self time: 0.006545 | |
count total (s) self (s) | |
5 0.000024 if exists("b:undo_ftplugin") | |
exe b:undo_ftplugin | |
unlet! b:undo_ftplugin b:did_ftplugin | |
endif | |
5 0.000011 let s = expand("<amatch>") | |
5 0.000005 if s != "" | |
5 0.000026 if &cpo =~# "S" && exists("b:did_ftplugin") | |
" In compatible mode options are reset to the global values, need to | |
" set the local values also when a plugin was already used. | |
unlet b:did_ftplugin | |
endif | |
" When there is a dot it is used to separate filetype names. Thus for | |
" "aaa.bbb" load "aaa" and then "bbb". | |
10 0.000021 for name in split(s, '\.') | |
5 0.006364 exe 'runtime! ftplugin/' . name . '.vim ftplugin/' . name . '_*.vim ftplugin/' . name . '/*.vim' | |
5 0.000015 endfor | |
5 0.000003 endif | |
FUNCTION test#elm#elmtest#test_file() | |
Called 6 times | |
Total time: 0.000086 | |
Self time: 0.000086 | |
count total (s) self (s) | |
6 0.000083 return a:file =~# g:test#elm#elmtest#file_pattern | |
FUNCTION airline#extensions#tabline#load_theme() | |
Called 19 times | |
Total time: 0.074524 | |
Self time: 0.001925 | |
count total (s) self (s) | |
19 0.000022 if pumvisible() | |
return | |
endif | |
19 0.000061 let colors = get(a:palette, 'tabline', {}) | |
19 0.000053 let tablabel = get(colors, 'airline_tablabel', a:palette.normal.airline_b) | |
" Theme for tabs on the left | |
19 0.000036 let tab = get(colors, 'airline_tab', a:palette.normal.airline_b) | |
19 0.000035 let tabsel = get(colors, 'airline_tabsel', a:palette.normal.airline_a) | |
19 0.000045 let tabtype = get(colors, 'airline_tabtype', a:palette.visual.airline_a) | |
19 0.000033 let tabfill = get(colors, 'airline_tabfill', a:palette.normal.airline_c) | |
19 0.000057 let tabmod = get(colors, 'airline_tabmod', a:palette.insert.airline_a) | |
19 0.000030 let tabhid = get(colors, 'airline_tabhid', a:palette.normal.airline_c) | |
19 0.000052 if has_key(a:palette, 'normal_modified') && has_key(a:palette.normal_modified, 'airline_c') | |
let tabmodu = get(colors, 'airline_tabmod_unsel', a:palette.normal_modified.airline_c) | |
else | |
"Fall back to normal airline_c if modified airline_c isn't present | |
19 0.000036 let tabmodu = get(colors, 'airline_tabmod_unsel', a:palette.normal.airline_c) | |
19 0.000007 endif | |
19 0.005752 0.000086 call airline#highlighter#exec('airline_tablabel', tablabel) | |
19 0.005888 0.000084 call airline#highlighter#exec('airline_tab', tab) | |
19 0.005935 0.000084 call airline#highlighter#exec('airline_tabsel', tabsel) | |
19 0.005416 0.000064 call airline#highlighter#exec('airline_tabtype', tabtype) | |
19 0.005606 0.000067 call airline#highlighter#exec('airline_tabfill', tabfill) | |
19 0.005700 0.000083 call airline#highlighter#exec('airline_tabmod', tabmod) | |
19 0.005603 0.000065 call airline#highlighter#exec('airline_tabmod_unsel', tabmodu) | |
19 0.005464 0.000062 call airline#highlighter#exec('airline_tabhid', tabhid) | |
" Theme for tabs on the right | |
19 0.000060 let tabsel_right = get(colors, 'airline_tabsel_right', a:palette.normal.airline_a) | |
19 0.000049 let tab_right = get(colors, 'airline_tab_right', a:palette.inactive.airline_c) | |
19 0.000037 let tabmod_right = get(colors, 'airline_tabmod_right', a:palette.insert.airline_a) | |
19 0.000034 let tabhid_right = get(colors, 'airline_tabhid_right', a:palette.normal.airline_c) | |
19 0.000050 if has_key(a:palette, 'normal_modified') && has_key(a:palette.normal_modified, 'airline_c') | |
let tabmodu_right = get(colors, 'airline_tabmod_unsel_right', a:palette.normal_modified.airline_c) | |
else | |
"Fall back to normal airline_c if modified airline_c isn't present | |
19 0.000042 let tabmodu_right = get(colors, 'airline_tabmod_unsel_right', a:palette.normal.airline_c) | |
19 0.000007 endif | |
19 0.006358 0.000067 call airline#highlighter#exec('airline_tab_right', tab_right) | |
19 0.005727 0.000073 call airline#highlighter#exec('airline_tabsel_right', tabsel_right) | |
19 0.005420 0.000068 call airline#highlighter#exec('airline_tabmod_right', tabmod_right) | |
19 0.005303 0.000069 call airline#highlighter#exec('airline_tabhid_right', tabhid_right) | |
19 0.005377 0.000077 call airline#highlighter#exec('airline_tabmod_unsel_right', tabmodu_right) | |
FUNCTION airline#extensions#denite#check_denite_mode() | |
Called 18 times | |
Total time: 0.987788 | |
Self time: 0.000662 | |
count total (s) self (s) | |
18 0.000064 if &filetype != 'denite' | |
return '' | |
endif | |
18 0.000471 0.000201 let mode = split(denite#get_status_mode(), ' ') | |
18 0.000085 let mode = tolower(mode[1]) | |
18 0.000086 if !exists('b:denite_mode_cache') || mode != b:denite_mode_cache | |
5 0.986888 0.000032 call airline#highlighter#highlight([mode], a:bufnr) | |
5 0.000010 let b:denite_mode_cache = mode | |
5 0.000002 endif | |
18 0.000017 return '' | |
FUNCTION <SNR>68_ShouldHighlight() | |
Called 128 times | |
Total time: 0.002428 | |
Self time: 0.001737 | |
count total (s) self (s) | |
128 0.001177 0.000486 call s:InitVariable('b:better_whitespace_enabled', -1) | |
128 0.000148 if b:better_whitespace_enabled < 0 | |
21 0.000040 if empty(&buftype) && empty(&filetype) | |
" We can't initialize buffer value properly yet, fall back to global one | |
16 0.000016 return g:better_whitespace_enabled | |
else | |
5 0.000015 let b:better_whitespace_enabled = &buftype != 'nofile' && index(g:better_whitespace_filetypes_blacklist, &ft) == -1 | |
5 0.000002 endif | |
5 0.000002 endif | |
112 0.000119 return b:better_whitespace_enabled | |
FUNCTION airline#highlighter#reset_hlcache() | |
Called 19 times | |
Total time: 0.064572 | |
Self time: 0.064572 | |
count total (s) self (s) | |
19 0.064525 let s:hl_groups = {} | |
FUNCTION signature#utils#Input() | |
Called 2 times | |
Total time: 0.000134 | |
Self time: 0.000113 | |
count total (s) self (s) | |
" Description: Grab input char | |
2 0.000008 if &ft ==# "netrw" | |
" Workaround for #104 | |
return | |
endif | |
" Obtain input from user ... | |
2 0.000007 let l:in = nr2char(getchar()) | |
" ... if the input is not a number eg. '!' ==> Delete all '!' markers | |
2 0.000018 0.000007 if signature#utils#IsValidMarker(l:in) | |
return signature#marker#Purge(l:in) | |
endif | |
" ... but if input is a number, convert it to corresponding marker before proceeding | |
2 0.000009 if match(l:in, '\d') >= 0 | |
let l:char = signature#utils#GetChar(b:SignatureIncludeMarkers, l:in) | |
else | |
2 0.000002 let l:char = l:in | |
2 0.000001 endif | |
2 0.000010 0.000005 if signature#utils#IsValidMarker(l:char) | |
return signature#marker#Toggle(l:char) | |
elseif signature#utils#IsValidMark(l:char) | |
return signature#mark#Toggle(l:char) | |
else | |
" l:char is probably one of `'[]<> or a space from the gap in b:SignatureIncludeMarkers | |
2 0.000018 execute 'normal! m' . l:in | |
2 0.000001 endif | |
FUNCTION <SNR>220_eval_cmdline() | |
Called 1 time | |
Total time: 0.000413 | |
Self time: 0.000413 | |
count total (s) self (s) | |
1 0.000003 let cmdline = '' | |
1 0.000002 let prev_match = 0 | |
1 0.000027 let eval_pos = match(a:cmdline, '\\\@<!`.\{-}\\\@<!`') | |
2 0.000009 while eval_pos >= 0 | |
1 0.000002 if eval_pos - prev_match > 0 | |
1 0.000004 let cmdline .= a:cmdline[prev_match : eval_pos - 1] | |
1 0.000001 endif | |
1 0.000023 let prev_match = matchend(a:cmdline, '\\\@<!`.\{-}\\\@<!`', eval_pos) | |
1 0.000217 let cmdline .= escape(eval(a:cmdline[eval_pos+1 : prev_match - 2]), '\ ') | |
1 0.000046 let eval_pos = match(a:cmdline, '\\\@<!`.\{-}\\\@<!`', prev_match) | |
1 0.000005 endwhile | |
1 0.000005 if prev_match >= 0 | |
1 0.000009 let cmdline .= a:cmdline[prev_match :] | |
1 0.000002 endif | |
1 0.000006 return cmdline | |
FUNCTION <SNR>168_ApplyPartialTimer() | |
Called 3 times | |
Total time: 0.000917 | |
Self time: 0.000054 | |
count total (s) self (s) | |
3 0.000006 if has_key(s:partial_timers, a:timer_id) | |
3 0.000012 let [l:Callback, l:args] = remove(s:partial_timers, a:timer_id) | |
3 0.000897 0.000033 call call(l:Callback, [a:timer_id] + l:args) | |
3 0.000001 endif | |
FUNCTION <SNR>113_init_buffer() | |
Called 3 times | |
Total time: 0.000060 | |
Self time: 0.000060 | |
count total (s) self (s) | |
3 0.000009 let b:buffer_vcs_config = {} | |
9 0.000016 for vcs in keys(s:vcs_config) | |
6 0.000019 let b:buffer_vcs_config[vcs] = { 'branch': '', 'untracked': '', } | |
6 0.000003 endfor | |
3 0.000004 unlet! b:airline_head | |
FUNCTION test#javascript#lab#test_file() | |
Called 6 times | |
Total time: 0.000159 | |
Self time: 0.000159 | |
count total (s) self (s) | |
6 0.000079 if a:file =~# g:test#javascript#lab#file_pattern | |
for line in readfile(a:file) | |
let pattern = '\v[Ll]ab.script\(\)' | |
if line =~# pattern | |
return 1 | |
endif | |
endfor | |
return 0 | |
endif | |
FUNCTION ale_linters#python#flake8#VersionCheck() | |
Called 10 times | |
Total time: 0.024515 | |
Self time: 0.000172 | |
count total (s) self (s) | |
10 0.024356 0.000067 let l:executable = ale_linters#python#flake8#GetExecutable(a:buffer) | |
" If we have previously stored the version number in a cache, then | |
" don't look it up again. | |
10 0.000113 0.000059 if ale#semver#HasVersion(l:executable) | |
" Returning an empty string skips this command. | |
10 0.000011 return '' | |
endif | |
let l:executable = ale#Escape(l:executable) | |
let l:module_string = s:UsingModule(a:buffer) ? ' -m flake8' : '' | |
return l:executable . l:module_string . ' --version' | |
FUNCTION test#javascript#jest#test_file() | |
Called 6 times | |
Total time: 0.000151 | |
Self time: 0.000151 | |
count total (s) self (s) | |
6 0.000147 return a:file =~# g:test#javascript#jest#file_pattern && test#javascript#has_package('jest') | |
FUNCTION airline#builder#new() | |
Called 252 times | |
Total time: 0.006209 | |
Self time: 0.006209 | |
count total (s) self (s) | |
252 0.001408 let builder = copy(s:prototype) | |
252 0.000556 let builder._context = a:context | |
252 0.000456 let builder._sections = [] | |
252 0.003065 call extend(builder._context, { 'left_sep': g:airline_left_sep, 'left_alt_sep': g:airline_left_alt_sep, 'right_sep': g:airline_right_sep, 'right_alt_sep': g:airline_right_alt_sep, }, 'keep') | |
252 0.000290 return builder | |
FUNCTION <SNR>194_RemoveProblemsForDisabledLinters() | |
Called 10 times | |
Total time: 0.000336 | |
Self time: 0.000336 | |
count total (s) self (s) | |
" Figure out which linters are still enabled, and remove | |
" problems for linters which are no longer enabled. | |
10 0.000022 let l:name_map = {} | |
20 0.000050 for l:linter in a:linters | |
10 0.000041 let l:name_map[l:linter.name] = 1 | |
10 0.000009 endfor | |
10 0.000152 call filter( get(g:ale_buffer_info[a:buffer], 'loclist', []), 'get(l:name_map, get(v:val, ''linter_name''))',) | |
FUNCTIONS SORTED ON TOTAL TIME | |
count total (s) self (s) function | |
158 46.939884 2.611961 airline#highlighter#highlight() | |
1777 38.952884 0.199075 airline#check_mode() | |
242776 35.010703 13.158425 airline#highlighter#get_highlight() | |
48285 28.323897 1.073271 <SNR>130_exec_separator() | |
143654 27.155910 5.138749 airline#highlighter#exec() | |
5 21.619627 0.000490 denite#helper#call_denite() | |
5 21.609389 0.000286 denite#start() | |
5 21.609102 0.000304 <SNR>222_start() | |
5 21.606710 0.000091 _denite_start() | |
5 21.606619 16.738998 remote#define#request() | |
485894 20.537083 <SNR>130_get_syn() | |
96646 18.008990 0.370215 airline#themes#get_highlight() | |
19 7.847140 0.001474 airline#load_theme() | |
19 7.277207 0.001261 airline#highlighter#load_theme() | |
9 4.072048 0.001118 <SNR>32_airline_refresh() | |
10 4.021432 0.001170 <SNR>32_on_colorscheme_changed() | |
141598 3.137250 <SNR>130_hl_group_exists() | |
311 2.514554 0.206119 19() | |
189 2.465652 1.282707 <SNR>145_HandleMessage() | |
143654 1.959243 <SNR>130_CheckDefined() | |
FUNCTIONS SORTED ON SELF TIME | |
count total (s) self (s) function | |
485894 20.537083 <SNR>130_get_syn() | |
5 21.606619 16.738998 remote#define#request() | |
242776 35.010703 13.158425 airline#highlighter#get_highlight() | |
143654 27.155910 5.138749 airline#highlighter#exec() | |
141598 3.137250 <SNR>130_hl_group_exists() | |
158 46.939884 2.611961 airline#highlighter#highlight() | |
143654 1.959243 <SNR>130_CheckDefined() | |
242947 1.367399 <SNR>130_get_array() | |
189 2.465652 1.282707 <SNR>145_HandleMessage() | |
13 1.171109 1.170993 <SNR>115_record_diagnostics() | |
48285 28.323897 1.073271 <SNR>130_exec_separator() | |
96646 18.008990 0.370215 airline#themes#get_highlight() | |
2851 0.357732 0.344259 airline#extensions#tabline#buflist#list() | |
6 0.357231 0.250454 <SNR>174_cache() | |
84 0.241304 0.240608 airline#async#nvim_vcs_untracked() | |
311 2.514554 0.206119 19() | |
3126 0.303284 0.204633 airline#extensions#languageclient#get() | |
1777 38.952884 0.199075 airline#check_mode() | |
10 0.179741 0.179658 ale#job#Start() | |
612 0.121258 fugitive#Head() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment