Skip to content

Instantly share code, notes, and snippets.

@bstaletic
Last active March 10, 2021 21:17
Show Gist options
  • Save bstaletic/33f8adb85ffe20b3d8e58af202d71354 to your computer and use it in GitHub Desktop.
Save bstaletic/33f8adb85ffe20b3d8e58af202d71354 to your computer and use it in GitHub Desktop.
SCRIPT /usr/share/vim/vim82/ftplugin/python.vim
Sourced 1 time
Total time: 0.000708
Self time: 0.000708
count total (s) self (s)
" Vim filetype plugin file
" Language: python
" Maintainer: Tom Picton <tom@tompicton.co.uk>
" Previous Maintainer: James Sully <sullyj3@gmail.com>
" Previous Maintainer: Johannes Zellner <johannes@zellner.org>
" Last Change: Mon, 5 October 2020
" https://github.com/tpict/vim-ftplugin-python
1 0.000008 if exists("b:did_ftplugin") | finish | endif
1 0.000004 let b:did_ftplugin = 1
1 0.000006 let s:keepcpo= &cpo
1 0.000010 set cpo&vim
1 0.000005 setlocal cinkeys-=0#
1 0.000003 setlocal indentkeys-=0#
1 0.000005 setlocal include=^\\s*\\(from\\\|import\\)
1 0.000003 setlocal define=^\\s*\\(def\\\|class\\)
" For imports with leading .., append / and replace additional .s with ../
1 0.000003 let b:grandparent_match = '^\(.\.\)\(\.*\)'
1 0.000003 let b:grandparent_sub = '\=submatch(1)."/".repeat("../",strlen(submatch(2)))'
" For imports with a single leading ., replace it with ./
1 0.000002 let b:parent_match = '^\.\(\.\)\@!'
1 0.000002 let b:parent_sub = './'
" Replace any . sandwiched between word characters with /
1 0.000002 let b:child_match = '\(\w\)\.\(\w\)'
1 0.000002 let b:child_sub = '\1/\2'
1 0.000006 setlocal includeexpr=substitute(substitute(substitute(
\v:fname,
\b:grandparent_match,b:grandparent_sub,''),
\b:parent_match,b:parent_sub,''),
\b:child_match,b:child_sub,'g')
1 0.000003 setlocal suffixesadd=.py
1 0.000004 setlocal comments=b:#,fb:-
1 0.000003 setlocal commentstring=#\ %s
1 0.000008 if has('python3')
1 0.000003 setlocal omnifunc=python3complete#Complete
elseif has('python')
setlocal omnifunc=pythoncomplete#Complete
1 0.000001 endif
1 0.000006 set wildignore+=*.pyc
1 0.000003 let b:next_toplevel='\v%$\|^(class\|def\|async def)>'
1 0.000002 let b:prev_toplevel='\v^(class\|def\|async def)>'
1 0.000003 let b:next_endtoplevel='\v%$\|\S.*\n+(def\|class)'
1 0.000002 let b:prev_endtoplevel='\v\S.*\n+(def\|class)'
1 0.000002 let b:next='\v%$\|^\s*(class\|def\|async def)>'
1 0.000003 let b:prev='\v^\s*(class\|def\|async def)>'
1 0.000003 let b:next_end='\v\S\n*(%$\|^(\s*\n*)*(class\|def\|async def)\|^\S)'
1 0.000002 let b:prev_end='\v\S\n*(^(\s*\n*)*(class\|def\|async def)\|^\S)'
1 0.000005 if !exists('g:no_plugin_maps') && !exists('g:no_python_maps')
1 0.000025 execute "nnoremap <silent> <buffer> ]] :call <SID>Python_jump('n', '". b:next_toplevel."', 'W', v:count1)<cr>"
1 0.000017 execute "nnoremap <silent> <buffer> [[ :call <SID>Python_jump('n', '". b:prev_toplevel."', 'Wb', v:count1)<cr>"
1 0.000016 execute "nnoremap <silent> <buffer> ][ :call <SID>Python_jump('n', '". b:next_endtoplevel."', 'W', v:count1, 0)<cr>"
1 0.000016 execute "nnoremap <silent> <buffer> [] :call <SID>Python_jump('n', '". b:prev_endtoplevel."', 'Wb', v:count1, 0)<cr>"
1 0.000016 execute "nnoremap <silent> <buffer> ]m :call <SID>Python_jump('n', '". b:next."', 'W', v:count1)<cr>"
1 0.000017 execute "nnoremap <silent> <buffer> [m :call <SID>Python_jump('n', '". b:prev."', 'Wb', v:count1)<cr>"
1 0.000019 execute "nnoremap <silent> <buffer> ]M :call <SID>Python_jump('n', '". b:next_end."', 'W', v:count1, 0)<cr>"
1 0.000018 execute "nnoremap <silent> <buffer> [M :call <SID>Python_jump('n', '". b:prev_end."', 'Wb', v:count1, 0)<cr>"
1 0.000016 execute "onoremap <silent> <buffer> ]] :call <SID>Python_jump('o', '". b:next_toplevel."', 'W', v:count1)<cr>"
1 0.000016 execute "onoremap <silent> <buffer> [[ :call <SID>Python_jump('o', '". b:prev_toplevel."', 'Wb', v:count1)<cr>"
1 0.000015 execute "onoremap <silent> <buffer> ][ :call <SID>Python_jump('o', '". b:next_endtoplevel."', 'W', v:count1, 0)<cr>"
1 0.000015 execute "onoremap <silent> <buffer> [] :call <SID>Python_jump('o', '". b:prev_endtoplevel."', 'Wb', v:count1, 0)<cr>"
1 0.000016 execute "onoremap <silent> <buffer> ]m :call <SID>Python_jump('o', '". b:next."', 'W', v:count1)<cr>"
1 0.000016 execute "onoremap <silent> <buffer> [m :call <SID>Python_jump('o', '". b:prev."', 'Wb', v:count1)<cr>"
1 0.000018 execute "onoremap <silent> <buffer> ]M :call <SID>Python_jump('o', '". b:next_end."', 'W', v:count1, 0)<cr>"
1 0.000018 execute "onoremap <silent> <buffer> [M :call <SID>Python_jump('o', '". b:prev_end."', 'Wb', v:count1, 0)<cr>"
1 0.000016 execute "xnoremap <silent> <buffer> ]] :call <SID>Python_jump('x', '". b:next_toplevel."', 'W', v:count1)<cr>"
1 0.000015 execute "xnoremap <silent> <buffer> [[ :call <SID>Python_jump('x', '". b:prev_toplevel."', 'Wb', v:count1)<cr>"
1 0.000019 execute "xnoremap <silent> <buffer> ][ :call <SID>Python_jump('x', '". b:next_endtoplevel."', 'W', v:count1, 0)<cr>"
1 0.000015 execute "xnoremap <silent> <buffer> [] :call <SID>Python_jump('x', '". b:prev_endtoplevel."', 'Wb', v:count1, 0)<cr>"
1 0.000015 execute "xnoremap <silent> <buffer> ]m :call <SID>Python_jump('x', '". b:next."', 'W', v:count1)<cr>"
1 0.000016 execute "xnoremap <silent> <buffer> [m :call <SID>Python_jump('x', '". b:prev."', 'Wb', v:count1)<cr>"
1 0.000018 execute "xnoremap <silent> <buffer> ]M :call <SID>Python_jump('x', '". b:next_end."', 'W', v:count1, 0)<cr>"
1 0.000018 execute "xnoremap <silent> <buffer> [M :call <SID>Python_jump('x', '". b:prev_end."', 'Wb', v:count1, 0)<cr>"
1 0.000001 endif
1 0.000006 if !exists('*<SID>Python_jump')
fun! <SID>Python_jump(mode, motion, flags, count, ...) range
let l:startofline = (a:0 >= 1) ? a:1 : 1
if a:mode == 'x'
normal! gv
endif
if l:startofline == 1
normal! 0
endif
let cnt = a:count
mark '
while cnt > 0
call search(a:motion, a:flags)
let cnt = cnt - 1
endwhile
if l:startofline == 1
normal! ^
endif
endfun
1 0.000001 endif
1 0.000005 if has("browsefilter") && !exists("b:browsefilter")
1 0.000005 let b:browsefilter = "Python Files (*.py)\t*.py\n" .
\ "All Files (*.*)\t*.*\n"
1 0.000001 endif
1 0.000005 if !exists("g:python_recommended_style") || g:python_recommended_style != 0
" As suggested by PEP8.
1 0.000018 setlocal expandtab tabstop=4 softtabstop=4 shiftwidth=4
1 0.000001 endif
" Use pydoc for keywordprg.
" Unix users preferentially get pydoc3, then pydoc2.
" Windows doesn't have a standalone pydoc executable in $PATH by default, nor
" does it have separate python2/3 executables, so Windows users just get
" whichever version corresponds to their installed Python version.
1 0.000019 if executable('python3')
1 0.000005 setlocal keywordprg=python3\ -m\ pydoc
elseif executable('python')
setlocal keywordprg=python\ -m\ pydoc
1 0.000001 endif
" Script for filetype switching to undo the local stuff we may have changed
1 0.000045 let b:undo_ftplugin = 'setlocal cinkeys<'
\ . '|setlocal comments<'
\ . '|setlocal commentstring<'
\ . '|setlocal expandtab<'
\ . '|setlocal include<'
\ . '|setlocal includeexpr<'
\ . '|setlocal indentkeys<'
\ . '|setlocal keywordprg<'
\ . '|setlocal omnifunc<'
\ . '|setlocal shiftwidth<'
\ . '|setlocal softtabstop<'
\ . '|setlocal suffixesadd<'
\ . '|setlocal tabstop<'
\ . '|silent! nunmap <buffer> [M'
\ . '|silent! nunmap <buffer> [['
\ . '|silent! nunmap <buffer> []'
\ . '|silent! nunmap <buffer> [m'
\ . '|silent! nunmap <buffer> ]M'
\ . '|silent! nunmap <buffer> ]['
\ . '|silent! nunmap <buffer> ]]'
\ . '|silent! nunmap <buffer> ]m'
\ . '|silent! ounmap <buffer> [M'
\ . '|silent! ounmap <buffer> [['
\ . '|silent! ounmap <buffer> []'
\ . '|silent! ounmap <buffer> [m'
\ . '|silent! ounmap <buffer> ]M'
\ . '|silent! ounmap <buffer> ]['
\ . '|silent! ounmap <buffer> ]]'
\ . '|silent! ounmap <buffer> ]m'
\ . '|silent! xunmap <buffer> [M'
\ . '|silent! xunmap <buffer> [['
\ . '|silent! xunmap <buffer> []'
\ . '|silent! xunmap <buffer> [m'
\ . '|silent! xunmap <buffer> ]M'
\ . '|silent! xunmap <buffer> ]['
\ . '|silent! xunmap <buffer> ]]'
\ . '|silent! xunmap <buffer> ]m'
\ . '|unlet! b:browsefilter'
\ . '|unlet! b:child_match'
\ . '|unlet! b:child_sub'
\ . '|unlet! b:grandparent_match'
\ . '|unlet! b:grandparent_sub'
\ . '|unlet! b:next'
\ . '|unlet! b:next_end'
\ . '|unlet! b:next_endtoplevel'
\ . '|unlet! b:next_toplevel'
\ . '|unlet! b:parent_match'
\ . '|unlet! b:parent_sub'
\ . '|unlet! b:prev'
\ . '|unlet! b:prev_end'
\ . '|unlet! b:prev_endtoplevel'
\ . '|unlet! b:prev_toplevel'
\ . '|unlet! b:undo_ftplugin'
1 0.000011 let &cpo = s:keepcpo
1 0.000005 unlet s:keepcpo
SCRIPT /usr/share/vim/vim82/indent/python.vim
Sourced 1 time
Total time: 0.000052
Self time: 0.000052
count total (s) self (s)
" Vim indent file
" Language: Python
" Maintainer: Bram Moolenaar <Bram@vim.org>
" Original Author: David Bustos <bustos@caltech.edu>
" Last Change: 2019 Feb 21
" Only load this indent file when no other was loaded.
1 0.000005 if exists("b:did_indent")
finish
1 0.000001 endif
1 0.000002 let b:did_indent = 1
" Some preliminary settings
1 0.000013 setlocal nolisp " Make sure lisp indenting doesn't supersede us
1 0.000005 setlocal autoindent " indentexpr isn't much help otherwise
1 0.000003 setlocal indentexpr=GetPythonIndent(v:lnum)
1 0.000004 setlocal indentkeys+=<:>,=elif,=except
" Only define the function once.
1 0.000004 if exists("*GetPythonIndent")
1 0.000002 finish
endif
let s:keepcpo= &cpo
set cpo&vim
" Come here when loading the script the first time.
let s:maxoff = 50 " maximum number of lines to look backwards for ()
" See if the specified line is already user-dedented from the expected value.
function s:Dedented(lnum, expected)
return indent(a:lnum) <= a:expected - shiftwidth()
endfunction
function GetPythonIndent(lnum)
" If this line is explicitly joined: If the previous line was also joined,
" line it up with that one, otherwise add two 'shiftwidth'
if getline(a:lnum - 1) =~ '\\$'
if a:lnum > 1 && getline(a:lnum - 2) =~ '\\$'
return indent(a:lnum - 1)
endif
return indent(a:lnum - 1) + (exists("g:pyindent_continue") ? eval(g:pyindent_continue) : (shiftwidth() * 2))
endif
" If the start of the line is in a string don't change the indent.
if has('syntax_items')
\ && synIDattr(synID(a:lnum, 1, 1), "name") =~ "String$"
return -1
endif
" Search backwards for the previous non-empty line.
let plnum = prevnonblank(v:lnum - 1)
if plnum == 0
" This is the first non-empty line, use zero indent.
return 0
endif
call cursor(plnum, 1)
" Identing inside parentheses can be very slow, regardless of the searchpair()
" timeout, so let the user disable this feature if he doesn't need it
let disable_parentheses_indenting = get(g:, "pyindent_disable_parentheses_indenting", 0)
if disable_parentheses_indenting == 1
let plindent = indent(plnum)
let plnumstart = plnum
else
" searchpair() can be slow sometimes, limit the time to 150 msec or what is
" put in g:pyindent_searchpair_timeout
let searchpair_stopline = 0
let searchpair_timeout = get(g:, 'pyindent_searchpair_timeout', 150)
" If the previous line is inside parenthesis, use the indent of the starting
" line.
" Trick: use the non-existing "dummy" variable to break out of the loop when
" going too far back.
let parlnum = searchpair('(\|{\|\[', '', ')\|}\|\]', 'nbW',
\ "line('.') < " . (plnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
\ searchpair_stopline, searchpair_timeout)
if parlnum > 0
let plindent = indent(parlnum)
let plnumstart = parlnum
else
let plindent = indent(plnum)
let plnumstart = plnum
endif
" When inside parenthesis: If at the first line below the parenthesis add
" two 'shiftwidth', otherwise same as previous line.
" i = (a
" + b
" + c)
call cursor(a:lnum, 1)
let p = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW',
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
\ searchpair_stopline, searchpair_timeout)
if p > 0
if p == plnum
" When the start is inside parenthesis, only indent one 'shiftwidth'.
let pp = searchpair('(\|{\|\[', '', ')\|}\|\]', 'bW',
\ "line('.') < " . (a:lnum - s:maxoff) . " ? dummy :"
\ . " synIDattr(synID(line('.'), col('.'), 1), 'name')"
\ . " =~ '\\(Comment\\|Todo\\|String\\)$'",
\ searchpair_stopline, searchpair_timeout)
if pp > 0
return indent(plnum) + (exists("g:pyindent_nested_paren") ? eval(g:pyindent_nested_paren) : shiftwidth())
endif
return indent(plnum) + (exists("g:pyindent_open_paren") ? eval(g:pyindent_open_paren) : (shiftwidth() * 2))
endif
if plnumstart == p
return indent(plnum)
endif
return plindent
endif
endif
" Get the line and remove a trailing comment.
" Use syntax highlighting attributes when possible.
let pline = getline(plnum)
let pline_len = strlen(pline)
if has('syntax_items')
" If the last character in the line is a comment, do a binary search for
" the start of the comment. synID() is slow, a linear search would take
" too long on a long line.
if synIDattr(synID(plnum, pline_len, 1), "name") =~ "\\(Comment\\|Todo\\)$"
let min = 1
let max = pline_len
while min < max
let col = (min + max) / 2
if synIDattr(synID(plnum, col, 1), "name") =~ "\\(Comment\\|Todo\\)$"
let max = col
else
let min = col + 1
endif
endwhile
let pline = strpart(pline, 0, min - 1)
endif
else
let col = 0
while col < pline_len
if pline[col] == '#'
let pline = strpart(pline, 0, col)
break
endif
let col = col + 1
endwhile
endif
" If the previous line ended with a colon, indent this line
if pline =~ ':\s*$'
return plindent + shiftwidth()
endif
" If the previous line was a stop-execution statement...
if getline(plnum) =~ '^\s*\(break\|continue\|raise\|return\|pass\)\>'
" See if the user has already dedented
if s:Dedented(a:lnum, indent(plnum))
" If so, trust the user
return -1
endif
" If not, recommend one dedent
return indent(plnum) - shiftwidth()
endif
" If the current line begins with a keyword that lines up with "try"
if getline(a:lnum) =~ '^\s*\(except\|finally\)\>'
let lnum = a:lnum - 1
while lnum >= 1
if getline(lnum) =~ '^\s*\(try\|except\)\>'
let ind = indent(lnum)
if ind >= indent(a:lnum)
return -1 " indent is already less than this
endif
return ind " line up with previous try or except
endif
let lnum = lnum - 1
endwhile
return -1 " no matching "try"!
endif
" If the current line begins with a header keyword, dedent
if getline(a:lnum) =~ '^\s*\(elif\|else\)\>'
" Unless the previous line was a one-liner
if getline(plnumstart) =~ '^\s*\(for\|if\|try\)\>'
return plindent
endif
" Or the user has already dedented
if s:Dedented(a:lnum, plindent)
return -1
endif
return plindent - shiftwidth()
endif
" When after a () construct we probably want to go back to the start line.
" a = (b
" + c)
" here
if parlnum > 0
" ...unless the user has already dedented
if s:Dedented(a:lnum, plindent)
return -1
else
return plindent
endif
endif
return -1
endfunction
let &cpo = s:keepcpo
unlet s:keepcpo
" vim:sw=2
SCRIPT /home/bstaletic/.vim/after/indent/python.vim
Sourced 1 time
Total time: 0.000038
Self time: 0.000038
count total (s) self (s)
1 0.000017 if exists( 'b:indent_python' )
finish
1 0.000001 endif
1 0.000003 let b:indent_python = 1
" In python, use two spaces for indentation
1 0.000010 setlocal softtabstop=2 shiftwidth=2 expandtab
SCRIPT /usr/share/vim/vim82/syntax/python.vim
Sourced 1 time
Total time: 0.000843
Self time: 0.000843
count total (s) self (s)
" Vim syntax file
" Language: Python
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
" Last Change: 2016 Oct 29
" Credits: Neil Schemenauer <nas@python.ca>
" Dmitry Vasiliev
"
" This version is a major rewrite by Zvezdan Petkovic.
"
" - introduced highlighting of doctests
" - updated keywords, built-ins, and exceptions
" - corrected regular expressions for
"
" * functions
" * decorators
" * strings
" * escapes
" * numbers
" * space error
"
" - corrected synchronization
" - more highlighting is ON by default, except
" - space error highlighting is OFF by default
"
" Optional highlighting can be controlled using these variables.
"
" let python_no_builtin_highlight = 1
" let python_no_doctest_code_highlight = 1
" let python_no_doctest_highlight = 1
" let python_no_exception_highlight = 1
" let python_no_number_highlight = 1
" let python_space_error_highlight = 1
"
" All the options above can be switched on together.
"
" let python_highlight_all = 1
"
" quit when a syntax file was already loaded.
1 0.000007 if exists("b:current_syntax")
finish
1 0.000001 endif
" We need nocompatible mode in order to continue lines with backslashes.
" Original setting will be restored.
1 0.000007 let s:cpo_save = &cpo
1 0.000008 set cpo&vim
1 0.000003 if exists("python_no_doctest_highlight")
let python_no_doctest_code_highlight = 1
1 0.000000 endif
1 0.000003 if exists("python_highlight_all")
if exists("python_no_builtin_highlight")
unlet python_no_builtin_highlight
endif
if exists("python_no_doctest_code_highlight")
unlet python_no_doctest_code_highlight
endif
if exists("python_no_doctest_highlight")
unlet python_no_doctest_highlight
endif
if exists("python_no_exception_highlight")
unlet python_no_exception_highlight
endif
if exists("python_no_number_highlight")
unlet python_no_number_highlight
endif
let python_space_error_highlight = 1
1 0.000001 endif
" Keep Python keywords in alphabetical order inside groups for easy
" comparison with the table in the 'Python Language Reference'
" https://docs.python.org/2/reference/lexical_analysis.html#keywords,
" https://docs.python.org/3/reference/lexical_analysis.html#keywords.
" Groups are in the order presented in NAMING CONVENTIONS in syntax.txt.
" Exceptions come last at the end of each group (class and def below).
"
" Keywords 'with' and 'as' are new in Python 2.6
" (use 'from __future__ import with_statement' in Python 2.5).
"
" Some compromises had to be made to support both Python 3 and 2.
" We include Python 3 features, but when a definition is duplicated,
" the last definition takes precedence.
"
" - 'False', 'None', and 'True' are keywords in Python 3 but they are
" built-ins in 2 and will be highlighted as built-ins below.
" - 'exec' is a built-in in Python 3 and will be highlighted as
" built-in below.
" - 'nonlocal' is a keyword in Python 3 and will be highlighted.
" - 'print' is a built-in in Python 3 and will be highlighted as
" built-in below (use 'from __future__ import print_function' in 2)
" - async and await were added in Python 3.5 and are soft keywords.
"
1 0.000006 syn keyword pythonStatement False None True
1 0.000004 syn keyword pythonStatement as assert break continue del exec global
1 0.000003 syn keyword pythonStatement lambda nonlocal pass print return with yield
1 0.000005 syn keyword pythonStatement class def nextgroup=pythonFunction skipwhite
1 0.000002 syn keyword pythonConditional elif else if
1 0.000002 syn keyword pythonRepeat for while
1 0.000002 syn keyword pythonOperator and in is not or
1 0.000003 syn keyword pythonException except finally raise try
1 0.000002 syn keyword pythonInclude from import
1 0.000001 syn keyword pythonAsync async await
" Decorators (new in Python 2.4)
" A dot must be allowed because of @MyClass.myfunc decorators.
1 0.000005 syn match pythonDecorator "@" display contained
1 0.000007 syn match pythonDecoratorName "@\s*\h\%(\w\|\.\)*" display contains=pythonDecorator
" Python 3.5 introduced the use of the same symbol for matrix multiplication:
" https://www.python.org/dev/peps/pep-0465/. We now have to exclude the
" symbol from highlighting when used in that context.
" Single line multiplication.
1 0.000013 syn match pythonMatrixMultiply
\ "\%(\w\|[])]\)\s*@"
\ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue
\ transparent
" Multiplication continued on the next line after backslash.
1 0.000013 syn match pythonMatrixMultiply
\ "[^\\]\\\s*\n\%(\s*\.\.\.\s\)\=\s\+@"
\ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue
\ transparent
" Multiplication in a parenthesized expression over multiple lines with @ at
" the start of each continued line; very similar to decorators and complex.
1 0.000017 syn match pythonMatrixMultiply
\ "^\s*\%(\%(>>>\|\.\.\.\)\s\+\)\=\zs\%(\h\|\%(\h\|[[(]\).\{-}\%(\w\|[])]\)\)\s*\n\%(\s*\.\.\.\s\)\=\s\+@\%(.\{-}\n\%(\s*\.\.\.\s\)\=\s\+@\)*"
\ contains=ALLBUT,pythonDecoratorName,pythonDecorator,pythonFunction,pythonDoctestValue
\ transparent
1 0.000004 syn match pythonFunction "\h\w*" display contained
1 0.000006 syn match pythonComment "#.*$" contains=pythonTodo,@Spell
1 0.000003 syn keyword pythonTodo FIXME NOTE NOTES TODO XXX contained
" Triple-quoted strings can contain doctests.
1 0.000013 syn region pythonString matchgroup=pythonQuotes
\ start=+[uU]\=\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
\ contains=pythonEscape,@Spell
1 0.000011 syn region pythonString matchgroup=pythonTripleQuotes
\ start=+[uU]\=\z('''\|"""\)+ end="\z1" keepend
\ contains=pythonEscape,pythonSpaceError,pythonDoctest,@Spell
1 0.000010 syn region pythonRawString matchgroup=pythonQuotes
\ start=+[uU]\=[rR]\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1"
\ contains=@Spell
1 0.000009 syn region pythonRawString matchgroup=pythonTripleQuotes
\ start=+[uU]\=[rR]\z('''\|"""\)+ end="\z1" keepend
\ contains=pythonSpaceError,pythonDoctest,@Spell
1 0.000004 syn match pythonEscape +\\[abfnrtv'"\\]+ contained
1 0.000004 syn match pythonEscape "\\\o\{1,3}" contained
1 0.000004 syn match pythonEscape "\\x\x\{2}" contained
1 0.000007 syn match pythonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained
" Python allows case-insensitive Unicode IDs: http://www.unicode.org/charts/
1 0.000007 syn match pythonEscape "\\N{\a\+\%(\s\a\+\)*}" contained
1 0.000003 syn match pythonEscape "\\$"
" It is very important to understand all details before changing the
" regular expressions below or their order.
" The word boundaries are *not* the floating-point number boundaries
" because of a possible leading or trailing decimal point.
" The expressions below ensure that all valid number literals are
" highlighted, and invalid number literals are not. For example,
"
" - a decimal point in '4.' at the end of a line is highlighted,
" - a second dot in 1.0.0 is not highlighted,
" - 08 is not highlighted,
" - 08e0 or 08j are highlighted,
"
" and so on, as specified in the 'Python Language Reference'.
" https://docs.python.org/2/reference/lexical_analysis.html#numeric-literals
" https://docs.python.org/3/reference/lexical_analysis.html#numeric-literals
1 0.000005 if !exists("python_no_number_highlight")
" numbers (including longs and complex)
1 0.000005 syn match pythonNumber "\<0[oO]\=\o\+[Ll]\=\>"
1 0.000004 syn match pythonNumber "\<0[xX]\x\+[Ll]\=\>"
1 0.000004 syn match pythonNumber "\<0[bB][01]\+[Ll]\=\>"
1 0.000004 syn match pythonNumber "\<\%([1-9]\d*\|0\)[Ll]\=\>"
1 0.000004 syn match pythonNumber "\<\d\+[jJ]\>"
1 0.000005 syn match pythonNumber "\<\d\+[eE][+-]\=\d\+[jJ]\=\>"
1 0.000006 syn match pythonNumber
\ "\<\d\+\.\%([eE][+-]\=\d\+\)\=[jJ]\=\%(\W\|$\)\@="
1 0.000008 syn match pythonNumber
\ "\%(^\|\W\)\zs\d*\.\d\+\%([eE][+-]\=\d\+\)\=[jJ]\=\>"
1 0.000001 endif
" Group the built-ins in the order in the 'Python Library Reference' for
" easier comparison.
" https://docs.python.org/2/library/constants.html
" https://docs.python.org/3/library/constants.html
" http://docs.python.org/2/library/functions.html
" http://docs.python.org/3/library/functions.html
" http://docs.python.org/2/library/functions.html#non-essential-built-in-functions
" http://docs.python.org/3/library/functions.html#non-essential-built-in-functions
" Python built-in functions are in alphabetical order.
1 0.000003 if !exists("python_no_builtin_highlight")
" built-in constants
" 'False', 'True', and 'None' are also reserved words in Python 3
1 0.000006 syn keyword pythonBuiltin False True None
1 0.000006 syn keyword pythonBuiltin NotImplemented Ellipsis __debug__
" built-in functions
1 0.000008 syn keyword pythonBuiltin abs all any bin bool bytearray callable chr
1 0.000004 syn keyword pythonBuiltin classmethod compile complex delattr dict dir
1 0.000003 syn keyword pythonBuiltin divmod enumerate eval filter float format
1 0.000002 syn keyword pythonBuiltin frozenset getattr globals hasattr hash
1 0.000003 syn keyword pythonBuiltin help hex id input int isinstance
1 0.000002 syn keyword pythonBuiltin issubclass iter len list locals map max
1 0.000003 syn keyword pythonBuiltin memoryview min next object oct open ord pow
1 0.000003 syn keyword pythonBuiltin print property range repr reversed round set
1 0.000002 syn keyword pythonBuiltin setattr slice sorted staticmethod str
1 0.000003 syn keyword pythonBuiltin sum super tuple type vars zip __import__
" Python 2 only
1 0.000002 syn keyword pythonBuiltin basestring cmp execfile file
1 0.000002 syn keyword pythonBuiltin long raw_input reduce reload unichr
1 0.000002 syn keyword pythonBuiltin unicode xrange
" Python 3 only
1 0.000002 syn keyword pythonBuiltin ascii bytes exec
" non-essential built-in functions; Python 2 only
1 0.000002 syn keyword pythonBuiltin apply buffer coerce intern
" avoid highlighting attributes as builtins
1 0.000008 syn match pythonAttribute /\.\h\w*/hs=s+1
\ contains=ALLBUT,pythonBuiltin,pythonFunction,pythonAsync
\ transparent
1 0.000001 endif
" From the 'Python Library Reference' class hierarchy at the bottom.
" http://docs.python.org/2/library/exceptions.html
" http://docs.python.org/3/library/exceptions.html
1 0.000003 if !exists("python_no_exception_highlight")
" builtin base exceptions (used mostly as base classes for other exceptions)
1 0.000002 syn keyword pythonExceptions BaseException Exception
1 0.000002 syn keyword pythonExceptions ArithmeticError BufferError
1 0.000002 syn keyword pythonExceptions LookupError
" builtin base exceptions removed in Python 3
1 0.000002 syn keyword pythonExceptions EnvironmentError StandardError
" builtin exceptions (actually raised)
1 0.000001 syn keyword pythonExceptions AssertionError AttributeError
1 0.000003 syn keyword pythonExceptions EOFError FloatingPointError GeneratorExit
1 0.000002 syn keyword pythonExceptions ImportError IndentationError
1 0.000002 syn keyword pythonExceptions IndexError KeyError KeyboardInterrupt
1 0.000002 syn keyword pythonExceptions MemoryError NameError NotImplementedError
1 0.000002 syn keyword pythonExceptions OSError OverflowError ReferenceError
1 0.000002 syn keyword pythonExceptions RuntimeError StopIteration SyntaxError
1 0.000003 syn keyword pythonExceptions SystemError SystemExit TabError TypeError
1 0.000002 syn keyword pythonExceptions UnboundLocalError UnicodeError
1 0.000002 syn keyword pythonExceptions UnicodeDecodeError UnicodeEncodeError
1 0.000001 syn keyword pythonExceptions UnicodeTranslateError ValueError
1 0.000001 syn keyword pythonExceptions ZeroDivisionError
" builtin OS exceptions in Python 3
1 0.000001 syn keyword pythonExceptions BlockingIOError BrokenPipeError
1 0.000003 syn keyword pythonExceptions ChildProcessError ConnectionAbortedError
1 0.000002 syn keyword pythonExceptions ConnectionError ConnectionRefusedError
1 0.000005 syn keyword pythonExceptions ConnectionResetError FileExistsError
1 0.000016 syn keyword pythonExceptions FileNotFoundError InterruptedError
1 0.000009 syn keyword pythonExceptions IsADirectoryError NotADirectoryError
1 0.000008 syn keyword pythonExceptions PermissionError ProcessLookupError
1 0.000008 syn keyword pythonExceptions RecursionError StopAsyncIteration
1 0.000005 syn keyword pythonExceptions TimeoutError
" builtin exceptions deprecated/removed in Python 3
1 0.000011 syn keyword pythonExceptions IOError VMSError WindowsError
" builtin warnings
1 0.000015 syn keyword pythonExceptions BytesWarning DeprecationWarning FutureWarning
1 0.000013 syn keyword pythonExceptions ImportWarning PendingDeprecationWarning
1 0.000016 syn keyword pythonExceptions RuntimeWarning SyntaxWarning UnicodeWarning
1 0.000014 syn keyword pythonExceptions UserWarning Warning
" builtin warnings in Python 3
1 0.000005 syn keyword pythonExceptions ResourceWarning
1 0.000001 endif
1 0.000009 if exists("python_space_error_highlight")
" trailing whitespace
syn match pythonSpaceError display excludenl "\s\+$"
" mixed tabs and spaces
syn match pythonSpaceError display " \+\t"
syn match pythonSpaceError display "\t\+ "
1 0.000002 endif
" Do not spell doctests inside strings.
" Notice that the end of a string, either ''', or """, will end the contained
" doctest too. Thus, we do *not* need to have it as an end pattern.
1 0.000006 if !exists("python_no_doctest_highlight")
1 0.000007 if !exists("python_no_doctest_code_highlight")
1 0.000018 syn region pythonDoctest
\ start="^\s*>>>\s" end="^\s*$"
\ contained contains=ALLBUT,pythonDoctest,pythonFunction,@Spell
1 0.000016 syn region pythonDoctestValue
\ start=+^\s*\%(>>>\s\|\.\.\.\s\|"""\|'''\)\@!\S\++ end="$"
\ contained
else
syn region pythonDoctest
\ start="^\s*>>>" end="^\s*$"
\ contained contains=@NoSpell
1 0.000002 endif
1 0.000001 endif
" Sync at the beginning of class, function, or method definition.
1 0.000010 syn sync match pythonSync grouphere NONE "^\%(def\|class\)\s\+\h\w*\s*[(:]"
" The default highlight links. Can be overridden later.
1 0.000028 hi def link pythonStatement Statement
1 0.000006 hi def link pythonConditional Conditional
1 0.000004 hi def link pythonRepeat Repeat
1 0.000003 hi def link pythonOperator Operator
1 0.000004 hi def link pythonException Exception
1 0.000003 hi def link pythonInclude Include
1 0.000004 hi def link pythonAsync Statement
1 0.000003 hi def link pythonDecorator Define
1 0.000004 hi def link pythonDecoratorName Function
1 0.000003 hi def link pythonFunction Function
1 0.000005 hi def link pythonComment Comment
1 0.000003 hi def link pythonTodo Todo
1 0.000001 hi def link pythonString String
1 0.000002 hi def link pythonRawString String
1 0.000001 hi def link pythonQuotes String
1 0.000002 hi def link pythonTripleQuotes pythonQuotes
1 0.000002 hi def link pythonEscape Special
1 0.000005 if !exists("python_no_number_highlight")
1 0.000002 hi def link pythonNumber Number
1 0.000001 endif
1 0.000003 if !exists("python_no_builtin_highlight")
1 0.000002 hi def link pythonBuiltin Function
1 0.000001 endif
1 0.000002 if !exists("python_no_exception_highlight")
1 0.000002 hi def link pythonExceptions Structure
1 0.000001 endif
1 0.000003 if exists("python_space_error_highlight")
hi def link pythonSpaceError Error
1 0.000001 endif
1 0.000002 if !exists("python_no_doctest_highlight")
1 0.000001 hi def link pythonDoctest Special
1 0.000001 hi def link pythonDoctestValue Define
1 0.000001 endif
1 0.000003 let b:current_syntax = "python"
1 0.000012 let &cpo = s:cpo_save
1 0.000003 unlet s:cpo_save
" vim:set sw=2 sts=2 ts=8 noet:
SCRIPT /home/bstaletic/.vim/pack/bundle/start/vimspector/autoload/vimspector.vim
Sourced 1 time
Total time: 0.002961
Self time: 0.002961
count total (s) self (s)
" vimspector - A multi-language debugging system for Vim
" Copyright 2018 Ben Jackson
"
" Licensed under the Apache License, Version 2.0 (the "License");
" you may not use this file except in compliance with the License.
" You may obtain a copy of the License at
"
" http://www.apache.org/licenses/LICENSE-2.0
"
" Unless required by applicable law or agreed to in writing, software
" distributed under the License is distributed on an "AS IS" BASIS,
" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
" See the License for the specific language governing permissions and
" limitations under the License.
" Boilerplate {{{
1 0.000020 let s:save_cpo = &cpoptions
1 0.000027 set cpoptions&vim
" }}}
1 0.000015 function! s:Debug( ... ) abort
py3 <<EOF
if _vimspector_session is not None:
_vimspector_session._logger.debug( *vim.eval( 'a:000' ) )
EOF
endfunction
1 0.000013 let s:enabled = v:null
1 0.000008 function! s:Initialised() abort
return s:enabled != v:null
endfunction
1 0.000007 function! s:Enabled() abort
if !s:Initialised()
let s:enabled = vimspector#internal#state#Reset()
endif
return s:enabled
endfunction
1 0.000008 function! vimspector#Launch() abort
if !s:Enabled()
return
endif
py3 _vimspector_session.Start()
endfunction
1 0.000009 function! vimspector#LaunchWithSettings( settings ) abort
if !s:Enabled()
return
endif
py3 _vimspector_session.Start( launch_variables = vim.eval( 'a:settings' ) )
endfunction
1 0.000007 function! vimspector#Reset( ... ) abort
if !s:Enabled()
return
endif
if a:0 == 0
let options = {}
else
let options = a:1
endif
py3 _vimspector_session.Reset( **vim.eval( 'options' ) )
endfunction
1 0.000006 function! vimspector#Restart() abort
if !s:Enabled()
return
endif
py3 _vimspector_session.Restart()
endfunction
1 0.000006 function! vimspector#ClearBreakpoints() abort
if !s:Enabled()
return
endif
py3 _vimspector_session.ClearBreakpoints()
endfunction
1 0.000006 function! vimspector#ToggleBreakpoint( ... ) abort
if !s:Enabled()
return
endif
if a:0 == 0
let options = {}
else
let options = a:1
endif
py3 _vimspector_session.ToggleBreakpoint( vim.eval( 'options' ) )
endfunction
1 0.000010 function! vimspector#SetLineBreakpoint( file_name, line_num, ... ) abort
if !s:Enabled()
return
endif
if a:0 == 0
let options = {}
else
let options = a:1
endif
py3 _vimspector_session.SetLineBreakpoint(
\ vim.eval( 'a:file_name' ),
\ int( vim.eval( 'a:line_num' ) ),
\ vim.eval( 'options' ) )
endfunction
1 0.000009 function! vimspector#ClearLineBreakpoint( file_name, line_num ) abort
if !s:Enabled()
return
endif
py3 _vimspector_session.ClearLineBreakpoint(
\ vim.eval( 'a:file_name' ),
\ int( vim.eval( 'a:line_num' ) ) )
endfunction
1 0.000007 function! vimspector#RunToCursor() abort
if !s:Enabled()
return
endif
py3 _vimspector_session.RunTo(
\ vim.eval( "expand( '%' )" ),
\ int( vim.eval( "line( '.' )" ) ) )
endfunction
1 0.000008 function! vimspector#AddFunctionBreakpoint( function, ... ) abort
if !s:Enabled()
return
endif
if a:0 == 0
let options = {}
else
let options = a:1
endif
py3 _vimspector_session.AddFunctionBreakpoint( vim.eval( 'a:function' ),
\ vim.eval( 'options' ) )
endfunction
1 0.000006 function! vimspector#StepOver() abort
if !s:Enabled()
return
endif
py3 _vimspector_session.StepOver()
endfunction
1 0.000005 function! vimspector#StepInto() abort
if !s:Enabled()
return
endif
py3 _vimspector_session.StepInto()
endfunction
1 0.000005 function! vimspector#StepOut() abort
if !s:Enabled()
return
endif
py3 _vimspector_session.StepOut()
endfunction
1 0.000006 function! vimspector#Continue() abort
if !s:Enabled()
return
endif
py3 _vimspector_session.Continue()
endfunction
1 0.000005 function! vimspector#Pause() abort
if !s:Enabled()
return
endif
py3 _vimspector_session.Pause()
endfunction
1 0.000006 function! vimspector#PauseContinueThread() abort
if !s:Enabled()
return
endif
py3 _vimspector_session.PauseContinueThread()
endfunction
1 0.000017 function! vimspector#SetCurrentThread() abort
if !s:Enabled()
return
endif
py3 _vimspector_session.SetCurrentThread()
endfunction
1 0.000010 function! vimspector#Stop( ... ) abort
if !s:Enabled()
return
endif
if a:0 == 0
let options = {}
else
let options = a:1
endif
py3 _vimspector_session.Stop( **vim.eval( 'options' ) )
endfunction
1 0.000008 function! vimspector#ExpandVariable() abort
if !s:Enabled()
return
endif
py3 _vimspector_session.ExpandVariable()
endfunction
1 0.000007 function! vimspector#SetVariableValue( ... ) abort
if !s:Enabled()
return
endif
if a:0 == 0
py3 _vimspector_session.SetVariableValue()
else
py3 _vimspector_session.SetVariableValue( new_value = vim.eval( 'a:1' ) )
endif
endfunction
1 0.000007 function! vimspector#DeleteWatch() abort
if !s:Enabled()
return
endif
py3 _vimspector_session.DeleteWatch()
endfunction
1 0.000006 function! vimspector#GoToFrame() abort
if !s:Enabled()
return
endif
py3 _vimspector_session.ExpandFrameOrThread()
endfunction
1 0.000006 function! vimspector#AddWatch( ... ) abort
if !s:Enabled()
return
endif
if a:0 == 0
let expr = input( 'Enter watch expression: ',
\ '',
\ 'custom,vimspector#CompleteExpr' )
else
let expr = a:1
endif
if expr ==# ''
return
endif
py3 _vimspector_session.AddWatch( vim.eval( 'expr' ) )
endfunction
1 0.000009 function! vimspector#AddWatchPrompt( expr ) abort
if !s:Enabled()
return
endif
stopinsert
setlocal nomodified
call vimspector#AddWatch( a:expr )
endfunction
1 0.000009 function! vimspector#Evaluate( expr ) abort
if !s:Enabled()
return
endif
py3 _vimspector_session.ShowOutput( 'Console' )
py3 _vimspector_session.EvaluateConsole( vim.eval( 'a:expr' ), True )
endfunction
1 0.000008 function! vimspector#EvaluateConsole( expr ) abort
if !s:Enabled()
return
endif
stopinsert
setlocal nomodified
py3 _vimspector_session.EvaluateConsole( vim.eval( 'a:expr' ), False )
endfunction
1 0.000007 function! vimspector#ShowOutput( ... ) abort
if !s:Enabled()
return
endif
if a:0 == 1
py3 _vimspector_session.ShowOutput( vim.eval( 'a:1' ) )
else
py3 _vimspector_session.ShowOutput( 'Console' )
endif
endfunction
1 0.000009 function! vimspector#ShowOutputInWindow( win_id, category ) abort
if !s:Enabled()
return
endif
py3 __import__( 'vimspector',
\ fromlist = [ 'output' ] ).output.ShowOutputInWindow(
\ int( vim.eval( 'a:win_id' ) ),
\ vim.eval( 'a:category' ) )
endfunction
1 0.000007 function! vimspector#ToggleLog() abort
if !s:Enabled()
return
endif
py3 _vimspector_session.ToggleLog()
endfunction
1 0.000007 function! vimspector#ListBreakpoints() abort
if !s:Enabled()
return
endif
py3 _vimspector_session.ListBreakpoints()
endfunction
1 0.000007 function! vimspector#GetConfigurations() abort
if !s:Enabled()
return
endif
let configurations = py3eval(
\ 'list( _vimspector_session.GetConfigurations( {} )[ 1 ].keys() )'
\ . ' if _vimspector_session else []' )
return configurations
endfunction
1 0.000010 function! vimspector#CompleteOutput( ArgLead, CmdLine, CursorPos ) abort
if !s:Enabled()
return
endif
let buffers = py3eval( '_vimspector_session.GetOutputBuffers() '
\ . ' if _vimspector_session else []' )
return join( buffers, "\n" )
endfunction
1 0.000010 function! vimspector#CompleteExpr( ArgLead, CmdLine, CursorPos ) abort
if !s:Enabled()
return
endif
let col = len( a:ArgLead )
let prev_non_keyword_char = match( a:ArgLead[ 0 : col - 1 ], '\k*$' ) + 1
return join( py3eval( '_vimspector_session.GetCommandLineCompletions( '
\ . 'vim.eval( "a:ArgLead" ), '
\ . 'int( vim.eval( "prev_non_keyword_char" ) ) )' ),
\ "\n" )
endfunction
1 0.000015 let s:latest_completion_request = {}
1 0.000011 function! vimspector#CompleteFuncSync( prompt, find_start, query ) abort
if py3eval( 'not _vimspector_session' )
if a:find_start
return -3
endif
return v:none
endif
if a:find_start
" We're busy
if !empty( s:latest_completion_request )
return -3
endif
let line = getline( line( '.' ) )[ len( a:prompt ) : ]
let col = col( '.' ) - len( a:prompt )
" It seems that most servers don't implement the 'start' parameter, which is
" clearly necessary, as they all seem to assume a specific behaviour, which
" is undocumented.
let s:latest_completion_request.items =
\ py3eval( '_vimspector_session.GetCompletionsSync( '
\.' vim.eval( "line" ), '
\.' int( vim.eval( "col" ) ) )' )
let s:latest_completion_request.line = line
let s:latest_completion_request.col = col
let prev_non_keyword_char = match( line[ 0 : col - 1 ], '\k*$' ) + 1
let query_len = col - prev_non_keyword_char
let start_pos = col
for item in s:latest_completion_request.items
if !has_key( item, 'start' ) || !has_key( item, 'length' )
" The specification states that if start is not supplied, isertion
" should be at the requested column. But about 0 of the servers actually
" implement that
" (https://github.com/microsoft/debug-adapter-protocol/issues/138)
let item.start = prev_non_keyword_char
let item.length = query_len
else
" For some reason, the returned start value is 0-indexed even though we
" use columnsStartAt1
let item.start += 1
endif
if !has_key( item, 'text' )
let item.text = item.label
endif
if item.start < start_pos
let start_pos = item.start
endif
endfor
let s:latest_completion_request.start_pos = start_pos
let s:latest_completion_request.prompt = a:prompt
" call s:Debug( 'FindStart: %s', {
" \ 'line': line,
" \ 'col': col,
" \ 'prompt': len( a:prompt ),
" \ 'start_pos': start_pos,
" \ 'returning': ( start_pos + len( a:prompt ) ) - 1,
" \ } )
" start_pos is 1-based and the return of findstart is 0-based
return ( start_pos + len( a:prompt ) ) - 1
else
let items = []
let pfxlen = len( s:latest_completion_request.prompt )
for item in s:latest_completion_request.items
if item.start > s:latest_completion_request.start_pos
" fix up the text (insert anything that is already present in the line
" that would be erased by the fixed-up earlier start position)
"
" both start_pos and item.start are 1-based
let item.text = s:latest_completion_request.line[
\ s:latest_completion_request.start_pos + pfxlen - 1 :
\ item.start + pfxlen - 1 ] . item.text
endif
if item.length > len( a:query )
" call s:Debug( 'Rejecting %s, length is greater than %s',
" \ item,
" \ len( a:query ) )
continue
endif
call add( items, { 'word': item.text,
\ 'abbr': item.label,
\ 'menu': get( item, 'type', '' ),
\ 'icase': 1,
\ } )
endfor
let s:latest_completion_request = {}
" call s:Debug( 'Items: %s', items )
return { 'words': items, 'refresh': 'always' }
endif
endfunction
1 0.000010 function! vimspector#OmniFuncWatch( find_start, query ) abort
return vimspector#CompleteFuncSync( 'Expression: ', a:find_start, a:query )
endfunction
1 0.000009 function! vimspector#OmniFuncConsole( find_start, query ) abort
return vimspector#CompleteFuncSync( '> ', a:find_start, a:query )
endfunction
1 0.000008 function! vimspector#Install( bang, ... ) abort
if !s:Enabled()
return
endif
let prefix = vimspector#internal#state#GetAPIPrefix()
py3 __import__( 'vimspector',
\ fromlist = [ 'installer' ] ).installer.RunInstaller(
\ vim.eval( 'prefix' ),
\ vim.eval( 'a:bang' ) == '!',
\ *vim.eval( 'a:000' ) )
endfunction
1 0.000009 function! vimspector#CompleteInstall( ArgLead, CmdLine, CursorPos ) abort
if !s:Enabled()
return
endif
return py3eval( '"\n".join('
\ . '__import__( "vimspector", fromlist = [ "gadgets" ] )'
\ . '.gadgets.GADGETS.keys() '
\ . ')' )
endfunction
1 0.000013 function! vimspector#Update( bang, ... ) abort
if !s:Enabled()
return
endif
let prefix = vimspector#internal#state#GetAPIPrefix()
py3 __import__( 'vimspector',
\ fromlist = [ 'installer' ] ).installer.RunUpdate(
\ vim.eval( 'prefix' ),
\ vim.eval( 'a:bang' ) == '!',
\ *vim.eval( 'a:000' ) )
endfunction
1 0.000008 function! vimspector#AbortInstall() abort
if !s:Enabled()
return
endif
let prefix = vimspector#internal#state#GetAPIPrefix()
py3 __import__( 'vimspector', fromlist = [ 'installer' ] ).installer.Abort()
endfunction
1 0.000010 function! vimspector#OnBufferCreated( file_name ) abort
if len( a:file_name ) == 0
return
endif
" Don't actually load up vimsepctor python in autocommands that trigger
" regularly. We'll only create the session obkect in s:Enabled()
if !s:Initialised()
return
endif
if !s:Enabled()
return
endif
py3 _vimspector_session.RefreshSigns( vim.eval( 'a:file_name' ) )
endfunction
1 0.000009 function! vimspector#ShowEvalBalloon( is_visual ) abort
if a:is_visual
let expr = py3eval( '__import__( "vimspector", fromlist = [ "utils" ] )'
\ . '.utils.GetVisualSelection('
\ . ' int( vim.eval( "winbufnr( winnr() )" ) ) )' )
let expr = join( expr, '\n' )
else
let expr = expand( '<cexpr>' )
endif
return py3eval( '_vimspector_session.ShowEvalBalloon('
\ . ' int( vim.eval( "winnr()" ) ), "'
\ . expr
\ . '", 0 )' )
endfunction
" Boilerplate {{{
1 0.000028 let &cpoptions=s:save_cpo
1 0.000010 unlet s:save_cpo
" }}}
SCRIPT /home/bstaletic/.vim/pack/bundle/start/vimspector/autoload/vimspector/internal/state.vim
Sourced 1 time
Total time: 0.000356
Self time: 0.000356
count total (s) self (s)
" vimspector - A multi-language debugging system for Vim
" Copyright 2018 Ben Jackson
"
" Licensed under the Apache License, Version 2.0 (the "License");
" you may not use this file except in compliance with the License.
" You may obtain a copy of the License at
"
" http://www.apache.org/licenses/LICENSE-2.0
"
" Unless required by applicable law or agreed to in writing, software
" distributed under the License is distributed on an "AS IS" BASIS,
" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
" See the License for the specific language governing permissions and
" limitations under the License.
" Boilerplate {{{
1 0.000016 let s:save_cpo = &cpoptions
1 0.000020 set cpoptions&vim
" }}}
1 0.000008 let s:prefix = ''
1 0.000029 if has( 'nvim' )
let s:prefix='neo'
1 0.000004 endif
1 0.000010 function! vimspector#internal#state#Reset() abort
try
py3 import vim
py3 _vimspector_session = __import__(
\ "vimspector",
\ fromlist=[ "debug_session" ] ).debug_session.DebugSession(
\ vim.eval( 's:prefix' ) )
catch /.*/
echohl WarningMsg
echom 'Exception while loading vimspector:' v:exception
echom 'From:' v:throwpoint
echom 'Vimspector unavailable: Requires Vim compiled with Python 3.6'
echohl None
return v:false
endtry
return v:true
endfunction
1 0.000009 function! vimspector#internal#state#GetAPIPrefix() abort
return s:prefix
endfunction
" Boilerplate {{{
1 0.000022 let &cpoptions=s:save_cpo
1 0.000008 unlet s:save_cpo
" }}}
SCRIPT /home/bstaletic/.vim/pack/bundle/start/vimspector/autoload/vimspector/internal/job.vim
Sourced 1 time
Total time: 0.000449
Self time: 0.000449
count total (s) self (s)
" vimspector - A multi-language debugging system for Vim
" Copyright 2018 Ben Jackson
"
" Licensed under the Apache License, Version 2.0 (the "License");
" you may not use this file except in compliance with the License.
" You may obtain a copy of the License at
"
" http://www.apache.org/licenses/LICENSE-2.0
"
" Unless required by applicable law or agreed to in writing, software
" distributed under the License is distributed on an "AS IS" BASIS,
" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
" See the License for the specific language governing permissions and
" limitations under the License.
" Boilerplate {{{
1 0.000008 let s:save_cpo = &cpoptions
1 0.000009 set cpoptions&vim
" }}}
1 0.000007 function! s:_OnServerData( channel, data ) abort
if !exists( 's:job' ) || ch_getjob( a:channel ) isnot s:job
call ch_log( 'Get data after process exit' )
return
endif
py3 _vimspector_session.OnChannelData( vim.eval( 'a:data' ) )
endfunction
1 0.000004 function! s:_OnServerError( channel, data ) abort
if !exists( 's:job' ) || ch_getjob( a:channel ) isnot s:job
call ch_log( 'Get data after process exit' )
return
endif
py3 _vimspector_session.OnServerStderr( vim.eval( 'a:data' ) )
endfunction
" FIXME: We should wait until both the exit_cb _and_ the channel closed callback
" have been received before OnServerExit?
1 0.000004 function! s:_OnExit( channel, status ) abort
if !exists( 's:job' ) || ch_getjob( a:channel ) isnot s:job
call ch_log( 'Unexpected exit callback' )
return
endif
echom 'Channel exit with status ' . a:status
redraw
if exists( 's:job' )
unlet s:job
endif
py3 _vimspector_session.OnServerExit( vim.eval( 'a:status' ) )
endfunction
1 0.000003 function! s:_OnClose( channel ) abort
if !exists( 's:job' ) || job_getchannel( s:job ) != a:channel
call ch_log( 'Channel closed after exit' )
return
endif
echom 'Channel closed'
redraw
endfunction
1 0.000003 function! vimspector#internal#job#StartDebugSession( config ) abort
if exists( 's:job' )
echom 'Not starting: Job is already running'
redraw
return v:false
endif
let s:job = job_start( a:config[ 'command' ],
\ {
\ 'in_mode': 'raw',
\ 'out_mode': 'raw',
\ 'err_mode': 'raw',
\ 'exit_cb': funcref( 's:_OnExit' ),
\ 'close_cb': funcref( 's:_OnClose' ),
\ 'out_cb': funcref( 's:_OnServerData' ),
\ 'err_cb': funcref( 's:_OnServerError' ),
\ 'stoponexit': 'term',
\ 'env': a:config[ 'env' ],
\ 'cwd': a:config[ 'cwd' ],
\ }
\ )
if !exists( 's:job' )
" The job died immediately after starting and we cleaned up
return v:false
endif
let status = job_status( s:job )
echom 'Started job, status is: ' . status
redraw
if status !=# 'run'
return v:false
endif
return v:true
endfunction
1 0.000003 function! vimspector#internal#job#Send( msg ) abort
if ! exists( 's:job' )
echom "Can't send message: Job was not initialised correctly"
redraw
return 0
endif
if job_status( s:job ) !=# 'run'
echom "Can't send message: Job is not running"
redraw
return 0
endif
let ch = job_getchannel( s:job )
if ch ==# 'channel fail'
echom 'Channel was closed unexpectedly!'
redraw
return 0
endif
call ch_sendraw( ch, a:msg )
return 1
endfunction
1 0.000002 function! vimspector#internal#job#StopDebugSession() abort
if !exists( 's:job' )
echom "Not stopping session: Job doesn't exist"
redraw
return
endif
if job_status( s:job ) ==# 'run'
echom 'Terminating job'
redraw
call job_stop( s:job, 'kill' )
endif
endfunction
1 0.000003 function! vimspector#internal#job#Reset() abort
call vimspector#internal#job#StopDebugSession()
endfunction
1 0.000005 function! s:_OnCommandExit( category, ch, code ) abort
py3 __import__( "vimspector",
\ fromlist = [ "utils" ] ).utils.OnCommandWithLogComplete(
\ vim.eval( 'a:category' ),
\ int( vim.eval( 'a:code' ) ) )
endfunction
1 0.000004 function! vimspector#internal#job#StartCommandWithLog( cmd, category ) abort
if ! exists( 's:commands' )
let s:commands = {}
endif
if ! has_key( s:commands, a:category )
let s:commands[ a:category ] = []
endif
let l:index = len( s:commands[ a:category ] )
let buf = '_vimspector_log_' . a:category
call add( s:commands[ a:category ], job_start(
\ a:cmd,
\ {
\ 'out_io': 'buffer',
\ 'err_io': 'buffer',
\ 'out_msg': 0,
\ 'err_msg': 0,
\ 'out_name': buf,
\ 'err_name': buf,
\ 'exit_cb': funcref( 's:_OnCommandExit', [ a:category ] ),
\ 'out_modifiable': 0,
\ 'err_modifiable': 0,
\ 'stoponexit': 'kill'
\ } ) )
if job_status( s:commands[ a:category ][ index ] ) !=# 'run'
echom 'Unable to start job for ' . string( a:cmd )
redraw
return v:none
endif
return bufnr( buf )
endfunction
1 0.000004 function! vimspector#internal#job#CleanUpCommand( category ) abort
if ! exists( 's:commands' )
let s:commands = {}
endif
if ! has_key( s:commands, a:category )
return
endif
for j in s:commands[ a:category ]
call job_stop( j, 'kill' )
endfor
unlet s:commands[ a:category ]
endfunction
" Boilerplate {{{
1 0.000009 let &cpoptions=s:save_cpo
1 0.000003 unlet s:save_cpo
" }}}
SCRIPT /home/bstaletic/.vim/pack/bundle/start/vimspector/autoload/vimspector/internal/popup.vim
Sourced 1 time
Total time: 0.000207
Self time: 0.000207
count total (s) self (s)
" vimspector - A multi-language debugging system for Vim
" Copyright 2018 Ben Jackson
"
" Licensed under the Apache License, Version 2.0 (the "License");
" you may not use this file except in compliance with the License.
" You may obtain a copy of the License at
"
" http://www.apache.org/licenses/LICENSE-2.0
"
" Unless required by applicable law or agreed to in writing, software
" distributed under the License is distributed on an "AS IS" BASIS,
" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
" See the License for the specific language governing permissions and
" limitations under the License.
" Boilerplate {{{
1 0.000007 let s:save_cpo = &cpoptions
1 0.000011 set cpoptions&vim
" }}}
1 0.000006 function! vimspector#internal#popup#DisplaySplash( message ) abort
return popup_dialog( a:message, {} )
endfunction
1 0.000005 function! vimspector#internal#popup#UpdateSplash( id, message ) abort
call popup_settext( a:id, a:message )
return a:id
endfunction
1 0.000003 function! vimspector#internal#popup#HideSplash( id ) abort
call popup_hide( a:id )
endfunction
" Boilerplate {{{
1 0.000009 let &cpoptions=s:save_cpo
1 0.000003 unlet s:save_cpo
" }}}
SCRIPT /home/bstaletic/.vim/pack/bundle/start/vimspector/autoload/vimspector/internal/term.vim
Sourced 1 time
Total time: 0.000133
Self time: 0.000133
count total (s) self (s)
" vimspector - A multi-language debugging system for Vim
" Copyright 2018 Ben Jackson
"
" Licensed under the Apache License, Version 2.0 (the "License");
" you may not use this file except in compliance with the License.
" You may obtain a copy of the License at
"
" http://www.apache.org/licenses/LICENSE-2.0
"
" Unless required by applicable law or agreed to in writing, software
" distributed under the License is distributed on an "AS IS" BASIS,
" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
" See the License for the specific language governing permissions and
" limitations under the License.
" Boilerplate {{{
1 0.000008 let s:save_cpo = &cpoptions
1 0.000012 set cpoptions&vim
" }}}
1 0.000005 function! vimspector#internal#term#Start( cmd, opts ) abort
rightbelow return term_start( a:cmd, a:opts )
endfunction
1 0.000003 function! vimspector#internal#term#IsFinished( bufno ) abort
return index( split( term_getstatus( a:bufno ), ',' ), 'finished' ) >= 0
endfunction
1 0.000002 function! vimspector#internal#term#GetPID( bufno ) abort
return job_info( term_getjob( a:bufno ) ).process
endfunction
" Boilerplate {{{
1 0.000008 let &cpoptions=s:save_cpo
1 0.000003 unlet s:save_cpo
" }}}
FUNCTION traces#cmdl_leave()
Defined: ~/.vim/pack/bundle/start/traces/autoload/traces.vim:762
Called 4 times
Total time: 0.001123
Self time: 0.000957
count total (s) self (s)
4 0.000099 let s:nr = bufnr('%')
4 0.000093 if !exists('s:buf[s:nr]')
2 0.000012 return
2 0.000005 endif
2 0.000266 0.000100 call s:restore_undo_history()
" highlights
2 0.000026 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
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(alt_win)
noautocmd call win_gotoid(cur_win)
endif
if exists('scrolloff')
noautocmd let &scrolloff = scrolloff
endif
2 0.000004 endif
2 0.000021 if &hlsearch !=# s:buf[s:nr].hlsearch
noautocmd let &hlsearch = s:buf[s:nr].hlsearch
2 0.000003 endif
2 0.000016 if &cmdheight !=# s:buf[s:nr].cmdheight
noautocmd let &cmdheight = s:buf[s:nr].cmdheight
2 0.000004 endif
2 0.000033 if winsaveview() !=# s:buf[s:nr].view
call winrestview(s:buf[s:nr].view)
2 0.000004 endif
2 0.000030 unlet s:buf[s:nr]
FUNCTION <SNR>63_StopPoller()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:566
Called 20 times
Total time: 0.000300
Self time: 0.000300
count total (s) self (s)
20 0.000156 call timer_stop( a:poller.id )
20 0.000114 let a:poller.id = -1
FUNCTION gitgutter#process_buffer()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter.vim:27
Called 24 times
Total time: 24.204848
Self time: 0.002111
count total (s) self (s)
" NOTE a:bufnr is not necessarily the current buffer.
24 0.004233 0.000424 if gitgutter#utility#is_active(a:bufnr)
6 0.000334 0.000095 if a:force || s:has_fresh_changes(a:bufnr)
1 0.000003 let diff = ''
1 0.000002 try
1 24.198717 0.000028 let diff = gitgutter#diff#run_diff(a:bufnr, 0)
1 0.000061 catch /gitgutter not tracked/
call gitgutter#debug#log('Not tracked: '.gitgutter#utility#file(a:bufnr))
1 0.000014 catch /gitgutter diff failed/
call gitgutter#debug#log('Diff failed: '.gitgutter#utility#file(a:bufnr))
call gitgutter#hunk#reset(a:bufnr)
endtry
if diff != 'async'
call gitgutter#diff#handler(a:bufnr, diff)
endif
5 0.000005 endif
23 0.000037 endif
FUNCTION <SNR>56_on_stdout_vim()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/async.vim:74
Called 1 time
Total time: 0.000023
Self time: 0.000023
count total (s) self (s)
1 0.000020 call add(self.stdoutbuffer, a:data)
FUNCTION neomake#GetCurrentErrorMsg()
Defined: ~/.vim/pack/bundle/start/neomake/autoload/neomake.vim:2632
Called 3 times
Total time: 0.000656
Self time: 0.000656
count total (s) self (s)
3 0.000056 let buf = bufnr('%')
3 0.000033 let ln = line('.')
3 0.000021 let ln_errors = []
9 0.000065 for maker_type in ['file', 'project']
6 0.000220 let buf_errors = get(s:current_errors[maker_type], buf, {})
6 0.000092 let ln_errors += get(buf_errors, ln, [])
9 0.000038 endfor
3 0.000024 if empty(ln_errors)
3 0.000015 return ''
endif
if len(ln_errors) > 1
let ln_errors = copy(ln_errors)
call sort(ln_errors, function('neomake#utils#sort_by_col'))
endif
let entry = ln_errors[0]
let r = entry.maker_name . ': ' . entry.text
let suffix = entry.type . (entry.nr != -1 ? entry.nr : '')
if !empty(suffix)
let r .= ' ('.suffix.')'
endif
return r
FUNCTION <SNR>41_t_start()
Defined: ~/.vim/pack/bundle/start/traces/plugin/traces.vim:38
Called 4 times
Total time: 0.000569
Self time: 0.000569
count total (s) self (s)
4 0.000188 if exists('##CmdlineChanged')
4 0.000199 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})
4 0.000021 endif
FUNCTION vimspector#internal#popup#DisplaySplash()
Defined: ~/.vim/pack/bundle/start/vimspector/autoload/vimspector/internal/popup.vim:22
Called 1 time
Total time: 0.000087
Self time: 0.000087
count total (s) self (s)
1 0.000086 return popup_dialog( a:message, {} )
FUNCTION gitgutter#utility#set_repo_path()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/utility.vim:110
Called 1 time
Total time: 0.001723
Self time: 0.000248
count total (s) self (s)
" Values of path:
" * non-empty string - path
" * -1 - pending
" * -2 - not tracked by git
1 0.000030 0.000009 call gitgutter#utility#setbufvar(a:bufnr, 'path', -1)
1 0.000216 0.000021 let cmd = gitgutter#utility#cd_cmd(a:bufnr, g:gitgutter_git_executable.' ls-files --error-unmatch --full-name '.gitgutter#utility#shellescape(s:filename(a:bufnr)))
1 0.000013 0.000010 if g:gitgutter_async && gitgutter#async#available()
1 0.000003 if has('lambda')
1 0.001374 0.000118 call gitgutter#async#execute(cmd, a:bufnr, { 'out': {bufnr, path -> gitgutter#utility#setbufvar(bufnr, 'path', s:strip_trailing_new_line(path))}, 'err': {bufnr -> gitgutter#utility#setbufvar(bufnr, 'path', -2)}, })
else
if has('nvim') && !has('nvim-0.2.0')
call gitgutter#async#execute(cmd, a:bufnr, { 'out': function('s:set_path'), 'err': function('s:not_tracked_by_git') })
else
call gitgutter#async#execute(cmd, a:bufnr, { 'out': function('s:set_path'), 'err': function('s:set_path', [-2]) })
endif
1 0.000001 endif
else
let path = gitgutter#utility#system(cmd)
if v:shell_error
call gitgutter#utility#setbufvar(a:bufnr, 'path', -2)
else
call gitgutter#utility#setbufvar(a:bufnr, 'path', s:strip_trailing_new_line(path))
endif
1 0.000001 endif
FUNCTION vimspector#OnBufferCreated()
Defined: ~/.vim/pack/bundle/start/vimspector/autoload/vimspector.vim:509
Called 10 times
Total time: 0.002263
Self time: 0.002146
count total (s) self (s)
10 0.000128 if len( a:file_name ) == 0
8 0.000031 return
2 0.000004 endif
" Don't actually load up vimsepctor python in autocommands that trigger
" regularly. We'll only create the session obkect in s:Enabled()
2 0.000076 0.000056 if !s:Initialised()
return
2 0.000004 endif
2 0.000125 0.000028 if !s:Enabled()
return
2 0.000003 endif
2 0.001838 py3 _vimspector_session.RefreshSigns( vim.eval( 'a:file_name' ) )
FUNCTION <SNR>63_EnableCompletingInCurrentBuffer()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:561
Called 7 times
Total time: 0.000051
Self time: 0.000051
count total (s) self (s)
7 0.000044 let b:ycm_completing = 1
FUNCTION <SNR>35_dir()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/utility.vim:191
Called 12 times
Total time: 0.001743
Self time: 0.000445
count total (s) self (s)
12 0.001721 0.000423 return gitgutter#utility#shellescape(fnamemodify(s:abs_path(a:bufnr, 0), ':h'))
FUNCTION <SNR>35_exists_file()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/utility.vim:200
Called 31 times
Total time: 0.003186
Self time: 0.000973
count total (s) self (s)
31 0.003150 0.000937 return filereadable(s:abs_path(a:bufnr, 0))
FUNCTION <SNR>63_AllowedToCompleteInBuffer()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:475
Called 40 times
Total time: 0.005940
Self time: 0.004578
count total (s) self (s)
40 0.000542 let buftype = getbufvar( a:buffer, '&buftype' )
40 0.000304 if has_key( s:buftype_blacklist, buftype )
11 0.000038 return 0
29 0.000058 endif
29 0.000265 let filetype = getbufvar( a:buffer, '&filetype' )
29 0.000167 if empty( filetype )
12 0.000054 let filetype = 'ycm_nofiletype'
29 0.000049 endif
29 0.000596 let whitelist_allows = type( g:ycm_filetype_whitelist ) != v:t_dict || has_key( g:ycm_filetype_whitelist, '*' ) || s:HasAnyKey( g:ycm_filetype_whitelist, split( filetype, '\.' ) )
29 0.002019 0.001042 let blacklist_allows = type( g:ycm_filetype_blacklist ) != v:t_dict || !s:HasAnyKey( g:ycm_filetype_blacklist, split( filetype, '\.' ) )
29 0.000183 let allowed = whitelist_allows && blacklist_allows
29 0.000811 0.000426 if !allowed || s:DisableOnLargeFile( a:buffer )
12 0.000046 return 0
17 0.000027 endif
17 0.000044 if allowed
17 0.000182 let s:previous_allowed_buffer_number = bufnr( a:buffer )
17 0.000032 endif
17 0.000047 return allowed
FUNCTION gitgutter#async#execute()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/async.vim:14
Called 1 time
Total time: 0.001256
Self time: 0.001208
count total (s) self (s)
1 0.000053 0.000011 call gitgutter#debug#log('[async] '.a:cmd)
1 0.000006 let options = { 'stdoutbuffer': [], 'buffer': a:bufnr, 'handler': a:handler }
1 0.000017 0.000011 let command = s:build_command(a:cmd)
1 0.000004 if has('nvim')
call jobstart(command, extend(options, { 'on_stdout': function('s:on_stdout_nvim'), 'on_stderr': function('s:on_stderr_nvim'), 'on_exit': function('s:on_exit_nvim') }))
1 0.000001 else
1 0.001142 call job_start(command, { 'out_cb': function('s:on_stdout_vim', options), 'err_cb': function('s:on_stderr_vim', options), 'close_cb': function('s:on_exit_vim', options) })
1 0.000009 endif
FUNCTION <SNR>63_ClearSignatureHelp()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:1147
Called 7 times
Total time: 0.001395
Self time: 0.000748
count total (s) self (s)
7 0.000674 0.000109 if !s:ShouldUseSignatureHelp()
return
7 0.000014 endif
7 0.000191 0.000109 call s:StopPoller( s:pollers.signature_help )
7 0.000033 let s:signature_help = s:default_signature_help
7 0.000447 call py3eval( 'ycm_state.ClearSignatureHelp()' )
FUNCTION <SNR>6_LoadFTPlugin()
Defined: /usr/share/vim/vim82/ftplugin.vim:14
Called 3 times
Total time: 0.006774
Self time: 0.006060
count total (s) self (s)
3 0.000050 if exists("b:undo_ftplugin")
exe b:undo_ftplugin
unlet! b:undo_ftplugin b:did_ftplugin
3 0.000006 endif
3 0.000029 let s = expand("<amatch>")
3 0.000012 if s != ""
3 0.000055 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
3 0.000005 endif
" When there is a dot it is used to separate filetype names. Thus for
" "aaa.bbb" load "aaa" and then "bbb".
6 0.000050 for name in split(s, '\.')
3 0.006461 0.005747 exe 'runtime! ftplugin/' . name . '.vim ftplugin/' . name . '_*.vim ftplugin/' . name . '/*.vim'
6 0.000019 endfor
3 0.000006 endif
FUNCTION <SNR>65_cursormoved_delayed_cb()
Defined: ~/.vim/pack/bundle/start/neomake/autoload/neomake.vim:2686
Called 3 times
Total time: 0.001392
Self time: 0.000259
count total (s) self (s)
3 0.000144 if getpos('.') == s:cursormoved_last_pos
3 0.001223 0.000090 call neomake#CursorMoved()
3 0.000009 endif
FUNCTION <SNR>55_has_fresh_changes()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter.vim:84
Called 6 times
Total time: 0.000239
Self time: 0.000108
count total (s) self (s)
6 0.000225 0.000094 return getbufvar(a:bufnr, 'changedtick') != gitgutter#utility#getbufvar(a:bufnr, 'tick')
FUNCTION <SNR>69_evaluate_range()
Defined: ~/.vim/pack/bundle/start/traces/autoload/traces.vim:330
Called 14 times
Total time: 0.004170
Self time: 0.004170
count total (s) self (s)
14 0.000258 let result = { 'range': [], 'pattern': '', 'end': ''}
14 0.000105 let s:range_valid = 1
14 0.000245 let pos = s:buf[s:nr].cur_init_pos[0]
14 0.000146 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.address =~# '^[?/]$'
let s:buf[s:nr].show_range = 1
if empty(result.range)
break
endif
let address.address = '.'
endif
let query = s:spec_to_abs(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 get(specifier, 'delimiter') is# ';'
let pos = result.range[-1]
endif
14 0.000080 endfor
14 0.000127 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
14 0.000032 endif
14 0.000204 return s:range_valid ? result : { 'range': [], 'pattern': '', 'end': '' }
FUNCTION <SNR>63_DisableOnLargeFile()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:451
Called 17 times
Total time: 0.000385
Self time: 0.000385
count total (s) self (s)
17 0.000134 if exists( 'b:ycm_largefile' )
14 0.000053 return b:ycm_largefile
3 0.000005 endif
3 0.000021 let threshold = g:ycm_disable_for_files_larger_than_kb * 1024
3 0.000072 let b:ycm_largefile = threshold > 0 && getfsize( expand( a:buffer ) ) > threshold
3 0.000013 if b:ycm_largefile
py3 vimsupport.PostVimMessage( 'YouCompleteMe is disabled in this buffer;' + ' the file exceeded the max size (see YCM options).' )
3 0.000004 endif
3 0.000011 return b:ycm_largefile
FUNCTION gitgutter#utility#cd_cmd()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/utility.vim:163
Called 1 time
Total time: 0.000143
Self time: 0.000022
count total (s) self (s)
1 0.000064 0.000013 let cd = s:unc_path(a:bufnr) ? 'pushd' : (s:windows() ? 'cd /d' : 'cd')
1 0.000078 0.000008 return cd.' '.s:dir(a:bufnr).' && '.a:cmd
FUNCTION neomake#CursorMovedDelayed()
Defined: ~/.vim/pack/bundle/start/neomake/autoload/neomake.vim:2691
Called 3 times
Total time: 0.000281
Self time: 0.000281
count total (s) self (s)
3 0.000044 if exists('s:cursormoved_timer')
3 0.000033 call timer_stop(s:cursormoved_timer)
3 0.000008 endif
3 0.000115 let s:cursormoved_timer = timer_start(get(g:, 'neomake_cursormoved_delay', 100), function('s:cursormoved_delayed_cb'))
3 0.000061 let s:cursormoved_last_pos = getpos('.')
FUNCTION vimspector#internal#job#StartDebugSession()
Defined: ~/.vim/pack/bundle/start/vimspector/autoload/vimspector/internal/job.vim:68
Called 1 time
Total time: 0.004687
Self time: 0.004687
count total (s) self (s)
1 0.000008 if exists( 's:job' )
echom 'Not starting: Job is already running'
redraw
return v:false
1 0.000001 endif
1 0.001181 let s:job = job_start( a:config[ 'command' ], { 'in_mode': 'raw', 'out_mode': 'raw', 'err_mode': 'raw', 'exit_cb': funcref( 's:_OnExit' ), 'close_cb': funcref( 's:_OnClose' ), 'out_cb': funcref( 's:_OnServerData' ), 'err_cb': funcref( 's:_OnServerError' ), 'stoponexit': 'term', 'env': a:config[ 'env' ], 'cwd': a:config[ 'cwd' ], } )
1 0.000009 if !exists( 's:job' )
" The job died immediately after starting and we cleaned up
return v:false
1 0.000002 endif
1 0.000008 let status = job_status( s:job )
1 0.000121 echom 'Started job, status is: ' . status
1 0.003304 redraw
1 0.000014 if status !=# 'run'
return v:false
1 0.000002 endif
1 0.000003 return v:true
FUNCTION <SNR>35_filename()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/utility.vim:196
Called 1 time
Total time: 0.000042
Self time: 0.000009
count total (s) self (s)
1 0.000042 0.000009 return fnamemodify(s:abs_path(a:bufnr, 0), ':t')
FUNCTION vimspector#Continue()
Defined: ~/.vim/pack/bundle/start/vimspector/autoload/vimspector.vim:165
Called 1 time
Total time: 0.307224
Self time: 0.130749
count total (s) self (s)
1 0.000068 0.000019 if !s:Enabled()
return
1 0.000001 endif
1 0.307148 0.130722 py3 _vimspector_session.Continue()
FUNCTION vimspector#internal#popup#UpdateSplash()
Defined: ~/.vim/pack/bundle/start/vimspector/autoload/vimspector/internal/popup.vim:26
Called 2 times
Total time: 0.000044
Self time: 0.000044
count total (s) self (s)
2 0.000033 call popup_settext( a:id, a:message )
2 0.000007 return a:id
FUNCTION <SNR>63_VisitedBufferRequiresReparse()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:511
Called 22 times
Total time: 0.003942
Self time: 0.000762
count total (s) self (s)
22 0.000224 if bufnr( '%' ) ==# s:previous_allowed_buffer_number
3 0.000011 return 0
19 0.000031 endif
19 0.003563 0.000383 return s:AllowedToCompleteInCurrentBuffer()
FUNCTION <SNR>63_OnCursorMovedNormalMode()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:804
Called 3 times
Total time: 0.001854
Self time: 0.000835
count total (s) self (s)
3 0.001104 0.000085 if !s:AllowedToCompleteInCurrentBuffer()
return
3 0.000006 endif
3 0.000721 py3 ycm_state.OnCursorMoved()
FUNCTION neomake#utils#get_verbosity()
Defined: ~/.vim/pack/bundle/start/neomake/autoload/neomake/utils.vim:35
Called 1 time
Total time: 0.000016
Self time: 0.000016
count total (s) self (s)
1 0.000004 if a:0 && has_key(a:1, 'make_id')
return neomake#GetMakeOptions(a:1.make_id).verbosity
1 0.000001 endif
1 0.000005 return get(g:, 'neomake_verbose', 1) + &verbose
FUNCTION <SNR>69_restore_undo_history()
Defined: ~/.vim/pack/bundle/start/traces/autoload/traces.vim:875
Called 2 times
Total time: 0.000166
Self time: 0.000166
count total (s) self (s)
2 0.000026 if s:buf[s:nr].changed
noautocmd keepjumps silent undo
call s:restore_marks()
2 0.000004 endif
2 0.000041 if type(get(s:buf[s:nr], 'undo_file')) isnot v:t_string
2 0.000007 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 <SNR>23_Remove_Matches()
Defined: /usr/share/vim/vim82/plugin/matchparen.vim:196
Called 35 times
Total time: 0.001171
Self time: 0.001171
count total (s) self (s)
35 0.000518 if exists('w:paren_hl_on') && w:paren_hl_on
silent! call matchdelete(3)
let w:paren_hl_on = 0
35 0.000089 endif
FUNCTION vimspector#internal#job#StartCommandWithLog()
Defined: ~/.vim/pack/bundle/start/vimspector/autoload/vimspector/internal/job.vim:156
Called 1 time
Total time: 0.003613
Self time: 0.001711
count total (s) self (s)
1 0.000007 if ! exists( 's:commands' )
1 0.000004 let s:commands = {}
1 0.000001 endif
1 0.000004 if ! has_key( s:commands, a:category )
1 0.000004 let s:commands[ a:category ] = []
1 0.000001 endif
1 0.000004 let l:index = len( s:commands[ a:category ] )
1 0.000003 let buf = '_vimspector_log_' . a:category
1 0.003527 0.001625 call add( s:commands[ a:category ], job_start( a:cmd, { 'out_io': 'buffer', 'err_io': 'buffer', 'out_msg': 0, 'err_msg': 0, 'out_name': buf, 'err_name': buf, 'exit_cb': funcref( 's:_OnCommandExit', [ a:category ] ), 'out_modifiable': 0, 'err_modifiable': 0, 'stoponexit': 'kill' } ) )
1 0.000024 if job_status( s:commands[ a:category ][ index ] ) !=# 'run'
echom 'Unable to start job for ' . string( a:cmd )
redraw
return v:none
1 0.000001 endif
1 0.000016 return bufnr( buf )
FUNCTION gitgutter#debug#log()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/debug.vim:80
Called 1 time
Total time: 0.000042
Self time: 0.000042
count total (s) self (s)
1 0.000003 if g:gitgutter_log
if s:new_log_session && gitgutter#async#available()
if exists('*ch_logfile')
call ch_logfile(s:channel_log, 'w')
endif
endif
execute 'redir >> '.s:log_file
if s:new_log_session
let s:start = reltime()
silent echo "\n==== start log session ===="
endif
let elapsed = reltimestr(reltime(s:start)).' '
silent echo ''
" callers excluding this function
silent echo elapsed.expand('<sfile>')[:-22].':'
silent echo elapsed.s:format_for_log(a:message)
if a:0 && !empty(a:1)
for msg in a:000
silent echo elapsed.s:format_for_log(msg)
endfor
endif
redir END
let s:new_log_session = 0
1 0.000001 endif
FUNCTION <SNR>69_cmdl_enter()
Defined: ~/.vim/pack/bundle/start/traces/autoload/traces.vim:743
Called 2 times
Total time: 0.000988
Self time: 0.000673
count total (s) self (s)
2 0.000050 let s:buf[s:nr] = {}
2 0.000050 let s:buf[s:nr].view = winsaveview()
2 0.000029 let s:buf[s:nr].show_range = 0
2 0.000023 let s:buf[s:nr].duration = 0
2 0.000026 let s:buf[s:nr].hlsearch = &hlsearch
2 0.000058 let s:buf[s:nr].cword = expand('<cword>')
2 0.000042 let s:buf[s:nr].cWORD = expand('<cWORD>')
2 0.000044 let s:buf[s:nr].cfile = expand('<cfile>')
2 0.000048 let s:buf[s:nr].cur_init_pos = [line('.'), col('.')]
2 0.000052 let s:buf[s:nr].seq_last = undotree().seq_last
2 0.000049 let s:buf[s:nr].empty_undotree = empty(undotree().entries)
2 0.000024 let s:buf[s:nr].changed = 0
2 0.000024 let s:buf[s:nr].cmdheight = &cmdheight
2 0.000022 let s:buf[s:nr].redraw = 1
2 0.000041 let s:buf[s:nr].s_mark = (&encoding == 'utf-8' ? "\uf8b4" : '' )
2 0.000389 0.000074 call s:save_marks()
FUNCTION <SNR>69_trim()
Defined: ~/.vim/pack/bundle/start/traces/autoload/traces.vim:83
Called 56 times
Total time: 0.003574
Self time: 0.003574
count total (s) self (s)
56 0.000439 if a:0 == 2
let a:1[0] = strcharpart(a:1[0], a:2)
56 0.000178 else
56 0.001957 let a:1[0] = substitute(a:1[0], '^\s\+', '', '')
56 0.000223 endif
FUNCTION vimspector#internal#term#GetPID()
Defined: ~/.vim/pack/bundle/start/vimspector/autoload/vimspector/internal/term.vim:30
Called 1 time
Total time: 0.000031
Self time: 0.000031
count total (s) self (s)
1 0.000029 return job_info( term_getjob( a:bufno ) ).process
FUNCTION <SNR>35_abs_path()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/utility.vim:186
Called 45 times
Total time: 0.003128
Self time: 0.003128
count total (s) self (s)
45 0.002650 let p = resolve(expand('#'.a:bufnr.':p'))
45 0.000384 return a:shellesc ? gitgutter#utility#shellescape(p) : p
FUNCTION <SNR>63_ShouldUseSignatureHelp()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:1065
Called 7 times
Total time: 0.000565
Self time: 0.000565
count total (s) self (s)
7 0.000558 return py3eval( 'vimsupport.VimSupportsPopupWindows()' )
FUNCTION <SNR>35_is_file_buffer()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/utility.vim:60
Called 47 times
Total time: 0.000734
Self time: 0.000734
count total (s) self (s)
47 0.000661 return empty(getbufvar(a:bufnr, '&buftype'))
FUNCTION undotree#UndotreeUpdate()
Defined: ~/.vim/pack/bundle/start/undotree/autoload/undotree.vim:1262
Called 25 times
Total time: 0.000386
Self time: 0.000386
count total (s) self (s)
25 0.000232 if !exists('t:undotree')
25 0.000079 return
endif
if !exists('w:undotree_id')
let w:undotree_id = 'id_'.s:getUniqueID()
call s:log("Unique window id assigned: ".w:undotree_id)
endif
" assume window layout won't change during updating.
let thiswinnr = winnr()
call t:undotree.Update()
" focus moved
if winnr() != thiswinnr
call s:exec("norm! ".thiswinnr."\<c-w>\<c-w>")
endif
FUNCTION <SNR>69_evaluate_cmdl()
Defined: ~/.vim/pack/bundle/start/traces/autoload/traces.vim:818
Called 14 times
Total time: 0.029528
Self time: 0.003583
count total (s) self (s)
14 0.000154 let cmdl = {}
14 0.000141 let cmdl.string = a:string
14 0.016418 0.000989 let r = s:evaluate_range(s:parse_range([], cmdl.string))
14 0.000131 let cmdl.range = {}
14 0.000124 let cmdl.range.abs = r.range
14 0.000101 let cmdl.range.end = r.end
14 0.000767 0.000508 let cmdl.range.pattern = s:get_selection_regexp(r.range)
14 0.000903 0.000621 let cmdl.range.specifier = s:add_flags(r.pattern, cmdl, 3)
14 0.000108 let cmdl.cmd = {}
14 0.000095 let cmdl.cmd.args = {}
14 0.010395 0.000420 call s:parse_command(cmdl)
14 0.000076 return cmdl
FUNCTION <SNR>63_OnFileReadyToParse()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:726
Called 7 times
Total time: 0.021901
Self time: 0.020362
count total (s) self (s)
" Accepts an optional parameter that is either 0 or 1. If 1, send a
" FileReadyToParse event notification, whether the buffer has changed or not;
" effectively forcing a parse of the buffer. Default is 0.
7 0.000071 let force_parsing = a:0 > 0 && a:1
" We only want to send a new FileReadyToParse event notification if the buffer
" has changed since the last time we sent one, or if forced.
7 0.000045 if force_parsing || py3eval( "ycm_state.NeedsReparse()" )
" We switched buffers or somethuing, so claer.
" FIXME: sig hekp should be buffer local?
7 0.001518 0.000123 call s:ClearSignatureHelp()
7 0.019688 py3 ycm_state.OnFileReadyToParse()
7 0.000364 0.000220 call s:StopPoller( s:pollers.file_parse_response )
7 0.000110 let s:pollers.file_parse_response.id = timer_start( s:pollers.file_parse_response.wait_milliseconds, function( 's:PollFileParseResponse' ) )
7 0.000023 endif
FUNCTION <SNR>56_on_exit_vim()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/async.vim:87
Called 1 time
Total time: 0.000445
Self time: 0.000086
count total (s) self (s)
1 0.000440 0.000081 call self.handler.out(self.buffer, join(self.stdoutbuffer, "\n"))
FUNCTION <SNR>69_parse_range()
Defined: ~/.vim/pack/bundle/start/traces/autoload/traces.vim:91
Called 14 times
Total time: 0.011259
Self time: 0.008595
count total (s) self (s)
14 0.000120 let specifier = {}
14 0.000100 let specifier.addresses = []
14 0.000087 let while_limit = 0
14 0.000068 while 1
" address part
14 0.001451 0.000442 call s:trim(a:cmdl)
14 0.000117 let entry = {}
" regexp for pattern specifier
14 0.000109 let pattern = '/%(\\.|/@!&.)*/=|\?%(\\.|\?@!&.)*\?='
14 0.000168 if !len(specifier.addresses)
" \& is not supported
14 0.000950 let address = matchstrpos(a:cmdl[0], '\v^%(\d+|\.|\$|\%|\*|''.|'. pattern . '|\\\/|\\\?)')
else
let address = matchstrpos(a:cmdl[0], '\v^%(' . pattern . ')' )
14 0.000040 endif
14 0.000150 if address[2] != -1
call s:trim(a:cmdl, address[2])
let entry.address = address[0]
14 0.000035 endif
" offset
14 0.001231 0.000384 call s:trim(a:cmdl)
14 0.000509 let offset = matchstrpos(a:cmdl[0], '\m^\%(\d\|\s\|+\|-\)\+')
14 0.000227 if offset[2] != -1
call s:trim(a:cmdl, offset[2])
let entry.offset = offset[0]
14 0.000037 endif
" add first address
14 0.000190 if address[2] != -1 || offset[2] != -1
" if offset is present but specifier is missing add '.' specifier
if !has_key(entry, 'address')
let entry.address = '.'
endif
call add(specifier.addresses, entry)
14 0.000044 else
" stop trying if previous attempt was unsuccessful
14 0.000044 break
endif
let while_limit += 1 | if while_limit == 1000 | echoerr 'infinite loop' | break | endif
14 0.000092 endwhile
" delimiter
14 0.001206 0.000398 call s:trim(a:cmdl)
14 0.000408 let delimiter = matchstrpos(a:cmdl[0], '\m^\%(,\|;\)')
14 0.000158 if delimiter[2] != -1
call s:trim(a:cmdl, delimiter[2])
let specifier.delimiter = delimiter[0]
14 0.000038 endif
" add when addresses or delimiter are found or when one specifier is
" already known
14 0.000297 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, { 'address': '.' })
endif
call add(a:range, specifier)
14 0.000035 endif
14 0.000123 if delimiter[2] != -1
try
return s:parse_range(a:range, a:cmdl)
catch /^Vim\%((\a\+)\)\=:E132/
return []
endtry
14 0.000036 else
14 0.000073 return a:range
endif
FUNCTION gitgutter#all()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter.vim:5
Called 1 time
Total time: 0.002142
Self time: 0.000262
count total (s) self (s)
3 0.000088 0.000048 for bufnr in s:uniq(tabpagebuflist())
2 0.000093 let file = expand('#'.bufnr.':p')
2 0.000016 if !empty(file)
1 0.001175 0.000041 call gitgutter#init_buffer(bufnr)
1 0.000741 0.000035 call gitgutter#process_buffer(bufnr, a:force)
2 0.000002 endif
3 0.000005 endfor
FUNCTION neomake#utils#LogMessage()
Defined: ~/.vim/pack/bundle/start/neomake/autoload/neomake/utils.vim:42
Called 1 time
Total time: 0.000056
Self time: 0.000040
count total (s) self (s)
1 0.000004 if a:0
let context = a:1
let verbosity = neomake#utils#get_verbosity(context)
1 0.000001 else
1 0.000004 let context = {} " just for vimlint (EVL104)
1 0.000026 0.000010 let verbosity = neomake#utils#get_verbosity()
1 0.000001 endif
1 0.000004 let logfile = get(g:, 'neomake_logfile', '')
1 0.000005 if !s:is_testing && verbosity < a:level && logfile is# ''
1 0.000002 return
endif
if a:0
let msg = printf('[%s.%s:%s:%d] %s', get(context, 'make_id', '-'), get(context, 'id', '-'), get(context, 'bufnr', get(context, 'file_mode', 0) ? '?' : '-'), winnr(), a:msg)
else
let msg = a:msg
endif
" Use Vader's log for messages during tests.
" @vimlint(EVL104, 1, l:timediff)
if s:is_testing && (verbosity >= a:level || get(g:, 'neomake_test_log_all_messages', 0))
let timediff = s:reltime_lastmsg()
if timediff !=# ' '
let test_msg = '['.s:short_level_to_name[a:level].' '.timediff.']: '.msg
else
let test_msg = '['.s:level_to_name[a:level].']: '.msg
endif
call vader#log(test_msg)
" Only keep context entries that are relevant for / used in the message.
let context = a:0 ? filter(copy(context), "index(['id', 'make_id', 'bufnr'], v:key) != -1") : {}
call add(g:neomake_test_messages, [a:level, a:msg, context])
if index(['.', '!', ')', ']'], a:msg[-1:-1]) == -1
Assert 0, 'Log msg does not end with punctuation: "'.a:msg.'".'
endif
elseif verbosity >= a:level
redraw
if a:level ==# 0
echohl ErrorMsg
endif
if verbosity > 2
if !exists('timediff')
let timediff = s:reltime_lastmsg()
endif
echom 'Neomake ['.timediff.']: '.msg
else
echom 'Neomake: '.msg
endif
if a:level ==# 0
echohl None
endif
endif
if !empty(logfile) && type(logfile) ==# type('')
if !exists('s:logfile_writefile_opts')
" Use 'append' with writefile, but only if it is available. Otherwise, just
" overwrite the file. 'S' is used to disable fsync in Neovim
" (https://github.com/neovim/neovim/pull/6427).
let s:can_append_to_logfile = v:version > 704 || (v:version == 704 && has('patch503'))
if !s:can_append_to_logfile
redraw
echohl WarningMsg
echom 'Neomake: appending to the logfile is not supported in your Vim version.'
echohl NONE
endif
let s:logfile_writefile_opts = s:can_append_to_logfile ? 'aS' : ''
endif
let date = strftime('%H:%M:%S')
if !exists('timediff')
let timediff = s:reltime_lastmsg()
endif
try
call writefile([printf('%s [%s %s] %s', date, s:short_level_to_name[a:level], timediff, msg)], logfile, s:logfile_writefile_opts)
catch
unlet g:neomake_logfile
call neomake#utils#ErrorMessage(printf('Error when trying to write to logfile %s: %s. Unsetting g:neomake_logfile.', logfile, v:exception))
endtry
endif
" @vimlint(EVL104, 0, l:timediff)
FUNCTION <SNR>63_AllowedToCompleteInCurrentBuffer()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:506
Called 28 times
Total time: 0.005729
Self time: 0.000756
count total (s) self (s)
28 0.005691 0.000718 return s:AllowedToCompleteInBuffer( '%' )
FUNCTION neomake#VimLeave()
Defined: ~/.vim/pack/bundle/start/neomake/autoload/neomake.vim:1687
Called 1 time
Total time: 0.000108
Self time: 0.000033
count total (s) self (s)
1 0.000088 0.000013 call neomake#utils#DebugMessage('Calling VimLeave.')
1 0.000010 for make_id in keys(s:make_info)
call neomake#CancelMake(make_id)
1 0.000002 endfor
FUNCTION neomake#utils#DebugMessage()
Defined: ~/.vim/pack/bundle/start/neomake/autoload/neomake/utils.vim:146
Called 1 time
Total time: 0.000075
Self time: 0.000019
count total (s) self (s)
1 0.000075 0.000019 call call('neomake#utils#LogMessage', [3] + a:000)
FUNCTION <SNR>35_not_git_dir()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/utility.vim:56
Called 11 times
Total time: 0.002089
Self time: 0.000416
count total (s) self (s)
11 0.002066 0.000393 return s:dir(a:bufnr) !~ '[/\\]\.git\($\|[/\\]\)'
FUNCTION gitgutter#utility#shellescape()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/utility.vim:70
Called 13 times
Total time: 0.000456
Self time: 0.000456
count total (s) self (s)
13 0.000392 if a:arg =~ '^[A-Za-z0-9_/.-]\+$'
13 0.000042 return a:arg
elseif s:winshell()
return '"' . substitute(substitute(a:arg, '"', '""', 'g'), '%', '"%"', 'g') . '"'
else
return shellescape(a:arg)
endif
FUNCTION <SNR>69_parse_command()
Defined: ~/.vim/pack/bundle/start/traces/autoload/traces.vim:519
Called 14 times
Total time: 0.009975
Self time: 0.001969
count total (s) self (s)
14 0.008474 0.000468 let a:cmdl.cmd.name = s:get_command(a:cmdl.string)
14 0.000407 if a:cmdl.cmd.name =~# '\v^%(g%[lobal]\!=|v%[global])$'
let a:cmdl.cmd.args = s:parse_global(a:cmdl)
14 0.000321 elseif a:cmdl.cmd.name =~# '\v^%(s%[ubstitute]|sm%[agic]|sno%[magic])$'
let a:cmdl.cmd.args = s:parse_substitute(a:cmdl)
14 0.000219 elseif a:cmdl.cmd.name =~# '\v^%(sor%[t]\!=)$'
let a:cmdl.cmd.args = s:parse_sort(a:cmdl)
14 0.000044 endif
FUNCTION gitgutter#async#available()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/async.vim:9
Called 1 time
Total time: 0.000003
Self time: 0.000003
count total (s) self (s)
1 0.000002 return s:available
FUNCTION <SNR>69_highlight()
Defined: ~/.vim/pack/bundle/start/traces/autoload/traces.vim:571
Called 28 times
Total time: 0.001973
Self time: 0.001973
count total (s) self (s)
28 0.000332 let cur_win = win_getid()
28 0.000676 if exists('s:win[cur_win].hlight[a:group].pattern') && s:win[cur_win].hlight[a:group].pattern ==# a:pattern
return
28 0.000074 endif
28 0.000550 if !exists('s:win[cur_win].hlight[a:group].pattern') && empty(a:pattern)
28 0.000112 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
let alt_win = win_getid(winnr('#'))
let windows = filter(win_findbuf(s:nr), {_, val -> win_id2win(val)})
for id in windows
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(alt_win)
noautocmd call win_gotoid(cur_win)
endif
if exists('scrolloff')
noautocmd let &scrolloff = scrolloff
endif
FUNCTION <SNR>72__OnServerData()
Defined: ~/.vim/pack/bundle/start/vimspector/autoload/vimspector/internal/job.vim:22
Called 13 times
Total time: 24.388538
Self time: 0.121767
count total (s) self (s)
13 0.000622 if !exists( 's:job' ) || ch_getjob( a:channel ) isnot s:job
call ch_log( 'Get data after process exit' )
return
13 0.000039 endif
13 0.188367 0.037151 py3 _vimspector_session.OnChannelData( vim.eval( 'a:data' ) )
FUNCTION <SNR>63_OnBufferEnter()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:675
Called 22 times
Total time: 0.151223
Self time: 0.013614
count total (s) self (s)
22 0.001033 0.000449 call s:StartMessagePoll()
22 0.004417 0.000475 if !s:VisitedBufferRequiresReparse()
18 0.000048 return
4 0.000004 endif
4 0.000248 0.000051 call s:SetUpCompleteopt()
4 0.000083 0.000055 call s:EnableCompletingInCurrentBuffer()
4 0.130955 0.012310 py3 ycm_state.OnBufferVisit()
" Last parse may be outdated because of changes from other buffers. Force a
" new parse.
4 0.014376 0.000163 call s:OnFileReadyToParse( 1 )
FUNCTION <SNR>7_LoadIndent()
Defined: /usr/share/vim/vim82/indent.vim:13
Called 3 times
Total time: 0.001468
Self time: 0.001364
count total (s) self (s)
3 0.000026 if exists("b:undo_indent")
exe b:undo_indent
unlet! b:undo_indent b:did_indent
3 0.000005 endif
3 0.000023 let s = expand("<amatch>")
3 0.000012 if s != ""
3 0.000014 if exists("b:did_indent")
unlet b:did_indent
3 0.000004 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".
6 0.000045 for name in split(s, '\.')
3 0.001263 0.001159 exe 'runtime! indent/' . name . '.vim'
6 0.000014 endfor
3 0.000005 endif
FUNCTION vimspector#internal#state#Reset()
Defined: ~/.vim/pack/bundle/start/vimspector/autoload/vimspector/internal/state.vim:27
Called 1 time
Total time: 0.037114
Self time: 0.037114
count total (s) self (s)
1 0.000007 try
1 0.000210 py3 import vim
1 0.036830 py3 _vimspector_session = __import__( "vimspector", fromlist=[ "debug_session" ] ).debug_session.DebugSession( vim.eval( 's:prefix' ) )
catch /.*/
echohl WarningMsg
echom 'Exception while loading vimspector:' v:exception
echom 'From:' v:throwpoint
echom 'Vimspector unavailable: Requires Vim compiled with Python 3.6'
echohl None
return v:false
1 0.000006 endtry
1 0.000008 return v:true
FUNCTION vimspector#internal#term#Start()
Defined: ~/.vim/pack/bundle/start/vimspector/autoload/vimspector/internal/term.vim:22
Called 1 time
Total time: 0.002257
Self time: 0.001314
count total (s) self (s)
1 0.002245 0.001302 rightbelow return term_start( a:cmd, a:opts )
FUNCTION UltiSnips#SnippetsInCurrentScope()
Defined: ~/.vim/pack/bundle/start/ultisnips/autoload/UltiSnips.vim:87
Called 7 times
Total time: 0.199649
Self time: 0.199649
count total (s) self (s)
7 0.000493 let g:current_ulti_dict = {}
7 0.000089 let all = get(a:, 1, 0)
7 0.000023 if all
7 0.000483 let g:current_ulti_dict_info = {}
7 0.000014 endif
7 0.198476 exec g:_uspy "UltiSnips_Manager.snippets_in_current_scope(" . all . ")"
7 0.000036 return g:current_ulti_dict
FUNCTION gitgutter#utility#setbufvar()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/utility.vim:9
Called 2 times
Total time: 0.000171
Self time: 0.000171
count total (s) self (s)
2 0.000060 let dict = get(getbufvar(a:buffer, ''), 'gitgutter', {})
2 0.000026 let needs_setting = empty(dict)
2 0.000024 let dict[a:varname] = a:val
2 0.000013 if needs_setting
1 0.000005 call setbufvar(a:buffer, 'gitgutter', dict)
2 0.000006 endif
FUNCTION neomake#highlights#ShowHighlights()
Defined: ~/.vim/pack/bundle/start/neomake/autoload/neomake/highlights.vim:92
Called 22 times
Total time: 0.006608
Self time: 0.006608
count total (s) self (s)
22 0.000222 if exists('w:neomake_highlights')
13 0.000098 for l:highlight in w:neomake_highlights
try
call matchdelete(l:highlight)
catch /^Vim\%((\a\+)\)\=:E803/
endtry
13 0.000036 endfor
22 0.000042 endif
22 0.000146 let w:neomake_highlights = []
22 0.000209 let l:buf = bufnr('%')
66 0.000317 for l:type in ['file', 'project']
44 0.001139 for [l:hi, l:locs] in items(filter(copy(get(s:highlights[l:type], l:buf, {})), '!empty(v:val)'))
if exists('*matchaddpos')
call add(w:neomake_highlights, matchaddpos(l:hi, l:locs))
else
for l:loc in l:locs
if len(l:loc) == 1
call add(w:neomake_highlights, matchadd(l:hi, '\%' . l:loc[0] . 'l'))
else
call add(w:neomake_highlights, matchadd(l:hi, '\%' . l:loc[0] . 'l\%' . l:loc[1] . 'c.\{' . l:loc[2] . '}'))
endif
endfor
endif
44 0.000084 endfor
66 0.000160 endfor
FUNCTION neomake#CursorMoved()
Defined: ~/.vim/pack/bundle/start/neomake/autoload/neomake.vim:2682
Called 3 times
Total time: 0.001133
Self time: 0.000087
count total (s) self (s)
3 0.001121 0.000075 call neomake#EchoCurrentError()
FUNCTION <SNR>63_OnFileTypeSet()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:644
Called 3 times
Total time: 0.103974
Self time: 0.014019
count total (s) self (s)
" The contents of the command-line window are empty when the filetype is set
" for the first time. Users should never change its filetype so we only rely
" on the CmdwinEnter event for that window.
3 0.000027 if !empty( getcmdwintype() )
return
3 0.000005 endif
3 0.000989 0.000061 if !s:AllowedToCompleteInCurrentBuffer()
return
3 0.000005 endif
3 0.000275 0.000066 call s:SetUpCompleteopt()
3 0.000122 0.000099 call s:EnableCompletingInCurrentBuffer()
3 0.000097 0.000042 call s:StartMessagePoll()
3 0.000125 0.000077 call s:EnableAutoHover()
3 0.094497 0.013493 py3 ycm_state.OnFileTypeSet()
3 0.007789 0.000101 call s:OnFileReadyToParse( 1 )
FUNCTION <SNR>70_Enabled()
Defined: ~/.vim/pack/bundle/start/vimspector/autoload/vimspector.vim:36
Called 4 times
Total time: 0.038688
Self time: 0.001137
count total (s) self (s)
4 0.000131 0.000090 if !s:Initialised()
1 0.038484 0.000974 let s:enabled = vimspector#internal#state#Reset()
4 0.000007 endif
4 0.000016 return s:enabled
FUNCTION neomake#EchoCurrentError()
Defined: ~/.vim/pack/bundle/start/neomake/autoload/neomake.vim:2659
Called 3 times
Total time: 0.001046
Self time: 0.000390
count total (s) self (s)
3 0.000060 if !get(g:, 'neomake_echo_current_error', 1)
return
3 0.000011 endif
" a:1 might be a timer from the VimResized event.
3 0.000048 let force = a:0 ? a:1 : 0
3 0.000785 0.000129 let message = neomake#GetCurrentErrorMsg()
3 0.000024 if empty(message)
3 0.000031 if exists('s:neomake_last_echoed_error')
echon ''
unlet s:neomake_last_echoed_error
3 0.000007 endif
3 0.000008 return
endif
if !force && exists('s:neomake_last_echoed_error') && s:neomake_last_echoed_error == message
return
endif
let s:neomake_last_echoed_error = message
call neomake#utils#WideMessage(message)
FUNCTION <SNR>35_windows()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/utility.vim:208
Called 1 time
Total time: 0.000011
Self time: 0.000011
count total (s) self (s)
1 0.000010 return has('win64') || has('win32') || has('win16')
FUNCTION <SNR>41_create_cmdl_changed_au()
Defined: ~/.vim/pack/bundle/start/traces/plugin/traces.vim:28
Called 2 times
Total time: 0.001426
Self time: 0.001118
count total (s) self (s)
2 0.000065 augroup traces_augroup_cmdline_changed
2 0.000847 autocmd!
2 0.000072 autocmd CmdlineChanged : call s:cmdline_changed()
2 0.000010 augroup END
" necessary when entering command line that has already been populated with
" text from mappings
2 0.000408 0.000100 call s:cmdline_changed()
FUNCTION gitgutter#utility#repo_path()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/utility.vim:105
Called 4399 times
Total time: 0.645807
Self time: 0.293500
count total (s) self (s)
4399 0.563229 0.210922 let p = gitgutter#utility#getbufvar(a:bufnr, 'path')
4399 0.062688 return a:shellesc ? gitgutter#utility#shellescape(p) : p
FUNCTION <SNR>41_t_stop()
Defined: ~/.vim/pack/bundle/start/traces/plugin/traces.vim:46
Called 4 times
Total time: 0.001834
Self time: 0.001834
count total (s) self (s)
4 0.000060 if exists('s:previous_cmdl')
unlet s:previous_cmdl
4 0.000012 endif
4 0.000029 if exists('s:track_cmdl_timer')
4 0.000036 call timer_stop(s:track_cmdl_timer)
4 0.000021 unlet s:track_cmdl_timer
4 0.000009 endif
4 0.000023 if exists('s:start_init_timer')
2 0.000008 call timer_stop(s:start_init_timer)
2 0.000003 unlet s:start_init_timer
4 0.000008 endif
4 0.000027 augroup traces_augroup_cmdline_changed
4 0.001496 autocmd!
4 0.000032 augroup END
FUNCTION vimspector#ToggleBreakpoint()
Defined: ~/.vim/pack/bundle/start/vimspector/autoload/vimspector.vim:84
Called 1 time
Total time: 0.039140
Self time: 0.000598
count total (s) self (s)
1 0.038577 0.000035 if !s:Enabled()
return
1 0.000003 endif
1 0.000009 if a:0 == 0
1 0.000012 let options = {}
else
let options = a:1
1 0.000002 endif
1 0.000518 py3 _vimspector_session.ToggleBreakpoint( vim.eval( 'options' ) )
FUNCTION <SNR>69_get_selection_regexp()
Defined: ~/.vim/pack/bundle/start/traces/autoload/traces.vim:386
Called 14 times
Total time: 0.000259
Self time: 0.000259
count total (s) self (s)
14 0.000150 if empty(a:range)
14 0.000066 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 <SNR>63_SetUpCompleteopt()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:531
Called 7 times
Total time: 0.000406
Self time: 0.000406
count total (s) self (s)
" Some plugins (I'm looking at you, vim-notes) change completeopt by for
" instance adding 'longest'. This breaks YCM. So we force our settings.
" There's no two ways about this: if you want to use YCM then you have to
" have these completeopt settings, otherwise YCM won't work at all.
" We need menuone in completeopt, otherwise when there's only one candidate
" for completion, the menu doesn't show up.
7 0.000097 set completeopt-=menu
7 0.000046 set completeopt+=menuone
" This is unnecessary with our features. People use this option to insert
" the common prefix of all the matches and then add more differentiating chars
" so that they can select a more specific match. With our features, they
" don't need to insert the prefix; they just type the differentiating chars.
" Also, having this option set breaks the plugin.
7 0.000034 set completeopt-=longest
7 0.000035 if s:resolve_completions == s:RESOLVE_ON_DEMAND
set completeopt+=popuphidden
7 0.000008 endif
7 0.000019 if s:force_preview_popup
set completeopt+=popup
7 0.000021 elseif g:ycm_add_preview_to_completeopt
7 0.000031 set completeopt+=preview
7 0.000010 endif
FUNCTION <SNR>35_strip_trailing_new_line()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/utility.vim:204
Called 1 time
Total time: 0.000055
Self time: 0.000055
count total (s) self (s)
1 0.000050 return substitute(a:line, '\n$', '', '')
FUNCTION traces#init()
Defined: ~/.vim/pack/bundle/start/traces/autoload/traces.vim:965
Called 14 times
Total time: 0.050315
Self time: 0.012253
count total (s) self (s)
14 0.000587 if &buftype ==# 'terminal' || (has('nvim') && !empty(&inccommand))
if exists('s:track_cmdl_timer')
call timer_stop(s:track_cmdl_timer)
endif
return
14 0.000038 endif
14 0.000296 let s:nr = bufnr('%')
14 0.000347 if !exists('s:buf[s:nr]')
2 0.001074 0.000086 call s:cmdl_enter()
14 0.000040 endif
14 0.000119 let s:highlighted = 0
14 0.000099 let s:moved = 0
14 0.000152 let s:last_pattern = @/
14 0.000320 if s:buf[s:nr].duration < s:timeout
14 0.000347 let start_time = reltime()
14 0.000078 endif
14 0.000224 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)
14 0.000038 endif
14 0.036168 0.001067 let cmdl = s:evaluate_cmdl([s:skip_modifiers(a:cmdl)])
14 0.000211 if s:buf[s:nr].duration < s:timeout
" range preview
14 0.000320 if (!empty(cmdl.cmd.name) || s:buf[s:nr].show_range) && !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)
14 0.000039 endif
" cmd preview
14 0.000325 if cmdl.cmd.name =~# '\v^%(s%[ubstitute]|sm%[agic]|sno%[magic])$'
call s:preview_substitute(cmdl)
14 0.000292 elseif cmdl.cmd.name =~# '\v^%(g%[lobal]\!=|v%[global])$'
call s:preview_global(cmdl)
14 0.000211 elseif cmdl.cmd.name =~# '\v^%(sor%[t]\!=)$'
call s:preview_sort(cmdl)
14 0.000043 endif
" clear unnecessary hl
14 0.000171 if empty(cmdl.range.pattern) || get(s:, 'entire_file')
14 0.001563 0.000539 call s:highlight('Visual', '', 100)
14 0.000041 endif
14 0.000287 if empty(cmdl.cmd.name) && empty(cmdl.range.specifier) || !empty(cmdl.cmd.name) && empty(cmdl.cmd.args)
14 0.001353 0.000404 call s:highlight('TracesSearch', '', 101)
14 0.000043 endif
14 0.000032 endif
" move to starting position if necessary
14 0.000386 if !s:moved && winsaveview() != s:buf[s:nr].view && !wildmenumode()
call winrestview(s:buf[s:nr].view)
14 0.000037 endif
" update screen if necessary
14 0.000055 if s:highlighted
call s:adjust_cmdheight(a:cmdl)
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("\<left>\<right>", 'tn')
endif
endif
14 0.000032 endif
14 0.000121 if exists('start_time')
14 0.000360 let s:buf[s:nr].duration = reltimefloat(reltime(start_time)) * 1000
14 0.000048 endif
FUNCTION vimspector#internal#popup#HideSplash()
Defined: ~/.vim/pack/bundle/start/vimspector/autoload/vimspector/internal/popup.vim:31
Called 1 time
Total time: 0.000013
Self time: 0.000013
count total (s) self (s)
1 0.000011 call popup_hide( a:id )
FUNCTION gitgutter#init_buffer()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter.vim:17
Called 23 times
Total time: 0.007530
Self time: 0.001265
count total (s) self (s)
23 0.004758 0.000520 if gitgutter#utility#is_active(a:bufnr)
5 0.000427 0.000123 let p = gitgutter#utility#repo_path(a:bufnr, 0)
5 0.000048 if type(p) != s:t_string || empty(p)
1 0.001759 0.000036 call gitgutter#utility#set_repo_path(a:bufnr)
5 0.000015 endif
23 0.000036 endif
FUNCTION <SNR>69_add_flags()
Defined: ~/.vim/pack/bundle/start/traces/autoload/traces.vim:412
Called 14 times
Total time: 0.000282
Self time: 0.000282
count total (s) self (s)
14 0.000170 if !len(a:pattern)
14 0.000061 return ''
endif
if !s:range_valid
return ''
endif
if !len(substitute(a:pattern, '\\[cCvVmM]', '', 'g'))
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
if !empty(a:cmdl.range.abs)
let start = a:cmdl.range.abs[-2] - 1
let end = a:cmdl.range.abs[-1] + 1
elseif a:type ==# 1
return option . a:pattern
elseif a:type ==# 2
let start = s:buf[s:nr].cur_init_pos[0] - 1
let end = s:buf[s:nr].cur_init_pos[0] + 1
endif
" range pattern specifer
if a:type == 3
let start = a:cmdl.range.end - 1
let end = a:cmdl.range.end + 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 . option . a:pattern . group_end
FUNCTION <SNR>41_cmdline_changed()
Defined: ~/.vim/pack/bundle/start/traces/plugin/traces.vim:21
Called 14 times
Total time: 0.001634
Self time: 0.001634
count total (s) self (s)
14 0.000418 if exists('s:start_init_timer')
12 0.000179 call timer_stop(s:start_init_timer)
14 0.000071 endif
14 0.000853 let s:start_init_timer = timer_start(1, {_-> traces#init(getcmdline())})
FUNCTION <SNR>63_OnBufferUnload()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:691
Called 12 times
Total time: 0.013701
Self time: 0.012734
count total (s) self (s)
" Expanding <abuf> returns the unloaded buffer number as a string but we want
" it as a true number for the getbufvar function.
12 0.000186 let buffer_number = str2nr( expand( '<abuf>' ) )
12 0.001227 0.000260 if !s:AllowedToCompleteInBuffer( buffer_number )
8 0.000013 return
4 0.000007 endif
4 0.012214 py3 ycm_state.OnBufferUnload( vimsupport.GetIntValue( 'buffer_number' ) )
FUNCTION <SNR>69_get_command()
Defined: ~/.vim/pack/bundle/start/traces/autoload/traces.vim:399
Called 14 times
Total time: 0.008006
Self time: 0.007096
count total (s) self (s)
14 0.001350 0.000440 call s:trim(a:cmdl)
14 0.000088 if !s:range_valid
return ''
14 0.000034 endif
14 0.005774 let result = matchstrpos(a:cmdl[0], s:cmd_pattern)
14 0.000253 if result[2] != -1
call s:trim(a:cmdl, result[2])
return result[0]
14 0.000040 endif
14 0.000058 return ''
FUNCTION gitgutter#diff#run_diff()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/diff.vim:60
Called 1 time
Total time: 24.198689
Self time: 23.544511
count total (s) self (s)
4394 0.991810 0.346307 while gitgutter#utility#repo_path(a:bufnr, 0) == -1
4393 23.097909 23.089234 sleep 5m
4393 0.089967 endwhile
if gitgutter#utility#repo_path(a:bufnr, 0) == -2
throw 'gitgutter not tracked'
endif
" Wrap compound commands in parentheses to make Windows happy.
" bash doesn't mind the parentheses.
let cmd = '('
" Append buffer number to avoid race conditions between writing and reading
" the files when asynchronously processing multiple buffers.
"
" Without the buffer number, index_file would have a race in the shell
" between the second process writing it (with git-show) and the first
" reading it (with git-diff).
let index_file = s:temp_index.'.'.a:bufnr
" Without the buffer number, buff_file would have a race between the
" second gitgutter#process_buffer() writing the file (synchronously, below)
" and the first gitgutter#process_buffer()'s async job reading it (with
" git-diff).
let buff_file = s:temp_buffer.'.'.a:bufnr
let extension = gitgutter#utility#extension(a:bufnr)
if !empty(extension)
let index_file .= '.'.extension
let buff_file .= '.'.extension
endif
" Write file from index to temporary file.
let index_name = g:gitgutter_diff_base.':'.gitgutter#utility#repo_path(a:bufnr, 1)
let cmd .= g:gitgutter_git_executable.' --no-pager show '.index_name.' > '.index_file.' && '
" Write buffer to temporary file.
" Note: this is synchronous.
call s:write_buffer(a:bufnr, buff_file)
" Call git-diff with the temporary files.
let cmd .= g:gitgutter_git_executable.' --no-pager'
if s:c_flag
let cmd .= ' -c "diff.autorefreshindex=0"'
let cmd .= ' -c "diff.noprefix=false"'
let cmd .= ' -c "core.safecrlf=false"'
endif
let cmd .= ' diff --no-ext-diff --no-color -U0 '.g:gitgutter_diff_args.' -- '.index_file.' '.buff_file
" Pipe git-diff output into grep.
if !a:preserve_full_diff && !empty(g:gitgutter_grep)
let cmd .= ' | '.g:gitgutter_grep.' '.gitgutter#utility#shellescape('^@@ ')
endif
" grep exits with 1 when no matches are found; git-diff exits with 1 when
" differences are found. However we want to treat non-matches and
" differences as non-erroneous behaviour; so we OR the command with one
" which always exits with success (0).
let cmd .= ' || exit 0'
let cmd .= ')'
let cmd = gitgutter#utility#cd_cmd(a:bufnr, cmd)
if g:gitgutter_async && gitgutter#async#available()
call gitgutter#async#execute(cmd, a:bufnr, { 'out': function('gitgutter#diff#handler'), 'err': function('gitgutter#hunk#reset'), })
return 'async'
else
let diff = gitgutter#utility#system(cmd)
if v:shell_error
call gitgutter#debug#log(diff)
throw 'gitgutter diff failed'
endif
return diff
endif
FUNCTION <SNR>63_OnVimLeave()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:572
Called 1 time
Total time: 0.006223
Self time: 0.006149
count total (s) self (s)
" Workaround a NeoVim issue - not shutting down timers correctly
" https://github.com/neovim/neovim/issues/6840
7 0.000037 for poller in values( s:pollers )
6 0.000192 0.000118 call s:StopPoller( poller )
7 0.000011 endfor
1 0.005974 py3 ycm_state.OnVimLeave()
FUNCTION <SNR>63_EnableAutoHover()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:627
Called 3 times
Total time: 0.000048
Self time: 0.000048
count total (s) self (s)
3 0.000020 if g:ycm_auto_hover ==# 'CursorHold' && s:enable_hover
augroup YcmBufHover
autocmd! * <buffer>
autocmd CursorHold <buffer> call s:Hover()
augroup END
3 0.000004 endif
FUNCTION <SNR>9_SynSet()
Defined: /usr/share/vim/vim82/syntax/synload.vim:33
Called 7 times
Total time: 0.004541
Self time: 0.003678
count total (s) self (s)
" clear syntax for :set syntax=OFF and any syntax name that doesn't exist
7 0.000067 syn clear
7 0.000055 if exists("b:current_syntax")
unlet b:current_syntax
7 0.000012 endif
7 0.000065 let s = expand("<amatch>")
7 0.000027 if s == "ON"
" :set syntax=ON
if &filetype == ""
echohl ErrorMsg
echo "filetype unknown"
echohl None
endif
let s = &filetype
7 0.000023 elseif s == "OFF"
let s = ""
7 0.000011 endif
7 0.000023 if s != ""
" Load the syntax file(s). When there are several, separated by dots,
" load each in sequence. Skip empty entries.
6 0.000045 for name in split(s, '\.')
3 0.000017 if !empty(name)
3 0.003831 0.002968 exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim"
3 0.000011 endif
6 0.000014 endfor
7 0.000010 endif
FUNCTION <SNR>63_ReceiveMessages()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:90
Called 3 times
Total time: 0.007088
Self time: 0.006486
count total (s) self (s)
3 0.000040 let poll_again = v:false
3 0.000657 0.000055 if s:AllowedToCompleteInCurrentBuffer()
3 0.006292 let poll_again = py3eval( 'ycm_state.OnPeriodicTick()' )
3 0.000017 endif
3 0.000010 if poll_again
1 0.000017 let s:pollers.receive_messages.id = timer_start( s:pollers.receive_messages.wait_milliseconds, function( 's:ReceiveMessages' ) )
2 0.000004 else
" Don't poll again until we open another buffer
2 0.000012 let s:pollers.receive_messages.id = -1
3 0.000004 endif
FUNCTION <SNR>63_HasAnyKey()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:466
Called 29 times
Total time: 0.000977
Self time: 0.000977
count total (s) self (s)
46 0.000274 for key in a:keys
29 0.000230 if has_key( a:dict, key )
12 0.000046 return 1
17 0.000026 endif
34 0.000085 endfor
17 0.000047 return 0
FUNCTION <SNR>69_skip_modifiers()
Defined: ~/.vim/pack/bundle/start/traces/autoload/traces.vim:919
Called 14 times
Total time: 0.005573
Self time: 0.005573
count total (s) self (s)
14 0.000153 let cmdl = a:cmdl
" skip leading colon
14 0.000465 let cmdl = substitute(cmdl, '\v^:+', '', '')
" skip modifiers
14 0.000304 let pattern = '\v^\s*%(' . 'sil%[ent]\!=|' . 'verb%[ose]|' . 'noa%[utocmd]|' . 'loc%[kmarks]' . 'keepp%[atterns]|' . 'keepa%[lt]|' . 'keepj%[umps]|' . 'kee%[pmarks]|' . ')\s+'
14 0.000104 while 1
14 0.001145 let offset = matchstrpos(cmdl, pattern)
14 0.000245 if offset[2] isnot -1
let cmdl = strcharpart(cmdl, offset[2])
14 0.000110 else
14 0.000059 break
endif
14 0.000062 endwhile
14 0.000082 if g:traces_skip_modifiers
" skip *do modifiers
14 0.001019 let cmdl = substitute(cmdl, '\v^\s*%(%(%(\d+|\.|\$|\%)\s*[,;]=\s*)+)=\s*%(cdo|cfdo|ld%[o]|lfdo' . '|bufd%[o]|tabd%[o]|argdo|wind%[o])\!=\s+', '', '')
" skip modifiers
14 0.000082 while 1
14 0.000643 let offset = matchstrpos(cmdl, pattern)
14 0.000175 if offset[2] isnot -1
let cmdl = strcharpart(cmdl, offset[2])
14 0.000047 else
14 0.000043 break
endif
14 0.000050 endwhile
14 0.000036 endif
14 0.000081 return cmdl
FUNCTION <SNR>63_StartMessagePoll()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:81
Called 25 times
Total time: 0.000639
Self time: 0.000639
count total (s) self (s)
25 0.000214 if s:pollers.receive_messages.id < 0
2 0.000086 let s:pollers.receive_messages.id = timer_start( s:pollers.receive_messages.wait_milliseconds, function( 's:ReceiveMessages' ) )
25 0.000055 endif
FUNCTION gitgutter#utility#is_active()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/utility.vim:48
Called 47 times
Total time: 0.008047
Self time: 0.002038
count total (s) self (s)
47 0.007988 0.001979 return g:gitgutter_enabled && !pumvisible() && s:is_file_buffer(a:bufnr) && s:exists_file(a:bufnr) && s:not_git_dir(a:bufnr)
FUNCTION <SNR>35_unc_path()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/utility.vim:168
Called 1 time
Total time: 0.000040
Self time: 0.000010
count total (s) self (s)
1 0.000040 0.000010 return s:abs_path(a:bufnr, 0) =~ '^\\\\'
FUNCTION <SNR>24_LocalBrowse()
Defined: /usr/share/vim/vim82/plugin/netrwPlugin.vim:102
Called 23 times
Total time: 0.002399
Self time: 0.002399
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.
23 0.000268 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
23 0.000048 endif
" call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered=".s:vimentered.")")
23 0.000160 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
23 0.000253 elseif isdirectory(a:dirname)
" call Decho("(LocalBrowse) dirname<".a:dirname."> ft=".&ft." (isdirectory, not amiga)")
" call Dredir("LocalBrowse ft last set: ","verbose set ft")
sil! call netrw#LocalBrowseCheck(a:dirname)
if exists("w:netrw_bannercnt") && line('.') < w:netrw_bannercnt
exe w:netrw_bannercnt
endif
23 0.000041 else
" not a directory, ignore it
" call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...")
23 0.000036 endif
" call Dret("s:LocalBrowse")
FUNCTION <SNR>23_Highlight_Matching_Pair()
Defined: /usr/share/vim/vim82/plugin/matchparen.vim:40
Called 19 times
Total time: 0.006025
Self time: 0.005400
count total (s) self (s)
" Remove any previous match.
19 0.001144 0.000519 call s:Remove_Matches()
" Avoid that we remove the popup menu.
" Return when there are no colors (looks like the cursor jumps).
19 0.000315 if pumvisible() || (&t_Co < 8 && !has("gui_running"))
return
19 0.000049 endif
" Get the character under the cursor and check if it's in 'matchpairs'.
19 0.000208 let c_lnum = line('.')
19 0.000174 let c_col = col('.')
19 0.000099 let before = 0
19 0.000190 let text = getline(c_lnum)
19 0.000946 let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)')
19 0.000172 if empty(matches)
let [c_before, c] = ['', '']
19 0.000053 else
19 0.000307 let [c_before, c] = matches[1:2]
19 0.000053 endif
19 0.000707 let plist = split(&matchpairs, '.\zs[:,]')
19 0.000220 let i = index(plist, c)
19 0.000107 if i < 0
" not found, in Insert mode try character before the cursor
19 0.000219 if c_col > 1 && (mode() == 'i' || mode() == 'R')
let before = strlen(c_before)
let c = c_before
let i = index(plist, c)
19 0.000041 endif
19 0.000072 if i < 0
" not found, nothing to do
19 0.000104 return
endif
endif
" Figure out the arguments for searchpairpos().
if i % 2 == 0
let s_flags = 'nW'
let c2 = plist[i + 1]
else
let s_flags = 'nbW'
let c2 = c
let c = plist[i - 1]
endif
if c == '['
let c = '\['
let c2 = '\]'
endif
" Find the match. When it was just before the cursor move it there for a
" moment.
if before > 0
let has_getcurpos = exists("*getcurpos")
if has_getcurpos
" getcurpos() is more efficient but doesn't exist before 7.4.313.
let save_cursor = getcurpos()
else
let save_cursor = winsaveview()
endif
call cursor(c_lnum, c_col - before)
endif
if !has("syntax") || !exists("g:syntax_on")
let s_skip = "0"
else
" Build an expression that detects whether the current cursor position is
" in certain syntax types (string, comment, etc.), for use as
" searchpairpos()'s skip argument.
" We match "escape" for special items, such as lispEscapeSpecial.
let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))'
" If executing the expression determines that the cursor is currently in
" one of the syntax types, then we want searchpairpos() to find the pair
" within those syntax types (i.e., not skip). Otherwise, the cursor is
" outside of the syntax types and s_skip should keep its value so we skip
" any matching pair inside the syntax types.
" Catch if this throws E363: pattern uses more memory than 'maxmempattern'.
try
execute 'if ' . s_skip . ' | let s_skip = "0" | endif'
catch /^Vim\%((\a\+)\)\=:E363/
" We won't find anything, so skip searching, should keep Vim responsive.
return
endtry
endif
" Limit the search to lines visible in the window.
let stoplinebottom = line('w$')
let stoplinetop = line('w0')
if i % 2 == 0
let stopline = stoplinebottom
else
let stopline = stoplinetop
endif
" Limit the search time to 300 msec to avoid a hang on very long lines.
" This fails when a timeout is not supported.
if mode() == 'i' || mode() == 'R'
let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout
else
let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout
endif
try
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout)
catch /E118/
" Can't use the timeout, restrict the stopline a bit more to avoid taking
" a long time on closed folds and long lines.
" The "viewable" variables give a range in which we can scroll while
" keeping the cursor at the same position.
" adjustedScrolloff accounts for very large numbers of scrolloff.
let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2])
let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2])
let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2])
" one of these stoplines will be adjusted below, but the current values are
" minimal boundaries within the current window
if i % 2 == 0
if has("byte_offset") && has("syntax_items") && &smc > 0
let stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2])
let stopline = min([bottom_viewable, byte2line(stopbyte)])
else
let stopline = min([bottom_viewable, c_lnum + 100])
endif
let stoplinebottom = stopline
else
if has("byte_offset") && has("syntax_items") && &smc > 0
let stopbyte = max([1, line2byte(".") + col(".") - &smc * 2])
let stopline = max([top_viewable, byte2line(stopbyte)])
else
let stopline = max([top_viewable, c_lnum - 100])
endif
let stoplinetop = stopline
endif
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline)
endtry
if before > 0
if has_getcurpos
call setpos('.', save_cursor)
else
call winrestview(save_cursor)
endif
endif
" If a match is found setup match highlighting.
if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom
if exists('*matchaddpos')
call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3)
else
exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/'
endif
let w:paren_hl_on = 1
endif
FUNCTION <SNR>56_build_command()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/async.vim:40
Called 1 time
Total time: 0.000006
Self time: 0.000006
count total (s) self (s)
1 0.000003 if has('unix')
1 0.000003 return ['sh', '-c', a:cmd]
endif
if has('win32')
return has('nvim') ? ['cmd.exe', '/c', a:cmd] : 'cmd.exe /c '.a:cmd
endif
throw 'unknown os'
FUNCTION <SNR>69_save_marks()
Defined: ~/.vim/pack/bundle/start/traces/autoload/traces.vim:835
Called 2 times
Total time: 0.000315
Self time: 0.000315
count total (s) self (s)
2 0.000045 if !exists('s:buf[s:nr].marks')
2 0.000022 let types = ['[', ']']
2 0.000033 let s:buf[s:nr].marks = {}
6 0.000048 for mark in types
4 0.000099 let s:buf[s:nr].marks[mark] = getpos("'" . mark)
6 0.000030 endfor
2 0.000006 endif
FUNCTION <SNR>63_PollFileParseResponse()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:748
Called 2 times
Total time: 0.010362
Self time: 0.010362
count total (s) self (s)
2 0.003958 if !py3eval( "ycm_state.FileParseRequestReady()" )
let s:pollers.file_parse_response.id = timer_start( s:pollers.file_parse_response.wait_milliseconds, function( 's:PollFileParseResponse' ) )
return
2 0.000006 endif
2 0.006071 py3 ycm_state.HandleFileParseRequest()
2 0.000208 if py3eval( "ycm_state.ShouldResendFileParseRequest()" )
call s:OnFileReadyToParse( 1 )
2 0.000005 endif
FUNCTION <SNR>63_UpdateMatches()
Defined: ~/.vim/pack/bundle/start/YouCompleteMe/autoload/youcompleteme.vim:703
Called 38 times
Total time: 0.007733
Self time: 0.007733
count total (s) self (s)
38 0.007663 py3 ycm_state.UpdateMatches()
FUNCTION gitgutter#utility#getbufvar()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/utility.vim:18
Called 4405 times
Total time: 0.352438
Self time: 0.352438
count total (s) self (s)
4405 0.210466 let dict = get(getbufvar(a:buffer, ''), 'gitgutter', {})
4405 0.066857 if has_key(dict, a:varname)
4403 0.052188 return dict[a:varname]
2 0.000002 else
2 0.000003 if a:0
return a:1
2 0.000002 endif
2 0.000001 endif
FUNCTION <lambda>54()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter/utility.vim:120
Called 1 time
Total time: 0.000359
Self time: 0.000154
count total (s) self (s)
return gitgutter#utility#setbufvar(bufnr, 'path', s:strip_trailing_new_line(path))
FUNCTION <SNR>55_uniq()
Defined: ~/.vim/pack/bundle/start/gitgutter/autoload/gitgutter.vim:100
Called 1 time
Total time: 0.000040
Self time: 0.000040
count total (s) self (s)
1 0.000037 return uniq(sort(a:list))
FUNCTION <SNR>70_Initialised()
Defined: ~/.vim/pack/bundle/start/vimspector/autoload/vimspector.vim:32
Called 6 times
Total time: 0.000061
Self time: 0.000061
count total (s) self (s)
6 0.000048 return s:enabled != v:null
FUNCTION vimspector#internal#job#Send()
Defined: ~/.vim/pack/bundle/start/vimspector/autoload/vimspector/internal/job.vim:107
Called 10 times
Total time: 0.001618
Self time: 0.001618
count total (s) self (s)
10 0.000141 if ! exists( 's:job' )
echom "Can't send message: Job was not initialised correctly"
redraw
return 0
10 0.000018 endif
10 0.000162 if job_status( s:job ) !=# 'run'
echom "Can't send message: Job is not running"
redraw
return 0
10 0.000015 endif
10 0.000099 let ch = job_getchannel( s:job )
10 0.000092 if ch ==# 'channel fail'
echom 'Channel was closed unexpectedly!'
redraw
return 0
10 0.000014 endif
10 0.000672 call ch_sendraw( ch, a:msg )
10 0.000046 return 1
FUNCTIONS SORTED ON TOTAL TIME
count total (s) self (s) function
13 24.388538 0.121767 <SNR>72__OnServerData()
24 24.204848 0.002111 gitgutter#process_buffer()
1 24.198689 23.544511 gitgutter#diff#run_diff()
4399 0.645807 0.293500 gitgutter#utility#repo_path()
4405 0.352438 gitgutter#utility#getbufvar()
1 0.307224 0.130749 vimspector#Continue()
7 0.199649 UltiSnips#SnippetsInCurrentScope()
22 0.151223 0.013614 <SNR>63_OnBufferEnter()
3 0.103974 0.014019 <SNR>63_OnFileTypeSet()
14 0.050315 0.012253 traces#init()
1 0.039140 0.000598 vimspector#ToggleBreakpoint()
4 0.038688 0.001137 <SNR>70_Enabled()
1 0.037114 vimspector#internal#state#Reset()
14 0.029528 0.003583 <SNR>69_evaluate_cmdl()
7 0.021901 0.020362 <SNR>63_OnFileReadyToParse()
12 0.013701 0.012734 <SNR>63_OnBufferUnload()
14 0.011259 0.008595 <SNR>69_parse_range()
2 0.010362 <SNR>63_PollFileParseResponse()
14 0.009975 0.001969 <SNR>69_parse_command()
47 0.008047 0.002038 gitgutter#utility#is_active()
FUNCTIONS SORTED ON SELF TIME
count total (s) self (s) function
1 24.198689 23.544511 gitgutter#diff#run_diff()
4405 0.352438 gitgutter#utility#getbufvar()
4399 0.645807 0.293500 gitgutter#utility#repo_path()
7 0.199649 UltiSnips#SnippetsInCurrentScope()
1 0.307224 0.130749 vimspector#Continue()
13 24.388538 0.121767 <SNR>72__OnServerData()
1 0.037114 vimspector#internal#state#Reset()
7 0.021901 0.020362 <SNR>63_OnFileReadyToParse()
3 0.103974 0.014019 <SNR>63_OnFileTypeSet()
22 0.151223 0.013614 <SNR>63_OnBufferEnter()
12 0.013701 0.012734 <SNR>63_OnBufferUnload()
14 0.050315 0.012253 traces#init()
2 0.010362 <SNR>63_PollFileParseResponse()
14 0.011259 0.008595 <SNR>69_parse_range()
38 0.007733 <SNR>63_UpdateMatches()
14 0.008006 0.007096 <SNR>69_get_command()
22 0.006608 neomake#highlights#ShowHighlights()
3 0.007088 0.006486 <SNR>63_ReceiveMessages()
1 0.006223 0.006149 <SNR>63_OnVimLeave()
3 0.006774 0.006060 <SNR>6_LoadFTPlugin()
#0 0x00007fdb68d98125 in clock_nanosleep@GLIBC_2.2.5 () at /usr/lib/libc.so.6
#1 0x00007fdb68d9d357 in nanosleep () at /usr/lib/libc.so.6
#2 0x000055be38c999be in ()
#3 0x000055be38bf02b1 in do_sleep ()
#4 0x000055be38bf512d in do_cmdline ()
#5 0x000055be38d5e5c7 in ()
#6 0x000055be38d5ec19 in call_user_func_check ()
#7 0x000055be38d5f12d in call_func ()
#8 0x000055be38d5f750 in get_func_tv ()
#9 0x000055be38bbc315 in ()
#10 0x000055be38bc1db8 in ()
#11 0x000055be38bc2494 in ()
#12 0x000055be38bc2b3c in ()
#13 0x000055be38bc32c2 in ()
#14 0x000055be38bc45a0 in eval0 ()
#15 0x000055be38bd9169 in ex_let ()
#16 0x000055be38bf512d in do_cmdline ()
#17 0x000055be38d5e5c7 in ()
#18 0x000055be38d5ec19 in call_user_func_check ()
#19 0x000055be38d5f12d in call_func ()
#20 0x000055be38d5f750 in get_func_tv ()
#21 0x000055be38d5fdf7 in ex_call ()
#22 0x000055be38bf512d in do_cmdline ()
#23 0x000055be38b794d8 in ()
#24 0x000055be38b7a6a8 in apply_autocmds_retval ()
#25 0x000055be38b83ffc in open_buffer ()
#26 0x000055be38b83da1 in ()
#27 0x000055be38b84998 in set_curbuf ()
#28 0x000055be38b84b87 in do_buffer ()
#29 0x000055be38dceb48 in ()
#30 0x00007fdb67e5f66b in PyObject_SetAttr () at /usr/lib/libpython3.9.so.1.0
#31 0x00007fdb67e6b81c in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0
#32 0x00007fdb67e7baaa in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0
#33 0x00007fdb67e6f681 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0
#34 0x00007fdb67e7baaa in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0
#35 0x00007fdb67e6b272 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0
#36 0x00007fdb67e69b0d in () at /usr/lib/libpython3.9.so.1.0
#37 0x00007fdb67e7bc4e in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0
#38 0x00007fdb67e6d919 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0
#39 0x00007fdb67e6a32f in () at /usr/lib/libpython3.9.so.1.0
#40 0x00007fdb67e7bc4e in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0
#41 0x00007fdb67e6b272 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0
#42 0x00007fdb67e6a32f in () at /usr/lib/libpython3.9.so.1.0
#43 0x00007fdb67e7bc4e in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0
#44 0x00007fdb67e6b03a in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0
#45 0x00007fdb67e6a32f in () at /usr/lib/libpython3.9.so.1.0
#46 0x00007fdb67e7bc4e in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0
#47 0x00007fdb67e6b272 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0
#48 0x00007fdb67e6a32f in () at /usr/lib/libpython3.9.so.1.0
#49 0x00007fdb67e7bc4e in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0
#50 0x00007fdb67e6f681 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0
#51 0x00007fdb67e7baaa in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0
#52 0x00007fdb67e6b272 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0
#53 0x00007fdb67e7baaa in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0
#54 0x00007fdb67e6b272 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0
#55 0x00007fdb67e7baaa in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0
#56 0x00007fdb67e6b272 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0
#57 0x00007fdb67e7baaa in _PyFunction_Vectorcall () at /usr/lib/libpython3.9.so.1.0
#58 0x00007fdb67e6b272 in _PyEval_EvalFrameDefault () at /usr/lib/libpython3.9.so.1.0
#59 0x00007fdb67e69b0d in () at /usr/lib/libpython3.9.so.1.0
#60 0x00007fdb67e694d1 in _PyEval_EvalCodeWithName () at /usr/lib/libpython3.9.so.1.0
#61 0x00007fdb67f2b513 in PyEval_EvalCode () at /usr/lib/libpython3.9.so.1.0
#62 0x00007fdb67f3b9ad in () at /usr/lib/libpython3.9.so.1.0
#63 0x00007fdb67f3721b in () at /usr/lib/libpython3.9.so.1.0
#64 0x00007fdb67f2fce0 in PyRun_StringFlags () at /usr/lib/libpython3.9.so.1.0
#65 0x000055be38dcba09 in ()
#66 0x000055be38dcc09c in ()
#67 0x000055be38dd628a in ex_py3 ()
#68 0x000055be38bf512d in do_cmdline ()
#69 0x000055be38d5e5c7 in ()
#70 0x000055be38d5ec19 in call_user_func_check ()
#71 0x000055be38d5f12d in call_func ()
#72 0x000055be38d5f9e7 in call_callback ()
#73 0x000055be38de8d54 in ()
#74 0x000055be38deb597 in channel_parse_messages ()
#75 0x000055be38c1bcaf in parse_queued_messages ()
#76 0x000055be38d4e1f6 in inchar_loop ()
#77 0x000055be38d4dafc in ui_inchar ()
#78 0x000055be38c1c128 in ()
#79 0x000055be38c1cdec in ()
#80 0x000055be38c1e736 in vgetc ()
#81 0x000055be38c1eca9 in safe_vgetc ()
#82 0x000055be38c7c894 in normal_cmd ()
#83 0x000055be38df8e3c in main_loop ()
#84 0x000055be38dfa0fc in vim_main2 ()
#85 0x00007fdb68cf8b25 in __libc_start_main () at /usr/lib/libc.so.6
#86 0x000055be38b74fce in _start ()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment