Last active
October 3, 2017 11:39
-
-
Save meritozh/9fcf49be001c837fbe6f42be27d1dff5 to your computer and use it in GitHub Desktop.
vim profile for a strange slowness experience when use YCM with preview window
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SCRIPT /usr/local/Cellar/macvim/8.0-137_2/MacVim.app/Contents/Resources/vim/runtime/syntax/cpp.vim | |
Sourced 1 time | |
Total time: 0.004365 | |
Self time: 0.000759 | |
count total (s) self (s) | |
" Vim syntax file | |
" Language: C++ | |
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp) | |
" Previous Maintainer: Ken Shan <[email protected]> | |
" Last Change: 2017 Jun 05 | |
" quit when a syntax file was already loaded | |
1 0.000010 if exists("b:current_syntax") | |
finish | |
endif | |
" Read the C syntax to start with | |
1 0.000250 runtime! syntax/c.vim | |
1 0.000004 unlet b:current_syntax | |
" C++ extensions | |
1 0.000008 syn keyword cppStatement new delete this friend using | |
1 0.000005 syn keyword cppAccess public protected private | |
1 0.000005 syn keyword cppModifier inline virtual explicit export | |
1 0.000003 syn keyword cppType bool wchar_t | |
1 0.000004 syn keyword cppExceptions throw try catch | |
1 0.000004 syn keyword cppOperator operator typeid | |
1 0.000008 syn keyword cppOperator and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq | |
1 0.000014 syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1 | |
1 0.000010 syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$" | |
1 0.000004 syn keyword cppStorageClass mutable | |
1 0.000004 syn keyword cppStructure class typename template namespace | |
1 0.000004 syn keyword cppBoolean true false | |
1 0.000003 syn keyword cppConstant __cplusplus | |
" C++ 11 extensions | |
1 0.000006 if !exists("cpp_no_cpp11") | |
1 0.000005 syn keyword cppModifier override final | |
1 0.000003 syn keyword cppType nullptr_t auto | |
1 0.000003 syn keyword cppExceptions noexcept | |
1 0.000004 syn keyword cppStorageClass constexpr decltype thread_local | |
1 0.000004 syn keyword cppConstant nullptr | |
1 0.000003 syn keyword cppConstant ATOMIC_FLAG_INIT ATOMIC_VAR_INIT | |
1 0.000004 syn keyword cppConstant ATOMIC_BOOL_LOCK_FREE ATOMIC_CHAR_LOCK_FREE | |
1 0.000004 syn keyword cppConstant ATOMIC_CHAR16_T_LOCK_FREE ATOMIC_CHAR32_T_LOCK_FREE | |
1 0.000004 syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE | |
1 0.000004 syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE | |
1 0.000004 syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE | |
1 0.000055 syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell | |
1 0.000002 endif | |
" C++ 14 extensions | |
1 0.000005 if !exists("cpp_no_cpp14") | |
1 0.000003 syn case ignore | |
1 0.000011 syn match cppNumber display "\<0b[01]\('\=[01]\+\)*\(u\=l\{0,2}\|ll\=u\)\>" | |
1 0.000014 syn match cppNumber display "\<[1-9]\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>" contains=cFloat | |
1 0.000013 syn match cppNumber display "\<0x\x\('\=\x\+\)*\(u\=l\{0,2}\|ll\=u\)\>" | |
1 0.000003 syn case match | |
1 0.000001 endif | |
" The minimum and maximum operators in GNU C++ | |
1 0.000005 syn match cppMinMax "[<>]?" | |
" Default highlighting | |
1 0.000005 hi def link cppAccess cppStatement | |
1 0.000003 hi def link cppCast cppStatement | |
1 0.000016 hi def link cppExceptions Exception | |
1 0.000010 hi def link cppOperator Operator | |
1 0.000009 hi def link cppStatement Statement | |
1 0.000010 hi def link cppModifier Type | |
1 0.000009 hi def link cppType Type | |
1 0.000009 hi def link cppStorageClass StorageClass | |
1 0.000009 hi def link cppStructure Structure | |
1 0.000009 hi def link cppBoolean Boolean | |
1 0.000009 hi def link cppConstant Constant | |
1 0.000010 hi def link cppRawStringDelimiter Delimiter | |
1 0.000009 hi def link cppRawString String | |
1 0.000009 hi def link cppNumber Number | |
1 0.000006 let b:current_syntax = "cpp" | |
" vim: ts=8 | |
SCRIPT /usr/local/Cellar/macvim/8.0-137_2/MacVim.app/Contents/Resources/vim/runtime/syntax/c.vim | |
Sourced 1 time | |
Total time: 0.003582 | |
Self time: 0.003582 | |
count total (s) self (s) | |
" Vim syntax file | |
" Language: C | |
" Maintainer: Bram Moolenaar <[email protected]> | |
" Last Change: 2017 Apr 30 | |
" Quit when a (custom) syntax file was already loaded | |
1 0.000008 if exists("b:current_syntax") | |
finish | |
endif | |
1 0.000013 let s:cpo_save = &cpo | |
1 0.000017 set cpo&vim | |
1 0.000021 let s:ft = matchstr(&ft, '^\([^.]\)\+') | |
" A bunch of useful C keywords | |
1 0.000019 syn keyword cStatement goto break return continue asm | |
1 0.000005 syn keyword cLabel case default | |
1 0.000005 syn keyword cConditional if else switch | |
1 0.000005 syn keyword cRepeat while for do | |
1 0.000006 syn keyword cTodo contained TODO FIXME XXX | |
" It's easy to accidentally add a space after a backslash that was intended | |
" for line continuation. Some compilers allow it, which makes it | |
" unpredictable and should be avoided. | |
1 0.000010 syn match cBadContinuation contained "\\\s\+$" | |
" cCommentGroup allows adding matches for special things in comments | |
1 0.000013 syn cluster cCommentGroup contains=cTodo,cBadContinuation | |
" String and Character constants | |
" Highlight special characters (those which have a backslash) differently | |
1 0.000011 syn match cSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" | |
1 0.000007 if !exists("c_no_utf") | |
1 0.000010 syn match cSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)" | |
1 0.000002 endif | |
1 0.000005 if !exists("c_no_cformat") | |
" Highlight % items in strings. | |
1 0.000004 if !exists("c_no_c99") " ISO C99 | |
1 0.000019 syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained | |
1 0.000002 else | |
syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained | |
endif | |
1 0.000006 syn match cFormat display "%%" contained | |
1 0.000002 endif | |
" cCppString: same as cString, but ends at end of line | |
1 0.000008 if s:ft ==# "cpp" && !exists("cpp_no_cpp11") && !exists("c_no_cformat") | |
" ISO C++11 | |
1 0.000028 syn region cString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend | |
1 0.000029 syn region cCppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell | |
1 0.000006 elseif s:ft ==# "c" && !exists("c_no_c11") && !exists("c_no_cformat") | |
" ISO C99 | |
syn region cString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend | |
syn region cCppString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell | |
else | |
" older C or C++ | |
syn match cFormat display "%%" contained | |
syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend | |
syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell | |
endif | |
1 0.000025 syn region cCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppSkip | |
1 0.000011 syn cluster cStringGroup contains=cCppString,cCppSkip | |
1 0.000007 syn match cCharacter "L\='[^\\]'" | |
1 0.000011 syn match cCharacter "L'[^']*'" contains=cSpecial | |
1 0.000005 if exists("c_gnu") | |
syn match cSpecialError "L\='\\[^'\"?\\abefnrtv]'" | |
syn match cSpecialCharacter "L\='\\['\"?\\abefnrtv]'" | |
else | |
1 0.000008 syn match cSpecialError "L\='\\[^'\"?\\abfnrtv]'" | |
1 0.000009 syn match cSpecialCharacter "L\='\\['\"?\\abfnrtv]'" | |
1 0.000001 endif | |
1 0.000008 syn match cSpecialCharacter display "L\='\\\o\{1,3}'" | |
1 0.000007 syn match cSpecialCharacter display "'\\x\x\{1,2}'" | |
1 0.000007 syn match cSpecialCharacter display "L'\\x\x\+'" | |
1 0.000010 if (s:ft ==# "c" && !exists("c_no_c11")) || (s:ft ==# "cpp" && !exists("cpp_no_cpp11")) | |
" ISO C11 or ISO C++ 11 | |
1 0.000004 if exists("c_no_cformat") | |
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell extend | |
else | |
1 0.000022 syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend | |
1 0.000002 endif | |
1 0.000007 syn match cCharacter "[Uu]'[^\\]'" | |
1 0.000011 syn match cCharacter "[Uu]'[^']*'" contains=cSpecial | |
1 0.000004 if exists("c_gnu") | |
syn match cSpecialError "[Uu]'\\[^'\"?\\abefnrtv]'" | |
syn match cSpecialCharacter "[Uu]'\\['\"?\\abefnrtv]'" | |
else | |
1 0.000008 syn match cSpecialError "[Uu]'\\[^'\"?\\abfnrtv]'" | |
1 0.000008 syn match cSpecialCharacter "[Uu]'\\['\"?\\abfnrtv]'" | |
1 0.000002 endif | |
1 0.000008 syn match cSpecialCharacter display "[Uu]'\\\o\{1,3}'" | |
1 0.000007 syn match cSpecialCharacter display "[Uu]'\\x\x\+'" | |
1 0.000002 endif | |
"when wanted, highlight trailing white space | |
1 0.000005 if exists("c_space_errors") | |
if !exists("c_no_trail_space_error") | |
syn match cSpaceError display excludenl "\s\+$" | |
endif | |
if !exists("c_no_tab_space_error") | |
syn match cSpaceError display " \+\t"me=e-1 | |
endif | |
endif | |
" This should be before cErrInParen to avoid problems with #define ({ xxx }) | |
1 0.000004 if exists("c_curly_error") | |
syn match cCurlyError "}" | |
syn region cBlock start="{" end="}" contains=ALLBUT,cBadBlock,cCurlyError,@cParenGroup,cErrInParen,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell fold | |
else | |
1 0.000009 syn region cBlock start="{" end="}" transparent fold | |
1 0.000002 endif | |
" Catch errors caused by wrong parenthesis and brackets. | |
" Also accept <% for {, %> for }, <: for [ and :> for ] (C99) | |
" But avoid matching <::. | |
1 0.000058 syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserLabel,cBitField,cOctalZero,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom | |
1 0.000006 if exists("c_no_curly_error") | |
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11") | |
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell | |
" cCppParen: same as cParen but ends at end-of-line; used in cDefine | |
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell | |
syn match cParenError display ")" | |
syn match cErrInParen display contained "^^<%\|^%>" | |
else | |
syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,@cStringGroup,@Spell | |
" cCppParen: same as cParen but ends at end-of-line; used in cDefine | |
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell | |
syn match cParenError display ")" | |
syn match cErrInParen display contained "^[{}]\|^<%\|^%>" | |
endif | |
elseif exists("c_no_bracket_error") | |
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11") | |
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell | |
" cCppParen: same as cParen but ends at end-of-line; used in cDefine | |
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell | |
syn match cParenError display ")" | |
syn match cErrInParen display contained "<%\|%>" | |
else | |
syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,@cStringGroup,@Spell | |
" cCppParen: same as cParen but ends at end-of-line; used in cDefine | |
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell | |
syn match cParenError display ")" | |
syn match cErrInParen display contained "[{}]\|<%\|%>" | |
endif | |
else | |
1 0.000007 if s:ft ==# 'cpp' && !exists("cpp_no_cpp11") | |
1 0.000026 syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell | |
" cCppParen: same as cParen but ends at end-of-line; used in cDefine | |
1 0.000033 syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell | |
1 0.000007 syn match cParenError display "[\])]" | |
1 0.000006 syn match cErrInParen display contained "<%\|%>" | |
1 0.000025 syn region cBracket transparent start='\[\|<::\@!' end=']\|:>' contains=ALLBUT,@cParenGroup,cErrInParen,cCppParen,cCppBracket,@cStringGroup,@Spell | |
1 0.000002 else | |
syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell | |
" cCppParen: same as cParen but ends at end-of-line; used in cDefine | |
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell | |
syn match cParenError display "[\])]" | |
syn match cErrInParen display contained "[\]{}]\|<%\|%>" | |
syn region cBracket transparent start='\[\|<::\@!' end=']\|:>' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cErrInParen,cCppParen,cCppBracket,@cStringGroup,@Spell | |
endif | |
" cCppBracket: same as cParen but ends at end-of-line; used in cDefine | |
1 0.000033 syn region cCppBracket transparent start='\[\|<::\@!' skip='\\$' excludenl end=']\|:>' end='$' contained contains=ALLBUT,@cParenGroup,cErrInParen,cParen,cBracket,cString,@Spell | |
1 0.000009 syn match cErrInBracket display contained "[);{}]\|<%\|%>" | |
1 0.000002 endif | |
1 0.000007 if s:ft ==# 'c' || exists("cpp_no_cpp11") | |
syn region cBadBlock keepend start="{" end="}" contained containedin=cParen,cBracket,cBadBlock transparent fold | |
endif | |
"integer number, or floating point number without a dot and with "f". | |
1 0.000003 syn case ignore | |
1 0.000019 syn match cNumbers display transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctalError,cOctal | |
" Same, but without octal error (for comments) | |
1 0.000015 syn match cNumbersCom display contained transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctal | |
1 0.000010 syn match cNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" | |
"hex number | |
1 0.000009 syn match cNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" | |
" Flag the first zero of an octal number as something special | |
1 0.000012 syn match cOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero | |
1 0.000007 syn match cOctalZero display contained "\<0" | |
1 0.000006 syn match cFloat display contained "\d\+f" | |
"floating point number, with dot, optional exponent | |
1 0.000009 syn match cFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" | |
"floating point number, starting with a dot, optional exponent | |
1 0.000008 syn match cFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" | |
"floating point number, without dot, with exponent | |
1 0.000007 syn match cFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" | |
1 0.000006 if !exists("c_no_c99") | |
"hexadecimal floating point number, optional leading digits, with dot, with exponent | |
1 0.000008 syn match cFloat display contained "0x\x*\.\x\+p[-+]\=\d\+[fl]\=\>" | |
"hexadecimal floating point number, with leading digits, optional dot, with exponent | |
1 0.000008 syn match cFloat display contained "0x\x\+\.\=p[-+]\=\d\+[fl]\=\>" | |
1 0.000002 endif | |
" flag an octal number with wrong digits | |
1 0.000007 syn match cOctalError display contained "0\o*[89]\d*" | |
1 0.000002 syn case match | |
1 0.000005 if exists("c_comment_strings") | |
" A comment can contain cString, cCharacter and cNumber. | |
" But a "*/" inside a cString in a cComment DOES end the comment! So we | |
" need to use a special type of cString: cCommentString, which also ends on | |
" "*/", and sees a "*" at the start of the line as comment again. | |
" Unfortunately this doesn't very well work for // type of comments :-( | |
syn match cCommentSkip contained "^\s*\*\($\|\s\+\)" | |
syn region cCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=cSpecial,cCommentSkip | |
syn region cComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=cSpecial | |
syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError,@Spell | |
if exists("c_no_comment_fold") | |
" Use "extend" here to have preprocessor lines not terminate halfway a | |
" comment. | |
syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cCommentString,cCharacter,cNumbersCom,cSpaceError,@Spell extend | |
else | |
syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cCommentString,cCharacter,cNumbersCom,cSpaceError,@Spell fold extend | |
endif | |
else | |
1 0.000021 syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cSpaceError,@Spell | |
1 0.000005 if exists("c_no_comment_fold") | |
syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cSpaceError,@Spell extend | |
else | |
1 0.000021 syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cSpaceError,@Spell fold extend | |
1 0.000002 endif | |
1 0.000002 endif | |
" keep a // comment separately, it terminates a preproc. conditional | |
1 0.000006 syn match cCommentError display "\*/" | |
1 0.000006 syn match cCommentStartError display "/\*"me=e-1 contained | |
1 0.000015 syn keyword cOperator sizeof | |
1 0.000005 if exists("c_gnu") | |
syn keyword cStatement __asm__ | |
syn keyword cOperator typeof __real__ __imag__ | |
endif | |
1 0.000005 syn keyword cType int long short char void | |
1 0.000005 syn keyword cType signed unsigned float double | |
1 0.000006 if !exists("c_no_ansi") || exists("c_ansi_typedefs") | |
1 0.000007 syn keyword cType size_t ssize_t off_t wchar_t ptrdiff_t sig_atomic_t fpos_t | |
1 0.000006 syn keyword cType clock_t time_t va_list jmp_buf FILE DIR div_t ldiv_t | |
1 0.000009 syn keyword cType mbstate_t wctrans_t wint_t wctype_t | |
1 0.000001 endif | |
1 0.000004 if !exists("c_no_c99") " ISO C99 | |
1 0.000010 syn keyword cType _Bool bool _Complex complex _Imaginary imaginary | |
1 0.000005 syn keyword cType int8_t int16_t int32_t int64_t | |
1 0.000005 syn keyword cType uint8_t uint16_t uint32_t uint64_t | |
1 0.000004 if !exists("c_no_bsd") | |
" These are BSD specific. | |
1 0.000005 syn keyword cType u_int8_t u_int16_t u_int32_t u_int64_t | |
1 0.000002 endif | |
1 0.000004 syn keyword cType int_least8_t int_least16_t int_least32_t int_least64_t | |
1 0.000005 syn keyword cType uint_least8_t uint_least16_t uint_least32_t uint_least64_t | |
1 0.000004 syn keyword cType int_fast8_t int_fast16_t int_fast32_t int_fast64_t | |
1 0.000005 syn keyword cType uint_fast8_t uint_fast16_t uint_fast32_t uint_fast64_t | |
1 0.000003 syn keyword cType intptr_t uintptr_t | |
1 0.000004 syn keyword cType intmax_t uintmax_t | |
1 0.000001 endif | |
1 0.000004 if exists("c_gnu") | |
syn keyword cType __label__ __complex__ __volatile__ | |
endif | |
1 0.000010 syn keyword cStructure struct union enum typedef | |
1 0.000006 syn keyword cStorageClass static register auto volatile extern const | |
1 0.000003 if exists("c_gnu") | |
syn keyword cStorageClass inline __attribute__ | |
endif | |
1 0.000005 if !exists("c_no_c99") && s:ft !=# 'cpp' | |
syn keyword cStorageClass inline restrict | |
endif | |
1 0.000004 if !exists("c_no_c11") | |
1 0.000004 syn keyword cStorageClass _Alignas alignas | |
1 0.000008 syn keyword cOperator _Alignof alignof | |
1 0.000004 syn keyword cStorageClass _Atomic | |
1 0.000006 syn keyword cOperator _Generic | |
1 0.000005 syn keyword cStorageClass _Noreturn noreturn | |
1 0.000007 syn keyword cOperator _Static_assert static_assert | |
1 0.000004 syn keyword cStorageClass _Thread_local thread_local | |
1 0.000005 syn keyword cType char16_t char32_t | |
1 0.000001 endif | |
1 0.000007 if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu") | |
1 0.000003 if exists("c_gnu") | |
syn keyword cConstant __GNUC__ __FUNCTION__ __PRETTY_FUNCTION__ __func__ | |
endif | |
1 0.000005 syn keyword cConstant __LINE__ __FILE__ __DATE__ __TIME__ __STDC__ | |
1 0.000004 syn keyword cConstant __STDC_VERSION__ | |
1 0.000004 syn keyword cConstant CHAR_BIT MB_LEN_MAX MB_CUR_MAX | |
1 0.000005 syn keyword cConstant UCHAR_MAX UINT_MAX ULONG_MAX USHRT_MAX | |
1 0.000004 syn keyword cConstant CHAR_MIN INT_MIN LONG_MIN SHRT_MIN | |
1 0.000005 syn keyword cConstant CHAR_MAX INT_MAX LONG_MAX SHRT_MAX | |
1 0.000004 syn keyword cConstant SCHAR_MIN SINT_MIN SLONG_MIN SSHRT_MIN | |
1 0.000005 syn keyword cConstant SCHAR_MAX SINT_MAX SLONG_MAX SSHRT_MAX | |
1 0.000005 if !exists("c_no_c99") | |
1 0.000004 syn keyword cConstant __func__ __VA_ARGS__ | |
1 0.000004 syn keyword cConstant LLONG_MIN LLONG_MAX ULLONG_MAX | |
1 0.000004 syn keyword cConstant INT8_MIN INT16_MIN INT32_MIN INT64_MIN | |
1 0.000006 syn keyword cConstant INT8_MAX INT16_MAX INT32_MAX INT64_MAX | |
1 0.000004 syn keyword cConstant UINT8_MAX UINT16_MAX UINT32_MAX UINT64_MAX | |
1 0.000005 syn keyword cConstant INT_LEAST8_MIN INT_LEAST16_MIN INT_LEAST32_MIN INT_LEAST64_MIN | |
1 0.000004 syn keyword cConstant INT_LEAST8_MAX INT_LEAST16_MAX INT_LEAST32_MAX INT_LEAST64_MAX | |
1 0.000005 syn keyword cConstant UINT_LEAST8_MAX UINT_LEAST16_MAX UINT_LEAST32_MAX UINT_LEAST64_MAX | |
1 0.000005 syn keyword cConstant INT_FAST8_MIN INT_FAST16_MIN INT_FAST32_MIN INT_FAST64_MIN | |
1 0.000017 syn keyword cConstant INT_FAST8_MAX INT_FAST16_MAX INT_FAST32_MAX INT_FAST64_MAX | |
1 0.000016 syn keyword cConstant UINT_FAST8_MAX UINT_FAST16_MAX UINT_FAST32_MAX UINT_FAST64_MAX | |
1 0.000013 syn keyword cConstant INTPTR_MIN INTPTR_MAX UINTPTR_MAX | |
1 0.000012 syn keyword cConstant INTMAX_MIN INTMAX_MAX UINTMAX_MAX | |
1 0.000015 syn keyword cConstant PTRDIFF_MIN PTRDIFF_MAX SIG_ATOMIC_MIN SIG_ATOMIC_MAX | |
1 0.000018 syn keyword cConstant SIZE_MAX WCHAR_MIN WCHAR_MAX WINT_MIN WINT_MAX | |
1 0.000002 endif | |
1 0.000027 syn keyword cConstant FLT_RADIX FLT_ROUNDS FLT_DIG FLT_MANT_DIG FLT_EPSILON DBL_DIG DBL_MANT_DIG DBL_EPSILON | |
1 0.000018 syn keyword cConstant LDBL_DIG LDBL_MANT_DIG LDBL_EPSILON FLT_MIN FLT_MAX FLT_MIN_EXP FLT_MAX_EXP FLT_MIN_10_EXP FLT_MAX_10_EXP | |
1 0.000008 syn keyword cConstant DBL_MIN DBL_MAX DBL_MIN_EXP DBL_MAX_EXP DBL_MIN_10_EXP DBL_MAX_10_EXP LDBL_MIN LDBL_MAX LDBL_MIN_EXP LDBL_MAX_EXP | |
1 0.000007 syn keyword cConstant LDBL_MIN_10_EXP LDBL_MAX_10_EXP HUGE_VAL CLOCKS_PER_SEC NULL LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY | |
1 0.000006 syn keyword cConstant LC_NUMERIC LC_TIME SIG_DFL SIG_ERR SIG_IGN SIGABRT SIGFPE SIGILL SIGHUP SIGINT SIGSEGV SIGTERM | |
" Add POSIX signals as well... | |
1 0.000008 syn keyword cConstant SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT SIGSEGV | |
1 0.000007 syn keyword cConstant SIGSTOP SIGTERM SIGTRAP SIGTSTP SIGTTIN SIGTTOU SIGUSR1 SIGUSR2 | |
1 0.000006 syn keyword cConstant _IOFBF _IOLBF _IONBF BUFSIZ EOF WEOF FOPEN_MAX FILENAME_MAX L_tmpnam | |
1 0.000007 syn keyword cConstant SEEK_CUR SEEK_END SEEK_SET TMP_MAX stderr stdin stdout EXIT_FAILURE EXIT_SUCCESS RAND_MAX | |
" POSIX 2001 | |
1 0.000006 syn keyword cConstant SIGBUS SIGPOLL SIGPROF SIGSYS SIGURG SIGVTALRM SIGXCPU SIGXFSZ | |
" non-POSIX signals | |
1 0.000005 syn keyword cConstant SIGWINCH SIGINFO | |
" Add POSIX errors as well. List comes from: | |
" http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html | |
1 0.000007 syn keyword cConstant E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY EBADF | |
1 0.000005 syn keyword cConstant EBADMSG EBUSY ECANCELED ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK | |
1 0.000006 syn keyword cConstant EDESTADDRREQ EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTUNREACH EIDRM EILSEQ | |
1 0.000006 syn keyword cConstant EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK EMSGSIZE | |
1 0.000005 syn keyword cConstant EMULTIHOP ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS ENODATA | |
1 0.000007 syn keyword cConstant ENODEV ENOENT ENOEXEC ENOLCK ENOLINK ENOMEM ENOMSG ENOPROTOOPT ENOSPC ENOSR | |
1 0.000007 syn keyword cConstant ENOSTR ENOSYS ENOTCONN ENOTDIR ENOTEMPTY ENOTRECOVERABLE ENOTSOCK ENOTSUP | |
1 0.000006 syn keyword cConstant ENOTTY ENXIO EOPNOTSUPP EOVERFLOW EOWNERDEAD EPERM EPIPE EPROTO | |
1 0.000006 syn keyword cConstant EPROTONOSUPPORT EPROTOTYPE ERANGE EROFS ESPIPE ESRCH ESTALE ETIME ETIMEDOUT | |
1 0.000005 syn keyword cConstant ETXTBSY EWOULDBLOCK EXDEV | |
" math.h | |
1 0.000005 syn keyword cConstant M_E M_LOG2E M_LOG10E M_LN2 M_LN10 M_PI M_PI_2 M_PI_4 | |
1 0.000005 syn keyword cConstant M_1_PI M_2_PI M_2_SQRTPI M_SQRT2 M_SQRT1_2 | |
1 0.000002 endif | |
1 0.000006 if !exists("c_no_c99") " ISO C99 | |
1 0.000005 syn keyword cConstant true false | |
1 0.000001 endif | |
" Accept %: for # (C99) | |
1 0.000052 syn region cPreCondit start="^\s*\zs\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError | |
1 0.000015 syn match cPreConditMatch display "^\s*\zs\(%:\|#\)\s*\(else\|endif\)\>" | |
1 0.000005 if !exists("c_no_if0") | |
1 0.000026 syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip | |
1 0.000026 syn region cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold | |
1 0.000020 syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse | |
1 0.000007 if !exists("c_no_if0_fold") | |
1 0.000029 syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold | |
1 0.000002 else | |
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell | |
endif | |
1 0.000019 syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit | |
1 0.000023 syn region cCppInWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold | |
1 0.000017 syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit | |
1 0.000006 if !exists("c_no_if0_fold") | |
1 0.000022 syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold | |
1 0.000002 else | |
syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 | |
endif | |
1 0.000025 syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell | |
1 0.000025 syn region cCppOutSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip | |
1 0.000032 syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc | |
1 0.000002 endif | |
1 0.000013 syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ | |
1 0.000008 syn match cIncluded display contained "<[^>]*>" | |
1 0.000015 syn match cInclude display "^\s*\zs\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded | |
"syn match cLineSkip "\\$" | |
1 0.000086 syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti,cBadBlock | |
1 0.000021 syn region cDefine start="^\s*\zs\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell | |
1 0.000022 syn region cPreProc start="^\s*\zs\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell | |
" Highlight User Labels | |
1 0.000071 syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString | |
1 0.000010 if s:ft ==# 'c' || exists("cpp_no_cpp11") | |
syn region cMulti transparent start='?' skip='::' end=':' contains=ALLBUT,@cMultiGroup,@Spell,@cStringGroup | |
endif | |
" Avoid matching foo::bar() in C++ by requiring that the next char is not ':' | |
1 0.000007 syn cluster cLabelGroup contains=cUserLabel | |
1 0.000011 syn match cUserCont display "^\s*\zs\I\i*\s*:$" contains=@cLabelGroup | |
1 0.000009 syn match cUserCont display ";\s*\zs\I\i*\s*:$" contains=@cLabelGroup | |
1 0.000004 if s:ft ==# 'cpp' | |
1 0.000013 syn match cUserCont display "^\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup | |
1 0.000013 syn match cUserCont display ";\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup | |
1 0.000002 else | |
syn match cUserCont display "^\s*\zs\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup | |
syn match cUserCont display ";\s*\zs\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup | |
endif | |
1 0.000006 syn match cUserLabel display "\I\i*" contained | |
" Avoid recognizing most bitfields as labels | |
1 0.000012 syn match cBitField display "^\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType | |
1 0.000012 syn match cBitField display ";\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType | |
1 0.000005 if exists("c_minlines") | |
let b:c_minlines = c_minlines | |
else | |
1 0.000003 if !exists("c_no_if0") | |
1 0.000014 let b:c_minlines = 50 " #if 0 constructs can be long | |
1 0.000001 else | |
let b:c_minlines = 15 " mostly for () constructs | |
endif | |
1 0.000001 endif | |
1 0.000004 if exists("c_curly_error") | |
syn sync fromstart | |
else | |
1 0.000016 exec "syn sync ccomment cComment minlines=" . b:c_minlines | |
1 0.000001 endif | |
" Define the default highlighting. | |
" Only used when an item doesn't have highlighting yet | |
1 0.000006 hi def link cFormat cSpecial | |
1 0.000004 hi def link cCppString cString | |
1 0.000004 hi def link cCommentL cComment | |
1 0.000004 hi def link cCommentStart cComment | |
1 0.000023 hi def link cLabel Label | |
1 0.000010 hi def link cUserLabel Label | |
1 0.000010 hi def link cConditional Conditional | |
1 0.000008 hi def link cRepeat Repeat | |
1 0.000009 hi def link cCharacter Character | |
1 0.000005 hi def link cSpecialCharacter cSpecial | |
1 0.000009 hi def link cNumber Number | |
1 0.000009 hi def link cOctal Number | |
1 0.000010 hi def link cOctalZero PreProc " link this to Error if you want | |
1 0.000009 hi def link cFloat Float | |
1 0.000004 hi def link cOctalError cError | |
1 0.000003 hi def link cParenError cError | |
1 0.000003 hi def link cErrInParen cError | |
1 0.000004 hi def link cErrInBracket cError | |
1 0.000003 hi def link cCommentError cError | |
1 0.000004 hi def link cCommentStartError cError | |
1 0.000004 hi def link cSpaceError cError | |
1 0.000004 hi def link cSpecialError cError | |
1 0.000004 hi def link cCurlyError cError | |
1 0.000012 hi def link cOperator Operator | |
1 0.000012 hi def link cStructure Structure | |
1 0.000009 hi def link cStorageClass StorageClass | |
1 0.000009 hi def link cInclude Include | |
1 0.000009 hi def link cPreProc PreProc | |
1 0.000008 hi def link cDefine Macro | |
1 0.000005 hi def link cIncluded cString | |
1 0.000008 hi def link cError Error | |
1 0.000010 hi def link cStatement Statement | |
1 0.000004 hi def link cCppInWrapper cCppOutWrapper | |
1 0.000004 hi def link cCppOutWrapper cPreCondit | |
1 0.000004 hi def link cPreConditMatch cPreCondit | |
1 0.000009 hi def link cPreCondit PreCondit | |
1 0.000009 hi def link cType Type | |
1 0.000010 hi def link cConstant Constant | |
1 0.000005 hi def link cCommentString cString | |
1 0.000004 hi def link cComment2String cString | |
1 0.000003 hi def link cCommentSkip cComment | |
1 0.000009 hi def link cString String | |
1 0.000010 hi def link cComment Comment | |
1 0.000009 hi def link cSpecial SpecialChar | |
1 0.000009 hi def link cTodo Todo | |
1 0.000010 hi def link cBadContinuation Error | |
1 0.000004 hi def link cCppOutSkip cCppOutIf2 | |
1 0.000004 hi def link cCppInElse2 cCppOutIf2 | |
1 0.000004 hi def link cCppOutIf2 cCppOut | |
1 0.000008 hi def link cCppOut Comment | |
1 0.000006 let b:current_syntax = "c" | |
1 0.000003 unlet s:ft | |
1 0.000020 let &cpo = s:cpo_save | |
1 0.000004 unlet s:cpo_save | |
" vim: ts=8 | |
FUNCTION <SNR>96_Complete() | |
Called 24 times | |
Total time: 0.000526 | |
Self time: 0.000296 | |
count total (s) self (s) | |
" <c-x><c-u> invokes the user's completion function (which we have set to | |
" youcompleteme#CompleteFunc), and <c-p> tells Vim to select the previous | |
" completion candidate. This is necessary because by default, Vim selects the | |
" first candidate when completion is invoked, and selecting a candidate | |
" automatically replaces the current text with it. Calling <c-p> forces Vim to | |
" deselect the first candidate and in turn preserve the user's current text | |
" until he explicitly chooses to replace it with a completion. | |
24 0.000432 0.000202 call s:SendKeys( "\<C-X>\<C-U>\<C-P>" ) | |
FUNCTION <SNR>8_SynSet() | |
Called 1 time | |
Total time: 0.005239 | |
Self time: 0.000847 | |
count total (s) self (s) | |
" clear syntax for :set syntax=OFF and any syntax name that doesn't exist | |
1 0.000004 syn clear | |
1 0.000005 if exists("b:current_syntax") | |
1 0.000004 unlet b:current_syntax | |
1 0.000001 endif | |
1 0.000005 let s = expand("<amatch>") | |
1 0.000003 if s == "ON" | |
" :set syntax=ON | |
if &filetype == "" | |
echohl ErrorMsg | |
echo "filetype unknown" | |
echohl None | |
endif | |
let s = &filetype | |
elseif s == "OFF" | |
let s = "" | |
endif | |
1 0.000002 if s != "" | |
" Load the syntax file(s). When there are several, separated by dots, | |
" load each in sequence. | |
2 0.000016 for name in split(s, '\.') | |
1 0.005168 0.000776 exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim" | |
1 0.000003 endfor | |
1 0.000001 endif | |
FUNCTION <SNR>47_SetUpForNewFiletype() | |
Called 124 times | |
Total time: 0.017412 | |
Self time: 0.013937 | |
count total (s) self (s) | |
124 0.000336 let ft = a:filetype | |
"for compound filetypes, if we don't know how to handle the full filetype | |
"then break it down and use the first part that we know how to handle | |
124 0.002844 if ft =~ '\.' && !has_key(s:delimiterMap, ft) | |
let filetypes = split(a:filetype, '\.') | |
for i in filetypes | |
if has_key(s:delimiterMap, i) | |
let ft = i | |
break | |
endif | |
endfor | |
endif | |
124 0.000335 let b:NERDSexyComMarker = '' | |
124 0.000446 if has_key(s:delimiterMap, ft) | |
62 0.000202 let b:NERDCommenterDelims = s:delimiterMap[ft] | |
310 0.000535 for i in ['left', 'leftAlt', 'right', 'rightAlt'] | |
248 0.000684 if !has_key(b:NERDCommenterDelims, i) | |
let b:NERDCommenterDelims[i] = '' | |
endif | |
248 0.000175 endfor | |
186 0.000305 for i in ['nested', 'nestedAlt'] | |
124 0.000356 if !has_key(b:NERDCommenterDelims, i) | |
let b:NERDCommenterDelims[i] = 0 | |
endif | |
124 0.000091 endfor | |
" if g:NERD_<filetype>_alt_style is defined, use the alternate style | |
62 0.000349 let b:NERDCommenterFirstInit = getbufvar(1,"NERDCommenterFirstInit") | |
62 0.000347 if exists('g:NERDAltDelims_'.ft) && eval('g:NERDAltDelims_'.ft) && !b:NERDCommenterFirstInit | |
call s:SwitchToAlternativeDelimiters(0) | |
let b:NERDCommenterFirstInit = 1 | |
endif | |
62 0.000055 else | |
62 0.004102 0.000627 let b:NERDCommenterDelims = s:CreateDelimMapFromCms() | |
62 0.000108 endif | |
FUNCTION color_coded#get_buffer_name() | |
Called 7976 times | |
Total time: 0.206541 | |
Self time: 0.206541 | |
count total (s) self (s) | |
7976 0.005474 lua << EOF | |
local name = color_coded_buffer_name() | |
vim.command("let s:file = '" .. name .. "'") | |
EOF | |
7976 0.028018 if exists("w:color_coded_unique_counter") | |
7976 0.025725 return s:file . w:color_coded_unique_counter | |
else | |
return s:file | |
endif | |
FUNCTION airline#util#exec_funcrefs() | |
Called 2 times | |
Total time: 0.001331 | |
Self time: 0.000098 | |
count total (s) self (s) | |
8 0.000010 for Fn in a:list | |
8 0.001294 0.000061 let code = call(Fn, a:000) | |
8 0.000008 if code != 0 | |
2 0.000002 return code | |
endif | |
6 0.000002 endfor | |
return 0 | |
FUNCTION airline#extensions#quickfix#inactive_qf_window() | |
Called 1 time | |
Total time: 0.000009 | |
Self time: 0.000009 | |
count total (s) self (s) | |
1 0.000006 if getbufvar(a:2.bufnr, '&filetype') is# 'qf' && !empty(airline#util#getwinvar(a:2.winnr, 'quickfix_title', '')) | |
call setwinvar(a:2.winnr, 'airline_section_c', '[%{get(w:, "quickfix_title", "")}] %f %m') | |
endif | |
FUNCTION <SNR>70_Setup() | |
Called 125 times | |
Total time: 0.135585 | |
Self time: 0.005013 | |
count total (s) self (s) | |
125 0.000355 if &filetype ==# "" | |
62 0.011050 0.000422 call s:InitColor() | |
62 0.000059 endif | |
125 0.004429 0.000916 if s:Filter() && g:indentLine_enabled || exists("b:indentLine_enabled") && b:indentLine_enabled | |
125 0.113886 0.000807 call s:IndentLinesEnable() | |
125 0.000118 endif | |
125 0.004663 0.001311 if s:Filter() && g:indentLine_leadingSpaceEnabled || exists("b:indentLine_leadingSpaceEnabled") && b:indentLine_leadingSpaceEnabled | |
call s:LeadingSpaceEnable() | |
endif | |
FUNCTION <SNR>4_BMTruncName() | |
Called 1 time | |
Total time: 0.000023 | |
Self time: 0.000023 | |
count total (s) self (s) | |
1 0.000002 let name = a:fname | |
1 0.000001 if g:bmenu_max_pathlen < 5 | |
let name = "" | |
else | |
1 0.000002 let len = strlen(name) | |
1 0.000001 if len > g:bmenu_max_pathlen | |
let amountl = (g:bmenu_max_pathlen / 2) - 2 | |
let amountr = g:bmenu_max_pathlen - amountl - 3 | |
let pattern = '^\(.\{,' . amountl . '}\).\{-}\(.\{,' . amountr . '}\)$' | |
let left = substitute(name, pattern, '\1', '') | |
let right = substitute(name, pattern, '\2', '') | |
if strlen(left) + strlen(right) < len | |
let name = left . '...' . right | |
endif | |
endif | |
1 0.000001 endif | |
1 0.000001 return name | |
FUNCTION <SNR>70_SetConcealOption() | |
Called 125 times | |
Total time: 0.001962 | |
Self time: 0.001962 | |
count total (s) self (s) | |
125 0.000213 if !g:indentLine_setConceal | |
return | |
endif | |
125 0.000441 if !exists("b:indentLine_ConcealOptionSet") | |
1 0.000002 let b:indentLine_ConcealOptionSet = 1 | |
1 0.000008 let &l:concealcursor = exists("g:indentLine_concealcursor") ? g:indentLine_concealcursor : "inc" | |
1 0.000006 let &l:conceallevel = exists("g:indentLine_conceallevel") ? g:indentLine_conceallevel : "2" | |
1 0.000000 endif | |
FUNCTION <SNR>88_get_seperator() | |
Called 249 times | |
Total time: 0.254022 | |
Self time: 0.003985 | |
count total (s) self (s) | |
249 0.086544 0.001711 if s:should_change_group(a:prev_group, a:group) | |
249 0.167264 0.002060 return s:get_transitioned_seperator(a:self, a:prev_group, a:group, a:side) | |
else | |
return a:side ? a:self._context.left_alt_sep : a:self._context.right_alt_sep | |
endif | |
FUNCTION airline#check_mode() | |
Called 287 times | |
Total time: 0.117887 | |
Self time: 0.032446 | |
count total (s) self (s) | |
287 0.001324 if !exists("s:airline_run") | |
let s:airline_run = 0 | |
endif | |
287 0.000797 let s:airline_run += 1 | |
287 0.000942 let context = s:contexts[a:winnr] | |
287 0.001099 if get(w:, 'airline_active', 1) | |
156 0.000550 let l:m = mode() | |
156 0.000316 if l:m ==# "i" | |
152 0.000402 let l:mode = ['insert'] | |
152 0.000217 elseif l:m ==# "R" | |
let l:mode = ['replace'] | |
elseif l:m =~# '\v(v|V||s|S|)' | |
let l:mode = ['visual'] | |
elseif l:m ==# "t" | |
let l:mode = ['terminal'] | |
else | |
4 0.000009 let l:mode = ['normal'] | |
4 0.000003 endif | |
156 0.000913 let w:airline_current_mode = get(g:airline_mode_map, l:m, l:m) | |
156 0.000146 else | |
131 0.000352 let l:mode = ['inactive'] | |
131 0.000664 let w:airline_current_mode = get(g:airline_mode_map, '__') | |
131 0.000114 endif | |
287 0.001042 if g:airline_detect_modified && &modified | |
176 0.000837 call add(l:mode, 'modified') | |
176 0.000157 endif | |
287 0.000615 if g:airline_detect_paste && &paste | |
call add(l:mode, 'paste') | |
endif | |
287 0.001413 if g:airline_detect_crypt && exists("+key") && !empty(&key) | |
call add(l:mode, 'crypt') | |
endif | |
287 0.000660 if g:airline_detect_spell && &spell | |
call add(l:mode, 'spell') | |
endif | |
287 0.000492 if &readonly || ! &modifiable | |
107 0.000426 call add(l:mode, 'readonly') | |
107 0.000095 endif | |
287 0.001342 let mode_string = join(l:mode) | |
287 0.000522 if s:airline_run < 3 | |
" skip this round. | |
" When this function is run too early after startup, | |
" it forces a redraw by vim which will remove the intro screen. | |
let w:airline_lastmode = mode_string | |
return '' | |
endif | |
287 0.001345 if get(w:, 'airline_lastmode', '') != mode_string | |
3 0.001171 0.000026 call airline#highlighter#highlight_modified_inactive(context.bufnr) | |
3 0.084347 0.000051 call airline#highlighter#highlight(l:mode, context.bufnr) | |
3 0.000012 let w:airline_lastmode = mode_string | |
3 0.000003 endif | |
287 0.000406 return '' | |
FUNCTION <SNR>96_DisableOnLargeFile() | |
Called 20 times | |
Total time: 0.000121 | |
Self time: 0.000121 | |
count total (s) self (s) | |
20 0.000072 if exists( 'b:ycm_largefile' ) | |
20 0.000035 return b:ycm_largefile | |
endif | |
let threshold = g:ycm_disable_for_files_larger_than_kb * 1024 | |
let b:ycm_largefile = threshold > 0 && getfsize( expand( a:buffer ) ) > threshold | |
if b:ycm_largefile | |
exec s:python_command "vimsupport.PostVimMessage(" . "'YouCompleteMe is disabled in this buffer; " . "the file exceeded the max size (see YCM options).' )" | |
endif | |
return b:ycm_largefile | |
FUNCTION airline#util#append() | |
Called 343 times | |
Total time: 0.004218 | |
Self time: 0.004218 | |
count total (s) self (s) | |
343 0.000893 if a:minwidth > 0 && winwidth(0) < a:minwidth | |
return '' | |
endif | |
343 0.001263 let prefix = s:spc == "\ua0" ? s:spc : s:spc.s:spc | |
343 0.001165 return empty(a:text) ? '' : prefix.g:airline_left_alt_sep.s:spc.a:text | |
FUNCTION <SNR>76_wordcount_update() | |
Called 17 times | |
Total time: 0.000806 | |
Self time: 0.000806 | |
count total (s) self (s) | |
17 0.000061 if empty(bufname('')) | |
return | |
endif | |
17 0.000272 if match(&ft, get(g:, 'airline#extensions#wordcount#filetypes')) > -1 | |
let l:mode = mode() | |
if l:mode ==# 'v' || l:mode ==# 'V' || l:mode ==# 's' || l:mode ==# 'S' | |
let b:airline_wordcount = airline#extensions#wordcount#formatters#{s:formatter}#format() | |
let b:airline_change_tick = b:changedtick | |
else | |
if get(b:, 'airline_wordcount_cache', '') is# '' || b:airline_wordcount_cache isnot# get(b:, 'airline_wordcount', '') || get(b:, 'airline_change_tick', 0) != b:changedtick || get(b:, 'airline_winwidth', 0) != winwidth(0) | |
" cache data | |
let b:airline_wordcount = airline#extensions#wordcount#formatters#{s:formatter}#format() | |
let b:airline_wordcount_cache = b:airline_wordcount | |
let b:airline_change_tick = b:changedtick | |
let b:airline_winwidth = winwidth(0) | |
endif | |
endif | |
endif | |
FUNCTION <SNR>96_PollFileParseResponse() | |
Called 2 times | |
Total time: 0.405814 | |
Self time: 0.405554 | |
count total (s) self (s) | |
2 0.000286 0.000026 if !s:Pyeval( "ycm_state.FileParseRequestReady()" ) | |
let s:pollers.file_parse_response.id = timer_start( s:pollers.file_parse_response.wait_milliseconds, function( 's:PollFileParseResponse' ) ) | |
return | |
endif | |
2 0.405507 exec s:python_command "ycm_state.HandleFileParseRequest()" | |
FUNCTION airline#themes#get_highlight() | |
Called 832 times | |
Total time: 0.134575 | |
Self time: 0.007826 | |
count total (s) self (s) | |
832 0.134067 0.007318 return call('airline#highlighter#get_highlight', [a:group] + a:000) | |
FUNCTION <SNR>62_Highlight_Matching_Pair() | |
Called 158 times | |
Total time: 0.005400 | |
Self time: 0.005400 | |
count total (s) self (s) | |
" Remove any previous match. | |
158 0.000649 if exists('w:paren_hl_on') && w:paren_hl_on | |
silent! call matchdelete(3) | |
let w:paren_hl_on = 0 | |
endif | |
" Avoid that we remove the popup menu. | |
" Return when there are no colors (looks like the cursor jumps). | |
158 0.000736 if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
124 0.000127 return | |
endif | |
" Get the character under the cursor and check if it's in 'matchpairs'. | |
34 0.000088 let c_lnum = line('.') | |
34 0.000086 let c_col = col('.') | |
34 0.000039 let before = 0 | |
34 0.000102 let text = getline(c_lnum) | |
34 0.000560 let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
34 0.000079 if empty(matches) | |
let [c_before, c] = ['', ''] | |
else | |
34 0.000161 let [c_before, c] = matches[1:2] | |
34 0.000026 endif | |
34 0.000453 let plist = split(&matchpairs, '.\zs[:,]') | |
34 0.000111 let i = index(plist, c) | |
34 0.000041 if i < 0 | |
" not found, in Insert mode try character before the cursor | |
34 0.000141 if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
30 0.000087 let before = strlen(c_before) | |
30 0.000045 let c = c_before | |
30 0.000072 let i = index(plist, c) | |
30 0.000019 endif | |
34 0.000031 if i < 0 | |
" not found, nothing to do | |
34 0.000034 return | |
endif | |
endif | |
" Figure out the arguments for searchpairpos(). | |
if i % 2 == 0 | |
let s_flags = 'nW' | |
let c2 = plist[i + 1] | |
else | |
let s_flags = 'nbW' | |
let c2 = c | |
let c = plist[i - 1] | |
endif | |
if c == '[' | |
let c = '\[' | |
let c2 = '\]' | |
endif | |
" Find the match. When it was just before the cursor move it there for a | |
" moment. | |
if before > 0 | |
let has_getcurpos = exists("*getcurpos") | |
if has_getcurpos | |
" getcurpos() is more efficient but doesn't exist before 7.4.313. | |
let save_cursor = getcurpos() | |
else | |
let save_cursor = winsaveview() | |
endif | |
call cursor(c_lnum, c_col - before) | |
endif | |
" Build an expression that detects whether the current cursor position is in | |
" certain syntax types (string, comment, etc.), for use as searchpairpos()'s | |
" skip argument. | |
" We match "escape" for special items, such as lispEscapeSpecial. | |
let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
" If executing the expression determines that the cursor is currently in | |
" one of the syntax types, then we want searchpairpos() to find the pair | |
" within those syntax types (i.e., not skip). Otherwise, the cursor is | |
" outside of the syntax types and s_skip should keep its value so we skip any | |
" matching pair inside the syntax types. | |
execute 'if' s_skip '| let s_skip = 0 | endif' | |
" Limit the search to lines visible in the window. | |
let stoplinebottom = line('w$') | |
let stoplinetop = line('w0') | |
if i % 2 == 0 | |
let stopline = stoplinebottom | |
else | |
let stopline = stoplinetop | |
endif | |
" Limit the search time to 300 msec to avoid a hang on very long lines. | |
" This fails when a timeout is not supported. | |
if mode() == 'i' || mode() == 'R' | |
let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
else | |
let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
endif | |
try | |
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
catch /E118/ | |
" Can't use the timeout, restrict the stopline a bit more to avoid taking | |
" a long time on closed folds and long lines. | |
" The "viewable" variables give a range in which we can scroll while | |
" keeping the cursor at the same position. | |
" adjustedScrolloff accounts for very large numbers of scrolloff. | |
let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
" one of these stoplines will be adjusted below, but the current values are | |
" minimal boundaries within the current window | |
if i % 2 == 0 | |
if has("byte_offset") && has("syntax_items") && &smc > 0 | |
let stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
let stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
else | |
let stopline = min([bottom_viewable, c_lnum + 100]) | |
endif | |
let stoplinebottom = stopline | |
else | |
if has("byte_offset") && has("syntax_items") && &smc > 0 | |
let stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
let stopline = max([top_viewable, byte2line(stopbyte)]) | |
else | |
let stopline = max([top_viewable, c_lnum - 100]) | |
endif | |
let stoplinetop = stopline | |
endif | |
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
endtry | |
if before > 0 | |
if has_getcurpos | |
call setpos('.', save_cursor) | |
else | |
call winrestview(save_cursor) | |
endif | |
endif | |
" If a match is found setup match highlighting. | |
if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
if exists('*matchaddpos') | |
call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
else | |
exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
endif | |
let w:paren_hl_on = 1 | |
endif | |
FUNCTION airline#extensions#tabline#buffers#get() | |
Called 153 times | |
Total time: 0.535353 | |
Self time: 0.024801 | |
count total (s) self (s) | |
153 0.003363 0.000826 call <sid>map_keys() | |
153 0.000599 let cur = bufnr('%') | |
153 0.000280 if cur == s:current_bufnr | |
33 0.000224 if !g:airline_detect_modified || getbufvar(cur, '&modified') == s:current_modified | |
32 0.000071 return s:current_tabline | |
endif | |
1 0.000001 endif | |
121 0.000198 let l:index = 1 | |
121 0.009370 0.000637 let b = airline#extensions#tabline#new_builder() | |
121 0.000593 let tab_bufs = tabpagebuflist(tabpagenr()) | |
242 0.049783 0.001090 for nr in s:get_visible_buffers() | |
121 0.000186 if nr < 0 | |
call b.add_raw('%#airline_tabhid#...') | |
continue | |
endif | |
121 0.004402 0.000824 let group = airline#extensions#tabline#group_of_bufnr(tab_bufs, nr) | |
121 0.000186 if nr == cur | |
61 0.000232 let s:current_modified = (group == 'airline_tabmod') ? 1 : 0 | |
61 0.000091 endif | |
" Neovim feature: Have clickable buffers | |
121 0.000673 if has("tablineat") | |
call b.add_raw('%'.nr.'@airline#extensions#tabline#buffers#clickbuf@') | |
endif | |
121 0.000192 if s:buffer_idx_mode | |
if len(s:number_map) > 0 | |
call b.add_section(group, s:spc . get(s:number_map, l:index, '') . '%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)' . s:spc) | |
else | |
call b.add_section(group, '['.l:index.s:spc.'%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)'.']') | |
endif | |
let l:index = l:index + 1 | |
else | |
121 0.002117 0.001357 call b.add_section(group, s:spc.'%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)'.s:spc) | |
121 0.000114 endif | |
121 0.000503 if has("tablineat") | |
call b.add_raw('%X') | |
endif | |
121 0.000105 endfor | |
121 0.001209 0.000630 call b.add_section('airline_tabfill', '') | |
121 0.000961 0.000399 call b.split() | |
121 0.000940 0.000478 call b.add_section('airline_tabfill', '') | |
121 0.000186 if s:show_tab_type | |
121 0.002634 0.000638 call b.add_section_spaced('airline_tabtype', s:buffers_label) | |
121 0.000119 endif | |
121 0.000367 if tabpagenr('$') > 1 | |
call b.add_section_spaced('airline_tabmod', printf('%s %d/%d', "tab", tabpagenr(), tabpagenr('$'))) | |
endif | |
121 0.000241 let s:current_bufnr = cur | |
121 0.443883 0.001231 let s:current_tabline = b.build() | |
121 0.000273 return s:current_tabline | |
FUNCTION <SNR>96_OnBufferEnter() | |
Called 124 times | |
Total time: 0.003506 | |
Self time: 0.000850 | |
count total (s) self (s) | |
124 0.003262 0.000606 if !s:VisitedBufferRequiresReparse() | |
124 0.000115 return | |
endif | |
call s:SetUpCompleteopt() | |
call s:SetCompleteFunc() | |
exec s:python_command "ycm_state.OnBufferVisit()" | |
" Last parse may be outdated because of changes from other buffers. Force a | |
" new parse. | |
call s:OnFileReadyToParse( 1 ) | |
FUNCTION airline#parts#filetype() | |
Called 287 times | |
Total time: 0.002457 | |
Self time: 0.002457 | |
count total (s) self (s) | |
287 0.002232 return winwidth(0) < 90 && strlen(&filetype) > 3 ? matchstr(&filetype, '...'). (&encoding is? 'utf-8' ? '…' : '>') : &filetype | |
FUNCTION airline#extensions#netrw#apply() | |
Called 1 time | |
Total time: 0.000019 | |
Self time: 0.000019 | |
count total (s) self (s) | |
1 0.000004 if &ft == 'netrw' | |
let spc = g:airline_symbols.space | |
call a:1.add_section('airline_a', spc.'netrw'.spc) | |
if exists('*airline#extensions#branch#get_head') | |
call a:1.add_section('airline_b', spc.'%{airline#extensions#branch#get_head()}'.spc) | |
endif | |
call a:1.add_section('airline_c', spc.'%f'.spc) | |
call a:1.split() | |
call a:1.add_section('airline_y', spc.'%{airline#extensions#netrw#sortstring()}'.spc) | |
return 1 | |
endif | |
FUNCTION airline#parts#iminsert() | |
Called 49 times | |
Total time: 0.000401 | |
Self time: 0.000401 | |
count total (s) self (s) | |
49 0.000147 if g:airline_detect_iminsert && &iminsert && exists('b:keymap_name') | |
return toupper(b:keymap_name) | |
endif | |
49 0.000045 return '' | |
FUNCTION <SNR>96_VisitedBufferRequiresReparse() | |
Called 124 times | |
Total time: 0.002656 | |
Self time: 0.001321 | |
count total (s) self (s) | |
124 0.000648 if bufnr( '%' ) ==# s:previous_allowed_buffer_number | |
62 0.000074 return 0 | |
endif | |
62 0.001646 0.000311 return s:AllowedToCompleteInCurrentBuffer() | |
FUNCTION <SNR>56_is_space_expansion() | |
Called 2 times | |
Total time: 0.000451 | |
Self time: 0.000117 | |
count total (s) self (s) | |
2 0.000005 if col('.') > 2 | |
2 0.000080 0.000011 let pchar = s:get_char(-2) | |
2 0.000055 0.000011 let nchar = s:get_char(1) | |
2 0.000156 0.000026 let isSpaces = (s:get_char(-1) == s:get_char(0) && s:get_char(-1) == " ") | |
2 0.000074 0.000025 if index(s:get('left_delims'), pchar) > -1 && index(s:get('left_delims'), pchar) == index(s:get('right_delims'), nchar) && isSpaces | |
return 1 | |
elseif index(s:get('quotes_list'), pchar) > -1 && index(s:get('quotes_list'), pchar) == index(s:get('quotes_list'), nchar) && isSpaces | |
return 1 | |
endif | |
2 0.000002 endif | |
2 0.000002 return 0 | |
FUNCTION <SNR>56_get_syn_name() | |
Called 2 times | |
Total time: 0.000238 | |
Self time: 0.000238 | |
count total (s) self (s) | |
2 0.000009 let col = col('.') | |
2 0.000006 if col == col('$') | |
2 0.000005 let col = col - 1 | |
2 0.000003 endif | |
2 0.000212 return synIDattr(synIDtrans(synID(line('.'), col, 1)), 'name') | |
FUNCTION <SNR>96_OnBlankLine() | |
Called 15 times | |
Total time: 0.003708 | |
Self time: 0.000105 | |
count total (s) self (s) | |
15 0.003699 0.000096 return s:Pyeval( 'not vim.current.line or vim.current.line.isspace()' ) | |
FUNCTION <SNR>96_SendKeys() | |
Called 31 times | |
Total time: 0.000302 | |
Self time: 0.000302 | |
count total (s) self (s) | |
" By default keys are added to the end of the typeahead buffer. If there are | |
" already keys in the buffer, they will be processed first and may change the | |
" state that our keys combination was sent for (e.g. <C-X><C-U><C-P> in normal | |
" mode instead of insert mode or <C-e> outside of completion mode). We avoid | |
" that by inserting the keys at the start of the typeahead buffer with the 'i' | |
" option. Also, we don't want the keys to be remapped to something else so we | |
" add the 'n' option. | |
31 0.000173 call feedkeys( a:keys, 'in' ) | |
FUNCTION 268() | |
Called 121 times | |
Total time: 0.001996 | |
Self time: 0.001468 | |
count total (s) self (s) | |
121 0.000602 let spc = empty(a:contents) ? '' : g:airline_symbols.space | |
121 0.001304 0.000776 call self.add_section(a:group, spc.a:contents.spc) | |
FUNCTION airline#extensions#tabline#buflist#list() | |
Called 395 times | |
Total time: 0.015490 | |
Self time: 0.015490 | |
count total (s) self (s) | |
395 0.001544 if exists('s:current_buffer_list') | |
273 0.000460 return s:current_buffer_list | |
endif | |
122 0.000484 let excludes = get(g:, 'airline#extensions#tabline#excludes', []) | |
122 0.000490 let exclude_preview = get(g:, 'airline#extensions#tabline#exclude_preview', 1) | |
122 0.001021 let list = (exists('g:did_bufmru') && g:did_bufmru) ? BufMRUList() : range(1, bufnr("$")) | |
122 0.000190 let buffers = [] | |
" If this is too slow, we can switch to a different algorithm. | |
" Basically branch 535 already does it, but since it relies on | |
" BufAdd autocommand, I'd like to avoid this if possible. | |
366 0.000586 for nr in list | |
244 0.000656 if buflisted(nr) | |
" Do not add to the bufferlist, if either | |
" 1) buffername matches exclude pattern | |
" 2) buffer is a quickfix buffer | |
" 3) exclude preview windows (if 'bufhidden' == wipe | |
" and 'buftype' == nofile | |
244 0.003777 if (!empty(excludes) && match(bufname(nr), join(excludes, '\|')) > -1) || (getbufvar(nr, 'current_syntax') == 'qf') || (exclude_preview && getbufvar(nr, '&bufhidden') == 'wipe' && getbufvar(nr, '&buftype') == 'nofile') | |
122 0.000165 continue | |
endif | |
122 0.000492 call add(buffers, nr) | |
122 0.000103 endif | |
122 0.000119 endfor | |
122 0.000335 let s:current_buffer_list = buffers | |
122 0.000163 return buffers | |
FUNCTION <SNR>96_OnCursorMovedNormalMode() | |
Called 2 times | |
Total time: 0.000355 | |
Self time: 0.000232 | |
count total (s) self (s) | |
2 0.000133 0.000010 if !s:AllowedToCompleteInCurrentBuffer() | |
return | |
endif | |
2 0.000214 exec s:python_command "ycm_state.OnCursorMoved()" | |
FUNCTION <SNR>80_get_visible_buffers() | |
Called 121 times | |
Total time: 0.048693 | |
Self time: 0.011915 | |
count total (s) self (s) | |
121 0.014327 0.000786 let buffers = airline#extensions#tabline#buflist#list() | |
121 0.000450 let cur = bufnr('%') | |
121 0.000195 let total_width = 0 | |
121 0.000175 let max_width = 0 | |
242 0.000382 for nr in buffers | |
121 0.024415 0.001178 let width = len(airline#extensions#tabline#get_buffer_name(nr)) + 4 | |
121 0.000286 let total_width += width | |
121 0.000533 let max_width = max([max_width, width]) | |
121 0.000130 endfor | |
" only show current and surrounding buffers if there are too many buffers | |
121 0.000415 let position = index(buffers, cur) | |
121 0.000252 let vimwidth = &columns | |
121 0.000257 if total_width > vimwidth && position > -1 | |
let buf_count = len(buffers) | |
" determine how many buffers to show based on the longest buffer width, | |
" use one on the right side and put the rest on the left | |
let buf_max = vimwidth / max_width | |
let buf_right = 1 | |
let buf_left = max([0, buf_max - buf_right]) | |
let start = max([0, position - buf_left]) | |
let end = min([buf_count, position + buf_right]) | |
" fill up available space on the right | |
if position < buf_left | |
let end += (buf_left - position) | |
endif | |
" fill up available space on the left | |
if end > buf_count - 1 - buf_right | |
let start -= max([0, buf_right - (buf_count - 1 - position)]) | |
endif | |
let buffers = eval('buffers[' . start . ':' . end . ']') | |
if start > 0 | |
call insert(buffers, -1, 0) | |
endif | |
if end < buf_count - 1 | |
call add(buffers, -1) | |
endif | |
endif | |
121 0.000419 let s:current_visible_buffers = buffers | |
121 0.000157 return buffers | |
FUNCTION <SNR>96_PollCompletion() | |
Called 28 times | |
Total time: 0.025673 | |
Self time: 0.001403 | |
count total (s) self (s) | |
28 0.011629 0.000434 if !s:Pyeval( 'ycm_state.CompletionRequestReady()' ) | |
16 0.000361 let s:pollers.completion.id = timer_start( s:pollers.completion.wait_milliseconds, function( 's:PollCompletion' ) ) | |
16 0.000028 return | |
endif | |
12 0.012922 0.000130 let response = s:Pyeval( 'ycm_state.GetCompletionResponse()' ) | |
12 0.000147 let s:completion = { 'start_column': response.completion_start_column, 'candidates': response.completions } | |
12 0.000376 0.000093 call s:Complete() | |
FUNCTION <SNR>70_InitColor() | |
Called 63 times | |
Total time: 0.010805 | |
Self time: 0.010805 | |
count total (s) self (s) | |
63 0.000127 if !g:indentLine_setColors | |
return | |
endif | |
63 0.000226 if !exists("g:indentLine_color_term") | |
if &background ==# "light" | |
let term_color = 249 | |
else | |
let term_color = 239 | |
endif | |
else | |
63 0.000159 let term_color = g:indentLine_color_term | |
63 0.000058 endif | |
63 0.000218 if !exists("g:indentLine_bgcolor_term") | |
63 0.000128 let term_bgcolor = "NONE" | |
63 0.000049 else | |
let term_bgcolor = g:indentLine_bgcolor_term | |
endif | |
63 0.000238 if !exists("g:indentLine_color_gui") | |
if &background ==# "light" | |
let gui_color = "Grey70" | |
else | |
let gui_color = "Grey30" | |
endif | |
else | |
63 0.000137 let gui_color = g:indentLine_color_gui | |
63 0.000057 endif | |
63 0.000200 if !exists("g:indentLine_bgcolor_gui") | |
63 0.000115 let gui_bgcolor = "NONE" | |
63 0.000054 else | |
let gui_bgcolor = g:indentLine_bgcolor_gui | |
endif | |
63 0.002934 execute "highlight Conceal cterm=NONE ctermfg=" . term_color . " ctermbg=" . term_bgcolor | |
63 0.003369 execute "highlight Conceal gui=NONE guifg=" . gui_color . " guibg=" . gui_bgcolor | |
63 0.000203 if &term ==# "linux" | |
if &background ==# "light" | |
let tty_color = exists("g:indentLine_color_tty_light") ? g:indentLine_color_tty_light : 4 | |
else | |
let tty_color = exists("g:indentLine_color_tty_dark") ? g:indentLine_color_tty_dark : 2 | |
endif | |
execute "highlight Conceal cterm=bold ctermfg=" . tty_color . " ctermbg=NONE" | |
endif | |
FUNCTION <SNR>44_BufWinEnterHandler() | |
Called 1 time | |
Total time: 0.000008 | |
Self time: 0.000008 | |
count total (s) self (s) | |
1 0.000002 if s:NewTabCreated | |
" Turn off the 'NewTabCreated' flag | |
let s:NewTabCreated = 0 | |
" Restore focus to NERDTree if necessary | |
if !g:nerdtree_tabs_focus_on_files | |
call s:NERDTreeRestoreFocus() | |
endif | |
endif | |
FUNCTION <SNR>56_is_forbidden() | |
Called 2 times | |
Total time: 0.000480 | |
Self time: 0.000092 | |
count total (s) self (s) | |
2 0.000044 0.000022 if s:is_excluded_ft(&filetype) | |
return 1 | |
endif | |
2 0.000088 0.000018 if !s:get('excluded_regions_enabled') | |
return 0 | |
endif | |
2 0.000254 0.000016 let region = s:get_syn_name() | |
2 0.000076 0.000018 return index(s:get('excluded_regions_list'), region) >= 0 | |
FUNCTION delimitMate#IsEmptyPair() | |
Called 2 times | |
Total time: 0.000027 | |
Self time: 0.000027 | |
count total (s) self (s) | |
2 0.000023 if strlen(substitute(a:str, ".", "x", "g")) != 2 | |
2 0.000004 return 0 | |
endif | |
let idx = index(s:get('left_delims'), matchstr(a:str, '^.')) | |
if idx > -1 && s:get('right_delims')[idx] == matchstr(a:str, '.$') | |
return 1 | |
endif | |
let idx = index(s:get('quotes_list'), matchstr(a:str, '^.')) | |
if idx > -1 && s:get('quotes_list')[idx] == matchstr(a:str, '.$') | |
return 1 | |
endif | |
return 0 | |
FUNCTION <SNR>80_map_keys() | |
Called 153 times | |
Total time: 0.002537 | |
Self time: 0.002537 | |
count total (s) self (s) | |
153 0.000299 if s:buffer_idx_mode | |
noremap <silent> <Plug>AirlineSelectTab1 :call <SID>select_tab(0)<CR> | |
noremap <silent> <Plug>AirlineSelectTab2 :call <SID>select_tab(1)<CR> | |
noremap <silent> <Plug>AirlineSelectTab3 :call <SID>select_tab(2)<CR> | |
noremap <silent> <Plug>AirlineSelectTab4 :call <SID>select_tab(3)<CR> | |
noremap <silent> <Plug>AirlineSelectTab5 :call <SID>select_tab(4)<CR> | |
noremap <silent> <Plug>AirlineSelectTab6 :call <SID>select_tab(5)<CR> | |
noremap <silent> <Plug>AirlineSelectTab7 :call <SID>select_tab(6)<CR> | |
noremap <silent> <Plug>AirlineSelectTab8 :call <SID>select_tab(7)<CR> | |
noremap <silent> <Plug>AirlineSelectTab9 :call <SID>select_tab(8)<CR> | |
noremap <silent> <Plug>AirlineSelectPrevTab :<C-u>call <SID>jump_to_tab(-v:count1)<CR> | |
noremap <silent> <Plug>AirlineSelectNextTab :<C-u>call <SID>jump_to_tab(v:count1)<CR> | |
endif | |
FUNCTION <SNR>44_CloseIfOnlyNerdTreeLeft() | |
Called 124 times | |
Total time: 0.001146 | |
Self time: 0.001146 | |
count total (s) self (s) | |
124 0.000825 if exists("t:NERDTreeBufName") && bufwinnr(t:NERDTreeBufName) != -1 && winnr("$") == 1 | |
q | |
endif | |
FUNCTION nerdtree#checkForBrowse() | |
Called 124 times | |
Total time: 0.002473 | |
Self time: 0.002473 | |
count total (s) self (s) | |
124 0.002174 if !isdirectory(a:dir) | |
124 0.000148 return | |
endif | |
if s:reuseWin(a:dir) | |
return | |
endif | |
call g:NERDTreeCreator.CreateWindowTree(a:dir) | |
FUNCTION <SNR>96_InsideCommentOrString() | |
Called 15 times | |
Total time: 0.001749 | |
Self time: 0.001749 | |
count total (s) self (s) | |
" Has to be col('.') -1 because col('.') doesn't exist at this point. We are | |
" in insert mode when this func is called. | |
15 0.001515 let syntax_group = synIDattr( synIDtrans( synID( line( '.' ), col( '.' ) - 1, 1 ) ), 'name') | |
15 0.000060 if stridx(syntax_group, 'Comment') > -1 | |
return 1 | |
endif | |
15 0.000040 if stridx(syntax_group, 'String') > -1 | |
return 2 | |
endif | |
15 0.000017 return 0 | |
FUNCTION airline#extensions#tabline#get_buffer_name() | |
Called 274 times | |
Total time: 0.052033 | |
Self time: 0.004583 | |
count total (s) self (s) | |
274 0.003650 0.001701 let buffers = a:0 ? a:1 : airline#extensions#tabline#buflist#list() | |
274 0.048098 0.002597 return airline#extensions#tabline#formatters#{s:formatter}#format(a:nr, buffers) | |
FUNCTION <SNR>96_ClosePreviewWindowIfNeeded() | |
Called 1 time | |
Total time: 0.004703 | |
Self time: 0.004703 | |
count total (s) self (s) | |
1 0.000009 let current_buffer_name = bufname('') | |
" We don't want to try to close the preview window in special buffers like | |
" "[Command Line]"; if we do, Vim goes bonkers. Special buffers always start | |
" with '['. | |
1 0.000007 if current_buffer_name[ 0 ] == '[' | |
return | |
endif | |
" This command does the actual closing of the preview window. If no preview | |
" window is shown, nothing happens. | |
1 0.004677 pclose | |
FUNCTION airline#extensions#tabline#new_builder() | |
Called 121 times | |
Total time: 0.008733 | |
Self time: 0.005397 | |
count total (s) self (s) | |
121 0.001703 let builder_context = { 'active' : 1, 'tabline' : 1, 'right_sep' : get(g:, 'airline#extensions#tabline#right_sep' , g:airline_right_sep), 'right_alt_sep' : get(g:, 'airline#extensions#tabline#right_alt_sep', g:airline_right_alt_sep), } | |
121 0.000382 if get(g:, 'airline_powerline_fonts', 0) | |
let builder_context.left_sep = get(g:, 'airline#extensions#tabline#left_sep' , g:airline_left_sep) | |
let builder_context.left_alt_sep = get(g:, 'airline#extensions#tabline#left_alt_sep' , g:airline_left_alt_sep) | |
else | |
121 0.000687 let builder_context.left_sep = get(g:, 'airline#extensions#tabline#left_sep' , ' ') | |
121 0.000611 let builder_context.left_alt_sep = get(g:, 'airline#extensions#tabline#left_alt_sep' , '|') | |
121 0.000104 endif | |
121 0.004022 0.000686 return airline#builder#new(builder_context) | |
FUNCTION <SNR>96_AllowedToCompleteInBuffer() | |
Called 82 times | |
Total time: 0.001936 | |
Self time: 0.001815 | |
count total (s) self (s) | |
82 0.000536 let buffer_filetype = getbufvar( a:buffer, '&filetype' ) | |
82 0.000449 if empty( buffer_filetype ) || getbufvar( a:buffer, '&buftype' ) ==# 'nofile' || buffer_filetype ==# 'qf' | |
62 0.000074 return 0 | |
endif | |
20 0.000227 0.000106 if s:DisableOnLargeFile( a:buffer ) | |
return 0 | |
endif | |
20 0.000117 let whitelist_allows = has_key( g:ycm_filetype_whitelist, '*' ) || has_key( g:ycm_filetype_whitelist, buffer_filetype ) | |
20 0.000079 let blacklist_allows = !has_key( g:ycm_filetype_blacklist, buffer_filetype ) | |
20 0.000043 let allowed = whitelist_allows && blacklist_allows | |
20 0.000020 if allowed | |
20 0.000082 let s:previous_allowed_buffer_number = bufnr( a:buffer ) | |
20 0.000011 endif | |
20 0.000022 return allowed | |
FUNCTION airline#extensions#default#apply() | |
Called 2 times | |
Total time: 0.001005 | |
Self time: 0.000091 | |
count total (s) self (s) | |
2 0.000004 let winnr = a:context.winnr | |
2 0.000003 let active = a:context.active | |
2 0.000017 0.000011 if airline#util#getwinvar(winnr, 'airline_render_left', active || (!active && !g:airline_inactive_collapse)) | |
1 0.000222 0.000006 call s:build_sections(a:builder, a:context, s:layout[0]) | |
1 0.000001 else | |
1 0.000043 0.000007 let text = s:get_section(winnr, 'c') | |
1 0.000001 if empty(text) | |
let text = ' %f%m ' | |
endif | |
1 0.000010 0.000006 call a:builder.add_section('airline_c'.(a:context.bufnr), text) | |
1 0.000000 endif | |
2 0.000084 0.000012 call a:builder.split(s:get_section(winnr, 'gutter', '', '')) | |
2 0.000011 0.000005 if airline#util#getwinvar(winnr, 'airline_render_right', 1) | |
2 0.000586 0.000012 call s:build_sections(a:builder, a:context, s:layout[1]) | |
2 0.000002 endif | |
2 0.000002 return 1 | |
FUNCTION <SNR>96_Pyeval() | |
Called 75 times | |
Total time: 0.032623 | |
Self time: 0.032623 | |
count total (s) self (s) | |
75 0.000155 if s:using_python3 | |
return py3eval( a:eval_string ) | |
endif | |
75 0.032021 return pyeval( a:eval_string ) | |
FUNCTION airline#highlighter#add_separator() | |
Called 372 times | |
Total time: 0.237703 | |
Self time: 0.007624 | |
count total (s) self (s) | |
372 0.002960 let s:separators[a:from.a:to] = [a:from, a:to, a:inverse] | |
372 0.234484 0.004405 call <sid>exec_separator({}, a:from, a:to, a:inverse, '') | |
FUNCTION <SNR>72_is_excluded_window() | |
Called 2 times | |
Total time: 0.000084 | |
Self time: 0.000084 | |
count total (s) self (s) | |
2 0.000004 for matchft in g:airline_exclude_filetypes | |
if matchft ==# &ft | |
return 1 | |
endif | |
endfor | |
8 0.000010 for matchw in g:airline_exclude_filenames | |
6 0.000035 if matchstr(expand('%'), matchw) ==# matchw | |
return 1 | |
endif | |
6 0.000004 endfor | |
2 0.000002 if g:airline_exclude_preview && &previewwindow | |
return 1 | |
endif | |
2 0.000001 return 0 | |
FUNCTION airline#util#wrap() | |
Called 959 times | |
Total time: 0.006390 | |
Self time: 0.006390 | |
count total (s) self (s) | |
959 0.002816 if a:minwidth > 0 && winwidth(0) < a:minwidth | |
return '' | |
endif | |
959 0.001209 return a:text | |
FUNCTION airline#extensions#tabline#get() | |
Called 153 times | |
Total time: 0.543425 | |
Self time: 0.008072 | |
count total (s) self (s) | |
153 0.000887 let curtabcnt = tabpagenr('$') | |
153 0.000378 if curtabcnt != s:current_tabcnt | |
let s:current_tabcnt = curtabcnt | |
call airline#extensions#tabline#tabs#invalidate() | |
call airline#extensions#tabline#buffers#invalidate() | |
call airline#extensions#tabline#ctrlspace#invalidate() | |
endif | |
153 0.000808 if !exists('#airline#BufAdd#*') | |
autocmd airline BufAdd * call <sid>update_tabline() | |
endif | |
153 0.000200 if s:ctrlspace | |
return airline#extensions#tabline#ctrlspace#get() | |
elseif s:show_buffers && curtabcnt == 1 || !s:show_tabs | |
153 0.538010 0.002657 return airline#extensions#tabline#buffers#get() | |
else | |
return airline#extensions#tabline#tabs#get() | |
endif | |
FUNCTION <SNR>55_setup() | |
Called 1 time | |
Total time: 0.002783 | |
Self time: 0.000057 | |
count total (s) self (s) | |
1 0.000002 let swap = a:0 && a:1 == 2 | |
1 0.000002 let enable = a:0 && a:1 | |
1 0.000001 let disable = a:0 && !a:1 | |
" First, remove all magic, if needed: | |
1 0.000002 if get(b:, 'delimitMate_enabled', 0) | |
call s:Unmap() | |
" Switch | |
if swap | |
echo "delimitMate is disabled." | |
return | |
endif | |
endif | |
1 0.000001 if disable | |
" Just disable the mappings. | |
return | |
endif | |
1 0.000001 if !a:0 | |
" Check if this file type is excluded: | |
1 0.000004 if exists("g:delimitMate_excluded_ft") && index(split(g:delimitMate_excluded_ft, ','), &filetype, 0, 1) >= 0 | |
" Finish here: | |
return 1 | |
endif | |
" Check if user tried to disable using b:loaded_delimitMate | |
1 0.000003 if exists("b:loaded_delimitMate") | |
return 1 | |
endif | |
1 0.000000 endif | |
" Initialize settings: | |
1 0.001561 0.000007 if ! s:init() | |
" Something went wrong. | |
return | |
endif | |
1 0.000004 if enable || swap || !get(g:, 'delimitMate_offByDefault', 0) | |
" Now, add magic: | |
1 0.001183 0.000011 call s:Map() | |
1 0.000001 if a:0 | |
echo "delimitMate is enabled." | |
endif | |
1 0.000000 endif | |
FUNCTION <SNR>55_set() | |
Called 23 times | |
Total time: 0.000688 | |
Self time: 0.000099 | |
count total (s) self (s) | |
23 0.000681 0.000092 return call('delimitMate#Set', a:000) | |
FUNCTION <SNR>56_is_cr_expansion() | |
Called 2 times | |
Total time: 0.000179 | |
Self time: 0.000096 | |
count total (s) self (s) | |
2 0.000011 let nchar = getline(line('.')-1)[-1:] | |
2 0.000020 let schar = matchstr(getline(line('.')+1), '^\s*\zs\S') | |
2 0.000011 let isEmpty = a:0 ? getline('.') =~ '^\s*$' : empty(getline('.')) | |
2 0.000063 0.000021 if index(s:get('left_delims'), nchar) > -1 && index(s:get('left_delims'), nchar) == index(s:get('right_delims'), schar) && isEmpty | |
return 1 | |
elseif index(s:get('quotes_list'), nchar) > -1 && index(s:get('quotes_list'), nchar) == index(s:get('quotes_list'), schar) && isEmpty | |
return 1 | |
else | |
2 0.000002 return 0 | |
endif | |
FUNCTION airline#util#getwinvar() | |
Called 21 times | |
Total time: 0.000065 | |
Self time: 0.000065 | |
count total (s) self (s) | |
21 0.000056 return getwinvar(a:winnr, a:key, a:def) | |
FUNCTION <SNR>89_add_section() | |
Called 11 times | |
Total time: 0.000655 | |
Self time: 0.000246 | |
count total (s) self (s) | |
11 0.000039 let condition = (a:key is# "warning" || a:key is# "error") && (v:version == 704 && !has("patch1511")) | |
" i have no idea why the warning section needs special treatment, but it's | |
" needed to prevent separators from showing up | |
11 0.000108 0.000048 if ((a:key == 'error' || a:key == 'warning') && empty(s:get_section(a:context.winnr, a:key))) | |
1 0.000000 return | |
endif | |
10 0.000008 if condition | |
call a:builder.add_raw('%(') | |
endif | |
10 0.000419 0.000070 call a:builder.add_section('airline_'.a:key, s:get_section(a:context.winnr, a:key)) | |
10 0.000009 if condition | |
call a:builder.add_raw('%)') | |
endif | |
FUNCTION <SNR>84_get_array() | |
Called 1869 times | |
Total time: 0.019279 | |
Self time: 0.019279 | |
count total (s) self (s) | |
1869 0.007808 let opts=empty(a:opts) ? '' : join(a:opts, ',') | |
1869 0.010121 return g:airline_gui_mode ==# 'gui' ? [ a:fg, a:bg, '', '', opts ] : [ '', '', a:fg, a:bg, opts ] | |
FUNCTION <SNR>96_OnFileReadyToParse() | |
Called 3 times | |
Total time: 0.004818 | |
Self time: 0.004525 | |
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. | |
3 0.000008 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. | |
3 0.000311 0.000018 if force_parsing || s:Pyeval( "ycm_state.NeedsReparse()" ) | |
2 0.004403 exec s:python_command "ycm_state.OnFileReadyToParse()" | |
2 0.000026 call timer_stop( s:pollers.file_parse_response.id ) | |
2 0.000034 let s:pollers.file_parse_response.id = timer_start( s:pollers.file_parse_response.wait_milliseconds, function( 's:PollFileParseResponse' ) ) | |
2 0.000004 endif | |
FUNCTION color_coded#clear_matches() | |
Called 256 times | |
Total time: 0.039412 | |
Self time: 0.039412 | |
count total (s) self (s) | |
256 0.000376 try | |
256 0.001184 if has_key(g:color_coded_matches, a:file) == 1 | |
7851 0.008271 for id in g:color_coded_matches[a:file] | |
7597 0.016535 call matchdelete(id) | |
7597 0.005915 endfor | |
254 0.000230 endif | |
256 0.000273 catch | |
echomsg "color_coded caught: " . v:exception | |
finally | |
256 0.002359 let g:color_coded_matches[a:file] = [] | |
256 0.000305 endtry | |
FUNCTION <SNR>84_CheckDefined() | |
Called 539 times | |
Total time: 0.016128 | |
Self time: 0.016128 | |
count total (s) self (s) | |
" Checks, whether the definition of the colors is valid and is not empty or NONE | |
" e.g. if the colors would expand to this: | |
" hi airline_c ctermfg=NONE ctermbg=NONE | |
" that means to clear that highlighting group, therefore, fallback to Normal | |
" highlighting group for the cterm values | |
" This only works, if the Normal highlighting group is actually defined, so | |
" return early, if it has been cleared | |
539 0.002330 if !exists("g:airline#highlighter#normal_fg_hi") | |
let g:airline#highlighter#normal_fg_hi = synIDattr(synIDtrans(hlID('Normal')), 'fg', 'cterm') | |
endif | |
539 0.002220 if empty(g:airline#highlighter#normal_fg_hi) || g:airline#highlighter#normal_fg_hi < 0 | |
return a:colors | |
endif | |
539 0.001465 for val in a:colors | |
539 0.001827 if !empty(val) && val !=# 'NONE' | |
539 0.000815 return a:colors | |
endif | |
endfor | |
" this adds the bold attribute to the term argument of the :hi command, | |
" but at least this makes sure, the group will be defined | |
let fg = g:airline#highlighter#normal_fg_hi | |
let bg = synIDattr(synIDtrans(hlID('Normal')), 'bg', 'cterm') | |
if bg < 0 | |
" in case there is no background color defined for Normal | |
let bg = a:colors[3] | |
endif | |
return a:colors[0:1] + [fg, bg] + [a:colors[4]] | |
FUNCTION <SNR>96_OnCompleteDone() | |
Called 24 times | |
Total time: 0.004127 | |
Self time: 0.004127 | |
count total (s) self (s) | |
24 0.004098 exec s:python_command "ycm_state.OnCompleteDone()" | |
FUNCTION color_coded#enter() | |
Called 248 times | |
Total time: 0.574839 | |
Self time: 0.137091 | |
count total (s) self (s) | |
248 0.002085 if index(g:color_coded_filetypes, &ft) < 0 || g:color_coded_enabled == 0 | |
123 0.000139 return | |
endif | |
" Each new window controls highlighting separate from the buffer | |
125 0.005952 0.001190 if !exists("w:color_coded_own_syntax") || w:color_coded_name != color_coded#get_buffer_name() | |
" Preserve spell after ownsyntax clears it | |
1 0.000004 let s:keepspell = &spell | |
1 0.000008 if has('b:current_syntax') | |
execute 'ownsyntax ' . b:current_syntax | |
else | |
1 0.005510 0.000016 execute 'ownsyntax ' . &ft | |
1 0.000001 endif | |
1 0.000010 let &spell = s:keepspell | |
1 0.000003 unlet s:keepspell | |
1 0.000003 let w:color_coded_own_syntax = 1 | |
" Each window has a unique ID | |
1 0.000004 let w:color_coded_unique_counter = s:color_coded_unique_counter | |
1 0.000003 let s:color_coded_unique_counter += 1 | |
" Windows can be reused; clear it out if needed | |
1 0.000005 if exists("w:color_coded_name") | |
call color_coded#clear_matches(w:color_coded_name) | |
endif | |
1 0.000068 0.000009 let w:color_coded_name = color_coded#get_buffer_name() | |
1 0.000039 0.000007 call color_coded#clear_matches(w:color_coded_name) | |
1 0.000001 endif | |
125 0.000080 lua << EOF | |
local name, data = color_coded_buffer_details() | |
color_coded_enter(name, vim.eval('&ft'), data) | |
EOF | |
FUNCTION <SNR>70_LeadingSpaceDisable() | |
Called 1 time | |
Total time: 0.000014 | |
Self time: 0.000014 | |
count total (s) self (s) | |
1 0.000001 if g:indentLine_newVersion | |
1 0.000004 if exists("w:indentLine_leadingSpaceId") && ! empty(w:indentLine_leadingSpaceId) | |
for id in w:indentLine_leadingSpaceId | |
try | |
call matchdelete(id) | |
catch /^Vim\%((\a\+)\)\=:E80[23]/ | |
endtry | |
endfor | |
let w:indentLine_leadingSpaceId = [] | |
endif | |
1 0.000000 return | |
endif | |
let b:indentLine_leadingSpaceEnabled = 0 | |
try | |
syntax clear IndentLineLeadingSpace | |
catch /^Vim\%((\a\+)\)\=:E28/ " catch error E28 | |
endtry | |
FUNCTION airline#extensions#tabline#formatters#default#wrap_name() | |
Called 274 times | |
Total time: 0.006827 | |
Self time: 0.006827 | |
count total (s) self (s) | |
274 0.001103 let _ = s:buf_nr_show ? printf(s:buf_nr_format, a:bufnr) : '' | |
274 0.002174 let _ .= substitute(a:buffer_name, '\\', '/', 'g') | |
274 0.001463 if getbufvar(a:bufnr, '&modified') == 1 | |
274 0.000805 let _ .= s:buf_modified_symbol | |
274 0.000227 endif | |
274 0.000336 return _ | |
FUNCTION <SNR>56_get_char() | |
Called 12 times | |
Total time: 0.000373 | |
Self time: 0.000373 | |
count total (s) self (s) | |
12 0.000044 let idx = col('.') - 1 | |
12 0.000028 if !a:0 || (a:0 && a:1 >= 0) | |
" Get char from cursor. | |
6 0.000022 let line = getline('.')[idx :] | |
6 0.000012 let pos = a:0 ? a:1 : 0 | |
6 0.000053 return matchstr(line, '^'.repeat('.', pos).'\zs.') | |
endif | |
" Get char behind cursor. | |
6 0.000051 let line = getline('.')[: idx - 1] | |
6 0.000018 let pos = 0 - (1 + a:1) | |
6 0.000070 return matchstr(line, '.\ze'.repeat('.', pos).'$') | |
FUNCTION <SNR>88_section_is_empty() | |
Called 618 times | |
Total time: 0.006765 | |
Self time: 0.006765 | |
count total (s) self (s) | |
618 0.000991 let start=1 | |
" do not check for inactive windows or the tabline | |
618 0.001154 if a:self._context.active == 0 | |
5 0.000005 return 0 | |
elseif get(a:self._context, 'tabline', 0) | |
605 0.000672 return 0 | |
endif | |
" only check, if airline#skip_empty_sections == 1 | |
8 0.000018 if get(g:, 'airline_skip_empty_sections', 0) == 0 | |
8 0.000006 return 0 | |
endif | |
" only check, if airline#skip_empty_sections == 1 | |
if get(w:, 'airline_skip_empty_sections', -1) == 0 | |
return 0 | |
endif | |
" assume accents sections to be never empty | |
" (avoides, that on startup the mode message becomes empty) | |
if match(a:content, '%#__accent_[^#]*#.*__restore__#') > -1 | |
return 0 | |
endif | |
if empty(a:content) | |
return 1 | |
endif | |
let list=matchlist(a:content, '%{\zs.\{-}\ze}', 1, start) | |
if empty(list) | |
return 0 " no function in statusline text | |
endif | |
while len(list) > 0 | |
let expr = list[0] | |
try | |
" catch all exceptions, just in case | |
if !empty(eval(expr)) | |
return 0 | |
endif | |
catch | |
return 0 | |
endtry | |
let start += 1 | |
let list=matchlist(a:content, '%{\zs.\{-}\ze}', 1, start) | |
endw | |
return 1 | |
FUNCTION <SNR>96_OnTextChangedInsertMode() | |
Called 15 times | |
Total time: 0.054601 | |
Self time: 0.005745 | |
count total (s) self (s) | |
15 0.000947 0.000079 if !s:AllowedToCompleteInCurrentBuffer() | |
return | |
endif | |
15 0.000022 if s:completion_stopped | |
let s:completion_stopped = 0 | |
let s:completion = s:default_completion | |
return | |
endif | |
15 0.009656 0.000103 call s:IdentifierFinishedOperations() | |
" We have to make sure we correctly leave semantic mode even when the user | |
" inserts something like a "operator[]" candidate string which fails | |
" CurrentIdentifierFinished check. | |
15 0.000077 if s:force_semantic && !s:Pyeval( 'base.LastEnteredCharIsIdentifierChar()' ) | |
let s:force_semantic = 0 | |
endif | |
15 0.006034 0.000283 if &completefunc == "youcompleteme#CompleteFunc" && ( g:ycm_auto_trigger || s:force_semantic ) && !s:InsideCommentOrStringAndShouldStop() && !s:OnBlankLine() | |
" Immediately call previous completion to avoid flickers. | |
12 0.000322 0.000079 call s:Complete() | |
12 0.032524 0.000083 call s:InvokeCompletion() | |
12 0.000018 endif | |
15 0.004496 exec s:python_command "ycm_state.OnCursorMoved()" | |
15 0.000078 if g:ycm_autoclose_preview_window_after_completion | |
call s:ClosePreviewWindowIfNeeded() | |
endif | |
FUNCTION <SNR>88_get_prev_group() | |
Called 618 times | |
Total time: 0.009767 | |
Self time: 0.009767 | |
count total (s) self (s) | |
618 0.001406 let x = a:i - 1 | |
741 0.001148 while x >= 0 | |
618 0.001803 let group = a:sections[x][0] | |
618 0.001589 if group != '' && group != '|' | |
495 0.000705 return group | |
endif | |
123 0.000204 let x = x - 1 | |
123 0.000114 endwhile | |
123 0.000142 return '' | |
FUNCTION <SNR>88_get_accented_line() | |
Called 495 times | |
Total time: 0.026293 | |
Self time: 0.026293 | |
count total (s) self (s) | |
495 0.000897 if a:self._context.active | |
491 0.000867 let contents = [] | |
491 0.004630 let content_parts = split(a:contents, '__accent') | |
740 0.001532 for cpart in content_parts | |
249 0.002905 let accent = matchstr(cpart, '_\zs[^#]*\ze') | |
249 0.000921 call add(contents, cpart) | |
249 0.000270 endfor | |
491 0.001898 let line = join(contents, a:group) | |
491 0.003930 let line = substitute(line, '__restore__', a:group, 'g') | |
491 0.000500 else | |
4 0.000050 let line = substitute(a:contents, '%#__accent[^#]*#', '', 'g') | |
4 0.000023 let line = substitute(line, '%#__restore__#', '', 'g') | |
4 0.000004 endif | |
495 0.000670 return line | |
FUNCTION airline#extensions#tabline#group_of_bufnr() | |
Called 121 times | |
Total time: 0.003578 | |
Self time: 0.003578 | |
count total (s) self (s) | |
121 0.000442 let cur = bufnr('%') | |
121 0.000203 if cur == a:bufnr | |
61 0.000277 if g:airline_detect_modified && getbufvar(a:bufnr, '&modified') | |
61 0.000111 let group = 'airline_tabmod' | |
61 0.000057 else | |
let group = 'airline_tabsel' | |
endif | |
61 0.000044 else | |
60 0.000296 if g:airline_detect_modified && getbufvar(a:bufnr, '&modified') | |
60 0.000125 let group = 'airline_tabmod_unsel' | |
60 0.000149 elseif index(a:tab_bufs, a:bufnr) > -1 | |
let group = 'airline_tab' | |
else | |
let group = 'airline_tabhid' | |
endif | |
60 0.000043 endif | |
121 0.000163 return group | |
FUNCTION <SNR>96_InvokeCompletion() | |
Called 12 times | |
Total time: 0.032441 | |
Self time: 0.022836 | |
count total (s) self (s) | |
12 0.022553 exec s:python_command "ycm_state.SendCompletionRequest(" . "vimsupport.GetBoolValue( 's:force_semantic' ) )" | |
12 0.009854 0.000249 call s:PollCompletion() | |
FUNCTION delimitMate#WithinEmptyPair() | |
Called 2 times | |
Total time: 0.000225 | |
Self time: 0.000068 | |
count total (s) self (s) | |
" if cursor is at column 1 return 0 | |
2 0.000006 if col('.') == 1 | |
return 0 | |
endif | |
" get char before the cursor. | |
2 0.000102 0.000021 let char1 = s:get_char(-1) | |
" get char under the cursor. | |
2 0.000060 0.000011 let char2 = s:get_char(0) | |
2 0.000046 0.000019 return delimitMate#IsEmptyPair( char1.char2 ) | |
FUNCTION airline#highlighter#highlight() | |
Called 3 times | |
Total time: 0.084296 | |
Self time: 0.007964 | |
count total (s) self (s) | |
3 0.000007 let bufnr = a:0 ? a:1 : '' | |
3 0.000011 let p = g:airline#themes#{g:airline_theme}#palette | |
" draw the base mode, followed by any overrides | |
3 0.000045 let mapped = map(a:modes, 'v:val == a:modes[0] ? v:val : a:modes[0]."_".v:val') | |
3 0.000010 let suffix = a:modes[0] == 'inactive' ? '_inactive' : '' | |
9 0.000017 for mode in mapped | |
6 0.000017 if mode == 'inactive' && winnr('$') == 1 | |
" there exist no inactive windows, don't need to create all those | |
" highlighting groups | |
continue | |
endif | |
6 0.000039 if exists('g:airline#themes#{g:airline_theme}#palette[mode]') | |
5 0.000018 let dict = g:airline#themes#{g:airline_theme}#palette[mode] | |
45 0.000143 for kvp in items(dict) | |
40 0.000120 let mode_colors = kvp[1] | |
40 0.000098 let name = kvp[0] | |
40 0.000149 if name is# 'airline_c' && !empty(bufnr) && suffix is# '_inactive' | |
2 0.000006 let name = 'airline_c'.bufnr | |
2 0.000002 endif | |
40 0.012716 0.000370 call airline#highlighter#exec(name.suffix, mode_colors) | |
120 0.000320 for accent in keys(s:accents) | |
80 0.000268 if !has_key(p.accents, accent) | |
continue | |
endif | |
80 0.000385 let colors = copy(mode_colors) | |
80 0.000298 if p.accents[accent][0] != '' | |
40 0.000143 let colors[0] = p.accents[accent][0] | |
40 0.000033 endif | |
80 0.000228 if p.accents[accent][2] != '' | |
let colors[2] = p.accents[accent][2] | |
endif | |
80 0.000198 if len(colors) >= 5 | |
80 0.000372 let colors[4] = get(p.accents[accent], 4, '') | |
80 0.000076 else | |
call add(colors, get(p.accents[accent], 4, '')) | |
endif | |
80 0.028744 0.000865 call airline#highlighter#exec(name.suffix.'_'.accent, colors) | |
80 0.000097 endfor | |
40 0.000036 endfor | |
" TODO: optimize this | |
58 0.000185 for sep in items(s:separators) | |
53 0.036765 0.000658 call <sid>exec_separator(dict, sep[1][0], sep[1][1], sep[1][2], suffix) | |
53 0.000066 endfor | |
5 0.000006 endif | |
6 0.000006 endfor | |
FUNCTION airline#parts#ffenc() | |
Called 287 times | |
Total time: 0.009012 | |
Self time: 0.009012 | |
count total (s) self (s) | |
287 0.001446 let expected = get(g:, 'airline#parts#ffenc#skip_expected_string', '') | |
287 0.000731 let bomb = &l:bomb ? '[BOM]' : '' | |
287 0.003009 let ff = strlen(&ff) ? '['.&ff.']' : '' | |
287 0.001583 if expected is# &fenc.bomb.ff | |
return '' | |
else | |
287 0.001171 return &fenc.bomb.ff | |
endif | |
FUNCTION <SNR>96_IdentifierFinishedOperations() | |
Called 15 times | |
Total time: 0.009553 | |
Self time: 0.005073 | |
count total (s) self (s) | |
15 0.004576 0.000096 if !s:Pyeval( 'base.CurrentIdentifierFinished()' ) | |
11 0.000023 return | |
endif | |
4 0.004853 exec s:python_command "ycm_state.OnCurrentIdentifierFinished()" | |
4 0.000041 let s:force_semantic = 0 | |
4 0.000026 let s:completion = s:default_completion | |
FUNCTION <SNR>55_get() | |
Called 32 times | |
Total time: 0.000732 | |
Self time: 0.000116 | |
count total (s) self (s) | |
32 0.000724 0.000108 return call('delimitMate#Get', a:000) | |
FUNCTION <SNR>20_on_window_changed() | |
Called 125 times | |
Total time: 0.009068 | |
Self time: 0.003850 | |
count total (s) self (s) | |
125 0.000671 if pumvisible() && (!&previewwindow || g:airline_exclude_preview) | |
63 0.000063 return | |
endif | |
" Handle each window only once, since we might come here several times for | |
" different autocommands. | |
62 0.001009 let l:key = [bufnr('%'), winnr(), winnr('$'), tabpagenr(), &ft] | |
62 0.001500 if get(g:, 'airline_last_window_changed', []) == l:key && &stl is# '%!airline#statusline('.winnr().')' && &ft !~? 'gitcommit' | |
" fugitive is special, it changes names and filetypes several times, | |
" make sure the caching does not get into its way | |
61 0.000097 return | |
endif | |
1 0.000004 let g:airline_last_window_changed = l:key | |
1 0.000009 0.000006 call s:init() | |
1 0.005222 0.000007 call airline#update_statusline() | |
FUNCTION <SNR>84_hl_group_exists() | |
Called 452 times | |
Total time: 0.006434 | |
Self time: 0.006434 | |
count total (s) self (s) | |
452 0.001660 if !hlexists(a:group) | |
return 0 | |
elseif empty(synIDattr(hlID(a:group), 'fg')) | |
return 0 | |
endif | |
452 0.000422 return 1 | |
FUNCTION <SNR>96_OnTextChangedNormalMode() | |
Called 2 times | |
Total time: 0.003436 | |
Self time: 0.000034 | |
count total (s) self (s) | |
2 0.000130 0.000011 if !s:AllowedToCompleteInCurrentBuffer() | |
return | |
endif | |
2 0.003298 0.000015 call s:OnFileReadyToParse() | |
FUNCTION delimitMate#Get() | |
Called 32 times | |
Total time: 0.000616 | |
Self time: 0.000118 | |
count total (s) self (s) | |
32 0.000607 0.000109 return call('s:get', a:000) | |
FUNCTION <SNR>77_update_tabline() | |
Called 1 time | |
Total time: 0.000011 | |
Self time: 0.000011 | |
count total (s) self (s) | |
1 0.000004 if get(g:, 'airline#extensions#tabline#disable_refresh', 0) | |
return | |
endif | |
1 0.000003 let match = expand('<afile>') | |
1 0.000002 if pumvisible() | |
1 0.000001 return | |
elseif !get(g:, 'airline#extensions#tabline#enabled', 0) | |
return | |
" return, if buffer matches ignore pattern or is directory (netrw) | |
elseif empty(match) || match(match, s:ignore_bufadd_pat) > -1 || isdirectory(expand("<afile>")) | |
return | |
endif | |
doautocmd User BufMRUChange | |
FUNCTION <SNR>88_should_change_group() | |
Called 249 times | |
Total time: 0.084833 | |
Self time: 0.006142 | |
count total (s) self (s) | |
249 0.000656 if a:group1 == a:group2 | |
return 0 | |
endif | |
249 0.043750 0.001525 let color1 = airline#highlighter#get_highlight(a:group1) | |
249 0.037818 0.001352 let color2 = airline#highlighter#get_highlight(a:group2) | |
249 0.000485 if g:airline_gui_mode ==# 'gui' | |
249 0.001289 return color1[1] != color2[1] || color1[0] != color2[0] | |
else | |
return color1[3] != color2[3] || color1[2] != color2[2] | |
endif | |
FUNCTION airline#parts#paste() | |
Called 49 times | |
Total time: 0.000168 | |
Self time: 0.000168 | |
count total (s) self (s) | |
49 0.000143 return g:airline_detect_paste && &paste ? g:airline_symbols.paste : '' | |
FUNCTION airline#update_statusline() | |
Called 1 time | |
Total time: 0.005215 | |
Self time: 0.000097 | |
count total (s) self (s) | |
1 0.000011 0.000007 if airline#util#getwinvar(winnr(), 'airline_disabled', 0) | |
return | |
endif | |
2 0.000009 for nr in filter(range(1, winnr('$')), 'v:val != winnr()') | |
1 0.000007 0.000004 if airline#util#getwinvar(nr, 'airline_disabled', 0) | |
continue | |
endif | |
1 0.000003 call setwinvar(nr, 'airline_active', 0) | |
1 0.000005 let context = { 'winnr': nr, 'active': 0, 'bufnr': winbufnr(nr) } | |
1 0.001887 0.000014 call s:invoke_funcrefs(context, s:inactive_funcrefs) | |
1 0.000001 endfor | |
1 0.000003 unlet! w:airline_render_left w:airline_render_right | |
1 0.000012 exe 'unlet! ' 'w:airline_section_'. join(s:sections, ' w:airline_section_') | |
1 0.000002 let w:airline_active = 1 | |
1 0.000006 let context = { 'winnr': winnr(), 'active': 1, 'bufnr': winbufnr(winnr()) } | |
1 0.003252 0.000014 call s:invoke_funcrefs(context, g:airline_statusline_funcrefs) | |
FUNCTION <SNR>70_IndentLinesDisable() | |
Called 1 time | |
Total time: 0.000121 | |
Self time: 0.000121 | |
count total (s) self (s) | |
1 0.000001 if g:indentLine_newVersion | |
1 0.000005 if exists("w:indentLine_indentLineId") && ! empty(w:indentLine_indentLineId) | |
21 0.000012 for id in w:indentLine_indentLineId | |
20 0.000013 try | |
20 0.000039 call matchdelete(id) | |
20 0.000015 catch /^Vim\%((\a\+)\)\=:E80[23]/ | |
endtry | |
20 0.000009 endfor | |
1 0.000004 let w:indentLine_indentLineId = [] | |
1 0.000001 endif | |
1 0.000001 return | |
endif | |
let b:indentLine_enabled = 0 | |
try | |
syntax clear IndentLine | |
syntax clear IndentLineSpace | |
catch /^Vim\%((\a\+)\)\=:E28/ " catch error E28 | |
endtry | |
FUNCTION <SNR>84_get_syn() | |
Called 3738 times | |
Total time: 0.147450 | |
Self time: 0.147450 | |
count total (s) self (s) | |
3738 0.013361 if !exists("g:airline_gui_mode") | |
let g:airline_gui_mode = airline#init#gui_mode() | |
endif | |
3738 0.005269 let color = '' | |
3738 0.019737 if hlexists(a:group) | |
3578 0.029288 let color = synIDattr(synIDtrans(hlID(a:group)), a:what, g:airline_gui_mode) | |
3578 0.003283 endif | |
3738 0.010642 if empty(color) || color == -1 | |
" should always exists | |
282 0.004943 let color = synIDattr(synIDtrans(hlID('Normal')), a:what, g:airline_gui_mode) | |
" however, just in case | |
282 0.000939 if empty(color) || color == -1 | |
let color = 'NONE' | |
endif | |
282 0.000211 endif | |
3738 0.004643 return color | |
FUNCTION airline#parts#readonly() | |
Called 180 times | |
Total time: 0.001598 | |
Self time: 0.001598 | |
count total (s) self (s) | |
180 0.000658 if &readonly && !filereadable(bufname('%')) | |
return '[noperm]' | |
else | |
180 0.000359 return &readonly ? g:airline_symbols.readonly : '' | |
endif | |
FUNCTION <SNR>44_SaveNERDTreeViewIfPossible() | |
Called 124 times | |
Total time: 0.002308 | |
Self time: 0.002308 | |
count total (s) self (s) | |
124 0.000798 if exists("t:NERDTreeBufName") && bufwinnr(t:NERDTreeBufName) == winnr() | |
" save scroll and cursor etc. | |
let s:nerdtree_view = winsaveview() | |
" save NERDTree window width | |
let s:nerdtree_width = winwidth(winnr()) | |
" save buffer name (to be able to correct desync by commands spawning | |
" a new NERDTree instance) | |
let s:nerdtree_buffer = bufname("%") | |
endif | |
FUNCTION airline#highlighter#exec() | |
Called 539 times | |
Total time: 0.152584 | |
Self time: 0.046766 | |
count total (s) self (s) | |
539 0.001235 if pumvisible() | |
return | |
endif | |
539 0.000963 let colors = a:colors | |
539 0.000810 if s:is_win32term | |
let colors[2] = s:gui2cui(get(colors, 0, ''), get(colors, 2, '')) | |
let colors[3] = s:gui2cui(get(colors, 1, ''), get(colors, 3, '')) | |
endif | |
539 0.081523 0.002939 let old_hi = airline#highlighter#get_highlight(a:group) | |
539 0.001477 if len(colors) == 4 | |
420 0.001391 call add(colors, '') | |
420 0.000332 endif | |
539 0.000995 if g:airline_gui_mode ==# 'gui' | |
539 0.003082 let new_hi = [colors[0], colors[1], '', '', colors[4]] | |
539 0.000477 else | |
let new_hi = ['', '', printf("%s", colors[2]), printf("%s", colors[3]), colors[4]] | |
endif | |
539 0.019017 0.002889 let colors = s:CheckDefined(colors) | |
539 0.009764 0.003330 if old_hi != new_hi || !s:hl_group_exists(a:group) | |
87 0.007527 0.002855 let cmd = printf('hi %s %s %s %s %s %s %s %s', a:group, s:Get(colors, 0, 'guifg='), s:Get(colors, 1, 'guibg='), s:Get(colors, 2, 'ctermfg='), s:Get(colors, 3, 'ctermbg='), s:Get(colors, 4, 'gui='), s:Get(colors, 4, 'cterm='), s:Get(colors, 4, 'term=')) | |
87 0.003126 exe cmd | |
87 0.000384 if has_key(s:hl_groups, a:group) | |
87 0.000259 let s:hl_groups[a:group] = colors | |
87 0.000075 endif | |
87 0.000061 endif | |
FUNCTION airline#extensions#whitespace#check() | |
Called 156 times | |
Total time: 0.010155 | |
Self time: 0.009217 | |
count total (s) self (s) | |
156 0.000833 let max_lines = get(g:, 'airline#extensions#whitespace#max_lines', 20000) | |
156 0.000892 if &readonly || !&modifiable || !s:enabled || line('$') > max_lines || get(b:, 'airline_whitespace_disabled', 0) | |
107 0.000132 return '' | |
endif | |
49 0.001724 if !exists('b:airline_whitespace_check') | |
let b:airline_whitespace_check = '' | |
let checks = get(b:, 'airline_whitespace_checks', get(g:, 'airline#extensions#whitespace#checks', s:default_checks)) | |
let trailing = 0 | |
if index(checks, 'trailing') > -1 | |
try | |
let regexp = get(g:, 'airline#extensions#whitespace#trailing_regexp', '\s$') | |
let trailing = search(regexp, 'nw') | |
catch | |
echomsg 'airline#whitespace: error occured evaluating '. regexp | |
echomsg v:exception | |
return '' | |
endtry | |
endif | |
let mixed = 0 | |
let check = 'indent' | |
if index(checks, check) > -1 && index(get(s:skip_check_ft, &ft, []), check) < 0 | |
let mixed = s:check_mixed_indent() | |
endif | |
let mixed_file = '' | |
let check = 'mixed-indent-file' | |
if index(checks, check) > -1 && index(get(s:skip_check_ft, &ft, []), check) < 0 | |
let mixed_file = s:check_mixed_indent_file() | |
endif | |
let long = 0 | |
if index(checks, 'long') > -1 && &tw > 0 | |
let long = search('\%>'.&tw.'v.\+', 'nw') | |
endif | |
if trailing != 0 || mixed != 0 || long != 0 || !empty(mixed_file) | |
let b:airline_whitespace_check = s:symbol | |
if strlen(s:symbol) > 0 | |
let space = (g:airline_symbols.space) | |
else | |
let space = '' | |
endif | |
if s:show_message | |
if trailing != 0 | |
let trailing_fmt = get(g:, 'airline#extensions#whitespace#trailing_format', '[%s]trailing') | |
let b:airline_whitespace_check .= space.printf(trailing_fmt, trailing) | |
endif | |
if mixed != 0 | |
let mixed_indent_fmt = get(g:, 'airline#extensions#whitespace#mixed_indent_format', '[%s]mixed-indent') | |
let b:airline_whitespace_check .= space.printf(mixed_indent_fmt, mixed) | |
endif | |
if long != 0 | |
let long_fmt = get(g:, 'airline#extensions#whitespace#long_format', '[%s]long') | |
let b:airline_whitespace_check .= space.printf(long_fmt, long) | |
endif | |
if !empty(mixed_file) | |
let mixed_indent_file_fmt = get(g:, 'airline#extensions#whitespace#mixed_indent_file_format', '[%s]mix-indent-file') | |
let b:airline_whitespace_check .= space.printf(mixed_indent_file_fmt, mixed_file) | |
endif | |
endif | |
endif | |
endif | |
49 0.001285 0.000347 return airline#util#shorten(b:airline_whitespace_check, 120, 9) | |
FUNCTION <SNR>56_is_excluded_ft() | |
Called 2 times | |
Total time: 0.000022 | |
Self time: 0.000022 | |
count total (s) self (s) | |
2 0.000014 if !exists("g:delimitMate_excluded_ft") | |
2 0.000005 return 0 | |
endif | |
return index(split(g:delimitMate_excluded_ft, ','), a:ft, 0, 1) >= 0 | |
FUNCTION <SNR>4_BMHash() | |
Called 1 time | |
Total time: 0.000034 | |
Self time: 0.000034 | |
count total (s) self (s) | |
" Make name all upper case, so that chars are between 32 and 96 | |
1 0.000009 let nm = substitute(a:name, ".*", '\U\0', "") | |
1 0.000004 if has("ebcdic") | |
" HACK: Replace all non alphabetics with 'Z' | |
" Just to make it work for now. | |
let nm = substitute(nm, "[^A-Z]", 'Z', "g") | |
let sp = char2nr('A') - 1 | |
else | |
1 0.000003 let sp = char2nr(' ') | |
1 0.000000 endif | |
" convert first six chars into a number for sorting: | |
1 0.000013 return (char2nr(nm[0]) - sp) * 0x800000 + (char2nr(nm[1]) - sp) * 0x20000 + (char2nr(nm[2]) - sp) * 0x1000 + (char2nr(nm[3]) - sp) * 0x80 + (char2nr(nm[4]) - sp) * 0x20 + (char2nr(nm[5]) - sp) | |
FUNCTION airline#extensions#tabline#formatters#default#format() | |
Called 274 times | |
Total time: 0.045501 | |
Self time: 0.038674 | |
count total (s) self (s) | |
274 0.001335 let fmod = get(g:, 'airline#extensions#tabline#fnamemod', ':~:.') | |
274 0.000406 let _ = '' | |
274 0.001038 let name = bufname(a:bufnr) | |
274 0.000630 if empty(name) | |
let _ .= '[No Name]' | |
else | |
274 0.000418 if s:fnamecollapse | |
274 0.026697 let _ .= substitute(fnamemodify(name, fmod), '\v\w\zs.{-}\ze(\\|/)', '', 'g') | |
274 0.000448 else | |
let _ .= fnamemodify(name, fmod) | |
endif | |
274 0.001685 if a:bufnr != bufnr('%') && s:fnametruncate && strlen(_) > s:fnametruncate | |
let _ = strpart(_, 0, s:fnametruncate) | |
endif | |
274 0.000195 endif | |
274 0.008832 0.002005 return airline#extensions#tabline#formatters#default#wrap_name(a:bufnr, _) | |
FUNCTION <SNR>4_BMAdd() | |
Called 1 time | |
Total time: 0.000262 | |
Self time: 0.000026 | |
count total (s) self (s) | |
1 0.000002 if s:bmenu_wait == 0 | |
" when adding too many buffers, redraw in short format | |
1 0.000002 if s:bmenu_count == &menuitems && s:bmenu_short == 0 | |
call s:BMShow() | |
else | |
1 0.000248 0.000012 call <SID>BMFilename(expand("<afile>"), expand("<abuf>")) | |
1 0.000002 let s:bmenu_count = s:bmenu_count + 1 | |
1 0.000000 endif | |
1 0.000001 endif | |
FUNCTION <SNR>84_exec_separator() | |
Called 425 times | |
Total time: 0.266186 | |
Self time: 0.020297 | |
count total (s) self (s) | |
425 0.001107 if pumvisible() | |
9 0.000008 return | |
endif | |
416 0.072366 0.002981 let l:from = airline#themes#get_highlight(a:from.a:suffix) | |
416 0.067925 0.002735 let l:to = airline#themes#get_highlight(a:to.a:suffix) | |
416 0.001796 let group = a:from.'_to_'.a:to.a:suffix | |
416 0.000573 if a:inverse | |
141 0.000917 let colors = [ l:from[1], l:to[1], l:from[3], l:to[3] ] | |
141 0.000136 else | |
275 0.001735 let colors = [ l:to[1], l:from[1], l:to[3], l:from[3] ] | |
275 0.000259 endif | |
416 0.001390 let a:dict[group] = colors | |
416 0.114695 0.003381 call airline#highlighter#exec(group, colors) | |
FUNCTION <SNR>55_Map() | |
Called 1 time | |
Total time: 0.001172 | |
Self time: 0.000132 | |
count total (s) self (s) | |
" Set mappings: | |
1 0.000001 try | |
1 0.000002 let save_keymap = &keymap | |
1 0.000002 let save_iminsert = &iminsert | |
1 0.000001 let save_imsearch = &imsearch | |
1 0.000005 let save_cpo = &cpo | |
1 0.000012 set keymap= | |
1 0.000005 set cpo&vim | |
1 0.000053 0.000050 silent! doautocmd <nomodeline> User delimitMate_map | |
1 0.000032 0.000005 if s:get('autoclose') | |
1 0.000799 0.000008 call s:AutoClose() | |
1 0.000000 else | |
call s:NoAutoClose() | |
endif | |
1 0.000227 0.000008 call s:ExtraMappings() | |
1 0.000001 finally | |
1 0.000010 let &cpo = save_cpo | |
1 0.000006 let &keymap = save_keymap | |
1 0.000005 let &iminsert = save_iminsert | |
1 0.000002 let &imsearch = save_imsearch | |
1 0.000001 endtry | |
1 0.000002 let b:delimitMate_enabled = 1 | |
FUNCTION <SNR>96_InsideCommentOrStringAndShouldStop() | |
Called 15 times | |
Total time: 0.002043 | |
Self time: 0.000294 | |
count total (s) self (s) | |
15 0.001857 0.000108 let retval = s:InsideCommentOrString() | |
15 0.000036 let inside_comment = retval == 1 | |
15 0.000024 let inside_string = retval == 2 | |
15 0.000047 if inside_comment && g:ycm_complete_in_comments || inside_string && g:ycm_complete_in_strings | |
return 0 | |
endif | |
15 0.000018 return retval | |
FUNCTION <SNR>44_WinLeaveHandler() | |
Called 124 times | |
Total time: 0.004159 | |
Self time: 0.001851 | |
count total (s) self (s) | |
124 0.000335 if s:disable_handlers_for_tabdo | |
return | |
endif | |
124 0.000237 if g:nerdtree_tabs_synchronize_view | |
124 0.003004 0.000696 call s:SaveNERDTreeViewIfPossible() | |
124 0.000106 endif | |
FUNCTION <SNR>89_build_sections() | |
Called 3 times | |
Total time: 0.000790 | |
Self time: 0.000135 | |
count total (s) self (s) | |
16 0.000017 for key in a:keys | |
13 0.000030 if (key == 'warning' || key == 'error') && !a:context.active | |
2 0.000000 continue | |
endif | |
11 0.000701 0.000046 call s:add_section(a:builder, a:context, key) | |
11 0.000005 endfor | |
FUNCTION airline#parts#spell() | |
Called 49 times | |
Total time: 0.001616 | |
Self time: 0.001616 | |
count total (s) self (s) | |
49 0.000756 let spelllang = g:airline_detect_spelllang ? printf(" [%s]", toupper(substitute(&spelllang, ',', '/', 'g'))) : '' | |
49 0.000109 if g:airline_detect_spell && &spell | |
if winwidth(0) >= 90 | |
return g:airline_symbols.spell . spelllang | |
elseif winwidth(0) >= 70 | |
return g:airline_symbols.spell | |
else | |
return split(g:airline_symbols.spell, '\zs')[0] | |
endif | |
endif | |
49 0.000052 return '' | |
FUNCTION <SNR>72_sync_active_winnr() | |
Called 2 times | |
Total time: 0.000021 | |
Self time: 0.000021 | |
count total (s) self (s) | |
2 0.000012 if exists('#airline') && winnr() != s:active_winnr | |
call airline#update_statusline() | |
endif | |
FUNCTION <SNR>21_invoke_funcrefs() | |
Called 2 times | |
Total time: 0.005111 | |
Self time: 0.000087 | |
count total (s) self (s) | |
2 0.000049 0.000008 let builder = airline#builder#new(a:context) | |
2 0.001354 0.000023 let err = airline#util#exec_funcrefs(a:funcrefs + s:core_funcrefs, builder, a:context) | |
2 0.000002 if err == 1 | |
2 0.003668 0.000016 let a:context.line = builder.build() | |
2 0.000014 let s:contexts[a:context.winnr] = a:context | |
2 0.000022 call setwinvar(a:context.winnr, '&statusline', '%!airline#statusline('.a:context.winnr.')') | |
2 0.000002 endif | |
FUNCTION <SNR>88_get_transitioned_seperator() | |
Called 372 times | |
Total time: 0.247610 | |
Self time: 0.009907 | |
count total (s) self (s) | |
372 0.000637 let line = '' | |
372 0.240513 0.002810 call airline#highlighter#add_separator(a:prev_group, a:group, a:side) | |
372 0.002254 let line .= '%#'.a:prev_group.'_to_'.a:group.'#' | |
372 0.001717 let line .= a:side ? a:self._context.left_sep : a:self._context.right_sep | |
372 0.001301 let line .= '%#'.a:group.'#' | |
372 0.000542 return line | |
FUNCTION airline#parts#crypt() | |
Called 49 times | |
Total time: 0.000351 | |
Self time: 0.000351 | |
count total (s) self (s) | |
49 0.000311 return g:airline_detect_crypt && exists("+key") && !empty(&key) ? g:airline_symbols.crypt : '' | |
FUNCTION airline#extensions#keymap#status() | |
Called 49 times | |
Total time: 0.000723 | |
Self time: 0.000723 | |
count total (s) self (s) | |
49 0.000353 if (get(g:, 'airline#extensions#keymap#enabled', 1) && has('keymap')) | |
49 0.000320 return printf('%s', (!empty(&keymap) ? (g:airline_symbols.keymap . ' '. &keymap) : '')) | |
else | |
return '' | |
endif | |
FUNCTION <SNR>96_AllowedToCompleteInCurrentBuffer() | |
Called 82 times | |
Total time: 0.002499 | |
Self time: 0.000563 | |
count total (s) self (s) | |
82 0.002454 0.000518 return s:AllowedToCompleteInBuffer( '%' ) | |
FUNCTION <SNR>4_BMMunge() | |
Called 1 time | |
Total time: 0.000070 | |
Self time: 0.000047 | |
count total (s) self (s) | |
1 0.000002 let name = a:fname | |
1 0.000001 if name == '' | |
1 0.000002 if !exists("g:menutrans_no_file") | |
1 0.000003 let g:menutrans_no_file = "[No file]" | |
1 0.000000 endif | |
1 0.000002 let name = g:menutrans_no_file | |
1 0.000000 else | |
let name = fnamemodify(name, ':p:~') | |
endif | |
" detach file name and separate it out: | |
1 0.000003 let name2 = fnamemodify(name, ':t') | |
1 0.000002 if a:bnum >= 0 | |
1 0.000003 let name2 = name2 . ' (' . a:bnum . ')' | |
1 0.000000 endif | |
1 0.000032 0.000009 let name = name2 . "\t" . <SID>BMTruncName(fnamemodify(name,':h')) | |
1 0.000004 let name = escape(name, "\\. \t|") | |
1 0.000005 let name = substitute(name, "&", "&&", "g") | |
1 0.000004 let name = substitute(name, "\n", "^@", "g") | |
1 0.000001 return name | |
FUNCTION <SNR>56_set() | |
Called 23 times | |
Total time: 0.000490 | |
Self time: 0.000490 | |
count total (s) self (s) | |
23 0.000030 let scope = a:0 ? a:1 : 's' | |
23 0.000046 let bufnr = bufnr('%') | |
23 0.000058 if !exists('s:options[bufnr]') | |
1 0.000003 let s:options[bufnr] = {} | |
1 0.000000 endif | |
23 0.000026 if scope == 's' | |
23 0.000062 let name = 's:options.' . bufnr . '.' . a:name | |
23 0.000010 else | |
let name = scope . ':delimitMate_' . a:name | |
if exists('name') | |
exec 'unlet! ' . name | |
endif | |
endif | |
23 0.000096 exec 'let ' . name . ' = a:value' | |
FUNCTION airline#parts#mode() | |
Called 49 times | |
Total time: 0.001530 | |
Self time: 0.000496 | |
count total (s) self (s) | |
49 0.001486 0.000452 return airline#util#shorten(get(w:, 'airline_current_mode', ''), 79, 1) | |
FUNCTION airline#extensions#tabline#buflist#invalidate() | |
Called 125 times | |
Total time: 0.000561 | |
Self time: 0.000561 | |
count total (s) self (s) | |
125 0.000445 unlet! s:current_buffer_list | |
FUNCTION airline#extensions#quickfix#apply() | |
Called 1 time | |
Total time: 0.000009 | |
Self time: 0.000009 | |
count total (s) self (s) | |
1 0.000002 if &buftype == 'quickfix' | |
let w:airline_section_a = s:get_text() | |
let w:airline_section_b = '%{get(w:, "quickfix_title", "")}' | |
let w:airline_section_c = '' | |
let w:airline_section_x = '' | |
endif | |
FUNCTION airline#extensions#wordcount#apply() | |
Called 1 time | |
Total time: 0.000016 | |
Self time: 0.000016 | |
count total (s) self (s) | |
1 0.000012 if match(&ft, get(g:, 'airline#extensions#wordcount#filetypes')) > -1 | |
call airline#extensions#prepend_to_section('z', '%{get(b:, "airline_wordcount", "")}') | |
endif | |
FUNCTION <SNR>70_IndentLinesEnable() | |
Called 125 times | |
Total time: 0.113079 | |
Self time: 0.111117 | |
count total (s) self (s) | |
125 0.000240 if g:indentLine_newVersion | |
125 0.000203 if &diff | |
return | |
endif | |
125 0.000504 if exists("b:indentLine_enabled") && b:indentLine_enabled == 0 | |
return | |
endif | |
125 0.000454 if !exists("w:indentLine_indentLineId") | |
1 0.000002 let w:indentLine_indentLineId = [] | |
1 0.000001 endif | |
125 0.002551 0.000589 call s:SetConcealOption() | |
125 0.000212 if g:indentLine_showFirstIndentLevel | |
call add(w:indentLine_indentLineId, matchadd('Conceal', '^ ', 0, -1, {'conceal': g:indentLine_first_char})) | |
endif | |
125 0.000423 let space = &l:shiftwidth == 0 ? &l:tabstop : &l:shiftwidth | |
2625 0.004663 for i in range(space+1, space * g:indentLine_indentLevel + 1, space) | |
2500 0.096586 call add(w:indentLine_indentLineId, matchadd('Conceal', '^\s\+\zs\%'.i.'v ', 0, -1, {'conceal': g:indentLine_char})) | |
2500 0.003202 endfor | |
125 0.000167 return | |
endif | |
if exists("b:indentLine_enabled") && b:indentLine_enabled | |
return | |
else | |
let b:indentLine_enabled = 1 | |
endif | |
call s:SetConcealOption() | |
let g:mysyntaxfile = g:indentLine_mysyntaxfile | |
let space = &l:shiftwidth == 0 ? &l:tabstop : &l:shiftwidth | |
if g:indentLine_showFirstIndentLevel | |
execute 'syntax match IndentLine /^ / containedin=ALL conceal cchar=' . g:indentLine_first_char | |
endif | |
if g:indentLine_faster | |
execute 'syntax match IndentLineSpace /^\s\+/ containedin=ALL contains=IndentLine' | |
execute 'syntax match IndentLine / \{'.(space-1).'}\zs / contained conceal cchar=' . g:indentLine_char | |
execute 'syntax match IndentLine /\t\zs / contained conceal cchar=' . g:indentLine_char | |
else | |
let pattern = line('$') < g:indentLine_maxLines ? 'v' : 'c' | |
for i in range(space+1, space * g:indentLine_indentLevel + 1, space) | |
execute 'syntax match IndentLine /\%(^\s\+\)\@<=\%'.i.pattern.' / containedin=ALL conceal cchar=' . g:indentLine_char | |
endfor | |
endif | |
FUNCTION <SNR>89_get_section() | |
Called 15 times | |
Total time: 0.000475 | |
Self time: 0.000429 | |
count total (s) self (s) | |
15 0.000035 if has_key(s:section_truncate_width, a:key) | |
10 0.000025 if winwidth(a:winnr) < s:section_truncate_width[a:key] | |
return '' | |
endif | |
10 0.000004 endif | |
15 0.000021 let spc = g:airline_symbols.space | |
15 0.000055 if !exists('g:airline_section_{a:key}') | |
return '' | |
endif | |
15 0.000131 0.000085 let text = airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key}) | |
15 0.000089 let [prefix, suffix] = [get(a:000, 0, '%('.spc), get(a:000, 1, spc.'%)')] | |
15 0.000047 return empty(text) ? '' : prefix.text.suffix | |
FUNCTION <SNR>55_AutoClose() | |
Called 1 time | |
Total time: 0.000791 | |
Self time: 0.000367 | |
count total (s) self (s) | |
" Add matching pair and jump to the midle: | |
" inoremap <silent> <buffer> ( ()<Left> | |
1 0.000001 let i = 0 | |
4 0.000122 0.000025 while i < len(s:get('matchpairs_list')) | |
3 0.000154 0.000024 let ld = s:get('left_delims')[i] == '|' ? '<bar>' : s:get('left_delims')[i] | |
3 0.000153 0.000026 let rd = s:get('right_delims')[i] == '|' ? '<bar>' : s:get('right_delims')[i] | |
3 0.000062 exec 'inoremap <expr><silent> <Plug>delimitMate' . ld. ' <SID>TriggerAbb().delimitMate#ParenDelim("' . escape(rd, '|') . '")' | |
3 0.000029 exec 'silent! imap <unique> <buffer> '.ld.' <Plug>delimitMate'.ld | |
3 0.000004 let i += 1 | |
3 0.000003 endwhile | |
" Exit from inside the matching pair: | |
4 0.000029 0.000007 for delim in s:get('right_delims') | |
3 0.000006 let delim = delim == '|' ? '<bar>' : delim | |
3 0.000035 exec 'inoremap <expr><silent> <Plug>delimitMate' . delim. ' <SID>TriggerAbb().delimitMate#JumpOut("\' . delim . '")' | |
3 0.000027 exec 'silent! imap <unique> <buffer> ' . delim. ' <Plug>delimitMate'. delim | |
3 0.000000 endfor | |
" Add matching quote and jump to the midle, or exit if inside a pair of matching quotes: | |
" inoremap <silent> <buffer> " <C-R>=delimitMate#QuoteDelim("\"")<CR> | |
4 0.000030 0.000006 for delim in s:get('quotes_list') | |
3 0.000004 if delim == '|' | |
let delim = '<Bar>' | |
endif | |
3 0.000039 exec 'inoremap <expr><silent> <Plug>delimitMate' . delim. ' <SID>TriggerAbb()."<C-R>=delimitMate#QuoteDelim(\"\\\' . delim . '\")<CR>"' | |
3 0.000026 exec 'silent! imap <unique> <buffer> ' . delim. ' <Plug>delimitMate' . delim | |
3 0.000002 endfor | |
" Try to fix the use of apostrophes (kept for backward compatibility): | |
" inoremap <silent> <buffer> n't n't | |
1 0.000027 0.000003 for map in s:get('apostrophes_list') | |
exec "inoremap <silent> " . map . " " . map | |
exec 'silent! imap <unique> <buffer> ' . map . ' <Plug>delimitMate' . map | |
endfor | |
FUNCTION color_coded#push() | |
Called 17 times | |
Total time: 0.001881 | |
Self time: 0.001881 | |
count total (s) self (s) | |
17 0.000107 if index(g:color_coded_filetypes, &ft) < 0 || g:color_coded_enabled == 0 | |
return | |
endif | |
17 0.000013 lua << EOF | |
local name, data = color_coded_buffer_details() | |
color_coded_push(name, vim.eval('&ft'), data) | |
EOF | |
FUNCTION <SNR>96_OnInsertLeave() | |
Called 1 time | |
Total time: 0.011002 | |
Self time: 0.004710 | |
count total (s) self (s) | |
1 0.000060 0.000006 if !s:AllowedToCompleteInCurrentBuffer() | |
return | |
endif | |
1 0.000004 call timer_stop( s:pollers.completion.id ) | |
1 0.000001 let s:force_semantic = 0 | |
1 0.000003 let s:completion = s:default_completion | |
1 0.001546 0.000011 call s:OnFileReadyToParse() | |
1 0.004627 exec s:python_command "ycm_state.OnInsertLeave()" | |
1 0.000011 if g:ycm_autoclose_preview_window_after_completion || g:ycm_autoclose_preview_window_after_insertion | |
1 0.004739 0.000036 call s:ClosePreviewWindowIfNeeded() | |
1 0.000005 endif | |
FUNCTION <SNR>55_ExtraMappings() | |
Called 1 time | |
Total time: 0.000219 | |
Self time: 0.000152 | |
count total (s) self (s) | |
" If pair is empty, delete both delimiters: | |
1 0.000007 inoremap <silent> <Plug>delimitMateBS <C-R>=delimitMate#BS()<CR> | |
1 0.000010 if !hasmapto('<Plug>delimitMateBS','i') | |
1 0.000008 if empty(maparg('<BS>', 'i')) | |
silent! imap <unique> <buffer> <BS> <Plug>delimitMateBS | |
endif | |
1 0.000007 if empty(maparg('<C-H>', 'i')) | |
silent! imap <unique> <buffer> <C-h> <Plug>delimitMateBS | |
endif | |
1 0.000001 endif | |
" If pair is empty, delete closing delimiter: | |
1 0.000008 inoremap <silent> <expr> <Plug>delimitMateS-BS delimitMate#WithinEmptyPair() ? "\<Del>" : "\<S-BS>" | |
1 0.000013 if !hasmapto('<Plug>delimitMateS-BS','i') && maparg('<S-BS>', 'i') == '' | |
1 0.000006 silent! imap <unique> <buffer> <S-BS> <Plug>delimitMateS-BS | |
1 0.000001 endif | |
" Expand return if inside an empty pair: | |
1 0.000008 inoremap <expr><silent> <Plug>delimitMateCR <SID>TriggerAbb()."\<C-R>=delimitMate#ExpandReturn()\<CR>" | |
1 0.000028 0.000004 if s:get('expand_cr') && !hasmapto('<Plug>delimitMateCR', 'i') && maparg('<CR>', 'i') == '' | |
silent! imap <unique> <buffer> <CR> <Plug>delimitMateCR | |
endif | |
" Expand space if inside an empty pair: | |
1 0.000008 inoremap <expr><silent> <Plug>delimitMateSpace <SID>TriggerAbb()."\<C-R>=delimitMate#ExpandSpace()\<CR>" | |
1 0.000026 0.000004 if s:get('expand_space') && !hasmapto('<Plug>delimitMateSpace', 'i') && maparg('<Space>', 'i') == '' | |
silent! imap <unique> <buffer> <Space> <Plug>delimitMateSpace | |
endif | |
" Jump over any delimiter: | |
1 0.000009 inoremap <expr><silent> <Plug>delimitMateS-Tab <SID>TriggerAbb()."\<C-R>=delimitMate#JumpAny()\<CR>" | |
1 0.000036 0.000015 if s:get('tab2exit') && !hasmapto('<Plug>delimitMateS-Tab', 'i') && maparg('<S-Tab>', 'i') == '' | |
silent! imap <unique> <buffer> <S-Tab> <Plug>delimitMateS-Tab | |
endif | |
" Jump over next delimiters | |
1 0.000009 inoremap <expr><buffer> <Plug>delimitMateJumpMany <SID>TriggerAbb()."\<C-R>=delimitMate#JumpMany()\<CR>" | |
1 0.000011 if !hasmapto('<Plug>delimitMateJumpMany', 'i') && maparg("<C-G>g", 'i') == '' | |
1 0.000006 imap <silent> <buffer> <C-G>g <Plug>delimitMateJumpMany | |
1 0.000000 endif | |
FUNCTION <SNR>4_BMFilename() | |
Called 1 time | |
Total time: 0.000236 | |
Self time: 0.000132 | |
count total (s) self (s) | |
1 0.000003 if isdirectory(a:name) | |
return | |
endif | |
1 0.000078 0.000008 let munge = <SID>BMMunge(a:name, a:num) | |
1 0.000040 0.000006 let hash = <SID>BMHash(munge) | |
1 0.000001 if s:bmenu_short == 0 | |
1 0.000004 let name = 'an ' . g:bmenu_priority . '.' . hash . ' &Buffers.' . munge | |
1 0.000001 else | |
let name = 'an ' . g:bmenu_priority . '.' . hash . '.' . hash . ' &Buffers.' . <SID>BMHash2(munge) . munge | |
endif | |
" set 'cpo' to include the <CR> | |
1 0.000005 let cpo_save = &cpo | |
1 0.000008 set cpo&vim | |
1 0.000081 exe name . ' :confirm b' . a:num . '<CR>' | |
1 0.000008 let &cpo = cpo_save | |
FUNCTION <SNR>70_Filter() | |
Called 250 times | |
Total time: 0.006865 | |
Self time: 0.006865 | |
count total (s) self (s) | |
250 0.001148 if index(g:indentLine_fileTypeExclude, &filetype) != -1 | |
return 0 | |
endif | |
250 0.001119 if len(g:indentLine_fileType) != 0 && index(g:indentLine_fileType, &filetype) == -1 | |
return 0 | |
endif | |
250 0.000690 for name in g:indentLine_bufNameExclude | |
if matchstr(bufname(''), name) == bufname('') | |
return 0 | |
endif | |
endfor | |
250 0.000267 return 1 | |
FUNCTION airline#statusline() | |
Called 287 times | |
Total time: 0.006511 | |
Self time: 0.006511 | |
count total (s) self (s) | |
287 0.003258 if has_key(s:contexts, a:winnr) | |
287 0.002503 return '%{airline#check_mode('.a:winnr.')}'.s:contexts[a:winnr].line | |
endif | |
" in rare circumstances this happens...see #276 | |
return '' | |
FUNCTION 267() | |
Called 123 times | |
Total time: 0.000570 | |
Self time: 0.000570 | |
count total (s) self (s) | |
123 0.000507 call add(self._sections, ['|', a:0 ? a:1 : '%=']) | |
FUNCTION airline#extensions#apply() | |
Called 2 times | |
Total time: 0.000175 | |
Self time: 0.000091 | |
count total (s) self (s) | |
2 0.000004 let s:active_winnr = winnr() | |
2 0.000094 0.000010 if s:is_excluded_window() | |
return -1 | |
endif | |
2 0.000003 if &buftype == 'help' | |
call airline#extensions#apply_left_override('Help', '%f') | |
let w:airline_section_x = '' | |
let w:airline_section_y = '' | |
let w:airline_render_right = 1 | |
endif | |
2 0.000002 if &previewwindow | |
2 0.000004 let w:airline_section_a = 'Preview' | |
2 0.000003 let w:airline_section_b = '' | |
2 0.000008 let w:airline_section_c = bufname(winbufnr(winnr())) | |
2 0.000002 endif | |
2 0.000009 if has_key(s:filetype_overrides, &ft) | |
let args = s:filetype_overrides[&ft] | |
call airline#extensions#apply_left_override(args[0], args[1]) | |
endif | |
2 0.000006 for item in items(s:filetype_regex_overrides) | |
if match(&ft, item[0]) >= 0 | |
call airline#extensions#apply_left_override(item[1][0], item[1][1]) | |
endif | |
endfor | |
FUNCTION 269() | |
Called 495 times | |
Total time: 0.002367 | |
Self time: 0.002367 | |
count total (s) self (s) | |
495 0.002098 call add(self._sections, [a:group, a:contents]) | |
FUNCTION youcompleteme#CompleteFunc() | |
Called 50 times | |
Total time: 0.000796 | |
Self time: 0.000796 | |
count total (s) self (s) | |
50 0.000126 if a:findstart | |
30 0.000210 if s:completion.start_column > col( '.' ) || empty( s:completion.candidates ) | |
" For vim, -2 means not found but don't trigger an error message. | |
" See :h complete-functions. | |
10 0.000018 return -2 | |
endif | |
20 0.000074 return s:completion.start_column - 1 | |
endif | |
20 0.000036 return s:completion.candidates | |
FUNCTION airline#highlighter#get_highlight() | |
Called 1869 times | |
Total time: 0.284024 | |
Self time: 0.117295 | |
count total (s) self (s) | |
1869 0.009366 if get(g:, 'airline_highlighting_cache', 0) && has_key(s:hl_groups, a:group) | |
return s:hl_groups[a:group] | |
else | |
1869 0.087382 0.011027 let fg = s:get_syn(a:group, 'fg') | |
1869 0.081276 0.010181 let bg = s:get_syn(a:group, 'bg') | |
1869 0.028727 let reverse = g:airline_gui_mode ==# 'gui' ? synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'gui') : synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'cterm')|| synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'term') | |
1869 0.013617 let bold = synIDattr(synIDtrans(hlID(a:group)), 'bold') | |
1869 0.003312 let opts = a:000 | |
1869 0.002172 if bold | |
22 0.000039 let opts = ['bold'] | |
22 0.000013 endif | |
1869 0.034496 0.015217 let res = reverse ? s:get_array(bg, fg, opts) : s:get_array(fg, bg, opts) | |
1869 0.001730 endif | |
1869 0.005745 let s:hl_groups[a:group] = res | |
1869 0.002285 return res | |
FUNCTION airline#util#shorten() | |
Called 98 times | |
Total time: 0.001972 | |
Self time: 0.001972 | |
count total (s) self (s) | |
98 0.000598 if winwidth(0) < a:winwidth && len(split(a:text, '\zs')) > a:minwidth | |
if get(a:000, 0, 0) | |
" shorten from tail | |
return '…'.matchstr(a:text, '.\{'.a:minwidth.'}$') | |
else | |
" shorten from beginning of string | |
return matchstr(a:text, '^.\{'.a:minwidth.'}').'…' | |
endif | |
else | |
98 0.000137 return a:text | |
endif | |
FUNCTION 271() | |
Called 123 times | |
Total time: 0.446304 | |
Self time: 0.067051 | |
count total (s) self (s) | |
123 0.000199 let side = 1 | |
123 0.000167 let line = '' | |
123 0.000155 let i = 0 | |
123 0.000346 let length = len(self._sections) | |
123 0.000168 let split = 0 | |
123 0.000175 let is_empty = 0 | |
123 0.000189 let prev_group = '' | |
741 0.001365 while i < length | |
618 0.001792 let section = self._sections[i] | |
618 0.001520 let group = section[0] | |
618 0.001392 let contents = section[1] | |
618 0.001093 let pgroup = prev_group | |
618 0.013509 0.003742 let prev_group = s:get_prev_group(self._sections, i) | |
618 0.002512 if group ==# 'airline_c' && !self._context.active && has_key(self._context, 'bufnr') | |
let group = 'airline_c'. self._context.bufnr | |
elseif prev_group ==# 'airline_c' && !self._context.active && has_key(self._context, 'bufnr') | |
let prev_group = 'airline_c'. self._context.bufnr | |
endif | |
618 0.000728 if is_empty | |
let prev_group = pgroup | |
endif | |
618 0.010286 0.003521 let is_empty = s:section_is_empty(self, contents) | |
618 0.000656 if is_empty | |
" need to fix highlighting groups, since we | |
" have skipped a section, we actually need | |
" the previous previous group and so the | |
" seperator goes from the previous previous group | |
" to the current group | |
let pgroup = group | |
endif | |
618 0.001047 if group == '' | |
let line .= contents | |
elseif group == '|' | |
123 0.000162 let side = 0 | |
123 0.000299 let line .= contents | |
123 0.000141 let split = 1 | |
123 0.000108 else | |
495 0.000784 if prev_group == '' | |
123 0.000481 let line .= '%#'.group.'#' | |
123 0.000143 elseif split | |
123 0.000139 if !is_empty | |
123 0.083489 0.001083 let line .= s:get_transitioned_seperator(self, prev_group, group, side) | |
123 0.000122 endif | |
123 0.000231 let split = 0 | |
123 0.000104 else | |
249 0.000291 if !is_empty | |
249 0.256122 0.002100 let line .= s:get_seperator(self, prev_group, group, side) | |
249 0.000266 endif | |
249 0.000195 endif | |
495 0.031291 0.004998 let line .= is_empty ? '' : s:get_accented_line(self, group, contents) | |
495 0.000471 endif | |
618 0.001568 let i = i + 1 | |
618 0.000680 endwhile | |
123 0.000226 if !self._context.active | |
"let line = substitute(line, '%#airline_c#', '%#airline_c'.self._context.bufnr.'#', '') | |
1 0.000031 let line = substitute(line, '%#.\{-}\ze#', '\0_inactive', 'g') | |
1 0.000001 endif | |
123 0.000198 return line | |
FUNCTION <SNR>56_get() | |
Called 44 times | |
Total time: 0.000800 | |
Self time: 0.000800 | |
count total (s) self (s) | |
44 0.000050 if a:0 == 2 | |
return deepcopy(get(a:2, 'delimitMate_' . a:name, a:1)) | |
elseif a:0 == 1 | |
let bufoptions = get(s:options, bufnr('%'), {}) | |
return deepcopy(get(bufoptions, a:name, a:1)) | |
else | |
44 0.000318 return deepcopy(eval('s:options.' . bufnr('%') . '.' . a:name)) | |
endif | |
FUNCTION <SNR>55_option_init() | |
Called 23 times | |
Total time: 0.001063 | |
Self time: 0.000375 | |
count total (s) self (s) | |
23 0.000076 let b = exists("b:delimitMate_" . a:name) | |
23 0.000063 let g = exists("g:delimitMate_" . a:name) | |
" Find value to use. | |
23 0.000021 if !b && !g | |
23 0.000025 let value = a:default | |
23 0.000014 elseif b | |
exec "let value = b:delimitMate_" . a:name | |
else | |
exec "let value = g:delimitMate_" . a:name | |
endif | |
23 0.000764 0.000076 call s:set(a:name, value) | |
FUNCTION airline#highlighter#highlight_modified_inactive() | |
Called 3 times | |
Total time: 0.001145 | |
Self time: 0.000100 | |
count total (s) self (s) | |
3 0.000013 if getbufvar(a:bufnr, '&modified') | |
2 0.000023 let colors = exists('g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_c') ? g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_c : [] | |
2 0.000001 else | |
1 0.000008 let colors = exists('g:airline#themes#{g:airline_theme}#palette.inactive.airline_c') ? g:airline#themes#{g:airline_theme}#palette.inactive.airline_c : [] | |
1 0.000001 endif | |
3 0.000006 if !empty(colors) | |
3 0.001074 0.000029 call airline#highlighter#exec('airline_c'.(a:bufnr).'_inactive', colors) | |
3 0.000003 endif | |
FUNCTION <SNR>20_init() | |
Called 1 time | |
Total time: 0.000003 | |
Self time: 0.000003 | |
count total (s) self (s) | |
1 0.000002 if s:airline_initialized | |
1 0.000001 return | |
endif | |
let s:airline_initialized = 1 | |
call airline#extensions#load() | |
call airline#init#sections() | |
let s:theme_in_vimrc = exists('g:airline_theme') | |
if s:theme_in_vimrc | |
try | |
let palette = g:airline#themes#{g:airline_theme}#palette | |
catch | |
echom 'Could not resolve airline theme "' . g:airline_theme . '". Themes have been migrated to github.com/vim-airline/vim-airline-themes.' | |
let g:airline_theme = 'dark' | |
endtry | |
silent call airline#switch_theme(g:airline_theme) | |
else | |
let g:airline_theme = 'dark' | |
silent call s:on_colorscheme_changed() | |
endif | |
silent doautocmd User AirlineAfterInit | |
FUNCTION <SNR>44_WinEnterHandler() | |
Called 124 times | |
Total time: 0.002832 | |
Self time: 0.001686 | |
count total (s) self (s) | |
124 0.000275 if s:disable_handlers_for_tabdo | |
return | |
endif | |
124 0.000229 if g:nerdtree_tabs_autoclose | |
124 0.001791 0.000645 call s:CloseIfOnlyNerdTreeLeft() | |
124 0.000101 endif | |
FUNCTION <SNR>96_OnInsertChar() | |
Called 11 times | |
Total time: 0.000309 | |
Self time: 0.000237 | |
count total (s) self (s) | |
11 0.000083 call timer_stop( s:pollers.completion.id ) | |
11 0.000037 if pumvisible() | |
7 0.000135 0.000063 call s:SendKeys( "\<C-e>" ) | |
7 0.000012 endif | |
FUNCTION delimitMate#BS() | |
Called 2 times | |
Total time: 0.001505 | |
Self time: 0.000170 | |
count total (s) self (s) | |
2 0.000519 0.000039 if s:is_forbidden("") | |
let extra = '' | |
elseif &bs !~ 'start\|2' | |
let extra = '' | |
elseif delimitMate#WithinEmptyPair() | |
let extra = "\<Del>" | |
elseif s:is_space_expansion() | |
let extra = "\<Del>" | |
elseif s:is_cr_expansion() | |
let extra = repeat("\<Del>", len(matchstr(getline(line('.') + 1), '^\s*\S'))) | |
else | |
2 0.000003 let extra = '' | |
2 0.000002 endif | |
2 0.000006 return "\<BS>" . extra | |
FUNCTION color_coded#moved() | |
Called 17 times | |
Total time: 0.024019 | |
Self time: 0.005577 | |
count total (s) self (s) | |
17 0.000171 if index(g:color_coded_filetypes, &ft) < 0 || g:color_coded_enabled == 0 | |
return | |
endif | |
17 0.000019 lua << EOF | |
local name = color_coded_buffer_name() | |
color_coded_moved(name, vim.eval("line(\"w0\")"), vim.eval("line(\"w$\")")) | |
EOF | |
FUNCTION <SNR>47_CreateDelimMapFromCms() | |
Called 62 times | |
Total time: 0.003475 | |
Self time: 0.003475 | |
count total (s) self (s) | |
62 0.000600 if &ft == '' && exists('g:NERDDefaultDelims') | |
let delims = g:NERDDefaultDelims | |
for i in ['left', 'leftAlt', 'right', 'rightAlt'] | |
if !has_key(delims, i) | |
let delims[i] = '' | |
endif | |
endfor | |
return delims | |
endif | |
62 0.002076 return { 'left': substitute(&commentstring, '\([^ \t]*\)\s*%s.*', '\1', ''), 'right': substitute(&commentstring, '.*%s\s*\(.*\)', '\1', 'g'), 'nested': 0, 'leftAlt': '', 'rightAlt': '', 'nestedAlt': 0} | |
FUNCTION <SNR>55_init() | |
Called 1 time | |
Total time: 0.001554 | |
Self time: 0.000277 | |
count total (s) self (s) | |
" Initialize variables: | |
" autoclose | |
1 0.000073 0.000006 call s:option_init("autoclose", 1) | |
" matchpairs | |
1 0.000056 0.000008 call s:option_init("matchpairs", string(&matchpairs)[1:-2]) | |
1 0.000117 0.000035 call s:option_init("matchpairs_list", map(split(s:get('matchpairs'), '.:.\zs,\ze.:.'), 'split(v:val, ''^.\zs:\ze.$'')')) | |
1 0.000028 0.000003 let pairs = s:get('matchpairs_list') | |
1 0.000010 if len(filter(pairs, 'v:val[0] ==# v:val[1]')) | |
echohl ErrorMsg | |
echom 'delimitMate: each member of a pair in delimitMate_matchpairs must be different from each other.' | |
echom 'delimitMate: invalid pairs: ' . join(map(pairs, 'join(v:val, ":")'), ', ') | |
echohl Normal | |
return 0 | |
endif | |
1 0.000083 0.000011 call s:option_init("left_delims", map(copy(s:get('matchpairs_list')), 'v:val[0]')) | |
1 0.000083 0.000012 call s:option_init("right_delims", map(copy(s:get('matchpairs_list')), 'v:val[1]')) | |
" quotes | |
1 0.000050 0.000004 call s:option_init("quotes", "\" ' `") | |
1 0.000081 0.000012 call s:option_init("quotes_list",split(s:get('quotes'), '\s\+')) | |
" nesting_quotes | |
1 0.000048 0.000004 call s:option_init("nesting_quotes", []) | |
" excluded_regions | |
1 0.000048 0.000004 call s:option_init("excluded_regions", "Comment") | |
1 0.000078 0.000009 call s:option_init("excluded_regions_list", split(s:get('excluded_regions'), ',\s*')) | |
1 0.000027 0.000005 let enabled = len(s:get('excluded_regions_list')) > 0 | |
1 0.000049 0.000004 call s:option_init("excluded_regions_enabled", enabled) | |
" expand_space | |
1 0.000004 if exists("b:delimitMate_expand_space") && type(b:delimitMate_expand_space) == type("") | |
echom "b:delimitMate_expand_space is '".b:delimitMate_expand_space."' but it must be either 1 or 0!" | |
echom "Read :help 'delimitMate_expand_space' for more details." | |
unlet b:delimitMate_expand_space | |
let b:delimitMate_expand_space = 1 | |
endif | |
1 0.000003 if exists("g:delimitMate_expand_space") && type(g:delimitMate_expand_space) == type("") | |
echom "delimitMate_expand_space is '".g:delimitMate_expand_space."' but it must be either 1 or 0!" | |
echom "Read :help 'delimitMate_expand_space' for more details." | |
unlet g:delimitMate_expand_space | |
let g:delimitMate_expand_space = 1 | |
endif | |
1 0.000047 0.000003 call s:option_init("expand_space", 0) | |
" expand_cr | |
1 0.000004 if exists("b:delimitMate_expand_cr") && type(b:delimitMate_expand_cr) == type("") | |
echom "b:delimitMate_expand_cr is '".b:delimitMate_expand_cr."' but it must be either 1 or 0!" | |
echom "Read :help 'delimitMate_expand_cr' for more details." | |
unlet b:delimitMate_expand_cr | |
let b:delimitMate_expand_cr = 1 | |
endif | |
1 0.000003 if exists("g:delimitMate_expand_cr") && type(g:delimitMate_expand_cr) == type("") | |
echom "delimitMate_expand_cr is '".g:delimitMate_expand_cr."' but it must be either 1 or 0!" | |
echom "Read :help 'delimitMate_expand_cr' for more details." | |
unlet g:delimitMate_expand_cr | |
let g:delimitMate_expand_cr = 1 | |
endif | |
1 0.000010 if ((&backspace !~ 'eol' || &backspace !~ 'start') && &backspace != 2) && ((exists('b:delimitMate_expand_cr') && b:delimitMate_expand_cr == 1) || (exists('g:delimitMate_expand_cr') && g:delimitMate_expand_cr == 1)) | |
echom "delimitMate: There seems to be some incompatibility with your settings that may interfer with the expansion of <CR>. See :help 'delimitMate_expand_cr' for details." | |
endif | |
1 0.000048 0.000004 call s:option_init("expand_cr", 0) | |
" expand_in_quotes | |
1 0.000048 0.000004 call s:option_init('expand_inside_quotes', 0) | |
" jump_expansion | |
1 0.000047 0.000003 call s:option_init("jump_expansion", 0) | |
" smart_matchpairs | |
1 0.000050 0.000006 call s:option_init("smart_matchpairs", '^\%(\w\|\!\|[£$]\|[^[:punct:][:space:]]\)') | |
" smart_quotes | |
" XXX: backward compatibility. Ugly, should go the way of the dodo soon. | |
1 0.000032 0.000008 let quotes = escape(join(s:get('quotes_list'), ''), '\-^[]') | |
1 0.000005 let default_smart_quotes = '\%(\w\|[^[:punct:][:space:]' . quotes . ']\|\%(\\\\\)*\\\)\%#\|\%#\%(\w\|[^[:space:][:punct:]' . quotes . ']\)' | |
1 0.000004 if exists('g:delimitMate_smart_quotes') && type(g:delimitMate_smart_quotes) == type(0) | |
if g:delimitMate_smart_quotes | |
unlet g:delimitMate_smart_quotes | |
else | |
unlet g:delimitMate_smart_quotes | |
let g:delimitMate_smart_quotes = '' | |
endif | |
endif | |
1 0.000004 if exists('b:delimitMate_smart_quotes') && type(b:delimitMate_smart_quotes) == type(0) | |
if b:delimitMate_smart_quotes | |
unlet b:delimitMate_smart_quotes | |
if exists('g:delimitMate_smart_quotes') && type(g:delimitMate_smart_quotes) && g:delimitMate_smart_quotes | |
let b:delimitMate_smart_quotes = default_smart_quotes | |
endif | |
else | |
unlet b:delimitMate_smart_quotes | |
let b:delimitMate_smart_quotes = '' | |
endif | |
endif | |
1 0.000050 0.000004 call s:option_init("smart_quotes", default_smart_quotes) | |
" apostrophes | |
1 0.000049 0.000004 call s:option_init("apostrophes", "") | |
1 0.000077 0.000010 call s:option_init("apostrophes_list", split(s:get('apostrophes'), ":\s*")) | |
" tab2exit | |
1 0.000046 0.000003 call s:option_init("tab2exit", 1) | |
" balance_matchpairs | |
1 0.000046 0.000003 call s:option_init("balance_matchpairs", 0) | |
" eol marker | |
1 0.000045 0.000004 call s:option_init("insert_eol_marker", 1) | |
1 0.000047 0.000003 call s:option_init("eol_marker", "") | |
" Everything is fine. | |
1 0.000001 return 1 | |
FUNCTION delimitMate#Set() | |
Called 23 times | |
Total time: 0.000589 | |
Self time: 0.000099 | |
count total (s) self (s) | |
23 0.000582 0.000092 return call('s:set', a:000) | |
FUNCTION <SNR>84_Get() | |
Called 609 times | |
Total time: 0.004672 | |
Self time: 0.004672 | |
count total (s) self (s) | |
609 0.001900 let res=get(a:dict, a:key, '') | |
609 0.001006 if res is '' | |
356 0.000349 return '' | |
else | |
253 0.000521 return a:prefix. res | |
endif | |
FUNCTION color_coded#add_match() | |
Called 7596 times | |
Total time: 0.423401 | |
Self time: 0.232299 | |
count total (s) self (s) | |
7596 0.223582 0.032480 let s:file = color_coded#get_buffer_name() | |
7596 0.180106 call add(g:color_coded_matches[s:file],matchaddpos(a:type, [[ a:line, a:col, a:len ]], -1)) | |
7596 0.013498 unlet s:file | |
FUNCTION airline#builder#new() | |
Called 123 times | |
Total time: 0.003377 | |
Self time: 0.003377 | |
count total (s) self (s) | |
123 0.000901 let builder = copy(s:prototype) | |
123 0.000312 let builder._context = a:context | |
123 0.000238 let builder._sections = [] | |
123 0.001454 call extend(builder._context, { 'left_sep': g:airline_left_sep, 'left_alt_sep': g:airline_left_alt_sep, 'right_sep': g:airline_right_sep, 'right_alt_sep': g:airline_right_alt_sep, }, 'keep') | |
123 0.000198 return builder | |
FUNCTIONS SORTED ON TOTAL TIME | |
count total (s) self (s) function | |
248 0.574839 0.137091 color_coded#enter() | |
153 0.543425 0.008072 airline#extensions#tabline#get() | |
153 0.535353 0.024801 airline#extensions#tabline#buffers#get() | |
123 0.446304 0.067051 271() | |
7596 0.423401 0.232299 color_coded#add_match() | |
2 0.405814 0.405554 <SNR>96_PollFileParseResponse() | |
1869 0.284024 0.117295 airline#highlighter#get_highlight() | |
425 0.266186 0.020297 <SNR>84_exec_separator() | |
249 0.254022 0.003985 <SNR>88_get_seperator() | |
372 0.247610 0.009907 <SNR>88_get_transitioned_seperator() | |
372 0.237703 0.007624 airline#highlighter#add_separator() | |
7976 0.206541 color_coded#get_buffer_name() | |
539 0.152584 0.046766 airline#highlighter#exec() | |
3738 0.147450 <SNR>84_get_syn() | |
125 0.135585 0.005013 <SNR>70_Setup() | |
832 0.134575 0.007826 airline#themes#get_highlight() | |
287 0.117887 0.032446 airline#check_mode() | |
125 0.113079 0.111117 <SNR>70_IndentLinesEnable() | |
249 0.084833 0.006142 <SNR>88_should_change_group() | |
3 0.084296 0.007964 airline#highlighter#highlight() | |
FUNCTIONS SORTED ON SELF TIME | |
count total (s) self (s) function | |
2 0.405814 0.405554 <SNR>96_PollFileParseResponse() | |
7596 0.423401 0.232299 color_coded#add_match() | |
7976 0.206541 color_coded#get_buffer_name() | |
3738 0.147450 <SNR>84_get_syn() | |
248 0.574839 0.137091 color_coded#enter() | |
1869 0.284024 0.117295 airline#highlighter#get_highlight() | |
125 0.113079 0.111117 <SNR>70_IndentLinesEnable() | |
123 0.446304 0.067051 271() | |
539 0.152584 0.046766 airline#highlighter#exec() | |
256 0.039412 color_coded#clear_matches() | |
274 0.045501 0.038674 airline#extensions#tabline#formatters#default#format() | |
75 0.032623 <SNR>96_Pyeval() | |
287 0.117887 0.032446 airline#check_mode() | |
495 0.026293 <SNR>88_get_accented_line() | |
153 0.535353 0.024801 airline#extensions#tabline#buffers#get() | |
12 0.032441 0.022836 <SNR>96_InvokeCompletion() | |
425 0.266186 0.020297 <SNR>84_exec_separator() | |
1869 0.019279 <SNR>84_get_array() | |
539 0.016128 <SNR>84_CheckDefined() | |
395 0.015490 airline#extensions#tabline#buflist#list() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SCRIPT /usr/local/Cellar/macvim/8.0-137_2/MacVim.app/Contents/Resources/vim/runtime/syntax/cpp.vim | |
Sourced 1 time | |
Total time: 0.004203 | |
Self time: 0.000750 | |
count total (s) self (s) | |
" Vim syntax file | |
" Language: C++ | |
" Current Maintainer: vim-jp (https://github.com/vim-jp/vim-cpp) | |
" Previous Maintainer: Ken Shan <[email protected]> | |
" Last Change: 2017 Jun 05 | |
" quit when a syntax file was already loaded | |
1 0.000007 if exists("b:current_syntax") | |
finish | |
endif | |
" Read the C syntax to start with | |
1 0.000240 runtime! syntax/c.vim | |
1 0.000005 unlet b:current_syntax | |
" C++ extensions | |
1 0.000010 syn keyword cppStatement new delete this friend using | |
1 0.000005 syn keyword cppAccess public protected private | |
1 0.000005 syn keyword cppModifier inline virtual explicit export | |
1 0.000004 syn keyword cppType bool wchar_t | |
1 0.000004 syn keyword cppExceptions throw try catch | |
1 0.000004 syn keyword cppOperator operator typeid | |
1 0.000008 syn keyword cppOperator and bitor or xor compl bitand and_eq or_eq xor_eq not not_eq | |
1 0.000015 syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*<"me=e-1 | |
1 0.000010 syn match cppCast "\<\(const\|static\|dynamic\|reinterpret\)_cast\s*$" | |
1 0.000004 syn keyword cppStorageClass mutable | |
1 0.000005 syn keyword cppStructure class typename template namespace | |
1 0.000003 syn keyword cppBoolean true false | |
1 0.000004 syn keyword cppConstant __cplusplus | |
" C++ 11 extensions | |
1 0.000007 if !exists("cpp_no_cpp11") | |
1 0.000005 syn keyword cppModifier override final | |
1 0.000004 syn keyword cppType nullptr_t auto | |
1 0.000003 syn keyword cppExceptions noexcept | |
1 0.000005 syn keyword cppStorageClass constexpr decltype thread_local | |
1 0.000003 syn keyword cppConstant nullptr | |
1 0.000004 syn keyword cppConstant ATOMIC_FLAG_INIT ATOMIC_VAR_INIT | |
1 0.000004 syn keyword cppConstant ATOMIC_BOOL_LOCK_FREE ATOMIC_CHAR_LOCK_FREE | |
1 0.000004 syn keyword cppConstant ATOMIC_CHAR16_T_LOCK_FREE ATOMIC_CHAR32_T_LOCK_FREE | |
1 0.000003 syn keyword cppConstant ATOMIC_WCHAR_T_LOCK_FREE ATOMIC_SHORT_LOCK_FREE | |
1 0.000004 syn keyword cppConstant ATOMIC_INT_LOCK_FREE ATOMIC_LONG_LOCK_FREE | |
1 0.000004 syn keyword cppConstant ATOMIC_LLONG_LOCK_FREE ATOMIC_POINTER_LOCK_FREE | |
1 0.000056 syn region cppRawString matchgroup=cppRawStringDelimiter start=+\%(u8\|[uLU]\)\=R"\z([[:alnum:]_{}[\]#<>%:;.?*\+\-/\^&|~!=,"']\{,16}\)(+ end=+)\z1"+ contains=@Spell | |
1 0.000003 endif | |
" C++ 14 extensions | |
1 0.000005 if !exists("cpp_no_cpp14") | |
1 0.000003 syn case ignore | |
1 0.000012 syn match cppNumber display "\<0b[01]\('\=[01]\+\)*\(u\=l\{0,2}\|ll\=u\)\>" | |
1 0.000014 syn match cppNumber display "\<[1-9]\('\=\d\+\)*\(u\=l\{0,2}\|ll\=u\)\>" contains=cFloat | |
1 0.000013 syn match cppNumber display "\<0x\x\('\=\x\+\)*\(u\=l\{0,2}\|ll\=u\)\>" | |
1 0.000002 syn case match | |
1 0.000002 endif | |
" The minimum and maximum operators in GNU C++ | |
1 0.000006 syn match cppMinMax "[<>]?" | |
" Default highlighting | |
1 0.000004 hi def link cppAccess cppStatement | |
1 0.000003 hi def link cppCast cppStatement | |
1 0.000012 hi def link cppExceptions Exception | |
1 0.000009 hi def link cppOperator Operator | |
1 0.000010 hi def link cppStatement Statement | |
1 0.000009 hi def link cppModifier Type | |
1 0.000010 hi def link cppType Type | |
1 0.000009 hi def link cppStorageClass StorageClass | |
1 0.000009 hi def link cppStructure Structure | |
1 0.000009 hi def link cppBoolean Boolean | |
1 0.000009 hi def link cppConstant Constant | |
1 0.000010 hi def link cppRawStringDelimiter Delimiter | |
1 0.000008 hi def link cppRawString String | |
1 0.000008 hi def link cppNumber Number | |
1 0.000005 let b:current_syntax = "cpp" | |
" vim: ts=8 | |
SCRIPT /usr/local/Cellar/macvim/8.0-137_2/MacVim.app/Contents/Resources/vim/runtime/syntax/c.vim | |
Sourced 1 time | |
Total time: 0.003430 | |
Self time: 0.003430 | |
count total (s) self (s) | |
" Vim syntax file | |
" Language: C | |
" Maintainer: Bram Moolenaar <[email protected]> | |
" Last Change: 2017 Apr 30 | |
" Quit when a (custom) syntax file was already loaded | |
1 0.000007 if exists("b:current_syntax") | |
finish | |
endif | |
1 0.000008 let s:cpo_save = &cpo | |
1 0.000013 set cpo&vim | |
1 0.000019 let s:ft = matchstr(&ft, '^\([^.]\)\+') | |
" A bunch of useful C keywords | |
1 0.000015 syn keyword cStatement goto break return continue asm | |
1 0.000005 syn keyword cLabel case default | |
1 0.000004 syn keyword cConditional if else switch | |
1 0.000005 syn keyword cRepeat while for do | |
1 0.000005 syn keyword cTodo contained TODO FIXME XXX | |
" It's easy to accidentally add a space after a backslash that was intended | |
" for line continuation. Some compilers allow it, which makes it | |
" unpredictable and should be avoided. | |
1 0.000009 syn match cBadContinuation contained "\\\s\+$" | |
" cCommentGroup allows adding matches for special things in comments | |
1 0.000013 syn cluster cCommentGroup contains=cTodo,cBadContinuation | |
" String and Character constants | |
" Highlight special characters (those which have a backslash) differently | |
1 0.000010 syn match cSpecial display contained "\\\(x\x\+\|\o\{1,3}\|.\|$\)" | |
1 0.000005 if !exists("c_no_utf") | |
1 0.000009 syn match cSpecial display contained "\\\(u\x\{4}\|U\x\{8}\)" | |
1 0.000001 endif | |
1 0.000003 if !exists("c_no_cformat") | |
" Highlight % items in strings. | |
1 0.000004 if !exists("c_no_c99") " ISO C99 | |
1 0.000019 syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained | |
1 0.000002 else | |
syn match cFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlL]\|ll\)\=\([bdiuoxXDOUfeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained | |
endif | |
1 0.000006 syn match cFormat display "%%" contained | |
1 0.000001 endif | |
" cCppString: same as cString, but ends at end of line | |
1 0.000008 if s:ft ==# "cpp" && !exists("cpp_no_cpp11") && !exists("c_no_cformat") | |
" ISO C++11 | |
1 0.000027 syn region cString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend | |
1 0.000030 syn region cCppString start=+\(L\|u\|u8\|U\|R\|LR\|u8R\|uR\|UR\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell | |
1 0.000005 elseif s:ft ==# "c" && !exists("c_no_c11") && !exists("c_no_cformat") | |
" ISO C99 | |
syn region cString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend | |
syn region cCppString start=+\%(L\|U\|u8\)\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell | |
else | |
" older C or C++ | |
syn match cFormat display "%%" contained | |
syn region cString start=+L\="+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend | |
syn region cCppString start=+L\="+ skip=+\\\\\|\\"\|\\$+ excludenl end=+"+ end='$' contains=cSpecial,cFormat,@Spell | |
endif | |
1 0.000023 syn region cCppSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppSkip | |
1 0.000010 syn cluster cStringGroup contains=cCppString,cCppSkip | |
1 0.000008 syn match cCharacter "L\='[^\\]'" | |
1 0.000009 syn match cCharacter "L'[^']*'" contains=cSpecial | |
1 0.000005 if exists("c_gnu") | |
syn match cSpecialError "L\='\\[^'\"?\\abefnrtv]'" | |
syn match cSpecialCharacter "L\='\\['\"?\\abefnrtv]'" | |
else | |
1 0.000007 syn match cSpecialError "L\='\\[^'\"?\\abfnrtv]'" | |
1 0.000008 syn match cSpecialCharacter "L\='\\['\"?\\abfnrtv]'" | |
1 0.000002 endif | |
1 0.000007 syn match cSpecialCharacter display "L\='\\\o\{1,3}'" | |
1 0.000007 syn match cSpecialCharacter display "'\\x\x\{1,2}'" | |
1 0.000006 syn match cSpecialCharacter display "L'\\x\x\+'" | |
1 0.000008 if (s:ft ==# "c" && !exists("c_no_c11")) || (s:ft ==# "cpp" && !exists("cpp_no_cpp11")) | |
" ISO C11 or ISO C++ 11 | |
1 0.000004 if exists("c_no_cformat") | |
syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,@Spell extend | |
else | |
1 0.000021 syn region cString start=+\%(U\|u8\=\)"+ skip=+\\\\\|\\"+ end=+"+ contains=cSpecial,cFormat,@Spell extend | |
1 0.000002 endif | |
1 0.000008 syn match cCharacter "[Uu]'[^\\]'" | |
1 0.000010 syn match cCharacter "[Uu]'[^']*'" contains=cSpecial | |
1 0.000005 if exists("c_gnu") | |
syn match cSpecialError "[Uu]'\\[^'\"?\\abefnrtv]'" | |
syn match cSpecialCharacter "[Uu]'\\['\"?\\abefnrtv]'" | |
else | |
1 0.000008 syn match cSpecialError "[Uu]'\\[^'\"?\\abfnrtv]'" | |
1 0.000008 syn match cSpecialCharacter "[Uu]'\\['\"?\\abfnrtv]'" | |
1 0.000002 endif | |
1 0.000007 syn match cSpecialCharacter display "[Uu]'\\\o\{1,3}'" | |
1 0.000007 syn match cSpecialCharacter display "[Uu]'\\x\x\+'" | |
1 0.000002 endif | |
"when wanted, highlight trailing white space | |
1 0.000005 if exists("c_space_errors") | |
if !exists("c_no_trail_space_error") | |
syn match cSpaceError display excludenl "\s\+$" | |
endif | |
if !exists("c_no_tab_space_error") | |
syn match cSpaceError display " \+\t"me=e-1 | |
endif | |
endif | |
" This should be before cErrInParen to avoid problems with #define ({ xxx }) | |
1 0.000004 if exists("c_curly_error") | |
syn match cCurlyError "}" | |
syn region cBlock start="{" end="}" contains=ALLBUT,cBadBlock,cCurlyError,@cParenGroup,cErrInParen,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell fold | |
else | |
1 0.000009 syn region cBlock start="{" end="}" transparent fold | |
1 0.000002 endif | |
" Catch errors caused by wrong parenthesis and brackets. | |
" Also accept <% for {, %> for }, <: for [ and :> for ] (C99) | |
" But avoid matching <::. | |
1 0.000057 syn cluster cParenGroup contains=cParenError,cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserLabel,cBitField,cOctalZero,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom | |
1 0.000006 if exists("c_no_curly_error") | |
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11") | |
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell | |
" cCppParen: same as cParen but ends at end-of-line; used in cDefine | |
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell | |
syn match cParenError display ")" | |
syn match cErrInParen display contained "^^<%\|^%>" | |
else | |
syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,@cStringGroup,@Spell | |
" cCppParen: same as cParen but ends at end-of-line; used in cDefine | |
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell | |
syn match cParenError display ")" | |
syn match cErrInParen display contained "^[{}]\|^<%\|^%>" | |
endif | |
elseif exists("c_no_bracket_error") | |
if s:ft ==# 'cpp' && !exists("cpp_no_cpp11") | |
syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,@cStringGroup,@Spell | |
" cCppParen: same as cParen but ends at end-of-line; used in cDefine | |
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell | |
syn match cParenError display ")" | |
syn match cErrInParen display contained "<%\|%>" | |
else | |
syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,@cStringGroup,@Spell | |
" cCppParen: same as cParen but ends at end-of-line; used in cDefine | |
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cParen,cString,@Spell | |
syn match cParenError display ")" | |
syn match cErrInParen display contained "[{}]\|<%\|%>" | |
endif | |
else | |
1 0.000007 if s:ft ==# 'cpp' && !exists("cpp_no_cpp11") | |
1 0.000024 syn region cParen transparent start='(' end=')' contains=ALLBUT,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell | |
" cCppParen: same as cParen but ends at end-of-line; used in cDefine | |
1 0.000031 syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell | |
1 0.000008 syn match cParenError display "[\])]" | |
1 0.000006 syn match cErrInParen display contained "<%\|%>" | |
1 0.000023 syn region cBracket transparent start='\[\|<::\@!' end=']\|:>' contains=ALLBUT,@cParenGroup,cErrInParen,cCppParen,cCppBracket,@cStringGroup,@Spell | |
1 0.000002 else | |
syn region cParen transparent start='(' end=')' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cCppParen,cErrInBracket,cCppBracket,@cStringGroup,@Spell | |
" cCppParen: same as cParen but ends at end-of-line; used in cDefine | |
syn region cCppParen transparent start='(' skip='\\$' excludenl end=')' end='$' contained contains=ALLBUT,@cParenGroup,cErrInBracket,cParen,cBracket,cString,@Spell | |
syn match cParenError display "[\])]" | |
syn match cErrInParen display contained "[\]{}]\|<%\|%>" | |
syn region cBracket transparent start='\[\|<::\@!' end=']\|:>' end='}'me=s-1 contains=ALLBUT,cBlock,@cParenGroup,cErrInParen,cCppParen,cCppBracket,@cStringGroup,@Spell | |
endif | |
" cCppBracket: same as cParen but ends at end-of-line; used in cDefine | |
1 0.000032 syn region cCppBracket transparent start='\[\|<::\@!' skip='\\$' excludenl end=']\|:>' end='$' contained contains=ALLBUT,@cParenGroup,cErrInParen,cParen,cBracket,cString,@Spell | |
1 0.000008 syn match cErrInBracket display contained "[);{}]\|<%\|%>" | |
1 0.000002 endif | |
1 0.000007 if s:ft ==# 'c' || exists("cpp_no_cpp11") | |
syn region cBadBlock keepend start="{" end="}" contained containedin=cParen,cBracket,cBadBlock transparent fold | |
endif | |
"integer number, or floating point number without a dot and with "f". | |
1 0.000002 syn case ignore | |
1 0.000018 syn match cNumbers display transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctalError,cOctal | |
" Same, but without octal error (for comments) | |
1 0.000015 syn match cNumbersCom display contained transparent "\<\d\|\.\d" contains=cNumber,cFloat,cOctal | |
1 0.000010 syn match cNumber display contained "\d\+\(u\=l\{0,2}\|ll\=u\)\>" | |
"hex number | |
1 0.000008 syn match cNumber display contained "0x\x\+\(u\=l\{0,2}\|ll\=u\)\>" | |
" Flag the first zero of an octal number as something special | |
1 0.000011 syn match cOctal display contained "0\o\+\(u\=l\{0,2}\|ll\=u\)\>" contains=cOctalZero | |
1 0.000007 syn match cOctalZero display contained "\<0" | |
1 0.000005 syn match cFloat display contained "\d\+f" | |
"floating point number, with dot, optional exponent | |
1 0.000009 syn match cFloat display contained "\d\+\.\d*\(e[-+]\=\d\+\)\=[fl]\=" | |
"floating point number, starting with a dot, optional exponent | |
1 0.000008 syn match cFloat display contained "\.\d\+\(e[-+]\=\d\+\)\=[fl]\=\>" | |
"floating point number, without dot, with exponent | |
1 0.000008 syn match cFloat display contained "\d\+e[-+]\=\d\+[fl]\=\>" | |
1 0.000005 if !exists("c_no_c99") | |
"hexadecimal floating point number, optional leading digits, with dot, with exponent | |
1 0.000009 syn match cFloat display contained "0x\x*\.\x\+p[-+]\=\d\+[fl]\=\>" | |
"hexadecimal floating point number, with leading digits, optional dot, with exponent | |
1 0.000008 syn match cFloat display contained "0x\x\+\.\=p[-+]\=\d\+[fl]\=\>" | |
1 0.000002 endif | |
" flag an octal number with wrong digits | |
1 0.000007 syn match cOctalError display contained "0\o*[89]\d*" | |
1 0.000002 syn case match | |
1 0.000005 if exists("c_comment_strings") | |
" A comment can contain cString, cCharacter and cNumber. | |
" But a "*/" inside a cString in a cComment DOES end the comment! So we | |
" need to use a special type of cString: cCommentString, which also ends on | |
" "*/", and sees a "*" at the start of the line as comment again. | |
" Unfortunately this doesn't very well work for // type of comments :-( | |
syn match cCommentSkip contained "^\s*\*\($\|\s\+\)" | |
syn region cCommentString contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1 contains=cSpecial,cCommentSkip | |
syn region cComment2String contained start=+L\=\\\@<!"+ skip=+\\\\\|\\"+ end=+"+ end="$" contains=cSpecial | |
syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cComment2String,cCharacter,cNumbersCom,cSpaceError,@Spell | |
if exists("c_no_comment_fold") | |
" Use "extend" here to have preprocessor lines not terminate halfway a | |
" comment. | |
syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cCommentString,cCharacter,cNumbersCom,cSpaceError,@Spell extend | |
else | |
syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cCommentString,cCharacter,cNumbersCom,cSpaceError,@Spell fold extend | |
endif | |
else | |
1 0.000022 syn region cCommentL start="//" skip="\\$" end="$" keepend contains=@cCommentGroup,cSpaceError,@Spell | |
1 0.000006 if exists("c_no_comment_fold") | |
syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cSpaceError,@Spell extend | |
else | |
1 0.000021 syn region cComment matchgroup=cCommentStart start="/\*" end="\*/" contains=@cCommentGroup,cCommentStartError,cSpaceError,@Spell fold extend | |
1 0.000002 endif | |
1 0.000001 endif | |
" keep a // comment separately, it terminates a preproc. conditional | |
1 0.000006 syn match cCommentError display "\*/" | |
1 0.000006 syn match cCommentStartError display "/\*"me=e-1 contained | |
1 0.000015 syn keyword cOperator sizeof | |
1 0.000004 if exists("c_gnu") | |
syn keyword cStatement __asm__ | |
syn keyword cOperator typeof __real__ __imag__ | |
endif | |
1 0.000006 syn keyword cType int long short char void | |
1 0.000005 syn keyword cType signed unsigned float double | |
1 0.000006 if !exists("c_no_ansi") || exists("c_ansi_typedefs") | |
1 0.000007 syn keyword cType size_t ssize_t off_t wchar_t ptrdiff_t sig_atomic_t fpos_t | |
1 0.000007 syn keyword cType clock_t time_t va_list jmp_buf FILE DIR div_t ldiv_t | |
1 0.000008 syn keyword cType mbstate_t wctrans_t wint_t wctype_t | |
1 0.000002 endif | |
1 0.000004 if !exists("c_no_c99") " ISO C99 | |
1 0.000011 syn keyword cType _Bool bool _Complex complex _Imaginary imaginary | |
1 0.000005 syn keyword cType int8_t int16_t int32_t int64_t | |
1 0.000005 syn keyword cType uint8_t uint16_t uint32_t uint64_t | |
1 0.000004 if !exists("c_no_bsd") | |
" These are BSD specific. | |
1 0.000005 syn keyword cType u_int8_t u_int16_t u_int32_t u_int64_t | |
1 0.000002 endif | |
1 0.000005 syn keyword cType int_least8_t int_least16_t int_least32_t int_least64_t | |
1 0.000005 syn keyword cType uint_least8_t uint_least16_t uint_least32_t uint_least64_t | |
1 0.000004 syn keyword cType int_fast8_t int_fast16_t int_fast32_t int_fast64_t | |
1 0.000004 syn keyword cType uint_fast8_t uint_fast16_t uint_fast32_t uint_fast64_t | |
1 0.000004 syn keyword cType intptr_t uintptr_t | |
1 0.000003 syn keyword cType intmax_t uintmax_t | |
1 0.000002 endif | |
1 0.000004 if exists("c_gnu") | |
syn keyword cType __label__ __complex__ __volatile__ | |
endif | |
1 0.000009 syn keyword cStructure struct union enum typedef | |
1 0.000006 syn keyword cStorageClass static register auto volatile extern const | |
1 0.000003 if exists("c_gnu") | |
syn keyword cStorageClass inline __attribute__ | |
endif | |
1 0.000005 if !exists("c_no_c99") && s:ft !=# 'cpp' | |
syn keyword cStorageClass inline restrict | |
endif | |
1 0.000003 if !exists("c_no_c11") | |
1 0.000005 syn keyword cStorageClass _Alignas alignas | |
1 0.000007 syn keyword cOperator _Alignof alignof | |
1 0.000004 syn keyword cStorageClass _Atomic | |
1 0.000006 syn keyword cOperator _Generic | |
1 0.000005 syn keyword cStorageClass _Noreturn noreturn | |
1 0.000007 syn keyword cOperator _Static_assert static_assert | |
1 0.000004 syn keyword cStorageClass _Thread_local thread_local | |
1 0.000004 syn keyword cType char16_t char32_t | |
1 0.000002 endif | |
1 0.000007 if !exists("c_no_ansi") || exists("c_ansi_constants") || exists("c_gnu") | |
1 0.000003 if exists("c_gnu") | |
syn keyword cConstant __GNUC__ __FUNCTION__ __PRETTY_FUNCTION__ __func__ | |
endif | |
1 0.000005 syn keyword cConstant __LINE__ __FILE__ __DATE__ __TIME__ __STDC__ | |
1 0.000003 syn keyword cConstant __STDC_VERSION__ | |
1 0.000004 syn keyword cConstant CHAR_BIT MB_LEN_MAX MB_CUR_MAX | |
1 0.000004 syn keyword cConstant UCHAR_MAX UINT_MAX ULONG_MAX USHRT_MAX | |
1 0.000004 syn keyword cConstant CHAR_MIN INT_MIN LONG_MIN SHRT_MIN | |
1 0.000004 syn keyword cConstant CHAR_MAX INT_MAX LONG_MAX SHRT_MAX | |
1 0.000004 syn keyword cConstant SCHAR_MIN SINT_MIN SLONG_MIN SSHRT_MIN | |
1 0.000004 syn keyword cConstant SCHAR_MAX SINT_MAX SLONG_MAX SSHRT_MAX | |
1 0.000004 if !exists("c_no_c99") | |
1 0.000004 syn keyword cConstant __func__ __VA_ARGS__ | |
1 0.000004 syn keyword cConstant LLONG_MIN LLONG_MAX ULLONG_MAX | |
1 0.000005 syn keyword cConstant INT8_MIN INT16_MIN INT32_MIN INT64_MIN | |
1 0.000005 syn keyword cConstant INT8_MAX INT16_MAX INT32_MAX INT64_MAX | |
1 0.000004 syn keyword cConstant UINT8_MAX UINT16_MAX UINT32_MAX UINT64_MAX | |
1 0.000005 syn keyword cConstant INT_LEAST8_MIN INT_LEAST16_MIN INT_LEAST32_MIN INT_LEAST64_MIN | |
1 0.000004 syn keyword cConstant INT_LEAST8_MAX INT_LEAST16_MAX INT_LEAST32_MAX INT_LEAST64_MAX | |
1 0.000005 syn keyword cConstant UINT_LEAST8_MAX UINT_LEAST16_MAX UINT_LEAST32_MAX UINT_LEAST64_MAX | |
1 0.000005 syn keyword cConstant INT_FAST8_MIN INT_FAST16_MIN INT_FAST32_MIN INT_FAST64_MIN | |
1 0.000016 syn keyword cConstant INT_FAST8_MAX INT_FAST16_MAX INT_FAST32_MAX INT_FAST64_MAX | |
1 0.000016 syn keyword cConstant UINT_FAST8_MAX UINT_FAST16_MAX UINT_FAST32_MAX UINT_FAST64_MAX | |
1 0.000012 syn keyword cConstant INTPTR_MIN INTPTR_MAX UINTPTR_MAX | |
1 0.000013 syn keyword cConstant INTMAX_MIN INTMAX_MAX UINTMAX_MAX | |
1 0.000014 syn keyword cConstant PTRDIFF_MIN PTRDIFF_MAX SIG_ATOMIC_MIN SIG_ATOMIC_MAX | |
1 0.000018 syn keyword cConstant SIZE_MAX WCHAR_MIN WCHAR_MAX WINT_MIN WINT_MAX | |
1 0.000002 endif | |
1 0.000027 syn keyword cConstant FLT_RADIX FLT_ROUNDS FLT_DIG FLT_MANT_DIG FLT_EPSILON DBL_DIG DBL_MANT_DIG DBL_EPSILON | |
1 0.000019 syn keyword cConstant LDBL_DIG LDBL_MANT_DIG LDBL_EPSILON FLT_MIN FLT_MAX FLT_MIN_EXP FLT_MAX_EXP FLT_MIN_10_EXP FLT_MAX_10_EXP | |
1 0.000007 syn keyword cConstant DBL_MIN DBL_MAX DBL_MIN_EXP DBL_MAX_EXP DBL_MIN_10_EXP DBL_MAX_10_EXP LDBL_MIN LDBL_MAX LDBL_MIN_EXP LDBL_MAX_EXP | |
1 0.000007 syn keyword cConstant LDBL_MIN_10_EXP LDBL_MAX_10_EXP HUGE_VAL CLOCKS_PER_SEC NULL LC_ALL LC_COLLATE LC_CTYPE LC_MONETARY | |
1 0.000008 syn keyword cConstant LC_NUMERIC LC_TIME SIG_DFL SIG_ERR SIG_IGN SIGABRT SIGFPE SIGILL SIGHUP SIGINT SIGSEGV SIGTERM | |
" Add POSIX signals as well... | |
1 0.000007 syn keyword cConstant SIGABRT SIGALRM SIGCHLD SIGCONT SIGFPE SIGHUP SIGILL SIGINT SIGKILL SIGPIPE SIGQUIT SIGSEGV | |
1 0.000006 syn keyword cConstant SIGSTOP SIGTERM SIGTRAP SIGTSTP SIGTTIN SIGTTOU SIGUSR1 SIGUSR2 | |
1 0.000007 syn keyword cConstant _IOFBF _IOLBF _IONBF BUFSIZ EOF WEOF FOPEN_MAX FILENAME_MAX L_tmpnam | |
1 0.000007 syn keyword cConstant SEEK_CUR SEEK_END SEEK_SET TMP_MAX stderr stdin stdout EXIT_FAILURE EXIT_SUCCESS RAND_MAX | |
" POSIX 2001 | |
1 0.000006 syn keyword cConstant SIGBUS SIGPOLL SIGPROF SIGSYS SIGURG SIGVTALRM SIGXCPU SIGXFSZ | |
" non-POSIX signals | |
1 0.000004 syn keyword cConstant SIGWINCH SIGINFO | |
" Add POSIX errors as well. List comes from: | |
" http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html | |
1 0.000006 syn keyword cConstant E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY EBADF | |
1 0.000006 syn keyword cConstant EBADMSG EBUSY ECANCELED ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK | |
1 0.000007 syn keyword cConstant EDESTADDRREQ EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTUNREACH EIDRM EILSEQ | |
1 0.000007 syn keyword cConstant EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK EMSGSIZE | |
1 0.000006 syn keyword cConstant EMULTIHOP ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS ENODATA | |
1 0.000006 syn keyword cConstant ENODEV ENOENT ENOEXEC ENOLCK ENOLINK ENOMEM ENOMSG ENOPROTOOPT ENOSPC ENOSR | |
1 0.000006 syn keyword cConstant ENOSTR ENOSYS ENOTCONN ENOTDIR ENOTEMPTY ENOTRECOVERABLE ENOTSOCK ENOTSUP | |
1 0.000006 syn keyword cConstant ENOTTY ENXIO EOPNOTSUPP EOVERFLOW EOWNERDEAD EPERM EPIPE EPROTO | |
1 0.000007 syn keyword cConstant EPROTONOSUPPORT EPROTOTYPE ERANGE EROFS ESPIPE ESRCH ESTALE ETIME ETIMEDOUT | |
1 0.000004 syn keyword cConstant ETXTBSY EWOULDBLOCK EXDEV | |
" math.h | |
1 0.000006 syn keyword cConstant M_E M_LOG2E M_LOG10E M_LN2 M_LN10 M_PI M_PI_2 M_PI_4 | |
1 0.000005 syn keyword cConstant M_1_PI M_2_PI M_2_SQRTPI M_SQRT2 M_SQRT1_2 | |
1 0.000001 endif | |
1 0.000006 if !exists("c_no_c99") " ISO C99 | |
1 0.000004 syn keyword cConstant true false | |
1 0.000002 endif | |
" Accept %: for # (C99) | |
1 0.000050 syn region cPreCondit start="^\s*\zs\(%:\|#\)\s*\(if\|ifdef\|ifndef\|elif\)\>" skip="\\$" end="$" keepend contains=cComment,cCommentL,cCppString,cCharacter,cCppParen,cParenError,cNumbers,cCommentError,cSpaceError | |
1 0.000011 syn match cPreConditMatch display "^\s*\zs\(%:\|#\)\s*\(else\|endif\)\>" | |
1 0.000004 if !exists("c_no_if0") | |
1 0.000027 syn cluster cCppOutInGroup contains=cCppInIf,cCppInElse,cCppInElse2,cCppOutIf,cCppOutIf2,cCppOutElse,cCppInSkip,cCppOutSkip | |
1 0.000024 syn region cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold | |
1 0.000018 syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse | |
1 0.000005 if !exists("c_no_if0_fold") | |
1 0.000026 syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold | |
1 0.000003 else | |
syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell | |
endif | |
1 0.000018 syn region cCppOutElse contained matchgroup=cCppOutWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=TOP,cPreCondit | |
1 0.000021 syn region cCppInWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0*[1-9]\d*\s*\($\|//\|/\*\||\)" end=".\@=\|$" contains=cCppInIf,cCppInElse fold | |
1 0.000016 syn region cCppInIf contained matchgroup=cCppInWrapper start="\d\+" end="^\s*\(%:\|#\)\s*endif\>" contains=TOP,cPreCondit | |
1 0.000004 if !exists("c_no_if0_fold") | |
1 0.000020 syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 fold | |
1 0.000001 else | |
syn region cCppInElse contained start="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0*[1-9]\d*\s*\($\|//\|/\*\||\)\)\@!\)" end=".\@=\|$" containedin=cCppInIf contains=cCppInElse2 | |
endif | |
1 0.000024 syn region cCppInElse2 contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(else\|elif\)\([^/]\|/[^/*]\)*" end="^\s*\(%:\|#\)\s*endif\>"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell | |
1 0.000024 syn region cCppOutSkip contained start="^\s*\(%:\|#\)\s*\(if\>\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" contains=cSpaceError,cCppOutSkip | |
1 0.000032 syn region cCppInSkip contained matchgroup=cCppInWrapper start="^\s*\(%:\|#\)\s*\(if\s\+\(\d\+\s*\($\|//\|/\*\||\|&\)\)\@!\|ifdef\>\|ifndef\>\)" skip="\\$" end="^\s*\(%:\|#\)\s*endif\>" containedin=cCppOutElse,cCppInIf,cCppInSkip contains=TOP,cPreProc | |
1 0.000002 endif | |
1 0.000012 syn region cIncluded display contained start=+"+ skip=+\\\\\|\\"+ end=+"+ | |
1 0.000007 syn match cIncluded display contained "<[^>]*>" | |
1 0.000014 syn match cInclude display "^\s*\zs\(%:\|#\)\s*include\>\s*["<]" contains=cIncluded | |
"syn match cLineSkip "\\$" | |
1 0.000084 syn cluster cPreProcGroup contains=cPreCondit,cIncluded,cInclude,cDefine,cErrInParen,cErrInBracket,cUserLabel,cSpecial,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cString,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cParen,cBracket,cMulti,cBadBlock | |
1 0.000022 syn region cDefine start="^\s*\zs\(%:\|#\)\s*\(define\|undef\)\>" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell | |
1 0.000021 syn region cPreProc start="^\s*\zs\(%:\|#\)\s*\(pragma\>\|line\>\|warning\>\|warn\>\|error\>\)" skip="\\$" end="$" keepend contains=ALLBUT,@cPreProcGroup,@Spell | |
" Highlight User Labels | |
1 0.000072 syn cluster cMultiGroup contains=cIncluded,cSpecial,cCommentSkip,cCommentString,cComment2String,@cCommentGroup,cCommentStartError,cUserCont,cUserLabel,cBitField,cOctalZero,cCppOutWrapper,cCppInWrapper,@cCppOutInGroup,cFormat,cNumber,cFloat,cOctal,cOctalError,cNumbersCom,cCppParen,cCppBracket,cCppString | |
1 0.000009 if s:ft ==# 'c' || exists("cpp_no_cpp11") | |
syn region cMulti transparent start='?' skip='::' end=':' contains=ALLBUT,@cMultiGroup,@Spell,@cStringGroup | |
endif | |
" Avoid matching foo::bar() in C++ by requiring that the next char is not ':' | |
1 0.000007 syn cluster cLabelGroup contains=cUserLabel | |
1 0.000010 syn match cUserCont display "^\s*\zs\I\i*\s*:$" contains=@cLabelGroup | |
1 0.000009 syn match cUserCont display ";\s*\zs\I\i*\s*:$" contains=@cLabelGroup | |
1 0.000004 if s:ft ==# 'cpp' | |
1 0.000013 syn match cUserCont display "^\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup | |
1 0.000012 syn match cUserCont display ";\s*\zs\%(class\|struct\|enum\)\@!\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup | |
1 0.000002 else | |
syn match cUserCont display "^\s*\zs\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup | |
syn match cUserCont display ";\s*\zs\I\i*\s*:[^:]"me=e-1 contains=@cLabelGroup | |
endif | |
1 0.000006 syn match cUserLabel display "\I\i*" contained | |
" Avoid recognizing most bitfields as labels | |
1 0.000011 syn match cBitField display "^\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType | |
1 0.000011 syn match cBitField display ";\s*\zs\I\i*\s*:\s*[1-9]"me=e-1 contains=cType | |
1 0.000005 if exists("c_minlines") | |
let b:c_minlines = c_minlines | |
else | |
1 0.000004 if !exists("c_no_if0") | |
1 0.000004 let b:c_minlines = 50 " #if 0 constructs can be long | |
1 0.000001 else | |
let b:c_minlines = 15 " mostly for () constructs | |
endif | |
1 0.000001 endif | |
1 0.000004 if exists("c_curly_error") | |
syn sync fromstart | |
else | |
1 0.000015 exec "syn sync ccomment cComment minlines=" . b:c_minlines | |
1 0.000001 endif | |
" Define the default highlighting. | |
" Only used when an item doesn't have highlighting yet | |
1 0.000007 hi def link cFormat cSpecial | |
1 0.000004 hi def link cCppString cString | |
1 0.000003 hi def link cCommentL cComment | |
1 0.000004 hi def link cCommentStart cComment | |
1 0.000021 hi def link cLabel Label | |
1 0.000010 hi def link cUserLabel Label | |
1 0.000010 hi def link cConditional Conditional | |
1 0.000009 hi def link cRepeat Repeat | |
1 0.000010 hi def link cCharacter Character | |
1 0.000006 hi def link cSpecialCharacter cSpecial | |
1 0.000009 hi def link cNumber Number | |
1 0.000010 hi def link cOctal Number | |
1 0.000010 hi def link cOctalZero PreProc " link this to Error if you want | |
1 0.000009 hi def link cFloat Float | |
1 0.000004 hi def link cOctalError cError | |
1 0.000004 hi def link cParenError cError | |
1 0.000003 hi def link cErrInParen cError | |
1 0.000004 hi def link cErrInBracket cError | |
1 0.000003 hi def link cCommentError cError | |
1 0.000004 hi def link cCommentStartError cError | |
1 0.000004 hi def link cSpaceError cError | |
1 0.000004 hi def link cSpecialError cError | |
1 0.000004 hi def link cCurlyError cError | |
1 0.000011 hi def link cOperator Operator | |
1 0.000012 hi def link cStructure Structure | |
1 0.000009 hi def link cStorageClass StorageClass | |
1 0.000009 hi def link cInclude Include | |
1 0.000010 hi def link cPreProc PreProc | |
1 0.000009 hi def link cDefine Macro | |
1 0.000004 hi def link cIncluded cString | |
1 0.000007 hi def link cError Error | |
1 0.000009 hi def link cStatement Statement | |
1 0.000005 hi def link cCppInWrapper cCppOutWrapper | |
1 0.000003 hi def link cCppOutWrapper cPreCondit | |
1 0.000003 hi def link cPreConditMatch cPreCondit | |
1 0.000008 hi def link cPreCondit PreCondit | |
1 0.000009 hi def link cType Type | |
1 0.000009 hi def link cConstant Constant | |
1 0.000005 hi def link cCommentString cString | |
1 0.000004 hi def link cComment2String cString | |
1 0.000004 hi def link cCommentSkip cComment | |
1 0.000009 hi def link cString String | |
1 0.000009 hi def link cComment Comment | |
1 0.000009 hi def link cSpecial SpecialChar | |
1 0.000010 hi def link cTodo Todo | |
1 0.000010 hi def link cBadContinuation Error | |
1 0.000004 hi def link cCppOutSkip cCppOutIf2 | |
1 0.000003 hi def link cCppInElse2 cCppOutIf2 | |
1 0.000004 hi def link cCppOutIf2 cCppOut | |
1 0.000008 hi def link cCppOut Comment | |
1 0.000005 let b:current_syntax = "c" | |
1 0.000004 unlet s:ft | |
1 0.000019 let &cpo = s:cpo_save | |
1 0.000003 unlet s:cpo_save | |
" vim: ts=8 | |
FUNCTION <SNR>96_Complete() | |
Called 23 times | |
Total time: 0.000504 | |
Self time: 0.000281 | |
count total (s) self (s) | |
" <c-x><c-u> invokes the user's completion function (which we have set to | |
" youcompleteme#CompleteFunc), and <c-p> tells Vim to select the previous | |
" completion candidate. This is necessary because by default, Vim selects the | |
" first candidate when completion is invoked, and selecting a candidate | |
" automatically replaces the current text with it. Calling <c-p> forces Vim to | |
" deselect the first candidate and in turn preserve the user's current text | |
" until he explicitly chooses to replace it with a completion. | |
23 0.000419 0.000196 call s:SendKeys( "\<C-X>\<C-U>\<C-P>" ) | |
FUNCTION <SNR>8_SynSet() | |
Called 1 time | |
Total time: 0.005077 | |
Self time: 0.000845 | |
count total (s) self (s) | |
" clear syntax for :set syntax=OFF and any syntax name that doesn't exist | |
1 0.000004 syn clear | |
1 0.000005 if exists("b:current_syntax") | |
1 0.000002 unlet b:current_syntax | |
1 0.000001 endif | |
1 0.000006 let s = expand("<amatch>") | |
1 0.000002 if s == "ON" | |
" :set syntax=ON | |
if &filetype == "" | |
echohl ErrorMsg | |
echo "filetype unknown" | |
echohl None | |
endif | |
let s = &filetype | |
elseif s == "OFF" | |
let s = "" | |
endif | |
1 0.000001 if s != "" | |
" Load the syntax file(s). When there are several, separated by dots, | |
" load each in sequence. | |
2 0.000016 for name in split(s, '\.') | |
1 0.005009 0.000777 exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim" | |
1 0.000003 endfor | |
1 0.000001 endif | |
FUNCTION <SNR>47_SetUpForNewFiletype() | |
Called 162 times | |
Total time: 0.020904 | |
Self time: 0.016198 | |
count total (s) self (s) | |
162 0.000445 let ft = a:filetype | |
"for compound filetypes, if we don't know how to handle the full filetype | |
"then break it down and use the first part that we know how to handle | |
162 0.001014 if ft =~ '\.' && !has_key(s:delimiterMap, ft) | |
let filetypes = split(a:filetype, '\.') | |
for i in filetypes | |
if has_key(s:delimiterMap, i) | |
let ft = i | |
break | |
endif | |
endfor | |
endif | |
162 0.000448 let b:NERDSexyComMarker = '' | |
162 0.000608 if has_key(s:delimiterMap, ft) | |
81 0.000273 let b:NERDCommenterDelims = s:delimiterMap[ft] | |
405 0.000745 for i in ['left', 'leftAlt', 'right', 'rightAlt'] | |
324 0.000934 if !has_key(b:NERDCommenterDelims, i) | |
let b:NERDCommenterDelims[i] = '' | |
endif | |
324 0.000249 endfor | |
243 0.000405 for i in ['nested', 'nestedAlt'] | |
162 0.000460 if !has_key(b:NERDCommenterDelims, i) | |
let b:NERDCommenterDelims[i] = 0 | |
endif | |
162 0.000124 endfor | |
" if g:NERD_<filetype>_alt_style is defined, use the alternate style | |
81 0.000465 let b:NERDCommenterFirstInit = getbufvar(1,"NERDCommenterFirstInit") | |
81 0.000589 if exists('g:NERDAltDelims_'.ft) && eval('g:NERDAltDelims_'.ft) && !b:NERDCommenterFirstInit | |
call s:SwitchToAlternativeDelimiters(0) | |
let b:NERDCommenterFirstInit = 1 | |
endif | |
81 0.000084 else | |
81 0.005622 0.000916 let b:NERDCommenterDelims = s:CreateDelimMapFromCms() | |
81 0.000102 endif | |
FUNCTION color_coded#get_buffer_name() | |
Called 13209 times | |
Total time: 0.342427 | |
Self time: 0.342427 | |
count total (s) self (s) | |
13209 0.009278 lua << EOF | |
local name = color_coded_buffer_name() | |
vim.command("let s:file = '" .. name .. "'") | |
EOF | |
13209 0.047537 if exists("w:color_coded_unique_counter") | |
13209 0.044418 return s:file . w:color_coded_unique_counter | |
else | |
return s:file | |
endif | |
FUNCTION airline#util#exec_funcrefs() | |
Called 2 times | |
Total time: 0.001357 | |
Self time: 0.000094 | |
count total (s) self (s) | |
8 0.000013 for Fn in a:list | |
8 0.001320 0.000057 let code = call(Fn, a:000) | |
8 0.000007 if code != 0 | |
2 0.000002 return code | |
endif | |
6 0.000003 endfor | |
return 0 | |
FUNCTION airline#extensions#quickfix#inactive_qf_window() | |
Called 1 time | |
Total time: 0.000010 | |
Self time: 0.000010 | |
count total (s) self (s) | |
1 0.000005 if getbufvar(a:2.bufnr, '&filetype') is# 'qf' && !empty(airline#util#getwinvar(a:2.winnr, 'quickfix_title', '')) | |
call setwinvar(a:2.winnr, 'airline_section_c', '[%{get(w:, "quickfix_title", "")}] %f %m') | |
endif | |
FUNCTION <SNR>70_Setup() | |
Called 163 times | |
Total time: 0.189971 | |
Self time: 0.006621 | |
count total (s) self (s) | |
163 0.000488 if &filetype ==# "" | |
81 0.014366 0.000529 call s:InitColor() | |
81 0.000074 endif | |
163 0.005756 0.001185 if s:Filter() && g:indentLine_enabled || exists("b:indentLine_enabled") && b:indentLine_enabled | |
163 0.161634 0.001073 call s:IndentLinesEnable() | |
163 0.000160 endif | |
163 0.006139 0.001758 if s:Filter() && g:indentLine_leadingSpaceEnabled || exists("b:indentLine_leadingSpaceEnabled") && b:indentLine_leadingSpaceEnabled | |
call s:LeadingSpaceEnable() | |
endif | |
FUNCTION <SNR>4_BMTruncName() | |
Called 1 time | |
Total time: 0.000023 | |
Self time: 0.000023 | |
count total (s) self (s) | |
1 0.000001 let name = a:fname | |
1 0.000001 if g:bmenu_max_pathlen < 5 | |
let name = "" | |
else | |
1 0.000003 let len = strlen(name) | |
1 0.000001 if len > g:bmenu_max_pathlen | |
let amountl = (g:bmenu_max_pathlen / 2) - 2 | |
let amountr = g:bmenu_max_pathlen - amountl - 3 | |
let pattern = '^\(.\{,' . amountl . '}\).\{-}\(.\{,' . amountr . '}\)$' | |
let left = substitute(name, pattern, '\1', '') | |
let right = substitute(name, pattern, '\2', '') | |
if strlen(left) + strlen(right) < len | |
let name = left . '...' . right | |
endif | |
endif | |
1 0.000001 endif | |
1 0.000001 return name | |
FUNCTION <SNR>70_SetConcealOption() | |
Called 163 times | |
Total time: 0.002629 | |
Self time: 0.002629 | |
count total (s) self (s) | |
163 0.000278 if !g:indentLine_setConceal | |
return | |
endif | |
163 0.000595 if !exists("b:indentLine_ConcealOptionSet") | |
1 0.000002 let b:indentLine_ConcealOptionSet = 1 | |
1 0.000007 let &l:concealcursor = exists("g:indentLine_concealcursor") ? g:indentLine_concealcursor : "inc" | |
1 0.000007 let &l:conceallevel = exists("g:indentLine_conceallevel") ? g:indentLine_conceallevel : "2" | |
1 0.000000 endif | |
FUNCTION <SNR>88_get_seperator() | |
Called 325 times | |
Total time: 0.324509 | |
Self time: 0.004909 | |
count total (s) self (s) | |
325 0.106623 0.002120 if s:should_change_group(a:prev_group, a:group) | |
325 0.217608 0.002511 return s:get_transitioned_seperator(a:self, a:prev_group, a:group, a:side) | |
else | |
return a:side ? a:self._context.left_alt_sep : a:self._context.right_alt_sep | |
endif | |
FUNCTION airline#check_mode() | |
Called 477 times | |
Total time: 0.120084 | |
Self time: 0.052045 | |
count total (s) self (s) | |
477 0.002061 if !exists("s:airline_run") | |
let s:airline_run = 0 | |
endif | |
477 0.001275 let s:airline_run += 1 | |
477 0.001416 let context = s:contexts[a:winnr] | |
477 0.001696 if get(w:, 'airline_active', 1) | |
289 0.000943 let l:m = mode() | |
289 0.000549 if l:m ==# "i" | |
172 0.000441 let l:mode = ['insert'] | |
172 0.000242 elseif l:m ==# "R" | |
let l:mode = ['replace'] | |
elseif l:m =~# '\v(v|V||s|S|)' | |
let l:mode = ['visual'] | |
elseif l:m ==# "t" | |
let l:mode = ['terminal'] | |
else | |
117 0.000262 let l:mode = ['normal'] | |
117 0.000096 endif | |
289 0.001503 let w:airline_current_mode = get(g:airline_mode_map, l:m, l:m) | |
289 0.000230 else | |
188 0.000477 let l:mode = ['inactive'] | |
188 0.000951 let w:airline_current_mode = get(g:airline_mode_map, '__') | |
188 0.000175 endif | |
477 0.001730 if g:airline_detect_modified && &modified | |
220 0.001037 call add(l:mode, 'modified') | |
220 0.000194 endif | |
477 0.000947 if g:airline_detect_paste && &paste | |
call add(l:mode, 'paste') | |
endif | |
477 0.002319 if g:airline_detect_crypt && exists("+key") && !empty(&key) | |
call add(l:mode, 'crypt') | |
endif | |
477 0.000937 if g:airline_detect_spell && &spell | |
call add(l:mode, 'spell') | |
endif | |
477 0.000802 if &readonly || ! &modifiable | |
140 0.000549 call add(l:mode, 'readonly') | |
140 0.000110 endif | |
477 0.002117 let mode_string = join(l:mode) | |
477 0.000853 if s:airline_run < 3 | |
" skip this round. | |
" When this function is run too early after startup, | |
" it forces a redraw by vim which will remove the intro screen. | |
let w:airline_lastmode = mode_string | |
return '' | |
endif | |
477 0.002198 if get(w:, 'airline_lastmode', '') != mode_string | |
3 0.001032 0.000022 call airline#highlighter#highlight_modified_inactive(context.bufnr) | |
3 0.067071 0.000042 call airline#highlighter#highlight(l:mode, context.bufnr) | |
3 0.000010 let w:airline_lastmode = mode_string | |
3 0.000001 endif | |
477 0.000666 return '' | |
FUNCTION <SNR>96_DisableOnLargeFile() | |
Called 63 times | |
Total time: 0.000406 | |
Self time: 0.000406 | |
count total (s) self (s) | |
63 0.000236 if exists( 'b:ycm_largefile' ) | |
63 0.000120 return b:ycm_largefile | |
endif | |
let threshold = g:ycm_disable_for_files_larger_than_kb * 1024 | |
let b:ycm_largefile = threshold > 0 && getfsize( expand( a:buffer ) ) > threshold | |
if b:ycm_largefile | |
exec s:python_command "vimsupport.PostVimMessage(" . "'YouCompleteMe is disabled in this buffer; " . "the file exceeded the max size (see YCM options).' )" | |
endif | |
return b:ycm_largefile | |
FUNCTION airline#util#append() | |
Called 1043 times | |
Total time: 0.010634 | |
Self time: 0.010634 | |
count total (s) self (s) | |
1043 0.002309 if a:minwidth > 0 && winwidth(0) < a:minwidth | |
return '' | |
endif | |
1043 0.003237 let prefix = s:spc == "\ua0" ? s:spc : s:spc.s:spc | |
1043 0.002917 return empty(a:text) ? '' : prefix.g:airline_left_alt_sep.s:spc.a:text | |
FUNCTION <SNR>76_wordcount_update() | |
Called 58 times | |
Total time: 0.003123 | |
Self time: 0.003123 | |
count total (s) self (s) | |
58 0.000211 if empty(bufname('')) | |
return | |
endif | |
58 0.001118 if match(&ft, get(g:, 'airline#extensions#wordcount#filetypes')) > -1 | |
let l:mode = mode() | |
if l:mode ==# 'v' || l:mode ==# 'V' || l:mode ==# 's' || l:mode ==# 'S' | |
let b:airline_wordcount = airline#extensions#wordcount#formatters#{s:formatter}#format() | |
let b:airline_change_tick = b:changedtick | |
else | |
if get(b:, 'airline_wordcount_cache', '') is# '' || b:airline_wordcount_cache isnot# get(b:, 'airline_wordcount', '') || get(b:, 'airline_change_tick', 0) != b:changedtick || get(b:, 'airline_winwidth', 0) != winwidth(0) | |
" cache data | |
let b:airline_wordcount = airline#extensions#wordcount#formatters#{s:formatter}#format() | |
let b:airline_wordcount_cache = b:airline_wordcount | |
let b:airline_change_tick = b:changedtick | |
let b:airline_winwidth = winwidth(0) | |
endif | |
endif | |
endif | |
FUNCTION <SNR>96_PollFileParseResponse() | |
Called 4 times | |
Total time: 0.003076 | |
Self time: 0.002564 | |
count total (s) self (s) | |
4 0.000569 0.000057 if !s:Pyeval( "ycm_state.FileParseRequestReady()" ) | |
let s:pollers.file_parse_response.id = timer_start( s:pollers.file_parse_response.wait_milliseconds, function( 's:PollFileParseResponse' ) ) | |
return | |
endif | |
4 0.002461 exec s:python_command "ycm_state.HandleFileParseRequest()" | |
FUNCTION airline#themes#get_highlight() | |
Called 1060 times | |
Total time: 0.161882 | |
Self time: 0.009056 | |
count total (s) self (s) | |
1060 0.161356 0.008530 return call('airline#highlighter#get_highlight', [a:group] + a:000) | |
FUNCTION <SNR>62_Highlight_Matching_Pair() | |
Called 241 times | |
Total time: 0.011161 | |
Self time: 0.011161 | |
count total (s) self (s) | |
" Remove any previous match. | |
241 0.001012 if exists('w:paren_hl_on') && w:paren_hl_on | |
silent! call matchdelete(3) | |
let w:paren_hl_on = 0 | |
endif | |
" Avoid that we remove the popup menu. | |
" Return when there are no colors (looks like the cursor jumps). | |
241 0.001350 if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
162 0.000173 return | |
endif | |
" Get the character under the cursor and check if it's in 'matchpairs'. | |
79 0.000250 let c_lnum = line('.') | |
79 0.000213 let c_col = col('.') | |
79 0.000102 let before = 0 | |
79 0.000278 let text = getline(c_lnum) | |
79 0.001438 let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
79 0.000201 if empty(matches) | |
let [c_before, c] = ['', ''] | |
else | |
79 0.000425 let [c_before, c] = matches[1:2] | |
79 0.000072 endif | |
79 0.001242 let plist = split(&matchpairs, '.\zs[:,]') | |
79 0.000281 let i = index(plist, c) | |
79 0.000104 if i < 0 | |
" not found, in Insert mode try character before the cursor | |
79 0.000311 if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
32 0.000099 let before = strlen(c_before) | |
32 0.000048 let c = c_before | |
32 0.000080 let i = index(plist, c) | |
32 0.000024 endif | |
79 0.000090 if i < 0 | |
" not found, nothing to do | |
79 0.000081 return | |
endif | |
endif | |
" Figure out the arguments for searchpairpos(). | |
if i % 2 == 0 | |
let s_flags = 'nW' | |
let c2 = plist[i + 1] | |
else | |
let s_flags = 'nbW' | |
let c2 = c | |
let c = plist[i - 1] | |
endif | |
if c == '[' | |
let c = '\[' | |
let c2 = '\]' | |
endif | |
" Find the match. When it was just before the cursor move it there for a | |
" moment. | |
if before > 0 | |
let has_getcurpos = exists("*getcurpos") | |
if has_getcurpos | |
" getcurpos() is more efficient but doesn't exist before 7.4.313. | |
let save_cursor = getcurpos() | |
else | |
let save_cursor = winsaveview() | |
endif | |
call cursor(c_lnum, c_col - before) | |
endif | |
" Build an expression that detects whether the current cursor position is in | |
" certain syntax types (string, comment, etc.), for use as searchpairpos()'s | |
" skip argument. | |
" We match "escape" for special items, such as lispEscapeSpecial. | |
let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
" If executing the expression determines that the cursor is currently in | |
" one of the syntax types, then we want searchpairpos() to find the pair | |
" within those syntax types (i.e., not skip). Otherwise, the cursor is | |
" outside of the syntax types and s_skip should keep its value so we skip any | |
" matching pair inside the syntax types. | |
execute 'if' s_skip '| let s_skip = 0 | endif' | |
" Limit the search to lines visible in the window. | |
let stoplinebottom = line('w$') | |
let stoplinetop = line('w0') | |
if i % 2 == 0 | |
let stopline = stoplinebottom | |
else | |
let stopline = stoplinetop | |
endif | |
" Limit the search time to 300 msec to avoid a hang on very long lines. | |
" This fails when a timeout is not supported. | |
if mode() == 'i' || mode() == 'R' | |
let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
else | |
let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
endif | |
try | |
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
catch /E118/ | |
" Can't use the timeout, restrict the stopline a bit more to avoid taking | |
" a long time on closed folds and long lines. | |
" The "viewable" variables give a range in which we can scroll while | |
" keeping the cursor at the same position. | |
" adjustedScrolloff accounts for very large numbers of scrolloff. | |
let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
" one of these stoplines will be adjusted below, but the current values are | |
" minimal boundaries within the current window | |
if i % 2 == 0 | |
if has("byte_offset") && has("syntax_items") && &smc > 0 | |
let stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
let stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
else | |
let stopline = min([bottom_viewable, c_lnum + 100]) | |
endif | |
let stoplinebottom = stopline | |
else | |
if has("byte_offset") && has("syntax_items") && &smc > 0 | |
let stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
let stopline = max([top_viewable, byte2line(stopbyte)]) | |
else | |
let stopline = max([top_viewable, c_lnum - 100]) | |
endif | |
let stoplinetop = stopline | |
endif | |
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
endtry | |
if before > 0 | |
if has_getcurpos | |
call setpos('.', save_cursor) | |
else | |
call winrestview(save_cursor) | |
endif | |
endif | |
" If a match is found setup match highlighting. | |
if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
if exists('*matchaddpos') | |
call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
else | |
exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
endif | |
let w:paren_hl_on = 1 | |
endif | |
FUNCTION airline#extensions#tabline#buffers#get() | |
Called 225 times | |
Total time: 0.687002 | |
Self time: 0.032127 | |
count total (s) self (s) | |
225 0.004907 0.001181 call <sid>map_keys() | |
225 0.000835 let cur = bufnr('%') | |
225 0.000416 if cur == s:current_bufnr | |
67 0.000444 if !g:airline_detect_modified || getbufvar(cur, '&modified') == s:current_modified | |
66 0.000154 return s:current_tabline | |
endif | |
1 0.000000 endif | |
159 0.000276 let l:index = 1 | |
159 0.012109 0.000813 let b = airline#extensions#tabline#new_builder() | |
159 0.000743 let tab_bufs = tabpagebuflist(tabpagenr()) | |
318 0.064747 0.001380 for nr in s:get_visible_buffers() | |
159 0.000224 if nr < 0 | |
call b.add_raw('%#airline_tabhid#...') | |
continue | |
endif | |
159 0.005526 0.001033 let group = airline#extensions#tabline#group_of_bufnr(tab_bufs, nr) | |
159 0.000229 if nr == cur | |
80 0.000300 let s:current_modified = (group == 'airline_tabmod') ? 1 : 0 | |
80 0.000119 endif | |
" Neovim feature: Have clickable buffers | |
159 0.000849 if has("tablineat") | |
call b.add_raw('%'.nr.'@airline#extensions#tabline#buffers#clickbuf@') | |
endif | |
159 0.000238 if s:buffer_idx_mode | |
if len(s:number_map) > 0 | |
call b.add_section(group, s:spc . get(s:number_map, l:index, '') . '%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)' . s:spc) | |
else | |
call b.add_section(group, '['.l:index.s:spc.'%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)'.']') | |
endif | |
let l:index = l:index + 1 | |
else | |
159 0.002528 0.001608 call b.add_section(group, s:spc.'%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)'.s:spc) | |
159 0.000158 endif | |
159 0.000647 if has("tablineat") | |
call b.add_raw('%X') | |
endif | |
159 0.000140 endfor | |
159 0.001478 0.000759 call b.add_section('airline_tabfill', '') | |
159 0.001201 0.000486 call b.split() | |
159 0.001186 0.000578 call b.add_section('airline_tabfill', '') | |
159 0.000255 if s:show_tab_type | |
159 0.003308 0.000814 call b.add_section_spaced('airline_tabtype', s:buffers_label) | |
159 0.000145 endif | |
159 0.000466 if tabpagenr('$') > 1 | |
call b.add_section_spaced('airline_tabmod', printf('%s %d/%d', "tab", tabpagenr(), tabpagenr('$'))) | |
endif | |
159 0.000320 let s:current_bufnr = cur | |
159 0.568063 0.001526 let s:current_tabline = b.build() | |
159 0.000320 return s:current_tabline | |
FUNCTION <SNR>96_OnBufferEnter() | |
Called 162 times | |
Total time: 0.004527 | |
Self time: 0.001116 | |
count total (s) self (s) | |
162 0.004204 0.000793 if !s:VisitedBufferRequiresReparse() | |
162 0.000147 return | |
endif | |
call s:SetUpCompleteopt() | |
call s:SetCompleteFunc() | |
exec s:python_command "ycm_state.OnBufferVisit()" | |
" Last parse may be outdated because of changes from other buffers. Force a | |
" new parse. | |
call s:OnFileReadyToParse( 1 ) | |
FUNCTION airline#parts#filetype() | |
Called 477 times | |
Total time: 0.003821 | |
Self time: 0.003821 | |
count total (s) self (s) | |
477 0.003482 return winwidth(0) < 90 && strlen(&filetype) > 3 ? matchstr(&filetype, '...'). (&encoding is? 'utf-8' ? '…' : '>') : &filetype | |
FUNCTION airline#extensions#netrw#apply() | |
Called 1 time | |
Total time: 0.000020 | |
Self time: 0.000020 | |
count total (s) self (s) | |
1 0.000004 if &ft == 'netrw' | |
let spc = g:airline_symbols.space | |
call a:1.add_section('airline_a', spc.'netrw'.spc) | |
if exists('*airline#extensions#branch#get_head') | |
call a:1.add_section('airline_b', spc.'%{airline#extensions#branch#get_head()}'.spc) | |
endif | |
call a:1.add_section('airline_c', spc.'%f'.spc) | |
call a:1.split() | |
call a:1.add_section('airline_y', spc.'%{airline#extensions#netrw#sortstring()}'.spc) | |
return 1 | |
endif | |
FUNCTION airline#parts#iminsert() | |
Called 149 times | |
Total time: 0.001055 | |
Self time: 0.001055 | |
count total (s) self (s) | |
149 0.000434 if g:airline_detect_iminsert && &iminsert && exists('b:keymap_name') | |
return toupper(b:keymap_name) | |
endif | |
149 0.000126 return '' | |
FUNCTION <SNR>96_VisitedBufferRequiresReparse() | |
Called 162 times | |
Total time: 0.003411 | |
Self time: 0.001716 | |
count total (s) self (s) | |
162 0.000877 if bufnr( '%' ) ==# s:previous_allowed_buffer_number | |
81 0.000103 return 0 | |
endif | |
81 0.002093 0.000398 return s:AllowedToCompleteInCurrentBuffer() | |
FUNCTION <SNR>56_is_space_expansion() | |
Called 6 times | |
Total time: 0.000984 | |
Self time: 0.000291 | |
count total (s) self (s) | |
6 0.000013 if col('.') > 2 | |
5 0.000175 0.000024 let pchar = s:get_char(-2) | |
5 0.000117 0.000024 let nchar = s:get_char(1) | |
5 0.000272 0.000051 let isSpaces = (s:get_char(-1) == s:get_char(0) && s:get_char(-1) == " ") | |
5 0.000179 0.000062 if index(s:get('left_delims'), pchar) > -1 && index(s:get('left_delims'), pchar) == index(s:get('right_delims'), nchar) && isSpaces | |
return 1 | |
elseif index(s:get('quotes_list'), pchar) > -1 && index(s:get('quotes_list'), pchar) == index(s:get('quotes_list'), nchar) && isSpaces | |
return 1 | |
endif | |
5 0.000003 endif | |
6 0.000004 return 0 | |
FUNCTION <SNR>56_get_syn_name() | |
Called 6 times | |
Total time: 0.000570 | |
Self time: 0.000570 | |
count total (s) self (s) | |
6 0.000020 let col = col('.') | |
6 0.000014 if col == col('$') | |
6 0.000011 let col = col - 1 | |
6 0.000005 endif | |
6 0.000509 return synIDattr(synIDtrans(synID(line('.'), col, 1)), 'name') | |
FUNCTION <SNR>96_OnBlankLine() | |
Called 18 times | |
Total time: 0.007189 | |
Self time: 0.000163 | |
count total (s) self (s) | |
18 0.007178 0.000152 return s:Pyeval( 'not vim.current.line or vim.current.line.isspace()' ) | |
FUNCTION <SNR>96_SendKeys() | |
Called 31 times | |
Total time: 0.000316 | |
Self time: 0.000316 | |
count total (s) self (s) | |
" By default keys are added to the end of the typeahead buffer. If there are | |
" already keys in the buffer, they will be processed first and may change the | |
" state that our keys combination was sent for (e.g. <C-X><C-U><C-P> in normal | |
" mode instead of insert mode or <C-e> outside of completion mode). We avoid | |
" that by inserting the keys at the start of the typeahead buffer with the 'i' | |
" option. Also, we don't want the keys to be remapped to something else so we | |
" add the 'n' option. | |
31 0.000188 call feedkeys( a:keys, 'in' ) | |
FUNCTION 268() | |
Called 159 times | |
Total time: 0.002494 | |
Self time: 0.001838 | |
count total (s) self (s) | |
159 0.000759 let spc = empty(a:contents) ? '' : g:airline_symbols.space | |
159 0.001644 0.000988 call self.add_section(a:group, spc.a:contents.spc) | |
FUNCTION airline#extensions#tabline#buflist#list() | |
Called 543 times | |
Total time: 0.020167 | |
Self time: 0.020167 | |
count total (s) self (s) | |
543 0.002053 if exists('s:current_buffer_list') | |
383 0.000726 return s:current_buffer_list | |
endif | |
160 0.000623 let excludes = get(g:, 'airline#extensions#tabline#excludes', []) | |
160 0.000648 let exclude_preview = get(g:, 'airline#extensions#tabline#exclude_preview', 1) | |
160 0.001320 let list = (exists('g:did_bufmru') && g:did_bufmru) ? BufMRUList() : range(1, bufnr("$")) | |
160 0.000250 let buffers = [] | |
" If this is too slow, we can switch to a different algorithm. | |
" Basically branch 535 already does it, but since it relies on | |
" BufAdd autocommand, I'd like to avoid this if possible. | |
480 0.000756 for nr in list | |
320 0.000850 if buflisted(nr) | |
" Do not add to the bufferlist, if either | |
" 1) buffername matches exclude pattern | |
" 2) buffer is a quickfix buffer | |
" 3) exclude preview windows (if 'bufhidden' == wipe | |
" and 'buftype' == nofile | |
320 0.004944 if (!empty(excludes) && match(bufname(nr), join(excludes, '\|')) > -1) || (getbufvar(nr, 'current_syntax') == 'qf') || (exclude_preview && getbufvar(nr, '&bufhidden') == 'wipe' && getbufvar(nr, '&buftype') == 'nofile') | |
160 0.000221 continue | |
endif | |
160 0.000624 call add(buffers, nr) | |
160 0.000135 endif | |
160 0.000152 endfor | |
160 0.000423 let s:current_buffer_list = buffers | |
160 0.000199 return buffers | |
FUNCTION <SNR>96_OnCursorMovedNormalMode() | |
Called 40 times | |
Total time: 0.007343 | |
Self time: 0.004945 | |
count total (s) self (s) | |
40 0.002588 0.000190 if !s:AllowedToCompleteInCurrentBuffer() | |
return | |
endif | |
40 0.004644 exec s:python_command "ycm_state.OnCursorMoved()" | |
FUNCTION <SNR>80_get_visible_buffers() | |
Called 159 times | |
Total time: 0.063367 | |
Self time: 0.015406 | |
count total (s) self (s) | |
159 0.018431 0.001003 let buffers = airline#extensions#tabline#buflist#list() | |
159 0.000764 let cur = bufnr('%') | |
159 0.000333 let total_width = 0 | |
159 0.000238 let max_width = 0 | |
318 0.000508 for nr in buffers | |
159 0.031982 0.001449 let width = len(airline#extensions#tabline#get_buffer_name(nr)) + 4 | |
159 0.000393 let total_width += width | |
159 0.000695 let max_width = max([max_width, width]) | |
159 0.000171 endfor | |
" only show current and surrounding buffers if there are too many buffers | |
159 0.000524 let position = index(buffers, cur) | |
159 0.000307 let vimwidth = &columns | |
159 0.000344 if total_width > vimwidth && position > -1 | |
let buf_count = len(buffers) | |
" determine how many buffers to show based on the longest buffer width, | |
" use one on the right side and put the rest on the left | |
let buf_max = vimwidth / max_width | |
let buf_right = 1 | |
let buf_left = max([0, buf_max - buf_right]) | |
let start = max([0, position - buf_left]) | |
let end = min([buf_count, position + buf_right]) | |
" fill up available space on the right | |
if position < buf_left | |
let end += (buf_left - position) | |
endif | |
" fill up available space on the left | |
if end > buf_count - 1 - buf_right | |
let start -= max([0, buf_right - (buf_count - 1 - position)]) | |
endif | |
let buffers = eval('buffers[' . start . ':' . end . ']') | |
if start > 0 | |
call insert(buffers, -1, 0) | |
endif | |
if end < buf_count - 1 | |
call add(buffers, -1) | |
endif | |
endif | |
159 0.000541 let s:current_visible_buffers = buffers | |
159 0.000204 return buffers | |
FUNCTION <SNR>96_PollCompletion() | |
Called 26 times | |
Total time: 0.024660 | |
Self time: 0.001246 | |
count total (s) self (s) | |
26 0.012063 0.000379 if !s:Pyeval( 'ycm_state.CompletionRequestReady()' ) | |
15 0.000359 let s:pollers.completion.id = timer_start( s:pollers.completion.wait_milliseconds, function( 's:PollCompletion' ) ) | |
15 0.000026 return | |
endif | |
11 0.011611 0.000102 let response = s:Pyeval( 'ycm_state.GetCompletionResponse()' ) | |
11 0.000114 let s:completion = { 'start_column': response.completion_start_column, 'candidates': response.completions } | |
11 0.000296 0.000075 call s:Complete() | |
FUNCTION <SNR>70_InitColor() | |
Called 82 times | |
Total time: 0.014009 | |
Self time: 0.014009 | |
count total (s) self (s) | |
82 0.000154 if !g:indentLine_setColors | |
return | |
endif | |
82 0.000280 if !exists("g:indentLine_color_term") | |
if &background ==# "light" | |
let term_color = 249 | |
else | |
let term_color = 239 | |
endif | |
else | |
82 0.000208 let term_color = g:indentLine_color_term | |
82 0.000070 endif | |
82 0.000289 if !exists("g:indentLine_bgcolor_term") | |
82 0.000161 let term_bgcolor = "NONE" | |
82 0.000073 else | |
let term_bgcolor = g:indentLine_bgcolor_term | |
endif | |
82 0.000295 if !exists("g:indentLine_color_gui") | |
if &background ==# "light" | |
let gui_color = "Grey70" | |
else | |
let gui_color = "Grey30" | |
endif | |
else | |
82 0.000185 let gui_color = g:indentLine_color_gui | |
82 0.000062 endif | |
82 0.000252 if !exists("g:indentLine_bgcolor_gui") | |
82 0.000141 let gui_bgcolor = "NONE" | |
82 0.000080 else | |
let gui_bgcolor = g:indentLine_bgcolor_gui | |
endif | |
82 0.003931 execute "highlight Conceal cterm=NONE ctermfg=" . term_color . " ctermbg=" . term_bgcolor | |
82 0.004317 execute "highlight Conceal gui=NONE guifg=" . gui_color . " guibg=" . gui_bgcolor | |
82 0.000244 if &term ==# "linux" | |
if &background ==# "light" | |
let tty_color = exists("g:indentLine_color_tty_light") ? g:indentLine_color_tty_light : 4 | |
else | |
let tty_color = exists("g:indentLine_color_tty_dark") ? g:indentLine_color_tty_dark : 2 | |
endif | |
execute "highlight Conceal cterm=bold ctermfg=" . tty_color . " ctermbg=NONE" | |
endif | |
FUNCTION <SNR>44_BufWinEnterHandler() | |
Called 1 time | |
Total time: 0.000008 | |
Self time: 0.000008 | |
count total (s) self (s) | |
1 0.000001 if s:NewTabCreated | |
" Turn off the 'NewTabCreated' flag | |
let s:NewTabCreated = 0 | |
" Restore focus to NERDTree if necessary | |
if !g:nerdtree_tabs_focus_on_files | |
call s:NERDTreeRestoreFocus() | |
endif | |
endif | |
FUNCTION <SNR>56_is_forbidden() | |
Called 6 times | |
Total time: 0.001137 | |
Self time: 0.000200 | |
count total (s) self (s) | |
6 0.000106 0.000051 if s:is_excluded_ft(&filetype) | |
return 1 | |
endif | |
6 0.000196 0.000030 if !s:get('excluded_regions_enabled') | |
return 0 | |
endif | |
6 0.000604 0.000034 let region = s:get_syn_name() | |
6 0.000192 0.000046 return index(s:get('excluded_regions_list'), region) >= 0 | |
FUNCTION delimitMate#IsEmptyPair() | |
Called 5 times | |
Total time: 0.000061 | |
Self time: 0.000061 | |
count total (s) self (s) | |
5 0.000051 if strlen(substitute(a:str, ".", "x", "g")) != 2 | |
5 0.000005 return 0 | |
endif | |
let idx = index(s:get('left_delims'), matchstr(a:str, '^.')) | |
if idx > -1 && s:get('right_delims')[idx] == matchstr(a:str, '.$') | |
return 1 | |
endif | |
let idx = index(s:get('quotes_list'), matchstr(a:str, '^.')) | |
if idx > -1 && s:get('quotes_list')[idx] == matchstr(a:str, '.$') | |
return 1 | |
endif | |
return 0 | |
FUNCTION <SNR>80_map_keys() | |
Called 225 times | |
Total time: 0.003726 | |
Self time: 0.003726 | |
count total (s) self (s) | |
225 0.000438 if s:buffer_idx_mode | |
noremap <silent> <Plug>AirlineSelectTab1 :call <SID>select_tab(0)<CR> | |
noremap <silent> <Plug>AirlineSelectTab2 :call <SID>select_tab(1)<CR> | |
noremap <silent> <Plug>AirlineSelectTab3 :call <SID>select_tab(2)<CR> | |
noremap <silent> <Plug>AirlineSelectTab4 :call <SID>select_tab(3)<CR> | |
noremap <silent> <Plug>AirlineSelectTab5 :call <SID>select_tab(4)<CR> | |
noremap <silent> <Plug>AirlineSelectTab6 :call <SID>select_tab(5)<CR> | |
noremap <silent> <Plug>AirlineSelectTab7 :call <SID>select_tab(6)<CR> | |
noremap <silent> <Plug>AirlineSelectTab8 :call <SID>select_tab(7)<CR> | |
noremap <silent> <Plug>AirlineSelectTab9 :call <SID>select_tab(8)<CR> | |
noremap <silent> <Plug>AirlineSelectPrevTab :<C-u>call <SID>jump_to_tab(-v:count1)<CR> | |
noremap <silent> <Plug>AirlineSelectNextTab :<C-u>call <SID>jump_to_tab(v:count1)<CR> | |
endif | |
FUNCTION <SNR>44_CloseIfOnlyNerdTreeLeft() | |
Called 162 times | |
Total time: 0.001457 | |
Self time: 0.001457 | |
count total (s) self (s) | |
162 0.001012 if exists("t:NERDTreeBufName") && bufwinnr(t:NERDTreeBufName) != -1 && winnr("$") == 1 | |
q | |
endif | |
FUNCTION nerdtree#checkForBrowse() | |
Called 162 times | |
Total time: 0.003190 | |
Self time: 0.003190 | |
count total (s) self (s) | |
162 0.002797 if !isdirectory(a:dir) | |
162 0.000185 return | |
endif | |
if s:reuseWin(a:dir) | |
return | |
endif | |
call g:NERDTreeCreator.CreateWindowTree(a:dir) | |
FUNCTION <SNR>96_InsideCommentOrString() | |
Called 18 times | |
Total time: 0.002237 | |
Self time: 0.002237 | |
count total (s) self (s) | |
" Has to be col('.') -1 because col('.') doesn't exist at this point. We are | |
" in insert mode when this func is called. | |
18 0.001917 let syntax_group = synIDattr( synIDtrans( synID( line( '.' ), col( '.' ) - 1, 1 ) ), 'name') | |
18 0.000086 if stridx(syntax_group, 'Comment') > -1 | |
return 1 | |
endif | |
18 0.000052 if stridx(syntax_group, 'String') > -1 | |
return 2 | |
endif | |
18 0.000023 return 0 | |
FUNCTION airline#extensions#tabline#get_buffer_name() | |
Called 384 times | |
Total time: 0.072645 | |
Self time: 0.006301 | |
count total (s) self (s) | |
384 0.005055 0.002316 let buffers = a:0 ? a:1 : airline#extensions#tabline#buflist#list() | |
384 0.067201 0.003596 return airline#extensions#tabline#formatters#{s:formatter}#format(a:nr, buffers) | |
FUNCTION <SNR>96_ClosePreviewWindowIfNeeded() | |
Called 2 times | |
Total time: 0.005401 | |
Self time: 0.005401 | |
count total (s) self (s) | |
2 0.000016 let current_buffer_name = bufname('') | |
" We don't want to try to close the preview window in special buffers like | |
" "[Command Line]"; if we do, Vim goes bonkers. Special buffers always start | |
" with '['. | |
2 0.000013 if current_buffer_name[ 0 ] == '[' | |
return | |
endif | |
" This command does the actual closing of the preview window. If no preview | |
" window is shown, nothing happens. | |
2 0.005353 pclose | |
FUNCTION airline#extensions#tabline#new_builder() | |
Called 159 times | |
Total time: 0.011296 | |
Self time: 0.006928 | |
count total (s) self (s) | |
159 0.002255 let builder_context = { 'active' : 1, 'tabline' : 1, 'right_sep' : get(g:, 'airline#extensions#tabline#right_sep' , g:airline_right_sep), 'right_alt_sep' : get(g:, 'airline#extensions#tabline#right_alt_sep', g:airline_right_alt_sep), } | |
159 0.000532 if get(g:, 'airline_powerline_fonts', 0) | |
let builder_context.left_sep = get(g:, 'airline#extensions#tabline#left_sep' , g:airline_left_sep) | |
let builder_context.left_alt_sep = get(g:, 'airline#extensions#tabline#left_alt_sep' , g:airline_left_alt_sep) | |
else | |
159 0.000849 let builder_context.left_sep = get(g:, 'airline#extensions#tabline#left_sep' , ' ') | |
159 0.000755 let builder_context.left_alt_sep = get(g:, 'airline#extensions#tabline#left_alt_sep' , '|') | |
159 0.000131 endif | |
159 0.005230 0.000862 return airline#builder#new(builder_context) | |
FUNCTION <SNR>96_AllowedToCompleteInBuffer() | |
Called 144 times | |
Total time: 0.004653 | |
Self time: 0.004247 | |
count total (s) self (s) | |
144 0.000920 let buffer_filetype = getbufvar( a:buffer, '&filetype' ) | |
144 0.000863 if empty( buffer_filetype ) || getbufvar( a:buffer, '&buftype' ) ==# 'nofile' || buffer_filetype ==# 'qf' | |
81 0.000102 return 0 | |
endif | |
63 0.000742 0.000336 if s:DisableOnLargeFile( a:buffer ) | |
return 0 | |
endif | |
63 0.000414 let whitelist_allows = has_key( g:ycm_filetype_whitelist, '*' ) || has_key( g:ycm_filetype_whitelist, buffer_filetype ) | |
63 0.000266 let blacklist_allows = !has_key( g:ycm_filetype_blacklist, buffer_filetype ) | |
63 0.000160 let allowed = whitelist_allows && blacklist_allows | |
63 0.000067 if allowed | |
63 0.000263 let s:previous_allowed_buffer_number = bufnr( a:buffer ) | |
63 0.000051 endif | |
63 0.000073 return allowed | |
FUNCTION airline#extensions#default#apply() | |
Called 2 times | |
Total time: 0.001029 | |
Self time: 0.000094 | |
count total (s) self (s) | |
2 0.000003 let winnr = a:context.winnr | |
2 0.000004 let active = a:context.active | |
2 0.000017 0.000009 if airline#util#getwinvar(winnr, 'airline_render_left', active || (!active && !g:airline_inactive_collapse)) | |
1 0.000216 0.000005 call s:build_sections(a:builder, a:context, s:layout[0]) | |
1 0.000001 else | |
1 0.000045 0.000008 let text = s:get_section(winnr, 'c') | |
1 0.000002 if empty(text) | |
let text = ' %f%m ' | |
endif | |
1 0.000010 0.000006 call a:builder.add_section('airline_c'.(a:context.bufnr), text) | |
1 0.000001 endif | |
2 0.000087 0.000014 call a:builder.split(s:get_section(winnr, 'gutter', '', '')) | |
2 0.000013 0.000007 if airline#util#getwinvar(winnr, 'airline_render_right', 1) | |
2 0.000609 0.000013 call s:build_sections(a:builder, a:context, s:layout[1]) | |
2 0.000002 endif | |
2 0.000002 return 1 | |
FUNCTION <SNR>96_Pyeval() | |
Called 82 times | |
Total time: 0.036458 | |
Self time: 0.036458 | |
count total (s) self (s) | |
82 0.000175 if s:using_python3 | |
return py3eval( a:eval_string ) | |
endif | |
82 0.035816 return pyeval( a:eval_string ) | |
FUNCTION airline#highlighter#add_separator() | |
Called 486 times | |
Total time: 0.308377 | |
Self time: 0.009657 | |
count total (s) self (s) | |
486 0.003791 let s:separators[a:from.a:to] = [a:from, a:to, a:inverse] | |
486 0.304231 0.005511 call <sid>exec_separator({}, a:from, a:to, a:inverse, '') | |
FUNCTION <SNR>72_is_excluded_window() | |
Called 2 times | |
Total time: 0.000084 | |
Self time: 0.000084 | |
count total (s) self (s) | |
2 0.000004 for matchft in g:airline_exclude_filetypes | |
if matchft ==# &ft | |
return 1 | |
endif | |
endfor | |
8 0.000009 for matchw in g:airline_exclude_filenames | |
6 0.000034 if matchstr(expand('%'), matchw) ==# matchw | |
return 1 | |
endif | |
6 0.000003 endfor | |
2 0.000003 if g:airline_exclude_preview && &previewwindow | |
return 1 | |
endif | |
2 0.000002 return 0 | |
FUNCTION airline#util#wrap() | |
Called 1729 times | |
Total time: 0.010419 | |
Self time: 0.010419 | |
count total (s) self (s) | |
1729 0.004614 if a:minwidth > 0 && winwidth(0) < a:minwidth | |
return '' | |
endif | |
1729 0.001976 return a:text | |
FUNCTION airline#extensions#tabline#get() | |
Called 225 times | |
Total time: 0.698190 | |
Self time: 0.011188 | |
count total (s) self (s) | |
225 0.001231 let curtabcnt = tabpagenr('$') | |
225 0.000534 if curtabcnt != s:current_tabcnt | |
let s:current_tabcnt = curtabcnt | |
call airline#extensions#tabline#tabs#invalidate() | |
call airline#extensions#tabline#buffers#invalidate() | |
call airline#extensions#tabline#ctrlspace#invalidate() | |
endif | |
225 0.001223 if !exists('#airline#BufAdd#*') | |
autocmd airline BufAdd * call <sid>update_tabline() | |
endif | |
225 0.000304 if s:ctrlspace | |
return airline#extensions#tabline#ctrlspace#get() | |
elseif s:show_buffers && curtabcnt == 1 || !s:show_tabs | |
225 0.690590 0.003588 return airline#extensions#tabline#buffers#get() | |
else | |
return airline#extensions#tabline#tabs#get() | |
endif | |
FUNCTION <SNR>55_setup() | |
Called 1 time | |
Total time: 0.002735 | |
Self time: 0.000055 | |
count total (s) self (s) | |
1 0.000002 let swap = a:0 && a:1 == 2 | |
1 0.000002 let enable = a:0 && a:1 | |
1 0.000001 let disable = a:0 && !a:1 | |
" First, remove all magic, if needed: | |
1 0.000003 if get(b:, 'delimitMate_enabled', 0) | |
call s:Unmap() | |
" Switch | |
if swap | |
echo "delimitMate is disabled." | |
return | |
endif | |
endif | |
1 0.000001 if disable | |
" Just disable the mappings. | |
return | |
endif | |
1 0.000001 if !a:0 | |
" Check if this file type is excluded: | |
1 0.000004 if exists("g:delimitMate_excluded_ft") && index(split(g:delimitMate_excluded_ft, ','), &filetype, 0, 1) >= 0 | |
" Finish here: | |
return 1 | |
endif | |
" Check if user tried to disable using b:loaded_delimitMate | |
1 0.000002 if exists("b:loaded_delimitMate") | |
return 1 | |
endif | |
1 0.000001 endif | |
" Initialize settings: | |
1 0.001547 0.000009 if ! s:init() | |
" Something went wrong. | |
return | |
endif | |
1 0.000004 if enable || swap || !get(g:, 'delimitMate_offByDefault', 0) | |
" Now, add magic: | |
1 0.001149 0.000007 call s:Map() | |
1 0.000002 if a:0 | |
echo "delimitMate is enabled." | |
endif | |
1 0.000001 endif | |
FUNCTION <SNR>55_set() | |
Called 23 times | |
Total time: 0.000681 | |
Self time: 0.000093 | |
count total (s) self (s) | |
23 0.000677 0.000089 return call('delimitMate#Set', a:000) | |
FUNCTION <SNR>56_is_cr_expansion() | |
Called 6 times | |
Total time: 0.000522 | |
Self time: 0.000286 | |
count total (s) self (s) | |
6 0.000034 let nchar = getline(line('.')-1)[-1:] | |
6 0.000064 let schar = matchstr(getline(line('.')+1), '^\s*\zs\S') | |
6 0.000032 let isEmpty = a:0 ? getline('.') =~ '^\s*$' : empty(getline('.')) | |
6 0.000188 0.000069 if index(s:get('left_delims'), nchar) > -1 && index(s:get('left_delims'), nchar) == index(s:get('right_delims'), schar) && isEmpty | |
return 1 | |
elseif index(s:get('quotes_list'), nchar) > -1 && index(s:get('quotes_list'), nchar) == index(s:get('quotes_list'), schar) && isEmpty | |
return 1 | |
else | |
6 0.000005 return 0 | |
endif | |
FUNCTION airline#util#getwinvar() | |
Called 21 times | |
Total time: 0.000065 | |
Self time: 0.000065 | |
count total (s) self (s) | |
21 0.000061 return getwinvar(a:winnr, a:key, a:def) | |
FUNCTION <SNR>89_add_section() | |
Called 11 times | |
Total time: 0.000666 | |
Self time: 0.000248 | |
count total (s) self (s) | |
11 0.000041 let condition = (a:key is# "warning" || a:key is# "error") && (v:version == 704 && !has("patch1511")) | |
" i have no idea why the warning section needs special treatment, but it's | |
" needed to prevent separators from showing up | |
11 0.000108 0.000048 if ((a:key == 'error' || a:key == 'warning') && empty(s:get_section(a:context.winnr, a:key))) | |
1 0.000001 return | |
endif | |
10 0.000004 if condition | |
call a:builder.add_raw('%(') | |
endif | |
10 0.000428 0.000070 call a:builder.add_section('airline_'.a:key, s:get_section(a:context.winnr, a:key)) | |
10 0.000009 if condition | |
call a:builder.add_raw('%)') | |
endif | |
FUNCTION <SNR>84_get_array() | |
Called 2363 times | |
Total time: 0.023341 | |
Self time: 0.023341 | |
count total (s) self (s) | |
2363 0.009538 let opts=empty(a:opts) ? '' : join(a:opts, ',') | |
2363 0.012214 return g:airline_gui_mode ==# 'gui' ? [ a:fg, a:bg, '', '', opts ] : [ '', '', a:fg, a:bg, opts ] | |
FUNCTION <SNR>96_OnFileReadyToParse() | |
Called 5 times | |
Total time: 0.008714 | |
Self time: 0.008234 | |
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. | |
5 0.000015 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. | |
5 0.000517 0.000037 if force_parsing || s:Pyeval( "ycm_state.NeedsReparse()" ) | |
4 0.007982 exec s:python_command "ycm_state.OnFileReadyToParse()" | |
4 0.000043 call timer_stop( s:pollers.file_parse_response.id ) | |
4 0.000075 let s:pollers.file_parse_response.id = timer_start( s:pollers.file_parse_response.wait_milliseconds, function( 's:PollFileParseResponse' ) ) | |
4 0.000008 endif | |
FUNCTION color_coded#clear_matches() | |
Called 374 times | |
Total time: 0.064639 | |
Self time: 0.064639 | |
count total (s) self (s) | |
374 0.000524 try | |
374 0.001733 if has_key(g:color_coded_matches, a:file) == 1 | |
12990 0.013585 for id in g:color_coded_matches[a:file] | |
12618 0.028009 call matchdelete(id) | |
12618 0.009707 endfor | |
372 0.000336 endif | |
374 0.000395 catch | |
echomsg "color_coded caught: " . v:exception | |
finally | |
374 0.003783 let g:color_coded_matches[a:file] = [] | |
374 0.000451 endtry | |
FUNCTION <SNR>84_CheckDefined() | |
Called 653 times | |
Total time: 0.018096 | |
Self time: 0.018096 | |
count total (s) self (s) | |
" Checks, whether the definition of the colors is valid and is not empty or NONE | |
" e.g. if the colors would expand to this: | |
" hi airline_c ctermfg=NONE ctermbg=NONE | |
" that means to clear that highlighting group, therefore, fallback to Normal | |
" highlighting group for the cterm values | |
" This only works, if the Normal highlighting group is actually defined, so | |
" return early, if it has been cleared | |
653 0.002592 if !exists("g:airline#highlighter#normal_fg_hi") | |
let g:airline#highlighter#normal_fg_hi = synIDattr(synIDtrans(hlID('Normal')), 'fg', 'cterm') | |
endif | |
653 0.002459 if empty(g:airline#highlighter#normal_fg_hi) || g:airline#highlighter#normal_fg_hi < 0 | |
return a:colors | |
endif | |
653 0.001607 for val in a:colors | |
653 0.002011 if !empty(val) && val !=# 'NONE' | |
653 0.000906 return a:colors | |
endif | |
endfor | |
" this adds the bold attribute to the term argument of the :hi command, | |
" but at least this makes sure, the group will be defined | |
let fg = g:airline#highlighter#normal_fg_hi | |
let bg = synIDattr(synIDtrans(hlID('Normal')), 'bg', 'cterm') | |
if bg < 0 | |
" in case there is no background color defined for Normal | |
let bg = a:colors[3] | |
endif | |
return a:colors[0:1] + [fg, bg] + [a:colors[4]] | |
FUNCTION <SNR>96_OnCompleteDone() | |
Called 23 times | |
Total time: 0.004135 | |
Self time: 0.004135 | |
count total (s) self (s) | |
23 0.004101 exec s:python_command "ycm_state.OnCompleteDone()" | |
FUNCTION color_coded#enter() | |
Called 324 times | |
Total time: 0.751851 | |
Self time: 0.181465 | |
count total (s) self (s) | |
324 0.002728 if index(g:color_coded_filetypes, &ft) < 0 || g:color_coded_enabled == 0 | |
161 0.000179 return | |
endif | |
" Each new window controls highlighting separate from the buffer | |
163 0.007680 0.001662 if !exists("w:color_coded_own_syntax") || w:color_coded_name != color_coded#get_buffer_name() | |
" Preserve spell after ownsyntax clears it | |
1 0.000004 let s:keepspell = &spell | |
1 0.000007 if has('b:current_syntax') | |
execute 'ownsyntax ' . b:current_syntax | |
else | |
1 0.005347 0.000017 execute 'ownsyntax ' . &ft | |
1 0.000001 endif | |
1 0.000010 let &spell = s:keepspell | |
1 0.000003 unlet s:keepspell | |
1 0.000003 let w:color_coded_own_syntax = 1 | |
" Each window has a unique ID | |
1 0.000004 let w:color_coded_unique_counter = s:color_coded_unique_counter | |
1 0.000003 let s:color_coded_unique_counter += 1 | |
" Windows can be reused; clear it out if needed | |
1 0.000005 if exists("w:color_coded_name") | |
call color_coded#clear_matches(w:color_coded_name) | |
endif | |
1 0.000078 0.000008 let w:color_coded_name = color_coded#get_buffer_name() | |
1 0.000038 0.000007 call color_coded#clear_matches(w:color_coded_name) | |
1 0.000001 endif | |
163 0.000133 lua << EOF | |
local name, data = color_coded_buffer_details() | |
color_coded_enter(name, vim.eval('&ft'), data) | |
EOF | |
FUNCTION <SNR>70_LeadingSpaceDisable() | |
Called 1 time | |
Total time: 0.000014 | |
Self time: 0.000014 | |
count total (s) self (s) | |
1 0.000001 if g:indentLine_newVersion | |
1 0.000003 if exists("w:indentLine_leadingSpaceId") && ! empty(w:indentLine_leadingSpaceId) | |
for id in w:indentLine_leadingSpaceId | |
try | |
call matchdelete(id) | |
catch /^Vim\%((\a\+)\)\=:E80[23]/ | |
endtry | |
endfor | |
let w:indentLine_leadingSpaceId = [] | |
endif | |
1 0.000001 return | |
endif | |
let b:indentLine_leadingSpaceEnabled = 0 | |
try | |
syntax clear IndentLineLeadingSpace | |
catch /^Vim\%((\a\+)\)\=:E28/ " catch error E28 | |
endtry | |
FUNCTION airline#extensions#tabline#formatters#default#wrap_name() | |
Called 384 times | |
Total time: 0.009531 | |
Self time: 0.009531 | |
count total (s) self (s) | |
384 0.001510 let _ = s:buf_nr_show ? printf(s:buf_nr_format, a:bufnr) : '' | |
384 0.003006 let _ .= substitute(a:buffer_name, '\\', '/', 'g') | |
384 0.002151 if getbufvar(a:bufnr, '&modified') == 1 | |
350 0.001033 let _ .= s:buf_modified_symbol | |
350 0.000285 endif | |
384 0.000476 return _ | |
FUNCTION <SNR>56_get_char() | |
Called 30 times | |
Total time: 0.000743 | |
Self time: 0.000743 | |
count total (s) self (s) | |
30 0.000089 let idx = col('.') - 1 | |
30 0.000054 if !a:0 || (a:0 && a:1 >= 0) | |
" Get char from cursor. | |
15 0.000046 let line = getline('.')[idx :] | |
15 0.000026 let pos = a:0 ? a:1 : 0 | |
15 0.000111 return matchstr(line, '^'.repeat('.', pos).'\zs.') | |
endif | |
" Get char behind cursor. | |
15 0.000064 let line = getline('.')[: idx - 1] | |
15 0.000032 let pos = 0 - (1 + a:1) | |
15 0.000150 return matchstr(line, '.\ze'.repeat('.', pos).'$') | |
FUNCTION <SNR>88_section_is_empty() | |
Called 808 times | |
Total time: 0.008531 | |
Self time: 0.008531 | |
count total (s) self (s) | |
808 0.001303 let start=1 | |
" do not check for inactive windows or the tabline | |
808 0.001468 if a:self._context.active == 0 | |
5 0.000005 return 0 | |
elseif get(a:self._context, 'tabline', 0) | |
795 0.000843 return 0 | |
endif | |
" only check, if airline#skip_empty_sections == 1 | |
8 0.000018 if get(g:, 'airline_skip_empty_sections', 0) == 0 | |
8 0.000006 return 0 | |
endif | |
" only check, if airline#skip_empty_sections == 1 | |
if get(w:, 'airline_skip_empty_sections', -1) == 0 | |
return 0 | |
endif | |
" assume accents sections to be never empty | |
" (avoides, that on startup the mode message becomes empty) | |
if match(a:content, '%#__accent_[^#]*#.*__restore__#') > -1 | |
return 0 | |
endif | |
if empty(a:content) | |
return 1 | |
endif | |
let list=matchlist(a:content, '%{\zs.\{-}\ze}', 1, start) | |
if empty(list) | |
return 0 " no function in statusline text | |
endif | |
while len(list) > 0 | |
let expr = list[0] | |
try | |
" catch all exceptions, just in case | |
if !empty(eval(expr)) | |
return 0 | |
endif | |
catch | |
return 0 | |
endtry | |
let start += 1 | |
let list=matchlist(a:content, '%{\zs.\{-}\ze}', 1, start) | |
endw | |
return 1 | |
FUNCTION <SNR>96_OnTextChangedInsertMode() | |
Called 18 times | |
Total time: 0.062321 | |
Self time: 0.005899 | |
count total (s) self (s) | |
18 0.001290 0.000106 if !s:AllowedToCompleteInCurrentBuffer() | |
return | |
endif | |
18 0.000028 if s:completion_stopped | |
let s:completion_stopped = 0 | |
let s:completion = s:default_completion | |
return | |
endif | |
18 0.013935 0.000135 call s:IdentifierFinishedOperations() | |
" We have to make sure we correctly leave semantic mode even when the user | |
" inserts something like a "operator[]" candidate string which fails | |
" CurrentIdentifierFinished check. | |
18 0.000109 if s:force_semantic && !s:Pyeval( 'base.LastEnteredCharIsIdentifierChar()' ) | |
let s:force_semantic = 0 | |
endif | |
18 0.010236 0.000394 if &completefunc == "youcompleteme#CompleteFunc" && ( g:ycm_auto_trigger || s:force_semantic ) && !s:InsideCommentOrStringAndShouldStop() && !s:OnBlankLine() | |
" Immediately call previous completion to avoid flickers. | |
12 0.000379 0.000096 call s:Complete() | |
12 0.031402 0.000089 call s:InvokeCompletion() | |
12 0.000020 endif | |
18 0.004233 exec s:python_command "ycm_state.OnCursorMoved()" | |
18 0.000095 if g:ycm_autoclose_preview_window_after_completion | |
call s:ClosePreviewWindowIfNeeded() | |
endif | |
FUNCTION <SNR>88_get_prev_group() | |
Called 808 times | |
Total time: 0.012398 | |
Self time: 0.012398 | |
count total (s) self (s) | |
808 0.001737 let x = a:i - 1 | |
969 0.001404 while x >= 0 | |
808 0.002507 let group = a:sections[x][0] | |
808 0.002075 if group != '' && group != '|' | |
647 0.000868 return group | |
endif | |
161 0.000253 let x = x - 1 | |
161 0.000146 endwhile | |
161 0.000170 return '' | |
FUNCTION <SNR>88_get_accented_line() | |
Called 647 times | |
Total time: 0.033021 | |
Self time: 0.033021 | |
count total (s) self (s) | |
647 0.001130 if a:self._context.active | |
643 0.001062 let contents = [] | |
643 0.005799 let content_parts = split(a:contents, '__accent') | |
968 0.001940 for cpart in content_parts | |
325 0.003573 let accent = matchstr(cpart, '_\zs[^#]*\ze') | |
325 0.001131 call add(contents, cpart) | |
325 0.000338 endfor | |
643 0.002457 let line = join(contents, a:group) | |
643 0.005023 let line = substitute(line, '__restore__', a:group, 'g') | |
643 0.000627 else | |
4 0.000047 let line = substitute(a:contents, '%#__accent[^#]*#', '', 'g') | |
4 0.000027 let line = substitute(line, '%#__restore__#', '', 'g') | |
4 0.000003 endif | |
647 0.000817 return line | |
FUNCTION airline#extensions#tabline#group_of_bufnr() | |
Called 159 times | |
Total time: 0.004493 | |
Self time: 0.004493 | |
count total (s) self (s) | |
159 0.000535 let cur = bufnr('%') | |
159 0.000261 if cur == a:bufnr | |
80 0.000347 if g:airline_detect_modified && getbufvar(a:bufnr, '&modified') | |
80 0.000150 let group = 'airline_tabmod' | |
80 0.000071 else | |
let group = 'airline_tabsel' | |
endif | |
80 0.000060 else | |
79 0.000346 if g:airline_detect_modified && getbufvar(a:bufnr, '&modified') | |
79 0.000156 let group = 'airline_tabmod_unsel' | |
79 0.000184 elseif index(a:tab_bufs, a:bufnr) > -1 | |
let group = 'airline_tab' | |
else | |
let group = 'airline_tabhid' | |
endif | |
79 0.000059 endif | |
159 0.000205 return group | |
FUNCTION <SNR>96_InvokeCompletion() | |
Called 12 times | |
Total time: 0.031313 | |
Self time: 0.020784 | |
count total (s) self (s) | |
12 0.020491 exec s:python_command "ycm_state.SendCompletionRequest(" . "vimsupport.GetBoolValue( 's:force_semantic' ) )" | |
12 0.010782 0.000253 call s:PollCompletion() | |
FUNCTION delimitMate#WithinEmptyPair() | |
Called 6 times | |
Total time: 0.000472 | |
Self time: 0.000133 | |
count total (s) self (s) | |
" if cursor is at column 1 return 0 | |
6 0.000015 if col('.') == 1 | |
1 0.000001 return 0 | |
endif | |
" get char before the cursor. | |
5 0.000213 0.000037 let char1 = s:get_char(-1) | |
" get char under the cursor. | |
5 0.000128 0.000026 let char2 = s:get_char(0) | |
5 0.000090 0.000029 return delimitMate#IsEmptyPair( char1.char2 ) | |
FUNCTION airline#highlighter#highlight() | |
Called 3 times | |
Total time: 0.067029 | |
Self time: 0.006579 | |
count total (s) self (s) | |
3 0.000006 let bufnr = a:0 ? a:1 : '' | |
3 0.000009 let p = g:airline#themes#{g:airline_theme}#palette | |
" draw the base mode, followed by any overrides | |
3 0.000050 let mapped = map(a:modes, 'v:val == a:modes[0] ? v:val : a:modes[0]."_".v:val') | |
3 0.000007 let suffix = a:modes[0] == 'inactive' ? '_inactive' : '' | |
9 0.000014 for mode in mapped | |
6 0.000017 if mode == 'inactive' && winnr('$') == 1 | |
" there exist no inactive windows, don't need to create all those | |
" highlighting groups | |
continue | |
endif | |
6 0.000034 if exists('g:airline#themes#{g:airline_theme}#palette[mode]') | |
5 0.000015 let dict = g:airline#themes#{g:airline_theme}#palette[mode] | |
45 0.000147 for kvp in items(dict) | |
40 0.000100 let mode_colors = kvp[1] | |
40 0.000075 let name = kvp[0] | |
40 0.000125 if name is# 'airline_c' && !empty(bufnr) && suffix is# '_inactive' | |
2 0.000005 let name = 'airline_c'.bufnr | |
2 0.000002 endif | |
40 0.010329 0.000303 call airline#highlighter#exec(name.suffix, mode_colors) | |
120 0.000264 for accent in keys(s:accents) | |
80 0.000236 if !has_key(p.accents, accent) | |
continue | |
endif | |
80 0.000323 let colors = copy(mode_colors) | |
80 0.000247 if p.accents[accent][0] != '' | |
40 0.000113 let colors[0] = p.accents[accent][0] | |
40 0.000029 endif | |
80 0.000189 if p.accents[accent][2] != '' | |
let colors[2] = p.accents[accent][2] | |
endif | |
80 0.000157 if len(colors) >= 5 | |
80 0.000290 let colors[4] = get(p.accents[accent], 4, '') | |
80 0.000066 else | |
call add(colors, get(p.accents[accent], 4, '')) | |
endif | |
80 0.023886 0.000731 call airline#highlighter#exec(name.suffix.'_'.accent, colors) | |
80 0.000080 endfor | |
40 0.000028 endfor | |
" TODO: optimize this | |
58 0.000149 for sep in items(s:separators) | |
53 0.027768 0.000499 call <sid>exec_separator(dict, sep[1][0], sep[1][1], sep[1][2], suffix) | |
53 0.000048 endfor | |
5 0.000007 endif | |
6 0.000004 endfor | |
FUNCTION airline#parts#ffenc() | |
Called 477 times | |
Total time: 0.014379 | |
Self time: 0.014379 | |
count total (s) self (s) | |
477 0.002236 let expected = get(g:, 'airline#parts#ffenc#skip_expected_string', '') | |
477 0.001279 let bomb = &l:bomb ? '[BOM]' : '' | |
477 0.004989 let ff = strlen(&ff) ? '['.&ff.']' : '' | |
477 0.002518 if expected is# &fenc.bomb.ff | |
return '' | |
else | |
477 0.001829 return &fenc.bomb.ff | |
endif | |
FUNCTION <SNR>96_IdentifierFinishedOperations() | |
Called 18 times | |
Total time: 0.013800 | |
Self time: 0.008553 | |
count total (s) self (s) | |
18 0.005374 0.000127 if !s:Pyeval( 'base.CurrentIdentifierFinished()' ) | |
11 0.000026 return | |
endif | |
7 0.008238 exec s:python_command "ycm_state.OnCurrentIdentifierFinished()" | |
7 0.000075 let s:force_semantic = 0 | |
7 0.000033 let s:completion = s:default_completion | |
FUNCTION <SNR>55_get() | |
Called 32 times | |
Total time: 0.000720 | |
Self time: 0.000114 | |
count total (s) self (s) | |
32 0.000715 0.000109 return call('delimitMate#Get', a:000) | |
FUNCTION <SNR>20_on_window_changed() | |
Called 163 times | |
Total time: 0.010090 | |
Self time: 0.004889 | |
count total (s) self (s) | |
163 0.000869 if pumvisible() && (!&previewwindow || g:airline_exclude_preview) | |
82 0.000084 return | |
endif | |
" Handle each window only once, since we might come here several times for | |
" different autocommands. | |
81 0.001295 let l:key = [bufnr('%'), winnr(), winnr('$'), tabpagenr(), &ft] | |
81 0.001879 if get(g:, 'airline_last_window_changed', []) == l:key && &stl is# '%!airline#statusline('.winnr().')' && &ft !~? 'gitcommit' | |
" fugitive is special, it changes names and filetypes several times, | |
" make sure the caching does not get into its way | |
80 0.000109 return | |
endif | |
1 0.000003 let g:airline_last_window_changed = l:key | |
1 0.000008 0.000005 call s:init() | |
1 0.005205 0.000007 call airline#update_statusline() | |
FUNCTION <SNR>84_hl_group_exists() | |
Called 566 times | |
Total time: 0.007489 | |
Self time: 0.007489 | |
count total (s) self (s) | |
566 0.001918 if !hlexists(a:group) | |
return 0 | |
elseif empty(synIDattr(hlID(a:group), 'fg')) | |
return 0 | |
endif | |
566 0.000503 return 1 | |
FUNCTION <SNR>96_OnTextChangedNormalMode() | |
Called 3 times | |
Total time: 0.003586 | |
Self time: 0.000052 | |
count total (s) self (s) | |
3 0.000212 0.000018 if !s:AllowedToCompleteInCurrentBuffer() | |
return | |
endif | |
3 0.003364 0.000024 call s:OnFileReadyToParse() | |
FUNCTION delimitMate#Get() | |
Called 32 times | |
Total time: 0.000606 | |
Self time: 0.000115 | |
count total (s) self (s) | |
32 0.000598 0.000107 return call('s:get', a:000) | |
FUNCTION <SNR>77_update_tabline() | |
Called 1 time | |
Total time: 0.000011 | |
Self time: 0.000011 | |
count total (s) self (s) | |
1 0.000003 if get(g:, 'airline#extensions#tabline#disable_refresh', 0) | |
return | |
endif | |
1 0.000002 let match = expand('<afile>') | |
1 0.000002 if pumvisible() | |
1 0.000001 return | |
elseif !get(g:, 'airline#extensions#tabline#enabled', 0) | |
return | |
" return, if buffer matches ignore pattern or is directory (netrw) | |
elseif empty(match) || match(match, s:ignore_bufadd_pat) > -1 || isdirectory(expand("<afile>")) | |
return | |
endif | |
doautocmd User BufMRUChange | |
FUNCTION <SNR>88_should_change_group() | |
Called 325 times | |
Total time: 0.104503 | |
Self time: 0.007628 | |
count total (s) self (s) | |
325 0.000822 if a:group1 == a:group2 | |
return 0 | |
endif | |
325 0.052918 0.001881 let color1 = airline#highlighter#get_highlight(a:group1) | |
325 0.047491 0.001653 let color2 = airline#highlighter#get_highlight(a:group2) | |
325 0.000590 if g:airline_gui_mode ==# 'gui' | |
325 0.001569 return color1[1] != color2[1] || color1[0] != color2[0] | |
else | |
return color1[3] != color2[3] || color1[2] != color2[2] | |
endif | |
FUNCTION airline#parts#paste() | |
Called 149 times | |
Total time: 0.000433 | |
Self time: 0.000433 | |
count total (s) self (s) | |
149 0.000370 return g:airline_detect_paste && &paste ? g:airline_symbols.paste : '' | |
FUNCTION airline#update_statusline() | |
Called 1 time | |
Total time: 0.005198 | |
Self time: 0.000096 | |
count total (s) self (s) | |
1 0.000011 0.000008 if airline#util#getwinvar(winnr(), 'airline_disabled', 0) | |
return | |
endif | |
2 0.000009 for nr in filter(range(1, winnr('$')), 'v:val != winnr()') | |
1 0.000007 0.000004 if airline#util#getwinvar(nr, 'airline_disabled', 0) | |
continue | |
endif | |
1 0.000004 call setwinvar(nr, 'airline_active', 0) | |
1 0.000004 let context = { 'winnr': nr, 'active': 0, 'bufnr': winbufnr(nr) } | |
1 0.001857 0.000013 call s:invoke_funcrefs(context, s:inactive_funcrefs) | |
1 0.000000 endfor | |
1 0.000002 unlet! w:airline_render_left w:airline_render_right | |
1 0.000012 exe 'unlet! ' 'w:airline_section_'. join(s:sections, ' w:airline_section_') | |
1 0.000002 let w:airline_active = 1 | |
1 0.000006 let context = { 'winnr': winnr(), 'active': 1, 'bufnr': winbufnr(winnr()) } | |
1 0.003265 0.000013 call s:invoke_funcrefs(context, g:airline_statusline_funcrefs) | |
FUNCTION <SNR>70_IndentLinesDisable() | |
Called 1 time | |
Total time: 0.000122 | |
Self time: 0.000122 | |
count total (s) self (s) | |
1 0.000002 if g:indentLine_newVersion | |
1 0.000005 if exists("w:indentLine_indentLineId") && ! empty(w:indentLine_indentLineId) | |
21 0.000017 for id in w:indentLine_indentLineId | |
20 0.000009 try | |
20 0.000036 call matchdelete(id) | |
20 0.000015 catch /^Vim\%((\a\+)\)\=:E80[23]/ | |
endtry | |
20 0.000007 endfor | |
1 0.000004 let w:indentLine_indentLineId = [] | |
1 0.000001 endif | |
1 0.000001 return | |
endif | |
let b:indentLine_enabled = 0 | |
try | |
syntax clear IndentLine | |
syntax clear IndentLineSpace | |
catch /^Vim\%((\a\+)\)\=:E28/ " catch error E28 | |
endtry | |
FUNCTION <SNR>84_get_syn() | |
Called 4726 times | |
Total time: 0.180472 | |
Self time: 0.180472 | |
count total (s) self (s) | |
4726 0.022015 if !exists("g:airline_gui_mode") | |
let g:airline_gui_mode = airline#init#gui_mode() | |
endif | |
4726 0.006183 let color = '' | |
4726 0.022398 if hlexists(a:group) | |
4566 0.035408 let color = synIDattr(synIDtrans(hlID(a:group)), a:what, g:airline_gui_mode) | |
4566 0.003824 endif | |
4726 0.012855 if empty(color) || color == -1 | |
" should always exists | |
320 0.004821 let color = synIDattr(synIDtrans(hlID('Normal')), a:what, g:airline_gui_mode) | |
" however, just in case | |
320 0.000874 if empty(color) || color == -1 | |
let color = 'NONE' | |
endif | |
320 0.000194 endif | |
4726 0.005494 return color | |
FUNCTION airline#parts#readonly() | |
Called 337 times | |
Total time: 0.002851 | |
Self time: 0.002851 | |
count total (s) self (s) | |
337 0.001224 if &readonly && !filereadable(bufname('%')) | |
return '[noperm]' | |
else | |
337 0.000628 return &readonly ? g:airline_symbols.readonly : '' | |
endif | |
FUNCTION <SNR>44_SaveNERDTreeViewIfPossible() | |
Called 162 times | |
Total time: 0.002936 | |
Self time: 0.002936 | |
count total (s) self (s) | |
162 0.001035 if exists("t:NERDTreeBufName") && bufwinnr(t:NERDTreeBufName) == winnr() | |
" save scroll and cursor etc. | |
let s:nerdtree_view = winsaveview() | |
" save NERDTree window width | |
let s:nerdtree_width = winwidth(winnr()) | |
" save buffer name (to be able to correct desync by commands spawning | |
" a new NERDTree instance) | |
let s:nerdtree_buffer = bufname("%") | |
endif | |
FUNCTION airline#highlighter#exec() | |
Called 653 times | |
Total time: 0.173506 | |
Self time: 0.050997 | |
count total (s) self (s) | |
653 0.001403 if pumvisible() | |
return | |
endif | |
653 0.001076 let colors = a:colors | |
653 0.000906 if s:is_win32term | |
let colors[2] = s:gui2cui(get(colors, 0, ''), get(colors, 2, '')) | |
let colors[3] = s:gui2cui(get(colors, 1, ''), get(colors, 3, '')) | |
endif | |
653 0.096311 0.003299 let old_hi = airline#highlighter#get_highlight(a:group) | |
653 0.001653 if len(colors) == 4 | |
534 0.001692 call add(colors, '') | |
534 0.000418 endif | |
653 0.001129 if g:airline_gui_mode ==# 'gui' | |
653 0.003389 let new_hi = [colors[0], colors[1], '', '', colors[4]] | |
653 0.000557 else | |
let new_hi = ['', '', printf("%s", colors[2]), printf("%s", colors[3]), colors[4]] | |
endif | |
653 0.021307 0.003211 let colors = s:CheckDefined(colors) | |
653 0.011254 0.003765 if old_hi != new_hi || !s:hl_group_exists(a:group) | |
87 0.006315 0.002403 let cmd = printf('hi %s %s %s %s %s %s %s %s', a:group, s:Get(colors, 0, 'guifg='), s:Get(colors, 1, 'guibg='), s:Get(colors, 2, 'ctermfg='), s:Get(colors, 3, 'ctermbg='), s:Get(colors, 4, 'gui='), s:Get(colors, 4, 'cterm='), s:Get(colors, 4, 'term=')) | |
87 0.002546 exe cmd | |
87 0.000316 if has_key(s:hl_groups, a:group) | |
87 0.000214 let s:hl_groups[a:group] = colors | |
87 0.000064 endif | |
87 0.000054 endif | |
FUNCTION airline#extensions#whitespace#check() | |
Called 289 times | |
Total time: 0.019878 | |
Self time: 0.017558 | |
count total (s) self (s) | |
289 0.001409 let max_lines = get(g:, 'airline#extensions#whitespace#max_lines', 20000) | |
289 0.001596 if &readonly || !&modifiable || !s:enabled || line('$') > max_lines || get(b:, 'airline_whitespace_disabled', 0) | |
140 0.000165 return '' | |
endif | |
149 0.000633 if !exists('b:airline_whitespace_check') | |
let b:airline_whitespace_check = '' | |
let checks = get(b:, 'airline_whitespace_checks', get(g:, 'airline#extensions#whitespace#checks', s:default_checks)) | |
let trailing = 0 | |
if index(checks, 'trailing') > -1 | |
try | |
let regexp = get(g:, 'airline#extensions#whitespace#trailing_regexp', '\s$') | |
let trailing = search(regexp, 'nw') | |
catch | |
echomsg 'airline#whitespace: error occured evaluating '. regexp | |
echomsg v:exception | |
return '' | |
endtry | |
endif | |
let mixed = 0 | |
let check = 'indent' | |
if index(checks, check) > -1 && index(get(s:skip_check_ft, &ft, []), check) < 0 | |
let mixed = s:check_mixed_indent() | |
endif | |
let mixed_file = '' | |
let check = 'mixed-indent-file' | |
if index(checks, check) > -1 && index(get(s:skip_check_ft, &ft, []), check) < 0 | |
let mixed_file = s:check_mixed_indent_file() | |
endif | |
let long = 0 | |
if index(checks, 'long') > -1 && &tw > 0 | |
let long = search('\%>'.&tw.'v.\+', 'nw') | |
endif | |
if trailing != 0 || mixed != 0 || long != 0 || !empty(mixed_file) | |
let b:airline_whitespace_check = s:symbol | |
if strlen(s:symbol) > 0 | |
let space = (g:airline_symbols.space) | |
else | |
let space = '' | |
endif | |
if s:show_message | |
if trailing != 0 | |
let trailing_fmt = get(g:, 'airline#extensions#whitespace#trailing_format', '[%s]trailing') | |
let b:airline_whitespace_check .= space.printf(trailing_fmt, trailing) | |
endif | |
if mixed != 0 | |
let mixed_indent_fmt = get(g:, 'airline#extensions#whitespace#mixed_indent_format', '[%s]mixed-indent') | |
let b:airline_whitespace_check .= space.printf(mixed_indent_fmt, mixed) | |
endif | |
if long != 0 | |
let long_fmt = get(g:, 'airline#extensions#whitespace#long_format', '[%s]long') | |
let b:airline_whitespace_check .= space.printf(long_fmt, long) | |
endif | |
if !empty(mixed_file) | |
let mixed_indent_file_fmt = get(g:, 'airline#extensions#whitespace#mixed_indent_file_format', '[%s]mix-indent-file') | |
let b:airline_whitespace_check .= space.printf(mixed_indent_file_fmt, mixed_file) | |
endif | |
endif | |
endif | |
endif | |
149 0.003191 0.000871 return airline#util#shorten(b:airline_whitespace_check, 120, 9) | |
FUNCTION <SNR>56_is_excluded_ft() | |
Called 6 times | |
Total time: 0.000055 | |
Self time: 0.000055 | |
count total (s) self (s) | |
6 0.000035 if !exists("g:delimitMate_excluded_ft") | |
6 0.000013 return 0 | |
endif | |
return index(split(g:delimitMate_excluded_ft, ','), a:ft, 0, 1) >= 0 | |
FUNCTION <SNR>4_BMHash() | |
Called 1 time | |
Total time: 0.000035 | |
Self time: 0.000035 | |
count total (s) self (s) | |
" Make name all upper case, so that chars are between 32 and 96 | |
1 0.000008 let nm = substitute(a:name, ".*", '\U\0', "") | |
1 0.000004 if has("ebcdic") | |
" HACK: Replace all non alphabetics with 'Z' | |
" Just to make it work for now. | |
let nm = substitute(nm, "[^A-Z]", 'Z', "g") | |
let sp = char2nr('A') - 1 | |
else | |
1 0.000002 let sp = char2nr(' ') | |
1 0.000000 endif | |
" convert first six chars into a number for sorting: | |
1 0.000013 return (char2nr(nm[0]) - sp) * 0x800000 + (char2nr(nm[1]) - sp) * 0x20000 + (char2nr(nm[2]) - sp) * 0x1000 + (char2nr(nm[3]) - sp) * 0x80 + (char2nr(nm[4]) - sp) * 0x20 + (char2nr(nm[5]) - sp) | |
FUNCTION airline#extensions#tabline#formatters#default#format() | |
Called 384 times | |
Total time: 0.063605 | |
Self time: 0.054074 | |
count total (s) self (s) | |
384 0.001735 let fmod = get(g:, 'airline#extensions#tabline#fnamemod', ':~:.') | |
384 0.000588 let _ = '' | |
384 0.001371 let name = bufname(a:bufnr) | |
384 0.000864 if empty(name) | |
let _ .= '[No Name]' | |
else | |
384 0.000557 if s:fnamecollapse | |
384 0.037616 let _ .= substitute(fnamemodify(name, fmod), '\v\w\zs.{-}\ze(\\|/)', '', 'g') | |
384 0.000735 else | |
let _ .= fnamemodify(name, fmod) | |
endif | |
384 0.002324 if a:bufnr != bufnr('%') && s:fnametruncate && strlen(_) > s:fnametruncate | |
let _ = strpart(_, 0, s:fnametruncate) | |
endif | |
384 0.000268 endif | |
384 0.012244 0.002713 return airline#extensions#tabline#formatters#default#wrap_name(a:bufnr, _) | |
FUNCTION <SNR>4_BMAdd() | |
Called 1 time | |
Total time: 0.000279 | |
Self time: 0.000026 | |
count total (s) self (s) | |
1 0.000001 if s:bmenu_wait == 0 | |
" when adding too many buffers, redraw in short format | |
1 0.000002 if s:bmenu_count == &menuitems && s:bmenu_short == 0 | |
call s:BMShow() | |
else | |
1 0.000266 0.000013 call <SID>BMFilename(expand("<afile>"), expand("<abuf>")) | |
1 0.000003 let s:bmenu_count = s:bmenu_count + 1 | |
1 0.000001 endif | |
1 0.000000 endif | |
FUNCTION <SNR>84_exec_separator() | |
Called 539 times | |
Total time: 0.325989 | |
Self time: 0.024706 | |
count total (s) self (s) | |
539 0.001348 if pumvisible() | |
9 0.000006 return | |
endif | |
530 0.086611 0.003711 let l:from = airline#themes#get_highlight(a:from.a:suffix) | |
530 0.082272 0.003290 let l:to = airline#themes#get_highlight(a:to.a:suffix) | |
530 0.002175 let group = a:from.'_to_'.a:to.a:suffix | |
530 0.000686 if a:inverse | |
179 0.001083 let colors = [ l:from[1], l:to[1], l:from[3], l:to[3] ] | |
179 0.000166 else | |
351 0.002136 let colors = [ l:to[1], l:from[1], l:to[3], l:from[3] ] | |
351 0.000301 endif | |
530 0.001723 let a:dict[group] = colors | |
530 0.143516 0.004115 call airline#highlighter#exec(group, colors) | |
FUNCTION <SNR>55_Map() | |
Called 1 time | |
Total time: 0.001142 | |
Self time: 0.000134 | |
count total (s) self (s) | |
" Set mappings: | |
1 0.000001 try | |
1 0.000002 let save_keymap = &keymap | |
1 0.000001 let save_iminsert = &iminsert | |
1 0.000002 let save_imsearch = &imsearch | |
1 0.000005 let save_cpo = &cpo | |
1 0.000013 set keymap= | |
1 0.000005 set cpo&vim | |
1 0.000055 0.000051 silent! doautocmd <nomodeline> User delimitMate_map | |
1 0.000031 0.000005 if s:get('autoclose') | |
1 0.000773 0.000008 call s:AutoClose() | |
1 0.000001 else | |
call s:NoAutoClose() | |
endif | |
1 0.000221 0.000008 call s:ExtraMappings() | |
1 0.000001 finally | |
1 0.000009 let &cpo = save_cpo | |
1 0.000005 let &keymap = save_keymap | |
1 0.000006 let &iminsert = save_iminsert | |
1 0.000002 let &imsearch = save_imsearch | |
1 0.000001 endtry | |
1 0.000002 let b:delimitMate_enabled = 1 | |
FUNCTION <SNR>96_InsideCommentOrStringAndShouldStop() | |
Called 18 times | |
Total time: 0.002653 | |
Self time: 0.000416 | |
count total (s) self (s) | |
18 0.002391 0.000154 let retval = s:InsideCommentOrString() | |
18 0.000048 let inside_comment = retval == 1 | |
18 0.000031 let inside_string = retval == 2 | |
18 0.000061 if inside_comment && g:ycm_complete_in_comments || inside_string && g:ycm_complete_in_strings | |
return 0 | |
endif | |
18 0.000024 return retval | |
FUNCTION <SNR>44_WinLeaveHandler() | |
Called 162 times | |
Total time: 0.005352 | |
Self time: 0.002416 | |
count total (s) self (s) | |
162 0.000412 if s:disable_handlers_for_tabdo | |
return | |
endif | |
162 0.000308 if g:nerdtree_tabs_synchronize_view | |
162 0.003842 0.000906 call s:SaveNERDTreeViewIfPossible() | |
162 0.000134 endif | |
FUNCTION <SNR>89_build_sections() | |
Called 3 times | |
Total time: 0.000807 | |
Self time: 0.000141 | |
count total (s) self (s) | |
16 0.000018 for key in a:keys | |
13 0.000032 if (key == 'warning' || key == 'error') && !a:context.active | |
2 0.000001 continue | |
endif | |
11 0.000715 0.000049 call s:add_section(a:builder, a:context, key) | |
11 0.000008 endfor | |
FUNCTION airline#parts#spell() | |
Called 149 times | |
Total time: 0.003988 | |
Self time: 0.003988 | |
count total (s) self (s) | |
149 0.001854 let spelllang = g:airline_detect_spelllang ? printf(" [%s]", toupper(substitute(&spelllang, ',', '/', 'g'))) : '' | |
149 0.000279 if g:airline_detect_spell && &spell | |
if winwidth(0) >= 90 | |
return g:airline_symbols.spell . spelllang | |
elseif winwidth(0) >= 70 | |
return g:airline_symbols.spell | |
else | |
return split(g:airline_symbols.spell, '\zs')[0] | |
endif | |
endif | |
149 0.000131 return '' | |
FUNCTION <SNR>72_sync_active_winnr() | |
Called 40 times | |
Total time: 0.000396 | |
Self time: 0.000396 | |
count total (s) self (s) | |
40 0.000251 if exists('#airline') && winnr() != s:active_winnr | |
call airline#update_statusline() | |
endif | |
FUNCTION <SNR>21_invoke_funcrefs() | |
Called 2 times | |
Total time: 0.005096 | |
Self time: 0.000089 | |
count total (s) self (s) | |
2 0.000049 0.000009 let builder = airline#builder#new(a:context) | |
2 0.001375 0.000018 let err = airline#util#exec_funcrefs(a:funcrefs + s:core_funcrefs, builder, a:context) | |
2 0.000002 if err == 1 | |
2 0.003625 0.000015 let a:context.line = builder.build() | |
2 0.000018 let s:contexts[a:context.winnr] = a:context | |
2 0.000022 call setwinvar(a:context.winnr, '&statusline', '%!airline#statusline('.a:context.winnr.')') | |
2 0.000001 endif | |
FUNCTION <SNR>88_get_transitioned_seperator() | |
Called 486 times | |
Total time: 0.320869 | |
Self time: 0.012492 | |
count total (s) self (s) | |
486 0.000804 let line = '' | |
486 0.311892 0.003515 call airline#highlighter#add_separator(a:prev_group, a:group, a:side) | |
486 0.002869 let line .= '%#'.a:prev_group.'_to_'.a:group.'#' | |
486 0.002193 let line .= a:side ? a:self._context.left_sep : a:self._context.right_sep | |
486 0.001591 let line .= '%#'.a:group.'#' | |
486 0.000691 return line | |
FUNCTION airline#parts#crypt() | |
Called 149 times | |
Total time: 0.000937 | |
Self time: 0.000937 | |
count total (s) self (s) | |
149 0.000838 return g:airline_detect_crypt && exists("+key") && !empty(&key) ? g:airline_symbols.crypt : '' | |
FUNCTION airline#extensions#keymap#status() | |
Called 149 times | |
Total time: 0.001945 | |
Self time: 0.001945 | |
count total (s) self (s) | |
149 0.000988 if (get(g:, 'airline#extensions#keymap#enabled', 1) && has('keymap')) | |
149 0.000838 return printf('%s', (!empty(&keymap) ? (g:airline_symbols.keymap . ' '. &keymap) : '')) | |
else | |
return '' | |
endif | |
FUNCTION <SNR>96_AllowedToCompleteInCurrentBuffer() | |
Called 144 times | |
Total time: 0.005621 | |
Self time: 0.000968 | |
count total (s) self (s) | |
144 0.005526 0.000873 return s:AllowedToCompleteInBuffer( '%' ) | |
FUNCTION <SNR>4_BMMunge() | |
Called 1 time | |
Total time: 0.000085 | |
Self time: 0.000062 | |
count total (s) self (s) | |
1 0.000001 let name = a:fname | |
1 0.000002 if name == '' | |
1 0.000002 if !exists("g:menutrans_no_file") | |
1 0.000016 let g:menutrans_no_file = "[No file]" | |
1 0.000001 endif | |
1 0.000001 let name = g:menutrans_no_file | |
1 0.000000 else | |
let name = fnamemodify(name, ':p:~') | |
endif | |
" detach file name and separate it out: | |
1 0.000003 let name2 = fnamemodify(name, ':t') | |
1 0.000001 if a:bnum >= 0 | |
1 0.000003 let name2 = name2 . ' (' . a:bnum . ')' | |
1 0.000000 endif | |
1 0.000034 0.000011 let name = name2 . "\t" . <SID>BMTruncName(fnamemodify(name,':h')) | |
1 0.000004 let name = escape(name, "\\. \t|") | |
1 0.000006 let name = substitute(name, "&", "&&", "g") | |
1 0.000003 let name = substitute(name, "\n", "^@", "g") | |
1 0.000002 return name | |
FUNCTION <SNR>56_set() | |
Called 23 times | |
Total time: 0.000489 | |
Self time: 0.000489 | |
count total (s) self (s) | |
23 0.000034 let scope = a:0 ? a:1 : 's' | |
23 0.000049 let bufnr = bufnr('%') | |
23 0.000058 if !exists('s:options[bufnr]') | |
1 0.000003 let s:options[bufnr] = {} | |
1 0.000001 endif | |
23 0.000024 if scope == 's' | |
23 0.000057 let name = 's:options.' . bufnr . '.' . a:name | |
23 0.000012 else | |
let name = scope . ':delimitMate_' . a:name | |
if exists('name') | |
exec 'unlet! ' . name | |
endif | |
endif | |
23 0.000095 exec 'let ' . name . ' = a:value' | |
FUNCTION airline#parts#mode() | |
Called 149 times | |
Total time: 0.003890 | |
Self time: 0.001245 | |
count total (s) self (s) | |
149 0.003797 0.001152 return airline#util#shorten(get(w:, 'airline_current_mode', ''), 79, 1) | |
FUNCTION airline#extensions#tabline#buflist#invalidate() | |
Called 163 times | |
Total time: 0.000708 | |
Self time: 0.000708 | |
count total (s) self (s) | |
163 0.000549 unlet! s:current_buffer_list | |
FUNCTION airline#extensions#quickfix#apply() | |
Called 1 time | |
Total time: 0.000009 | |
Self time: 0.000009 | |
count total (s) self (s) | |
1 0.000003 if &buftype == 'quickfix' | |
let w:airline_section_a = s:get_text() | |
let w:airline_section_b = '%{get(w:, "quickfix_title", "")}' | |
let w:airline_section_c = '' | |
let w:airline_section_x = '' | |
endif | |
FUNCTION airline#extensions#wordcount#apply() | |
Called 1 time | |
Total time: 0.000016 | |
Self time: 0.000016 | |
count total (s) self (s) | |
1 0.000012 if match(&ft, get(g:, 'airline#extensions#wordcount#filetypes')) > -1 | |
call airline#extensions#prepend_to_section('z', '%{get(b:, "airline_wordcount", "")}') | |
endif | |
FUNCTION <SNR>70_IndentLinesEnable() | |
Called 163 times | |
Total time: 0.160561 | |
Self time: 0.157932 | |
count total (s) self (s) | |
163 0.000308 if g:indentLine_newVersion | |
163 0.000257 if &diff | |
return | |
endif | |
163 0.000681 if exists("b:indentLine_enabled") && b:indentLine_enabled == 0 | |
return | |
endif | |
163 0.000618 if !exists("w:indentLine_indentLineId") | |
1 0.000002 let w:indentLine_indentLineId = [] | |
1 0.000001 endif | |
163 0.003428 0.000799 call s:SetConcealOption() | |
163 0.000294 if g:indentLine_showFirstIndentLevel | |
call add(w:indentLine_indentLineId, matchadd('Conceal', '^ ', 0, -1, {'conceal': g:indentLine_first_char})) | |
endif | |
163 0.000569 let space = &l:shiftwidth == 0 ? &l:tabstop : &l:shiftwidth | |
3423 0.006059 for i in range(space+1, space * g:indentLine_indentLevel + 1, space) | |
3260 0.138882 call add(w:indentLine_indentLineId, matchadd('Conceal', '^\s\+\zs\%'.i.'v ', 0, -1, {'conceal': g:indentLine_char})) | |
3260 0.004099 endfor | |
163 0.000221 return | |
endif | |
if exists("b:indentLine_enabled") && b:indentLine_enabled | |
return | |
else | |
let b:indentLine_enabled = 1 | |
endif | |
call s:SetConcealOption() | |
let g:mysyntaxfile = g:indentLine_mysyntaxfile | |
let space = &l:shiftwidth == 0 ? &l:tabstop : &l:shiftwidth | |
if g:indentLine_showFirstIndentLevel | |
execute 'syntax match IndentLine /^ / containedin=ALL conceal cchar=' . g:indentLine_first_char | |
endif | |
if g:indentLine_faster | |
execute 'syntax match IndentLineSpace /^\s\+/ containedin=ALL contains=IndentLine' | |
execute 'syntax match IndentLine / \{'.(space-1).'}\zs / contained conceal cchar=' . g:indentLine_char | |
execute 'syntax match IndentLine /\t\zs / contained conceal cchar=' . g:indentLine_char | |
else | |
let pattern = line('$') < g:indentLine_maxLines ? 'v' : 'c' | |
for i in range(space+1, space * g:indentLine_indentLevel + 1, space) | |
execute 'syntax match IndentLine /\%(^\s\+\)\@<=\%'.i.pattern.' / containedin=ALL conceal cchar=' . g:indentLine_char | |
endfor | |
endif | |
FUNCTION <SNR>89_get_section() | |
Called 15 times | |
Total time: 0.000486 | |
Self time: 0.000441 | |
count total (s) self (s) | |
15 0.000036 if has_key(s:section_truncate_width, a:key) | |
10 0.000027 if winwidth(a:winnr) < s:section_truncate_width[a:key] | |
return '' | |
endif | |
10 0.000003 endif | |
15 0.000023 let spc = g:airline_symbols.space | |
15 0.000055 if !exists('g:airline_section_{a:key}') | |
return '' | |
endif | |
15 0.000132 0.000087 let text = airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key}) | |
15 0.000092 let [prefix, suffix] = [get(a:000, 0, '%('.spc), get(a:000, 1, spc.'%)')] | |
15 0.000046 return empty(text) ? '' : prefix.text.suffix | |
FUNCTION <SNR>55_AutoClose() | |
Called 1 time | |
Total time: 0.000765 | |
Self time: 0.000349 | |
count total (s) self (s) | |
" Add matching pair and jump to the midle: | |
" inoremap <silent> <buffer> ( ()<Left> | |
1 0.000001 let i = 0 | |
4 0.000119 0.000025 while i < len(s:get('matchpairs_list')) | |
3 0.000153 0.000026 let ld = s:get('left_delims')[i] == '|' ? '<bar>' : s:get('left_delims')[i] | |
3 0.000148 0.000021 let rd = s:get('right_delims')[i] == '|' ? '<bar>' : s:get('right_delims')[i] | |
3 0.000053 exec 'inoremap <expr><silent> <Plug>delimitMate' . ld. ' <SID>TriggerAbb().delimitMate#ParenDelim("' . escape(rd, '|') . '")' | |
3 0.000028 exec 'silent! imap <unique> <buffer> '.ld.' <Plug>delimitMate'.ld | |
3 0.000003 let i += 1 | |
3 0.000002 endwhile | |
" Exit from inside the matching pair: | |
4 0.000029 0.000007 for delim in s:get('right_delims') | |
3 0.000006 let delim = delim == '|' ? '<bar>' : delim | |
3 0.000033 exec 'inoremap <expr><silent> <Plug>delimitMate' . delim. ' <SID>TriggerAbb().delimitMate#JumpOut("\' . delim . '")' | |
3 0.000026 exec 'silent! imap <unique> <buffer> ' . delim. ' <Plug>delimitMate'. delim | |
3 0.000002 endfor | |
" Add matching quote and jump to the midle, or exit if inside a pair of matching quotes: | |
" inoremap <silent> <buffer> " <C-R>=delimitMate#QuoteDelim("\"")<CR> | |
4 0.000029 0.000006 for delim in s:get('quotes_list') | |
3 0.000005 if delim == '|' | |
let delim = '<Bar>' | |
endif | |
3 0.000037 exec 'inoremap <expr><silent> <Plug>delimitMate' . delim. ' <SID>TriggerAbb()."<C-R>=delimitMate#QuoteDelim(\"\\\' . delim . '\")<CR>"' | |
3 0.000026 exec 'silent! imap <unique> <buffer> ' . delim. ' <Plug>delimitMate' . delim | |
3 0.000001 endfor | |
" Try to fix the use of apostrophes (kept for backward compatibility): | |
" inoremap <silent> <buffer> n't n't | |
1 0.000026 0.000003 for map in s:get('apostrophes_list') | |
exec "inoremap <silent> " . map . " " . map | |
exec 'silent! imap <unique> <buffer> ' . map . ' <Plug>delimitMate' . map | |
endfor | |
FUNCTION color_coded#push() | |
Called 21 times | |
Total time: 0.002684 | |
Self time: 0.002684 | |
count total (s) self (s) | |
21 0.000153 if index(g:color_coded_filetypes, &ft) < 0 || g:color_coded_enabled == 0 | |
return | |
endif | |
21 0.000017 lua << EOF | |
local name, data = color_coded_buffer_details() | |
color_coded_push(name, vim.eval('&ft'), data) | |
EOF | |
FUNCTION <SNR>96_OnInsertLeave() | |
Called 2 times | |
Total time: 0.015406 | |
Self time: 0.004481 | |
count total (s) self (s) | |
2 0.000165 0.000015 if !s:AllowedToCompleteInCurrentBuffer() | |
return | |
endif | |
2 0.000009 call timer_stop( s:pollers.completion.id ) | |
2 0.000003 let s:force_semantic = 0 | |
2 0.000006 let s:completion = s:default_completion | |
2 0.005399 0.000025 call s:OnFileReadyToParse() | |
2 0.004327 exec s:python_command "ycm_state.OnInsertLeave()" | |
2 0.000020 if g:ycm_autoclose_preview_window_after_completion || g:ycm_autoclose_preview_window_after_insertion | |
2 0.005458 0.000057 call s:ClosePreviewWindowIfNeeded() | |
2 0.000006 endif | |
FUNCTION <SNR>55_ExtraMappings() | |
Called 1 time | |
Total time: 0.000213 | |
Self time: 0.000149 | |
count total (s) self (s) | |
" If pair is empty, delete both delimiters: | |
1 0.000008 inoremap <silent> <Plug>delimitMateBS <C-R>=delimitMate#BS()<CR> | |
1 0.000010 if !hasmapto('<Plug>delimitMateBS','i') | |
1 0.000007 if empty(maparg('<BS>', 'i')) | |
silent! imap <unique> <buffer> <BS> <Plug>delimitMateBS | |
endif | |
1 0.000006 if empty(maparg('<C-H>', 'i')) | |
silent! imap <unique> <buffer> <C-h> <Plug>delimitMateBS | |
endif | |
1 0.000001 endif | |
" If pair is empty, delete closing delimiter: | |
1 0.000008 inoremap <silent> <expr> <Plug>delimitMateS-BS delimitMate#WithinEmptyPair() ? "\<Del>" : "\<S-BS>" | |
1 0.000012 if !hasmapto('<Plug>delimitMateS-BS','i') && maparg('<S-BS>', 'i') == '' | |
1 0.000006 silent! imap <unique> <buffer> <S-BS> <Plug>delimitMateS-BS | |
1 0.000001 endif | |
" Expand return if inside an empty pair: | |
1 0.000008 inoremap <expr><silent> <Plug>delimitMateCR <SID>TriggerAbb()."\<C-R>=delimitMate#ExpandReturn()\<CR>" | |
1 0.000029 0.000006 if s:get('expand_cr') && !hasmapto('<Plug>delimitMateCR', 'i') && maparg('<CR>', 'i') == '' | |
silent! imap <unique> <buffer> <CR> <Plug>delimitMateCR | |
endif | |
" Expand space if inside an empty pair: | |
1 0.000009 inoremap <expr><silent> <Plug>delimitMateSpace <SID>TriggerAbb()."\<C-R>=delimitMate#ExpandSpace()\<CR>" | |
1 0.000026 0.000005 if s:get('expand_space') && !hasmapto('<Plug>delimitMateSpace', 'i') && maparg('<Space>', 'i') == '' | |
silent! imap <unique> <buffer> <Space> <Plug>delimitMateSpace | |
endif | |
" Jump over any delimiter: | |
1 0.000008 inoremap <expr><silent> <Plug>delimitMateS-Tab <SID>TriggerAbb()."\<C-R>=delimitMate#JumpAny()\<CR>" | |
1 0.000035 0.000015 if s:get('tab2exit') && !hasmapto('<Plug>delimitMateS-Tab', 'i') && maparg('<S-Tab>', 'i') == '' | |
silent! imap <unique> <buffer> <S-Tab> <Plug>delimitMateS-Tab | |
endif | |
" Jump over next delimiters | |
1 0.000008 inoremap <expr><buffer> <Plug>delimitMateJumpMany <SID>TriggerAbb()."\<C-R>=delimitMate#JumpMany()\<CR>" | |
1 0.000012 if !hasmapto('<Plug>delimitMateJumpMany', 'i') && maparg("<C-G>g", 'i') == '' | |
1 0.000006 imap <silent> <buffer> <C-G>g <Plug>delimitMateJumpMany | |
1 0.000000 endif | |
FUNCTION <SNR>4_BMFilename() | |
Called 1 time | |
Total time: 0.000253 | |
Self time: 0.000133 | |
count total (s) self (s) | |
1 0.000002 if isdirectory(a:name) | |
return | |
endif | |
1 0.000092 0.000007 let munge = <SID>BMMunge(a:name, a:num) | |
1 0.000041 0.000006 let hash = <SID>BMHash(munge) | |
1 0.000001 if s:bmenu_short == 0 | |
1 0.000004 let name = 'an ' . g:bmenu_priority . '.' . hash . ' &Buffers.' . munge | |
1 0.000000 else | |
let name = 'an ' . g:bmenu_priority . '.' . hash . '.' . hash . ' &Buffers.' . <SID>BMHash2(munge) . munge | |
endif | |
" set 'cpo' to include the <CR> | |
1 0.000006 let cpo_save = &cpo | |
1 0.000008 set cpo&vim | |
1 0.000082 exe name . ' :confirm b' . a:num . '<CR>' | |
1 0.000008 let &cpo = cpo_save | |
FUNCTION <SNR>70_Filter() | |
Called 326 times | |
Total time: 0.008952 | |
Self time: 0.008952 | |
count total (s) self (s) | |
326 0.001497 if index(g:indentLine_fileTypeExclude, &filetype) != -1 | |
return 0 | |
endif | |
326 0.001483 if len(g:indentLine_fileType) != 0 && index(g:indentLine_fileType, &filetype) == -1 | |
return 0 | |
endif | |
326 0.000893 for name in g:indentLine_bufNameExclude | |
if matchstr(bufname(''), name) == bufname('') | |
return 0 | |
endif | |
endfor | |
326 0.000353 return 1 | |
FUNCTION airline#statusline() | |
Called 477 times | |
Total time: 0.010741 | |
Self time: 0.010741 | |
count total (s) self (s) | |
477 0.005401 if has_key(s:contexts, a:winnr) | |
477 0.004138 return '%{airline#check_mode('.a:winnr.')}'.s:contexts[a:winnr].line | |
endif | |
" in rare circumstances this happens...see #276 | |
return '' | |
FUNCTION 267() | |
Called 161 times | |
Total time: 0.000723 | |
Self time: 0.000723 | |
count total (s) self (s) | |
161 0.000634 call add(self._sections, ['|', a:0 ? a:1 : '%=']) | |
FUNCTION airline#extensions#apply() | |
Called 2 times | |
Total time: 0.000179 | |
Self time: 0.000095 | |
count total (s) self (s) | |
2 0.000006 let s:active_winnr = winnr() | |
2 0.000094 0.000010 if s:is_excluded_window() | |
return -1 | |
endif | |
2 0.000003 if &buftype == 'help' | |
call airline#extensions#apply_left_override('Help', '%f') | |
let w:airline_section_x = '' | |
let w:airline_section_y = '' | |
let w:airline_render_right = 1 | |
endif | |
2 0.000002 if &previewwindow | |
2 0.000004 let w:airline_section_a = 'Preview' | |
2 0.000003 let w:airline_section_b = '' | |
2 0.000009 let w:airline_section_c = bufname(winbufnr(winnr())) | |
2 0.000001 endif | |
2 0.000008 if has_key(s:filetype_overrides, &ft) | |
let args = s:filetype_overrides[&ft] | |
call airline#extensions#apply_left_override(args[0], args[1]) | |
endif | |
2 0.000006 for item in items(s:filetype_regex_overrides) | |
if match(&ft, item[0]) >= 0 | |
call airline#extensions#apply_left_override(item[1][0], item[1][1]) | |
endif | |
endfor | |
FUNCTION 269() | |
Called 647 times | |
Total time: 0.002941 | |
Self time: 0.002941 | |
count total (s) self (s) | |
647 0.002643 call add(self._sections, [a:group, a:contents]) | |
FUNCTION youcompleteme#CompleteFunc() | |
Called 52 times | |
Total time: 0.000723 | |
Self time: 0.000723 | |
count total (s) self (s) | |
52 0.000112 if a:findstart | |
31 0.000192 if s:completion.start_column > col( '.' ) || empty( s:completion.candidates ) | |
" For vim, -2 means not found but don't trigger an error message. | |
" See :h complete-functions. | |
10 0.000014 return -2 | |
endif | |
21 0.000065 return s:completion.start_column - 1 | |
endif | |
21 0.000033 return s:completion.candidates | |
FUNCTION airline#highlighter#get_highlight() | |
Called 2363 times | |
Total time: 0.342713 | |
Self time: 0.138900 | |
count total (s) self (s) | |
2363 0.011254 if get(g:, 'airline_highlighting_cache', 0) && has_key(s:hl_groups, a:group) | |
return s:hl_groups[a:group] | |
else | |
2363 0.109041 0.012880 let fg = s:get_syn(a:group, 'fg') | |
2363 0.096255 0.011944 let bg = s:get_syn(a:group, 'bg') | |
2363 0.034268 let reverse = g:airline_gui_mode ==# 'gui' ? synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'gui') : synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'cterm')|| synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'term') | |
2363 0.015908 let bold = synIDattr(synIDtrans(hlID(a:group)), 'bold') | |
2363 0.003854 let opts = a:000 | |
2363 0.002580 if bold | |
22 0.000029 let opts = ['bold'] | |
22 0.000016 endif | |
2363 0.041520 0.018179 let res = reverse ? s:get_array(bg, fg, opts) : s:get_array(fg, bg, opts) | |
2363 0.001989 endif | |
2363 0.006810 let s:hl_groups[a:group] = res | |
2363 0.002735 return res | |
FUNCTION airline#util#shorten() | |
Called 298 times | |
Total time: 0.004965 | |
Self time: 0.004965 | |
count total (s) self (s) | |
298 0.001485 if winwidth(0) < a:winwidth && len(split(a:text, '\zs')) > a:minwidth | |
if get(a:000, 0, 0) | |
" shorten from tail | |
return '…'.matchstr(a:text, '.\{'.a:minwidth.'}$') | |
else | |
" shorten from beginning of string | |
return matchstr(a:text, '^.\{'.a:minwidth.'}').'…' | |
endif | |
else | |
298 0.000365 return a:text | |
endif | |
FUNCTION 271() | |
Called 161 times | |
Total time: 0.570147 | |
Self time: 0.085916 | |
count total (s) self (s) | |
161 0.000246 let side = 1 | |
161 0.000199 let line = '' | |
161 0.000196 let i = 0 | |
161 0.000451 let length = len(self._sections) | |
161 0.000225 let split = 0 | |
161 0.000239 let is_empty = 0 | |
161 0.000246 let prev_group = '' | |
969 0.001756 while i < length | |
808 0.002229 let section = self._sections[i] | |
808 0.001898 let group = section[0] | |
808 0.001776 let contents = section[1] | |
808 0.001432 let pgroup = prev_group | |
808 0.017010 0.004612 let prev_group = s:get_prev_group(self._sections, i) | |
808 0.003203 if group ==# 'airline_c' && !self._context.active && has_key(self._context, 'bufnr') | |
let group = 'airline_c'. self._context.bufnr | |
elseif prev_group ==# 'airline_c' && !self._context.active && has_key(self._context, 'bufnr') | |
let prev_group = 'airline_c'. self._context.bufnr | |
endif | |
808 0.000874 if is_empty | |
let prev_group = pgroup | |
endif | |
808 0.012879 0.004348 let is_empty = s:section_is_empty(self, contents) | |
808 0.001328 if is_empty | |
" need to fix highlighting groups, since we | |
" have skipped a section, we actually need | |
" the previous previous group and so the | |
" seperator goes from the previous previous group | |
" to the current group | |
let pgroup = group | |
endif | |
808 0.001333 if group == '' | |
let line .= contents | |
elseif group == '|' | |
161 0.000207 let side = 0 | |
161 0.000374 let line .= contents | |
161 0.000185 let split = 1 | |
161 0.000138 else | |
647 0.001038 if prev_group == '' | |
161 0.000590 let line .= '%#'.group.'#' | |
161 0.000170 elseif split | |
161 0.000170 if !is_empty | |
161 0.107162 0.001390 let line .= s:get_transitioned_seperator(self, prev_group, group, side) | |
161 0.000165 endif | |
161 0.000243 let split = 0 | |
161 0.000138 else | |
325 0.000382 if !is_empty | |
325 0.327123 0.002614 let line .= s:get_seperator(self, prev_group, group, side) | |
325 0.000340 endif | |
325 0.000246 endif | |
647 0.039376 0.006355 let line .= is_empty ? '' : s:get_accented_line(self, group, contents) | |
647 0.000587 endif | |
808 0.001966 let i = i + 1 | |
808 0.000865 endwhile | |
161 0.000280 if !self._context.active | |
"let line = substitute(line, '%#airline_c#', '%#airline_c'.self._context.bufnr.'#', '') | |
1 0.000030 let line = substitute(line, '%#.\{-}\ze#', '\0_inactive', 'g') | |
1 0.000001 endif | |
161 0.000248 return line | |
FUNCTION <SNR>56_get() | |
Called 66 times | |
Total time: 0.001267 | |
Self time: 0.001267 | |
count total (s) self (s) | |
66 0.000074 if a:0 == 2 | |
return deepcopy(get(a:2, 'delimitMate_' . a:name, a:1)) | |
elseif a:0 == 1 | |
let bufoptions = get(s:options, bufnr('%'), {}) | |
return deepcopy(get(bufoptions, a:name, a:1)) | |
else | |
66 0.000519 return deepcopy(eval('s:options.' . bufnr('%') . '.' . a:name)) | |
endif | |
FUNCTION <SNR>55_option_init() | |
Called 23 times | |
Total time: 0.001044 | |
Self time: 0.000363 | |
count total (s) self (s) | |
23 0.000068 let b = exists("b:delimitMate_" . a:name) | |
23 0.000060 let g = exists("g:delimitMate_" . a:name) | |
" Find value to use. | |
23 0.000018 if !b && !g | |
23 0.000026 let value = a:default | |
23 0.000011 elseif b | |
exec "let value = b:delimitMate_" . a:name | |
else | |
exec "let value = g:delimitMate_" . a:name | |
endif | |
23 0.000763 0.000082 call s:set(a:name, value) | |
FUNCTION airline#highlighter#highlight_modified_inactive() | |
Called 3 times | |
Total time: 0.001010 | |
Self time: 0.000086 | |
count total (s) self (s) | |
3 0.000011 if getbufvar(a:bufnr, '&modified') | |
2 0.000018 let colors = exists('g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_c') ? g:airline#themes#{g:airline_theme}#palette.inactive_modified.airline_c : [] | |
2 0.000002 else | |
1 0.000009 let colors = exists('g:airline#themes#{g:airline_theme}#palette.inactive.airline_c') ? g:airline#themes#{g:airline_theme}#palette.inactive.airline_c : [] | |
1 0.000000 endif | |
3 0.000004 if !empty(colors) | |
3 0.000949 0.000025 call airline#highlighter#exec('airline_c'.(a:bufnr).'_inactive', colors) | |
3 0.000002 endif | |
FUNCTION <SNR>20_init() | |
Called 1 time | |
Total time: 0.000003 | |
Self time: 0.000003 | |
count total (s) self (s) | |
1 0.000001 if s:airline_initialized | |
1 0.000001 return | |
endif | |
let s:airline_initialized = 1 | |
call airline#extensions#load() | |
call airline#init#sections() | |
let s:theme_in_vimrc = exists('g:airline_theme') | |
if s:theme_in_vimrc | |
try | |
let palette = g:airline#themes#{g:airline_theme}#palette | |
catch | |
echom 'Could not resolve airline theme "' . g:airline_theme . '". Themes have been migrated to github.com/vim-airline/vim-airline-themes.' | |
let g:airline_theme = 'dark' | |
endtry | |
silent call airline#switch_theme(g:airline_theme) | |
else | |
let g:airline_theme = 'dark' | |
silent call s:on_colorscheme_changed() | |
endif | |
silent doautocmd User AirlineAfterInit | |
FUNCTION <SNR>44_WinEnterHandler() | |
Called 162 times | |
Total time: 0.003599 | |
Self time: 0.002142 | |
count total (s) self (s) | |
162 0.000333 if s:disable_handlers_for_tabdo | |
return | |
endif | |
162 0.000260 if g:nerdtree_tabs_autoclose | |
162 0.002240 0.000783 call s:CloseIfOnlyNerdTreeLeft() | |
162 0.000129 endif | |
FUNCTION <SNR>96_OnInsertChar() | |
Called 13 times | |
Total time: 0.000384 | |
Self time: 0.000291 | |
count total (s) self (s) | |
13 0.000104 call timer_stop( s:pollers.completion.id ) | |
13 0.000047 if pumvisible() | |
8 0.000167 0.000074 call s:SendKeys( "\<C-e>" ) | |
8 0.000013 endif | |
FUNCTION delimitMate#BS() | |
Called 6 times | |
Total time: 0.003508 | |
Self time: 0.000393 | |
count total (s) self (s) | |
6 0.001212 0.000075 if s:is_forbidden("") | |
let extra = '' | |
elseif &bs !~ 'start\|2' | |
let extra = '' | |
elseif delimitMate#WithinEmptyPair() | |
let extra = "\<Del>" | |
elseif s:is_space_expansion() | |
let extra = "\<Del>" | |
elseif s:is_cr_expansion() | |
let extra = repeat("\<Del>", len(matchstr(getline(line('.') + 1), '^\s*\S'))) | |
else | |
6 0.000009 let extra = '' | |
6 0.000005 endif | |
6 0.000020 return "\<BS>" . extra | |
FUNCTION color_coded#moved() | |
Called 92 times | |
Total time: 0.248270 | |
Self time: 0.061672 | |
count total (s) self (s) | |
92 0.001372 if index(g:color_coded_filetypes, &ft) < 0 || g:color_coded_enabled == 0 | |
return | |
endif | |
92 0.000127 lua << EOF | |
local name = color_coded_buffer_name() | |
color_coded_moved(name, vim.eval("line(\"w0\")"), vim.eval("line(\"w$\")")) | |
EOF | |
FUNCTION <SNR>47_CreateDelimMapFromCms() | |
Called 81 times | |
Total time: 0.004706 | |
Self time: 0.004706 | |
count total (s) self (s) | |
81 0.000728 if &ft == '' && exists('g:NERDDefaultDelims') | |
let delims = g:NERDDefaultDelims | |
for i in ['left', 'leftAlt', 'right', 'rightAlt'] | |
if !has_key(delims, i) | |
let delims[i] = '' | |
endif | |
endfor | |
return delims | |
endif | |
81 0.002890 return { 'left': substitute(&commentstring, '\([^ \t]*\)\s*%s.*', '\1', ''), 'right': substitute(&commentstring, '.*%s\s*\(.*\)', '\1', 'g'), 'nested': 0, 'leftAlt': '', 'rightAlt': '', 'nestedAlt': 0} | |
FUNCTION <SNR>55_init() | |
Called 1 time | |
Total time: 0.001538 | |
Self time: 0.000280 | |
count total (s) self (s) | |
" Initialize variables: | |
" autoclose | |
1 0.000076 0.000007 call s:option_init("autoclose", 1) | |
" matchpairs | |
1 0.000054 0.000008 call s:option_init("matchpairs", string(&matchpairs)[1:-2]) | |
1 0.000111 0.000035 call s:option_init("matchpairs_list", map(split(s:get('matchpairs'), '.:.\zs,\ze.:.'), 'split(v:val, ''^.\zs:\ze.$'')')) | |
1 0.000028 0.000004 let pairs = s:get('matchpairs_list') | |
1 0.000010 if len(filter(pairs, 'v:val[0] ==# v:val[1]')) | |
echohl ErrorMsg | |
echom 'delimitMate: each member of a pair in delimitMate_matchpairs must be different from each other.' | |
echom 'delimitMate: invalid pairs: ' . join(map(pairs, 'join(v:val, ":")'), ', ') | |
echohl Normal | |
return 0 | |
endif | |
1 0.000082 0.000013 call s:option_init("left_delims", map(copy(s:get('matchpairs_list')), 'v:val[0]')) | |
1 0.000081 0.000012 call s:option_init("right_delims", map(copy(s:get('matchpairs_list')), 'v:val[1]')) | |
" quotes | |
1 0.000048 0.000003 call s:option_init("quotes", "\" ' `") | |
1 0.000080 0.000012 call s:option_init("quotes_list",split(s:get('quotes'), '\s\+')) | |
" nesting_quotes | |
1 0.000046 0.000004 call s:option_init("nesting_quotes", []) | |
" excluded_regions | |
1 0.000047 0.000003 call s:option_init("excluded_regions", "Comment") | |
1 0.000077 0.000009 call s:option_init("excluded_regions_list", split(s:get('excluded_regions'), ',\s*')) | |
1 0.000027 0.000005 let enabled = len(s:get('excluded_regions_list')) > 0 | |
1 0.000048 0.000004 call s:option_init("excluded_regions_enabled", enabled) | |
" expand_space | |
1 0.000004 if exists("b:delimitMate_expand_space") && type(b:delimitMate_expand_space) == type("") | |
echom "b:delimitMate_expand_space is '".b:delimitMate_expand_space."' but it must be either 1 or 0!" | |
echom "Read :help 'delimitMate_expand_space' for more details." | |
unlet b:delimitMate_expand_space | |
let b:delimitMate_expand_space = 1 | |
endif | |
1 0.000004 if exists("g:delimitMate_expand_space") && type(g:delimitMate_expand_space) == type("") | |
echom "delimitMate_expand_space is '".g:delimitMate_expand_space."' but it must be either 1 or 0!" | |
echom "Read :help 'delimitMate_expand_space' for more details." | |
unlet g:delimitMate_expand_space | |
let g:delimitMate_expand_space = 1 | |
endif | |
1 0.000047 0.000003 call s:option_init("expand_space", 0) | |
" expand_cr | |
1 0.000004 if exists("b:delimitMate_expand_cr") && type(b:delimitMate_expand_cr) == type("") | |
echom "b:delimitMate_expand_cr is '".b:delimitMate_expand_cr."' but it must be either 1 or 0!" | |
echom "Read :help 'delimitMate_expand_cr' for more details." | |
unlet b:delimitMate_expand_cr | |
let b:delimitMate_expand_cr = 1 | |
endif | |
1 0.000003 if exists("g:delimitMate_expand_cr") && type(g:delimitMate_expand_cr) == type("") | |
echom "delimitMate_expand_cr is '".g:delimitMate_expand_cr."' but it must be either 1 or 0!" | |
echom "Read :help 'delimitMate_expand_cr' for more details." | |
unlet g:delimitMate_expand_cr | |
let g:delimitMate_expand_cr = 1 | |
endif | |
1 0.000010 if ((&backspace !~ 'eol' || &backspace !~ 'start') && &backspace != 2) && ((exists('b:delimitMate_expand_cr') && b:delimitMate_expand_cr == 1) || (exists('g:delimitMate_expand_cr') && g:delimitMate_expand_cr == 1)) | |
echom "delimitMate: There seems to be some incompatibility with your settings that may interfer with the expansion of <CR>. See :help 'delimitMate_expand_cr' for details." | |
endif | |
1 0.000048 0.000004 call s:option_init("expand_cr", 0) | |
" expand_in_quotes | |
1 0.000047 0.000003 call s:option_init('expand_inside_quotes', 0) | |
" jump_expansion | |
1 0.000047 0.000003 call s:option_init("jump_expansion", 0) | |
" smart_matchpairs | |
1 0.000048 0.000004 call s:option_init("smart_matchpairs", '^\%(\w\|\!\|[£$]\|[^[:punct:][:space:]]\)') | |
" smart_quotes | |
" XXX: backward compatibility. Ugly, should go the way of the dodo soon. | |
1 0.000032 0.000008 let quotes = escape(join(s:get('quotes_list'), ''), '\-^[]') | |
1 0.000005 let default_smart_quotes = '\%(\w\|[^[:punct:][:space:]' . quotes . ']\|\%(\\\\\)*\\\)\%#\|\%#\%(\w\|[^[:space:][:punct:]' . quotes . ']\)' | |
1 0.000004 if exists('g:delimitMate_smart_quotes') && type(g:delimitMate_smart_quotes) == type(0) | |
if g:delimitMate_smart_quotes | |
unlet g:delimitMate_smart_quotes | |
else | |
unlet g:delimitMate_smart_quotes | |
let g:delimitMate_smart_quotes = '' | |
endif | |
endif | |
1 0.000004 if exists('b:delimitMate_smart_quotes') && type(b:delimitMate_smart_quotes) == type(0) | |
if b:delimitMate_smart_quotes | |
unlet b:delimitMate_smart_quotes | |
if exists('g:delimitMate_smart_quotes') && type(g:delimitMate_smart_quotes) && g:delimitMate_smart_quotes | |
let b:delimitMate_smart_quotes = default_smart_quotes | |
endif | |
else | |
unlet b:delimitMate_smart_quotes | |
let b:delimitMate_smart_quotes = '' | |
endif | |
endif | |
1 0.000049 0.000004 call s:option_init("smart_quotes", default_smart_quotes) | |
" apostrophes | |
1 0.000048 0.000003 call s:option_init("apostrophes", "") | |
1 0.000077 0.000010 call s:option_init("apostrophes_list", split(s:get('apostrophes'), ":\s*")) | |
" tab2exit | |
1 0.000046 0.000003 call s:option_init("tab2exit", 1) | |
" balance_matchpairs | |
1 0.000045 0.000002 call s:option_init("balance_matchpairs", 0) | |
" eol marker | |
1 0.000045 0.000003 call s:option_init("insert_eol_marker", 1) | |
1 0.000047 0.000004 call s:option_init("eol_marker", "") | |
" Everything is fine. | |
1 0.000001 return 1 | |
FUNCTION delimitMate#Set() | |
Called 23 times | |
Total time: 0.000588 | |
Self time: 0.000099 | |
count total (s) self (s) | |
23 0.000581 0.000092 return call('s:set', a:000) | |
FUNCTION <SNR>84_Get() | |
Called 609 times | |
Total time: 0.003912 | |
Self time: 0.003912 | |
count total (s) self (s) | |
609 0.001574 let res=get(a:dict, a:key, '') | |
609 0.000846 if res is '' | |
356 0.000274 return '' | |
else | |
253 0.000441 return a:prefix. res | |
endif | |
FUNCTION color_coded#add_match() | |
Called 12673 times | |
Total time: 0.700655 | |
Self time: 0.381655 | |
count total (s) self (s) | |
12673 0.374011 0.055011 let s:file = color_coded#get_buffer_name() | |
12673 0.292164 call add(g:color_coded_matches[s:file],matchaddpos(a:type, [[ a:line, a:col, a:len ]], -1)) | |
12673 0.021551 unlet s:file | |
FUNCTION airline#builder#new() | |
Called 161 times | |
Total time: 0.004408 | |
Self time: 0.004408 | |
count total (s) self (s) | |
161 0.001172 let builder = copy(s:prototype) | |
161 0.000404 let builder._context = a:context | |
161 0.000304 let builder._sections = [] | |
161 0.001899 call extend(builder._context, { 'left_sep': g:airline_left_sep, 'left_alt_sep': g:airline_left_alt_sep, 'right_sep': g:airline_right_sep, 'right_alt_sep': g:airline_right_alt_sep, }, 'keep') | |
161 0.000253 return builder | |
FUNCTIONS SORTED ON TOTAL TIME | |
count total (s) self (s) function | |
324 0.751851 0.181465 color_coded#enter() | |
12673 0.700655 0.381655 color_coded#add_match() | |
225 0.698190 0.011188 airline#extensions#tabline#get() | |
225 0.687002 0.032127 airline#extensions#tabline#buffers#get() | |
161 0.570147 0.085916 271() | |
2363 0.342713 0.138900 airline#highlighter#get_highlight() | |
13209 0.342427 color_coded#get_buffer_name() | |
539 0.325989 0.024706 <SNR>84_exec_separator() | |
325 0.324509 0.004909 <SNR>88_get_seperator() | |
486 0.320869 0.012492 <SNR>88_get_transitioned_seperator() | |
486 0.308377 0.009657 airline#highlighter#add_separator() | |
92 0.248270 0.061672 color_coded#moved() | |
163 0.189971 0.006621 <SNR>70_Setup() | |
4726 0.180472 <SNR>84_get_syn() | |
653 0.173506 0.050997 airline#highlighter#exec() | |
1060 0.161882 0.009056 airline#themes#get_highlight() | |
163 0.160561 0.157932 <SNR>70_IndentLinesEnable() | |
477 0.120084 0.052045 airline#check_mode() | |
325 0.104503 0.007628 <SNR>88_should_change_group() | |
384 0.072645 0.006301 airline#extensions#tabline#get_buffer_name() | |
FUNCTIONS SORTED ON SELF TIME | |
count total (s) self (s) function | |
12673 0.700655 0.381655 color_coded#add_match() | |
13209 0.342427 color_coded#get_buffer_name() | |
324 0.751851 0.181465 color_coded#enter() | |
4726 0.180472 <SNR>84_get_syn() | |
163 0.160561 0.157932 <SNR>70_IndentLinesEnable() | |
2363 0.342713 0.138900 airline#highlighter#get_highlight() | |
161 0.570147 0.085916 271() | |
374 0.064639 color_coded#clear_matches() | |
92 0.248270 0.061672 color_coded#moved() | |
384 0.063605 0.054074 airline#extensions#tabline#formatters#default#format() | |
477 0.120084 0.052045 airline#check_mode() | |
653 0.173506 0.050997 airline#highlighter#exec() | |
82 0.036458 <SNR>96_Pyeval() | |
647 0.033021 <SNR>88_get_accented_line() | |
225 0.687002 0.032127 airline#extensions#tabline#buffers#get() | |
539 0.325989 0.024706 <SNR>84_exec_separator() | |
2363 0.023341 <SNR>84_get_array() | |
12 0.031313 0.020784 <SNR>96_InvokeCompletion() | |
543 0.020167 airline#extensions#tabline#buflist#list() | |
653 0.018096 <SNR>84_CheckDefined() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FUNCTION <SNR>55_Highlight_Matching_Pair() | |
Called 310 times | |
Total time: 0.012258 | |
Self time: 0.012258 | |
count total (s) self (s) | |
" Remove any previous match. | |
310 0.001385 if exists('w:paren_hl_on') && w:paren_hl_on | |
silent! call matchdelete(3) | |
let w:paren_hl_on = 0 | |
endif | |
" Avoid that we remove the popup menu. | |
" Return when there are no colors (looks like the cursor jumps). | |
310 0.001636 if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
224 0.000227 return | |
endif | |
" Get the character under the cursor and check if it's in 'matchpairs'. | |
86 0.000278 let c_lnum = line('.') | |
86 0.000203 let c_col = col('.') | |
86 0.000103 let before = 0 | |
86 0.000264 let text = getline(c_lnum) | |
86 0.001619 let matches = matchlist(text, '\(.\)\=\%'.c_col.'c\(.\=\)') | |
86 0.000205 if empty(matches) | |
let [c_before, c] = ['', ''] | |
else | |
86 0.000395 let [c_before, c] = matches[1:2] | |
86 0.000063 endif | |
86 0.001150 let plist = split(&matchpairs, '.\zs[:,]') | |
86 0.000267 let i = index(plist, c) | |
86 0.000097 if i < 0 | |
" not found, in Insert mode try character before the cursor | |
86 0.000307 if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
41 0.000101 let before = strlen(c_before) | |
41 0.000049 let c = c_before | |
41 0.000079 let i = index(plist, c) | |
41 0.000031 endif | |
86 0.000082 if i < 0 | |
" not found, nothing to do | |
86 0.000091 return | |
endif | |
endif | |
" Figure out the arguments for searchpairpos(). | |
if i % 2 == 0 | |
let s_flags = 'nW' | |
let c2 = plist[i + 1] | |
else | |
let s_flags = 'nbW' | |
let c2 = c | |
let c = plist[i - 1] | |
endif | |
if c == '[' | |
let c = '\[' | |
let c2 = '\]' | |
endif | |
" Find the match. When it was just before the cursor move it there for a | |
" moment. | |
if before > 0 | |
let has_getcurpos = exists("*getcurpos") | |
if has_getcurpos | |
" getcurpos() is more efficient but doesn't exist before 7.4.313. | |
let save_cursor = getcurpos() | |
else | |
let save_cursor = winsaveview() | |
endif | |
call cursor(c_lnum, c_col - before) | |
endif | |
" Build an expression that detects whether the current cursor position is in | |
" certain syntax types (string, comment, etc.), for use as searchpairpos()'s | |
" skip argument. | |
" We match "escape" for special items, such as lispEscapeSpecial. | |
let s_skip = '!empty(filter(map(synstack(line("."), col(".")), ''synIDattr(v:val, "name")''), ' . '''v:val =~? "string\\|character\\|singlequote\\|escape\\|comment"''))' | |
" If executing the expression determines that the cursor is currently in | |
" one of the syntax types, then we want searchpairpos() to find the pair | |
" within those syntax types (i.e., not skip). Otherwise, the cursor is | |
" outside of the syntax types and s_skip should keep its value so we skip any | |
" matching pair inside the syntax types. | |
execute 'if' s_skip '| let s_skip = 0 | endif' | |
" Limit the search to lines visible in the window. | |
let stoplinebottom = line('w$') | |
let stoplinetop = line('w0') | |
if i % 2 == 0 | |
let stopline = stoplinebottom | |
else | |
let stopline = stoplinetop | |
endif | |
" Limit the search time to 300 msec to avoid a hang on very long lines. | |
" This fails when a timeout is not supported. | |
if mode() == 'i' || mode() == 'R' | |
let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
else | |
let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
endif | |
try | |
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
catch /E118/ | |
" Can't use the timeout, restrict the stopline a bit more to avoid taking | |
" a long time on closed folds and long lines. | |
" The "viewable" variables give a range in which we can scroll while | |
" keeping the cursor at the same position. | |
" adjustedScrolloff accounts for very large numbers of scrolloff. | |
let adjustedScrolloff = min([&scrolloff, (line('w$') - line('w0')) / 2]) | |
let bottom_viewable = min([line('$'), c_lnum + &lines - adjustedScrolloff - 2]) | |
let top_viewable = max([1, c_lnum-&lines+adjustedScrolloff + 2]) | |
" one of these stoplines will be adjusted below, but the current values are | |
" minimal boundaries within the current window | |
if i % 2 == 0 | |
if has("byte_offset") && has("syntax_items") && &smc > 0 | |
let stopbyte = min([line2byte("$"), line2byte(".") + col(".") + &smc * 2]) | |
let stopline = min([bottom_viewable, byte2line(stopbyte)]) | |
else | |
let stopline = min([bottom_viewable, c_lnum + 100]) | |
endif | |
let stoplinebottom = stopline | |
else | |
if has("byte_offset") && has("syntax_items") && &smc > 0 | |
let stopbyte = max([1, line2byte(".") + col(".") - &smc * 2]) | |
let stopline = max([top_viewable, byte2line(stopbyte)]) | |
else | |
let stopline = max([top_viewable, c_lnum - 100]) | |
endif | |
let stoplinetop = stopline | |
endif | |
let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline) | |
endtry | |
if before > 0 | |
if has_getcurpos | |
call setpos('.', save_cursor) | |
else | |
call winrestview(save_cursor) | |
endif | |
endif | |
" If a match is found setup match highlighting. | |
if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
if exists('*matchaddpos') | |
call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
else | |
exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
endif | |
let w:paren_hl_on = 1 | |
endif | |
FUNCTION <SNR>48_set() | |
Called 23 times | |
Total time: 0.000686 | |
Self time: 0.000096 | |
count total (s) self (s) | |
23 0.000681 0.000091 return call('delimitMate#Set', a:000) | |
FUNCTION <SNR>48_setup() | |
Called 1 time | |
Total time: 0.002702 | |
Self time: 0.000053 | |
count total (s) self (s) | |
1 0.000002 let swap = a:0 && a:1 == 2 | |
1 0.000001 let enable = a:0 && a:1 | |
1 0.000002 let disable = a:0 && !a:1 | |
" First, remove all magic, if needed: | |
1 0.000003 if get(b:, 'delimitMate_enabled', 0) | |
call s:Unmap() | |
" Switch | |
if swap | |
echo "delimitMate is disabled." | |
return | |
endif | |
endif | |
1 0.000001 if disable | |
" Just disable the mappings. | |
return | |
endif | |
1 0.000001 if !a:0 | |
" Check if this file type is excluded: | |
1 0.000005 if exists("g:delimitMate_excluded_ft") && index(split(g:delimitMate_excluded_ft, ','), &filetype, 0, 1) >= 0 | |
" Finish here: | |
return 1 | |
endif | |
" Check if user tried to disable using b:loaded_delimitMate | |
1 0.000002 if exists("b:loaded_delimitMate") | |
return 1 | |
endif | |
1 0.000000 endif | |
" Initialize settings: | |
1 0.001567 0.000007 if ! s:init() | |
" Something went wrong. | |
return | |
endif | |
1 0.000003 if enable || swap || !get(g:, 'delimitMate_offByDefault', 0) | |
" Now, add magic: | |
1 0.001095 0.000006 call s:Map() | |
1 0.000000 if a:0 | |
echo "delimitMate is enabled." | |
endif | |
1 0.000001 endif | |
FUNCTION <SNR>4_BMTruncName() | |
Called 1 time | |
Total time: 0.000021 | |
Self time: 0.000021 | |
count total (s) self (s) | |
1 0.000001 let name = a:fname | |
1 0.000001 if g:bmenu_max_pathlen < 5 | |
let name = "" | |
else | |
1 0.000003 let len = strlen(name) | |
1 0.000001 if len > g:bmenu_max_pathlen | |
let amountl = (g:bmenu_max_pathlen / 2) - 2 | |
let amountr = g:bmenu_max_pathlen - amountl - 3 | |
let pattern = '^\(.\{,' . amountl . '}\).\{-}\(.\{,' . amountr . '}\)$' | |
let left = substitute(name, pattern, '\1', '') | |
let right = substitute(name, pattern, '\2', '') | |
if strlen(left) + strlen(right) < len | |
let name = left . '...' . right | |
endif | |
endif | |
1 0.000000 endif | |
1 0.000001 return name | |
FUNCTION <SNR>39_BufWinEnterHandler() | |
Called 1 time | |
Total time: 0.000007 | |
Self time: 0.000007 | |
count total (s) self (s) | |
1 0.000001 if s:NewTabCreated | |
" Turn off the 'NewTabCreated' flag | |
let s:NewTabCreated = 0 | |
" Restore focus to NERDTree if necessary | |
if !g:nerdtree_tabs_focus_on_files | |
call s:NERDTreeRestoreFocus() | |
endif | |
endif | |
FUNCTION <SNR>39_SaveNERDTreeViewIfPossible() | |
Called 224 times | |
Total time: 0.004053 | |
Self time: 0.004053 | |
count total (s) self (s) | |
224 0.001405 if exists("t:NERDTreeBufName") && bufwinnr(t:NERDTreeBufName) == winnr() | |
" save scroll and cursor etc. | |
let s:nerdtree_view = winsaveview() | |
" save NERDTree window width | |
let s:nerdtree_width = winwidth(winnr()) | |
" save buffer name (to be able to correct desync by commands spawning | |
" a new NERDTree instance) | |
let s:nerdtree_buffer = bufname("%") | |
endif | |
FUNCTION <SNR>49_is_space_expansion() | |
Called 16 times | |
Total time: 0.002193 | |
Self time: 0.000637 | |
count total (s) self (s) | |
16 0.000031 if col('.') > 2 | |
14 0.000392 0.000056 let pchar = s:get_char(-2) | |
14 0.000270 0.000050 let nchar = s:get_char(1) | |
14 0.000621 0.000116 let isSpaces = (s:get_char(-1) == s:get_char(0) && s:get_char(-1) == " ") | |
14 0.000402 0.000135 if index(s:get('left_delims'), pchar) > -1 && index(s:get('left_delims'), pchar) == index(s:get('right_delims'), nchar) && isSpaces | |
return 1 | |
elseif index(s:get('quotes_list'), pchar) > -1 && index(s:get('quotes_list'), pchar) == index(s:get('quotes_list'), nchar) && isSpaces | |
return 1 | |
endif | |
14 0.000009 endif | |
16 0.000015 return 0 | |
FUNCTION delimitMate#Get() | |
Called 32 times | |
Total time: 0.000599 | |
Self time: 0.000111 | |
count total (s) self (s) | |
32 0.000590 0.000102 return call('s:get', a:000) | |
FUNCTION <SNR>63_LeadingSpaceDisable() | |
Called 1 time | |
Total time: 0.000014 | |
Self time: 0.000014 | |
count total (s) self (s) | |
1 0.000001 if g:indentLine_newVersion | |
1 0.000004 if exists("w:indentLine_leadingSpaceId") && ! empty(w:indentLine_leadingSpaceId) | |
for id in w:indentLine_leadingSpaceId | |
try | |
call matchdelete(id) | |
catch /^Vim\%((\a\+)\)\=:E80[23]/ | |
endtry | |
endfor | |
let w:indentLine_leadingSpaceId = [] | |
endif | |
1 0.000001 return | |
endif | |
let b:indentLine_leadingSpaceEnabled = 0 | |
try | |
syntax clear IndentLineLeadingSpace | |
catch /^Vim\%((\a\+)\)\=:E28/ " catch error E28 | |
endtry | |
FUNCTION <SNR>71_OnFileReadyToParse() | |
Called 6 times | |
Total time: 0.006632 | |
Self time: 0.006174 | |
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. | |
6 0.000017 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. | |
6 0.000495 0.000037 if force_parsing || s:Pyeval( "ycm_state.NeedsReparse()" ) | |
4 0.005938 exec s:python_command "ycm_state.OnFileReadyToParse()" | |
4 0.000044 call timer_stop( s:pollers.file_parse_response.id ) | |
4 0.000072 let s:pollers.file_parse_response.id = timer_start( s:pollers.file_parse_response.wait_milliseconds, function( 's:PollFileParseResponse' ) ) | |
4 0.000006 endif | |
FUNCTION <SNR>71_InsideCommentOrString() | |
Called 22 times | |
Total time: 0.002154 | |
Self time: 0.002154 | |
count total (s) self (s) | |
" Has to be col('.') -1 because col('.') doesn't exist at this point. We are | |
" in insert mode when this func is called. | |
22 0.001870 let syntax_group = synIDattr( synIDtrans( synID( line( '.' ), col( '.' ) - 1, 1 ) ), 'name') | |
22 0.000073 if stridx(syntax_group, 'Comment') > -1 | |
return 1 | |
endif | |
22 0.000050 if stridx(syntax_group, 'String') > -1 | |
return 2 | |
endif | |
22 0.000014 return 0 | |
FUNCTION <SNR>48_get() | |
Called 32 times | |
Total time: 0.000717 | |
Self time: 0.000118 | |
count total (s) self (s) | |
32 0.000707 0.000108 return call('delimitMate#Get', a:000) | |
FUNCTION <SNR>39_WinLeaveHandler() | |
Called 224 times | |
Total time: 0.008192 | |
Self time: 0.004139 | |
count total (s) self (s) | |
224 0.000959 if s:disable_handlers_for_tabdo | |
return | |
endif | |
224 0.000448 if g:nerdtree_tabs_synchronize_view | |
224 0.005472 0.001419 call s:SaveNERDTreeViewIfPossible() | |
224 0.000163 endif | |
FUNCTION <SNR>49_is_cr_expansion() | |
Called 16 times | |
Total time: 0.001304 | |
Self time: 0.000599 | |
count total (s) self (s) | |
16 0.000075 let nchar = getline(line('.')-1)[-1:] | |
16 0.000124 let schar = matchstr(getline(line('.')+1), '^\s*\zs\S') | |
16 0.000068 let isEmpty = a:0 ? getline('.') =~ '^\s*$' : empty(getline('.')) | |
16 0.000400 0.000139 if index(s:get('left_delims'), nchar) > -1 && index(s:get('left_delims'), nchar) == index(s:get('right_delims'), schar) && isEmpty | |
return 1 | |
elseif index(s:get('quotes_list'), nchar) > -1 && index(s:get('quotes_list'), nchar) == index(s:get('quotes_list'), schar) && isEmpty | |
return 1 | |
else | |
16 0.000011 return 0 | |
endif | |
FUNCTION <SNR>71_InsideCommentOrStringAndShouldStop() | |
Called 22 times | |
Total time: 0.002505 | |
Self time: 0.000351 | |
count total (s) self (s) | |
22 0.002279 0.000125 let retval = s:InsideCommentOrString() | |
22 0.000039 let inside_comment = retval == 1 | |
22 0.000031 let inside_string = retval == 2 | |
22 0.000060 if inside_comment && g:ycm_complete_in_comments || inside_string && g:ycm_complete_in_strings | |
return 0 | |
endif | |
22 0.000019 return retval | |
FUNCTION <SNR>42_CreateDelimMapFromCms() | |
Called 112 times | |
Total time: 0.005339 | |
Self time: 0.005339 | |
count total (s) self (s) | |
112 0.000887 if &ft == '' && exists('g:NERDDefaultDelims') | |
let delims = g:NERDDefaultDelims | |
for i in ['left', 'leftAlt', 'right', 'rightAlt'] | |
if !has_key(delims, i) | |
let delims[i] = '' | |
endif | |
endfor | |
return delims | |
endif | |
112 0.003283 return { 'left': substitute(&commentstring, '\([^ \t]*\)\s*%s.*', '\1', ''), 'right': substitute(&commentstring, '.*%s\s*\(.*\)', '\1', 'g'), 'nested': 0, 'leftAlt': '', 'rightAlt': '', 'nestedAlt': 0} | |
FUNCTION <SNR>71_OnCursorMovedNormalMode() | |
Called 38 times | |
Total time: 0.007035 | |
Self time: 0.004596 | |
count total (s) self (s) | |
38 0.002653 0.000214 if !s:AllowedToCompleteInCurrentBuffer() | |
return | |
endif | |
38 0.004263 exec s:python_command "ycm_state.OnCursorMoved()" | |
FUNCTION delimitMate#IsEmptyPair() | |
Called 14 times | |
Total time: 0.000132 | |
Self time: 0.000132 | |
count total (s) self (s) | |
14 0.000111 if strlen(substitute(a:str, ".", "x", "g")) != 2 | |
14 0.000012 return 0 | |
endif | |
let idx = index(s:get('left_delims'), matchstr(a:str, '^.')) | |
if idx > -1 && s:get('right_delims')[idx] == matchstr(a:str, '.$') | |
return 1 | |
endif | |
let idx = index(s:get('quotes_list'), matchstr(a:str, '^.')) | |
if idx > -1 && s:get('quotes_list')[idx] == matchstr(a:str, '.$') | |
return 1 | |
endif | |
return 0 | |
FUNCTION <SNR>48_AutoClose() | |
Called 1 time | |
Total time: 0.000772 | |
Self time: 0.000360 | |
count total (s) self (s) | |
" Add matching pair and jump to the midle: | |
" inoremap <silent> <buffer> ( ()<Left> | |
1 0.000001 let i = 0 | |
4 0.000122 0.000026 while i < len(s:get('matchpairs_list')) | |
3 0.000150 0.000024 let ld = s:get('left_delims')[i] == '|' ? '<bar>' : s:get('left_delims')[i] | |
3 0.000145 0.000022 let rd = s:get('right_delims')[i] == '|' ? '<bar>' : s:get('right_delims')[i] | |
3 0.000058 exec 'inoremap <expr><silent> <Plug>delimitMate' . ld. ' <SID>TriggerAbb().delimitMate#ParenDelim("' . escape(rd, '|') . '")' | |
3 0.000028 exec 'silent! imap <unique> <buffer> '.ld.' <Plug>delimitMate'.ld | |
3 0.000004 let i += 1 | |
3 0.000002 endwhile | |
" Exit from inside the matching pair: | |
4 0.000027 0.000006 for delim in s:get('right_delims') | |
3 0.000005 let delim = delim == '|' ? '<bar>' : delim | |
3 0.000036 exec 'inoremap <expr><silent> <Plug>delimitMate' . delim. ' <SID>TriggerAbb().delimitMate#JumpOut("\' . delim . '")' | |
3 0.000027 exec 'silent! imap <unique> <buffer> ' . delim. ' <Plug>delimitMate'. delim | |
3 0.000003 endfor | |
" Add matching quote and jump to the midle, or exit if inside a pair of matching quotes: | |
" inoremap <silent> <buffer> " <C-R>=delimitMate#QuoteDelim("\"")<CR> | |
4 0.000029 0.000006 for delim in s:get('quotes_list') | |
3 0.000005 if delim == '|' | |
let delim = '<Bar>' | |
endif | |
3 0.000039 exec 'inoremap <expr><silent> <Plug>delimitMate' . delim. ' <SID>TriggerAbb()."<C-R>=delimitMate#QuoteDelim(\"\\\' . delim . '\")<CR>"' | |
3 0.000025 exec 'silent! imap <unique> <buffer> ' . delim. ' <Plug>delimitMate' . delim | |
3 0.000001 endfor | |
" Try to fix the use of apostrophes (kept for backward compatibility): | |
" inoremap <silent> <buffer> n't n't | |
1 0.000026 0.000003 for map in s:get('apostrophes_list') | |
exec "inoremap <silent> " . map . " " . map | |
exec 'silent! imap <unique> <buffer> ' . map . ' <Plug>delimitMate' . map | |
endfor | |
FUNCTION <SNR>63_IndentLinesEnable() | |
Called 225 times | |
Total time: 0.267420 | |
Self time: 0.264586 | |
count total (s) self (s) | |
225 0.000333 if g:indentLine_newVersion | |
225 0.000293 if &diff | |
return | |
endif | |
225 0.000788 if exists("b:indentLine_enabled") && b:indentLine_enabled == 0 | |
return | |
endif | |
225 0.000680 if !exists("w:indentLine_indentLineId") | |
1 0.000003 let w:indentLine_indentLineId = [] | |
1 0.000001 endif | |
225 0.003743 0.000909 call s:SetConcealOption() | |
225 0.000316 if g:indentLine_showFirstIndentLevel | |
call add(w:indentLine_indentLineId, matchadd('Conceal', '^ ', 0, -1, {'conceal': g:indentLine_first_char})) | |
endif | |
225 0.001235 let space = &l:shiftwidth == 0 ? &l:tabstop : &l:shiftwidth | |
4725 0.006958 for i in range(space+1, space * g:indentLine_indentLevel + 1, space) | |
4500 0.241995 call add(w:indentLine_indentLineId, matchadd('Conceal', '^\s\+\zs\%'.i.'v ', 0, -1, {'conceal': g:indentLine_char})) | |
4500 0.004528 endfor | |
225 0.000261 return | |
endif | |
if exists("b:indentLine_enabled") && b:indentLine_enabled | |
return | |
else | |
let b:indentLine_enabled = 1 | |
endif | |
call s:SetConcealOption() | |
let g:mysyntaxfile = g:indentLine_mysyntaxfile | |
let space = &l:shiftwidth == 0 ? &l:tabstop : &l:shiftwidth | |
if g:indentLine_showFirstIndentLevel | |
execute 'syntax match IndentLine /^ / containedin=ALL conceal cchar=' . g:indentLine_first_char | |
endif | |
if g:indentLine_faster | |
execute 'syntax match IndentLineSpace /^\s\+/ containedin=ALL contains=IndentLine' | |
execute 'syntax match IndentLine / \{'.(space-1).'}\zs / contained conceal cchar=' . g:indentLine_char | |
execute 'syntax match IndentLine /\t\zs / contained conceal cchar=' . g:indentLine_char | |
else | |
let pattern = line('$') < g:indentLine_maxLines ? 'v' : 'c' | |
for i in range(space+1, space * g:indentLine_indentLevel + 1, space) | |
execute 'syntax match IndentLine /\%(^\s\+\)\@<=\%'.i.pattern.' / containedin=ALL conceal cchar=' . g:indentLine_char | |
endfor | |
endif | |
FUNCTION nerdtree#checkForBrowse() | |
Called 224 times | |
Total time: 0.003780 | |
Self time: 0.003780 | |
count total (s) self (s) | |
224 0.003333 if !isdirectory(a:dir) | |
224 0.000209 return | |
endif | |
if s:reuseWin(a:dir) | |
return | |
endif | |
call g:NERDTreeCreator.CreateWindowTree(a:dir) | |
FUNCTION <SNR>48_Map() | |
Called 1 time | |
Total time: 0.001089 | |
Self time: 0.000083 | |
count total (s) self (s) | |
" Set mappings: | |
1 0.000001 try | |
1 0.000002 let save_keymap = &keymap | |
1 0.000001 let save_iminsert = &iminsert | |
1 0.000002 let save_imsearch = &imsearch | |
1 0.000004 let save_cpo = &cpo | |
1 0.000012 set keymap= | |
1 0.000006 set cpo&vim | |
1 0.000007 silent! doautocmd <nomodeline> User delimitMate_map | |
1 0.000029 0.000004 if s:get('autoclose') | |
1 0.000778 0.000006 call s:AutoClose() | |
1 0.000001 else | |
call s:NoAutoClose() | |
endif | |
1 0.000217 0.000008 call s:ExtraMappings() | |
1 0.000001 finally | |
1 0.000007 let &cpo = save_cpo | |
1 0.000004 let &keymap = save_keymap | |
1 0.000005 let &iminsert = save_iminsert | |
1 0.000003 let &imsearch = save_imsearch | |
1 0.000001 endtry | |
1 0.000002 let b:delimitMate_enabled = 1 | |
FUNCTION <SNR>71_AllowedToCompleteInBuffer() | |
Called 178 times | |
Total time: 0.004879 | |
Self time: 0.004480 | |
count total (s) self (s) | |
178 0.001117 let buffer_filetype = getbufvar( a:buffer, '&filetype' ) | |
178 0.000965 if empty( buffer_filetype ) || getbufvar( a:buffer, '&buftype' ) ==# 'nofile' || buffer_filetype ==# 'qf' | |
112 0.000110 return 0 | |
endif | |
66 0.000745 0.000346 if s:DisableOnLargeFile( a:buffer ) | |
return 0 | |
endif | |
66 0.000382 let whitelist_allows = has_key( g:ycm_filetype_whitelist, '*' ) || has_key( g:ycm_filetype_whitelist, buffer_filetype ) | |
66 0.000254 let blacklist_allows = !has_key( g:ycm_filetype_blacklist, buffer_filetype ) | |
66 0.000139 let allowed = whitelist_allows && blacklist_allows | |
66 0.000064 if allowed | |
66 0.000263 let s:previous_allowed_buffer_number = bufnr( a:buffer ) | |
66 0.000061 endif | |
66 0.000071 return allowed | |
FUNCTION <SNR>48_ExtraMappings() | |
Called 1 time | |
Total time: 0.000209 | |
Self time: 0.000145 | |
count total (s) self (s) | |
" If pair is empty, delete both delimiters: | |
1 0.000008 inoremap <silent> <Plug>delimitMateBS <C-R>=delimitMate#BS()<CR> | |
1 0.000008 if !hasmapto('<Plug>delimitMateBS','i') | |
1 0.000007 if empty(maparg('<BS>', 'i')) | |
silent! imap <unique> <buffer> <BS> <Plug>delimitMateBS | |
endif | |
1 0.000006 if empty(maparg('<C-H>', 'i')) | |
silent! imap <unique> <buffer> <C-h> <Plug>delimitMateBS | |
endif | |
1 0.000000 endif | |
" If pair is empty, delete closing delimiter: | |
1 0.000008 inoremap <silent> <expr> <Plug>delimitMateS-BS delimitMate#WithinEmptyPair() ? "\<Del>" : "\<S-BS>" | |
1 0.000012 if !hasmapto('<Plug>delimitMateS-BS','i') && maparg('<S-BS>', 'i') == '' | |
1 0.000006 silent! imap <unique> <buffer> <S-BS> <Plug>delimitMateS-BS | |
1 0.000000 endif | |
" Expand return if inside an empty pair: | |
1 0.000008 inoremap <expr><silent> <Plug>delimitMateCR <SID>TriggerAbb()."\<C-R>=delimitMate#ExpandReturn()\<CR>" | |
1 0.000028 0.000005 if s:get('expand_cr') && !hasmapto('<Plug>delimitMateCR', 'i') && maparg('<CR>', 'i') == '' | |
silent! imap <unique> <buffer> <CR> <Plug>delimitMateCR | |
endif | |
" Expand space if inside an empty pair: | |
1 0.000009 inoremap <expr><silent> <Plug>delimitMateSpace <SID>TriggerAbb()."\<C-R>=delimitMate#ExpandSpace()\<CR>" | |
1 0.000025 0.000004 if s:get('expand_space') && !hasmapto('<Plug>delimitMateSpace', 'i') && maparg('<Space>', 'i') == '' | |
silent! imap <unique> <buffer> <Space> <Plug>delimitMateSpace | |
endif | |
" Jump over any delimiter: | |
1 0.000007 inoremap <expr><silent> <Plug>delimitMateS-Tab <SID>TriggerAbb()."\<C-R>=delimitMate#JumpAny()\<CR>" | |
1 0.000035 0.000015 if s:get('tab2exit') && !hasmapto('<Plug>delimitMateS-Tab', 'i') && maparg('<S-Tab>', 'i') == '' | |
silent! imap <unique> <buffer> <S-Tab> <Plug>delimitMateS-Tab | |
endif | |
" Jump over next delimiters | |
1 0.000008 inoremap <expr><buffer> <Plug>delimitMateJumpMany <SID>TriggerAbb()."\<C-R>=delimitMate#JumpMany()\<CR>" | |
1 0.000011 if !hasmapto('<Plug>delimitMateJumpMany', 'i') && maparg("<C-G>g", 'i') == '' | |
1 0.000006 imap <silent> <buffer> <C-G>g <Plug>delimitMateJumpMany | |
1 0.000001 endif | |
FUNCTION <SNR>49_get_char() | |
Called 84 times | |
Total time: 0.001681 | |
Self time: 0.001681 | |
count total (s) self (s) | |
84 0.000194 let idx = col('.') - 1 | |
84 0.000123 if !a:0 || (a:0 && a:1 >= 0) | |
" Get char from cursor. | |
42 0.000115 let line = getline('.')[idx :] | |
42 0.000057 let pos = a:0 ? a:1 : 0 | |
42 0.000256 return matchstr(line, '^'.repeat('.', pos).'\zs.') | |
endif | |
" Get char behind cursor. | |
42 0.000137 let line = getline('.')[: idx - 1] | |
42 0.000076 let pos = 0 - (1 + a:1) | |
42 0.000361 return matchstr(line, '.\ze'.repeat('.', pos).'$') | |
FUNCTION <SNR>71_OnInsertChar() | |
Called 13 times | |
Total time: 0.000258 | |
Self time: 0.000208 | |
count total (s) self (s) | |
13 0.000085 call timer_stop( s:pollers.completion.id ) | |
13 0.000039 if pumvisible() | |
6 0.000090 0.000040 call s:SendKeys( "\<C-e>" ) | |
6 0.000006 endif | |
FUNCTION <SNR>71_PollFileParseResponse() | |
Called 4 times | |
Total time: 0.470125 | |
Self time: 0.469526 | |
count total (s) self (s) | |
4 0.000666 0.000067 if !s:Pyeval( "ycm_state.FileParseRequestReady()" ) | |
let s:pollers.file_parse_response.id = timer_start( s:pollers.file_parse_response.wait_milliseconds, function( 's:PollFileParseResponse' ) ) | |
return | |
endif | |
4 0.469399 exec s:python_command "ycm_state.HandleFileParseRequest()" | |
FUNCTION <SNR>39_WinEnterHandler() | |
Called 224 times | |
Total time: 0.004265 | |
Self time: 0.002577 | |
count total (s) self (s) | |
224 0.000420 if s:disable_handlers_for_tabdo | |
return | |
endif | |
224 0.000320 if g:nerdtree_tabs_autoclose | |
224 0.002683 0.000995 call s:CloseIfOnlyNerdTreeLeft() | |
224 0.000137 endif | |
FUNCTION <SNR>49_set() | |
Called 23 times | |
Total time: 0.000488 | |
Self time: 0.000488 | |
count total (s) self (s) | |
23 0.000029 let scope = a:0 ? a:1 : 's' | |
23 0.000047 let bufnr = bufnr('%') | |
23 0.000062 if !exists('s:options[bufnr]') | |
1 0.000003 let s:options[bufnr] = {} | |
1 0.000000 endif | |
23 0.000025 if scope == 's' | |
23 0.000062 let name = 's:options.' . bufnr . '.' . a:name | |
23 0.000015 else | |
let name = scope . ':delimitMate_' . a:name | |
if exists('name') | |
exec 'unlet! ' . name | |
endif | |
endif | |
23 0.000100 exec 'let ' . name . ' = a:value' | |
FUNCTION <SNR>48_option_init() | |
Called 23 times | |
Total time: 0.001055 | |
Self time: 0.000369 | |
count total (s) self (s) | |
23 0.000072 let b = exists("b:delimitMate_" . a:name) | |
23 0.000059 let g = exists("g:delimitMate_" . a:name) | |
" Find value to use. | |
23 0.000020 if !b && !g | |
23 0.000025 let value = a:default | |
23 0.000017 elseif b | |
exec "let value = b:delimitMate_" . a:name | |
else | |
exec "let value = g:delimitMate_" . a:name | |
endif | |
23 0.000764 0.000078 call s:set(a:name, value) | |
FUNCTION <SNR>71_VisitedBufferRequiresReparse() | |
Called 224 times | |
Total time: 0.003997 | |
Self time: 0.001983 | |
count total (s) self (s) | |
224 0.000965 if bufnr( '%' ) ==# s:previous_allowed_buffer_number | |
112 0.000121 return 0 | |
endif | |
112 0.002524 0.000510 return s:AllowedToCompleteInCurrentBuffer() | |
FUNCTION <SNR>71_InvokeCompletion() | |
Called 16 times | |
Total time: 0.033866 | |
Self time: 0.025613 | |
count total (s) self (s) | |
16 0.025289 exec s:python_command "ycm_state.SendCompletionRequest(" . "vimsupport.GetBoolValue( 's:force_semantic' ) )" | |
16 0.008528 0.000275 call s:PollCompletion() | |
FUNCTION <SNR>63_Filter() | |
Called 450 times | |
Total time: 0.011341 | |
Self time: 0.011341 | |
count total (s) self (s) | |
450 0.001826 if index(g:indentLine_fileTypeExclude, &filetype) != -1 | |
return 0 | |
endif | |
450 0.002489 if len(g:indentLine_fileType) != 0 && index(g:indentLine_fileType, &filetype) == -1 | |
return 0 | |
endif | |
450 0.001088 for name in g:indentLine_bufNameExclude | |
if matchstr(bufname(''), name) == bufname('') | |
return 0 | |
endif | |
endfor | |
450 0.000398 return 1 | |
FUNCTION <SNR>71_ClosePreviewWindowIfNeeded() | |
Called 3 times | |
Total time: 0.002336 | |
Self time: 0.002336 | |
count total (s) self (s) | |
3 0.000024 let current_buffer_name = bufname('') | |
" We don't want to try to close the preview window in special buffers like | |
" "[Command Line]"; if we do, Vim goes bonkers. Special buffers always start | |
" with '['. | |
3 0.000020 if current_buffer_name[ 0 ] == '[' | |
return | |
endif | |
" This command does the actual closing of the preview window. If no preview | |
" window is shown, nothing happens. | |
3 0.002263 pclose | |
FUNCTION <SNR>71_OnTextChangedInsertMode() | |
Called 22 times | |
Total time: 0.062519 | |
Self time: 0.006883 | |
count total (s) self (s) | |
22 0.001252 0.000109 if !s:AllowedToCompleteInCurrentBuffer() | |
return | |
endif | |
22 0.000026 if s:completion_stopped | |
let s:completion_stopped = 0 | |
let s:completion = s:default_completion | |
return | |
endif | |
22 0.012798 0.000127 call s:IdentifierFinishedOperations() | |
" We have to make sure we correctly leave semantic mode even when the user | |
" inserts something like a "operator[]" candidate string which fails | |
" CurrentIdentifierFinished check. | |
22 0.000096 if s:force_semantic && !s:Pyeval( 'base.LastEnteredCharIsIdentifierChar()' ) | |
let s:force_semantic = 0 | |
endif | |
22 0.008080 0.000389 if &completefunc == "youcompleteme#CompleteFunc" && ( g:ycm_auto_trigger || s:force_semantic ) && !s:InsideCommentOrStringAndShouldStop() && !s:OnBlankLine() | |
" Immediately call previous completion to avoid flickers. | |
16 0.000353 0.000088 call s:Complete() | |
16 0.033953 0.000087 call s:InvokeCompletion() | |
16 0.000022 endif | |
22 0.005318 exec s:python_command "ycm_state.OnCursorMoved()" | |
22 0.000095 if g:ycm_autoclose_preview_window_after_completion | |
call s:ClosePreviewWindowIfNeeded() | |
endif | |
FUNCTION <SNR>39_CloseIfOnlyNerdTreeLeft() | |
Called 224 times | |
Total time: 0.001688 | |
Self time: 0.001688 | |
count total (s) self (s) | |
224 0.001211 if exists("t:NERDTreeBufName") && bufwinnr(t:NERDTreeBufName) != -1 && winnr("$") == 1 | |
q | |
endif | |
FUNCTION <SNR>63_IndentLinesDisable() | |
Called 1 time | |
Total time: 0.000118 | |
Self time: 0.000118 | |
count total (s) self (s) | |
1 0.000002 if g:indentLine_newVersion | |
1 0.000004 if exists("w:indentLine_indentLineId") && ! empty(w:indentLine_indentLineId) | |
21 0.000014 for id in w:indentLine_indentLineId | |
20 0.000009 try | |
20 0.000036 call matchdelete(id) | |
20 0.000016 catch /^Vim\%((\a\+)\)\=:E80[23]/ | |
endtry | |
20 0.000011 endfor | |
1 0.000004 let w:indentLine_indentLineId = [] | |
1 0.000001 endif | |
1 0.000001 return | |
endif | |
let b:indentLine_enabled = 0 | |
try | |
syntax clear IndentLine | |
syntax clear IndentLineSpace | |
catch /^Vim\%((\a\+)\)\=:E28/ " catch error E28 | |
endtry | |
FUNCTION <SNR>49_is_forbidden() | |
Called 16 times | |
Total time: 0.002836 | |
Self time: 0.000502 | |
count total (s) self (s) | |
16 0.000231 0.000123 if s:is_excluded_ft(&filetype) | |
return 1 | |
endif | |
16 0.000486 0.000079 if !s:get('excluded_regions_enabled') | |
return 0 | |
endif | |
16 0.001571 0.000080 let region = s:get_syn_name() | |
16 0.000430 0.000102 return index(s:get('excluded_regions_list'), region) >= 0 | |
FUNCTION <SNR>49_get() | |
Called 124 times | |
Total time: 0.002423 | |
Self time: 0.002423 | |
count total (s) self (s) | |
124 0.000128 if a:0 == 2 | |
return deepcopy(get(a:2, 'delimitMate_' . a:name, a:1)) | |
elseif a:0 == 1 | |
let bufoptions = get(s:options, bufnr('%'), {}) | |
return deepcopy(get(bufoptions, a:name, a:1)) | |
else | |
124 0.000909 return deepcopy(eval('s:options.' . bufnr('%') . '.' . a:name)) | |
endif | |
FUNCTION delimitMate#WithinEmptyPair() | |
Called 16 times | |
Total time: 0.001036 | |
Self time: 0.000284 | |
count total (s) self (s) | |
" if cursor is at column 1 return 0 | |
16 0.000033 if col('.') == 1 | |
2 0.000002 return 0 | |
endif | |
" get char before the cursor. | |
14 0.000471 0.000070 let char1 = s:get_char(-1) | |
" get char under the cursor. | |
14 0.000275 0.000056 let char2 = s:get_char(0) | |
14 0.000198 0.000066 return delimitMate#IsEmptyPair( char1.char2 ) | |
FUNCTION <SNR>71_OnInsertLeave() | |
Called 3 times | |
Total time: 0.015243 | |
Self time: 0.007680 | |
count total (s) self (s) | |
3 0.000185 0.000016 if !s:AllowedToCompleteInCurrentBuffer() | |
return | |
endif | |
3 0.000011 call timer_stop( s:pollers.completion.id ) | |
3 0.000003 let s:force_semantic = 0 | |
3 0.000009 let s:completion = s:default_completion | |
3 0.005083 0.000025 call s:OnFileReadyToParse() | |
3 0.007493 exec s:python_command "ycm_state.OnInsertLeave()" | |
3 0.000032 if g:ycm_autoclose_preview_window_after_completion || g:ycm_autoclose_preview_window_after_insertion | |
3 0.002401 0.000065 call s:ClosePreviewWindowIfNeeded() | |
3 0.000008 endif | |
FUNCTION <SNR>71_OnTextChangedNormalMode() | |
Called 3 times | |
Total time: 0.001814 | |
Self time: 0.000044 | |
count total (s) self (s) | |
3 0.000213 0.000017 if !s:AllowedToCompleteInCurrentBuffer() | |
return | |
endif | |
3 0.001593 0.000019 call s:OnFileReadyToParse() | |
FUNCTION <SNR>63_SetConcealOption() | |
Called 225 times | |
Total time: 0.002834 | |
Self time: 0.002834 | |
count total (s) self (s) | |
225 0.000306 if !g:indentLine_setConceal | |
return | |
endif | |
225 0.000656 if !exists("b:indentLine_ConcealOptionSet") | |
1 0.000002 let b:indentLine_ConcealOptionSet = 1 | |
1 0.000006 let &l:concealcursor = exists("g:indentLine_concealcursor") ? g:indentLine_concealcursor : "inc" | |
1 0.000005 let &l:conceallevel = exists("g:indentLine_conceallevel") ? g:indentLine_conceallevel : "2" | |
1 0.000000 endif | |
FUNCTION <SNR>42_SetUpForNewFiletype() | |
Called 224 times | |
Total time: 0.023150 | |
Self time: 0.017811 | |
count total (s) self (s) | |
224 0.000516 let ft = a:filetype | |
"for compound filetypes, if we don't know how to handle the full filetype | |
"then break it down and use the first part that we know how to handle | |
224 0.001184 if ft =~ '\.' && !has_key(s:delimiterMap, ft) | |
let filetypes = split(a:filetype, '\.') | |
for i in filetypes | |
if has_key(s:delimiterMap, i) | |
let ft = i | |
break | |
endif | |
endfor | |
endif | |
224 0.000468 let b:NERDSexyComMarker = '' | |
224 0.000726 if has_key(s:delimiterMap, ft) | |
112 0.000325 let b:NERDCommenterDelims = s:delimiterMap[ft] | |
560 0.000881 for i in ['left', 'leftAlt', 'right', 'rightAlt'] | |
448 0.001030 if !has_key(b:NERDCommenterDelims, i) | |
let b:NERDCommenterDelims[i] = '' | |
endif | |
448 0.000279 endfor | |
336 0.000479 for i in ['nested', 'nestedAlt'] | |
224 0.000515 if !has_key(b:NERDCommenterDelims, i) | |
let b:NERDCommenterDelims[i] = 0 | |
endif | |
224 0.000142 endfor | |
" if g:NERD_<filetype>_alt_style is defined, use the alternate style | |
112 0.000497 let b:NERDCommenterFirstInit = getbufvar(1,"NERDCommenterFirstInit") | |
112 0.000545 if exists('g:NERDAltDelims_'.ft) && eval('g:NERDAltDelims_'.ft) && !b:NERDCommenterFirstInit | |
call s:SwitchToAlternativeDelimiters(0) | |
let b:NERDCommenterFirstInit = 1 | |
endif | |
112 0.000089 else | |
112 0.006140 0.000801 let b:NERDCommenterDelims = s:CreateDelimMapFromCms() | |
112 0.000105 endif | |
FUNCTION <SNR>4_BMMunge() | |
Called 1 time | |
Total time: 0.000067 | |
Self time: 0.000046 | |
count total (s) self (s) | |
1 0.000001 let name = a:fname | |
1 0.000001 if name == '' | |
1 0.000002 if !exists("g:menutrans_no_file") | |
1 0.000002 let g:menutrans_no_file = "[No file]" | |
1 0.000001 endif | |
1 0.000001 let name = g:menutrans_no_file | |
1 0.000001 else | |
let name = fnamemodify(name, ':p:~') | |
endif | |
" detach file name and separate it out: | |
1 0.000003 let name2 = fnamemodify(name, ':t') | |
1 0.000001 if a:bnum >= 0 | |
1 0.000003 let name2 = name2 . ' (' . a:bnum . ')' | |
1 0.000001 endif | |
1 0.000031 0.000010 let name = name2 . "\t" . <SID>BMTruncName(fnamemodify(name,':h')) | |
1 0.000003 let name = escape(name, "\\. \t|") | |
1 0.000005 let name = substitute(name, "&", "&&", "g") | |
1 0.000004 let name = substitute(name, "\n", "^@", "g") | |
1 0.000001 return name | |
FUNCTION <SNR>4_BMHash() | |
Called 1 time | |
Total time: 0.000035 | |
Self time: 0.000035 | |
count total (s) self (s) | |
" Make name all upper case, so that chars are between 32 and 96 | |
1 0.000009 let nm = substitute(a:name, ".*", '\U\0', "") | |
1 0.000004 if has("ebcdic") | |
" HACK: Replace all non alphabetics with 'Z' | |
" Just to make it work for now. | |
let nm = substitute(nm, "[^A-Z]", 'Z', "g") | |
let sp = char2nr('A') - 1 | |
else | |
1 0.000002 let sp = char2nr(' ') | |
1 0.000001 endif | |
" convert first six chars into a number for sorting: | |
1 0.000013 return (char2nr(nm[0]) - sp) * 0x800000 + (char2nr(nm[1]) - sp) * 0x20000 + (char2nr(nm[2]) - sp) * 0x1000 + (char2nr(nm[3]) - sp) * 0x80 + (char2nr(nm[4]) - sp) * 0x20 + (char2nr(nm[5]) - sp) | |
FUNCTION <SNR>49_get_syn_name() | |
Called 16 times | |
Total time: 0.001491 | |
Self time: 0.001491 | |
count total (s) self (s) | |
16 0.000054 let col = col('.') | |
16 0.000034 if col == col('$') | |
16 0.000027 let col = col - 1 | |
16 0.000012 endif | |
16 0.001351 return synIDattr(synIDtrans(synID(line('.'), col, 1)), 'name') | |
FUNCTION <SNR>4_BMAdd() | |
Called 1 time | |
Total time: 0.000238 | |
Self time: 0.000025 | |
count total (s) self (s) | |
1 0.000002 if s:bmenu_wait == 0 | |
" when adding too many buffers, redraw in short format | |
1 0.000002 if s:bmenu_count == &menuitems && s:bmenu_short == 0 | |
call s:BMShow() | |
else | |
1 0.000226 0.000013 call <SID>BMFilename(expand("<afile>"), expand("<abuf>")) | |
1 0.000003 let s:bmenu_count = s:bmenu_count + 1 | |
1 0.000000 endif | |
1 0.000000 endif | |
FUNCTION <SNR>63_InitColor() | |
Called 112 times | |
Total time: 0.014895 | |
Self time: 0.014895 | |
count total (s) self (s) | |
112 0.000175 if !g:indentLine_setColors | |
return | |
endif | |
112 0.000330 if !exists("g:indentLine_color_term") | |
if &background ==# "light" | |
let term_color = 249 | |
else | |
let term_color = 239 | |
endif | |
else | |
112 0.000270 let term_color = g:indentLine_color_term | |
112 0.000063 endif | |
112 0.000284 if !exists("g:indentLine_bgcolor_term") | |
112 0.000197 let term_bgcolor = "NONE" | |
112 0.000070 else | |
let term_bgcolor = g:indentLine_bgcolor_term | |
endif | |
112 0.000313 if !exists("g:indentLine_color_gui") | |
if &background ==# "light" | |
let gui_color = "Grey70" | |
else | |
let gui_color = "Grey30" | |
endif | |
else | |
112 0.000200 let gui_color = g:indentLine_color_gui | |
112 0.000064 endif | |
112 0.000288 if !exists("g:indentLine_bgcolor_gui") | |
112 0.000157 let gui_bgcolor = "NONE" | |
112 0.000068 else | |
let gui_bgcolor = g:indentLine_bgcolor_gui | |
endif | |
112 0.003740 execute "highlight Conceal cterm=NONE ctermfg=" . term_color . " ctermbg=" . term_bgcolor | |
112 0.004790 execute "highlight Conceal gui=NONE guifg=" . gui_color . " guibg=" . gui_bgcolor | |
112 0.000320 if &term ==# "linux" | |
if &background ==# "light" | |
let tty_color = exists("g:indentLine_color_tty_light") ? g:indentLine_color_tty_light : 4 | |
else | |
let tty_color = exists("g:indentLine_color_tty_dark") ? g:indentLine_color_tty_dark : 2 | |
endif | |
execute "highlight Conceal cterm=bold ctermfg=" . tty_color . " ctermbg=NONE" | |
endif | |
FUNCTION <SNR>71_PollCompletion() | |
Called 35 times | |
Total time: 0.027488 | |
Self time: 0.001579 | |
count total (s) self (s) | |
35 0.010621 0.000519 if !s:Pyeval( 'ycm_state.CompletionRequestReady()' ) | |
19 0.000410 let s:pollers.completion.id = timer_start( s:pollers.completion.wait_milliseconds, function( 's:PollCompletion' ) ) | |
19 0.000040 return | |
endif | |
16 0.015665 0.000142 let response = s:Pyeval( 'ycm_state.GetCompletionResponse()' ) | |
16 0.000137 let s:completion = { 'start_column': response.completion_start_column, 'candidates': response.completions } | |
16 0.000383 0.000099 call s:Complete() | |
FUNCTION <SNR>71_AllowedToCompleteInCurrentBuffer() | |
Called 178 times | |
Total time: 0.005961 | |
Self time: 0.001082 | |
count total (s) self (s) | |
178 0.005864 0.000985 return s:AllowedToCompleteInBuffer( '%' ) | |
FUNCTION <SNR>71_IdentifierFinishedOperations() | |
Called 22 times | |
Total time: 0.012671 | |
Self time: 0.006941 | |
count total (s) self (s) | |
22 0.005845 0.000115 if !s:Pyeval( 'base.CurrentIdentifierFinished()' ) | |
15 0.000025 return | |
endif | |
7 0.006681 exec s:python_command "ycm_state.OnCurrentIdentifierFinished()" | |
7 0.000045 let s:force_semantic = 0 | |
7 0.000028 let s:completion = s:default_completion | |
FUNCTION <SNR>71_Pyeval() | |
Called 105 times | |
Total time: 0.037456 | |
Self time: 0.037456 | |
count total (s) self (s) | |
105 0.000192 if s:using_python3 | |
return py3eval( a:eval_string ) | |
endif | |
105 0.036737 return pyeval( a:eval_string ) | |
FUNCTION <SNR>71_Complete() | |
Called 32 times | |
Total time: 0.000549 | |
Self time: 0.000312 | |
count total (s) self (s) | |
" <c-x><c-u> invokes the user's completion function (which we have set to | |
" youcompleteme#CompleteFunc), and <c-p> tells Vim to select the previous | |
" completion candidate. This is necessary because by default, Vim selects the | |
" first candidate when completion is invoked, and selecting a candidate | |
" automatically replaces the current text with it. Calling <c-p> forces Vim to | |
" deselect the first candidate and in turn preserve the user's current text | |
" until he explicitly chooses to replace it with a completion. | |
32 0.000450 0.000213 call s:SendKeys( "\<C-X>\<C-U>\<C-P>" ) | |
FUNCTION <SNR>71_DisableOnLargeFile() | |
Called 66 times | |
Total time: 0.000399 | |
Self time: 0.000399 | |
count total (s) self (s) | |
66 0.000241 if exists( 'b:ycm_largefile' ) | |
66 0.000092 return b:ycm_largefile | |
endif | |
let threshold = g:ycm_disable_for_files_larger_than_kb * 1024 | |
let b:ycm_largefile = threshold > 0 && getfsize( expand( a:buffer ) ) > threshold | |
if b:ycm_largefile | |
exec s:python_command "vimsupport.PostVimMessage(" . "'YouCompleteMe is disabled in this buffer; " . "the file exceeded the max size (see YCM options).' )" | |
endif | |
return b:ycm_largefile | |
FUNCTION <SNR>63_Setup() | |
Called 225 times | |
Total time: 0.301360 | |
Self time: 0.007704 | |
count total (s) self (s) | |
225 0.000645 if &filetype ==# "" | |
112 0.015467 0.000572 call s:InitColor() | |
112 0.000065 endif | |
225 0.006696 0.001342 if s:Filter() && g:indentLine_enabled || exists("b:indentLine_enabled") && b:indentLine_enabled | |
225 0.268661 0.001241 call s:IndentLinesEnable() | |
225 0.000201 endif | |
225 0.008032 0.002045 if s:Filter() && g:indentLine_leadingSpaceEnabled || exists("b:indentLine_leadingSpaceEnabled") && b:indentLine_leadingSpaceEnabled | |
call s:LeadingSpaceEnable() | |
endif | |
FUNCTION <SNR>71_OnBufferEnter() | |
Called 224 times | |
Total time: 0.005263 | |
Self time: 0.001266 | |
count total (s) self (s) | |
224 0.004881 0.000884 if !s:VisitedBufferRequiresReparse() | |
224 0.000150 return | |
endif | |
call s:SetUpCompleteopt() | |
call s:SetCompleteFunc() | |
exec s:python_command "ycm_state.OnBufferVisit()" | |
" Last parse may be outdated because of changes from other buffers. Force a | |
" new parse. | |
call s:OnFileReadyToParse( 1 ) | |
FUNCTION <SNR>4_BMFilename() | |
Called 1 time | |
Total time: 0.000213 | |
Self time: 0.000111 | |
count total (s) self (s) | |
1 0.000003 if isdirectory(a:name) | |
return | |
endif | |
1 0.000074 0.000007 let munge = <SID>BMMunge(a:name, a:num) | |
1 0.000041 0.000006 let hash = <SID>BMHash(munge) | |
1 0.000001 if s:bmenu_short == 0 | |
1 0.000004 let name = 'an ' . g:bmenu_priority . '.' . hash . ' &Buffers.' . munge | |
1 0.000000 else | |
let name = 'an ' . g:bmenu_priority . '.' . hash . '.' . hash . ' &Buffers.' . <SID>BMHash2(munge) . munge | |
endif | |
" set 'cpo' to include the <CR> | |
1 0.000006 let cpo_save = &cpo | |
1 0.000008 set cpo&vim | |
1 0.000063 exe name . ' :confirm b' . a:num . '<CR>' | |
1 0.000007 let &cpo = cpo_save | |
FUNCTION youcompleteme#CompleteFunc() | |
Called 80 times | |
Total time: 0.001350 | |
Self time: 0.001350 | |
count total (s) self (s) | |
80 0.000289 if a:findstart | |
50 0.000359 if s:completion.start_column > col( '.' ) || empty( s:completion.candidates ) | |
" For vim, -2 means not found but don't trigger an error message. | |
" See :h complete-functions. | |
20 0.000028 return -2 | |
endif | |
30 0.000100 return s:completion.start_column - 1 | |
endif | |
30 0.000044 return s:completion.candidates | |
FUNCTION <SNR>71_OnBlankLine() | |
Called 22 times | |
Total time: 0.005186 | |
Self time: 0.000142 | |
count total (s) self (s) | |
22 0.005173 0.000129 return s:Pyeval( 'not vim.current.line or vim.current.line.isspace()' ) | |
FUNCTION delimitMate#BS() | |
Called 16 times | |
Total time: 0.008199 | |
Self time: 0.000830 | |
count total (s) self (s) | |
16 0.002993 0.000157 if s:is_forbidden("") | |
let extra = '' | |
elseif &bs !~ 'start\|2' | |
let extra = '' | |
elseif delimitMate#WithinEmptyPair() | |
let extra = "\<Del>" | |
elseif s:is_space_expansion() | |
let extra = "\<Del>" | |
elseif s:is_cr_expansion() | |
let extra = repeat("\<Del>", len(matchstr(getline(line('.') + 1), '^\s*\S'))) | |
else | |
16 0.000019 let extra = '' | |
16 0.000009 endif | |
16 0.000042 return "\<BS>" . extra | |
FUNCTION <SNR>71_OnCompleteDone() | |
Called 32 times | |
Total time: 0.005399 | |
Self time: 0.005399 | |
count total (s) self (s) | |
32 0.005363 exec s:python_command "ycm_state.OnCompleteDone()" | |
FUNCTION <SNR>71_SendKeys() | |
Called 38 times | |
Total time: 0.000287 | |
Self time: 0.000287 | |
count total (s) self (s) | |
" By default keys are added to the end of the typeahead buffer. If there are | |
" already keys in the buffer, they will be processed first and may change the | |
" state that our keys combination was sent for (e.g. <C-X><C-U><C-P> in normal | |
" mode instead of insert mode or <C-e> outside of completion mode). We avoid | |
" that by inserting the keys at the start of the typeahead buffer with the 'i' | |
" option. Also, we don't want the keys to be remapped to something else so we | |
" add the 'n' option. | |
38 0.000170 call feedkeys( a:keys, 'in' ) | |
FUNCTION <SNR>49_is_excluded_ft() | |
Called 16 times | |
Total time: 0.000108 | |
Self time: 0.000108 | |
count total (s) self (s) | |
16 0.000068 if !exists("g:delimitMate_excluded_ft") | |
16 0.000026 return 0 | |
endif | |
return index(split(g:delimitMate_excluded_ft, ','), a:ft, 0, 1) >= 0 | |
FUNCTION delimitMate#Set() | |
Called 23 times | |
Total time: 0.000590 | |
Self time: 0.000102 | |
count total (s) self (s) | |
23 0.000588 0.000100 return call('s:set', a:000) | |
FUNCTION <SNR>48_init() | |
Called 1 time | |
Total time: 0.001560 | |
Self time: 0.000289 | |
count total (s) self (s) | |
" Initialize variables: | |
" autoclose | |
1 0.000075 0.000007 call s:option_init("autoclose", 1) | |
" matchpairs | |
1 0.000056 0.000008 call s:option_init("matchpairs", string(&matchpairs)[1:-2]) | |
1 0.000124 0.000046 call s:option_init("matchpairs_list", map(split(s:get('matchpairs'), '.:.\zs,\ze.:.'), 'split(v:val, ''^.\zs:\ze.$'')')) | |
1 0.000028 0.000003 let pairs = s:get('matchpairs_list') | |
1 0.000010 if len(filter(pairs, 'v:val[0] ==# v:val[1]')) | |
echohl ErrorMsg | |
echom 'delimitMate: each member of a pair in delimitMate_matchpairs must be different from each other.' | |
echom 'delimitMate: invalid pairs: ' . join(map(pairs, 'join(v:val, ":")'), ', ') | |
echohl Normal | |
return 0 | |
endif | |
1 0.000082 0.000013 call s:option_init("left_delims", map(copy(s:get('matchpairs_list')), 'v:val[0]')) | |
1 0.000080 0.000011 call s:option_init("right_delims", map(copy(s:get('matchpairs_list')), 'v:val[1]')) | |
" quotes | |
1 0.000048 0.000004 call s:option_init("quotes", "\" ' `") | |
1 0.000079 0.000013 call s:option_init("quotes_list",split(s:get('quotes'), '\s\+')) | |
" nesting_quotes | |
1 0.000047 0.000004 call s:option_init("nesting_quotes", []) | |
" excluded_regions | |
1 0.000048 0.000004 call s:option_init("excluded_regions", "Comment") | |
1 0.000078 0.000010 call s:option_init("excluded_regions_list", split(s:get('excluded_regions'), ',\s*')) | |
1 0.000027 0.000005 let enabled = len(s:get('excluded_regions_list')) > 0 | |
1 0.000055 0.000004 call s:option_init("excluded_regions_enabled", enabled) | |
" expand_space | |
1 0.000004 if exists("b:delimitMate_expand_space") && type(b:delimitMate_expand_space) == type("") | |
echom "b:delimitMate_expand_space is '".b:delimitMate_expand_space."' but it must be either 1 or 0!" | |
echom "Read :help 'delimitMate_expand_space' for more details." | |
unlet b:delimitMate_expand_space | |
let b:delimitMate_expand_space = 1 | |
endif | |
1 0.000003 if exists("g:delimitMate_expand_space") && type(g:delimitMate_expand_space) == type("") | |
echom "delimitMate_expand_space is '".g:delimitMate_expand_space."' but it must be either 1 or 0!" | |
echom "Read :help 'delimitMate_expand_space' for more details." | |
unlet g:delimitMate_expand_space | |
let g:delimitMate_expand_space = 1 | |
endif | |
1 0.000048 0.000004 call s:option_init("expand_space", 0) | |
" expand_cr | |
1 0.000003 if exists("b:delimitMate_expand_cr") && type(b:delimitMate_expand_cr) == type("") | |
echom "b:delimitMate_expand_cr is '".b:delimitMate_expand_cr."' but it must be either 1 or 0!" | |
echom "Read :help 'delimitMate_expand_cr' for more details." | |
unlet b:delimitMate_expand_cr | |
let b:delimitMate_expand_cr = 1 | |
endif | |
1 0.000004 if exists("g:delimitMate_expand_cr") && type(g:delimitMate_expand_cr) == type("") | |
echom "delimitMate_expand_cr is '".g:delimitMate_expand_cr."' but it must be either 1 or 0!" | |
echom "Read :help 'delimitMate_expand_cr' for more details." | |
unlet g:delimitMate_expand_cr | |
let g:delimitMate_expand_cr = 1 | |
endif | |
1 0.000010 if ((&backspace !~ 'eol' || &backspace !~ 'start') && &backspace != 2) && ((exists('b:delimitMate_expand_cr') && b:delimitMate_expand_cr == 1) || (exists('g:delimitMate_expand_cr') && g:delimitMate_expand_cr == 1)) | |
echom "delimitMate: There seems to be some incompatibility with your settings that may interfer with the expansion of <CR>. See :help 'delimitMate_expand_cr' for details." | |
endif | |
1 0.000048 0.000004 call s:option_init("expand_cr", 0) | |
" expand_in_quotes | |
1 0.000047 0.000003 call s:option_init('expand_inside_quotes', 0) | |
" jump_expansion | |
1 0.000047 0.000004 call s:option_init("jump_expansion", 0) | |
" smart_matchpairs | |
1 0.000049 0.000005 call s:option_init("smart_matchpairs", '^\%(\w\|\!\|[£$]\|[^[:punct:][:space:]]\)') | |
" smart_quotes | |
" XXX: backward compatibility. Ugly, should go the way of the dodo soon. | |
1 0.000032 0.000008 let quotes = escape(join(s:get('quotes_list'), ''), '\-^[]') | |
1 0.000005 let default_smart_quotes = '\%(\w\|[^[:punct:][:space:]' . quotes . ']\|\%(\\\\\)*\\\)\%#\|\%#\%(\w\|[^[:space:][:punct:]' . quotes . ']\)' | |
1 0.000004 if exists('g:delimitMate_smart_quotes') && type(g:delimitMate_smart_quotes) == type(0) | |
if g:delimitMate_smart_quotes | |
unlet g:delimitMate_smart_quotes | |
else | |
unlet g:delimitMate_smart_quotes | |
let g:delimitMate_smart_quotes = '' | |
endif | |
endif | |
1 0.000004 if exists('b:delimitMate_smart_quotes') && type(b:delimitMate_smart_quotes) == type(0) | |
if b:delimitMate_smart_quotes | |
unlet b:delimitMate_smart_quotes | |
if exists('g:delimitMate_smart_quotes') && type(g:delimitMate_smart_quotes) && g:delimitMate_smart_quotes | |
let b:delimitMate_smart_quotes = default_smart_quotes | |
endif | |
else | |
unlet b:delimitMate_smart_quotes | |
let b:delimitMate_smart_quotes = '' | |
endif | |
endif | |
1 0.000050 0.000005 call s:option_init("smart_quotes", default_smart_quotes) | |
" apostrophes | |
1 0.000049 0.000004 call s:option_init("apostrophes", "") | |
1 0.000077 0.000008 call s:option_init("apostrophes_list", split(s:get('apostrophes'), ":\s*")) | |
" tab2exit | |
1 0.000046 0.000004 call s:option_init("tab2exit", 1) | |
" balance_matchpairs | |
1 0.000047 0.000003 call s:option_init("balance_matchpairs", 0) | |
" eol marker | |
1 0.000046 0.000003 call s:option_init("insert_eol_marker", 1) | |
1 0.000048 0.000003 call s:option_init("eol_marker", "") | |
" Everything is fine. | |
1 0.000001 return 1 | |
FUNCTIONS SORTED ON TOTAL TIME | |
count total (s) self (s) function | |
4 0.470125 0.469526 <SNR>71_PollFileParseResponse() | |
225 0.301360 0.007704 <SNR>63_Setup() | |
225 0.267420 0.264586 <SNR>63_IndentLinesEnable() | |
22 0.062519 0.006883 <SNR>71_OnTextChangedInsertMode() | |
105 0.037456 <SNR>71_Pyeval() | |
16 0.033866 0.025613 <SNR>71_InvokeCompletion() | |
35 0.027488 0.001579 <SNR>71_PollCompletion() | |
224 0.023150 0.017811 <SNR>42_SetUpForNewFiletype() | |
3 0.015243 0.007680 <SNR>71_OnInsertLeave() | |
112 0.014895 <SNR>63_InitColor() | |
22 0.012671 0.006941 <SNR>71_IdentifierFinishedOperations() | |
310 0.012258 <SNR>55_Highlight_Matching_Pair() | |
450 0.011341 <SNR>63_Filter() | |
16 0.008199 0.000830 delimitMate#BS() | |
224 0.008192 0.004139 <SNR>39_WinLeaveHandler() | |
38 0.007035 0.004596 <SNR>71_OnCursorMovedNormalMode() | |
6 0.006632 0.006174 <SNR>71_OnFileReadyToParse() | |
178 0.005961 0.001082 <SNR>71_AllowedToCompleteInCurrentBuffer() | |
32 0.005399 <SNR>71_OnCompleteDone() | |
112 0.005339 <SNR>42_CreateDelimMapFromCms() | |
FUNCTIONS SORTED ON SELF TIME | |
count total (s) self (s) function | |
4 0.470125 0.469526 <SNR>71_PollFileParseResponse() | |
225 0.267420 0.264586 <SNR>63_IndentLinesEnable() | |
105 0.037456 <SNR>71_Pyeval() | |
16 0.033866 0.025613 <SNR>71_InvokeCompletion() | |
224 0.023150 0.017811 <SNR>42_SetUpForNewFiletype() | |
112 0.014895 <SNR>63_InitColor() | |
310 0.012258 <SNR>55_Highlight_Matching_Pair() | |
450 0.011341 <SNR>63_Filter() | |
225 0.301360 0.007704 <SNR>63_Setup() | |
3 0.015243 0.007680 <SNR>71_OnInsertLeave() | |
22 0.012671 0.006941 <SNR>71_IdentifierFinishedOperations() | |
22 0.062519 0.006883 <SNR>71_OnTextChangedInsertMode() | |
6 0.006632 0.006174 <SNR>71_OnFileReadyToParse() | |
32 0.005399 <SNR>71_OnCompleteDone() | |
112 0.005339 <SNR>42_CreateDelimMapFromCms() | |
38 0.007035 0.004596 <SNR>71_OnCursorMovedNormalMode() | |
178 0.004879 0.004480 <SNR>71_AllowedToCompleteInBuffer() | |
224 0.008192 0.004139 <SNR>39_WinLeaveHandler() | |
224 0.004053 <SNR>39_SaveNERDTreeViewIfPossible() | |
224 0.003780 nerdtree#checkForBrowse() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
profile.log
: normal settingprofile_again.log
: withlet g:ycm_show_diagnostics_ui = 0
profile_final.log
: without ``let g:ycm_show_diagnostics_ui = 0but disabled
airline` and `color_coded`