Created
June 14, 2019 15:16
-
-
Save itchyny/3cb5a09e190fd1c7da4755d3a51e9a1e to your computer and use it in GitHub Desktop.
This file contains hidden or 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/local/Cellar/vim/8.1.1500/share/vim/vim81/scripts.vim | |
Sourced 1 time | |
Total time: 0.001107 | |
Self time: 0.001107 | |
count total (s) self (s) | |
" Vim support file to detect file types in scripts | |
" | |
" Maintainer: Bram Moolenaar <[email protected]> | |
" Last change: 2018 Feb 03 | |
" 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. | |
1 0.000004 if did_filetype() | |
finish | |
1 0.000001 endif | |
" Load the user defined scripts file first | |
" Only do this when the FileType autocommand has not been triggered yet | |
1 0.000004 if exists("myscriptsfile") && filereadable(expand(myscriptsfile)) | |
execute "source " . myscriptsfile | |
if did_filetype() | |
finish | |
endif | |
1 0.000001 endif | |
" Line continuation is used here, remove 'C' from 'cpoptions' | |
1 0.000009 let s:cpo_save = &cpo | |
1 0.000009 set cpo&vim | |
1 0.000004 let s:line1 = getline(1) | |
1 0.000006 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 | |
" Pike | |
elseif s:name =~# '^pike\%(\>\|[0-9]\)' | |
set ft=pike | |
" 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\)\=\>\|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 | |
" Clojure | |
elseif s:name =~# 'clojure' | |
set ft=clojure | |
endif | |
unlet s:name | |
1 0.000001 else | |
" File does not start with "#!". | |
1 0.000003 let s:line2 = getline(2) | |
1 0.000002 let s:line3 = getline(3) | |
1 0.000002 let s:line4 = getline(4) | |
1 0.000002 let s:line5 = getline(5) | |
" Bourne-like shell scripts: sh ksh bash bash2 | |
1 0.000004 if s:line1 =~# '^:$' | |
call dist#ft#SetFileTypeSH(s:line1) " defined in filetype.vim | |
" Z shell scripts | |
1 0.000037 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 | |
1 0.000009 elseif s:line1 =~# '^From \([a-zA-Z][a-zA-Z_0-9\.=-]*\(@[^ ]*\)\=\|-\) .* \(19\|20\)\d\d$' | |
set ft=mail | |
" Mason | |
1 0.000004 elseif s:line1 =~# '^<[%&].*>' | |
set ft=mason | |
" Vim scripts (must have '" vim' as the first line to trigger this) | |
1 0.000003 elseif s:line1 =~# '^" *[vV]im$' | |
set ft=vim | |
" MOO | |
1 0.000007 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) | |
1 0.000051 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) | |
1 0.000004 elseif s:line1 =~# '^%![ \t]*PS' | |
set ft=postscr | |
" M4 scripts: Guess there is a line that starts with "dnl". | |
1 0.000018 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 | |
1 0.000003 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) | |
1 0.000004 elseif s:line1 =~? '^ *proc[nd] *$' | |
set ft=sicad | |
" Purify log files start with "**** Purify" | |
1 0.000003 elseif s:line1 =~# '^\*\*\*\* Purify' | |
set ft=purifylog | |
" XML | |
1 0.000004 elseif s:line1 =~# '<?\s*xml.*?>' | |
set ft=xml | |
" XHTML (e.g.: PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN") | |
1 0.000005 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. | |
1 0.000004 elseif s:line1 =~? '<!DOCTYPE\s\+html\>' | |
set ft=html | |
1 0.000003 elseif s:line1 =~# '^%PDF-' | |
set ft=pdf | |
" XXD output | |
1 0.000010 elseif s:line1 =~# '^\x\{7}: \x\{2} \=\x\{2} \=\x\{2} \=\x\{2} ' | |
set ft=xxd | |
" RCS/CVS log output | |
1 0.000006 elseif s:line1 =~# '^RCS file:' || s:line2 =~# '^RCS file:' | |
set ft=rcslog | |
" CVS commit | |
1 0.000008 elseif s:line2 =~# '^CVS:' || getline("$") =~# '^CVS: ' | |
set ft=cvs | |
" Prescribe | |
1 0.000003 elseif s:line1 =~# '^!R!' | |
set ft=prescribe | |
" Send-pr | |
1 0.000004 elseif s:line1 =~# '^SEND-PR:' | |
set ft=sendpr | |
" SNNS files | |
1 0.000005 elseif s:line1 =~# '^SNNS network definition file' | |
set ft=snnsnet | |
1 0.000004 elseif s:line1 =~# '^SNNS pattern definition file' | |
set ft=snnspat | |
1 0.000004 elseif s:line1 =~# '^SNNS result file' | |
set ft=snnsres | |
" Virata | |
1 0.000023 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 | |
1 0.000080 elseif s:line1 =~# '[0-9:.]* *execve(' || s:line1 =~# '^__libc_start_main' | |
set ft=strace | |
" VSE JCL | |
1 0.000007 elseif s:line1 =~# '^\* $$ JOB\>' || s:line1 =~# '^// *JOB\>' | |
set ft=vsejcl | |
" TAK and SINDA | |
1 0.000009 elseif s:line4 =~# 'K & K Associates' || s:line2 =~# 'TAK 2000' | |
set ft=takout | |
1 0.000006 elseif s:line3 =~# 'S Y S T E M S I M P R O V E D ' | |
set ft=sindaout | |
1 0.000006 elseif getline(6) =~# 'Run Date: ' | |
set ft=takcmp | |
1 0.000006 elseif getline(9) =~# 'Node File 1' | |
set ft=sindacmp | |
" DNS zone files | |
1 0.000313 elseif s:line1.s:line2.s:line3.s:line4 =~# '^; <<>> DiG [0-9.]\+.* <<>>\|$ORIGIN\|$TTL\|IN\s\+SOA' | |
set ft=bindzone | |
" BAAN | |
1 0.000014 elseif s:line1 =~# '|\*\{1,80}' && s:line2 =~# 'VRC ' | |
\ || s:line2 =~# '|\*\{1,80}' && s:line3 =~# 'VRC ' | |
set ft=baan | |
" Valgrind | |
1 0.000008 elseif s:line1 =~# '^==\d\+== valgrind' || s:line3 =~# '^==\d\+== Using valgrind' | |
set ft=valgrind | |
" Go docs | |
1 0.000004 elseif s:line1 =~# '^PACKAGE DOCUMENTATION$' | |
set ft=godoc | |
" Renderman Interface Bytestream | |
1 0.000004 elseif s:line1 =~# '^##RenderMan' | |
set ft=rib | |
" Scheme scripts | |
1 0.000020 elseif s:line1 =~# 'exec\s\+\S*scheme' || s:line2 =~# 'exec\s\+\S*scheme' | |
set ft=scheme | |
" Git output | |
1 0.000012 elseif s:line1 =~# '^\(commit\|tree\|object\) \x\{40\}\>\|^tag \S\+$' | |
set ft=git | |
" Gprof (gnu profiler) | |
1 0.000007 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) | |
1 0.000004 elseif s:line1 =~? '-\*-.*erlang.*-\*-' | |
set ft=erlang | |
" CVS diff | |
1 0.000001 else | |
1 0.000002 let s:lnum = 1 | |
1 0.000006 while getline(s:lnum) =~# "^? " && s:lnum < line("$") | |
let s:lnum += 1 | |
1 0.000001 endwhile | |
1 0.000005 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 | |
1 0.000035 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 | |
1 0.000000 endif | |
1 0.000002 unlet s:lnum | |
1 0.000001 endif | |
1 0.000002 unlet s:line2 s:line3 s:line4 s:line5 | |
1 0.000000 endif | |
" Restore 'cpoptions' | |
1 0.000008 let &cpo = s:cpo_save | |
1 0.000004 unlet s:cpo_save s:line1 | |
SCRIPT /usr/local/Cellar/vim/8.1.1500/share/vim/vim81/ftplugin/text.vim | |
Sourced 1 time | |
Total time: 0.000043 | |
Self time: 0.000043 | |
count total (s) self (s) | |
" Vim filetype plugin | |
" Language: Text | |
" Maintainer: David Barnett <[email protected]> | |
" Last Change: 2019 Jan 10 | |
1 0.000005 if exists('b:did_ftplugin') | |
finish | |
1 0.000005 endif | |
1 0.000002 let b:did_ftplugin = 1 | |
1 0.000002 let b:undo_ftplugin = 'setlocal comments< commentstring<' | |
" We intentionally don't set formatoptions-=t since text should wrap as text. | |
" Pseudo comment leaders to indent bulleted lists with '-' and '*'. And allow | |
" for Mail quoted text with '>'. | |
1 0.000007 setlocal comments=fb:-,fb:*,n:> | |
1 0.000005 setlocal commentstring= | |
FUNCTION highlighturl#set_url_match() | |
Defined: ~/.vim/miv/highlighturl/autoload/highlighturl.vim line 63 | |
Called 2 times | |
Total time: 0.000452 | |
Self time: 0.000292 | |
count total (s) self (s) | |
2 0.000142 0.000046 call highlighturl#delete_url_match() | |
2 0.000048 0.000032 if s:get('enable', get(s:, 'enable', 1)) | |
2 0.000010 if !hlexists('HighlightUrl') | |
call highlighturl#set_highlight() | |
2 0.000001 endif | |
2 0.000095 0.000062 let pattern = s:get('pattern', highlighturl#default_pattern()) | |
2 0.000136 0.000121 call matchadd('HighlightUrl', pattern, s:get('url_priority', 15)) | |
2 0.000004 if s:urlcursor | |
call highlighturl#set_urlcursor_match() | |
2 0.000002 endif | |
2 0.000001 endif | |
FUNCTION traces#cmdl_leave() | |
Defined: ~/.vim/miv/traces/autoload/traces.vim line 779 | |
Called 2 times | |
Total time: 0.000678 | |
Self time: 0.000598 | |
count total (s) self (s) | |
2 0.000022 let s:nr = bufnr('%') | |
2 0.000018 if !exists('s:buf[s:nr]') | |
return | |
2 0.000002 endif | |
2 0.000140 0.000060 call s:restore_undo_history() | |
" highlights | |
2 0.000016 if exists('s:win[win_getid()]') | |
if &scrolloff !=# 0 | |
let scrolloff = &scrolloff | |
noautocmd let &scrolloff = 0 | |
endif | |
let cur_win = win_getid() | |
let alt_win = win_getid(winnr('#')) | |
let windows = filter(win_findbuf(s:nr), {_, val -> win_id2win(val)}) | |
for id in windows | |
let wininfo = getwininfo(id)[0] | |
if wininfo.height is 0 || wininfo.width is 0 | |
" skip minimized windows | |
continue | |
endif | |
noautocmd call win_gotoid(id) | |
if exists('s:win[id]') | |
if exists('s:win[id].hlight') | |
for group in keys(s:win[id].hlight) | |
if s:win[id].hlight[group].index !=# - 1 | |
silent! call matchdelete(s:win[id].hlight[group].index) | |
endif | |
endfor | |
endif | |
if exists('s:win[id].options') | |
for option in keys(s:win[id].options) | |
execute 'noautocmd let &' . option . '="' . s:win[id].options[option] . '"' | |
endfor | |
endif | |
unlet s:win[id] | |
endif | |
endfor | |
if bufname('%') !=# '[Command Line]' | |
noautocmd call win_gotoid(s:buf[s:nr].alt_win) | |
noautocmd call win_gotoid(cur_win) | |
endif | |
if exists('scrolloff') | |
noautocmd let &scrolloff = scrolloff | |
endif | |
2 0.000002 endif | |
2 0.000009 if &hlsearch !=# s:buf[s:nr].hlsearch | |
noautocmd let &hlsearch = s:buf[s:nr].hlsearch | |
2 0.000002 endif | |
2 0.000008 if &cmdheight !=# s:buf[s:nr].cmdheight | |
noautocmd let &cmdheight = s:buf[s:nr].cmdheight | |
2 0.000003 endif | |
2 0.000008 if &winwidth isnot s:buf[s:nr].winwidth | |
noautocmd let &winwidth = s:buf[s:nr].winwidth | |
2 0.000002 endif | |
2 0.000007 if &winheight isnot s:buf[s:nr].winheight | |
noautocmd let &winheight = s:buf[s:nr].winheight | |
2 0.000003 endif | |
2 0.000015 if winrestcmd() isnot s:buf[s:nr].winrestcmd | |
noautocmd execute s:buf[s:nr].winrestcmd | |
2 0.000002 endif | |
2 0.000022 if winsaveview() !=# s:buf[s:nr].view | |
call winrestview(s:buf[s:nr].view) | |
2 0.000002 endif | |
2 0.000034 unlet s:buf[s:nr] | |
FUNCTION gitbranch#name() | |
Defined: ~/.vim/miv/gitbranch/autoload/gitbranch.vim line 11 | |
Called 6 times | |
Total time: 0.003701 | |
Self time: 0.001223 | |
count total (s) self (s) | |
6 0.000745 if get(b:, 'gitbranch_pwd', '') !=# expand('%:p:h') || !has_key(b:, 'gitbranch_path') | |
6 0.002804 0.000326 call gitbranch#detect(expand('%:p:h')) | |
6 0.000006 endif | |
6 0.000027 if has_key(b:, 'gitbranch_path') && filereadable(b:gitbranch_path) | |
let branch = get(readfile(b:gitbranch_path), 0, '') | |
if branch =~# '^ref: ' | |
return substitute(branch, '^ref: \%(refs/\%(heads/\|remotes/\|tags/\)\=\)\=', '', '') | |
elseif branch =~# '^\x\{20\}' | |
return branch[:6] | |
endif | |
6 0.000004 endif | |
6 0.000009 return '' | |
FUNCTION <SNR>105_parse_range() | |
Defined: ~/.vim/miv/traces/autoload/traces.vim line 29 | |
Called 25 times | |
Total time: 0.006608 | |
Self time: 0.005092 | |
count total (s) self (s) | |
25 0.000063 let specifier = {} | |
25 0.000057 let specifier.addresses = [] | |
25 0.000041 let while_limit = 0 | |
25 0.000046 while 1 | |
" address part | |
25 0.000870 0.000373 call s:trim(a:cmdl) | |
25 0.000049 let entry = {} | |
" regexp for pattern specifier | |
25 0.000050 let pattern = '/%(\\.|/@!&.)*/=|\?%(\\.|\?@!&.)*\?=' | |
25 0.000079 if !len(specifier.addresses) | |
" \& is not supported | |
25 0.000583 let address = matchstrpos(a:cmdl[0], '\v^%(\d+|\.|\$|\%|\*|''.|'. pattern . '|\\\/|\\\?)') | |
else | |
let address = matchstrpos(a:cmdl[0], '\v^%(' . pattern . ')' ) | |
25 0.000025 endif | |
25 0.000062 if address[2] != -1 | |
call s:trim(a:cmdl, address[2]) | |
let entry.str = address[0] | |
25 0.000017 endif | |
" offset | |
25 0.000786 0.000321 call s:trim(a:cmdl) | |
25 0.000317 let offset = matchstrpos(a:cmdl[0], '\m^\%(\d\|\s\|+\|-\)\+') | |
25 0.000083 if offset[2] != -1 | |
call s:trim(a:cmdl, offset[2]) | |
let entry.offset = offset[0] | |
25 0.000021 endif | |
" add first address | |
25 0.000074 if address[2] != -1 || offset[2] != -1 | |
" if offset is present but specifier is missing add '.' specifier | |
if !has_key(entry, 'str') | |
let entry.str = '.' | |
endif | |
call add(specifier.addresses, entry) | |
25 0.000014 else | |
" stop trying if previous attempt was unsuccessful | |
25 0.000031 break | |
endif | |
let while_limit += 1 | if while_limit == 1000 | echoerr 'infinite loop' | break | endif | |
25 0.000146 endwhile | |
" delimiter | |
25 0.000969 0.000415 call s:trim(a:cmdl) | |
25 0.000274 let delimiter = matchstrpos(a:cmdl[0], '\m^\%(,\|;\)') | |
25 0.000054 if delimiter[2] != -1 | |
call s:trim(a:cmdl, delimiter[2]) | |
let specifier.delimiter = delimiter[0] | |
25 0.000018 endif | |
" add when addresses or delimiter are found or when one specifier is | |
" already known | |
25 0.000181 if !empty(specifier.addresses) || delimiter[2] != -1 || !empty(a:range) | |
" specifiers are not given but delimiter is present | |
if empty(specifier.addresses) | |
call add(specifier.addresses, { 'str': '.' }) | |
endif | |
call add(a:range, specifier) | |
25 0.000019 endif | |
25 0.000044 if delimiter[2] != -1 | |
try | |
return s:parse_range(a:range, a:cmdl) | |
catch /^Vim\%((\a\+)\)\=:E132/ | |
return [] | |
endtry | |
25 0.000022 else | |
25 0.000031 return a:range | |
endif | |
FUNCTION <SNR>89_convert() | |
Defined: ~/.vim/miv/lightline/autoload/lightline.vim line 340 | |
Called 18 times | |
Total time: 0.000313 | |
Self time: 0.000313 | |
count total (s) self (s) | |
18 0.000056 if has_key(s:lightline.component_expand, a:name) | |
let type = get(s:lightline.component_type, a:name, a:index) | |
let is_raw = get(s:lightline.component_raw, a:name) || type ==# 'raw' | |
return filter(s:map(s:evaluate_expand(s:lightline.component_expand[a:name]), '[v:val, 1 + ' . is_raw . ', v:key == 1 && ' . (type !=# 'raw') . ' ? "' . type . '" : "' . a:index . '", "' . a:index . '"]'), 'v:val[0] != []') | |
18 0.000013 else | |
18 0.000052 return [[[a:name], 0, a:index, a:index]] | |
endif | |
FUNCTION <SNR>99_on_cursor_moved() | |
Defined: ~/.vim/miv/lsp/autoload/lsp.vim line 199 | |
Called 40 times | |
Total time: 0.002193 | |
Self time: 0.001999 | |
count total (s) self (s) | |
40 0.000206 let l:buf = bufnr('%') | |
40 0.000276 if getbufvar(l:buf, '&buftype') ==# 'terminal' | return | endif | |
40 0.001662 0.001468 call lsp#ui#vim#diagnostics#echo#cursor_moved() | |
FUNCTION <SNR>89_flatten_twice() | |
Defined: ~/.vim/miv/lightline/autoload/lightline.vim line 351 | |
Called 4 times | |
Total time: 0.000120 | |
Self time: 0.000120 | |
count total (s) self (s) | |
4 0.000006 let ys = [] | |
14 0.000015 for xs in a:xss | |
28 0.000019 for x in xs | |
18 0.000021 let ys += x | |
28 0.000020 endfor | |
14 0.000009 endfor | |
4 0.000004 return ys | |
FUNCTION <SNR>105_save_marks() | |
Defined: ~/.vim/miv/traces/autoload/traces.vim line 867 | |
Called 2 times | |
Total time: 0.000095 | |
Self time: 0.000095 | |
count total (s) self (s) | |
2 0.000014 if !exists('s:buf[s:nr].marks') | |
2 0.000007 let types = ['[', ']'] | |
2 0.000008 let s:buf[s:nr].marks = {} | |
6 0.000011 for mark in types | |
4 0.000033 let s:buf[s:nr].marks[mark] = getpos("'" . mark) | |
6 0.000008 endfor | |
2 0.000003 endif | |
FUNCTION <SNR>105_evaluate_cmdl() | |
Defined: ~/.vim/miv/traces/autoload/traces.vim line 850 | |
Called 25 times | |
Total time: 0.016399 | |
Self time: 0.003576 | |
count total (s) self (s) | |
25 0.000073 let cmdl = {} | |
25 0.000069 let cmdl.string = a:string | |
25 0.010077 0.001029 let r = s:evaluate_range(s:parse_range([], cmdl.string)) | |
25 0.000062 let cmdl.range = {} | |
25 0.000056 let cmdl.range.abs = r.range | |
25 0.000049 let cmdl.range.end = r.end | |
25 0.000957 0.000721 let cmdl.range.pattern = s:get_selection_regexp(r.range) | |
25 0.001143 0.000842 let cmdl.range.specifier = s:add_hl_guard(s:add_opt(r.pattern, cmdl), r.end, 'r') | |
25 0.000045 let cmdl.cmd = {} | |
25 0.000045 let cmdl.cmd.args = {} | |
25 0.003698 0.000460 call s:parse_command(cmdl) | |
25 0.000030 return cmdl | |
FUNCTION winfix#state() | |
Defined: ~/.vim/miv/winfix/autoload/winfix.vim line 38 | |
Called 1 time | |
Total time: 0.000049 | |
Self time: 0.000049 | |
count total (s) self (s) | |
1 0.000003 if !has_key(t:, 'winfix_tabid') | |
let t:winfix_tabid = winfix#id() | |
1 0.000001 endif | |
1 0.000044 return { 'bufnrs': join(map(range(1, winnr('$')), 'winbufnr(v:val)'), '_'), 'width': join(map(range(1, winnr('$')), 'winwidth(v:val)'), '_'), 'height': join(map(range(1, winnr('$')), 'winheight(v:val)'), '_'), 'lines': &lines, 'columns': &columns, 'cmdheight': &cmdheight, 'showtabline': &showtabline, 'tabline': &showtabline > 1 || (&showtabline > 0 && tabpagenr('$') > 1), 'winnr': winnr(), 'wincnt': winnr('$'), 'winrestcmd': winrestcmd(), 'tabid': t:winfix_tabid, 'tabcnt': tabpagenr('$') } | |
FUNCTION <SNR>105_evaluate_range() | |
Defined: ~/.vim/miv/traces/autoload/traces.vim line 275 | |
Called 25 times | |
Total time: 0.002440 | |
Self time: 0.002440 | |
count total (s) self (s) | |
25 0.000183 let result = { 'range': [], 'pattern': '', 'end': ''} | |
25 0.000051 let s:range_valid = 1 | |
25 0.000096 let pos = s:buf[s:nr].cur_init_pos[0] | |
25 0.000065 for specifier in a:range_structure | |
let tmp_pos = pos | |
let specifier_result = [] | |
for address in specifier.addresses | |
" skip empty unclosed pattern specifier when range is empty otherwise | |
" substitute it with current position | |
if address.str =~# '^[?/]$' | |
let s:buf[s:nr].show_range = 1 | |
if empty(result.range) | |
break | |
endif | |
let address.str = '.' | |
endif | |
let query = s:address_to_num(address, tmp_pos) | |
" % specifier doesn't accept additional addresses | |
if !query.valid || len(query.range) == 2 && len(specifier.addresses) > 1 | |
let s:range_valid = 0 | |
break | |
endif | |
let tmp_pos = query.range[-1] | |
let specifier_result = deepcopy(query.range) | |
let result.pattern = query.regex | |
endfor | |
if !s:range_valid | |
break | |
endif | |
call extend(result.range, specifier_result) | |
if exists('specifier.delimiter') | |
let s:specifier_delimiter = 1 | |
endif | |
if get(specifier, 'delimiter') is# ';' | |
let pos = result.range[-1] | |
endif | |
25 0.000114 endfor | |
25 0.000067 if !empty(result.range) | |
let result.end = result.range[-1] | |
if len(result.range) == 1 | |
call extend(result.range, result.range) | |
else | |
let result.range = result.range[-2:-1] | |
if result.range[-1] < result.range[-2] | |
let temp = result.range[-2] | |
let result.range[-2] = result.range[-1] | |
let result.range[-1] = temp | |
endif | |
endif | |
25 0.000017 endif | |
25 0.000079 return s:range_valid ? result : { 'range': [], 'pattern': '', 'end': '' } | |
FUNCTION highlighturl#default_pattern() | |
Defined: ~/.vim/miv/highlighturl/autoload/highlighturl.vim line 17 | |
Called 2 times | |
Total time: 0.000017 | |
Self time: 0.000017 | |
count total (s) self (s) | |
2 0.000015 return '\v\c%(%(h?ttps?|ftp|file|ssh|git)://|[a-z]+[@][a-z]+[.][a-z]+:)%('.'[&:#*@~%_\-=?!+;/.0-9A-Za-z]+%([.,;/?][&:#*@~%_\-=?!+/0-9A-Za-z]+|:\d+)*|'.'\([&:#*@~%_\-=?!+;/.0-9A-Za-z]*\)|\[[&:#*@~%_\-=?!+;/.0-9A-Za-z]*\]|'.'\{%([&:#*@~%_\-=?!+;/.0-9A-Za-z]*|\{[&:#*@~%_\-=?!+;/.0-9A-Za-z]*\})\})+' | |
FUNCTION winfix#push() | |
Defined: ~/.vim/miv/winfix/autoload/winfix.vim line 54 | |
Called 1 time | |
Total time: 0.000080 | |
Self time: 0.000031 | |
count total (s) self (s) | |
1 0.000059 0.000010 let s:state = winfix#state() | |
1 0.000004 if len(s:stack) > 0 && get(s:, 'move') | |
call remove(s:stack, -1) | |
1 0.000000 endif | |
1 0.000005 if len(s:stack) ==# 0 || s:stack[-1] !=# s:state | |
call add(s:stack, s:state) | |
1 0.000000 endif | |
1 0.000003 if !has_key(s:stack_bufnrs, s:state.bufnrs) | |
let s:stack_bufnrs[s:state.bufnrs] = [] | |
1 0.000001 endif | |
1 0.000003 call add(s:stack_bufnrs[s:state.bufnrs], s:state) | |
FUNCTION <SNR>105_get_command() | |
Defined: ~/.vim/miv/traces/autoload/traces.vim line 347 | |
Called 25 times | |
Total time: 0.001782 | |
Self time: 0.001179 | |
count total (s) self (s) | |
25 0.000933 0.000330 call s:trim(a:cmdl) | |
25 0.000036 if !s:range_valid | |
return '' | |
25 0.000014 endif | |
25 0.000520 let result = matchstrpos(a:cmdl[0], s:cmd_pattern) | |
25 0.000058 if result[2] != -1 | |
call s:trim(a:cmdl, result[2]) | |
return result[0] | |
25 0.000018 endif | |
25 0.000024 return '' | |
FUNCTION <SNR>105_trim() | |
Defined: ~/.vim/miv/traces/autoload/traces.vim line 21 | |
Called 100 times | |
Total time: 0.002119 | |
Self time: 0.002119 | |
count total (s) self (s) | |
100 0.000184 if a:0 == 2 | |
let a:1[0] = strpart(a:1[0], a:2) | |
100 0.000099 else | |
100 0.001250 let a:1[0] = substitute(a:1[0], '^\s\+', '', '') | |
100 0.000106 endif | |
FUNCTION <SNR>68_on_event() | |
Defined: ~/.vim/miv/asyncomplete-buffer/autoload/asyncomplete/sources/buffer.vim line 40 | |
Called 5 times | |
Total time: 56.026468 | |
Self time: 0.008281 | |
count total (s) self (s) | |
5 0.000014 if a:event == 'TextChangedI' | |
call s:refresh_keyword_incr(a:ctx['typed']) | |
5 0.000005 else | |
5 0.000018 if s:last_ctx == a:ctx | |
3 0.000004 return | |
2 0.000002 endif | |
2 0.000013 let s:last_ctx = a:ctx | |
2 56.026363 0.008176 call s:refresh_keywords() | |
2 0.000015 endif | |
FUNCTION lightline#mode() | |
Defined: ~/.vim/miv/lightline/autoload/lightline.vim line 216 | |
Called 30 times | |
Total time: 0.000243 | |
Self time: 0.000243 | |
count total (s) self (s) | |
30 0.000212 return get(s:lightline.mode_map, mode(), '') | |
FUNCTION <SNR>36_LoadIndent() | |
Defined: /usr/local/Cellar/vim/8.1.1500/share/vim/vim81/indent.vim line 13 | |
Called 1 time | |
Total time: 0.000232 | |
Self time: 0.000232 | |
count total (s) self (s) | |
1 0.000004 if exists("b:undo_indent") | |
exe b:undo_indent | |
unlet! b:undo_indent b:did_indent | |
1 0.000001 endif | |
1 0.000003 let s = expand("<amatch>") | |
1 0.000002 if s != "" | |
1 0.000002 if exists("b:did_indent") | |
unlet b:did_indent | |
1 0.000001 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". | |
2 0.000008 for name in split(s, '\.') | |
1 0.000203 exe 'runtime! indent/' . name . '.vim' | |
2 0.000002 endfor | |
1 0.000000 endif | |
FUNCTION winfix#resize() | |
Defined: ~/.vim/miv/winfix/autoload/winfix.vim line 68 | |
Called 1 time | |
Total time: 0.000016 | |
Self time: 0.000016 | |
count total (s) self (s) | |
1 0.000012 if winnr('$') < 2 || len(s:stack) < 2 || s:stack[-2].tabid !=# s:state.tabid || s:stack[-2].wincnt <= s:state.wincnt | |
1 0.000003 return | |
endif | |
let stack = s:stack_bufnrs[s:state.bufnrs] " for performance | |
let i = len(stack) - 2 | |
while i >= 0 | |
if stack[i].bufnrs ==# s:state.bufnrs && (stack[i].width ==# s:state.width || stack[i].height ==# s:state.height) | |
if stack[i].winrestcmd !=# s:state.winrestcmd | |
silent! noautocmd execute stack[i].winrestcmd | |
endif | |
if stack[i].lines ==# s:state.lines && (stack[i].tabline !=# s:state.tabline || stack[i].cmdheight !=# s:state.cmdheight) | |
let &lines = s:state.lines | |
let &cmdheight = s:state.cmdheight | |
let &showtabline = s:state.showtabline | |
endif | |
break | |
endif | |
let i -= 1 | |
endwhile | |
FUNCTION gitbranch#dir() | |
Defined: ~/.vim/miv/gitbranch/autoload/gitbranch.vim line 26 | |
Called 8 times | |
Total time: 0.002753 | |
Self time: 0.002753 | |
count total (s) self (s) | |
8 0.000024 let path = a:path | |
8 0.000011 let prev = '' | |
58 0.000124 while path !=# prev | |
50 0.000118 let dir = path . '/.git' | |
50 0.000301 let type = getftype(dir) | |
50 0.000280 if type ==# 'dir' && isdirectory(dir.'/objects') && isdirectory(dir.'/refs') && getfsize(dir.'/HEAD') > 10 | |
return dir | |
50 0.000483 elseif type ==# 'file' | |
let reldir = get(readfile(dir), 0, '') | |
if reldir =~# '^gitdir: ' | |
return simplify(path . '/' . reldir[8:]) | |
endif | |
50 0.000049 endif | |
50 0.000089 let prev = path | |
50 0.000222 let path = fnamemodify(path, ':h') | |
58 0.000238 endwhile | |
8 0.000013 return '' | |
FUNCTION lightline#update_once() | |
Defined: ~/.vim/miv/lightline/autoload/lightline.vim line 30 | |
Called 42 times | |
Total time: 0.000675 | |
Self time: 0.000675 | |
count total (s) self (s) | |
42 0.000293 if !exists('w:lightline') || w:lightline | |
call lightline#update() | |
42 0.000207 endif | |
FUNCTION lightline#link() | |
Defined: ~/.vim/miv/lightline/autoload/lightline.vim line 221 | |
Called 30 times | |
Total time: 0.000997 | |
Self time: 0.000997 | |
count total (s) self (s) | |
30 0.000517 let mode = get(s:lightline._mode_, a:0 ? a:1 : mode(), 'normal') | |
30 0.000182 if s:mode == mode | |
30 0.000218 return '' | |
endif | |
let s:mode = mode | |
if !has_key(s:highlight, mode) | |
call lightline#highlight(mode) | |
endif | |
let types = map(s:uniq(sort(filter(values(s:lightline.component_type), 'v:val !=# "raw"'))), '[v:val, 1]') | |
for [p, l] in [['Left', len(s:lightline.active.left)], ['Right', len(s:lightline.active.right)]] | |
for [i, t] in map(range(0, l), '[v:val, 0]') + types | |
if i != l | |
exec printf('hi link Lightline%s_active_%s Lightline%s_%s_%s', p, i, p, mode, i) | |
endif | |
for [j, s] in map(range(0, l), '[v:val, 0]') + types | |
if i + 1 == j || t || s && i != l | |
exec printf('hi link Lightline%s_active_%s_%s Lightline%s_%s_%s_%s', p, i, j, p, mode, i, j) | |
endif | |
endfor | |
endfor | |
endfor | |
exec printf('hi link LightlineMiddle_active LightlineMiddle_%s', mode) | |
return '' | |
FUNCTION <SNR>45_Autodate() | |
Defined: ~/.vim/miv/autodate/plugin/autodate.vim line 235 | |
Called 2 times | |
Total time: 0.000036 | |
Self time: 0.000036 | |
count total (s) self (s) | |
" Check enable | |
2 0.000025 if (exists('b:autodate_disable') && b:autodate_disable != 0) || &modified == 0 | |
2 0.000006 return | |
endif | |
" Verify {firstline} | |
if a:0 > 0 && a:1 > 0 | |
let firstline = a:1 | |
else | |
let firstline = s:GetAutodateStartLine() | |
endif | |
" Verify {lastline} | |
if a:0 > 1 && a:2 <= line('$') | |
let lastline = a:2 | |
else | |
let lastline = firstline + s:GetAutodateLines() - 1 | |
" Range check | |
if lastline > line('$') | |
let lastline = line('$') | |
endif | |
endif | |
if firstline <= lastline | |
call s:AutodateStub(firstline, lastline) | |
endif | |
FUNCTION <SNR>105_cmdl_enter() | |
Defined: ~/.vim/miv/traces/autoload/traces.vim line 754 | |
Called 2 times | |
Total time: 0.000429 | |
Self time: 0.000334 | |
count total (s) self (s) | |
2 0.000014 let s:buf[s:nr] = {} | |
2 0.000008 let s:buf[s:nr].cache = {} | |
2 0.000015 let s:buf[s:nr].view = winsaveview() | |
2 0.000006 let s:buf[s:nr].show_range = 0 | |
2 0.000007 let s:buf[s:nr].duration = 0 | |
2 0.000008 let s:buf[s:nr].hlsearch = &hlsearch | |
2 0.000030 let s:buf[s:nr].cword = expand('<cword>') | |
2 0.000015 let s:buf[s:nr].cWORD = expand('<cWORD>') | |
2 0.000016 let s:buf[s:nr].cfile = expand('<cfile>') | |
2 0.000019 let s:buf[s:nr].cur_init_pos = [line('.'), col('.')] | |
2 0.000021 let s:buf[s:nr].seq_last = undotree().seq_last | |
2 0.000022 let s:buf[s:nr].empty_undotree = empty(undotree().entries) | |
2 0.000009 let s:buf[s:nr].changed = 0 | |
2 0.000010 let s:buf[s:nr].cmdheight = &cmdheight | |
2 0.000008 let s:buf[s:nr].redraw = 1 | |
2 0.000016 let s:buf[s:nr].s_mark = (&encoding == 'utf-8' ? "\uf8b4" : '' ) | |
2 0.000013 let s:buf[s:nr].winrestcmd = winrestcmd() | |
2 0.000014 let s:buf[s:nr].alt_win = win_getid(winnr('#')) | |
2 0.000008 let s:buf[s:nr].winwidth = &winwidth | |
2 0.000007 let s:buf[s:nr].winheight = &winheight | |
2 0.000008 let s:buf[s:nr].pre_cmdl_view = a:view | |
2 0.000146 0.000051 call s:save_marks() | |
FUNCTION cmdline_ranges#range() | |
Defined: ~/.vim/miv/cmdline-ranges/autoload/cmdline_ranges.vim line 355 | |
Called 3 times | |
Total time: 0.000636 | |
Self time: 0.000160 | |
count total (s) self (s) | |
3 0.000032 if mode() ==# 'c' && getcmdtype() ==# ':' | |
3 0.000021 let endcu = "\<End>\<C-u>" | |
3 0.000549 0.000073 let range = s:parserange(getcmdline(), a:prev) | |
3 0.000006 if len(range) | |
return endcu . s:strrange(cmdline_ranges#{char2nr(a:motion)}(range, a:prev)) | |
3 0.000001 else | |
3 0.000004 return a:motion | |
endif | |
else | |
return a:motion | |
endif | |
FUNCTION lightline_powerful#filename() | |
Defined: ~/.vim/miv/lightline-powerful/autoload/lightline_powerful.vim line 36 | |
Called 30 times | |
Total time: 0.001120 | |
Self time: 0.001120 | |
count total (s) self (s) | |
30 0.000239 let f = expand('%:t') | |
30 0.000724 if has_key(b:, 'lightline_filename') && get(b:, 'lightline_filename_', '') ==# f . &mod . &ma && index(s:f, &ft) < 0 && index(s:f, f) < 0 | |
29 0.000072 return b:lightline_filename | |
1 0.000001 endif | |
1 0.000007 let b:lightline_filename_ = f . &mod . &ma | |
1 0.000016 let default = join(filter([&ro ? s:ro : '', f, &mod ? '+' : &ma ? '' : '-'], 'len(v:val)'), ' ') | |
1 0.000011 let b:lightline_filename = f =~# '^\[preview' ? 'Preview' : eval(get(s:e, &ft, get(s:e, f, 'default'))) | |
1 0.000001 return b:lightline_filename | |
FUNCTION <SNR>105_restore_undo_history() | |
Defined: ~/.vim/miv/traces/autoload/traces.vim line 903 | |
Called 2 times | |
Total time: 0.000080 | |
Self time: 0.000080 | |
count total (s) self (s) | |
2 0.000011 if s:buf[s:nr].changed | |
noautocmd keepjumps silent undo | |
call s:restore_marks() | |
2 0.000003 endif | |
2 0.000018 if type(get(s:buf[s:nr], 'undo_file')) isnot v:t_string | |
2 0.000003 return | |
endif | |
if has('nvim') | |
" can't use try/catch on Neovim inside CmdlineLeave | |
" https://github.com/neovim/neovim/issues/7876 | |
silent! execute 'noautocmd rundo ' . s:buf[s:nr].undo_file | |
if undotree().seq_last !=# s:buf[s:nr].seq_last | |
echohl WarningMsg | |
echom 'traces.vim - undo history could not be restored' | |
echohl None | |
endif | |
else | |
try | |
silent execute 'noautocmd rundo ' . s:buf[s:nr].undo_file | |
catch | |
echohl WarningMsg | |
echom 'traces.vim - ' . v:exception | |
echohl None | |
endtry | |
endif | |
call delete(s:buf[s:nr].undo_file) | |
FUNCTION asyncomplete#enable_for_buffer() | |
Defined: ~/.vim/miv/asyncomplete/autoload/asyncomplete.vim line 60 | |
Called 1 time | |
Total time: 0.000113 | |
Self time: 0.000030 | |
count total (s) self (s) | |
1 0.000108 0.000025 call s:setup_if_required() | |
1 0.000003 let b:asyncomplete_enable = 1 | |
FUNCTION <SNR>65_cmdline_changed() | |
Defined: ~/.vim/miv/traces/plugin/traces.vim line 24 | |
Called 25 times | |
Total time: 0.000750 | |
Self time: 0.000750 | |
count total (s) self (s) | |
25 0.000246 if exists('s:start_init_timer') | |
23 0.000102 call timer_stop(s:start_init_timer) | |
25 0.000038 endif | |
25 0.000299 let s:start_init_timer = timer_start(1, {_-> traces#init(getcmdline(), s:view)}) | |
FUNCTION <SNR>108_parserange() | |
Defined: ~/.vim/miv/cmdline-ranges/autoload/cmdline_ranges.vim line 112 | |
Called 3 times | |
Total time: 0.000476 | |
Self time: 0.000403 | |
count total (s) self (s) | |
3 0.000008 let string = a:string | |
3 0.000163 0.000090 let [str, string] = s:getmatchstr(string, '^[: \t]\+') | |
3 0.000006 let range = [] | |
3 0.000010 for i in [0, 1] | |
3 0.000005 let num = 0 | |
3 0.000004 let flg = 0 | |
3 0.000009 if string ==# a:prev && i == 0 | |
return [s:cursor(), s:cursor()] | |
3 0.000033 elseif string =~# '^\s*%\s*' . a:prev . '$' && i == 0 | |
return [s:absolute(1), s:last()] | |
3 0.000015 elseif string =~# '^\d\+\s*' | |
let str = matchstr(string, '^\d\+\s*') | |
let num = str + 0 | |
let flg = 1 | |
3 0.000010 elseif string =~# '^\.\s*' | |
let str = matchstr(string, '^\.\s*') | |
call add(range, s:cursor()) | |
3 0.000011 elseif string =~# '^\$' | |
let str = matchstr(string, '^\$\s*') | |
call add(range, s:last()) | |
3 0.000016 elseif string =~# '^''[a-zA-Z()<>{}"''.[\]\^]' | |
let str = matchstr(string, '^''[a-zA-Z()<>{}"''.[\]\^]') | |
call add(range, s:mark(str)) | |
3 0.000061 elseif string =~# '^\(/\([^/]\|\\/\)\+/\s*\|?\([^?]\|\\?\)\+?\s*\)\+' | |
let str = matchstr(string, '^\(/\([^/]\|\\/\)\+/\s*\|?\([^?]\|\\?\)\+?\s*\)\+') | |
call add(range, s:pattern(str)) | |
3 0.000003 else | |
3 0.000005 return [] | |
endif | |
let string = string[len(str):] | |
while string =~# '^[+-]\s*\d\+\s*' | |
let [str, string] = s:getmatchstr(string, '^[+-]\s*\d\+\s*') | |
if flg | |
let num += s:parsenumber(str) | |
elseif (range[-1].string ==# '.' || range[-1].string ==# '$') && str =~# '^[+-]\s*0' | |
let range[-1].string .= substitute(str, '\s\+', '', 'g') | |
else | |
let range[-1] = s:add(range[-1], s:parsenumber(str)) | |
endif | |
endwhile | |
if i == 0 | |
if string =~# '^\s*[,;]\s*' | |
let [str, string] = s:getmatchstr(string, '^\s*[,;]\s*') | |
let s:semicolon = str =~# ';' | |
if flg | |
call add(range, s:absolute(num)) | |
endif | |
elseif flg && string ==# a:prev | |
return [s:cursor(), s:cursor(), num] | |
elseif string ==# a:prev | |
return range | |
else | |
return [] | |
endif | |
else | |
if string ==# a:prev | |
if flg | |
call add(range, s:absolute(num)) | |
endif | |
return len(range) == 2 ? range : [] | |
else | |
return [] | |
endif | |
endif | |
endfor | |
return [] | |
FUNCTION <SNR>65_t_stop() | |
Defined: ~/.vim/miv/traces/plugin/traces.vim line 52 | |
Called 2 times | |
Total time: 0.000597 | |
Self time: 0.000597 | |
count total (s) self (s) | |
2 0.000023 if exists('s:previous_cmdl') | |
unlet s:previous_cmdl | |
2 0.000003 endif | |
2 0.000009 if exists('s:track_cmdl_timer') | |
2 0.000010 call timer_stop(s:track_cmdl_timer) | |
2 0.000007 unlet s:track_cmdl_timer | |
2 0.000002 endif | |
2 0.000009 if exists('s:start_init_timer') | |
2 0.000006 call timer_stop(s:start_init_timer) | |
2 0.000005 unlet s:start_init_timer | |
2 0.000002 endif | |
2 0.000013 augroup traces_augroup_cmdline_changed | |
2 0.000484 autocmd! | |
2 0.000005 augroup END | |
FUNCTION <SNR>105_add_opt() | |
Defined: ~/.vim/miv/traces/autoload/traces.vim line 360 | |
Called 25 times | |
Total time: 0.000190 | |
Self time: 0.000190 | |
count total (s) self (s) | |
25 0.000139 if empty(a:pattern) || !s:range_valid || empty(substitute(a:pattern, '\\[cCvVmM]', '', 'g')) | |
25 0.000025 return '' | |
endif | |
let option = '' | |
" magic | |
if has_key(a:cmdl, 'cmd') && a:cmdl.cmd.name =~# '\v^sm%[agic]$' | |
let option = '\m' | |
elseif has_key(a:cmdl, 'cmd') && a:cmdl.cmd.name =~# '\v^sno%[magic]$' | |
let option = '\M' | |
elseif &magic | |
let option = '\m' | |
else | |
let option = '\M' | |
endif | |
" case | |
if &ignorecase | |
if &smartcase | |
if match(a:pattern, '\u') ==# -1 | |
let option .= '\c' | |
else | |
let option .= '\C' | |
endif | |
else | |
let option .= '\c' | |
endif | |
endif | |
return option . a:pattern | |
FUNCTION <SNR>101_get_prefix() | |
Defined: ~/.vim/miv/lsp/autoload/lsp/utils.vim line 14 | |
Called 1 time | |
Total time: 0.000043 | |
Self time: 0.000043 | |
count total (s) self (s) | |
1 0.000041 return matchstr(a:path, '\(^\w\+::\|^\w\+://\)') | |
FUNCTION spellbad_pattern#update() | |
Defined: ~/.vim/miv/spellbad-pattern/autoload/spellbad_pattern.vim line 11 | |
Called 4 times | |
Total time: 0.000134 | |
Self time: 0.000134 | |
count total (s) self (s) | |
4 0.000049 if !get(g:, 'spellbad_pattern_enable', 1) || get(b:, 'spellbad_pattern', -1) == &l:spell | |
3 0.000004 return | |
1 0.000001 endif | |
1 0.000002 if &l:spell | |
for s in get(g:, 'spellbad_pattern', []) | |
silent! call matchadd('SpellBad', s) | |
endfor | |
1 0.000001 else | |
5 0.000021 for m in getmatches() | |
4 0.000006 if m.group ==# 'SpellBad' | |
silent! call matchdelete(m.id) | |
4 0.000002 endif | |
5 0.000005 endfor | |
1 0.000001 endif | |
1 0.000005 let b:spellbad_pattern = &l:spell | |
FUNCTION winfix#winfocus() | |
Defined: ~/.vim/miv/winfix/autoload/winfix.vim line 96 | |
Called 1 time | |
Total time: 0.000009 | |
Self time: 0.000009 | |
count total (s) self (s) | |
1 0.000006 if len(s:stack) < 2 || s:stack[-2].tabid !=# s:state.tabid || s:stack[-2].wincnt <= s:state.wincnt | |
1 0.000001 return | |
endif | |
let i = len(s:stack) - 2 | |
while i >= 0 && (s:stack[i].tabid !=# s:state.tabid || s:stack[i].wincnt > s:state.wincnt) | |
let i -= 1 | |
endwhile | |
if i >= 0 && s:stack[i].bufnrs ==# s:state.bufnrs | |
if winnr('$') > 1 && winnr() !=# s:stack[i].winnr | |
silent! noautocmd execute s:stack[i].winnr 'wincmd w' | |
let s:move = 1 | |
endif | |
call winfix#push() | |
endif | |
FUNCTION <SNR>69_setup_if_required() | |
Defined: ~/.vim/miv/asyncomplete/autoload/asyncomplete.vim line 30 | |
Called 1 time | |
Total time: 0.000083 | |
Self time: 0.000083 | |
count total (s) self (s) | |
1 0.000002 if !s:already_setup | |
" register asyncomplete change manager | |
for l:change_manager in g:asyncomplete_change_manager | |
call asyncomplete#log('core', 'initializing asyncomplete change manager', l:change_manager) | |
if type(l:change_manager) == type('') | |
execute 'let s:on_change_manager = function("'. l:change_manager .'")()' | |
else | |
let s:on_change_manager = l:change_manager() | |
endif | |
if has_key(s:on_change_manager, 'error') | |
call asyncomplete#log('core', 'initializing asyncomplete change manager failed', s:on_change_manager['name'], s:on_change_manager['error']) | |
else | |
call s:on_change_manager.register(function('s:on_change')) | |
call asyncomplete#log('core', 'initializing asyncomplete change manager complete', s:on_change_manager['name']) | |
break | |
endif | |
endfor | |
augroup asyncomplete | |
autocmd! | |
autocmd InsertEnter * call s:on_insert_enter() | |
autocmd InsertLeave * call s:on_insert_leave() | |
augroup END | |
doautocmd User asyncomplete_setup | |
let s:already_setup = 1 | |
1 0.000001 endif | |
FUNCTION <SNR>105_highlight() | |
Defined: ~/.vim/miv/traces/autoload/traces.vim line 569 | |
Called 50 times | |
Total time: 0.001157 | |
Self time: 0.001157 | |
count total (s) self (s) | |
50 0.000212 let cur_win = win_getid() | |
50 0.000354 if exists('s:win[cur_win].hlight[a:group].pattern') && s:win[cur_win].hlight[a:group].pattern ==# a:pattern | |
return | |
50 0.000030 endif | |
50 0.000350 if !exists('s:win[cur_win].hlight[a:group].pattern') && empty(a:pattern) | |
50 0.000049 return | |
endif | |
if &hlsearch && !empty(a:pattern) && a:group ==# 'TracesSearch' | |
noautocmd let &hlsearch = 0 | |
endif | |
if &scrolloff !=# 0 | |
let scrolloff = &scrolloff | |
noautocmd let &scrolloff = 0 | |
endif | |
if &winwidth isnot &winminwidth | |
noautocmd let &winwidth=&winminwidth | |
endif | |
if &winheight isnot &winminheight | |
noautocmd let &winheight=&winminheight | |
endif | |
let windows = filter(win_findbuf(s:nr), {_, val -> win_id2win(val)}) | |
for id in windows | |
let wininfo = getwininfo(id)[0] | |
if wininfo.height is 0 || wininfo.width is 0 | |
" skip minimized windows | |
continue | |
endif | |
noautocmd call win_gotoid(id) | |
let s:win[id] = get(s:win, id, {}) | |
let s:win[id].hlight = get(s:win[id], 'hlight', {}) | |
if !exists('s:win[id].hlight[a:group]') | |
let x = {} | |
let x.pattern = a:pattern | |
silent! let x.index = matchadd(a:group, a:pattern, a:priority) | |
let s:win[id].hlight[a:group] = x | |
let s:highlighted = 1 | |
elseif s:win[id].hlight[a:group].pattern !=# a:pattern | |
if s:win[id].hlight[a:group].index !=# -1 | |
silent! call matchdelete(s:win[id].hlight[a:group].index) | |
endif | |
let s:win[id].hlight[a:group].pattern = a:pattern | |
silent! let s:win[id].hlight[a:group].index = matchadd(a:group, a:pattern, a:priority) | |
let s:highlighted = 1 | |
endif | |
if (&conceallevel !=# 2 || &concealcursor !=# 'c') && a:group ==# 'Conceal' | |
let s:win[id].options = get(s:win[id], 'options', {}) | |
let s:win[id].options.conceallevel = &conceallevel | |
let s:win[id].options.concealcursor = &concealcursor | |
noautocmd set conceallevel=2 | |
noautocmd set concealcursor=c | |
endif | |
" highlighting doesn't work properly when cursorline or cursorcolumn is | |
" enabled | |
if &cursorcolumn || &cursorline | |
let s:win[id].options = get(s:win[id], 'options', {}) | |
let s:win[id].options.cursorcolumn = &cursorcolumn | |
let s:win[id].options.cursorline = &cursorline | |
noautocmd set nocursorcolumn | |
noautocmd set nocursorline | |
endif | |
endfor | |
if bufname('%') !=# '[Command Line]' | |
noautocmd call win_gotoid(cur_win) | |
endif | |
if exists('scrolloff') | |
noautocmd let &scrolloff = scrolloff | |
endif | |
FUNCTION <SNR>68_refresh_keywords() | |
Defined: ~/.vim/miv/asyncomplete-buffer/autoload/asyncomplete/sources/buffer.vim line 52 | |
Called 2 times | |
Total time: 56.018187 | |
Self time: 56.018187 | |
count total (s) self (s) | |
2 0.000005 if g:asyncomplete_buffer_clear_cache | |
2 0.353001 let s:words = {} | |
2 0.000005 endif | |
2 0.341289 let l:text = join(getline(1, '$'), "\n") | |
4939108 27.899419 for l:word in split(l:text, '\W\+') | |
4939106 9.609358 if len(l:word) > 1 | |
4419746 8.732571 let s:words[l:word] = 1 | |
4939106 3.194635 endif | |
4939108 3.814698 endfor | |
FUNCTION <SNR>89_line() | |
Defined: ~/.vim/miv/lightline/autoload/lightline.vim line 405 | |
Called 2 times | |
Total time: 0.004006 | |
Self time: 0.001902 | |
count total (s) self (s) | |
2 0.000005 let _ = a:tabline ? '' : '%{lightline#link()}' | |
2 0.000009 if s:lightline.palette == {} | |
call lightline#colorscheme() | |
2 0.000000 endif | |
2 0.000009 let [l, r] = a:tabline ? [s:lightline.tab_llen, s:lightline.tab_rlen] : [s:lightline.llen, s:lightline.rlen] | |
2 0.000009 let [p, s] = a:tabline ? [s:lightline.tabline_separator, s:lightline.tabline_subseparator] : [s:lightline.separator, s:lightline.subseparator] | |
2 0.000009 let [c, f, t, w] = [s:lightline.component, s:lightline.component_function, s:lightline.component_type, s:lightline.component_raw] | |
2 0.000004 let mode = a:tabline ? 'tabline' : a:inactive ? 'inactive' : 'active' | |
2 0.000009 let l_ = has_key(s:lightline, mode) ? s:lightline[mode].left : s:lightline.active.left | |
2 0.000706 0.000040 let [lt, lc, ll] = s:expand(copy(l_)) | |
2 0.000010 let r_ = has_key(s:lightline, mode) ? s:lightline[mode].right : s:lightline.active.right | |
2 0.000916 0.000053 let [rt, rc, rl] = s:expand(copy(r_)) | |
6 0.000014 for i in range(len(lt)) | |
4 0.000022 let _ .= '%#LightlineLeft_' . mode . '_' . ll[i] . '#' | |
12 0.000121 for j in range(len(lt[i])) | |
8 0.000119 let x = lc[i][j] ? lt[i][j] : has_key(f, lt[i][j]) ? (exists('*' . f[lt[i][j]]) ? '%{' . f[lt[i][j]] . '()}' : '%{exists("*' . f[lt[i][j]] . '")?' . f[lt[i][j]] . '():""}') : get(c, lt[i][j], '') | |
8 0.000087 let _ .= has_key(t, lt[i][j]) && t[lt[i][j]] ==# 'raw' || get(w, lt[i][j]) || lc[i][j] ==# 2 || x ==# '' ? x : '%( ' . x . ' %)' | |
8 0.000033 if j < len(lt[i]) - 1 && s.left !=# '' | |
4 0.000436 0.000132 let _ .= s:subseparator(lt[i][(j):], s.left, lc[i][(j):]) | |
8 0.000010 endif | |
12 0.000018 endfor | |
4 0.000032 let _ .= '%#LightlineLeft_' . mode . '_' . ll[i] . '_' . ll[i + 1] . '#' | |
4 0.000043 let _ .= i < l + len(lt) - len(l_) && ll[i] < l || ll[i] != ll[i + 1] ? p.left : len(lt[i]) ? s.left : '' | |
6 0.000009 endfor | |
2 0.000009 let _ .= '%#LightlineMiddle_' . mode . '#%=' | |
8 0.000020 for i in reverse(range(len(rt))) | |
6 0.000049 let _ .= '%#LightlineRight_' . mode . '_' . rl[i] . '_' . rl[i + 1] . '#' | |
6 0.000057 let _ .= i < r + len(rt) - len(r_) && rl[i] < r || rl[i] != rl[i + 1] ? p.right : len(rt[i]) ? s.right : '' | |
6 0.000033 let _ .= '%#LightlineRight_' . mode . '_' . rl[i] . '#' | |
16 0.000037 for j in range(len(rt[i])) | |
10 0.000122 let x = rc[i][j] ? rt[i][j] : has_key(f, rt[i][j]) ? (exists('*' . f[rt[i][j]]) ? '%{' . f[rt[i][j]] . '()}' : '%{exists("*' . f[rt[i][j]] . '")?' . f[rt[i][j]] . '():""}') : get(c, rt[i][j], '') | |
10 0.000115 let _ .= has_key(t, rt[i][j]) && t[rt[i][j]] ==# 'raw' || get(w, rt[i][j]) || rc[i][j] ==# 2 || x ==# '' ? x : '%( ' . x . ' %)' | |
10 0.000045 if j < len(rt[i]) - 1 && s.right !=# '' | |
4 0.000385 0.000114 let _ .= s:subseparator(rt[i][(j):], s.right, rc[i][(j):]) | |
10 0.000012 endif | |
16 0.000022 endfor | |
8 0.000012 endfor | |
2 0.000006 return _ | |
FUNCTION <SNR>105_parse_command() | |
Defined: ~/.vim/miv/traces/autoload/traces.vim line 472 | |
Called 25 times | |
Total time: 0.003238 | |
Self time: 0.001456 | |
count total (s) self (s) | |
25 0.002360 0.000578 let a:cmdl.cmd.name = s:get_command(a:cmdl.string) | |
25 0.000251 if a:cmdl.cmd.name =~# '\v^%(g%[lobal]\!=|v%[global])$' | |
let a:cmdl.cmd.args = s:parse_global(a:cmdl) | |
25 0.000224 elseif a:cmdl.cmd.name =~# '\v^%(s%[ubstitute]|sm%[agic]|sno%[magic])$' | |
let a:cmdl.cmd.args = s:parse_substitute(a:cmdl) | |
25 0.000108 elseif a:cmdl.cmd.name =~# '\v^%(sor%[t]\!=)$' | |
let a:cmdl.cmd.args = s:parse_sort(a:cmdl) | |
25 0.000021 endif | |
FUNCTION <SNR>5_DetectCoffee() | |
Defined: ~/.vim/miv/miv/ftdetect/coffee.vim line 11 | |
Called 1 time | |
Total time: 0.000018 | |
Self time: 0.000018 | |
count total (s) self (s) | |
1 0.000014 if getline(1) =~ '^#!.*\<coffee\>' | |
set filetype=coffee | |
1 0.000001 endif | |
FUNCTION <SNR>24_DetectScala() | |
Defined: ~/.vim/miv/miv/ftdetect/scala.vim line 1 | |
Called 1 time | |
Total time: 0.000110 | |
Self time: 0.000110 | |
count total (s) self (s) | |
1 0.000104 if getline(1) =~# '^#!\(/usr\)\?/bin/env\s\+scalas\?' | |
set filetype=scala | |
1 0.000001 endif | |
FUNCTION lsp#ui#vim#references#highlight() | |
Defined: ~/.vim/miv/lsp/autoload/lsp/ui/vim/references.vim line 135 | |
Called 40 times | |
Total time: 0.016497 | |
Self time: 0.002600 | |
count total (s) self (s) | |
" No need to change the highlights if the cursor has not left | |
" the currently highlighted symbol. | |
40 0.000381 if !a:force_refresh && exists('w:lsp_reference_positions') && s:in_reference(w:lsp_reference_positions) != -1 | |
return | |
40 0.000030 endif | |
" A request for this symbol has already been sent | |
40 0.000219 if has_key(s:pending, &filetype) && s:pending[&filetype] | |
return | |
40 0.000026 endif | |
" Check if any server provides document highlight | |
40 0.000126 let l:capability = 'lsp#capabilities#has_document_highlight_provider(v:val)' | |
40 0.015218 0.001321 let l:servers = filter(lsp#get_whitelisted_servers(), l:capability) | |
40 0.000109 if len(l:servers) == 0 | |
40 0.000045 return | |
endif | |
" Send a request | |
let s:pending[&filetype] = v:true | |
let s:last_req_id += 1 | |
let l:ctx = { 'last_req_id': s:last_req_id, 'curpos': getcurpos(), 'bufnr': bufnr('%'), 'filetype': &filetype, } | |
call lsp#send_request(l:servers[0], { 'method': 'textDocument/documentHighlight', 'params': { 'textDocument': lsp#get_text_document_identifier(), 'position': lsp#get_position(), }, 'on_notification': function('s:handle_references', [l:ctx]), }) | |
FUNCTION <SNR>89_subseparator() | |
Defined: ~/.vim/miv/lightline/autoload/lightline.vim line 298 | |
Called 8 times | |
Total time: 0.000575 | |
Self time: 0.000575 | |
count total (s) self (s) | |
8 0.000091 let [a, c, f, v, u] = [a:components, s:lightline.component, s:lightline.component_function, s:lightline.component_visible_condition, s:lightline.component_function_visible_condition] | |
8 0.000356 let xs = map(range(len(a:components)), 'a:expanded[v:val] ? "1" : has_key(f, a[v:val]) ? (has_key(u, a[v:val]) ? "(".u[a[v:val]].")" : (exists("*".f[a[v:val]]) ? "" : "exists(\"*".f[a[v:val]]."\")&&").f[a[v:val]]."()!=#\"\"") : has_key(v, a[v:val]) ? "(".v[a[v:val]].")" : has_key(c, a[v:val]) ? "1" : "0"') | |
8 0.000111 return '%{' . (xs[0] ==# '1' || xs[0] ==# '(1)' ? '' : xs[0] . '&&(') . join(xs[1:], '||') . (xs[0] ==# '1' || xs[0] ==# '(1)' ? '' : ')') . '?"' . a:subseparator . '":""}' | |
FUNCTION <SNR>65_create_cmdl_changed_au() | |
Defined: ~/.vim/miv/traces/plugin/traces.vim line 31 | |
Called 2 times | |
Total time: 0.000680 | |
Self time: 0.000626 | |
count total (s) self (s) | |
2 0.000029 augroup traces_augroup_cmdline_changed | |
2 0.000498 autocmd! | |
2 0.000026 autocmd CmdlineChanged : call s:cmdline_changed() | |
2 0.000002 augroup END | |
" necessary when entering command line that has already been populated with | |
" text from mappings | |
2 0.000115 0.000061 call s:cmdline_changed() | |
FUNCTION gitbranch#detect() | |
Defined: ~/.vim/miv/gitbranch/autoload/gitbranch.vim line 46 | |
Called 8 times | |
Total time: 0.003414 | |
Self time: 0.000661 | |
count total (s) self (s) | |
8 0.000024 unlet! b:gitbranch_path | |
8 0.000377 let b:gitbranch_pwd = expand('%:p:h') | |
8 0.002933 0.000180 let dir = gitbranch#dir(a:path) | |
8 0.000018 if dir !=# '' | |
let path = dir . '/HEAD' | |
if filereadable(path) | |
let b:gitbranch_path = path | |
endif | |
8 0.000006 endif | |
FUNCTION lsp#ui#vim#diagnostics#echo#cursor_moved() | |
Defined: ~/.vim/miv/lsp/autoload/lsp/ui/vim/diagnostics/echo.vim line 1 | |
Called 40 times | |
Total time: 0.000194 | |
Self time: 0.000194 | |
count total (s) self (s) | |
40 0.000092 if !g:lsp_diagnostics_echo_cursor | |
40 0.000049 return | |
endif | |
if mode() isnot# 'n' | |
" dont' show echo only in normal mode | |
return | |
endif | |
call s:stop_cursor_moved_timer() | |
let l:current_pos = getcurpos()[0:2] | |
" use timer to avoid recalculation | |
if !exists('s:last_pos') || l:current_pos != s:last_pos | |
let s:last_pos = l:current_pos | |
let s:cursor_moved_timer = timer_start(g:lsp_diagnostics_echo_delay, function('s:echo_diagnostics_under_cursor')) | |
endif | |
FUNCTION <SNR>101_encode_uri() | |
Defined: ~/.vim/miv/lsp/autoload/lsp/utils.vim line 18 | |
Called 1 time | |
Total time: 0.000989 | |
Self time: 0.000946 | |
count total (s) self (s) | |
1 0.000077 0.000034 let l:prefix = s:get_prefix(a:path) | |
1 0.000008 let l:path = a:path[len(l:prefix):] | |
1 0.000003 if len(l:prefix) == 0 | |
1 0.000003 let l:prefix = a:default_prefix | |
1 0.000001 endif | |
1 0.000005 let l:result = strpart(a:path, 0, a:start_pos_encode) | |
55 0.000057 for i in range(a:start_pos_encode, len(l:path) - 1) | |
" Don't encode '/' here, `path` is expected to be a valid path. | |
54 0.000381 if l:path[i] =~# '^[a-zA-Z0-9_.~/-]$' | |
54 0.000174 let l:result .= l:path[i] | |
else | |
let l:result .= s:urlencode_char(l:path[i]) | |
54 0.000030 endif | |
55 0.000034 endfor | |
1 0.000003 return l:prefix . l:result | |
FUNCTION <SNR>105_skip_modifiers() | |
Defined: ~/.vim/miv/traces/autoload/traces.vim line 947 | |
Called 25 times | |
Total time: 0.003705 | |
Self time: 0.003705 | |
count total (s) self (s) | |
25 0.000076 let cmdl = a:cmdl | |
" skip leading colons | |
25 0.000439 let cmdl = substitute(cmdl, '\v^[[:space:]:]+', '', '') | |
" skip modifiers | |
25 0.000288 let pattern = '\v^%(%(' . 'sil%[ent]%(\!|\H@=)|' . 'verb%[ose]\H@=|' . 'noa%[utocmd]\H@=|' . 'loc%[kmarks]\H@=|' . 'keepp%[atterns]\H@=|' . 'keepa%[lt]\H@=|' . 'keepj%[umps]\H@=|' . 'kee%[pmarks]\H@=' . ')\s*)+' | |
25 0.001152 let cmdl = substitute(cmdl, pattern, '', '') | |
25 0.000054 if g:traces_skip_modifiers | |
" skip *do modifiers | |
25 0.000736 let cmdl = substitute(cmdl, '\v^%(%(%(\d+|\.|\$|\%)\s*[,;]=\s*)+)=\s*%(cdo|cfdo|ld%[o]|lfdo' . '|bufd%[o]|tabd%[o]\!@!|argdo|wind%[o]\!@!)%(\!|\H@=)\s*', '', '') | |
" skip modifiers again | |
25 0.000738 let cmdl = substitute(cmdl, pattern, '', '') | |
25 0.000027 endif | |
25 0.000048 return cmdl | |
FUNCTION asyncomplete#context() | |
Defined: ~/.vim/miv/asyncomplete/autoload/asyncomplete.vim line 120 | |
Called 5 times | |
Total time: 0.000909 | |
Self time: 0.000909 | |
count total (s) self (s) | |
5 0.000072 let l:ret = {'bufnr':bufnr('%'), 'curpos':getcurpos(), 'changedtick':b:changedtick} | |
5 0.000034 let l:ret['lnum'] = l:ret['curpos'][1] | |
5 0.000021 let l:ret['col'] = l:ret['curpos'][2] | |
5 0.000018 let l:ret['filetype'] = &filetype | |
5 0.000670 let l:ret['filepath'] = expand('%:p') | |
5 0.000068 let l:ret['typed'] = strpart(getline(l:ret['lnum']),0,l:ret['col']-1) | |
5 0.000013 return l:ret | |
FUNCTION <SNR>89_expand() | |
Defined: ~/.vim/miv/lightline/autoload/lightline.vim line 373 | |
Called 4 times | |
Total time: 0.001529 | |
Self time: 0.001096 | |
count total (s) self (s) | |
4 0.000009 let components = [] | |
4 0.000005 let expanded = [] | |
4 0.000005 let indices = [] | |
4 0.000006 let prevtype = '' | |
4 0.000005 let previndex = -1 | |
4 0.000781 0.000348 let xs = s:flatten_twice(s:map(deepcopy(a:components), 'map(v:val, "s:convert(v:val, ''" . v:key . "'')")')) | |
22 0.000040 for [component, expand, type, index] in xs | |
18 0.000026 if prevtype !=# type | |
10 0.000052 for i in range(previndex + 1, max([previndex, index - 1])) | |
call add(indices, string(i)) | |
call add(components, []) | |
call add(expanded, []) | |
10 0.000004 endfor | |
10 0.000022 call add(indices, type) | |
10 0.000017 call add(components, []) | |
10 0.000016 call add(expanded, []) | |
18 0.000014 endif | |
18 0.000046 call extend(components[-1], component) | |
18 0.000084 call extend(expanded[-1], repeat([expand], len(component))) | |
18 0.000022 let prevtype = type | |
18 0.000022 let previndex = index | |
22 0.000017 endfor | |
4 0.000025 for i in range(previndex + 1, max([previndex, len(a:components) - 1])) | |
call add(indices, string(i)) | |
call add(components, []) | |
call add(expanded, []) | |
4 0.000004 endfor | |
4 0.000020 call add(indices, string(len(a:components))) | |
4 0.000008 return [components, expanded, indices] | |
FUNCTION lsp#utils#get_buffer_uri() | |
Defined: ~/.vim/miv/lsp/autoload/lsp/utils.vim line 83 | |
Called 1 time | |
Total time: 0.001226 | |
Self time: 0.000202 | |
count total (s) self (s) | |
1 0.001225 0.000201 return lsp#utils#path_to_uri(expand((a:0 > 0 ? '#' . a:1 : '%') . ':p')) | |
FUNCTION lightline#update() | |
Defined: ~/.vim/miv/lightline/autoload/lightline.vim line 13 | |
Called 2 times | |
Total time: 0.004274 | |
Self time: 0.000193 | |
count total (s) self (s) | |
2 0.000003 if s:_ | |
if s:_ == 2 | return | endif | |
call lightline#init() | |
call lightline#colorscheme() | |
2 0.000001 endif | |
2 0.000004 if !s:lightline.enable.statusline | |
return | |
2 0.000002 endif | |
2 0.000005 let w = winnr() | |
2 0.004123 0.000042 let s = winnr('$') == 1 ? [lightline#statusline(0)] : [lightline#statusline(0), lightline#statusline(1)] | |
4 0.000019 for n in range(1, winnr('$')) | |
2 0.000073 call setwinvar(n, '&statusline', s[n!=w]) | |
2 0.000011 call setwinvar(n, 'lightline', n!=w) | |
4 0.000004 endfor | |
FUNCTION lsp#utils#path_to_uri() | |
Defined: ~/.vim/miv/lsp/autoload/lsp/utils.vim line 56 | |
Called 1 time | |
Total time: 0.001024 | |
Self time: 0.000035 | |
count total (s) self (s) | |
1 0.000006 if empty(a:path) | |
return a:path | |
1 0.000001 else | |
1 0.001013 0.000024 return s:encode_uri(a:path, 0, 'file://') | |
endif | |
FUNCTION winfix#enter() | |
Defined: ~/.vim/miv/winfix/autoload/winfix.vim line 11 | |
Called 1 time | |
Total time: 0.000222 | |
Self time: 0.000111 | |
count total (s) self (s) | |
1 0.000002 if get(g:, 'winfix_enable', 1) | |
1 0.000089 0.000009 call winfix#push() | |
1 0.000002 if !get(s:, 'move') | |
1 0.000003 if get(g:, 'winfix_tabfocus', 1) | |
1 0.000014 0.000008 call winfix#tabfocus() | |
1 0.000000 endif | |
1 0.000002 if get(g:, 'winfix_resize', 1) | |
1 0.000059 0.000043 call winfix#resize() | |
1 0.000001 endif | |
1 0.000004 if get(g:, 'winfix_winfocus', 1) | |
1 0.000031 0.000022 call winfix#winfocus() | |
1 0.000001 endif | |
1 0.000003 if get(s:, 'move') | |
doautocmd WinEnter | |
1 0.000001 endif | |
1 0.000003 let s:move = 0 | |
1 0.000001 endif | |
1 0.000001 endif | |
FUNCTION parenmatch#setup() | |
Defined: ~/.vim/miv/parenmatch/autoload/parenmatch.vim line 32 | |
Called 2 times | |
Total time: 0.000015 | |
Self time: 0.000015 | |
count total (s) self (s) | |
2 0.000009 if s:matchpairs ==# &l:matchpairs | |
2 0.000002 return | |
endif | |
let s:matchpairs = &l:matchpairs | |
let s:paren = {} | |
for [open, closed] in map(split(&l:matchpairs, ','), 'split(v:val, ":")') | |
let s:paren[open] = [ escape(open, '[]'), escape(closed, '[]'), 'nW', 'w$' ] | |
let s:paren[closed] = [ escape(open, '[]'), escape(closed, '[]'), 'bnW', 'w0' ] | |
endfor | |
FUNCTION parenmatch#update() | |
Defined: ~/.vim/miv/parenmatch/autoload/parenmatch.vim line 17 | |
Called 40 times | |
Total time: 0.001644 | |
Self time: 0.001644 | |
count total (s) self (s) | |
40 0.000298 if !get(b:, 'parenmatch', get(g:, 'parenmatch', 1)) | return | endif | |
40 0.000227 let i = a:0 ? a:1 : mode() ==# 'i' || mode() ==# 'R' | |
40 0.000273 let c = getline('.')[col('.') - i - 1] | |
40 0.000602 silent! call matchdelete(w:parenmatch) | |
40 0.000189 if !has_key(s:paren, c) | return | endif | |
let [open, closed, flags, stop] = s:paren[c] | |
let q = [line('.'), col('.') - i] | |
if i | let p = getcurpos() | call cursor(q) | endif | |
let r = searchpairpos(open, '', closed, flags, '', line(stop), 10) | |
if i | call setpos('.', p) | endif | |
if r[0] > 0 | let w:parenmatch = matchaddpos('ParenMatch', [q, r]) | endif | |
FUNCTION <SNR>99_on_text_document_did_open() | |
Defined: ~/.vim/miv/lsp/autoload/lsp.vim line 174 | |
Called 1 time | |
Total time: 0.001514 | |
Self time: 0.000085 | |
count total (s) self (s) | |
1 0.000009 let l:buf = bufnr('%') | |
1 0.000010 if getbufvar(l:buf, '&buftype') ==# 'terminal' | return | endif | |
1 0.001274 0.000038 call lsp#log('s:on_text_document_did_open()', l:buf, &filetype, getcwd(), lsp#utils#get_buffer_uri(l:buf)) | |
1 0.000213 0.000020 for l:server_name in lsp#get_whitelisted_servers(l:buf) | |
call s:ensure_flush(l:buf, l:server_name, function('s:Noop')) | |
1 0.000001 endfor | |
FUNCTION <SNR>96_get() | |
Defined: ~/.vim/miv/highlighturl/autoload/highlighturl.vim line 13 | |
Called 6 times | |
Total time: 0.000047 | |
Self time: 0.000047 | |
count total (s) self (s) | |
6 0.000043 return get(b:, 'highlighturl_' . a:name, get(g:, 'highlighturl_' . a:name, a:default)) | |
FUNCTION lsp#log() | |
Defined: ~/.vim/miv/lsp/autoload/lsp.vim line 36 | |
Called 2 times | |
Total time: 0.000031 | |
Self time: 0.000031 | |
count total (s) self (s) | |
2 0.000013 if !empty(g:lsp_log_file) | |
call writefile([strftime('%c') . ':' . json_encode(a:000)], g:lsp_log_file, 'a') | |
2 0.000003 endif | |
FUNCTION lsp#get_whitelisted_servers() | |
Defined: ~/.vim/miv/lsp/autoload/lsp.vim line 655 | |
Called 41 times | |
Total time: 0.014090 | |
Self time: 0.014090 | |
count total (s) self (s) | |
41 0.000085 if a:0 == 0 | |
40 0.000102 let l:buffer_filetype = &filetype | |
1 0.000000 else | |
1 0.000003 if type(a:1) == type('') | |
let l:buffer_filetype = a:1 | |
1 0.000000 else | |
1 0.000006 let l:buffer_filetype = getbufvar(a:1, '&filetype') | |
1 0.000001 endif | |
41 0.000036 endif | |
" TODO: cache active servers per buffer | |
41 0.000080 let l:active_servers = [] | |
205 0.001354 for l:server_name in keys(s:servers) | |
164 0.002220 let l:server_info = s:servers[l:server_name]['server_info'] | |
164 0.000536 let l:blacklisted = 0 | |
164 0.000555 if has_key(l:server_info, 'blacklist') | |
for l:filetype in l:server_info['blacklist'] | |
if l:filetype ==? l:buffer_filetype || l:filetype ==# '*' | |
let l:blacklisted = 1 | |
break | |
endif | |
endfor | |
164 0.000373 endif | |
164 0.000220 if l:blacklisted | |
continue | |
164 0.000108 endif | |
164 0.000515 if has_key(l:server_info, 'whitelist') | |
410 0.000792 for l:filetype in l:server_info['whitelist'] | |
246 0.000855 if l:filetype ==? l:buffer_filetype || l:filetype ==# '*' | |
let l:active_servers += [l:server_name] | |
break | |
246 0.000157 endif | |
410 0.000469 endfor | |
164 0.000124 endif | |
205 0.000281 endfor | |
41 0.000082 return l:active_servers | |
FUNCTION <SNR>65_t_start() | |
Defined: ~/.vim/miv/traces/plugin/traces.vim line 41 | |
Called 2 times | |
Total time: 0.000101 | |
Self time: 0.000101 | |
count total (s) self (s) | |
2 0.000031 if !g:traces_enabled || mode(1) =~# '^c.' | |
return | |
2 0.000002 endif | |
2 0.000011 if exists('##CmdlineChanged') | |
2 0.000032 let s:track_cmdl_timer = timer_start(30,function('s:create_cmdl_changed_au')) | |
else | |
let s:track_cmdl_timer = timer_start(30,function('s:track_cmdl'),{'repeat':-1}) | |
2 0.000002 endif | |
FUNCTION <SNR>11_SelectJavascript() | |
Defined: ~/.vim/miv/miv/ftdetect/javascript.vim line 1 | |
Called 1 time | |
Total time: 0.000014 | |
Self time: 0.000014 | |
count total (s) self (s) | |
1 0.000011 if getline(1) =~# '^#!.*/bin/\%(env\s\+\)\?node\>' | |
set ft=javascript | |
1 0.000001 endif | |
FUNCTION <SNR>38_SynSet() | |
Defined: /usr/local/Cellar/vim/8.1.1500/share/vim/vim81/syntax/synload.vim line 33 | |
Called 1 time | |
Total time: 0.000557 | |
Self time: 0.000557 | |
count total (s) self (s) | |
" clear syntax for :set syntax=OFF and any syntax name that doesn't exist | |
1 0.000003 syn clear | |
1 0.000002 if exists("b:current_syntax") | |
unlet b:current_syntax | |
1 0.000001 endif | |
1 0.000002 let s = expand("<amatch>") | |
1 0.000002 if s == "ON" | |
" :set syntax=ON | |
if &filetype == "" | |
echohl ErrorMsg | |
echo "filetype unknown" | |
echohl None | |
endif | |
let s = &filetype | |
1 0.000001 elseif s == "OFF" | |
let s = "" | |
1 0.000001 endif | |
1 0.000001 if s != "" | |
" Load the syntax file(s). When there are several, separated by dots, | |
" load each in sequence. | |
2 0.000006 for name in split(s, '\.') | |
1 0.000522 exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim" | |
2 0.000002 endfor | |
1 0.000000 endif | |
FUNCTION <SNR>47_newmatch() | |
Defined: ~/.vim/miv/landscape/colors/landscape.vim line 103 | |
Called 3 times | |
Total time: 0.000303 | |
Self time: 0.000303 | |
count total (s) self (s) | |
3 0.000023 if !get(g:, 'landscape_highlight_todo', 0) && !get(g:, 'landscape_highlight_full_space', 0) | |
return | |
3 0.000003 endif | |
9 0.000101 for m in getmatches() | |
6 0.000022 if m.group ==# 'Todo' || m.group ==# 'FullSpace' | |
3 0.000019 silent! call matchdelete(m.id) | |
6 0.000007 endif | |
9 0.000008 endfor | |
3 0.000011 if get(g:, 'landscape_highlight_todo', 0) | |
3 0.000042 call matchadd('Todo', '\c\<todo\>', 10) | |
3 0.000003 endif | |
3 0.000011 if get(g:, 'landscape_highlight_full_space', 0) | |
call matchadd('FullSpace', "\u3000", 10) | |
3 0.000002 endif | |
FUNCTION lightline_powerful#gitbranch() | |
Defined: ~/.vim/miv/lightline-powerful/autoload/lightline_powerful.vim line 48 | |
Called 60 times | |
Total time: 0.005970 | |
Self time: 0.002269 | |
count total (s) self (s) | |
60 0.001330 if has_key(b:, 'lightline_gitbranch') && reltimestr(reltime(b:lightline_gitbranch_)) =~# '^\s*0\.[0-3]' | |
54 0.000215 return b:lightline_gitbranch | |
6 0.000006 endif | |
6 0.000027 if exists('*gitbranch#name') | |
6 0.003794 0.000093 let branch = gitbranch#name() | |
else | |
return '' | |
6 0.000006 endif | |
6 0.000425 let b:lightline_gitbranch = branch !=# '' ? s:fu.branch : '' | |
6 0.000047 let b:lightline_gitbranch_ = reltime() | |
6 0.000014 return b:lightline_gitbranch | |
FUNCTION <SNR>69_notify_event_to_source() | |
Defined: ~/.vim/miv/asyncomplete/autoload/asyncomplete.vim line 477 | |
Called 5 times | |
Total time: 56.026677 | |
Self time: 0.000209 | |
count total (s) self (s) | |
5 0.000010 try | |
5 0.000023 if has_key(s:sources, a:name) | |
5 56.026575 0.000107 call s:sources[a:name].on_event(s:sources[a:name], a:ctx, a:event) | |
5 0.000006 endif | |
catch | |
call asyncomplete#log('core', 's:notify_event_to_source', 'error', v:exception) | |
return | |
5 0.000008 endtry | |
FUNCTION lsp#ui#vim#references#clean_references() | |
Defined: ~/.vim/miv/lsp/autoload/lsp/ui/vim/references.vim line 177 | |
Called 2 times | |
Total time: 0.000095 | |
Self time: 0.000095 | |
count total (s) self (s) | |
2 0.000021 let s:pending[&filetype] = v:false | |
2 0.000012 if exists('w:lsp_reference_matches') | |
for l:match in w:lsp_reference_matches | |
silent! call matchdelete(l:match) | |
endfor | |
unlet w:lsp_reference_matches | |
unlet w:lsp_reference_positions | |
2 0.000002 endif | |
FUNCTION <SNR>6_DetectElixir() | |
Defined: ~/.vim/miv/miv/ftdetect/elixir.vim line 5 | |
Called 1 time | |
Total time: 0.000018 | |
Self time: 0.000018 | |
count total (s) self (s) | |
1 0.000015 if (!did_filetype() || &filetype !=# 'elixir') && getline(1) =~# '^#!.*\<elixir\>' | |
set filetype=elixir | |
1 0.000000 endif | |
FUNCTION <SNR>108_getmatchstr() | |
Defined: ~/.vim/miv/cmdline-ranges/autoload/cmdline_ranges.vim line 181 | |
Called 3 times | |
Total time: 0.000073 | |
Self time: 0.000073 | |
count total (s) self (s) | |
3 0.000049 let str = matchstr(a:str, a:pat) | |
3 0.000022 return [str, a:str[len(str):]] | |
FUNCTION <SNR>99_on_buf_wipeout() | |
Defined: ~/.vim/miv/lsp/autoload/lsp.vim line 264 | |
Called 1 time | |
Total time: 0.000018 | |
Self time: 0.000018 | |
count total (s) self (s) | |
1 0.000011 if has_key(s:file_content, a:buf) | |
call remove(s:file_content, a:buf) | |
1 0.000001 endif | |
FUNCTION histexclude#update() | |
Defined: ~/.vim/miv/histexclude/autoload/histexclude.vim line 11 | |
Called 2 times | |
Total time: 0.000128 | |
Self time: 0.000128 | |
count total (s) self (s) | |
2 0.000102 if has_key(g:histexclude, a:history) && histget(a:history, -1) =~# get(g:histexclude, a:history, '') | |
call histdel(a:history, -1) | |
2 0.000004 endif | |
2 0.000005 return a:history | |
FUNCTION <SNR>105_get_selection_regexp() | |
Defined: ~/.vim/miv/traces/autoload/traces.vim line 334 | |
Called 25 times | |
Total time: 0.000236 | |
Self time: 0.000236 | |
count total (s) self (s) | |
25 0.000184 if empty(a:range) | |
25 0.000032 return '' | |
endif | |
let pattern = '\%>' . (a:range[-2] - 1) . 'l\%<' . (a:range[-1] + 1) . 'l' | |
if &listchars =~# 'eol:.' | |
let pattern .= '\_.' | |
else | |
let pattern .= '\(.\|^\)' | |
endif | |
return pattern | |
FUNCTION cursorword#matchadd() | |
Defined: ~/.vim/miv/cursorword/autoload/cursorword.vim line 23 | |
Called 41 times | |
Total time: 0.005936 | |
Self time: 0.005936 | |
count total (s) self (s) | |
41 0.000511 let enable = get(b:, 'cursorword', get(g:, 'cursorword', 1)) && !has('vim_starting') | |
41 0.000211 if !enable && !get(w:, 'cursorword_match') | return | endif | |
41 0.000306 let i = (a:0 ? a:1 : mode() ==# 'i' || mode() ==# 'R') && col('.') > 1 | |
41 0.000156 let line = getline('.') | |
41 0.000120 let linenr = line('.') | |
41 0.001544 let word = matchstr(line[:(col('.')-i-1)], '\k*$') . matchstr(line[(col('.')-i-1):], '^\k*')[1:] | |
41 0.000369 if get(w:, 'cursorword_state', []) ==# [ linenr, word, enable ] | return | endif | |
41 0.000190 let w:cursorword_state = [ linenr, word, enable ] | |
41 0.000242 silent! call matchdelete(w:cursorword_id0) | |
41 0.000159 silent! call matchdelete(w:cursorword_id1) | |
41 0.000088 let w:cursorword_match = 0 | |
41 0.000400 if !enable || word ==# '' || len(word) !=# strchars(word) && word !~# s:alphabets || len(word) > 1000 | return | endif | |
41 0.000260 let pattern = '\<' . escape(word, '~"\.^$[]*') . '\>' | |
41 0.000416 let w:cursorword_id0 = matchadd('CursorWord0', pattern, -1) | |
41 0.000624 let w:cursorword_id1 = matchadd('CursorWord' . &l:cursorline, '\%' . linenr . 'l' . pattern, -1) | |
41 0.000084 let w:cursorword_match = 1 | |
FUNCTION <SNR>35_LoadFTPlugin() | |
Defined: /usr/local/Cellar/vim/8.1.1500/share/vim/vim81/ftplugin.vim line 14 | |
Called 1 time | |
Total time: 0.001677 | |
Self time: 0.001580 | |
count total (s) self (s) | |
1 0.000007 if exists("b:undo_ftplugin") | |
exe b:undo_ftplugin | |
unlet! b:undo_ftplugin b:did_ftplugin | |
1 0.000001 endif | |
1 0.000006 let s = expand("<amatch>") | |
1 0.000002 if s != "" | |
1 0.000014 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 | |
1 0.000001 endif | |
" When there is a dot it is used to separate filetype names. Thus for | |
" "aaa.bbb" load "aaa" and then "bbb". | |
2 0.000009 for name in split(s, '\.') | |
1 0.001619 0.001522 exe 'runtime! ftplugin/' . name . '.vim ftplugin/' . name . '_*.vim ftplugin/' . name . '/*.vim' | |
2 0.000006 endfor | |
1 0.000000 endif | |
FUNCTION <SNR>82_LocalBrowse() | |
Defined: /usr/local/Cellar/vim/8.1.1500/share/vim/vim81/plugin/netrwPlugin.vim line 102 | |
Called 1 time | |
Total time: 0.000082 | |
Self time: 0.000082 | |
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. | |
1 0.000005 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 | |
1 0.000001 endif | |
" call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered=".s:vimentered.")") | |
1 0.000006 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 | |
1 0.000024 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 | |
1 0.000001 else | |
" not a directory, ignore it | |
" call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...") | |
1 0.000001 endif | |
" call Decho("(s:LocalBrowse) COMBAK#26: buf#".bufnr("%")." file<".expand("%")."> line#".line(".")." col#".col(".")) | |
" call Dret("s:LocalBrowse") | |
FUNCTION highlighturl#delete_url_match() | |
Defined: ~/.vim/miv/highlighturl/autoload/highlighturl.vim line 55 | |
Called 2 times | |
Total time: 0.000096 | |
Self time: 0.000096 | |
count total (s) self (s) | |
8 0.000038 for m in getmatches() | |
6 0.000018 if m.group ==# 'HighlightUrl' || m.group ==# 'HighlightUrlCursor' | |
2 0.000010 call matchdelete(m.id) | |
6 0.000006 endif | |
8 0.000005 endfor | |
FUNCTION <SNR>105_add_hl_guard() | |
Defined: ~/.vim/miv/traces/autoload/traces.vim line 395 | |
Called 25 times | |
Total time: 0.000111 | |
Self time: 0.000111 | |
count total (s) self (s) | |
25 0.000067 if empty(a:pattern) | |
25 0.000025 return '' | |
endif | |
if a:type is 's' | |
if empty(a:range) | |
let start = s:buf[s:nr].cur_init_pos[0] - 1 | |
let end = s:buf[s:nr].cur_init_pos[0] + 1 | |
else | |
let start = a:range[-2] - 1 | |
let end = a:range[-1] + 1 | |
endif | |
elseif a:type is 'g' | |
if empty(a:range) | |
return a:pattern | |
else | |
let start = a:range[-2] - 1 | |
let end = a:range[-1] + 1 | |
endif | |
elseif a:type is 'r' | |
let start = a:range - 1 | |
let end = a:range + 1 | |
endif | |
let range = '\m\%>'. start .'l' . '\%<' . end . 'l' | |
" group is necessary to contain pattern inside range when using branches (\|) | |
let group_start = '\%(' | |
let group_end = '\m\)' | |
" add backslash to the end of pattern if it ends with odd number of | |
" backslashes, this is required to properly close group | |
if len(matchstr(a:pattern, '\\\+$')) % 2 | |
let group_end = '\' . group_end | |
endif | |
return range . group_start . a:pattern . group_end | |
FUNCTION traces#init() | |
Defined: ~/.vim/miv/traces/autoload/traces.vim line 976 | |
Called 25 times | |
Total time: 0.029670 | |
Self time: 0.007980 | |
count total (s) self (s) | |
25 0.000326 if &buftype ==# 'terminal' || (has('nvim') && !empty(&inccommand)) | |
if exists('s:track_cmdl_timer') | |
call timer_stop(s:track_cmdl_timer) | |
endif | |
return | |
25 0.000036 endif | |
25 0.000185 let s:nr = bufnr('%') | |
25 0.000210 if !exists('s:buf[s:nr]') | |
2 0.000472 0.000043 call s:cmdl_enter(a:view) | |
25 0.000028 endif | |
25 0.000075 let s:highlighted = 0 | |
25 0.000048 let s:moved = 0 | |
25 0.000091 let s:last_pattern = @/ | |
25 0.000076 let s:specifier_delimiter = 0 | |
25 0.000041 let s:wundo_time = 0 | |
25 0.000123 if s:buf[s:nr].duration < s:timeout | |
25 0.000130 let start_time = reltime() | |
25 0.000028 endif | |
25 0.000080 if s:buf[s:nr].changed | |
let view = winsaveview() | |
noautocmd keepjumps silent undo | |
let s:buf[s:nr].changed = 0 | |
let s:highlighted = 1 | |
call s:restore_marks() | |
call winrestview(view) | |
25 0.000022 endif | |
25 0.000100 if s:buf[s:nr].duration < s:timeout | |
25 0.021177 0.001073 let cmdl = s:evaluate_cmdl([s:skip_modifiers(a:cmdl)]) | |
" range preview | |
25 0.000230 if (!empty(cmdl.cmd.name) && !empty(cmdl.cmd.args) || s:buf[s:nr].show_range || s:specifier_delimiter && g:traces_num_range_preview) && !get(s:, 'entire_file') | |
call s:highlight('Visual', cmdl.range.pattern, 100) | |
if empty(cmdl.cmd.name) | |
call s:highlight('TracesSearch', cmdl.range.specifier, 101) | |
endif | |
call s:pos_range(cmdl.range.end, cmdl.range.specifier) | |
25 0.000018 else | |
" clear unnecessary range hl | |
25 0.001025 0.000453 call s:highlight('Visual', '', 100) | |
25 0.000016 endif | |
" cmd preview | |
25 0.000467 if cmdl.cmd.name =~# '\v^%(s%[ubstitute]|sm%[agic]|sno%[magic])$' | |
call s:preview_substitute(cmdl) | |
25 0.000235 elseif cmdl.cmd.name =~# '\v^%(g%[lobal]\!=|v%[global])$' | |
call s:preview_global(cmdl) | |
25 0.000111 elseif cmdl.cmd.name =~# '\v^%(sor%[t]\!=)$' | |
call s:preview_sort(cmdl) | |
25 0.000012 endif | |
25 0.000148 if empty(cmdl.cmd.name) && empty(cmdl.range.specifier) || !empty(cmdl.cmd.name) && empty(cmdl.cmd.args) | |
25 0.001041 0.000456 call s:highlight('TracesSearch', '', 101) | |
25 0.000023 endif | |
25 0.000017 endif | |
" move to starting position if necessary | |
25 0.000247 if !s:moved && winsaveview() != s:buf[s:nr].view && !wildmenumode() | |
call winrestview(s:buf[s:nr].view) | |
25 0.000021 endif | |
" update screen if necessary | |
25 0.000030 if s:highlighted | |
call s:adjust_cmdheight() | |
if has('nvim') | |
redraw | |
else | |
" https://github.com/markonm/traces.vim/issues/17 | |
" if Vim is missing CmdlineChanged, use explicit redraw only at the | |
" start of preview or else it is going to be slow | |
if exists('##CmdlineChanged') || s:buf[s:nr].redraw | |
redraw | |
let s:buf[s:nr].redraw = 0 | |
else | |
call winline() | |
endif | |
" after patch 8.0.1449, necessary for linux cui, otherwise highlighting | |
" is not drawn properly, fixed by 8.0.1476 | |
if has('unix') && !has('gui_running') && has("patch-8.0.1449") && !has("patch-8.0.1476") | |
silent! call feedkeys(getcmdpos() is 1 ? "\<right>\<left>" : "\<left>\<right>", 'tn') | |
endif | |
endif | |
25 0.000014 endif | |
25 0.000062 if exists('start_time') | |
25 0.000218 let s:buf[s:nr].duration = reltimefloat(reltime(start_time)) * 1000 - s:wundo_time | |
25 0.000018 endif | |
FUNCTION autoft#set() | |
Defined: ~/.vim/miv/autoft/autoload/autoft.vim line 11 | |
Called 2 times | |
Total time: 0.000304 | |
Self time: 0.000304 | |
count total (s) self (s) | |
2 0.000034 if &l:filetype !=# '' || &l:buftype !=# '' && &l:buftype !=# 'nofile' || !get(b:, 'autoft_enable', get(g:, 'autoft_enable', 1)) | |
return | |
2 0.000003 endif | |
2 0.000004 try | |
2 0.000018 let save_cpo = &cpo | |
2 0.000026 set cpo&vim | |
2 0.000028 let maxline = min([max([get(g:, 'autoft_maxline', 10), 1]), line('$')]) | |
2 0.000020 let maxcol = max([get(g:, 'autoft_maxcol', 80), 10]) - 1 | |
2 0.000027 let lines = map(range(1, maxline), 'getline(v:val)[:(maxcol)]') | |
2 0.000013 if len(lines) == 1 && lines[0] ==# '' | |
2 0.000004 return | |
endif | |
let ftpat = {} | |
for ftpat in get(g:, 'autoft_config', []) | |
for line in lines | |
if line =~# ftpat.pattern && ftpat.filetype !=# '' | |
let &l:filetype = ftpat.filetype | |
return | |
endif | |
endfor | |
endfor | |
catch | |
call autoft#error(v:exception, ftpat) | |
2 0.000003 finally | |
2 0.000018 let &cpo = save_cpo | |
2 0.000004 endtry | |
FUNCTION winfix#tabfocus() | |
Defined: ~/.vim/miv/winfix/autoload/winfix.vim line 115 | |
Called 1 time | |
Total time: 0.000006 | |
Self time: 0.000006 | |
count total (s) self (s) | |
1 0.000004 if len(s:stack) < 2 || s:stack[-2].tabcnt <= s:state.tabcnt || s:stack[-2].tabid ==# s:state.tabid | |
1 0.000000 return | |
endif | |
let tabnrs = {} | |
for i in range(1, tabpagenr('$')) | |
if gettabvar(i, 'winfix_tabid') !=# '' | |
let tabnrs[gettabvar(i, 'winfix_tabid')] = i | |
endif | |
endfor | |
let i = len(s:stack) - 2 | |
while i >= 0 && !has_key(tabnrs, s:stack[i].tabid) | |
let i -= 1 | |
endwhile | |
if i >= 0 | |
if tabpagenr('$') > 1 && has_key(tabnrs, s:stack[i].tabid) | |
silent! noautocmd execute 'tabnext' tabnrs[s:stack[i].tabid] | |
let s:move = 1 | |
endif | |
endif | |
FUNCTION lightline_powerful#mode() | |
Defined: ~/.vim/miv/lightline-powerful/autoload/lightline_powerful.vim line 64 | |
Called 30 times | |
Total time: 0.002386 | |
Self time: 0.002143 | |
count total (s) self (s) | |
30 0.000442 if &ft ==# 'calendar' | |
call lightline#link("nvV\<C-v>"[b:calendar.visual_mode()]) | |
30 0.000147 elseif &ft ==# 'thumbnail' | |
if !empty(b:thumbnail.view.visual_mode) | |
call lightline#link(b:thumbnail.view.visual_mode) | |
endif | |
30 0.000198 elseif expand('%:t') ==# 'ControlP' | |
call lightline#link('iR'[get(g:lightline, 'ctrlp_regex', 0)]) | |
30 0.000033 endif | |
30 0.000986 0.000743 return get(s:m, expand('%:t'), get(s:p, &ft, lightline#mode())) | |
FUNCTION <SNR>12_DetectJQ() | |
Defined: ~/.vim/miv/miv/ftdetect/jq.vim line 1 | |
Called 1 time | |
Total time: 0.000007 | |
Self time: 0.000007 | |
count total (s) self (s) | |
1 0.000005 if did_filetype() && &filetype !=# 'conf' | |
1 0.000002 return | |
endif | |
if getline(1) =~# '^#!.*\<jq\>' | |
set filetype=jq | |
endif | |
FUNCTION <SNR>99_on_text_document_did_close() | |
Defined: ~/.vim/miv/lsp/autoload/lsp.vim line 243 | |
Called 1 time | |
Total time: 0.001140 | |
Self time: 0.001119 | |
count total (s) self (s) | |
1 0.000014 let l:buf = bufnr('%') | |
1 0.000857 if getbufvar(l:buf, '&buftype') ==# 'terminal' | return | endif | |
1 0.000266 0.000245 call lsp#log('s:on_text_document_did_close()', l:buf) | |
FUNCTION lightline#statusline() | |
Defined: ~/.vim/miv/lightline/autoload/lightline.vim line 311 | |
Called 2 times | |
Total time: 0.004081 | |
Self time: 0.000075 | |
count total (s) self (s) | |
2 0.000005 if a:inactive && !has_key(s:highlight, 'inactive') | |
call lightline#highlight('inactive') | |
2 0.000001 endif | |
2 0.004070 0.000064 return s:line(0, a:inactive) | |
FUNCTIONS SORTED ON TOTAL TIME | |
count total (s) self (s) function | |
5 56.026677 0.000209 <SNR>69_notify_event_to_source() | |
5 56.026468 0.008281 <SNR>68_on_event() | |
2 56.018187 <SNR>68_refresh_keywords() | |
25 0.029670 0.007980 traces#init() | |
40 0.016497 0.002600 lsp#ui#vim#references#highlight() | |
25 0.016399 0.003576 <SNR>105_evaluate_cmdl() | |
41 0.014090 lsp#get_whitelisted_servers() | |
25 0.006608 0.005092 <SNR>105_parse_range() | |
60 0.005970 0.002269 lightline_powerful#gitbranch() | |
41 0.005936 cursorword#matchadd() | |
2 0.004274 0.000193 lightline#update() | |
2 0.004081 0.000075 lightline#statusline() | |
2 0.004006 0.001902 <SNR>89_line() | |
25 0.003705 <SNR>105_skip_modifiers() | |
6 0.003701 0.001223 gitbranch#name() | |
8 0.003414 0.000661 gitbranch#detect() | |
25 0.003238 0.001456 <SNR>105_parse_command() | |
8 0.002753 gitbranch#dir() | |
25 0.002440 <SNR>105_evaluate_range() | |
30 0.002386 0.002143 lightline_powerful#mode() | |
FUNCTIONS SORTED ON SELF TIME | |
count total (s) self (s) function | |
2 56.018187 <SNR>68_refresh_keywords() | |
41 0.014090 lsp#get_whitelisted_servers() | |
5 56.026468 0.008281 <SNR>68_on_event() | |
25 0.029670 0.007980 traces#init() | |
41 0.005936 cursorword#matchadd() | |
25 0.006608 0.005092 <SNR>105_parse_range() | |
25 0.003705 <SNR>105_skip_modifiers() | |
25 0.016399 0.003576 <SNR>105_evaluate_cmdl() | |
8 0.002753 gitbranch#dir() | |
40 0.016497 0.002600 lsp#ui#vim#references#highlight() | |
25 0.002440 <SNR>105_evaluate_range() | |
60 0.005970 0.002269 lightline_powerful#gitbranch() | |
30 0.002386 0.002143 lightline_powerful#mode() | |
100 0.002119 <SNR>105_trim() | |
40 0.002193 0.001999 <SNR>99_on_cursor_moved() | |
2 0.004006 0.001902 <SNR>89_line() | |
40 0.001644 parenmatch#update() | |
1 0.001677 0.001580 <SNR>35_LoadFTPlugin() | |
25 0.003238 0.001456 <SNR>105_parse_command() | |
6 0.003701 0.001223 gitbranch#name() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment