Created
December 16, 2014 12:04
-
-
Save jakubgs/4689817e5bcfbf52895c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SCRIPT /home/jso/dotfiles/.vim/bundle/unite.vim/syntax/unite.vim | |
Sourced 14 times | |
Total time: 0.014934 | |
Self time: 0.002301 | |
count total (s) self (s) | |
"============================================================================= | |
" FILE: syntax/unite.vim | |
" AUTHOR: Shougo Matsushita <[email protected]> | |
" License: MIT license {{{ | |
" Permission is hereby granted, free of charge, to any person obtaining | |
" a copy of this software and associated documentation files (the | |
" "Software"), to deal in the Software without restriction, including | |
" without limitation the rights to use, copy, modify, merge, publish, | |
" distribute, sublicense, and/or sell copies of the Software, and to | |
" permit persons to whom the Software is furnished to do so, subject to | |
" the following conditions: | |
" | |
" The above copyright notice and this permission notice shall be included | |
" in all copies or substantial portions of the Software. | |
" | |
" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | |
" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | |
" IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | |
" CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | |
" TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | |
" SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | |
" }}} | |
"============================================================================= | |
14 0.000042 if version < 700 | |
syntax clear | |
elseif exists('b:current_syntax') | |
finish | |
endif | |
14 0.000082 let s:save_cpo = &cpo | |
14 0.000073 set cpo&vim | |
14 0.000199 highlight default link uniteError Error | |
14 0.000082 highlight default link uniteMarkedLine Statement | |
14 0.000081 highlight default link uniteCandidateSourceName Type | |
14 0.000072 highlight default link uniteQuickMatchMarker Special | |
14 0.000108 highlight default link uniteCandidateMarker Special | |
14 0.000071 highlight default link uniteCandidateInputKeyword Function | |
" The following definitions are for <Plug>(unite-choose-action). | |
14 0.000047 highlight default link uniteChooseAction NONE | |
14 0.000040 highlight default link uniteChooseCandidate NONE | |
14 0.000075 highlight default link uniteChooseKey SpecialKey | |
14 0.000036 highlight default link uniteChooseMessage NONE | |
14 0.000060 highlight default link uniteChoosePrompt uniteSourcePrompt | |
14 0.000059 highlight default link uniteChooseSource uniteSourceNames | |
14 0.000067 highlight default link uniteInputPrompt Identifier | |
14 0.000063 highlight default link uniteInputPromptError Error | |
14 0.000069 highlight default link uniteInputCommand Statement | |
14 0.000071 highlight default link uniteStatusNormal StatusLine | |
14 0.000067 highlight default link uniteStatusHead Statement | |
14 0.000067 highlight default link uniteStatusSourceNames Identifier | |
14 0.000066 highlight default link uniteStatusSourceCandidates Constant | |
14 0.000068 highlight default link uniteStatusMessage Comment | |
14 0.000068 highlight default link uniteStatusLineNR LineNR | |
14 0.000025 let b:current_syntax = 'unite' | |
14 0.012741 0.000108 call unite#view#_set_syntax() | |
14 0.000070 let &cpo = s:save_cpo | |
14 0.000018 unlet s:save_cpo | |
SCRIPT /usr/share/vim/vim74/syntax/make.vim | |
Sourced 2 times | |
Total time: 0.001999 | |
Self time: 0.001999 | |
count total (s) self (s) | |
" Vim syntax file | |
" Language: Makefile | |
" Maintainer: Claudio Fleiner <[email protected]> | |
" URL: http://www.fleiner.com/vim/syntax/make.vim | |
" Last Change: 2012 Oct 05 | |
" For version 5.x: Clear all syntax items | |
" For version 6.x: Quit when a syntax file was already loaded | |
2 0.000007 if version < 600 | |
syntax clear | |
elseif exists("b:current_syntax") | |
finish | |
endif | |
2 0.000021 let s:cpo_save = &cpo | |
2 0.000013 set cpo&vim | |
" some special characters | |
2 0.000066 syn match makeSpecial "^\s*[@+-]\+" | |
2 0.000015 syn match makeNextLine "\\\n\s*" | |
" some directives | |
2 0.000023 syn match makePreCondit "^ *\(ifeq\>\|else\>\|endif\>\|ifneq\>\|ifdef\>\|ifndef\>\)" | |
2 0.000015 syn match makeInclude "^ *[-s]\=include" | |
2 0.000012 syn match makeStatement "^ *vpath" | |
2 0.000016 syn match makeExport "^ *\(export\|unexport\)\>" | |
2 0.000012 syn match makeOverride "^ *override" | |
2 0.000013 hi link makeOverride makeStatement | |
2 0.000010 hi link makeExport makeStatement | |
" catch unmatched define/endef keywords. endef only matches it is by itself on a line, possibly followed by a commend | |
2 0.000060 syn region makeDefine start="^\s*define\s" end="^\s*endef\s*\(#.*\)\?$" contains=makeStatement,makeIdent,makePreCondit,makeDefine | |
" Microsoft Makefile specials | |
2 0.000005 syn case ignore | |
2 0.000014 syn match makeInclude "^! *include" | |
2 0.000033 syn match makePreCondit "! *\(cmdswitches\|error\|message\|include\|if\|ifdef\|ifndef\|else\|elseif\|else if\|else\s*ifdef\|else\s*ifndef\|endif\|undef\)\>" | |
2 0.000004 syn case match | |
" identifiers | |
2 0.000060 syn region makeIdent start="\$(" skip="\\)\|\\\\" end=")" contains=makeStatement,makeIdent,makeSString,makeDString | |
2 0.000058 syn region makeIdent start="\${" skip="\\}\|\\\\" end="}" contains=makeStatement,makeIdent,makeSString,makeDString | |
2 0.000014 syn match makeIdent "\$\$\w*" | |
2 0.000013 syn match makeIdent "\$[^({]" | |
2 0.000015 syn match makeIdent "^ *\a\w*\s*[:+?!*]="me=e-2 | |
2 0.000014 syn match makeIdent "^ *\a\w*\s*="me=e-1 | |
2 0.000012 syn match makeIdent "%" | |
" Makefile.in variables | |
2 0.000015 syn match makeConfig "@[A-Za-z0-9_]\+@" | |
" make targets | |
" syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>" | |
2 0.000030 syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:$"me=e-1 nextgroup=makeSource | |
2 0.000027 syn match makeImplicit "^\.[A-Za-z0-9_./\t -]\+\s*:[^=]"me=e-2 nextgroup=makeSource | |
2 0.000073 syn region makeTarget transparent matchgroup=makeTarget start="^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]"rs=e-1 end=";"re=e-1,me=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine skipnl nextGroup=makeCommands | |
2 0.000054 syn match makeTarget "^[A-Za-z0-9_./$()%*@-][A-Za-z0-9_./\t $()%*@-]*::\=\s*$" contains=makeIdent,makeSpecTarget skipnl nextgroup=makeCommands,makeCommandError | |
2 0.000113 syn region makeSpecTarget transparent matchgroup=makeSpecTarget start="^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*:\{1,2}[^:=]"rs=e-1 end="[^\\]$" keepend contains=makeIdent,makeSpecTarget,makeNextLine skipnl nextGroup=makeCommands | |
2 0.000072 syn match makeSpecTarget "^\.\(SUFFIXES\|PHONY\|DEFAULT\|PRECIOUS\|IGNORE\|SILENT\|EXPORT_ALL_VARIABLES\|KEEP_STATE\|LIBPATTERNS\|NOTPARALLEL\|DELETE_ON_ERROR\|INTERMEDIATE\|POSIX\|SECONDARY\)\>\s*::\=\s*$" contains=makeIdent skipnl nextgroup=makeCommands,makeCommandError | |
2 0.000015 syn match makeCommandError "^\s\+\S.*" contained | |
2 0.000102 syn region makeCommands start=";"hs=s+1 start="^\t" end="^[^\t#]"me=e-1,re=e-1 end="^$" contained contains=makeCmdNextLine,makeSpecial,makeComment,makeIdent,makePreCondit,makeDefine,makeDString,makeSString nextgroup=makeCommandError | |
2 0.000012 syn match makeCmdNextLine "\\\n."he=e-1 contained | |
" Statements / Functions (GNU make) | |
2 0.000057 syn match makeStatement contained "(\(subst\|abspath\|addprefix\|addsuffix\|and\|basename\|call\|dir\|error\|eval\|filter-out\|filter\|findstring\|firstword\|flavor\|foreach\|if\|info\|join\|lastword\|notdir\|or\|origin\|patsubst\|realpath\|shell\|sort\|strip\|suffix\|value\|warning\|wildcard\|word\|wordlist\|words\)\>"ms=s+1 | |
" Comment | |
2 0.000009 if exists("make_microsoft") | |
syn match makeComment "#.*" contains=@Spell,makeTodo | |
elseif !exists("make_no_comments") | |
2 0.000040 syn region makeComment start="#" end="^$" end="[^\\]$" keepend contains=@Spell,makeTodo | |
2 0.000016 syn match makeComment "#$" contains=@Spell | |
2 0.000002 endif | |
2 0.000013 syn keyword makeTodo TODO FIXME XXX contained | |
" match escaped quotes and any other escaped character | |
" except for $, as a backslash in front of a $ does | |
" not make it a standard character, but instead it will | |
" still act as the beginning of a variable | |
" The escaped char is not highlightet currently | |
2 0.000012 syn match makeEscapedChar "\\[^$]" | |
2 0.000036 syn region makeDString start=+\(\\\)\@<!"+ skip=+\\.+ end=+"+ contains=makeIdent | |
2 0.000037 syn region makeSString start=+\(\\\)\@<!'+ skip=+\\.+ end=+'+ contains=makeIdent | |
2 0.000070 syn region makeBString start=+\(\\\)\@<!`+ skip=+\\.+ end=+`+ contains=makeIdent,makeSString,makeDString,makeNextLine | |
" Syncing | |
2 0.000006 syn sync minlines=20 maxlines=200 | |
" Sync on Make command block region: When searching backwards hits a line that | |
" can't be a command or a comment, use makeCommands if it looks like a target, | |
" NONE otherwise. | |
2 0.000015 syn sync match makeCommandSync groupthere NONE "^[^\t#]" | |
2 0.000026 syn sync match makeCommandSync groupthere makeCommands "^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}[^:=]" | |
2 0.000027 syn sync match makeCommandSync groupthere makeCommands "^[A-Za-z0-9_./$()%-][A-Za-z0-9_./\t $()%-]*:\{1,2}\s*$" | |
" Define the default highlighting. | |
" For version 5.7 and earlier: only when not done already | |
" For version 5.8 and later: only when an item doesn't have highlighting yet | |
2 0.000006 if version >= 508 || !exists("did_make_syn_inits") | |
2 0.000003 if version < 508 | |
let did_make_syn_inits = 1 | |
command -nargs=+ HiLink hi link <args> | |
else | |
2 0.000035 command -nargs=+ HiLink hi def link <args> | |
2 0.000003 endif | |
2 0.000025 HiLink makeNextLine makeSpecial | |
2 0.000014 HiLink makeCmdNextLine makeSpecial | |
2 0.000033 HiLink makeSpecTarget Statement | |
2 0.000007 if !exists("make_no_commands") | |
2 0.000017 HiLink makeCommands Number | |
2 0.000003 endif | |
2 0.000016 HiLink makeImplicit Function | |
2 0.000016 HiLink makeTarget Function | |
2 0.000016 HiLink makeInclude Include | |
2 0.000017 HiLink makePreCondit PreCondit | |
2 0.000018 HiLink makeStatement Statement | |
2 0.000015 HiLink makeIdent Identifier | |
2 0.000018 HiLink makeSpecial Special | |
2 0.000017 HiLink makeComment Comment | |
2 0.000016 HiLink makeDString String | |
2 0.000017 HiLink makeSString String | |
2 0.000015 HiLink makeBString Function | |
2 0.000016 HiLink makeError Error | |
2 0.000015 HiLink makeTodo Todo | |
2 0.000016 HiLink makeDefine Define | |
2 0.000016 HiLink makeCommandError Error | |
2 0.000015 HiLink makeConfig PreCondit | |
2 0.000004 delcommand HiLink | |
2 0.000003 endif | |
2 0.000007 let b:current_syntax = "make" | |
2 0.000015 let &cpo = s:cpo_save | |
2 0.000003 unlet s:cpo_save | |
" vim: ts=8 | |
SCRIPT /usr/share/vim/vim74/ftplugin/make.vim | |
Sourced 2 times | |
Total time: 0.000119 | |
Self time: 0.000119 | |
count total (s) self (s) | |
" Vim filetype plugin file | |
" Language: Make | |
" Maintainer: Bram Moolenaar <[email protected]> | |
" Last Change: 2013 Apr 22 | |
" Only do this when not done yet for this buffer | |
2 0.000011 if exists("b:did_ftplugin") | |
finish | |
endif | |
2 0.000006 let b:did_ftplugin = 1 | |
2 0.000006 let b:undo_ftplugin = "setl et< sts< fo< com< cms< inc<" | |
" Make sure a hard tab is used, required for most make programs | |
2 0.000014 setlocal noexpandtab softtabstop=0 | |
" Set 'formatoptions' to break comment lines but not other lines, | |
" and insert the comment leader when hitting <CR> or using "o". | |
2 0.000020 setlocal fo-=t fo+=croql | |
" Set 'comments' to format dashed lists in comments | |
2 0.000012 setlocal com=sO:#\ -,mO:#\ \ ,b:# | |
" Set 'commentstring' to put the marker after a #. | |
2 0.000004 setlocal commentstring=#\ %s | |
" Including files. | |
2 0.000005 let &l:include = '^\s*include' | |
" For matchit.vim, suggested by Albert Netymk. | |
2 0.000006 if exists("loaded_matchit") | |
let b:match_words = '\<if\(n\)\=\(eq\|def\)\>:\<else\>:\<endif\>,\<define\>:\<endef\>' | |
endif | |
SCRIPT /usr/share/vim/vim74/indent/make.vim | |
Sourced 2 times | |
Total time: 0.000057 | |
Self time: 0.000057 | |
count total (s) self (s) | |
" Vim indent file | |
" Language: Makefile | |
" Maintainer: Nikolai Weibull <[email protected]> | |
" Latest Revision: 2007-05-07 | |
2 0.000010 if exists("b:did_indent") | |
finish | |
endif | |
2 0.000006 let b:did_indent = 1 | |
2 0.000007 setlocal indentexpr=GetMakeIndent() | |
2 0.000004 setlocal indentkeys=!^F,o,O,<:>,=else,=endif | |
2 0.000003 setlocal nosmartindent | |
2 0.000006 if exists("*GetMakeIndent") | |
2 0.000002 finish | |
SCRIPT /usr/share/vim/vim74/scripts.vim | |
Sourced 6 times | |
Total time: 0.063544 | |
Self time: 0.002838 | |
count total (s) self (s) | |
" Vim support file to detect file types in scripts | |
" | |
" Maintainer: Bram Moolenaar <[email protected]> | |
" Last change: 2014 Aug 24 | |
" This file is called by an autocommand for every file that has just been | |
" loaded into a buffer. It checks if the type of file can be recognized by | |
" the file contents. The autocommand is in $VIMRUNTIME/filetype.vim. | |
" Only do the rest when the FileType autocommand has not been triggered yet. | |
6 0.000021 if did_filetype() | |
finish | |
endif | |
" Load the user defined scripts file first | |
" Only do this when the FileType autocommand has not been triggered yet | |
6 0.000024 if exists("myscriptsfile") && filereadable(expand(myscriptsfile)) | |
execute "source " . myscriptsfile | |
if did_filetype() | |
finish | |
endif | |
endif | |
" Line continuation is used here, remove 'C' from 'cpoptions' | |
6 0.000043 let s:cpo_save = &cpo | |
6 0.000040 set cpo&vim | |
6 0.000020 let s:line1 = getline(1) | |
6 0.000032 if s:line1 =~ "^#!" | |
" A script that starts with "#!". | |
" Check for a line like "#!/usr/bin/env VAR=val bash". Turn it into | |
" "#!/usr/bin/bash" to make matching easier. | |
5 0.000037 if s:line1 =~ '^#!\s*\S*\<env\s' | |
2 0.000019 let s:line1 = substitute(s:line1, '\S\+=\S\+', '', 'g') | |
2 0.000014 let s:line1 = substitute(s:line1, '\<env\s\+', '', '') | |
2 0.000003 endif | |
" Get the program name. | |
" Only accept spaces in PC style paths: "#!c:/program files/perl [args]". | |
" If the word env is used, use the first word after the space: | |
" "#!/usr/bin/env perl [path/args]" | |
" If there is no path use the first word: "#!perl [path/args]". | |
" Otherwise get the last word after a slash: "#!/usr/bin/perl [path/args]". | |
5 0.000025 if s:line1 =~ '^#!\s*\a:[/\\]' | |
let s:name = substitute(s:line1, '^#!.*[/\\]\(\i\+\).*', '\1', '') | |
elseif s:line1 =~ '^#!.*\<env\>' | |
let s:name = substitute(s:line1, '^#!.*\<env\>\s\+\(\i\+\).*', '\1', '') | |
elseif s:line1 =~ '^#!\s*[^/\\ ]*\>\([^/\\]\|$\)' | |
let s:name = substitute(s:line1, '^#!\s*\([^/\\ ]*\>\).*', '\1', '') | |
else | |
5 0.000067 let s:name = substitute(s:line1, '^#!\s*\S*[/\\]\(\i\+\).*', '\1', '') | |
5 0.000006 endif | |
" tcl scripts may have #!/bin/sh in the first line and "exec wish" in the | |
" third line. Suggested by Steven Atkinson. | |
5 0.000025 if getline(3) =~ '^exec wish' | |
let s:name = 'wish' | |
endif | |
" Bourne-like shell scripts: bash bash2 ksh ksh93 sh | |
5 0.000053 if s:name =~ '^\(bash\d*\|\|ksh\d*\|sh\)\>' | |
3 0.039224 0.000022 call SetFileTypeSH(s:line1) " defined in filetype.vim | |
" csh scripts | |
3 0.000003 elseif s:name =~ '^csh\>' | |
if exists("g:filetype_csh") | |
call SetFileTypeShell(g:filetype_csh) | |
else | |
call SetFileTypeShell("csh") | |
endif | |
" tcsh scripts | |
elseif s:name =~ '^tcsh\>' | |
call SetFileTypeShell("tcsh") | |
" Z shell scripts | |
elseif s:name =~ '^zsh\>' | |
set ft=zsh | |
" TCL scripts | |
elseif s:name =~ '^\(tclsh\|wish\|expectk\|itclsh\|itkwish\)\>' | |
set ft=tcl | |
" Expect scripts | |
elseif s:name =~ '^expect\>' | |
set ft=expect | |
" Gnuplot scripts | |
elseif s:name =~ '^gnuplot\>' | |
set ft=gnuplot | |
" Makefiles | |
elseif s:name =~ 'make\>' | |
set ft=make | |
" Lua | |
elseif s:name =~ 'lua' | |
set ft=lua | |
" Perl 6 | |
elseif s:name =~ 'perl6' | |
set ft=perl6 | |
" Perl | |
elseif s:name =~ 'perl' | |
set ft=perl | |
" PHP | |
elseif s:name =~ 'php' | |
set ft=php | |
" Python | |
elseif s:name =~ 'python' | |
2 0.021520 0.000016 set ft=python | |
" Groovy | |
2 0.000003 elseif s:name =~ '^groovy\>' | |
set ft=groovy | |
" Ruby | |
elseif s:name =~ 'ruby' | |
set ft=ruby | |
" BC calculator | |
elseif s:name =~ '^bc\>' | |
set ft=bc | |
" sed | |
elseif s:name =~ 'sed\>' | |
set ft=sed | |
" OCaml-scripts | |
elseif s:name =~ 'ocaml' | |
set ft=ocaml | |
" Awk scripts | |
elseif s:name =~ 'awk\>' | |
set ft=awk | |
" Website MetaLanguage | |
elseif s:name =~ 'wml' | |
set ft=wml | |
" Scheme scripts | |
elseif s:name =~ 'scheme' | |
set ft=scheme | |
" CFEngine scripts | |
elseif s:name =~ 'cfengine' | |
set ft=cfengine | |
" Erlang scripts | |
elseif s:name =~ 'escript' | |
set ft=erlang | |
endif | |
5 0.000011 unlet s:name | |
5 0.000004 else | |
" File does not start with "#!". | |
1 0.000003 let s:line2 = getline(2) | |
1 0.000003 let s:line3 = getline(3) | |
1 0.000001 let s:line4 = getline(4) | |
1 0.000002 let s:line5 = getline(5) | |
" Bourne-like shell scripts: sh ksh bash bash2 | |
1 0.000006 if s:line1 =~ '^:$' | |
call SetFileTypeSH(s:line1) " defined in filetype.vim | |
" Z shell scripts | |
elseif s:line1 =~ '^#compdef\>' || s:line1 =~ '^#autoload\>' || | |
\ "\n".s:line1."\n".s:line2."\n".s:line3."\n".s:line4."\n".s:line5 =~ '\n\s*emulate\s\+\%(-[LR]\s\+\)\=[ckz]\=sh\>' | |
set ft=zsh | |
" ELM Mail files | |
elseif s:line1 =~ '^From \([a-zA-Z][a-zA-Z_0-9\.=-]*\(@[^ ]*\)\=\|-\) .* \(19\|20\)\d\d$' | |
set ft=mail | |
" Mason | |
elseif s:line1 =~ '^<[%&].*>' | |
set ft=mason | |
" Vim scripts (must have '" vim' as the first line to trigger this) | |
elseif s:line1 =~ '^" *[vV]im$' | |
set ft=vim | |
" MOO | |
elseif s:line1 =~ '^\*\* LambdaMOO Database, Format Version \%([1-3]\>\)\@!\d\+ \*\*$' | |
set ft=moo | |
" Diff file: | |
" - "diff" in first line (context diff) | |
" - "Only in " in first line | |
" - "--- " in first line and "+++ " in second line (unified diff). | |
" - "*** " in first line and "--- " in second line (context diff). | |
" - "# It was generated by makepatch " in the second line (makepatch diff). | |
" - "Index: <filename>" in the first line (CVS file) | |
" - "=== ", line of "=", "---", "+++ " (SVK diff) | |
" - "=== ", "--- ", "+++ " (bzr diff, common case) | |
" - "=== (removed|added|renamed|modified)" (bzr diff, alternative) | |
" - "# HG changeset patch" in first line (Mercurial export format) | |
elseif s:line1 =~ '^\(diff\>\|Only in \|\d\+\(,\d\+\)\=[cda]\d\+\>\|# It was generated by makepatch \|Index:\s\+\f\+\r\=$\|===== \f\+ \d\+\.\d\+ vs edited\|==== //\f\+#\d\+\|# HG changeset patch\)' | |
\ || (s:line1 =~ '^--- ' && s:line2 =~ '^+++ ') | |
\ || (s:line1 =~ '^\* looking for ' && s:line2 =~ '^\* comparing to ') | |
\ || (s:line1 =~ '^\*\*\* ' && s:line2 =~ '^--- ') | |
\ || (s:line1 =~ '^=== ' && ((s:line2 =~ '^=\{66\}' && s:line3 =~ '^--- ' && s:line4 =~ '^+++') || (s:line2 =~ '^--- ' && s:line3 =~ '^+++ '))) | |
\ || (s:line1 =~ '^=== \(removed\|added\|renamed\|modified\)') | |
set ft=diff | |
" PostScript Files (must have %!PS as the first line, like a2ps output) | |
elseif s:line1 =~ '^%![ \t]*PS' | |
set ft=postscr | |
" M4 scripts: Guess there is a line that starts with "dnl". | |
elseif s:line1 =~ '^\s*dnl\>' | |
\ || s:line2 =~ '^\s*dnl\>' | |
\ || s:line3 =~ '^\s*dnl\>' | |
\ || s:line4 =~ '^\s*dnl\>' | |
\ || s:line5 =~ '^\s*dnl\>' | |
set ft=m4 | |
" AmigaDos scripts | |
elseif $TERM == "amiga" | |
\ && (s:line1 =~ "^;" || s:line1 =~ '^\.[bB][rR][aA]') | |
set ft=amiga | |
" SiCAD scripts (must have procn or procd as the first line to trigger this) | |
elseif s:line1 =~? '^ *proc[nd] *$' | |
set ft=sicad | |
" Purify log files start with "**** Purify" | |
elseif s:line1 =~ '^\*\*\*\* Purify' | |
set ft=purifylog | |
" XML | |
elseif s:line1 =~ '<?\s*xml.*?>' | |
set ft=xml | |
" XHTML (e.g.: PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN") | |
elseif s:line1 =~ '\<DTD\s\+XHTML\s' | |
set ft=xhtml | |
" HTML (e.g.: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN") | |
elseif s:line1 =~? '\<DOCTYPE\s\+html\>' | |
set ft=html | |
elseif s:line1 =~ '^%PDF-' | |
set ft=pdf | |
" XXD output | |
elseif s:line1 =~ '^\x\{7}: \x\{2} \=\x\{2} \=\x\{2} \=\x\{2} ' | |
set ft=xxd | |
" RCS/CVS log output | |
elseif s:line1 =~ '^RCS file:' || s:line2 =~ '^RCS file:' | |
set ft=rcslog | |
" CVS commit | |
elseif s:line2 =~ '^CVS:' || getline("$") =~ '^CVS: ' | |
set ft=cvs | |
" Prescribe | |
elseif s:line1 =~ '^!R!' | |
set ft=prescribe | |
" Send-pr | |
elseif s:line1 =~ '^SEND-PR:' | |
set ft=sendpr | |
" SNNS files | |
elseif s:line1 =~ '^SNNS network definition file' | |
set ft=snnsnet | |
elseif s:line1 =~ '^SNNS pattern definition file' | |
set ft=snnspat | |
elseif s:line1 =~ '^SNNS result file' | |
set ft=snnsres | |
" Virata | |
elseif s:line1 =~ '^%.\{-}[Vv]irata' | |
\ || s:line2 =~ '^%.\{-}[Vv]irata' | |
\ || s:line3 =~ '^%.\{-}[Vv]irata' | |
\ || s:line4 =~ '^%.\{-}[Vv]irata' | |
\ || s:line5 =~ '^%.\{-}[Vv]irata' | |
set ft=virata | |
" Strace | |
elseif s:line1 =~ '^\(\[pid \d\+\] \)\=[0-9:.]* *execve(' || s:line1 =~ '^__libc_start_main' | |
set ft=strace | |
" VSE JCL | |
elseif s:line1 =~ '^\* $$ JOB\>' || s:line1 =~ '^// *JOB\>' | |
set ft=vsejcl | |
" TAK and SINDA | |
elseif s:line4 =~ 'K & K Associates' || s:line2 =~ 'TAK 2000' | |
set ft=takout | |
elseif s:line3 =~ 'S Y S T E M S I M P R O V E D ' | |
set ft=sindaout | |
elseif getline(6) =~ 'Run Date: ' | |
set ft=takcmp | |
elseif getline(9) =~ 'Node File 1' | |
set ft=sindacmp | |
" DNS zone files | |
elseif s:line1.s:line2.s:line3.s:line4 =~ '^; <<>> DiG [0-9.]\+ <<>>\|BIND.*named\|$ORIGIN\|$TTL\|IN\s\+SOA' | |
set ft=bindzone | |
" BAAN | |
elseif s:line1 =~ '|\*\{1,80}' && s:line2 =~ 'VRC ' | |
\ || s:line2 =~ '|\*\{1,80}' && s:line3 =~ 'VRC ' | |
set ft=baan | |
" Valgrind | |
elseif s:line1 =~ '^==\d\+== valgrind' || s:line3 =~ '^==\d\+== Using valgrind' | |
set ft=valgrind | |
" Go docs | |
elseif s:line1 =~ '^PACKAGE DOCUMENTATION$' | |
set ft=godoc | |
" Renderman Interface Bytestream | |
elseif s:line1 =~ '^##RenderMan' | |
set ft=rib | |
" Scheme scripts | |
elseif s:line1 =~ 'exec\s\+\S*scheme' || s:line2 =~ 'exec\s\+\S*scheme' | |
set ft=scheme | |
" rst files | |
elseif s:line1 =~ '^\.\.\s\|^\s*restindex\s*$' | |
\ || s:line2 =~ '^\.\.\s\|^\s*restindex\s*$' | |
\ || s:line3 =~ '^\.\.\s\|^\s*restindex\s*$' | |
\ || s:line4 =~ '^\.\.\s\|^\s*restindex\s*$' | |
\ || s:line5 =~ '^\.\.\s\|^\s*restindex\s*$' | |
set ft=rst | |
" Git output | |
elseif s:line1 =~ '^\(commit\|tree\|object\) \x\{40\}\>\|^tag \S\+$' | |
set ft=git | |
" Gprof (gnu profiler) | |
elseif s:line1 == 'Flat profile:' | |
\ && s:line2 == '' | |
\ && s:line3 =~ '^Each sample counts as .* seconds.$' | |
set ft=gprof | |
" Erlang terms | |
" (See also: http://www.gnu.org/software/emacs/manual/html_node/emacs/Choosing-Modes.html#Choosing-Modes) | |
elseif s:line1 =~? '-\*-.*erlang.*-\*-' | |
set ft=erlang | |
" CVS diff | |
else | |
1 0.000004 let s:lnum = 1 | |
1 0.000005 while getline(s:lnum) =~ "^? " && s:lnum < line("$") | |
let s:lnum += 1 | |
endwhile | |
1 0.000013 if getline(s:lnum) =~ '^Index:\s\+\f\+$' | |
set ft=diff | |
" locale input files: Formal Definitions of Cultural Conventions | |
" filename must be like en_US, fr_FR@euro or en_US.UTF-8 | |
elseif expand("%") =~ '\a\a_\a\a\($\|[.@]\)\|i18n$\|POSIX$\|translit_' | |
let s:lnum = 1 | |
while s:lnum < 100 && s:lnum < line("$") | |
if getline(s:lnum) =~ '^LC_\(IDENTIFICATION\|CTYPE\|COLLATE\|MONETARY\|NUMERIC\|TIME\|MESSAGES\|PAPER\|TELEPHONE\|MEASUREMENT\|NAME\|ADDRESS\)$' | |
setf fdcc | |
break | |
endif | |
let s:lnum += 1 | |
endwhile | |
endif | |
1 0.000001 unlet s:lnum | |
1 0.000001 endif | |
1 0.000002 unlet s:line2 s:line3 s:line4 s:line5 | |
1 0.000000 endif | |
" Restore 'cpoptions' | |
6 0.000038 let &cpo = s:cpo_save | |
6 0.000013 unlet s:cpo_save s:line1 | |
SCRIPT /usr/share/vim/vim74/syntax/sh.vim | |
Sourced 3 times | |
Total time: 0.012234 | |
Self time: 0.012234 | |
count total (s) self (s) | |
" Vim syntax file | |
" Language: shell (sh) Korn shell (ksh) bash (sh) | |
" Maintainer: Charles E. Campbell <[email protected]> | |
" Previous Maintainer: Lennart Schultz <[email protected]> | |
" Last Change: Mar 20, 2014 | |
" Version: 132 | |
" URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax | |
" For options and settings, please use: :help ft-sh-syntax | |
" This file includes many ideas from ?ric Brunet ([email protected]) | |
" For version 5.x: Clear all syntax items {{{1 | |
" For version 6.x: Quit when a syntax file was already loaded | |
3 0.000011 if version < 600 | |
syntax clear | |
elseif exists("b:current_syntax") | |
finish | |
endif | |
" AFAICT "." should be considered part of the iskeyword. Using iskeywords in | |
" syntax is dicey, so the following code permits the user to | |
" g:sh_isk set to a string : specify iskeyword. | |
" g:sh_noisk exists : don't change iskeyword | |
" g:sh_noisk does not exist : (default) append "." to iskeyword | |
3 0.000009 if exists("g:sh_isk") && type(g:sh_isk) == 1 " user specifying iskeyword | |
exe "setl isk=".g:sh_isk | |
elseif !exists("g:sh_noisk") " optionally prevent appending '.' to iskeyword | |
3 0.000103 setl isk+=. | |
3 0.000003 endif | |
" trying to answer the question: which shell is /bin/sh, really? | |
" If the user has not specified any of g:is_kornshell, g:is_bash, g:is_posix, g:is_sh, then guess. | |
3 0.000013 if !exists("g:is_kornshell") && !exists("g:is_bash") && !exists("g:is_posix") && !exists("g:is_sh") | |
let s:shell = "" | |
if executable("/bin/sh") | |
let s:shell = resolve("/bin/sh") | |
elseif executable("/usr/bin/sh") | |
let s:shell = resolve("/usr/bin/sh") | |
endif | |
if s:shell =~ 'bash$' | |
let g:is_bash= 1 | |
elseif s:shell =~ 'ksh$' | |
let g:is_kornshell = 1 | |
elseif s:shell =~ 'dash$' | |
let g:is_posix = 1 | |
endif | |
unlet s:shell | |
endif | |
" handling /bin/sh with is_kornshell/is_sh {{{1 | |
" b:is_sh is set when "#! /bin/sh" is found; | |
" However, it often is just a masquerade by bash (typically Linux) | |
" or kornshell (typically workstations with Posix "sh"). | |
" So, when the user sets "g:is_bash", "g:is_kornshell", | |
" or "g:is_posix", a b:is_sh is converted into b:is_bash/b:is_kornshell, | |
" respectively. | |
3 0.000010 if !exists("b:is_kornshell") && !exists("b:is_bash") | |
if exists("g:is_posix") && !exists("g:is_kornshell") | |
let g:is_kornshell= g:is_posix | |
endif | |
if exists("g:is_kornshell") | |
let b:is_kornshell= 1 | |
if exists("b:is_sh") | |
unlet b:is_sh | |
endif | |
elseif exists("g:is_bash") | |
let b:is_bash= 1 | |
if exists("b:is_sh") | |
unlet b:is_sh | |
endif | |
else | |
let b:is_sh= 1 | |
endif | |
endif | |
" set up default g:sh_fold_enabled {{{1 | |
3 0.000007 if !exists("g:sh_fold_enabled") | |
let g:sh_fold_enabled= 0 | |
elseif g:sh_fold_enabled != 0 && !has("folding") | |
let g:sh_fold_enabled= 0 | |
echomsg "Ignoring g:sh_fold_enabled=".g:sh_fold_enabled."; need to re-compile vim for +fold support" | |
endif | |
3 0.000008 if !exists("s:sh_fold_functions") | |
let s:sh_fold_functions= and(g:sh_fold_enabled,1) | |
endif | |
3 0.000006 if !exists("s:sh_fold_heredoc") | |
let s:sh_fold_heredoc = and(g:sh_fold_enabled,2) | |
endif | |
3 0.000007 if !exists("s:sh_fold_ifdofor") | |
let s:sh_fold_ifdofor = and(g:sh_fold_enabled,4) | |
endif | |
3 0.000004 if g:sh_fold_enabled && &fdm == "manual" | |
" Given that the user provided g:sh_fold_enabled | |
" AND g:sh_fold_enabled is manual (usual default) | |
" implies a desire for syntax-based folding | |
setl fdm=syntax | |
endif | |
" sh syntax is case sensitive {{{1 | |
3 0.000007 syn case match | |
" Clusters: contains=@... clusters {{{1 | |
"================================== | |
3 0.000144 syn cluster shErrorList contains=shDoError,shIfError,shInError,shCaseError,shEsacError,shCurlyError,shParenError,shTestError,shOK | |
3 0.000006 if exists("b:is_kornshell") | |
syn cluster ErrorList add=shDTestError | |
endif | |
3 0.000202 syn cluster shArithParenList contains=shArithmetic,shCaseEsac,shDeref,shDerefSimple,shEcho,shEscape,shNumber,shOperator,shPosnParm,shExSingleQuote,shExDoubleQuote,shRedir,shSingleQuote,shDoubleQuote,shStatement,shVariable,shAlias,shTest,shCtrlSeq,shSpecial,shParen,bashSpecialVariables,bashStatement | |
3 0.000027 syn cluster shArithList contains=@shArithParenList,shParenError | |
3 0.000123 syn cluster shCaseEsacList contains=shCaseStart,shCase,shCaseBar,shCaseIn,shComment,shDeref,shDerefSimple,shCaseCommandSub,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote,shCtrlSeq,@shErrorList,shStringSpecial,shCaseRange | |
3 0.000134 syn cluster shCaseList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq | |
"syn cluster shColonList contains=@shCaseList | |
3 0.000165 syn cluster shCommandSubList contains=shArithmetic,shDeref,shDerefSimple,shEcho,shEscape,shNumber,shOption,shPosnParm,shExSingleQuote,shSingleQuote,shExDoubleQuote,shDoubleQuote,shStatement,shVariable,shSubSh,shAlias,shTest,shCtrlSeq,shSpecial,shCmdParenRegion | |
3 0.000047 syn cluster shCurlyList contains=shNumber,shComma,shDeref,shDerefSimple,shDerefSpecial | |
3 0.000065 syn cluster shDblQuoteList contains=shCommandSub,shDeref,shDerefSimple,shEscape,shPosnParm,shCtrlSeq,shSpecial | |
3 0.000054 syn cluster shDerefList contains=shDeref,shDerefSimple,shDerefVar,shDerefSpecial,shDerefWordError,shDerefPPS | |
3 0.000029 syn cluster shDerefVarList contains=shDerefOp,shDerefVarArray,shDerefOpError | |
3 0.000104 syn cluster shEchoList contains=shArithmetic,shCommandSub,shDeref,shDerefSimple,shEscape,shExpr,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shCtrlSeq,shEchoQuote | |
3 0.000104 syn cluster shExprList1 contains=shCharClass,shNumber,shOperator,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shDblBrace,shDeref,shDerefSimple,shCtrlSeq | |
3 0.000025 syn cluster shExprList2 contains=@shExprList1,@shCaseList,shTest | |
3 0.000148 syn cluster shFunctionList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shHereDoc,shIf,shOption,shRedir,shSetList,shSource,shStatement,shVariable,shOperator,shCtrlSeq | |
3 0.000013 if exists("b:is_kornshell") || exists("b:is_bash") | |
3 0.000024 syn cluster shFunctionList add=shRepeat | |
3 0.000022 syn cluster shFunctionList add=shDblBrace,shDblParen | |
3 0.000003 endif | |
3 0.000011 syn cluster shHereBeginList contains=@shCommandSubList | |
3 0.000020 syn cluster shHereList contains=shBeginHere,shHerePayload | |
3 0.000024 syn cluster shHereListDQ contains=shBeginHere,@shDblQuoteList,shHerePayload | |
3 0.000116 syn cluster shIdList contains=shCommandSub,shWrapLineOperator,shSetOption,shDeref,shDerefSimple,shRedir,shExSingleQuote,shExDoubleQuote,shSingleQuote,shDoubleQuote,shExpr,shCtrlSeq,shStringSpecial,shAtExpr | |
3 0.000045 syn cluster shIfList contains=@shLoopList,shDblBrace,shDblParen,shFunctionKey,shFunctionOne,shFunctionTwo | |
3 0.000072 syn cluster shLoopList contains=@shCaseList,shTestOpr,shExpr,shDblBrace,shConditional,shCaseEsac,shTest,@shErrorList,shSet,shOption | |
3 0.000134 syn cluster shSubShList contains=@shCommandSubList,shCaseEsac,shColon,shCommandSub,shComment,shDo,shEcho,shExpr,shFor,shIf,shRedir,shSetList,shSource,shStatement,shVariable,shCtrlSeq,shOperator | |
3 0.000128 syn cluster shTestList contains=shCharClass,shComment,shCommandSub,shDeref,shDerefSimple,shExDoubleQuote,shDoubleQuote,shExpr,shNumber,shOperator,shExSingleQuote,shSingleQuote,shTestOpr,shTest,shCtrlSeq | |
" Echo: {{{1 | |
" ==== | |
" This one is needed INSIDE a CommandSub, so that `echo bla` be correct | |
3 0.000091 syn region shEcho matchgroup=shStatement start="\<echo\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()`]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=@shEchoList skipwhite nextgroup=shQuickComment | |
3 0.000089 syn region shEcho matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|()`]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=@shEchoList skipwhite nextgroup=shQuickComment | |
3 0.000024 syn match shEchoQuote contained '\%(\\\\\)*\\["`'()]' | |
" This must be after the strings, so that ... \" will be correct | |
3 0.000156 syn region shEmbeddedEcho contained matchgroup=shStatement start="\<print\>" skip="\\$" matchgroup=shEchoDelim end="$" matchgroup=NONE end="[<>;&|`)]"me=e-1 end="\d[<>]"me=e-2 end="\s#"me=e-2 contains=shNumber,shExSingleQuote,shSingleQuote,shDeref,shDerefSimple,shSpecialVar,shOperator,shExDoubleQuote,shDoubleQuote,shCharClass,shCtrlSeq | |
" Alias: {{{1 | |
" ===== | |
3 0.000014 if exists("b:is_kornshell") || exists("b:is_bash") | |
3 0.000021 syn match shStatement "\<alias\>" | |
3 0.000052 syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+\)\@=" skip="\\$" end="\>\|`" | |
3 0.000045 syn region shAlias matchgroup=shStatement start="\<alias\>\s\+\(\h[-._[:alnum:]]\+=\)\@=" skip="\\$" end="=" | |
3 0.000002 endif | |
" Error Codes: {{{1 | |
" ============ | |
3 0.000013 if !exists("g:sh_no_error") | |
3 0.000019 syn match shDoError "\<done\>" | |
3 0.000017 syn match shIfError "\<fi\>" | |
3 0.000015 syn match shInError "\<in\>" | |
3 0.000013 syn match shCaseError ";;" | |
3 0.000017 syn match shEsacError "\<esac\>" | |
3 0.000014 syn match shCurlyError "}" | |
3 0.000014 syn match shParenError ")" | |
3 0.000023 syn match shOK '\.\(done\|fi\|in\|esac\)' | |
3 0.000008 if exists("b:is_kornshell") | |
syn match shDTestError "]]" | |
endif | |
3 0.000016 syn match shTestError "]" | |
3 0.000002 endif | |
" Options: {{{1 | |
" ==================== | |
3 0.000024 syn match shOption "\s\zs[-+][-_a-zA-Z0-9#]\+" | |
3 0.000021 syn match shOption "\s\zs--[^ \t$`'"|);]\+" | |
" File Redirection Highlighted As Operators: {{{1 | |
"=========================================== | |
3 0.000019 syn match shRedir "\d\=>\(&[-0-9]\)\=" | |
3 0.000014 syn match shRedir "\d\=>>-\=" | |
3 0.000015 syn match shRedir "\d\=<\(&[-0-9]\)\=" | |
3 0.000014 syn match shRedir "\d<<-\=" | |
" Operators: {{{1 | |
" ========== | |
3 0.000015 syn match shOperator "<<\|>>" contained | |
3 0.000014 syn match shOperator "[!&;|]" contained | |
3 0.000018 syn match shOperator "\[[[^:]\|\]]" contained | |
3 0.000025 syn match shOperator "!\==" skipwhite nextgroup=shPattern | |
3 0.000067 syn match shPattern "\<\S\+\())\)\@=" contained contains=shExSingleQuote,shSingleQuote,shExDoubleQuote,shDoubleQuote,shDeref | |
" Subshells: {{{1 | |
" ========== | |
3 0.000041 syn region shExpr transparent matchgroup=shExprRegion start="{" end="}" contains=@shExprList2 nextgroup=shMoreSpecial | |
3 0.000040 syn region shSubSh transparent matchgroup=shSubShRegion start="[^(]\zs(" end=")" contains=@shSubShList nextgroup=shMoreSpecial | |
" Tests: {{{1 | |
"======= | |
3 0.000050 syn region shExpr matchgroup=shRange start="\[" skip=+\\\\\|\\$\|\[+ end="\]" contains=@shTestList,shSpecial | |
3 0.000049 syn region shTest transparent matchgroup=shStatement start="\<test\s" skip=+\\\\\|\\$+ matchgroup=NONE end="[;&|]"me=e-1 end="$" contains=@shExprList1 | |
3 0.000030 syn match shTestOpr contained "<=\|>=\|!=\|==\|-.\>\|-\(nt\|ot\|ef\|eq\|ne\|lt\|le\|gt\|ge\)\>\|[!<>]" | |
3 0.000036 syn match shTestOpr contained '=' skipwhite nextgroup=shTestDoubleQuote,shTestSingleQuote,shTestPattern | |
3 0.000014 syn match shTestPattern contained '\w\+' | |
3 0.000023 syn match shTestDoubleQuote contained '\%(\%(\\\\\)*\\\)\@<!"[^"]*"' | |
3 0.000013 syn match shTestSingleQuote contained '\\.' | |
3 0.000012 syn match shTestSingleQuote contained "'[^']*'" | |
3 0.000015 if exists("b:is_kornshell") || exists("b:is_bash") | |
3 0.000080 syn region shDblBrace matchgroup=Delimiter start="\[\[" skip=+\\\\\|\\$+ end="\]\]" contains=@shTestList | |
3 0.000047 syn region shDblParen matchgroup=Delimiter start="((" skip=+\\\\\|\\$+ end="))" contains=@shTestList | |
3 0.000004 endif | |
" Character Class In Range: {{{1 | |
" ========================= | |
3 0.000036 syn match shCharClass contained "\[:\(backspace\|escape\|return\|xdigit\|alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|tab\):\]" | |
" Loops: do, if, while, until {{{1 | |
" ====== | |
3 0.000005 if s:sh_fold_ifdofor | |
syn region shDo fold transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList | |
syn region shIf fold transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional skip=+-fi\>+ end="\<;\_s*then\>" end="\<fi\>" contains=@shIfList | |
syn region shFor fold matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn | |
else | |
3 0.000039 syn region shDo transparent matchgroup=shConditional start="\<do\>" matchgroup=shConditional end="\<done\>" contains=@shLoopList | |
3 0.000058 syn region shIf transparent matchgroup=shConditional start="\<if\_s" matchgroup=shConditional skip=+-fi\>+ end="\<;\_s*then\>" end="\<fi\>" contains=@shIfList | |
3 0.000052 syn region shFor matchgroup=shLoop start="\<for\ze\_s\s*\%(((\)\@!" end="\<in\>" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen skipwhite nextgroup=shCurlyIn | |
3 0.000018 syn match shForPP '\<for\>\ze\_s*((' | |
3 0.000002 endif | |
3 0.000013 if exists("b:is_kornshell") || exists("b:is_bash") | |
3 0.000023 syn cluster shCaseList add=shRepeat | |
3 0.000017 syn cluster shFunctionList add=shRepeat | |
3 0.000059 syn region shRepeat matchgroup=shLoop start="\<while\_s" end="\<in\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace | |
3 0.000050 syn region shRepeat matchgroup=shLoop start="\<until\_s" end="\<in\_s" end="\<do\>"me=e-2 contains=@shLoopList,shDblParen,shDblBrace | |
3 0.000039 syn region shCaseEsac matchgroup=shConditional start="\<select\s" matchgroup=shConditional end="\<in\>" end="\<do\>" contains=@shLoopList | |
3 0.000003 else | |
syn region shRepeat matchgroup=shLoop start="\<while\_s" end="\<do\>"me=e-2 contains=@shLoopList | |
syn region shRepeat matchgroup=shLoop start="\<until\_s" end="\<do\>"me=e-2 contains=@shLoopList | |
endif | |
3 0.000070 syn region shCurlyIn contained matchgroup=Delimiter start="{" end="}" contains=@shCurlyList | |
3 0.000016 syn match shComma contained "," | |
" Case: case...esac {{{1 | |
" ==== | |
3 0.000098 syn match shCaseBar contained skipwhite "\(^\|[^\\]\)\(\\\\\)*\zs|" nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote | |
3 0.000034 syn match shCaseStart contained skipwhite skipnl "(" nextgroup=shCase,shCaseBar | |
3 0.000006 if s:sh_fold_ifdofor | |
syn region shCase fold contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment | |
syn region shCaseEsac fold matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList | |
else | |
3 0.000069 syn region shCase contained skipwhite skipnl matchgroup=shSnglCase start="\%(\\.\|[^#$()'" \t]\)\{-}\zs)" end=";;" end="esac"me=s-1 contains=@shCaseList nextgroup=shCaseStart,shCase,shComment | |
3 0.000030 syn region shCaseEsac matchgroup=shConditional start="\<case\>" end="\<esac\>" contains=@shCaseEsacList | |
3 0.000003 endif | |
3 0.000070 syn keyword shCaseIn contained skipwhite skipnl in nextgroup=shCase,shCaseStart,shCaseBar,shComment,shCaseExSingleQuote,shCaseSingleQuote,shCaseDoubleQuote | |
3 0.000008 if exists("b:is_bash") | |
3 0.000066 syn region shCaseExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial skipwhite skipnl nextgroup=shCaseBar contained | |
3 0.000005 elseif !exists("g:sh_no_error") | |
syn region shCaseExSingleQuote matchgroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained | |
endif | |
3 0.000045 syn region shCaseSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained | |
3 0.000053 syn region shCaseDoubleQuote matchgroup=shQuote start=+"+ skip=+\\\\\|\\.+ end=+"+ contains=@shDblQuoteList,shStringSpecial skipwhite skipnl nextgroup=shCaseBar contained | |
3 0.000044 syn region shCaseCommandSub start=+`+ skip=+\\\\\|\\.+ end=+`+ contains=@shCommandSubList skipwhite skipnl nextgroup=shCaseBar contained | |
3 0.000009 if exists("b:is_bash") | |
3 0.000055 syn region shCaseRange matchgroup=Delimiter start=+\[+ skip=+\\\\+ end=+\]+ contained contains=shCharClass | |
3 0.000040 syn match shCharClass '\[:\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|word\|or\|xdigit\):\]' contained | |
3 0.000002 else | |
syn region shCaseRange matchgroup=Delimiter start=+\[+ skip=+\\\\+ end=+\]+ contained | |
endif | |
" Misc: {{{1 | |
"====== | |
3 0.000017 syn match shWrapLineOperator "\\$" | |
3 0.000035 syn region shCommandSub start="`" skip="\\\\\|\\." end="`" contains=@shCommandSubList | |
3 0.000026 syn match shEscape contained '\%(^\)\@!\%(\\\\\)*\\.' | |
" $() and $(()): {{{1 | |
" $(..) is not supported by sh (Bourne shell). However, apparently | |
" some systems (HP?) have as their /bin/sh a (link to) Korn shell | |
" (ie. Posix compliant shell). /bin/ksh should work for those | |
" systems too, however, so the following syntax will flag $(..) as | |
" an Error under /bin/sh. By consensus of vimdev'ers! | |
3 0.000012 if exists("b:is_kornshell") || exists("b:is_bash") | |
3 0.000036 syn region shCommandSub matchgroup=shCmdSubRegion start="\$(" skip='\\\\\|\\.' end=")" contains=@shCommandSubList | |
3 0.000041 syn region shArithmetic matchgroup=shArithRegion start="\$((" skip='\\\\\|\\.' end="))" contains=@shArithList | |
3 0.000038 syn region shArithmetic matchgroup=shArithRegion start="\$\[" skip='\\\\\|\\.' end="\]" contains=@shArithList | |
3 0.000017 syn match shSkipInitWS contained "^\s\+" | |
3 0.000004 elseif !exists("g:sh_no_error") | |
syn region shCommandSub matchgroup=Error start="\$(" end=")" contains=@shCommandSubList | |
endif | |
3 0.000036 syn region shCmdParenRegion matchgroup=shCmdSubRegion start="(" skip='\\\\\|\\.' end=")" contains=@shCommandSubList | |
3 0.000014 if exists("b:is_bash") | |
3 0.000031 syn cluster shCommandSubList add=bashSpecialVariables,bashStatement | |
3 0.000032 syn cluster shCaseList add=bashAdminStatement,bashStatement | |
3 0.000163 syn keyword bashSpecialVariables contained auto_resume BASH BASH_ALIASES BASH_ALIASES BASH_ARGC BASH_ARGC BASH_ARGV BASH_ARGV BASH_CMDS BASH_CMDS BASH_COMMAND BASH_COMMAND BASH_ENV BASH_EXECUTION_STRING BASH_EXECUTION_STRING BASH_LINENO BASH_LINENO BASHOPTS BASHOPTS BASHPID BASHPID BASH_REMATCH BASH_REMATCH BASH_SOURCE BASH_SOURCE BASH_SUBSHELL BASH_SUBSHELL BASH_VERSINFO BASH_VERSION BASH_XTRACEFD BASH_XTRACEFD CDPATH COLUMNS COLUMNS COMP_CWORD COMP_CWORD COMP_KEY COMP_KEY COMP_LINE COMP_LINE COMP_POINT COMP_POINT COMPREPLY COMPREPLY COMP_TYPE COMP_TYPE COMP_WORDBREAKS COMP_WORDBREAKS COMP_WORDS COMP_WORDS COPROC COPROC DIRSTACK EMACS EMACS ENV ENV EUID FCEDIT FIGNORE FUNCNAME FUNCNAME FUNCNEST FUNCNEST GLOBIGNORE GROUPS histchars HISTCMD HISTCONTROL HISTFILE HISTFILESIZE HISTIGNORE HISTSIZE HISTTIMEFORMAT HISTTIMEFORMAT HOME HOSTFILE HOSTNAME HOSTTYPE IFS IGNOREEOF INPUTRC LANG LC_ALL LC_COLLATE LC_CTYPE LC_CTYPE LC_MESSAGES LC_NUMERIC LC_NUMERIC LINENO LINES LINES MACHTYPE MAIL MAILCHECK MAILPATH MAPFILE 3 0.000037 syn keyword bashStatement chmod clear complete du egrep expr fgrep find gnufind gnugrep grep less ls mkdir mv rm rmdir rpm sed sleep sort strip tail touch | |
3 0.000017 syn keyword bashAdminStatement daemon killall killproc nice reload restart start status stop | |
3 0.000011 syn keyword bashStatement command compgen | |
3 0.000002 endif | |
3 0.000007 if exists("b:is_kornshell") | |
syn cluster shCommandSubList add=kshSpecialVariables,kshStatement | |
syn cluster shCaseList add=kshStatement | |
syn keyword kshSpecialVariables contained CDPATH COLUMNS EDITOR ENV ERRNO FCEDIT FPATH HISTFILE HISTSIZE HOME IFS LINENO LINES MAIL MAILCHECK MAILPATH OLDPWD OPTARG OPTIND PATH PPID PS1 PS2 PS3 PS4 PWD RANDOM REPLY SECONDS SHELL TMOUT VISUAL | |
syn keyword kshStatement cat chmod clear cp du egrep expr fgrep find grep killall less ls mkdir mv nice printenv rm rmdir sed sort strip stty tail touch tput | |
syn keyword kshStatement command setgroups setsenv | |
endif | |
3 0.000019 syn match shSource "^\.\s" | |
3 0.000016 syn match shSource "\s\.\s" | |
"syn region shColon start="^\s*:" end="$" end="\s#"me=e-2 contains=@shColonList | |
"syn region shColon start="^\s*\zs:" end="$" end="\s#"me=e-2 | |
3 0.000016 syn match shColon '^\s*\zs:' | |
" String And Character Constants: {{{1 | |
"================================ | |
3 0.000029 syn match shNumber "-\=\<\d\+\>#\=" | |
3 0.000021 syn match shCtrlSeq "\\\d\d\d\|\\[abcfnrtv0]" contained | |
3 0.000008 if exists("b:is_bash") | |
3 0.000026 syn match shSpecial "\\\o\o\o\|\\x\x\x\|\\c[^"]\|\\[abefnrtv]" contained | |
3 0.000002 endif | |
3 0.000006 if exists("b:is_bash") | |
3 0.000070 syn region shExSingleQuote matchgroup=shQuote start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial,shSpecial | |
3 0.000059 syn region shExDoubleQuote matchgroup=shQuote start=+\$"+ skip=+\\\\\|\\.\|\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,shSpecial | |
3 0.000006 elseif !exists("g:sh_no_error") | |
syn region shExSingleQuote matchGroup=Error start=+\$'+ skip=+\\\\\|\\.+ end=+'+ contains=shStringSpecial | |
syn region shExDoubleQuote matchGroup=Error start=+\$"+ skip=+\\\\\|\\.+ end=+"+ contains=shStringSpecial | |
endif | |
3 0.000040 syn region shSingleQuote matchgroup=shQuote start=+'+ end=+'+ contains=@Spell | |
3 0.000056 syn region shDoubleQuote matchgroup=shQuote start=+\%(\%(\\\\\)*\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial,@Spell | |
3 0.000020 syn match shStringSpecial "[^[:print:] \t]" contained | |
3 0.000020 syn match shStringSpecial "\%(\\\\\)*\\[\\"'`$()#]" | |
"syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial,shComment | |
3 0.000031 syn match shSpecial "[^\\]\zs\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shMoreSpecial | |
3 0.000032 syn match shSpecial "^\%(\\\\\)*\\[\\"'`$()#]" nextgroup=shComment | |
3 0.000025 syn match shMoreSpecial "\%(\\\\\)*\\[\\"'`$()#]" contained nextgroup=shMoreSpecial | |
" Comments: {{{1 | |
"========== | |
3 0.000020 syn cluster shCommentGroup contains=shTodo,@Spell | |
3 0.000015 syn keyword shTodo contained COMBAK FIXME TODO XXX | |
3 0.000026 syn match shComment "^\s*\zs#.*$" contains=@shCommentGroup | |
3 0.000021 syn match shComment "\s\zs#.*$" contains=@shCommentGroup | |
3 0.000020 syn match shComment contained "#.*$" contains=@shCommentGroup | |
3 0.000014 syn match shQuickComment contained "#.*$" | |
" Here Documents: {{{1 | |
" ========================================= | |
3 0.000007 if version < 600 | |
syn region shHereDoc matchgroup=shRedir01 start="<<\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shRedir01 end="^END[a-zA-Z_0-9]*$" contains=@shDblQuoteList | |
syn region shHereDoc matchgroup=shRedir02 start="<<-\s*\**END[a-zA-Z_0-9]*\**" matchgroup=shRedir02 end="^\s*END[a-zA-Z_0-9]*$" contains=@shDblQuoteList | |
syn region shHereDoc matchgroup=shRedir03 start="<<\s*\**EOF\**" matchgroup=shRedir03 end="^EOF$" contains=@shDblQuoteList | |
syn region shHereDoc matchgroup=shRedir04 start="<<-\s*\**EOF\**" matchgroup=shRedir04 end="^\s*EOF$" contains=@shDblQuoteList | |
syn region shHereDoc matchgroup=shRedir05 start="<<\s*\**\.\**" matchgroup=shRedir05 end="^\.$" contains=@shDblQuoteList | |
syn region shHereDoc matchgroup=shRedir06 start="<<-\s*\**\.\**" matchgroup=shRedir06 end="^\s*\.$" contains=@shDblQuoteList | |
elseif s:sh_fold_heredoc | |
syn region shHereDoc matchgroup=shRedir07 fold start="<<\s*\z([^ \t|]*\)" matchgroup=shRedir07 end="^\z1\s*$" contains=@shDblQuoteList | |
syn region shHereDoc matchgroup=shRedir08 fold start="<<\s*\"\z([^ \t|]*\)\"" matchgroup=shRedir08 end="^\z1\s*$" | |
syn region shHereDoc matchgroup=shRedir09 fold start="<<\s*'\z([^ \t|]*\)'" matchgroup=shRedir09 end="^\z1\s*$" | |
syn region shHereDoc matchgroup=shRedir10 fold start="<<-\s*\z([^ \t|]*\)" matchgroup=shRedir10 end="^\s*\z1\s*$" contains=@shDblQuoteList | |
syn region shHereDoc matchgroup=shRedir11 fold start="<<-\s*\"\z([^ \t|]*\)\"" matchgroup=shRedir11 end="^\s*\z1\s*$" | |
syn region shHereDoc matchgroup=shRedir12 fold start="<<-\s*'\z([^ \t|]*\)'" matchgroup=shRedir12 end="^\s*\z1\s*$" | |
syn region shHereDoc matchgroup=shRedir13 fold start="<<\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shRedir13 end="^\z1\s*$" | |
syn region shHereDoc matchgroup=shRedir14 fold start="<<\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shRedir14 end="^\z1\s*$" | |
syn region shHereDoc matchgroup=shRedir15 fold start="<<-\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shRedir15 end="^\s*\z1\s*$" | |
syn region shHereDoc matchgroup=shRedir16 fold start="<<-\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shRedir16 end="^\s*\z1\s*$" | |
syn region shHereDoc matchgroup=shRedir17 fold start="<<-\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shRedir17 end="^\s*\z1\s*$" | |
syn region shHereDoc matchgroup=shRedir18 fold start="<<\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shRedir18 end="^\z1\s*$" | |
syn region shHereDoc matchgroup=shRedir19 fold start="<<\\\z([^ \t|]*\)" matchgroup=shRedir19 end="^\z1\s*$" | |
else | |
3 0.000046 syn region shHereDoc matchgroup=shRedir20 start="<<\s*\\\=\z([^ \t|]*\)" matchgroup=shRedir20 end="^\z1\s*$" contains=@shDblQuoteList | |
3 0.000032 syn region shHereDoc matchgroup=shRedir21 start="<<\s*\"\z([^ \t|]*\)\"" matchgroup=shRedir21 end="^\z1\s*$" | |
3 0.000034 syn region shHereDoc matchgroup=shRedir22 start="<<-\s*\z([^ \t|]*\)" matchgroup=shRedir22 end="^\s*\z1\s*$" contains=@shDblQuoteList | |
3 0.000030 syn region shHereDoc matchgroup=shRedir23 start="<<-\s*'\z([^ \t|]*\)'" matchgroup=shRedir23 end="^\s*\z1\s*$" | |
3 0.000036 syn region shHereDoc matchgroup=shRedir24 start="<<\s*'\z([^ \t|]*\)'" matchgroup=shRedir24 end="^\z1\s*$" | |
3 0.000028 syn region shHereDoc matchgroup=shRedir25 start="<<-\s*\"\z([^ \t|]*\)\"" matchgroup=shRedir25 end="^\s*\z1\s*$" | |
3 0.000030 syn region shHereDoc matchgroup=shRedir26 start="<<\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shRedir26 end="^\z1\s*$" | |
3 0.000032 syn region shHereDoc matchgroup=shRedir27 start="<<-\s*\\\_$\_s*\z([^ \t|]*\)" matchgroup=shRedir27 end="^\s*\z1\s*$" | |
3 0.000031 syn region shHereDoc matchgroup=shRedir28 start="<<-\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shRedir28 end="^\s*\z1\s*$" | |
3 0.000037 syn region shHereDoc matchgroup=shRedir29 start="<<\s*\\\_$\_s*'\z([^ \t|]*\)'" matchgroup=shRedir29 end="^\z1\s*$" | |
3 0.000030 syn region shHereDoc matchgroup=shRedir30 start="<<\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shRedir30 end="^\z1\s*$" | |
3 0.000033 syn region shHereDoc matchgroup=shRedir31 start="<<-\s*\\\_$\_s*\"\z([^ \t|]*\)\"" matchgroup=shRedir31 end="^\s*\z1\s*$" | |
3 0.000029 syn region shHereDoc matchgroup=shRedir32 start="<<\\\z([^ \t|]*\)" matchgroup=shRedir32 end="^\z1\s*$" | |
3 0.000002 endif | |
" Here Strings: {{{1 | |
" ============= | |
" available for: bash; ksh (really should be ksh93 only) but not if its a posix | |
3 0.000015 if exists("b:is_bash") || (exists("b:is_kornshell") && !exists("g:is_posix")) | |
3 0.000032 syn match shRedir "<<<" skipwhite nextgroup=shCmdParenRegion | |
3 0.000003 endif | |
" Identifiers: {{{1 | |
"============= | |
3 0.000026 syn match shSetOption "\s\zs[-+][a-zA-Z0-9]\+\>" contained | |
3 0.000035 syn match shVariable "\<\([bwglsav]:\)\=[a-zA-Z0-9.!@_%+,]*\ze=" nextgroup=shSetIdentifier | |
3 0.000093 syn match shSetIdentifier "=" contained nextgroup=shCmdParenRegion,shPattern,shDeref,shDerefSimple,shDoubleQuote,shExDoubleQuote,shSingleQuote,shExSingleQuote | |
3 0.000026 syn region shAtExpr contained start="@(" end=")" contains=@shIdList | |
3 0.000009 if exists("b:is_bash") | |
3 0.000061 syn region shSetList oneline matchgroup=shSet start="\<\(declare\|typeset\|local\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+#\|=" contains=@shIdList | |
3 0.000062 syn region shSetList oneline matchgroup=shSet start="\<set\>\ze[^/]" end="\ze[;|)]\|$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+=" contains=@shIdList | |
3 0.000006 elseif exists("b:is_kornshell") | |
syn region shSetList oneline matchgroup=shSet start="\<\(typeset\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList | |
syn region shSetList oneline matchgroup=shSet start="\<set\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList | |
else | |
syn region shSetList oneline matchgroup=shSet start="\<\(set\|export\|unset\)\>\ze[^/]" end="$" matchgroup=shSetListDelim end="\ze[}|);&]" matchgroup=NONE end="\ze\s\+[#=]" contains=@shIdList | |
endif | |
" Functions: {{{1 | |
3 0.000010 if !exists("g:is_posix") | |
syn keyword shFunctionKey function skipwhite skipnl nextgroup=shFunctionTwo | |
endif | |
3 0.000008 if exists("b:is_bash") | |
3 0.000005 if s:sh_fold_functions | |
syn region shFunctionOne fold matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment | |
syn region shFunctionTwo fold matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment | |
else | |
3 0.000037 syn region shFunctionOne matchgroup=shFunction start="^\s*\h[-a-zA-Z_0-9]*\s*()\_s*{" end="}" contains=@shFunctionList | |
3 0.000041 syn region shFunctionTwo matchgroup=shFunction start="\h[-a-zA-Z_0-9]*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained | |
3 0.000004 endif | |
3 0.000002 else | |
if s:sh_fold_functions | |
syn region shFunctionOne fold matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList skipwhite skipnl nextgroup=shFunctionStart,shQuickComment | |
syn region shFunctionTwo fold matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained skipwhite skipnl nextgroup=shFunctionStart,shQuickComment | |
else | |
syn region shFunctionOne matchgroup=shFunction start="^\s*\h\w*\s*()\_s*{" end="}" contains=@shFunctionList | |
syn region shFunctionTwo matchgroup=shFunction start="\h\w*\s*\%(()\)\=\_s*{" end="}" contains=shFunctionKey,@shFunctionList contained | |
endif | |
endif | |
" Parameter Dereferencing: {{{1 | |
" ======================== | |
3 0.000023 syn match shDerefSimple "\$\%(\k\+\|\d\)" | |
3 0.000068 syn region shDeref matchgroup=PreProc start="\${" end="}" contains=@shDerefList,shDerefVarArray | |
3 0.000008 if !exists("g:sh_no_error") | |
3 0.000019 syn match shDerefWordError "[^}$[]" contained | |
3 0.000003 endif | |
3 0.000016 syn match shDerefSimple "\$[-#*@!?]" | |
3 0.000015 syn match shDerefSimple "\$\$" | |
3 0.000008 if exists("b:is_bash") || exists("b:is_kornshell") | |
3 0.000051 syn region shDeref matchgroup=PreProc start="\${##\=" end="}" contains=@shDerefList | |
3 0.000041 syn region shDeref matchgroup=PreProc start="\${\$\$" end="}" contains=@shDerefList | |
3 0.000003 endif | |
" bash: ${!prefix*} and ${#parameter}: {{{1 | |
" ==================================== | |
3 0.000008 if exists("b:is_bash") | |
3 0.000056 syn region shDeref matchgroup=PreProc start="\${!" end="\*\=}" contains=@shDerefList,shDerefOp | |
3 0.000027 syn match shDerefVar contained "{\@<=!\k\+" nextgroup=@shDerefVarList | |
3 0.000002 endif | |
3 0.000036 syn match shDerefSpecial contained "{\@<=[-*@?0]" nextgroup=shDerefOp,shDerefOpError | |
3 0.000034 syn match shDerefSpecial contained "\({[#!]\)\@<=[[:alnum:]*@_]\+" nextgroup=@shDerefVarList,shDerefOp | |
3 0.000020 syn match shDerefVar contained "{\@<=\k\+" nextgroup=@shDerefVarList | |
" sh ksh bash : ${var[... ]...} array reference: {{{1 | |
3 0.000050 syn region shDerefVarArray contained matchgroup=shDeref start="\[" end="]" contains=@shCommandSubList nextgroup=shDerefOp,shDerefOpError | |
" Special ${parameter OPERATOR word} handling: {{{1 | |
" sh ksh bash : ${parameter:-word} word is default value | |
" sh ksh bash : ${parameter:=word} assign word as default value | |
" sh ksh bash : ${parameter:?word} display word if parameter is null | |
" sh ksh bash : ${parameter:+word} use word if parameter is not null, otherwise nothing | |
" ksh bash : ${parameter#pattern} remove small left pattern | |
" ksh bash : ${parameter##pattern} remove large left pattern | |
" ksh bash : ${parameter%pattern} remove small right pattern | |
" ksh bash : ${parameter%%pattern} remove large right pattern | |
" bash : ${parameter^pattern} Case modification | |
" bash : ${parameter^^pattern} Case modification | |
" bash : ${parameter,pattern} Case modification | |
" bash : ${parameter,,pattern} Case modification | |
3 0.000023 syn cluster shDerefPatternList contains=shDerefPattern,shDerefString | |
3 0.000008 if !exists("g:sh_no_error") | |
3 0.000018 syn match shDerefOpError contained ":[[:punct:]]" | |
3 0.000002 endif | |
3 0.000019 syn match shDerefOp contained ":\=[-=?]" nextgroup=@shDerefPatternList | |
3 0.000017 syn match shDerefOp contained ":\=+" nextgroup=@shDerefPatternList | |
3 0.000008 if exists("b:is_bash") || exists("b:is_kornshell") | |
3 0.000019 syn match shDerefOp contained "#\{1,2}" nextgroup=@shDerefPatternList | |
3 0.000018 syn match shDerefOp contained "%\{1,2}" nextgroup=@shDerefPatternList | |
3 0.000071 syn match shDerefPattern contained "[^{}]\+" contains=shDeref,shDerefSimple,shDerefPattern,shDerefString,shCommandSub,shDerefEscape nextgroup=shDerefPattern | |
3 0.000062 syn region shDerefPattern contained start="{" end="}" contains=shDeref,shDerefSimple,shDerefString,shCommandSub nextgroup=shDerefPattern | |
3 0.000018 syn match shDerefEscape contained '\%(\\\\\)*\\.' | |
3 0.000003 endif | |
3 0.000007 if exists("b:is_bash") | |
3 0.000020 syn match shDerefOp contained "[,^]\{1,2}" nextgroup=@shDerefPatternList | |
3 0.000003 endif | |
3 0.000037 syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!'+ end=+'+ contains=shStringSpecial | |
3 0.000049 syn region shDerefString contained matchgroup=shDerefDelim start=+\%(\\\)\@<!"+ skip=+\\"+ end=+"+ contains=@shDblQuoteList,shStringSpecial | |
3 0.000023 syn match shDerefString contained "\\["']" nextgroup=shDerefPattern | |
3 0.000007 if exists("b:is_bash") | |
" bash : ${parameter:offset} | |
" bash : ${parameter:offset:length} | |
3 0.000053 syn region shDerefOp contained start=":[$[:alnum:]_]"me=e-1 end=":"me=e-1 end="}"me=e-1 contains=@shCommandSubList nextgroup=shDerefPOL | |
3 0.000023 syn match shDerefPOL contained ":[^}]\+" contains=@shCommandSubList | |
" bash : ${parameter//pattern/string} | |
" bash : ${parameter//pattern} | |
3 0.000023 syn match shDerefPPS contained '/\{1,2}' nextgroup=shDerefPPSleft | |
3 0.000056 syn region shDerefPPSleft contained start='.' skip=@\%(\\\\\)*\\/@ matchgroup=shDerefOp end='/' end='\ze}' nextgroup=shDerefPPSright contains=@shCommandSubList | |
3 0.000036 syn region shDerefPPSright contained start='.' skip=@\%(\\\\\)\+@ end='\ze}' contains=@shCommandSubList | |
3 0.000002 endif | |
" Arithmetic Parenthesized Expressions: {{{1 | |
"syn region shParen matchgroup=shArithRegion start='[^$]\zs(\%(\ze[^(]\|$\)' end=')' contains=@shArithParenList | |
3 0.000035 syn region shParen matchgroup=shArithRegion start='\$\@!(\%(\ze[^(]\|$\)' end=')' contains=@shArithParenList | |
" Useful sh Keywords: {{{1 | |
" =================== | |
3 0.000032 syn keyword shStatement break cd chdir continue eval exec exit kill newgrp pwd read readonly return shift test trap ulimit umask wait | |
3 0.000013 syn keyword shConditional contained elif else then | |
3 0.000008 if !exists("g:sh_no_error") | |
3 0.000011 syn keyword shCondError elif else then | |
3 0.000002 endif | |
" Useful ksh Keywords: {{{1 | |
" ==================== | |
3 0.000011 if exists("b:is_kornshell") || exists("b:is_bash") | |
3 0.000100 syn keyword shStatement autoload bg false fc fg functions getopts hash history integer jobs let nohup printf r stop suspend times true type unalias whence | |
3 0.000008 if exists("g:is_posix") | |
3 0.000015 syn keyword shStatement command | |
3 0.000006 else | |
syn keyword shStatement time | |
endif | |
" Useful bash Keywords: {{{1 | |
" ===================== | |
3 0.000007 if exists("b:is_bash") | |
3 0.000112 syn keyword shStatement bind builtin dirs disown enable help local logout popd pushd shopt source | |
3 0.000001 else | |
syn keyword shStatement login newgrp | |
endif | |
3 0.000002 endif | |
" Synchronization: {{{1 | |
" ================ | |
3 0.000009 if !exists("sh_minlines") | |
let sh_minlines = 200 | |
endif | |
3 0.000006 if !exists("sh_maxlines") | |
let sh_maxlines = 2 * sh_minlines | |
endif | |
3 0.000027 exec "syn sync minlines=" . sh_minlines . " maxlines=" . sh_maxlines | |
3 0.000031 syn sync match shCaseEsacSync grouphere shCaseEsac "\<case\>" | |
3 0.000021 syn sync match shCaseEsacSync groupthere shCaseEsac "\<esac\>" | |
3 0.000021 syn sync match shDoSync grouphere shDo "\<do\>" | |
3 0.000019 syn sync match shDoSync groupthere shDo "\<done\>" | |
3 0.000018 syn sync match shForSync grouphere shFor "\<for\>" | |
3 0.000018 syn sync match shForSync groupthere shFor "\<in\>" | |
3 0.000018 syn sync match shIfSync grouphere shIf "\<if\>" | |
3 0.000016 syn sync match shIfSync groupthere shIf "\<fi\>" | |
3 0.000018 syn sync match shUntilSync grouphere shRepeat "\<until\>" | |
3 0.000017 syn sync match shWhileSync grouphere shRepeat "\<while\>" | |
" Default Highlighting: {{{1 | |
" ===================== | |
3 0.000015 hi def link shArithRegion shShellVariables | |
3 0.000009 hi def link shAtExpr shSetList | |
3 0.000011 hi def link shBeginHere shRedir | |
3 0.000009 hi def link shCaseBar shConditional | |
3 0.000011 hi def link shCaseCommandSub shCommandSub | |
3 0.000011 hi def link shCaseDoubleQuote shDoubleQuote | |
3 0.000010 hi def link shCaseIn shConditional | |
3 0.000009 hi def link shQuote shOperator | |
3 0.000011 hi def link shCaseSingleQuote shSingleQuote | |
3 0.000009 hi def link shCaseStart shConditional | |
3 0.000008 hi def link shCmdSubRegion shShellVariables | |
3 0.000010 hi def link shColon shComment | |
3 0.000010 hi def link shDerefOp shOperator | |
3 0.000009 hi def link shDerefPOL shDerefOp | |
3 0.000009 hi def link shDerefPPS shDerefOp | |
3 0.000009 hi def link shDeref shShellVariables | |
3 0.000009 hi def link shDerefDelim shOperator | |
3 0.000011 hi def link shDerefSimple shDeref | |
3 0.000011 hi def link shDerefSpecial shDeref | |
3 0.000009 hi def link shDerefString shDoubleQuote | |
3 0.000011 hi def link shDerefVar shDeref | |
3 0.000009 hi def link shDoubleQuote shString | |
3 0.000009 hi def link shEcho shString | |
3 0.000009 hi def link shEchoDelim shOperator | |
3 0.000008 hi def link shEchoQuote shString | |
3 0.000009 hi def link shForPP shLoop | |
3 0.000008 hi def link shEmbeddedEcho shString | |
3 0.000011 hi def link shEscape shCommandSub | |
3 0.000010 hi def link shExDoubleQuote shDoubleQuote | |
3 0.000011 hi def link shExSingleQuote shSingleQuote | |
3 0.000018 hi def link shFunction Function | |
3 0.000009 hi def link shHereDoc shString | |
3 0.000009 hi def link shHerePayload shHereDoc | |
3 0.000008 hi def link shLoop shStatement | |
3 0.000010 hi def link shMoreSpecial shSpecial | |
3 0.000008 hi def link shOption shCommandSub | |
3 0.000009 hi def link shPattern shString | |
3 0.000010 hi def link shParen shArithmetic | |
3 0.000010 hi def link shPosnParm shShellVariables | |
3 0.000008 hi def link shQuickComment shComment | |
3 0.000010 hi def link shRange shOperator | |
3 0.000011 hi def link shRedir shOperator | |
3 0.000008 hi def link shSetListDelim shOperator | |
3 0.000010 hi def link shSetOption shOption | |
3 0.000008 hi def link shSingleQuote shString | |
3 0.000009 hi def link shSource shOperator | |
3 0.000011 hi def link shStringSpecial shSpecial | |
3 0.000008 hi def link shStringSpecial Unique | |
3 0.000010 hi def link shSubShRegion shOperator | |
3 0.000010 hi def link shTestOpr shConditional | |
3 0.000007 hi def link shTestPattern shString | |
3 0.000008 hi def link shTestDoubleQuote shString | |
3 0.000008 hi def link shTestSingleQuote shString | |
3 0.000010 hi def link shVariable shSetList | |
3 0.000010 hi def link shWrapLineOperator shOperator | |
3 0.000009 if exists("b:is_bash") | |
3 0.000012 hi def link bashAdminStatement shStatement | |
3 0.000010 hi def link bashSpecialVariables shShellVariables | |
3 0.000011 hi def link bashStatement shStatement | |
3 0.000015 hi def link shFunctionParen Delimiter | |
3 0.000013 hi def link shFunctionDelim Delimiter | |
3 0.000009 hi def link shCharClass shSpecial | |
3 0.000004 endif | |
3 0.000007 if exists("b:is_kornshell") | |
hi def link kshSpecialVariables shShellVariables | |
hi def link kshStatement shStatement | |
hi def link shFunctionParen Delimiter | |
endif | |
3 0.000006 if !exists("g:sh_no_error") | |
3 0.000017 hi def link shCaseError Error | |
3 0.000014 hi def link shCondError Error | |
3 0.000016 hi def link shCurlyError Error | |
3 0.000014 hi def link shDerefError Error | |
3 0.000014 hi def link shDerefOpError Error | |
3 0.000014 hi def link shDerefWordError Error | |
3 0.000022 hi def link shDoError Error | |
3 0.000015 hi def link shEsacError Error | |
3 0.000015 hi def link shIfError Error | |
3 0.000015 hi def link shInError Error | |
3 0.000015 hi def link shParenError Error | |
3 0.000014 hi def link shTestError Error | |
3 0.000008 if exists("b:is_kornshell") | |
hi def link shDTestError Error | |
endif | |
3 0.000001 endif | |
3 0.000016 hi def link shArithmetic Special | |
3 0.000014 hi def link shCharClass Identifier | |
3 0.000015 hi def link shSnglCase Statement | |
3 0.000015 hi def link shCommandSub Special | |
3 0.000015 hi def link shComment Comment | |
3 0.000014 hi def link shConditional Conditional | |
3 0.000014 hi def link shCtrlSeq Special | |
3 0.000014 hi def link shExprRegion Delimiter | |
3 0.000014 hi def link shFunctionKey Function | |
3 0.000012 hi def link shFunctionName Function | |
3 0.000015 hi def link shNumber Number | |
3 0.000014 hi def link shOperator Operator | |
3 0.000015 hi def link shRepeat Repeat | |
3 0.000015 hi def link shSet Statement | |
3 0.000014 hi def link shSetList Identifier | |
3 0.000013 hi def link shShellVariables PreProc | |
3 0.000016 hi def link shSpecial Special | |
3 0.000016 hi def link shStatement Statement | |
3 0.000013 hi def link shString String | |
3 0.000014 hi def link shTodo Todo | |
3 0.000016 hi def link shAlias Identifier | |
3 0.000008 hi def link shRedir01 shRedir | |
3 0.000007 hi def link shRedir02 shRedir | |
3 0.000008 hi def link shRedir03 shRedir | |
3 0.000007 hi def link shRedir04 shRedir | |
3 0.000009 hi def link shRedir05 shRedir | |
3 0.000008 hi def link shRedir06 shRedir | |
3 0.000007 hi def link shRedir07 shRedir | |
3 0.000008 hi def link shRedir08 shRedir | |
3 0.000008 hi def link shRedir09 shRedir | |
3 0.000009 hi def link shRedir10 shRedir | |
3 0.000008 hi def link shRedir11 shRedir | |
3 0.000007 hi def link shRedir12 shRedir | |
3 0.000009 hi def link shRedir13 shRedir | |
3 0.000007 hi def link shRedir14 shRedir | |
3 0.000008 hi def link shRedir15 shRedir | |
3 0.000013 hi def link shRedir16 shRedir | |
3 0.000010 hi def link shRedir17 shRedir | |
3 0.000010 hi def link shRedir18 shRedir | |
3 0.000010 hi def link shRedir19 shRedir | |
3 0.000010 hi def link shRedir20 shRedir | |
3 0.000009 hi def link shRedir21 shRedir | |
3 0.000009 hi def link shRedir22 shRedir | |
3 0.000008 hi def link shRedir23 shRedir | |
3 0.000008 hi def link shRedir24 shRedir | |
3 0.000009 hi def link shRedir25 shRedir | |
3 0.000009 hi def link shRedir26 shRedir | |
3 0.000009 hi def link shRedir27 shRedir | |
3 0.000008 hi def link shRedir28 shRedir | |
3 0.000009 hi def link shRedir29 shRedir | |
3 0.000009 hi def link shRedir30 shRedir | |
3 0.000008 hi def link shRedir31 shRedir | |
3 0.000008 hi def link shRedir32 shRedir | |
" Set Current Syntax: {{{1 | |
" =================== | |
3 0.000009 if exists("b:is_bash") | |
3 0.000010 let b:current_syntax = "bash" | |
3 0.000004 elseif exists("b:is_kornshell") | |
let b:current_syntax = "ksh" | |
else | |
let b:current_syntax = "sh" | |
endif | |
" vim: ts=16 fdm=marker | |
SCRIPT /usr/share/vim/vim74/ftplugin/sh.vim | |
Sourced 3 times | |
Total time: 0.000233 | |
Self time: 0.000233 | |
count total (s) self (s) | |
" Vim filetype plugin file | |
" Language: sh | |
" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net> | |
" Last Changed: 20 Jan 2009 | |
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin | |
3 0.000021 if exists("b:did_ftplugin") | finish | endif | |
3 0.000009 let b:did_ftplugin = 1 | |
" Make sure the continuation lines below do not cause problems in | |
" compatibility mode. | |
3 0.000020 let s:save_cpo = &cpo | |
3 0.000025 set cpo-=C | |
3 0.000009 setlocal commentstring=#%s | |
" Shell: thanks to Johannes Zellner | |
3 0.000009 if exists("loaded_matchit") | |
let s:sol = '\%(;\s*\|^\s*\)\@<=' " start of line | |
let b:match_words = | |
\ s:sol.'if\>:' . s:sol.'elif\>:' . s:sol.'else\>:' . s:sol. 'fi\>,' . | |
\ s:sol.'\%(for\|while\)\>:' . s:sol. 'done\>,' . | |
\ s:sol.'case\>:' . s:sol. 'esac\>' | |
endif | |
" Change the :browse e filter to primarily show shell-related files. | |
3 0.000016 if has("gui_win32") | |
let b:browsefilter="Bourne Shell Scripts (*.sh)\t*.sh\n" . | |
\ "Korn Shell Scripts (*.ksh)\t*.ksh\n" . | |
\ "Bash Shell Scripts (*.bash)\t*.bash\n" . | |
\ "All Files (*.*)\t*.*\n" | |
endif | |
" Undo the stuff we changed. | |
3 0.000010 let b:undo_ftplugin = "setlocal cms< | unlet! b:browsefilter b:match_words" | |
" Restore the saved compatibility options. | |
3 0.000020 let &cpo = s:save_cpo | |
3 0.000008 unlet s:save_cpo | |
SCRIPT /usr/share/vim/vim74/indent/sh.vim | |
Sourced 3 times | |
Total time: 0.000083 | |
Self time: 0.000083 | |
count total (s) self (s) | |
" Vim indent file | |
" Language: Shell Script | |
" Maintainer: Peter Aronoff <[email protected]> | |
" Original Author: Nikolai Weibull <[email protected]> | |
" Latest Revision: 2014-08-22 | |
3 0.000011 if exists("b:did_indent") | |
finish | |
endif | |
3 0.000006 let b:did_indent = 1 | |
3 0.000009 setlocal indentexpr=GetShIndent() | |
3 0.000009 setlocal indentkeys+=0=then,0=do,0=else,0=elif,0=fi,0=esac,0=done,),0=;;,0=;& | |
3 0.000006 setlocal indentkeys+=0=fin,0=fil,0=fip,0=fir,0=fix | |
3 0.000006 setlocal indentkeys-=:,0# | |
3 0.000006 setlocal nosmartindent | |
3 0.000008 if exists("*GetShIndent") | |
3 0.000003 finish | |
SCRIPT /usr/share/vim/vim74/syntax/python.vim | |
Sourced 5 times | |
Total time: 0.004136 | |
Self time: 0.004136 | |
count total (s) self (s) | |
" Vim syntax file | |
" Language: Python | |
" Maintainer: Neil Schemenauer <[email protected]> | |
" Last Change: 2014 Jul 16 | |
" Credits: Zvezdan Petkovic <[email protected]> | |
" Neil Schemenauer <[email protected]> | |
" Dmitry Vasiliev | |
" | |
" This version is a major rewrite by Zvezdan Petkovic. | |
" | |
" - introduced highlighting of doctests | |
" - updated keywords, built-ins, and exceptions | |
" - corrected regular expressions for | |
" | |
" * functions | |
" * decorators | |
" * strings | |
" * escapes | |
" * numbers | |
" * space error | |
" | |
" - corrected synchronization | |
" - more highlighting is ON by default, except | |
" - space error highlighting is OFF by default | |
" | |
" Optional highlighting can be controlled using these variables. | |
" | |
" let python_no_builtin_highlight = 1 | |
" let python_no_doctest_code_highlight = 1 | |
" let python_no_doctest_highlight = 1 | |
" let python_no_exception_highlight = 1 | |
" let python_no_number_highlight = 1 | |
" let python_space_error_highlight = 1 | |
" | |
" All the options above can be switched on together. | |
" | |
" let python_highlight_all = 1 | |
" | |
" For version 5.x: Clear all syntax items. | |
" For version 6.x: Quit when a syntax file was already loaded. | |
5 0.000021 if version < 600 | |
syntax clear | |
elseif exists("b:current_syntax") | |
finish | |
endif | |
" We need nocompatible mode in order to continue lines with backslashes. | |
" Original setting will be restored. | |
5 0.000041 let s:cpo_save = &cpo | |
5 0.000032 set cpo&vim | |
" Keep Python keywords in alphabetical order inside groups for easy | |
" comparison with the table in the 'Python Language Reference' | |
" http://docs.python.org/reference/lexical_analysis.html#keywords. | |
" Groups are in the order presented in NAMING CONVENTIONS in syntax.txt. | |
" Exceptions come last at the end of each group (class and def below). | |
" | |
" Keywords 'with' and 'as' are new in Python 2.6 | |
" (use 'from __future__ import with_statement' in Python 2.5). | |
" | |
" Some compromises had to be made to support both Python 3.0 and 2.6. | |
" We include Python 3.0 features, but when a definition is duplicated, | |
" the last definition takes precedence. | |
" | |
" - 'False', 'None', and 'True' are keywords in Python 3.0 but they are | |
" built-ins in 2.6 and will be highlighted as built-ins below. | |
" - 'exec' is a built-in in Python 3.0 and will be highlighted as | |
" built-in below. | |
" - 'nonlocal' is a keyword in Python 3.0 and will be highlighted. | |
" - 'print' is a built-in in Python 3.0 and will be highlighted as | |
" built-in below (use 'from __future__ import print_function' in 2.6) | |
" | |
5 0.000061 syn keyword pythonStatement False, None, True | |
5 0.000025 syn keyword pythonStatement as assert break continue del exec global | |
5 0.000022 syn keyword pythonStatement lambda nonlocal pass print return with yield | |
5 0.000037 syn keyword pythonStatement class def nextgroup=pythonFunction skipwhite | |
5 0.000017 syn keyword pythonConditional elif else if | |
5 0.000018 syn keyword pythonRepeat for while | |
5 0.000101 syn keyword pythonOperator and in is not or | |
5 0.000021 syn keyword pythonException except finally raise try | |
5 0.000015 syn keyword pythonInclude from import | |
" Decorators (new in Python 2.4) | |
5 0.000054 syn match pythonDecorator "@" display nextgroup=pythonFunction skipwhite | |
" The zero-length non-grouping match before the function name is | |
" extremely important in pythonFunction. Without it, everything is | |
" interpreted as a function inside the contained environment of | |
" doctests. | |
" A dot must be allowed because of @MyClass.myfunc decorators. | |
5 0.000055 syn match pythonFunction | |
\ "\%(\%(def\s\|class\s\|@\)\s*\)\@<=\h\%(\w\|\.\)*" contained | |
5 0.000049 syn match pythonComment "#.*$" contains=pythonTodo,@Spell | |
5 0.000025 syn keyword pythonTodo FIXME NOTE NOTES TODO XXX contained | |
" Triple-quoted strings can contain doctests. | |
5 0.000124 syn region pythonString | |
\ start=+[uU]\=\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1" | |
\ contains=pythonEscape,@Spell | |
5 0.000099 syn region pythonString | |
\ start=+[uU]\=\z('''\|"""\)+ end="\z1" keepend | |
\ contains=pythonEscape,pythonSpaceError,pythonDoctest,@Spell | |
5 0.000064 syn region pythonRawString | |
\ start=+[uU]\=[rR]\z(['"]\)+ end="\z1" skip="\\\\\|\\\z1" | |
\ contains=@Spell | |
5 0.000072 syn region pythonRawString | |
\ start=+[uU]\=[rR]\z('''\|"""\)+ end="\z1" keepend | |
\ contains=pythonSpaceError,pythonDoctest,@Spell | |
5 0.000068 syn match pythonEscape +\\[abfnrtv'"\\]+ contained | |
5 0.000039 syn match pythonEscape "\\\o\{1,3}" contained | |
5 0.000024 syn match pythonEscape "\\x\x\{2}" contained | |
5 0.000036 syn match pythonEscape "\%(\\u\x\{4}\|\\U\x\{8}\)" contained | |
" Python allows case-insensitive Unicode IDs: http://www.unicode.org/charts/ | |
5 0.000024 syn match pythonEscape "\\N{.\{-}}" contained | |
5 0.000024 syn match pythonEscape "\\$" | |
5 0.000018 if exists("python_highlight_all") | |
if exists("python_no_builtin_highlight") | |
unlet python_no_builtin_highlight | |
endif | |
if exists("python_no_doctest_code_highlight") | |
unlet python_no_doctest_code_highlight | |
endif | |
if exists("python_no_doctest_highlight") | |
unlet python_no_doctest_highlight | |
endif | |
if exists("python_no_exception_highlight") | |
unlet python_no_exception_highlight | |
endif | |
if exists("python_no_number_highlight") | |
unlet python_no_number_highlight | |
endif | |
let python_space_error_highlight = 1 | |
endif | |
" It is very important to understand all details before changing the | |
" regular expressions below or their order. | |
" The word boundaries are *not* the floating-point number boundaries | |
" because of a possible leading or trailing decimal point. | |
" The expressions below ensure that all valid number literals are | |
" highlighted, and invalid number literals are not. For example, | |
" | |
" - a decimal point in '4.' at the end of a line is highlighted, | |
" - a second dot in 1.0.0 is not highlighted, | |
" - 08 is not highlighted, | |
" - 08e0 or 08j are highlighted, | |
" | |
" and so on, as specified in the 'Python Language Reference'. | |
" http://docs.python.org/reference/lexical_analysis.html#numeric-literals | |
5 0.000013 if !exists("python_no_number_highlight") | |
" numbers (including longs and complex) | |
5 0.000033 syn match pythonNumber "\<0[oO]\=\o\+[Ll]\=\>" | |
5 0.000028 syn match pythonNumber "\<0[xX]\x\+[Ll]\=\>" | |
5 0.000024 syn match pythonNumber "\<0[bB][01]\+[Ll]\=\>" | |
5 0.000028 syn match pythonNumber "\<\%([1-9]\d*\|0\)[Ll]\=\>" | |
5 0.000063 syn match pythonNumber "\<\d\+[jJ]\>" | |
5 0.000037 syn match pythonNumber "\<\d\+[eE][+-]\=\d\+[jJ]\=\>" | |
5 0.000041 syn match pythonNumber | |
\ "\<\d\+\.\%([eE][+-]\=\d\+\)\=[jJ]\=\%(\W\|$\)\@=" | |
5 0.000041 syn match pythonNumber | |
\ "\%(^\|\W\)\@<=\d*\.\d\+\%([eE][+-]\=\d\+\)\=[jJ]\=\>" | |
5 0.000004 endif | |
" Group the built-ins in the order in the 'Python Library Reference' for | |
" easier comparison. | |
" http://docs.python.org/library/constants.html | |
" http://docs.python.org/library/functions.html | |
" http://docs.python.org/library/functions.html#non-essential-built-in-functions | |
" Python built-in functions are in alphabetical order. | |
5 0.000011 if !exists("python_no_builtin_highlight") | |
" built-in constants | |
" 'False', 'True', and 'None' are also reserved words in Python 3.0 | |
5 0.000019 syn keyword pythonBuiltin False True None | |
5 0.000036 syn keyword pythonBuiltin NotImplemented Ellipsis __debug__ | |
" built-in functions | |
5 0.000041 syn keyword pythonBuiltin abs all any bin bool chr classmethod | |
5 0.000021 syn keyword pythonBuiltin compile complex delattr dict dir divmod | |
5 0.000019 syn keyword pythonBuiltin enumerate eval filter float format | |
5 0.000018 syn keyword pythonBuiltin frozenset getattr globals hasattr hash | |
5 0.000019 syn keyword pythonBuiltin help hex id input int isinstance | |
5 0.000020 syn keyword pythonBuiltin issubclass iter len list locals map max | |
5 0.000035 syn keyword pythonBuiltin min next object oct open ord pow print | |
5 0.000020 syn keyword pythonBuiltin property range repr reversed round set | |
5 0.000020 syn keyword pythonBuiltin setattr slice sorted staticmethod str | |
5 0.000021 syn keyword pythonBuiltin sum super tuple type vars zip __import__ | |
" Python 2.6 only | |
5 0.000019 syn keyword pythonBuiltin basestring callable cmp execfile file | |
5 0.000018 syn keyword pythonBuiltin long raw_input reduce reload unichr | |
5 0.000014 syn keyword pythonBuiltin unicode xrange | |
" Python 3.0 only | |
5 0.000017 syn keyword pythonBuiltin ascii bytearray bytes exec memoryview | |
" non-essential built-in functions; Python 2.6 only | |
5 0.000016 syn keyword pythonBuiltin apply buffer coerce intern | |
5 0.000004 endif | |
" From the 'Python Library Reference' class hierarchy at the bottom. | |
" http://docs.python.org/library/exceptions.html | |
5 0.000014 if !exists("python_no_exception_highlight") | |
" builtin base exceptions (only used as base classes for other exceptions) | |
5 0.000025 syn keyword pythonExceptions BaseException Exception | |
5 0.000017 syn keyword pythonExceptions ArithmeticError EnvironmentError | |
5 0.000013 syn keyword pythonExceptions LookupError | |
" builtin base exception removed in Python 3.0 | |
5 0.000014 syn keyword pythonExceptions StandardError | |
" builtin exceptions (actually raised) | |
5 0.000017 syn keyword pythonExceptions AssertionError AttributeError BufferError | |
5 0.000018 syn keyword pythonExceptions EOFError FloatingPointError GeneratorExit | |
5 0.000016 syn keyword pythonExceptions IOError ImportError IndentationError | |
5 0.000027 syn keyword pythonExceptions IndexError KeyError KeyboardInterrupt | |
5 0.000015 syn keyword pythonExceptions MemoryError NameError NotImplementedError | |
5 0.000016 syn keyword pythonExceptions OSError OverflowError ReferenceError | |
5 0.000016 syn keyword pythonExceptions RuntimeError StopIteration SyntaxError | |
5 0.000019 syn keyword pythonExceptions SystemError SystemExit TabError TypeError | |
5 0.000013 syn keyword pythonExceptions UnboundLocalError UnicodeError | |
5 0.000016 syn keyword pythonExceptions UnicodeDecodeError UnicodeEncodeError | |
5 0.000016 syn keyword pythonExceptions UnicodeTranslateError ValueError VMSError | |
5 0.000013 syn keyword pythonExceptions WindowsError ZeroDivisionError | |
" builtin warnings | |
5 0.000017 syn keyword pythonExceptions BytesWarning DeprecationWarning FutureWarning | |
5 0.000026 syn keyword pythonExceptions ImportWarning PendingDeprecationWarning | |
5 0.000061 syn keyword pythonExceptions RuntimeWarning SyntaxWarning UnicodeWarning | |
5 0.000037 syn keyword pythonExceptions UserWarning Warning | |
5 0.000004 endif | |
5 0.000013 if exists("python_space_error_highlight") | |
" trailing whitespace | |
syn match pythonSpaceError display excludenl "\s\+$" | |
" mixed tabs and spaces | |
syn match pythonSpaceError display " \+\t" | |
syn match pythonSpaceError display "\t\+ " | |
endif | |
" Do not spell doctests inside strings. | |
" Notice that the end of a string, either ''', or """, will end the contained | |
" doctest too. Thus, we do *not* need to have it as an end pattern. | |
5 0.000012 if !exists("python_no_doctest_highlight") | |
5 0.000013 if !exists("python_no_doctest_code_highlight") | |
5 0.000072 syn region pythonDoctest | |
\ start="^\s*>>>\s" end="^\s*$" | |
\ contained contains=ALLBUT,pythonDoctest,@Spell | |
5 0.000063 syn region pythonDoctestValue | |
\ start=+^\s*\%(>>>\s\|\.\.\.\s\|"""\|'''\)\@!\S\++ end="$" | |
\ contained | |
5 0.000004 else | |
syn region pythonDoctest | |
\ start="^\s*>>>" end="^\s*$" | |
\ contained contains=@NoSpell | |
endif | |
5 0.000001 endif | |
" Sync at the beginning of class, function, or method definition. | |
5 0.000044 syn sync match pythonSync grouphere NONE "^\s*\%(def\|class\)\s\+\h\w*\s*(" | |
5 0.000013 if version >= 508 || !exists("did_python_syn_inits") | |
5 0.000006 if version <= 508 | |
let did_python_syn_inits = 1 | |
command -nargs=+ HiLink hi link <args> | |
else | |
5 0.000064 command -nargs=+ HiLink hi def link <args> | |
5 0.000004 endif | |
" The default highlight links. Can be overridden later. | |
5 0.000075 HiLink pythonStatement Statement | |
5 0.000047 HiLink pythonConditional Conditional | |
5 0.000038 HiLink pythonRepeat Repeat | |
5 0.000051 HiLink pythonOperator Operator | |
5 0.000036 HiLink pythonException Exception | |
5 0.000036 HiLink pythonInclude Include | |
5 0.000035 HiLink pythonDecorator Define | |
5 0.000036 HiLink pythonFunction Function | |
5 0.000036 HiLink pythonComment Comment | |
5 0.000035 HiLink pythonTodo Todo | |
5 0.000036 HiLink pythonString String | |
5 0.000034 HiLink pythonRawString String | |
5 0.000034 HiLink pythonEscape Special | |
5 0.000015 if !exists("python_no_number_highlight") | |
5 0.000035 HiLink pythonNumber Number | |
5 0.000004 endif | |
5 0.000011 if !exists("python_no_builtin_highlight") | |
5 0.000035 HiLink pythonBuiltin Function | |
5 0.000002 endif | |
5 0.000010 if !exists("python_no_exception_highlight") | |
5 0.000040 HiLink pythonExceptions Structure | |
5 0.000004 endif | |
5 0.000011 if exists("python_space_error_highlight") | |
HiLink pythonSpaceError Error | |
endif | |
5 0.000010 if !exists("python_no_doctest_highlight") | |
5 0.000036 HiLink pythonDoctest Special | |
5 0.000034 HiLink pythonDoctestValue Define | |
5 0.000001 endif | |
5 0.000012 delcommand HiLink | |
5 0.000002 endif | |
5 0.000012 let b:current_syntax = "python" | |
5 0.000032 let &cpo = s:cpo_save | |
5 0.000007 unlet s:cpo_save | |
" vim:set sw=2 sts=2 ts=8 noet: | |
SCRIPT /home/jso/dotfiles/.vim/ftplugin/python.vim | |
Sourced 4 times | |
Total time: 0.000033 | |
Self time: 0.000033 | |
count total (s) self (s) | |
SCRIPT /home/jso/dotfiles/.vim/bundle/vim-autopep8/ftplugin/python_autopep8.vim | |
Sourced 4 times | |
Total time: 0.000748 | |
Self time: 0.000748 | |
count total (s) self (s) | |
"========================================================= | |
" File: python_autopep8.vim | |
" Author: tell-k <ffk2005[at]gmail.com> | |
" Last Change: 20-Sep-2014. | |
" Version: 1.0.7 | |
" WebPage: https://github.com/tell-k/vim-autopep8 | |
" License: MIT Licence | |
"========================================================== | |
" see also README.rst | |
" Only do this when not done yet for this buffer | |
4 0.000025 if exists("b:loaded_autopep8_ftplugin") | |
finish | |
endif | |
4 0.000012 let b:loaded_autopep8_ftplugin=1 | |
4 0.000012 if !exists("*Autopep8(...)") | |
function Autopep8(...) | |
let l:args = get(a:, 1, '') | |
if exists("g:autopep8_cmd") | |
let autopep8_cmd=g:autopep8_cmd | |
else | |
let autopep8_cmd="autopep8" | |
endif | |
if !executable(autopep8_cmd) | |
echoerr "File " . autopep8_cmd . " not found. Please install it first." | |
return | |
endif | |
if exists("g:autopep8_ignore") | |
let autopep8_ignores=" --ignore=".g:autopep8_ignore | |
else | |
let autopep8_ignores="" | |
endif | |
if exists("g:autopep8_select") | |
let autopep8_selects=" --select=".g:autopep8_select | |
else | |
let autopep8_selects="" | |
endif | |
if exists("g:autopep8_pep8_passes") | |
let autopep8_pep8_passes=" --pep8-passes=".g:autopep8_pep8_passes | |
else | |
let autopep8_pep8_passes="" | |
endif | |
if exists("g:autopep8_max_line_length") | |
let autopep8_max_line_length=" --max-line-length=".g:autopep8_max_line_length | |
else | |
let autopep8_max_line_length="" | |
endif | |
if exists("g:autopep8_aggressive") | |
let autopep8_aggressive=" --aggressive " | |
else | |
let autopep8_aggressive="" | |
endif | |
if exists("g:autopep8_indent_size") | |
let autopep8_indent_size=" --indent-size=".g:autopep8_indent_size | |
else | |
let autopep8_indent_size="" | |
endif | |
let execmdline=autopep8_cmd.autopep8_pep8_passes.autopep8_selects.autopep8_ignores.autopep8_max_line_length.autopep8_aggressive.autopep8_indent_size.l:args | |
let tmpfile = tempname() | |
let tmpdiff = tempname() | |
let index = 0 | |
try | |
" current cursor | |
let current_cursor = getpos(".") | |
" write to temporary file | |
silent execute "!". execmdline . " \"" . expand('%:p') . "\" > " . tmpfile | |
if !exists("g:autopep8_disable_show_diff") | |
silent execute "!". execmdline . " --diff \"" . expand('%:p') . "\" > " . tmpdiff | |
endif | |
" current buffer all delete | |
silent execute "%d" | |
" read temp file. and write to current buffer. | |
for line in readfile(tmpfile) | |
call append(index, line) | |
let index = index + 1 | |
endfor | |
" remove last linebreak. | |
silent execute ":" . index . "," . index . "s/\\n$//g" | |
" restore cursor | |
call setpos('.', current_cursor) | |
" show diff | |
if !exists("g:autopep8_disable_show_diff") | |
botright new autopep8 | |
setlocal buftype=nofile bufhidden=wipe nobuflisted noswapfile nowrap | |
silent execute '$read ' . tmpdiff | |
setlocal nomodifiable | |
setlocal nu | |
setlocal filetype=diff | |
else | |
redraw! | |
endif | |
hi Green ctermfg=green | |
echohl Green | |
echon "Fixed with autopep8 this file." | |
echohl | |
finally | |
" file close | |
if filewritable(tmpfile) | |
call delete(tmpfile) | |
endif | |
if filewritable(tmpdiff) | |
call delete(tmpdiff) | |
endif | |
endtry | |
endfunction | |
endif | |
" Add mappings, unless the user didn't want this. | |
" The default mapping is registered under to <F8> by default, unless the user | |
" remapped it already (or a mapping exists already for <F8>) | |
4 0.000019 if !exists("no_plugin_maps") && !exists("no_autopep8_maps") | |
4 0.000211 if !hasmapto('Autopep8(') | |
4 0.000082 noremap <buffer> <F8> :call Autopep8()<CR> | |
4 0.000023 command! -nargs=? -bar Autopep8 call Autopep8(<f-args>) | |
4 0.000003 endif | |
4 0.000006 endif | |
SCRIPT /usr/share/vim/vim74/ftplugin/python.vim | |
Sourced 4 times | |
Total time: 0.000716 | |
Self time: 0.000716 | |
count total (s) self (s) | |
" Vim filetype plugin file | |
" Language: python | |
" Maintainer: Johannes Zellner <[email protected]> | |
" Last Change: 2014 Feb 09 | |
" Last Change By Johannes: Wed, 21 Apr 2004 13:13:08 CEST | |
4 0.000024 if exists("b:did_ftplugin") | finish | endif | |
4 0.000010 let b:did_ftplugin = 1 | |
4 0.000026 let s:keepcpo= &cpo | |
4 0.000022 set cpo&vim | |
4 0.000012 setlocal cinkeys-=0# | |
4 0.000009 setlocal indentkeys-=0# | |
4 0.000006 setlocal include=^\\s*\\(from\\\|import\\) | |
4 0.000008 setlocal includeexpr=substitute(v:fname,'\\.','/','g') | |
4 0.000007 setlocal suffixesadd=.py | |
4 0.000010 setlocal comments=b:#,fb:- | |
4 0.000007 setlocal commentstring=#\ %s | |
4 0.000008 setlocal omnifunc=pythoncomplete#Complete | |
4 0.000012 set wildignore+=*.pyc | |
4 0.000107 nnoremap <silent> <buffer> ]] :call <SID>Python_jump('/^\(class\\|def\)')<cr> | |
4 0.000074 nnoremap <silent> <buffer> [[ :call <SID>Python_jump('?^\(class\\|def\)')<cr> | |
4 0.000063 nnoremap <silent> <buffer> ]m :call <SID>Python_jump('/^\s*\(class\\|def\)')<cr> | |
4 0.000058 nnoremap <silent> <buffer> [m :call <SID>Python_jump('?^\s*\(class\\|def\)')<cr> | |
4 0.000019 if !exists('*<SID>Python_jump') | |
fun! <SID>Python_jump(motion) range | |
let cnt = v:count1 | |
let save = @/ " save last search pattern | |
mark ' | |
while cnt > 0 | |
silent! exe a:motion | |
let cnt = cnt - 1 | |
endwhile | |
call histdel('/', -1) | |
let @/ = save " restore last search pattern | |
endfun | |
endif | |
4 0.000018 if has("browsefilter") && !exists("b:browsefilter") | |
4 0.000016 let b:browsefilter = "Python Files (*.py)\t*.py\n" . | |
\ "All Files (*.*)\t*.*\n" | |
4 0.000004 endif | |
" As suggested by PEP8. | |
4 0.000025 setlocal expandtab shiftwidth=4 softtabstop=4 tabstop=8 | |
" First time: try finding "pydoc". | |
4 0.000010 if !exists('g:pydoc_executable') | |
if executable('pydoc') | |
let g:pydoc_executable = 1 | |
else | |
let g:pydoc_executable = 0 | |
endif | |
endif | |
" If "pydoc" was found use it for keywordprg. | |
4 0.000004 if g:pydoc_executable | |
4 0.000009 setlocal keywordprg=pydoc | |
4 0.000003 endif | |
4 0.000022 let &cpo = s:keepcpo | |
4 0.000009 unlet s:keepcpo | |
SCRIPT /usr/share/vim/vim74/indent/python.vim | |
Sourced 4 times | |
Total time: 0.000158 | |
Self time: 0.000158 | |
count total (s) self (s) | |
" Vim indent file | |
" Language: Python | |
" Maintainer: Bram Moolenaar <[email protected]> | |
" Original Author: David Bustos <[email protected]> | |
" Last Change: 2013 Jul 9 | |
" Only load this indent file when no other was loaded. | |
4 0.000019 if exists("b:did_indent") | |
finish | |
endif | |
4 0.000010 let b:did_indent = 1 | |
" Some preliminary settings | |
4 0.000056 setlocal nolisp " Make sure lisp indenting doesn't supersede us | |
4 0.000008 setlocal autoindent " indentexpr isn't much help otherwise | |
4 0.000010 setlocal indentexpr=GetPythonIndent(v:lnum) | |
4 0.000006 setlocal indentkeys+=<:>,=elif,=except | |
" Only define the function once. | |
4 0.000011 if exists("*GetPythonIndent") | |
4 0.000003 finish | |
SCRIPT /usr/share/vim/vim74/syntax/vim.vim | |
Sourced 1 time | |
Total time: 0.022937 | |
Self time: 0.008910 | |
count total (s) self (s) | |
" Vim syntax file | |
" Language: Vim 7.4 script | |
" Maintainer: Charles E. Campbell <[email protected]> | |
" Last Change: Mar 20, 2014 | |
" Version: 7.4-27 | |
" Automatically generated keyword lists: {{{1 | |
" Quit when a syntax file was already loaded {{{2 | |
1 0.000004 if exists("b:current_syntax") | |
finish | |
endif | |
1 0.000004 let s:keepcpo= &cpo | |
1 0.000004 set cpo&vim | |
" vimTodo: contains common special-notices for comments {{{2 | |
" Use the vimCommentGroup cluster to add your own. | |
1 0.000027 syn cluster vimCommentGroup contains=vimTodo,@Spell | |
" regular vim commands {{{2 | |
1 0.000149 syn keyword vimCommand contained a arga[dd] ar[gs] bd[elete] bN[ext] breakd[el] bufdo cabc[lear] cat[ch] cex[pr] c[hange] cla[st] cnew[er] cNf[ile] con cp[revious] cuna[bbrev] del deletep delm[arks] diffp[atch] dig[raphs] do e echon endf endw[hile] f[ile] fin[d] folddoc[losed] fu[nction] gvim helpt[ags] iabc[lear] intro k l lan lc[d] lefta[bove] lg[etfile] lla[st] lnew[er] lNf[ile] lockv[ar] ls lvimgrepa[dd] mat[ch] mk[exrc] mo n n[ext] o ownsyntax perld[o] pre[serve] promptf[ind] ptl[ast] ptr[ewind] py3do qa[ll] r[ead] redr[aw] retu[rn] rub[y] rv[iminfo] sba[ll] sbN[ext] scripte[ncoding] setf[iletype] sh[ell] sim[alt] sm[ap] sni[ff] sor[t] spelli[nfo] spr[evious] start st[op] sunmenu syn ta tabf[ind] tabnew tabr[ewind] tcld[o] tj[ump] tN tr tu[nmenu] undoj[oin] uns[ilent] ve[rsion] vimgrepa[dd] vs[plit] winc[md] wN[ext] ws[verb] x[it] xnoremenu | |
1 0.000193 syn keyword vimCommand contained ab argd[elete] argu[ment] bel[owright] bo[tright] breakl[ist] b[uffer] cad cb[uffer] cf[ile] changes cl[ist] cn[ext] col[der] conf[irm] cq[uit] cw[indow] delc[ommand] deletl delp diffpu[t] dir doau ea e[dit] endfo[r] ene[w] files fini[sh] foldd[oopen] g h hi if is[earch] keepa la lan[guage] lch[dir] lex[pr] lgr[ep] lli[st] lne[xt] lo lol[der] lt[ag] lw[indow] menut mks[ession] mod[e] nbc[lose] nmapc[lear] ol[dfiles] p po[p] prev[ious] promptr[epl] ptn pts[elect] pydo q[uit] rec[over] redraws[tatus] rew[ind] rubyd[o] sal[l] sbf[irst] sbp[revious] scrip[tnames] setg[lobal] si sl sme sno[magic] so[urce] spellr[epall] sre[wind] startg[replace] stopi[nsert] sus[pend] sync tab tabfir[st] tabn[ext] tabs tclf[ile] tl[ast] tn[ext] tr[ewind] u undol[ist] up[date] vert[ical] vi[sual] w windo wp[revious] wundo xmapc[lear] xunme | |
1 0.001199 syn keyword vimCommand contained abc[lear] argdo as[cii] bf[irst] bp[revious] br[ewind] buffers caddb[uffer] cc cfir[st] chd[ir] clo[se] cN[ext] colo[rscheme] con[tinue] cr[ewind] d delel deletp dep diffs[plit] di[splay] dp earlier el[se] endfun ex filet fir[st] foldo[pen] go[to] ha[rdcopy] hid[e] ij[ump] isp[lit] keepalt lad la[st] lcl[ose] lf[ile] lgrepa[dd] lmak[e] lN[ext] loadk lop[en] lua ma menut[ranslate] mksp[ell] m[ove] nb[key] noa omapc[lear] pc[lose] popu p[rint] ps[earch] ptN pu[t] pyf[ile] quita[ll] red reg[isters] ri[ght] rubyf[ile] san[dbox] sbl[ast] sbr[ewind] scs setl[ocal] sig sla[st] smenu snoreme spe spellu[ndo] st star[tinsert] sts[elect] sv[iew] syncbind tabc[lose] tabl[ast] tabN[ext] ta[g] te[aroff] tm tN[ext] try un unh[ide] v vi viu[sage] wa[ll] winp[os] wq wv[iminfo] xme xunmenu | |
1 0.000066 syn keyword vimCommand contained abo[veleft] arge[dit] au bl[ast] br bro[wse] bun[load] cad[dexpr] ccl[ose] cgetb[uffer] che[ckpath] cmapc[lear] cnf com cope[n] cs de delep delf di difft[his] dj[ump] dr[op] ec elsei[f] endf[unction] exi[t] filetype fix[del] for gr[ep] h[elp] his[tory] il[ist] iuna[bbrev] keepj[umps] laddb[uffer] lat lcs lfir[st] lh[elpgrep] lmapc[lear] lnf loadkeymap lpf[ile] luado mak[e] mes mkv mz nbs[tart] noautocmd on[ly] pe popu[p] pro pta[g] ptn[ext] pw[d] py[thon] r redi[r] res[ize] rightb[elow] rundo sa[rgument] sbm[odified] sb[uffer] scscope sf[ind] sign sl[eep] sn[ext] snoremenu spelld[ump] spellw[rong] sta[g] startr[eplace] sun[hide] sw[apname] syntime tabd[o] tabm[ove] tabo[nly] tags tf[irst] tm[enu] to[pleft] ts[elect] una[bbreviate] unl ve vie[w] vmapc[lear] wh[ile] win[size] wqa[ll] x xmenu xwininfo | |
1 0.000060 syn keyword vimCommand contained al[l] argg[lobal] bad[d] bm[odified] brea[k] bu bw[ipeout] caddf[ile] cd cgete[xpr] checkt[ime] cn cNf comc[lear] co[py] cscope debug d[elete] delf[unction] diffg[et] diffu[pdate] dl ds[earch] echoe[rr] em[enu] en[dif] exu[sage] fin fo[ld] fu grepa[dd] helpf[ind] i imapc[lear] j[oin] kee[pmarks] lad[dexpr] later lcscope lgetb[uffer] l[ist] lN lNf lo[adview] lp[revious] luafile ma[rk] messages mkvie[w] mzf[ile] ne noh[lsearch] o[pen] ped[it] pp[op] profd[el] ptf[irst] ptN[ext] py python3 re red[o] ret[ab] ru ru[ntime] sav[eas] sbn[ext] scrip se[t] sfir[st] sil[ent] sm[agic] sN[ext] so spe[llgood] sp[lit] star stj[ump] sunme sy t tabe[dit] tabN tabp[revious] tc[l] th[row] tn tp[revious] tu u[ndo] unlo[ckvar] verb[ose] vim[grep] vne[w] win wn[ext] w[rite] xa[ll] xnoreme y[ank] | |
1 0.000035 syn keyword vimCommand contained ar argl[ocal] ba[ll] bn[ext] breaka[dd] buf c cal[l] ce[nter] cg[etfile] cl cN cnf[ile] comp[iler] cpf[ile] cstag debugg[reedy] deletel dell diffo[ff] dig dli[st] dsp[lit] echom[sg] en endt[ry] f fina[lly] foldc[lose] fun gui helpg[rep] ia in ju[mps] keepp[atterns] laddf[ile] lb[uffer] le[ft] lgete[xpr] ll lne lnf[ile] loc[kmarks] lr[ewind] lv[imgrep] marks mk mkv[imrc] mz[scheme] new nu[mber] opt[ions] pe[rl] pr prof[ile] ptj[ump] ptp[revious] py3 q | |
1 0.000008 syn match vimCommand contained "\<z[-+^.=]\=" | |
1 0.000013 syn keyword vimStdPlugin contained DiffOrig Man N[ext] P[rint] S TOhtml XMLent XMLns | |
" vimOptions are caught only when contained in a vimSet {{{2 | |
1 0.000031 syn keyword vimOption contained acd ambiwidth arabicshape autowriteall backupdir bdlay binary breakat bufhidden cd ci cinw co commentstring confirm cpoptions cscoperelative csre cursorcolumn delcombine diffopt ea efm ep et fdc fdo ffs filetype fo foldlevelstart formatexpr ft gfw gtt guipty hh hkmap ic imaf iminsert includeexpr inf isident key langmap lines lmap ma matchtime mco ml modeline mousefocus mousetime nrformats ofu para pdev pi previewwindow printmbfont qe relativenumber rightleftcmd ru sbr scrolloff selection shellcmdflag shellxescape showbreak si smartcase softtabstop spelllang sps sta su swb synmaxcol tagbsearch tbi termencoding thesaurus titlestring tpm ttm ttytype undodir ut vfile vop wcm whichwrap wildignore winaltkeys winminwidth wmnu write | |
1 0.000028 syn keyword vimOption contained ai ambw ari aw backupext beval biosk brk buflisted cdpath cin cinwords cocu compatible consk cpt cscopetag cst cursorline dex digraph ead ei equalalways eventignore fde fdt fic fillchars foldclose foldmarker formatlistpat gcr ghr guicursor guitablabel hi hkmapp icon imak ims incsearch infercase isk keymap langmenu linespace loadplugins macatsui maxcombine mef mls modelines mousehide mp nu omnifunc paragraphs penc pm printdevice printoptions quoteescape remap rl ruf sc scrollopt selectmode shellpipe shellxquote showcmd sidescroll smartindent sol spellsuggest sr stal sua swf syntax taglength tbidi terse tildeop tl tr tty tw undofile vb vi wa wd wi wildignorecase window winwidth wmw writeany | |
1 0.000028 syn keyword vimOption contained akm anti arshape awa backupskip bex bioskey browsedir buftype cedit cindent clipboard cole complete conskey crb cscopetagorder csto cwh dg dip eadirection ek equalprg ex fdi fen fileencoding fk foldcolumn foldmethod formatoptions gd go guifont guitabtooltip hid hkp iconstring imc imsearch inde insertmode iskeyword keymodel laststatus lisp lpl magic maxfuncdepth menuitems mm modifiable mousem mps number opendevice paste pex pmbcs printencoding prompt rdt report rlc ruler scb scs sessionoptions shellquote shiftround showfulltag sidescrolloff smarttab sp spf srr startofline suffixes switchbuf ta tagrelative tbis textauto timeout tm ts ttybuiltin tx undolevels vbs viewdir wak weirdinvert wic wildmenu winfixheight wiv wop writebackup | |
1 0.000025 syn keyword vimOption contained al antialias autochdir background balloondelay bexpr bk bs casemap cf cink cmdheight colorcolumn completefunc copyindent cryptmethod cscopeverbose csverb debug dict dir eb enc errorbells expandtab fdl fenc fileencodings fkmap foldenable foldminlines formatprg gdefault gp guifontset helpfile hidden hl ignorecase imcmdline imsf indentexpr is isp keywordprg lazyredraw lispwords ls makeef maxmapdepth mfd mmd modified mousemodel msm numberwidth operatorfunc pastetoggle pexpr pmbfn printexpr pt re restorescreen rnu rulerformat scr sect sft shellredir shiftwidth showmatch siso smc spc spl ss statusline suffixesadd sws tabline tags tbs textmode timeoutlen to tsl ttyfast uc undoreload vdir viewoptions warn wfh wig wildmode winfixwidth wiw wrap writedelay | |
1 0.000027 syn keyword vimOption contained aleph ar autoindent backspace ballooneval bg bkc bsdir cb cfu cinkeys cmdwinheight columns completeopt cot cscopepathcomp cspc cuc deco dictionary directory ed encoding errorfile exrc fdls fencs fileformat flp foldexpr foldnestmax fp gfm grepformat guifontwide helpheight highlight hlg im imd imstatusfunc indentkeys isf isprint km lbr list lsp makeprg maxmem mh mmp more mouses mzq nuw opfunc patchexpr pfn popt printfont pumheight readonly revins ro runtimepath scroll sections sh shellslash shm showmode sj smd spell splitbelow ssl stl sw sxe tabpagemax tagstack tenc textwidth title toolbar tsr ttym udf updatecount ve viminfo wb wfw wildchar wildoptions winheight wm wrapmargin ws | |
1 0.000026 syn keyword vimOption contained allowrevins arab autoread backup balloonexpr bh bl bsk cc ch cino cmp com concealcursor cp cscopeprg csprg cul def diff display edcompatible endofline errorformat fcl fdm fex fileformats fml foldignore foldopen fs gfn grepprg guiheadroom helplang history hls imactivatefunc imdisable inc indk isfname joinspaces kmp lcs listchars lw mat maxmempattern mis mmt mouse mouseshape mzquantum odev osfiletype patchmode ph preserveindent printheader pvh redrawtime ri rs sb scrollbind secure shcf shelltemp shortmess showtabline slm sn spellcapcheck splitright ssop stmp swapfile sxq tabstop tal term tf titlelen toolbariconsize ttimeout ttymouse udir updatetime verbose virtualedit wc wh wildcharm wim winminheight wmh wrapscan ww | |
1 0.000023 syn keyword vimOption contained altkeymap arabic autowrite backupcopy bdir bin bomb bt ccv charconvert cinoptions cms comments conceallevel cpo cscopequickfix csqf cursorbind define diffexpr dy ef eol esckeys fcs fdn ff fileignorecase fmr foldlevel foldtext fsync gfs gtl guioptions hf hk hlsearch imactivatekey imi include inex isi js kp linebreak lm lz matchpairs maxmemtot mkspellmem mod mousef mouset nf oft pa path pheader previewheight printmbcharset pvw regexpengine rightleft rtp sbo scrolljump sel shell shelltype shortname shq sm so spellfile spr st sts swapsync syn tag tb termbidi tgst titleold top ttimeoutlen ttyscroll ul ur verbosefile visualbell | |
" vimOptions: These are the turn-off setting variants {{{2 | |
1 0.000029 syn keyword vimOption contained noacd noallowrevins noantialias noarabic noarshape noautoread noaw noballooneval nobinary nobk nobuflisted nocin noconfirm nocopyindent nocscoperelative nocsre nocuc nocursorcolumn nodelcombine nodigraph noed noendofline noerrorbells noex nofen nofk nogd nohid nohkmap nohkp nohlsearch noicon noim noimcmdline noimdisable noinf noinsertmode nojoinspaces nolazyredraw nolinebreak nolist nolpl noma nomagic noml nomodeline nomodified nomousef nomousehide nonumber noopendevice nopi nopreviewwindow nopvw norelativenumber norestorescreen nori norl noro noru nosb noscb noscs nosft noshelltemp noshortname noshowfulltag noshowmode nosm nosmartindent nosmd nosol nosplitbelow nospr nossl nostartofline noswapfile nota notagrelative notbi notbs noterse notextmode notgst notimeout noto notr nottybuiltin notx noundofile novisualbell nowarn noweirdinvert nowfw nowildignorecase nowinfixheight nowiv nowrap nowrite nowritebackup | |
1 0.000024 syn keyword vimOption contained noai noaltkeymap noar noarabicshape noautochdir noautowrite noawa nobeval nobiosk nobl nocf nocindent noconsk nocp nocscopetag nocst nocul nocursorline nodg noea noedcompatible noeol noesckeys noexpandtab nofic nofkmap nogdefault nohidden nohkmapp nohls noic noignorecase noimc noimd noincsearch noinfercase nois nojs nolbr nolisp noloadplugins nolz nomacatsui nomh nomod nomodifiable nomore nomousefocus nonu noodev nopaste nopreserveindent noprompt noreadonly noremap norevins norightleft nornu nors noruler nosc noscrollbind nosecure noshellslash noshiftround noshowcmd noshowmatch nosi nosmartcase nosmarttab nosn nospell nosplitright nosr nosta nostmp noswf notagbsearch notagstack notbidi notermbidi notextauto notf notildeop notitle notop nottimeout nottyfast noudf novb nowa nowb nowfh nowic nowildmenu nowinfixwidth nowmnu nowrapscan nowriteany nows | |
1 0.000008 syn keyword vimOption contained noakm noanti noarab noari noautoindent noautowriteall nobackup nobin nobioskey nobomb noci nocompatible noconskey nocrb nocscopeverbose nocsverb nocursorbind nodeco nodiff noeb noek noequalalways noet noexrc nofileignorecase nofoldenable noguipty nohk | |
" vimOptions: These are the invertible variants {{{2 | |
1 0.000065 syn keyword vimOption contained invacd invallowrevins invantialias invarabic invarshape invautoread invaw invballooneval invbinary invbk invbuflisted invcin invconfirm invcopyindent invcscoperelative invcsre invcuc invcursorcolumn invdelcombine invdigraph inved invendofline inverrorbells invex invfen invfk invgd invhid invhkmap invhkp invhlsearch invicon invim invimcmdline invimdisable invinf invinsertmode invjoinspaces invlazyredraw invlinebreak invlist invlpl invma invmagic invml invmodeline invmodified invmousef invmousehide invnumber invopendevice invpi invpreviewwindow invpvw invrelativenumber invrestorescreen invri invrl invro invru invsb invscb invscs invsft invshelltemp invshortname invshowfulltag invshowmode invsm invsmartindent invsmd invsol invsplitbelow invspr invssl invstartofline invswapfile invta invtagrelative invtbi invtbs invterse invtextmode invtgst invtimeout invto invtr invttybuiltin invtx invundofile invvisualbell invwarn invweirdinvert invwfw invwildignorecase invwinfixheight invwiv inv 1 0.000025 syn keyword vimOption contained invai invaltkeymap invar invarabicshape invautochdir invautowrite invawa invbeval invbiosk invbl invcf invcindent invconsk invcp invcscopetag invcst invcul invcursorline invdg invea invedcompatible inveol invesckeys invexpandtab invfic invfkmap invgdefault invhidden invhkmapp invhls invic invignorecase invimc invimd invincsearch invinfercase invis invjs invlbr invlisp invloadplugins invlz invmacatsui invmh invmod invmodifiable invmore invmousefocus invnu invodev invpaste invpreserveindent invprompt invreadonly invremap invrevins invrightleft invrnu invrs invruler invsc invscrollbind invsecure invshellslash invshiftround invshowcmd invshowmatch invsi invsmartcase invsmarttab invsn invspell invsplitright invsr invsta invstmp invswf invtagbsearch invtagstack invtbidi invtermbidi invtextauto invtf invtildeop invtitle invtop invttimeout invttyfast invudf invvb invwa invwb invwfh invwic invwildmenu invwinfixwidth invwmnu invwrapscan invwriteany invws | |
1 0.000008 syn keyword vimOption contained invakm invanti invarab invari invautoindent invautowriteall invbackup invbin invbioskey invbomb invci invcompatible invconskey invcrb invcscopeverbose invcsverb invcursorbind invdeco invdiff inveb invek invequalalways invet invexrc invfileignorecase invfoldenable invguipty invhk | |
" termcap codes (which can also be set) {{{2 | |
1 0.000023 syn keyword vimOption contained t_AB t_al t_bc t_ce t_cl t_Co t_Cs t_CS t_CV t_da t_db t_dl t_DL t_EI t_F1 t_F2 t_F3 t_F4 t_F5 t_F6 t_F7 t_F8 t_F9 t_fs t_IE t_IS t_k1 t_K1 t_k2 t_k3 t_K3 t_k4 t_K4 t_k5 t_K5 t_k6 t_K6 t_k7 t_K7 t_k8 t_K8 t_k9 t_K9 t_KA t_kb t_kB t_KB t_KC t_kd t_kD t_KD t_ke t_KE t_KF t_KG t_kh t_KH t_kI t_KI t_KJ t_KK t_kl t_KL t_kN t_kP t_kr t_ks t_ku t_le t_mb t_md t_me t_mr t_ms t_nd t_op t_RI t_RV t_Sb t_se t_Sf t_SI t_so t_sr t_te t_ti t_ts t_u7 t_ue t_us t_ut t_vb t_ve t_vi t_vs t_WP t_WS t_xs t_ZH t_ZR | |
1 0.000003 syn keyword vimOption contained t_AF t_AL t_cd t_Ce t_cm t_cs | |
1 0.000006 syn match vimOption contained "t_%1" | |
1 0.000003 syn match vimOption contained "t_#2" | |
1 0.000003 syn match vimOption contained "t_#4" | |
1 0.000003 syn match vimOption contained "t_@7" | |
1 0.000002 syn match vimOption contained "t_*7" | |
1 0.000003 syn match vimOption contained "t_&8" | |
1 0.000003 syn match vimOption contained "t_%i" | |
1 0.000003 syn match vimOption contained "t_k;" | |
" unsupported settings: these are supported by vi but don't do anything in vim {{{2 | |
1 0.000011 syn keyword vimErrSetting contained hardtabs ht w1200 w300 w9600 | |
" AutoCmd Events {{{2 | |
1 0.000006 syn case ignore | |
1 0.000050 syn keyword vimAutoEvent contained BufAdd BufCreate BufDelete BufEnter BufFilePost BufFilePre BufHidden BufLeave BufNew BufNewFile BufRead BufReadCmd BufReadPost BufReadPre BufUnload BufWinEnter BufWinLeave BufWipeout BufWrite BufWriteCmd BufWritePost BufWritePre Cmd-event CmdwinEnter CmdwinLeave ColorScheme CompleteDone CursorHold CursorHoldI CursorMoved CursorMovedI EncodingChanged FileAppendCmd FileAppendPost FileAppendPre FileChangedRO FileChangedShell FileChangedShellPost FileEncoding FileReadCmd FileReadPost FileReadPre FileType FileWriteCmd FileWritePost FileWritePre FilterReadPost FilterReadPre FilterWritePost FilterWritePre FocusGained FocusLost FuncUndefined GUIEnter GUIFailed InsertChange InsertCharPre InsertEnter InsertLeave MenuPopup QuickFixCmdPost QuickFixCmdPre QuitPre RemoteReply SessionLoadPost ShellCmdPost ShellFilterPost SourceCmd SourcePre SpellFileMissing StdinReadPost StdinReadPre SwapExists Syntax TabEnter TabLeave TermChanged TermResponse TextChanged TextChangedI User UserGettingBored | |
" Highlight commonly used Groupnames {{{2 | |
1 0.000019 syn keyword vimGroup contained Comment Constant String Character Number Boolean Float Identifier Function Statement Conditional Repeat Label Operator Keyword Exception PreProc Include Define Macro PreCondit Type StorageClass Structure Typedef Special SpecialChar Tag Delimiter SpecialComment Debug Underlined Ignore Error Todo | |
" Default highlighting groups {{{2 | |
1 0.000022 syn keyword vimHLGroup contained ColorColumn Cursor CursorColumn CursorIM CursorLine CursorLineNr DiffAdd DiffChange DiffDelete DiffText Directory ErrorMsg FoldColumn Folded IncSearch LineNr MatchParen Menu ModeMsg MoreMsg NonText Normal Pmenu PmenuSbar PmenuSel PmenuThumb Question Scrollbar Search SignColumn SpecialKey SpellBad SpellCap SpellLocal SpellRare StatusLine StatusLineNC TabLine TabLineFill TabLineSel Title Tooltip VertSplit Visual VisualNOS WarningMsg WildMenu | |
1 0.000005 syn match vimHLGroup contained "Conceal" | |
1 0.000002 syn case match | |
" Function Names {{{2 | |
1 0.000032 syn keyword vimFuncName contained abs and argidx atan browsedir bufloaded bufwinnr byteidxcomp changenr clearmatches complete_add copy count deepcopy diff_filler escape executable expand feedkeys filter float2nr fnameescape foldclosedend foldtextresult garbagecollect getbufvar getcmdline getcwd getfsize getline getpid getreg gettabwinvar getwinvar has hasmapto histget hlID indent inputdialog inputsave invert items len line localtime luaeval mapcheck matcharg matchlist min mzeval or prevnonblank py3eval readfile remote_expr remote_read rename reverse screenchar search searchpairpos serverlist setcmdpos setloclist setpos setreg settabwinvar sha256 shiftwidth sin sort spellbadword split str2float strchars strftime string strpart strtrans submatch synconcealed synIDattr synstack tabpagebuflist tabpagewinnr taglist tanh tolower tr type undotree virtcol wildmenumode wincol winline winrestcmd winsaveview writefile | |
1 0.000030 syn keyword vimFuncName contained acos append argv atan2 bufexists bufname byte2line call char2nr col complete_check cos cscope_connection delete diff_hlID eval exists expr8 filereadable finddir floor fnamemodify foldlevel foreground get getchar getcmdpos getfontname getftime getloclist getpos getregtype getwinposx glob has_key histadd histnr hostname index inputlist inputsecret isdirectory join libcall line2byte log map match matchdelete matchstr mkdir nextnonblank pathshorten printf pyeval reltime remote_foreground remote_send repeat round screencol searchdecl searchpos setbufvar setline setmatches setqflist settabvar setwinvar shellescape simplify sinh soundfold spellsuggest sqrt str2nr strdisplaywidth stridx strlen strridx strwidth substitute synID synIDtrans system tabpagenr tagfiles tan tempname toupper trunc undofile values visualmode winbufnr winheight winnr winrestview winwidth xor | |
1 0.000018 syn keyword vimFuncName contained add argc asin browse buflisted bufnr byteidx ceil cindent complete confirm cosh cursor did_filetype empty eventhandler exp extend filewritable findfile fmod foldclosed foldtext function getbufline getcharmod getcmdtype getfperm getftype getmatches getqflist gettabvar getwinposy globpath haslocaldir histdel hlexists iconv input inputrestore insert islocked keys libcallnr lispindent log10 maparg matchadd matchend max mode nr2char pow pumvisible range reltimestr remote_peek remove resolve screenattr screenrow searchpair server2client | |
"--- syntax here and above generated by mkvimvim --- | |
" Special Vim Highlighting (not automatic) {{{1 | |
" commands not picked up by the generator (due to non-standard format) | |
1 0.000002 syn keyword vimCommand contained py3 | |
" Deprecated variable options {{{2 | |
1 0.000002 if exists("g:vim_minlines") | |
let g:vimsyn_minlines= g:vim_minlines | |
endif | |
1 0.000002 if exists("g:vim_maxlines") | |
let g:vimsyn_maxlines= g:vim_maxlines | |
endif | |
1 0.000002 if exists("g:vimsyntax_noerror") | |
let g:vimsyn_noerror= g:vimsyntax_noerror | |
endif | |
" Numbers {{{2 | |
" ======= | |
1 0.000027 syn match vimNumber "\<\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand | |
1 0.000008 syn match vimNumber "-\d\+\%(\.\d\+\%([eE][+-]\=\d\+\)\=\)\=" skipwhite nextgroup=vimGlobal,vimSubst,vimCommand | |
1 0.000006 syn match vimNumber "\<0[xX]\x\+" | |
1 0.000005 syn match vimNumber "#\x\{6}" | |
" All vimCommands are contained by vimIsCommands. {{{2 | |
1 0.000042 syn match vimCmdSep "[:|]\+" skipwhite nextgroup=vimAddress,vimAutoCmd,vimCommand,vimExtCmd,vimFilter,vimLet,vimMap,vimMark,vimSet,vimSyntax,vimUserCmd | |
1 0.000009 syn match vimIsCommand "\<\h\w*\>" contains=vimCommand | |
1 0.000009 syn match vimVar contained "\<\h[a-zA-Z0-9#_]*\>" | |
1 0.000007 syn match vimVar "\<[bwglsav]:\h[a-zA-Z0-9#_]*\>" | |
1 0.000008 syn match vimFBVar contained "\<[bwglsav]:\h[a-zA-Z0-9#_]*\>" | |
1 0.000003 syn keyword vimCommand contained in | |
" Insertions And Appends: insert append {{{2 | |
" ======================= | |
1 0.000018 syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=a\%[ppend]$" matchgroup=vimCommand end="^\.$"" | |
1 0.000010 syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=c\%[hange]$" matchgroup=vimCommand end="^\.$"" | |
1 0.000009 syn region vimInsert matchgroup=vimCommand start="^[: \t]*\(\d\+\(,\d\+\)\=\)\=i\%[nsert]$" matchgroup=vimCommand end="^\.$"" | |
" Behave! {{{2 | |
" ======= | |
1 0.000017 syn match vimBehave "\<be\%[have]\>" skipwhite nextgroup=vimBehaveModel,vimBehaveError | |
1 0.000002 syn keyword vimBehaveModel contained mswin xterm | |
1 0.000004 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nobehaveerror") | |
1 0.000004 syn match vimBehaveError contained "[^ ]\+" | |
1 0.000002 endif | |
" Filetypes {{{2 | |
" ========= | |
1 0.000021 syn match vimFiletype "\<filet\%[ype]\(\s\+\I\i*\)*" skipwhite contains=vimFTCmd,vimFTOption,vimFTError | |
1 0.000003 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimFTError") | |
1 0.000003 syn match vimFTError contained "\I\i*" | |
1 0.000001 endif | |
1 0.000002 syn keyword vimFTCmd contained filet[ype] | |
1 0.000003 syn keyword vimFTOption contained detect indent off on plugin | |
" Augroup : vimAugroupError removed because long augroups caused sync'ing problems. {{{2 | |
" ======= : Trade-off: Increasing synclines with slower editing vs augroup END error checking. | |
1 0.000080 syn cluster vimAugroupList contains=vimIsCommand,vimCommand,vimUserCmd,vimExecute,vimNotFunc,vimFuncName,vimFunction,vimFunctionError,vimLineComment,vimSpecFile,vimOper,vimNumber,vimOperParen,vimComment,vimString,vimSubst,vimMark,vimRegister,vimAddress,vimFilter,vimCmplxRepeat,vimComment,vimLet,vimSet,vimAutoCmd,vimRegion,vimSynLine,vimNotation,vimCtrlChar,vimFuncVar,vimContinue | |
1 0.000002 if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'a' | |
syn region vimAugroup fold start="\<aug\%[roup]\>\s\+\h\w*" end="\<aug\%[roup]\>\s\+[eE][nN][dD]\>" contains=vimAugroupKey,vimAutoCmd,@vimAugroupList keepend | |
else | |
1 0.000020 syn region vimAugroup start="\<aug\%[roup]\>\s\+\h\w*" end="\<aug\%[roup]\>\s\+[eE][nN][dD]\>" contains=vimAugroupKey,vimAutoCmd,@vimAugroupList keepend | |
1 0.000001 endif | |
1 0.000006 syn match vimAugroup "aug\%[roup]!" contains=vimAugroupKey | |
1 0.000003 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noaugrouperror") | |
1 0.000009 syn match vimAugroupError "\<aug\%[roup]\>\s\+[eE][nN][dD]\>" | |
1 0.000001 endif | |
1 0.000003 syn keyword vimAugroupKey contained aug[roup] | |
" Operators: {{{2 | |
" ========= | |
" COMBAK: vimOperParen used to have "oneline" | |
1 0.000041 syn cluster vimOperGroup contains=vimEnvvar,vimFunc,vimFuncVar,vimOper,vimOperParen,vimNumber,vimString,vimRegister,vimContinue | |
1 0.000023 syn match vimOper "\(==\|!=\|>=\|<=\|=\~\|!\~\|>\|<\|=\)[?#]\{0,2}" skipwhite nextgroup=vimString,vimSpecFile | |
1 0.000010 syn match vimOper "||\|&&\|[-+.]" skipwhite nextgroup=vimString,vimSpecFile | |
1 0.000012 syn region vimOperParen matchgroup=vimParenSep start="(" end=")" contains=@vimOperGroup | |
1 0.000012 syn region vimOperParen matchgroup=vimSep start="{" end="}" contains=@vimOperGroup nextgroup=vimVar,vimFuncVar | |
1 0.000003 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_noopererror") | |
1 0.000010 syn match vimOperError ")" | |
1 0.000001 endif | |
" Functions : Tag is provided for those who wish to highlight tagged functions {{{2 | |
" ========= | |
1 0.000018 syn cluster vimFuncList contains=vimCommand,vimFunctionError,vimFuncKey,Tag,vimFuncSID | |
1 0.000057 syn cluster vimFuncBodyList contains=vimAbb,vimAddress,vimAugroupKey,vimAutoCmd,vimCmplxRepeat,vimComment,vimComment,vimContinue,vimCtrlChar,vimEcho,vimEchoHL,vimExecute,vimIf,vimIsCommand,vimFBVar,vimFunc,vimFunction,vimFuncVar,vimHighlight,vimIsCommand,vimLet,vimLineComment,vimMap,vimMark,vimNorm,vimNotation,vimNotFunc,vimNumber,vimOper,vimOperParen,vimRegion,vimRegister,vimSet,vimSpecFile,vimString,vimSubst,vimSynLine,vimUnmap,vimUserCommand | |
1 0.000018 syn match vimFunction "\<fu\%[nction]!\=\s\+\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)\=\%(\i\|[#.]\|{.\{-1,}}\)*\ze\s*(" contains=@vimFuncList nextgroup=vimFuncBody | |
1 0.000003 if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'f' | |
syn region vimFuncBody contained fold start="\ze(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList | |
else | |
1 0.000009 syn region vimFuncBody contained start="\ze(" matchgroup=vimCommand end="\<\(endf\>\|endfu\%[nction]\>\)" contains=@vimFuncBodyList | |
1 0.000000 endif | |
1 0.000006 syn match vimFuncVar contained "a:\(\h\w*\|\d\+\)" | |
1 0.000004 syn match vimFuncSID contained "\c<sid>\|\<s:" | |
1 0.000004 syn keyword vimFuncKey contained fu[nction] | |
1 0.000014 syn match vimFuncBlank contained "\s\+" | |
1 0.000006 syn keyword vimPattern contained start skip end | |
" Special Filenames, Modifiers, Extension Removal: {{{2 | |
" =============================================== | |
1 0.000010 syn match vimSpecFile "<c\(word\|WORD\)>" nextgroup=vimSpecFileMod,vimSubst | |
1 0.000007 syn match vimSpecFile "<\([acs]file\|amatch\|abuf\)>" nextgroup=vimSpecFileMod,vimSubst | |
1 0.000006 syn match vimSpecFile "\s%[ \t:]"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst | |
1 0.000007 syn match vimSpecFile "\s%$"ms=s+1 nextgroup=vimSpecFileMod,vimSubst | |
1 0.000005 syn match vimSpecFile "\s%<"ms=s+1,me=e-1 nextgroup=vimSpecFileMod,vimSubst | |
1 0.000006 syn match vimSpecFile "#\d\+\|[#%]<\>" nextgroup=vimSpecFileMod,vimSubst | |
1 0.000004 syn match vimSpecFileMod "\(:[phtre]\)\+" contained | |
" User-Specified Commands: {{{2 | |
" ======================= | |
1 0.000047 syn cluster vimUserCmdList contains=vimAddress,vimSyntax,vimHighlight,vimAutoCmd,vimCmplxRepeat,vimComment,vimCtrlChar,vimEscapeBrace,vimFilter,vimFunc,vimFuncName,vimFunction,vimFunctionError,vimIsCommand,vimMark,vimNotation,vimNumber,vimOper,vimRegion,vimRegister,vimLet,vimSet,vimSetEqual,vimSetString,vimSpecFile,vimString,vimSubst,vimSubstRep,vimSubstRange,vimSynLine | |
1 0.000003 syn keyword vimUserCommand contained com[mand] | |
1 0.000011 syn match vimUserCmd "\<com\%[mand]!\=\>.*$" contains=vimUserAttrb,vimUserCommand,@vimUserCmdList | |
1 0.000014 syn match vimUserAttrb contained "-n\%[args]=[01*?+]" contains=vimUserAttrbKey,vimOper | |
1 0.000018 syn match vimUserAttrb contained "-com\%[plete]=" contains=vimUserAttrbKey,vimOper nextgroup=vimUserAttrbCmplt,vimUserCmdError | |
1 0.000012 syn match vimUserAttrb contained "-ra\%[nge]\(=%\|=\d\+\)\=" contains=vimNumber,vimOper,vimUserAttrbKey | |
1 0.000011 syn match vimUserAttrb contained "-cou\%[nt]=\d\+" contains=vimNumber,vimOper,vimUserAttrbKey | |
1 0.000010 syn match vimUserAttrb contained "-bang\=\>" contains=vimOper,vimUserAttrbKey | |
1 0.000015 syn match vimUserAttrb contained "-bar\>" contains=vimOper,vimUserAttrbKey | |
1 0.000011 syn match vimUserAttrb contained "-re\%[gister]\>" contains=vimOper,vimUserAttrbKey | |
1 0.000004 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_nousercmderror") | |
1 0.000004 syn match vimUserCmdError contained "\S\+\>" | |
1 0.000001 endif | |
1 0.000001 syn case ignore | |
1 0.000067 syn keyword vimUserAttrbKey contained bar ban[g] cou[nt] ra[nge] com[plete] n[args] re[gister] | |
1 0.000030 syn keyword vimUserAttrbCmplt contained augroup buffer color command compiler cscope dir environment event expression file file_in_path filetype function help highlight locale mapping menu option shellcmd sign syntax tag tag_listfiles var | |
1 0.000011 syn keyword vimUserAttrbCmplt contained custom customlist nextgroup=vimUserAttrbCmpltFunc,vimUserCmdError | |
1 0.000012 syn match vimUserAttrbCmpltFunc contained ",\%([sS]:\|<[sS][iI][dD]>\)\=\%(\h\w*\%(#\h\w*\)\+\|\h\w*\)"hs=s+1 nextgroup=vimUserCmdError | |
1 0.000002 syn case match | |
1 0.000005 syn match vimUserAttrbCmplt contained "custom,\u\w*" | |
" Lower Priority Comments: after some vim commands... {{{2 | |
" ======================= | |
1 0.000012 syn match vimComment excludenl +\s"[^\-:.%#=*].*$+lc=1 contains=@vimCommentGroup,vimCommentString | |
1 0.000006 syn match vimComment +\<endif\s\+".*$+lc=5 contains=@vimCommentGroup,vimCommentString | |
1 0.000005 syn match vimComment +\<else\s\+".*$+lc=4 contains=@vimCommentGroup,vimCommentString | |
1 0.000007 syn region vimCommentString contained oneline start='\S\s\+"'ms=e end='"' | |
" Environment Variables: {{{2 | |
" ===================== | |
1 0.000009 syn match vimEnvvar "\$\I\i*" | |
1 0.000004 syn match vimEnvvar "\${\I\i*}" | |
" In-String Specials: {{{2 | |
" Try to catch strings, if nothing else matches (therefore it must precede the others!) | |
" vimEscapeBrace handles ["] []"] (ie. "s don't terminate string inside []) | |
1 0.000011 syn region vimEscapeBrace oneline contained transparent start="[^\\]\(\\\\\)*\[\zs\^\=\]\=" skip="\\\\\|\\\]" end="]"me=e-1 | |
1 0.000009 syn match vimPatSepErr contained "\\)" | |
1 0.000006 syn match vimPatSep contained "\\|" | |
1 0.000022 syn region vimPatSepZone oneline contained matchgroup=vimPatSepZ start="\\%\=\ze(" skip="\\\\" end="\\)\|[^\]['"]" contains=@vimStringGroup | |
1 0.000025 syn region vimPatRegion contained transparent matchgroup=vimPatSepR start="\\[z%]\=(" end="\\)" contains=@vimSubstList oneline | |
1 0.000011 syn match vimNotPatSep contained "\\\\" | |
1 0.000006 syn cluster vimStringGroup contains=vimEscapeBrace,vimPatSep,vimNotPatSep,vimPatSepErr,vimPatSepZone,@Spell | |
1 0.000011 syn region vimString oneline keepend start=+[^:a-zA-Z>!\\@]"+lc=1 skip=+\\\\\|\\"+ end=+"+ contains=@vimStringGroup | |
1 0.000006 syn region vimString oneline keepend start=+[^:a-zA-Z>!\\@]'+lc=1 end=+'+ | |
1 0.000011 syn region vimString oneline start=+=!+lc=1 skip=+\\\\\|\\!+ end=+!+ contains=@vimStringGroup | |
1 0.000009 syn region vimString oneline start="=+"lc=1 skip="\\\\\|\\+" end="+" contains=@vimStringGroup | |
1 0.000009 syn region vimString oneline start="\s/\s*\A"lc=1 skip="\\\\\|\\+" end="/" contains=@vimStringGroup | |
1 0.000010 syn match vimString contained +"[^"]*\\$+ skipnl nextgroup=vimStringCont | |
1 0.000011 syn match vimStringCont contained +\(\\\\\|.\)\{-}[^\\]"+ | |
" Substitutions: {{{2 | |
" ============= | |
1 0.000009 syn cluster vimSubstList contains=vimPatSep,vimPatRegion,vimPatSepErr,vimSubstTwoBS,vimSubstRange,vimNotation | |
1 0.000008 syn cluster vimSubstRepList contains=vimSubstSubstr,vimSubstTwoBS,vimNotation | |
1 0.000007 syn cluster vimSubstList add=vimCollection | |
1 0.000019 syn match vimSubst "\(:\+\s*\|^\s*\||\s*\)\<\%(s\%[ubstitute]\|sm\%[agic]\|sno\%[magic]\)[:[:alpha:]]\@!" nextgroup=vimSubstPat | |
1 0.000014 syn match vimSubst "s\%[ubstitute][:#[:alpha:]]\@!" nextgroup=vimSubstPat contained | |
1 0.000006 syn match vimSubst "/\zss\%[ubstitute]\ze/" nextgroup=vimSubstPat | |
1 0.000010 syn match vimSubst1 contained "s\%[ubstitute]\>" nextgroup=vimSubstPat | |
1 0.000023 syn region vimSubstPat contained matchgroup=vimSubstDelim start="\z([^a-zA-Z( \t[\]&]\)"rs=s+1 skip="\\\\\|\\\z1" end="\z1"re=e-1,me=e-1 contains=@vimSubstList nextgroup=vimSubstRep4 oneline | |
1 0.000028 syn region vimSubstRep4 contained matchgroup=vimSubstDelim start="\z(.\)" skip="\\\\\|\\\z1" end="\z1" matchgroup=vimNotation end="<[cC][rR]>" contains=@vimSubstRepList nextgroup=vimSubstFlagErr oneline | |
1 0.000017 syn region vimCollection contained transparent start="\\\@<!\[" skip="\\\[" end="\]" contains=vimCollClass | |
1 0.000009 syn match vimCollClassErr contained "\[:.\{-\}:\]" | |
1 0.000011 syn match vimCollClass contained transparent "\[:\(alnum\|alpha\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\|return\|tab\|escape\|backspace\):\]" | |
1 0.000007 syn match vimSubstSubstr contained "\\z\=\d" | |
1 0.000010 syn match vimSubstTwoBS contained "\\\\" | |
1 0.000011 syn match vimSubstFlagErr contained "[^< \t\r|]\+" contains=vimSubstFlags | |
1 0.000004 syn match vimSubstFlags contained "[&cegiIpr]\+" | |
" 'String': {{{2 | |
1 0.000005 syn match vimString "[^(,]'[^']\{-}\zs'" | |
" Marks, Registers, Addresses, Filters: {{{2 | |
1 0.000017 syn match vimMark "'[a-zA-Z0-9]\ze[-+,!]" nextgroup=vimOper,vimMarkNumber,vimSubst | |
1 0.000013 syn match vimMark "'[<>]\ze[-+,!]" nextgroup=vimOper,vimMarkNumber,vimSubst | |
1 0.000011 syn match vimMark ",\zs'[<>]\ze" nextgroup=vimOper,vimMarkNumber,vimSubst | |
1 0.000012 syn match vimMark "[!,:]\zs'[a-zA-Z0-9]" nextgroup=vimOper,vimMarkNumber,vimSubst | |
1 0.000013 syn match vimMark "\<norm\%[al]\s\zs'[a-zA-Z0-9]" nextgroup=vimOper,vimMarkNumber,vimSubst | |
1 0.000011 syn match vimMarkNumber "[-+]\d\+" nextgroup=vimSubst contained contains=vimOper | |
1 0.000018 syn match vimPlainMark contained "'[a-zA-Z0-9]" | |
1 0.000010 syn match vimRegister '[^,;[{]\zs"[a-zA-Z0-9.%#:_\-/]\ze[^a-zA-Z_":0-9]' | |
1 0.000006 syn match vimRegister '\<norm\s\+\zs"[a-zA-Z0-9]' | |
1 0.000005 syn match vimRegister '\<normal\s\+\zs"[a-zA-Z0-9]' | |
1 0.000003 syn match vimRegister '@"' | |
1 0.000010 syn match vimPlainRegister contained '"[a-zA-Z0-9\-:.%#*+=]' | |
1 0.000005 syn match vimAddress ",\zs[.$]" skipwhite nextgroup=vimSubst1 | |
1 0.000006 syn match vimAddress "%\ze\a" skipwhite nextgroup=vimString,vimSubst1 | |
1 0.000007 syn match vimFilter contained "^!.\{-}\(|\|$\)" contains=vimSpecFile | |
1 0.000008 syn match vimFilter contained "\A!.\{-}\(|\|$\)"ms=s+1 contains=vimSpecFile,vimFunction,vimFuncName,vimOperParen | |
" Complex repeats (:h complex-repeat) {{{2 | |
1 0.000012 syn match vimCmplxRepeat '[^a-zA-Z_/\\()]q[0-9a-zA-Z"]\>'lc=1 | |
1 0.000007 syn match vimCmplxRepeat '@[0-9a-z".=@:]\ze\($\|[^a-zA-Z]\>\)' | |
" Set command and associated set-options (vimOptions) with comment {{{2 | |
1 0.000031 syn region vimSet matchgroup=vimCommand start="\<\%(setl\%[ocal]\|setg\%[lobal]\|se\%[t]\)\>" skip="\%(\\\\\)*\\." end="$" matchgroup=vimNotation end="<[cC][rR]>" keepend oneline contains=vimSetEqual,vimOption,vimErrSetting,vimComment,vimSetString,vimSetMod | |
1 0.000017 syn region vimSetEqual contained start="[=:]\|[-+^]=" skip="\\\\\|\\\s" end="[| \t]\|$"me=e-1 contains=vimCtrlChar,vimSetSep,vimNotation,vimEnvvar oneline | |
1 0.000019 syn region vimSetString contained start=+="+hs=s+1 skip=+\\\\\|\\"+ end=+"+ contains=vimCtrlChar | |
1 0.000008 syn match vimSetSep contained "[,:]" | |
1 0.000005 syn match vimSetMod contained "&vim\=\|[!&?<]\|all&" | |
" Let {{{2 | |
" === | |
1 0.000006 syn keyword vimLet let unl[et] skipwhite nextgroup=vimVar,vimFuncVar | |
" Abbreviations {{{2 | |
" ============= | |
1 0.000026 syn keyword vimAbb ab[breviate] ca[bbrev] inorea[bbrev] cnorea[bbrev] norea[bbrev] ia[bbrev] skipwhite nextgroup=vimMapMod,vimMapLhs | |
" Autocmd {{{2 | |
" ======= | |
1 0.000017 syn match vimAutoEventList contained "\(!\s\+\)\=\(\a\+,\)*\a\+" contains=vimAutoEvent nextgroup=vimAutoCmdSpace | |
1 0.000008 syn match vimAutoCmdSpace contained "\s\+" nextgroup=vimAutoCmdSfxList | |
1 0.000004 syn match vimAutoCmdSfxList contained "\S*" | |
1 0.000008 syn keyword vimAutoCmd au[tocmd] do[autocmd] doautoa[ll] skipwhite nextgroup=vimAutoEventList | |
" Echo and Execute -- prefer strings! {{{2 | |
" ================ | |
1 0.000024 syn region vimEcho oneline excludenl matchgroup=vimCommand start="\<ec\%[ho]\>" skip="\(\\\\\)*\\|" end="$\||" contains=vimFunc,vimFuncVar,vimString,vimVar | |
1 0.000025 syn region vimExecute oneline excludenl matchgroup=vimCommand start="\<exe\%[cute]\>" skip="\(\\\\\)*\\|" end="$\||\|<[cC][rR]>" contains=vimFuncVar,vimIsCommand,vimOper,vimNotation,vimOperParen,vimString,vimVar | |
1 0.000013 syn match vimEchoHL "echohl\=" skipwhite nextgroup=vimGroup,vimHLGroup,vimEchoHLNone | |
1 0.000001 syn case ignore | |
1 0.000002 syn keyword vimEchoHLNone none | |
1 0.000001 syn case match | |
" Maps {{{2 | |
" ==== | |
1 0.000007 syn match vimMap "\<map\>!\=\ze\s*[^(]" skipwhite nextgroup=vimMapMod,vimMapLhs | |
1 0.000029 syn keyword vimMap cm[ap] cno[remap] im[ap] ino[remap] lm[ap] ln[oremap] nm[ap] nn[oremap] no[remap] om[ap] ono[remap] smap snor[emap] vm[ap] vn[oremap] xm[ap] xn[oremap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs | |
1 0.000004 syn keyword vimMap mapc[lear] smapc[lear] | |
1 0.000016 syn keyword vimUnmap cu[nmap] iu[nmap] lu[nmap] nun[map] ou[nmap] sunm[ap] unm[ap] unm[ap] vu[nmap] xu[nmap] skipwhite nextgroup=vimMapBang,vimMapMod,vimMapLhs | |
1 0.000012 syn match vimMapLhs contained "\S\+" contains=vimNotation,vimCtrlChar skipwhite nextgroup=vimMapRhs | |
1 0.000005 syn match vimMapBang contained "!" skipwhite nextgroup=vimMapMod,vimMapLhs | |
1 0.000031 syn match vimMapMod contained "\c<\(buffer\|expr\|\(local\)\=leader\|plug\|script\|sid\|unique\|silent\)\+>" contains=vimMapModKey,vimMapModErr skipwhite nextgroup=vimMapMod,vimMapLhs | |
1 0.000014 syn match vimMapRhs contained ".*" contains=vimNotation,vimCtrlChar skipnl nextgroup=vimMapRhsExtend | |
1 0.000009 syn match vimMapRhsExtend contained "^\s*\\.*$" contains=vimNotation,vimCtrlChar,vimContinue skipnl nextgroup=vimMapRhsExtend | |
1 0.000001 syn case ignore | |
1 0.000005 syn keyword vimMapModKey contained buffer expr leader localleader plug script sid silent unique | |
1 0.000001 syn case match | |
" Menus {{{2 | |
" ===== | |
1 0.000019 syn cluster vimMenuList contains=vimMenuBang,vimMenuPriority,vimMenuName,vimMenuMod | |
1 0.000025 syn keyword vimCommand am[enu] an[oremenu] aun[menu] cme[nu] cnoreme[nu] cunme[nu] ime[nu] inoreme[nu] iunme[nu] me[nu] nme[nu] nnoreme[nu] noreme[nu] nunme[nu] ome[nu] onoreme[nu] ounme[nu] unme[nu] vme[nu] vnoreme[nu] vunme[nu] skipwhite nextgroup=@vimMenuList | |
1 0.000013 syn match vimMenuName "[^ \t\\<]\+" contained nextgroup=vimMenuNameMore,vimMenuMap | |
1 0.000006 syn match vimMenuPriority "\d\+\(\.\d\+\)*" contained skipwhite nextgroup=vimMenuName | |
1 0.000007 syn match vimMenuNameMore "\c\\\s\|<tab>\|\\\." contained nextgroup=vimMenuName,vimMenuNameMore contains=vimNotation | |
1 0.000009 syn match vimMenuMod contained "\c<\(script\|silent\)\+>" skipwhite contains=vimMapModKey,vimMapModErr nextgroup=@vimMenuList | |
1 0.000009 syn match vimMenuMap "\s" contained skipwhite nextgroup=vimMenuRhs | |
1 0.000007 syn match vimMenuRhs ".*$" contained contains=vimString,vimComment,vimIsCommand | |
1 0.000004 syn match vimMenuBang "!" contained skipwhite nextgroup=@vimMenuList | |
" Angle-Bracket Notation (tnx to Michael Geddes) {{{2 | |
" ====================== | |
1 0.000002 syn case ignore | |
1 0.000045 syn match vimNotation "\(\\\|<lt>\)\=<\([scamd]-\)\{0,4}x\=\(f\d\{1,2}\|[^ \t:]\|cr\|lf\|linefeed\|return\|k\=del\%[ete]\|bs\|backspace\|tab\|esc\|right\|left\|help\|undo\|insert\|ins\|k\=home\|k\=end\|kplus\|kminus\|kdivide\|kmultiply\|kenter\|kpoint\|space\|k\=\(page\)\=\(\|down\|up\|k\d\>\)\)>" contains=vimBracket | |
1 0.000014 syn match vimNotation "\(\\\|<lt>\)\=<\([scam2-4]-\)\{0,4}\(right\|left\|middle\)\(mouse\)\=\(drag\|release\)\=>" contains=vimBracket | |
1 0.000015 syn match vimNotation "\(\\\|<lt>\)\=<\(bslash\|plug\|sid\|space\|bar\|nop\|nul\|lt\)>" contains=vimBracket | |
1 0.000007 syn match vimNotation '\(\\\|<lt>\)\=<C-R>[0-9a-z"%#:.\-=]'he=e-1 contains=vimBracket | |
1 0.000009 syn match vimNotation '\(\\\|<lt>\)\=<\%(q-\)\=\(line[12]\|count\|bang\|reg\|args\|f-args\|lt\)>' contains=vimBracket | |
1 0.000009 syn match vimNotation "\(\\\|<lt>\)\=<\([cas]file\|abuf\|amatch\|cword\|cWORD\|client\)>" contains=vimBracket | |
1 0.000003 syn match vimBracket contained "[\\<>]" | |
1 0.000001 syn case match | |
" User Function Highlighting {{{2 | |
" (following Gautam Iyer's suggestion) | |
" ========================== | |
1 0.000021 syn match vimFunc "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\ze\s*(" contains=vimFuncName,vimUserFunc,vimExecute | |
1 0.000016 syn match vimUserFunc contained "\%(\%([sSgGbBwWtTlL]:\|<[sS][iI][dD]>\)\=\%([a-zA-Z0-9_]\+\.\)*\I[a-zA-Z0-9_.]*\)\|\<\u[a-zA-Z0-9.]*\>\|\<if\>" contains=vimNotation | |
1 0.000008 syn match vimNotFunc "\<if\>\|\<el\%[seif]\>\|\<return\>\|\<while\>" | |
" Errors And Warnings: {{{2 | |
" ==================== | |
1 0.000004 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror") | |
1 0.000017 syn match vimFunctionError "\s\zs[a-z0-9]\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank | |
" syn match vimFunctionError "\s\zs\%(<[sS][iI][dD]>\|[sSgGbBwWtTlL]:\)[0-9]\i\{-}\ze\s*(" contained contains=vimFuncKey,vimFuncBlank | |
1 0.000012 syn match vimElseIfErr "\<else\s\+if\>" | |
1 0.000009 syn match vimBufnrWarn /\<bufnr\s*(\s*["']\.['"]\s*)/ | |
1 0.000001 endif | |
" Norm {{{2 | |
" ==== | |
1 0.000011 syn match vimNorm "\<norm\%[al]!\=" skipwhite nextgroup=vimNormCmds | |
1 0.000003 syn match vimNormCmds contained ".*$" | |
" Syntax {{{2 | |
"======= | |
1 0.000014 syn match vimGroupList contained "@\=[^ \t,]*" contains=vimGroupSpecial,vimPatSep | |
1 0.000006 syn match vimGroupList contained "@\=[^ \t,]*," nextgroup=vimGroupList contains=vimGroupSpecial,vimPatSep | |
1 0.000003 syn keyword vimGroupSpecial contained ALL ALLBUT CONTAINED TOP | |
1 0.000003 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsynerror") | |
1 0.000008 syn match vimSynError contained "\i\+" | |
1 0.000005 syn match vimSynError contained "\i\+=" nextgroup=vimGroupList | |
1 0.000001 endif | |
1 0.000010 syn match vimSynContains contained "\<contain\(s\|edin\)=" nextgroup=vimGroupList | |
1 0.000020 syn match vimSynKeyContainedin contained "\<containedin=" nextgroup=vimGroupList | |
1 0.000014 syn match vimSynNextgroup contained "nextgroup=" nextgroup=vimGroupList | |
1 0.000013 syn match vimSyntax "\<sy\%[ntax]\>" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment | |
1 0.000011 syn match vimAuSyntax contained "\s+sy\%[ntax]" contains=vimCommand skipwhite nextgroup=vimSynType,vimComment | |
1 0.000008 syn cluster vimFuncBodyList add=vimSyntax | |
" Syntax: case {{{2 | |
1 0.000013 syn keyword vimSynType contained case skipwhite nextgroup=vimSynCase,vimSynCaseError | |
1 0.000003 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncaseerror") | |
1 0.000005 syn match vimSynCaseError contained "\i\+" | |
1 0.000001 endif | |
1 0.000002 syn keyword vimSynCase contained ignore match | |
" Syntax: clear {{{2 | |
1 0.000003 syn keyword vimSynType contained clear skipwhite nextgroup=vimGroupList | |
" Syntax: cluster {{{2 | |
1 0.000009 syn keyword vimSynType contained cluster skipwhite nextgroup=vimClusterName | |
1 0.000026 syn region vimClusterName contained matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" matchgroup=vimSep end="$\||" contains=vimGroupAdd,vimGroupRem,vimSynContains,vimSynError | |
1 0.000004 syn match vimGroupAdd contained "add=" nextgroup=vimGroupList | |
1 0.000005 syn match vimGroupRem contained "remove=" nextgroup=vimGroupList | |
1 0.000005 syn cluster vimFuncBodyList add=vimSynType,vimGroupAdd,vimGroupRem | |
" Syntax: include {{{2 | |
1 0.000002 syn keyword vimSynType contained include skipwhite nextgroup=vimGroupList | |
1 0.000004 syn cluster vimFuncBodyList add=vimSynType | |
" Syntax: keyword {{{2 | |
1 0.000008 syn cluster vimSynKeyGroup contains=vimSynNextgroup,vimSynKeyOpt,vimSynKeyContainedin | |
1 0.000008 syn keyword vimSynType contained keyword skipwhite nextgroup=vimSynKeyRegion | |
1 0.000017 syn region vimSynKeyRegion contained oneline keepend matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" matchgroup=vimSep end="|\|$" contains=@vimSynKeyGroup | |
1 0.000011 syn match vimSynKeyOpt contained "\<\(conceal\|contained\|transparent\|skipempty\|skipwhite\|skipnl\)\>" | |
1 0.000004 syn cluster vimFuncBodyList add=vimSynType | |
" Syntax: match {{{2 | |
1 0.000019 syn cluster vimSynMtchGroup contains=vimMtchComment,vimSynContains,vimSynError,vimSynMtchOpt,vimSynNextgroup,vimSynRegPat,vimNotation | |
1 0.000008 syn keyword vimSynType contained match skipwhite nextgroup=vimSynMatchRegion | |
1 0.000012 syn region vimSynMatchRegion contained keepend matchgroup=vimGroupName start="\h\w*" matchgroup=vimSep end="|\|$" contains=@vimSynMtchGroup | |
1 0.000013 syn match vimSynMtchOpt contained "\<\(conceal\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|extend\|skipnl\|fold\)\>" | |
1 0.000003 if has("conceal") | |
1 0.000014 syn match vimSynMtchOpt contained "\<cchar=" nextgroup=vimSynMtchCchar | |
1 0.000003 syn match vimSynMtchCchar contained "\S" | |
1 0.000001 endif | |
1 0.000008 syn cluster vimFuncBodyList add=vimSynMtchGroup | |
" Syntax: off and on {{{2 | |
1 0.000003 syn keyword vimSynType contained enable list manual off on reset | |
" Syntax: region {{{2 | |
1 0.000017 syn cluster vimSynRegPatGroup contains=vimPatSep,vimNotPatSep,vimSynPatRange,vimSynNotPatRange,vimSubstSubstr,vimPatRegion,vimPatSepErr,vimNotation | |
1 0.000016 syn cluster vimSynRegGroup contains=vimSynContains,vimSynNextgroup,vimSynRegOpt,vimSynReg,vimSynMtchGrp | |
1 0.000007 syn keyword vimSynType contained region skipwhite nextgroup=vimSynRegion | |
1 0.000020 syn region vimSynRegion contained keepend matchgroup=vimGroupName start="\h\w*" skip="\\\\\|\\|" end="|\|$" contains=@vimSynRegGroup | |
1 0.000019 syn match vimSynRegOpt contained "\<\(conceal\(ends\)\=\|transparent\|contained\|excludenl\|skipempty\|skipwhite\|display\|keepend\|oneline\|extend\|skipnl\|fold\)\>" | |
1 0.000010 syn match vimSynReg contained "\(start\|skip\|end\)="he=e-1 nextgroup=vimSynRegPat | |
1 0.000009 syn match vimSynMtchGrp contained "matchgroup=" nextgroup=vimGroup,vimHLGroup | |
1 0.000021 syn region vimSynRegPat contained extend start="\z([-`~!@#$%^&*_=+;:'",./?]\)" skip="\\\\\|\\\z1" end="\z1" contains=@vimSynRegPatGroup skipwhite nextgroup=vimSynPatMod,vimSynReg | |
1 0.000008 syn match vimSynPatMod contained "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=" | |
1 0.000015 syn match vimSynPatMod contained "\(hs\|ms\|me\|hs\|he\|rs\|re\)=[se]\([-+]\d\+\)\=," nextgroup=vimSynPatMod | |
1 0.000005 syn match vimSynPatMod contained "lc=\d\+" | |
1 0.000004 syn match vimSynPatMod contained "lc=\d\+," nextgroup=vimSynPatMod | |
1 0.000008 syn region vimSynPatRange contained start="\[" skip="\\\\\|\\]" end="]" | |
1 0.000003 syn match vimSynNotPatRange contained "\\\\\|\\\[" | |
1 0.000004 syn match vimMtchComment contained '"[^"]\+$' | |
1 0.000005 syn cluster vimFuncBodyList add=vimSynType | |
" Syntax: sync {{{2 | |
" ============ | |
1 0.000043 syn keyword vimSynType contained sync skipwhite nextgroup=vimSyncC,vimSyncLines,vimSyncMatch,vimSyncError,vimSyncLinebreak,vimSyncLinecont,vimSyncRegion | |
1 0.000004 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimsyncerror") | |
1 0.000004 syn match vimSyncError contained "\i\+" | |
1 0.000001 endif | |
1 0.000003 syn keyword vimSyncC contained ccomment clear fromstart | |
1 0.000008 syn keyword vimSyncMatch contained match skipwhite nextgroup=vimSyncGroupName | |
1 0.000002 syn keyword vimSyncRegion contained region skipwhite nextgroup=vimSynReg | |
1 0.000007 syn match vimSyncLinebreak contained "\<linebreaks=" skipwhite nextgroup=vimNumber | |
1 0.000002 syn keyword vimSyncLinecont contained linecont skipwhite nextgroup=vimSynRegPat | |
1 0.000018 syn match vimSyncLines contained "\(min\|max\)\=lines=" nextgroup=vimNumber | |
1 0.000010 syn match vimSyncGroupName contained "\h\w*" skipwhite nextgroup=vimSyncKey | |
1 0.000012 syn match vimSyncKey contained "\<groupthere\|grouphere\>" skipwhite nextgroup=vimSyncGroup | |
1 0.000009 syn match vimSyncGroup contained "\h\w*" skipwhite nextgroup=vimSynRegPat,vimSyncNone | |
1 0.000002 syn keyword vimSyncNone contained NONE | |
" Additional IsCommand, here by reasons of precedence {{{2 | |
" ==================== | |
1 0.000009 syn match vimIsCommand "<Bar>\s*\a\+" transparent contains=vimCommand,vimNotation | |
" Highlighting {{{2 | |
" ============ | |
1 0.000017 syn cluster vimHighlightCluster contains=vimHiLink,vimHiClear,vimHiKeyList,vimComment | |
1 0.000004 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimhictermerror") | |
1 0.000010 syn match vimHiCtermError contained "[^0-9]\i*" | |
1 0.000001 endif | |
1 0.000011 syn match vimHighlight "\<hi\%[ghlight]\>" skipwhite nextgroup=vimHiBang,@vimHighlightCluster | |
1 0.000004 syn match vimHiBang contained "!" skipwhite nextgroup=@vimHighlightCluster | |
1 0.000008 syn match vimHiGroup contained "\i\+" | |
1 0.000002 syn case ignore | |
1 0.000009 syn keyword vimHiAttrib contained none bold inverse italic reverse standout underline undercurl | |
1 0.000008 syn keyword vimFgBgAttrib contained none bg background fg foreground | |
1 0.000001 syn case match | |
1 0.000009 syn match vimHiAttribList contained "\i\+" contains=vimHiAttrib | |
1 0.000017 syn match vimHiAttribList contained "\i\+,"he=e-1 contains=vimHiAttrib nextgroup=vimHiAttribList | |
1 0.000002 syn case ignore | |
1 0.000075 syn keyword vimHiCtermColor contained black blue brown cyan darkblue darkcyan darkgray darkgreen darkgrey darkmagenta darkred darkyellow gray green grey lightblue lightcyan lightgray lightgreen lightgrey lightmagenta lightred magenta red white yellow | |
1 0.000005 syn match vimHiCtermColor contained "\<color\d\{1,3}\>" | |
1 0.000001 syn case match | |
1 0.000014 syn match vimHiFontname contained "[a-zA-Z\-*]\+" | |
1 0.000012 syn match vimHiGuiFontname contained "'[a-zA-Z\-* ]\+'" | |
1 0.000010 syn match vimHiGuiRgb contained "#\x\{6}" | |
" Highlighting: hi group key=arg ... {{{2 | |
1 0.000043 syn cluster vimHiCluster contains=vimGroup,vimHiGroup,vimHiTerm,vimHiCTerm,vimHiStartStop,vimHiCtermFgBg,vimHiGui,vimHiGuiFont,vimHiGuiFgBg,vimHiKeyError,vimNotation | |
1 0.000011 syn region vimHiKeyList contained oneline start="\i\+" skip="\\\\\|\\|" end="$\||" contains=@vimHiCluster | |
1 0.000004 if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_vimhikeyerror") | |
1 0.000003 syn match vimHiKeyError contained "\i\+="he=e-1 | |
1 0.000000 endif | |
1 0.000004 syn match vimHiTerm contained "\cterm="he=e-1 nextgroup=vimHiAttribList | |
1 0.000023 syn match vimHiStartStop contained "\c\(start\|stop\)="he=e-1 nextgroup=vimHiTermcap,vimOption | |
1 0.000023 syn match vimHiCTerm contained "\ccterm="he=e-1 nextgroup=vimHiAttribList | |
1 0.000016 syn match vimHiCtermFgBg contained "\ccterm[fb]g="he=e-1 nextgroup=vimHiNmbr,vimHiCtermColor,vimFgBgAttrib,vimHiCtermError | |
1 0.000005 syn match vimHiGui contained "\cgui="he=e-1 nextgroup=vimHiAttribList | |
1 0.000004 syn match vimHiGuiFont contained "\cfont="he=e-1 nextgroup=vimHiFontname | |
1 0.000007 syn match vimHiGuiFgBg contained "\cgui\%([fb]g\|sp\)="he=e-1 nextgroup=vimHiGroup,vimHiGuiFontname,vimHiGuiRgb,vimFgBgAttrib | |
1 0.000006 syn match vimHiTermcap contained "\S\+" contains=vimNotation | |
1 0.000003 syn match vimHiNmbr contained '\d\+' | |
" Highlight: clear {{{2 | |
1 0.000004 syn keyword vimHiClear contained clear nextgroup=vimHiGroup | |
" Highlight: link {{{2 | |
1 0.000023 syn region vimHiLink contained oneline matchgroup=vimCommand start="\(\<hi\%[ghlight]\s\+\)\@<=\(\(def\%[ault]\s\+\)\=link\>\|\<def\>\)" end="$" contains=vimHiGroup,vimGroup,vimHLGroup,vimNotation | |
1 0.000005 syn cluster vimFuncBodyList add=vimHiLink | |
" Control Characters {{{2 | |
" ================== | |
1 0.000018 syn match vimCtrlChar "[--]" | |
" Beginners - Patterns that involve ^ {{{2 | |
" ========= | |
1 0.000034 syn match vimLineComment +^[ \t:]*".*$+ contains=@vimCommentGroup,vimCommentString,vimCommentTitle | |
1 0.000018 syn match vimCommentTitle '"\s*\%([sS]:\|\h\w*#\)\=\u\w*\(\s\+\u\w*\)*:'hs=s+1 contained contains=vimCommentTitleLeader,vimTodo,@vimCommentGroup | |
1 0.000005 syn match vimContinue "^\s*\\" | |
1 0.000015 syn region vimString start="^\s*\\\z(['"]\)" skip='\\\\\|\\\z1' end="\z1" oneline keepend contains=@vimStringGroup,vimContinue | |
1 0.000004 syn match vimCommentTitleLeader '"\s\+'ms=s+1 contained | |
" Searches And Globals: {{{2 | |
" ==================== | |
1 0.000015 syn match vimSearch '^\s*[/?].*' contains=vimSearchDelim | |
1 0.000006 syn match vimSearchDelim '^\s*\zs[/?]\|[/?]$' contained | |
1 0.000034 syn region vimGlobal matchgroup=Statement start='\<g\%[lobal]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst | |
1 0.000038 syn region vimGlobal matchgroup=Statement start='\<v\%[global]!\=/' skip='\\.' end='/' skipwhite nextgroup=vimSubst | |
" Scripts : perl,ruby : Benoit Cerrina {{{2 | |
" ======= python,tcl: Johannes Zellner | |
" lua | |
" Allows users to specify the type of embedded script highlighting | |
" they want: (perl/python/ruby/tcl support) | |
" g:vimsyn_embed == 0 : don't embed any scripts | |
" g:vimsyn_embed ~= 'l' : embed lua (but only if vim supports it) | |
" g:vimsyn_embed ~= 'm' : embed mzscheme (but only if vim supports it) | |
" g:vimsyn_embed ~= 'p' : embed perl (but only if vim supports it) | |
" g:vimsyn_embed ~= 'P' : embed python (but only if vim supports it) | |
" g:vimsyn_embed ~= 'r' : embed ruby (but only if vim supports it) | |
" g:vimsyn_embed ~= 't' : embed tcl (but only if vim supports it) | |
1 0.000003 if !exists("g:vimsyn_embed") | |
1 0.000003 let g:vimsyn_embed= "lmpPr" | |
1 0.000000 endif | |
" [-- lua --] {{{3 | |
1 0.000016 let s:luapath= fnameescape(expand("<sfile>:p:h")."/lua.vim") | |
1 0.000008 if !filereadable(s:luapath) | |
for s:luapath in split(globpath(&rtp,"syntax/lua.vim"),"\n") | |
if filereadable(fnameescape(s:luapath)) | |
let s:luapath= fnameescape(s:luapath) | |
break | |
endif | |
endfor | |
endif | |
1 0.000009 if (g:vimsyn_embed =~ 'l' && has("lua")) && filereadable(s:luapath) | |
1 0.000002 unlet! b:current_syntax | |
1 0.000087 exe "syn include @vimLuaScript ".s:luapath | |
1 0.000004 if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'l' | |
syn region vimLuaRegion fold matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimLuaScript | |
syn region vimLuaRegion fold matchgroup=vimScriptDelim start=+lua\s*<<\s*$+ end=+\.$+ contains=@vimLuaScript | |
else | |
1 0.000029 syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimLuaScript | |
1 0.000030 syn region vimLuaRegion matchgroup=vimScriptDelim start=+lua\s*<<\s*$+ end=+\.$+ contains=@vimLuaScript | |
1 0.000001 endif | |
1 0.000006 syn cluster vimFuncBodyList add=vimLuaRegion | |
1 0.000000 else | |
syn region vimEmbedError start=+lua\s*<<\s*\z(.*\)$+ end=+^\z1$+ | |
syn region vimEmbedError start=+lua\s*<<\s*$+ end=+\.$+ | |
endif | |
1 0.000002 unlet s:luapath | |
" [-- perl --] {{{3 | |
1 0.000016 let s:perlpath= fnameescape(expand("<sfile>:p:h")."/perl.vim") | |
1 0.000007 if !filereadable(s:perlpath) | |
for s:perlpath in split(globpath(&rtp,"syntax/perl.vim"),"\n") | |
if filereadable(fnameescape(s:perlpath)) | |
let s:perlpath= fnameescape(s:perlpath) | |
break | |
endif | |
endfor | |
endif | |
1 0.000011 if (g:vimsyn_embed =~ 'p' && has("perl")) && filereadable(s:perlpath) | |
1 0.000002 unlet! b:current_syntax | |
1 0.000105 exe "syn include @vimPerlScript ".s:perlpath | |
1 0.000004 if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'p' | |
syn region vimPerlRegion fold matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPerlScript | |
syn region vimPerlRegion fold matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*$+ end=+\.$+ contains=@vimPerlScript | |
else | |
1 0.000023 syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPerlScript | |
1 0.000010 syn region vimPerlRegion matchgroup=vimScriptDelim start=+pe\%[rl]\s*<<\s*$+ end=+\.$+ contains=@vimPerlScript | |
1 0.000001 endif | |
1 0.000005 syn cluster vimFuncBodyList add=vimPerlRegion | |
1 0.000001 else | |
syn region vimEmbedError start=+pe\%[rl]\s*<<\s*\z(.*\)$+ end=+^\z1$+ | |
syn region vimEmbedError start=+pe\%[rl]\s*<<\s*$+ end=+\.$+ | |
endif | |
1 0.000001 unlet s:perlpath | |
" [-- ruby --] {{{3 | |
1 0.000017 let s:rubypath= fnameescape(expand("<sfile>:p:h")."/ruby.vim") | |
1 0.000020 if !filereadable(s:rubypath) | |
for s:rubypath in split(globpath(&rtp,"syntax/ruby.vim"),"\n") | |
if filereadable(fnameescape(s:rubypath)) | |
let s:rubypath= fnameescape(s:rubypath) | |
break | |
endif | |
endfor | |
endif | |
1 0.000021 if (g:vimsyn_embed =~ 'r' && has("ruby")) && filereadable(s:rubypath) | |
1 0.000001 unlet! b:current_syntax | |
1 0.000103 exe "syn include @vimRubyScript ".s:rubypath | |
1 0.000004 if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'r' | |
syn region vimRubyRegion fold matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimRubyScript | |
else | |
1 0.000023 syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimRubyScript | |
1 0.000001 endif | |
1 0.000011 syn region vimRubyRegion matchgroup=vimScriptDelim start=+rub[y]\s*<<\s*$+ end=+\.$+ contains=@vimRubyScript | |
1 0.000006 syn cluster vimFuncBodyList add=vimRubyRegion | |
1 0.000001 else | |
syn region vimEmbedError start=+rub[y]\s*<<\s*\z(.*\)$+ end=+^\z1$+ | |
syn region vimEmbedError start=+rub[y]\s*<<\s*$+ end=+\.$+ | |
endif | |
1 0.000002 unlet s:rubypath | |
" [-- python --] {{{3 | |
1 0.000018 let s:pythonpath= fnameescape(expand("<sfile>:p:h")."/python.vim") | |
1 0.000007 if !filereadable(s:pythonpath) | |
for s:pythonpath in split(globpath(&rtp,"syntax/python.vim"),"\n") | |
if filereadable(fnameescape(s:pythonpath)) | |
let s:pythonpath= fnameescape(s:pythonpath) | |
break | |
endif | |
endfor | |
endif | |
1 0.000012 if g:vimsyn_embed =~ 'P' && (has("python") || has("python3")) && filereadable(s:pythonpath) | |
1 0.000001 unlet! b:current_syntax | |
1 0.000092 exe "syn include @vimPythonScript ".s:pythonpath | |
1 0.000003 if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'P' | |
syn region vimPythonRegion fold matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPythonScript | |
syn region vimPythonRegion fold matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript | |
else | |
1 0.000064 syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimPythonScript | |
1 0.000021 syn region vimPythonRegion matchgroup=vimScriptDelim start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+ contains=@vimPythonScript | |
1 0.000001 endif | |
1 0.000005 syn cluster vimFuncBodyList add=vimPythonRegion | |
1 0.000001 else | |
syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ | |
syn region vimEmbedError start=+py\%[thon]3\=\s*<<\s*$+ end=+\.$+ | |
endif | |
1 0.000001 unlet s:pythonpath | |
" [-- tcl --] {{{3 | |
1 0.000009 if has("win32") || has("win95") || has("win64") || has("win16") | |
" apparently has("tcl") has been hanging vim on some windows systems with cygwin | |
let s:trytcl= (&shell !~ '\<\%(bash\>\|4[nN][tT]\|\<zsh\)\>\%(\.exe\)\=$') | |
else | |
1 0.000002 let s:trytcl= 1 | |
1 0.000001 endif | |
1 0.000001 if s:trytcl | |
1 0.000011 let s:tclpath= fnameescape(expand("<sfile>:p:h")."/tcl.vim") | |
1 0.000006 if !filereadable(s:tclpath) | |
for s:tclpath in split(globpath(&rtp,"syntax/tcl.vim"),"\n") | |
if filereadable(fnameescape(s:tclpath)) | |
let s:tclpath= fnameescape(s:tclpath) | |
break | |
endif | |
endfor | |
endif | |
1 0.000005 if (g:vimsyn_embed =~ 't' && has("tcl")) && filereadable(s:tclpath) | |
unlet! b:current_syntax | |
exe "syn include @vimTclScript ".s:tclpath | |
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 't' | |
syn region vimTclRegion fold matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimTclScript | |
syn region vimTclRegion fold matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*$+ end=+\.$+ contains=@vimTclScript | |
else | |
syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimTclScript | |
syn region vimTclRegion matchgroup=vimScriptDelim start=+tc[l]\=\s*<<\s*$+ end=+\.$+ contains=@vimTclScript | |
endif | |
syn cluster vimFuncBodyList add=vimTclScript | |
else | |
1 0.000019 syn region vimEmbedError start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ | |
1 0.000008 syn region vimEmbedError start=+tc[l]\=\s*<<\s*$+ end=+\.$+ | |
1 0.000001 endif | |
1 0.000001 unlet s:tclpath | |
1 0.000001 else | |
syn region vimEmbedError start=+tc[l]\=\s*<<\s*\z(.*\)$+ end=+^\z1$+ | |
syn region vimEmbedError start=+tc[l]\=\s*<<\s*$+ end=+\.$+ | |
endif | |
1 0.000001 unlet s:trytcl | |
" [-- mzscheme --] {{{3 | |
1 0.000012 let s:mzschemepath= fnameescape(expand("<sfile>:p:h")."/scheme.vim") | |
1 0.000004 if !filereadable(s:mzschemepath) | |
for s:mzschemepath in split(globpath(&rtp,"syntax/mzscheme.vim"),"\n") | |
if filereadable(fnameescape(s:mzschemepath)) | |
let s:mzschemepath= fnameescape(s:mzschemepath) | |
break | |
endif | |
endfor | |
endif | |
1 0.000007 if (g:vimsyn_embed =~ 'm' && has("mzscheme")) && filereadable(s:mzschemepath) | |
unlet! b:current_syntax | |
let iskKeep= &isk | |
exe "syn include @vimMzSchemeScript ".s:mzschemepath | |
let &isk= iskKeep | |
if exists("g:vimsyn_folding") && g:vimsyn_folding =~ 'm' | |
syn region vimMzSchemeRegion fold matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimMzSchemeScript | |
syn region vimMzSchemeRegion fold matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+ contains=@vimMzSchemeScript | |
else | |
syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+ contains=@vimMzSchemeScript | |
syn region vimMzSchemeRegion matchgroup=vimScriptDelim start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+ contains=@vimMzSchemeScript | |
endif | |
syn cluster vimFuncBodyList add=vimMzSchemeRegion | |
else | |
1 0.000007 syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*\z(.*\)$+ end=+^\z1$+ | |
1 0.000043 syn region vimEmbedError start=+mz\%[scheme]\s*<<\s*$+ end=+\.$+ | |
1 0.000001 endif | |
1 0.000001 unlet s:mzschemepath | |
" Synchronize (speed) {{{2 | |
"============ | |
1 0.000002 if exists("g:vimsyn_minlines") | |
exe "syn sync minlines=".g:vimsyn_minlines | |
endif | |
1 0.000001 if exists("g:vimsyn_maxlines") | |
exe "syn sync maxlines=".g:vimsyn_maxlines | |
else | |
1 0.000002 syn sync maxlines=60 | |
1 0.000001 endif | |
1 0.000012 syn sync linecont "^\s\+\\" | |
1 0.000020 syn sync match vimAugroupSyncA groupthere NONE "\<aug\%[roup]\>\s\+[eE][nN][dD]" | |
" ==================== | |
" Highlighting Settings {{{2 | |
" ==================== | |
1 0.000002 if !exists("g:vimsyn_noerror") | |
1 0.000015 hi def link vimBehaveError vimError | |
1 0.000005 hi def link vimCollClassErr vimError | |
1 0.000005 hi def link vimErrSetting vimError | |
1 0.000001 hi def link vimEmbedError vimError | |
1 0.000005 hi def link vimFTError vimError | |
1 0.000004 hi def link vimFunctionError vimError | |
1 0.000005 hi def link vimFunc vimError | |
1 0.000003 hi def link vimHiAttribList vimError | |
1 0.000003 hi def link vimHiCtermError vimError | |
1 0.000003 hi def link vimHiKeyError vimError | |
1 0.000010 hi def link vimKeyCodeError vimError | |
1 0.000004 hi def link vimMapModErr vimError | |
1 0.000004 hi def link vimSubstFlagErr vimError | |
1 0.000004 hi def link vimSynCaseError vimError | |
1 0.000012 hi def link vimBufnrWarn vimWarn | |
1 0.000001 endif | |
1 0.000008 hi def link vimAbb vimCommand | |
1 0.000008 hi def link vimAddress vimMark | |
1 0.000008 hi def link vimAugroupKey vimCommand | |
1 0.000013 hi def link vimAuHighlight vimHighlight | |
1 0.000014 hi def link vimAutoCmdOpt vimOption | |
1 0.000009 hi def link vimAutoCmd vimCommand | |
1 0.000012 hi def link vimAutoEvent Type | |
1 0.000014 hi def link vimAutoSet vimCommand | |
1 0.000008 hi def link vimBehaveModel vimBehave | |
1 0.000008 hi def link vimBehave vimCommand | |
1 0.000011 hi def link vimBracket Delimiter | |
1 0.000012 hi def link vimCmplxRepeat SpecialChar | |
1 0.000013 hi def link vimCommand Statement | |
1 0.000012 hi def link vimComment Comment | |
1 0.000008 hi def link vimCommentString vimString | |
1 0.000011 hi def link vimCommentTitle PreProc | |
1 0.000014 hi def link vimCondHL vimCommand | |
1 0.000013 hi def link vimContinue Special | |
1 0.000012 hi def link vimCtrlChar SpecialChar | |
1 0.000008 hi def link vimEchoHLNone vimGroup | |
1 0.000008 hi def link vimEchoHL vimCommand | |
1 0.000011 hi def link vimElseIfErr Error | |
1 0.000010 hi def link vimElseif vimCondHL | |
1 0.000013 hi def link vimEnvvar PreProc | |
1 0.000009 hi def link vimError Error | |
1 0.000008 hi def link vimFBVar vimVar | |
1 0.000005 hi def link vimFgBgAttrib vimHiAttrib | |
1 0.000019 hi def link vimFold Folded | |
1 0.000008 hi def link vimFTCmd vimCommand | |
1 0.000007 hi def link vimFTOption vimSynType | |
1 0.000007 hi def link vimFuncKey vimCommand | |
1 0.000013 hi def link vimFuncName Function | |
1 0.000012 hi def link vimFuncSID Special | |
1 0.000012 hi def link vimFuncVar Identifier | |
1 0.000013 hi def link vimGroupAdd vimSynOption | |
1 0.000008 hi def link vimGroupName vimGroup | |
1 0.000003 hi def link vimGroupRem vimSynOption | |
1 0.000012 hi def link vimGroupSpecial Special | |
1 0.000013 hi def link vimGroup Type | |
1 0.000011 hi def link vimHiAttrib PreProc | |
1 0.000007 hi def link vimHiClear vimHighlight | |
1 0.000005 hi def link vimHiCtermFgBg vimHiTerm | |
1 0.000005 hi def link vimHiCTerm vimHiTerm | |
1 0.000008 hi def link vimHighlight vimCommand | |
1 0.000006 hi def link vimHiGroup vimGroupName | |
1 0.000005 hi def link vimHiGuiFgBg vimHiTerm | |
1 0.000005 hi def link vimHiGuiFont vimHiTerm | |
1 0.000006 hi def link vimHiGuiRgb vimNumber | |
1 0.000005 hi def link vimHiGui vimHiTerm | |
1 0.000011 hi def link vimHiNmbr Number | |
1 0.000005 hi def link vimHiStartStop vimHiTerm | |
1 0.000010 hi def link vimHiTerm Type | |
1 0.000009 hi def link vimHLGroup vimGroup | |
1 0.000021 hi def link vimHLMod PreProc | |
1 0.000009 hi def link vimInsert vimString | |
1 0.000013 hi def link vimKeyCode vimSpecFile | |
1 0.000018 hi def link vimKeyword Statement | |
1 0.000008 hi def link vimLet vimCommand | |
1 0.000006 hi def link vimLineComment vimComment | |
1 0.000006 hi def link vimMapBang vimCommand | |
1 0.000006 hi def link vimMapModKey vimFuncSID | |
1 0.000005 hi def link vimMapMod vimBracket | |
1 0.000006 hi def link vimMap vimCommand | |
1 0.000011 hi def link vimMark Number | |
1 0.000010 hi def link vimMarkNumber vimNumber | |
1 0.000005 hi def link vimMenuMod vimMapMod | |
1 0.000004 hi def link vimMenuNameMore vimMenuName | |
1 0.000011 hi def link vimMenuName PreProc | |
1 0.000006 hi def link vimMtchComment vimComment | |
1 0.000006 hi def link vimNorm vimCommand | |
1 0.000010 hi def link vimNotation Special | |
1 0.000007 hi def link vimNotFunc vimCommand | |
1 0.000006 hi def link vimNotPatSep vimString | |
1 0.000010 hi def link vimNumber Number | |
1 0.000011 hi def link vimOperError Error | |
1 0.000015 hi def link vimOper Operator | |
1 0.000011 hi def link vimOption PreProc | |
1 0.000011 hi def link vimParenSep Delimiter | |
1 0.000006 hi def link vimPatSepErr vimPatSep | |
1 0.000005 hi def link vimPatSepR vimPatSep | |
1 0.000009 hi def link vimPatSep SpecialChar | |
1 0.000007 hi def link vimPatSepZone vimString | |
1 0.000005 hi def link vimPatSepZ vimPatSep | |
1 0.000010 hi def link vimPattern Type | |
1 0.000006 hi def link vimPlainMark vimMark | |
1 0.000006 hi def link vimPlainRegister vimRegister | |
1 0.000010 hi def link vimRegister SpecialChar | |
1 0.000009 hi def link vimScriptDelim Comment | |
1 0.000010 hi def link vimSearchDelim Statement | |
1 0.000006 hi def link vimSearch vimString | |
1 0.000010 hi def link vimSep Delimiter | |
1 0.000007 hi def link vimSetMod vimOption | |
1 0.000010 hi def link vimSetSep Statement | |
1 0.000006 hi def link vimSetString vimString | |
1 0.000011 hi def link vimSpecFile Identifier | |
1 0.000006 hi def link vimSpecFileMod vimSpecFile | |
1 0.000016 hi def link vimSpecial Type | |
1 0.000017 hi def link vimStatement Statement | |
1 0.000006 hi def link vimStringCont vimString | |
1 0.000011 hi def link vimString String | |
1 0.000007 hi def link vimSubst1 vimSubst | |
1 0.000009 hi def link vimSubstDelim Delimiter | |
1 0.000011 hi def link vimSubstFlags Special | |
1 0.000010 hi def link vimSubstSubstr SpecialChar | |
1 0.000007 hi def link vimSubstTwoBS vimString | |
1 0.000007 hi def link vimSubst vimCommand | |
1 0.000009 hi def link vimSynCaseError Error | |
1 0.000010 hi def link vimSynCase Type | |
1 0.000010 hi def link vimSyncC Type | |
1 0.000010 hi def link vimSyncError Error | |
1 0.000005 hi def link vimSyncGroupName vimGroupName | |
1 0.000004 hi def link vimSyncGroup vimGroupName | |
1 0.000009 hi def link vimSyncKey Type | |
1 0.000010 hi def link vimSyncNone Type | |
1 0.000004 hi def link vimSynContains vimSynOption | |
1 0.000009 hi def link vimSynError Error | |
1 0.000005 hi def link vimSynKeyContainedin vimSynContains | |
1 0.000002 hi def link vimSynKeyOpt vimSynOption | |
1 0.000003 hi def link vimSynMtchGrp vimSynOption | |
1 0.000003 hi def link vimSynMtchOpt vimSynOption | |
1 0.000003 hi def link vimSynNextgroup vimSynOption | |
1 0.000004 hi def link vimSynNotPatRange vimSynRegPat | |
1 0.000008 hi def link vimSynOption Special | |
1 0.000006 hi def link vimSynPatRange vimString | |
1 0.000002 hi def link vimSynRegOpt vimSynOption | |
1 0.000005 hi def link vimSynRegPat vimString | |
1 0.000010 hi def link vimSynReg Type | |
1 0.000011 hi def link vimSyntax vimCommand | |
1 0.000003 hi def link vimSynType vimSpecial | |
1 0.000014 hi def link vimTodo Todo | |
1 0.000016 hi def link vimUnmap vimMap | |
1 0.000011 hi def link vimUserAttrbCmpltFunc Special | |
1 0.000004 hi def link vimUserAttrbCmplt vimSpecial | |
1 0.000006 hi def link vimUserAttrbKey vimOption | |
1 0.000003 hi def link vimUserAttrb vimSpecial | |
1 0.000010 hi def link vimUserCmdError Error | |
1 0.000007 hi def link vimUserCommand vimCommand | |
1 0.000009 hi def link vimUserFunc Normal | |
1 0.000012 hi def link vimVar Identifier | |
1 0.000008 hi def link vimWarn WarningMsg | |
" Current Syntax Variable: {{{2 | |
1 0.000003 let b:current_syntax = "vim" | |
" --------------------------------------------------------------------- | |
" Cleanup: {{{1 | |
1 0.000006 let &cpo = s:keepcpo | |
1 0.000001 unlet s:keepcpo | |
" vim:ts=18 fdm=marker | |
SCRIPT /usr/share/vim/vim74/syntax/lua.vim | |
Sourced 1 time | |
Total time: 0.001987 | |
Self time: 0.001987 | |
count total (s) self (s) | |
" Vim syntax file | |
" Language: Lua 4.0, Lua 5.0, Lua 5.1 and Lua 5.2 | |
" Maintainer: Marcus Aurelius Farias <masserahguard-lua 'at' yahoo com> | |
" First Author: Carlos Augusto Teixeira Mendes <cmendes 'at' inf puc-rio br> | |
" Last Change: 2012 Aug 12 | |
" Options: lua_version = 4 or 5 | |
" lua_subversion = 0 (4.0, 5.0) or 1 (5.1) or 2 (5.2) | |
" default 5.2 | |
" For version 5.x: Clear all syntax items | |
" For version 6.x: Quit when a syntax file was already loaded | |
1 0.000002 if version < 600 | |
syntax clear | |
elseif exists("b:current_syntax") | |
finish | |
endif | |
1 0.000006 let s:cpo_save = &cpo | |
1 0.000006 set cpo&vim | |
1 0.000002 if !exists("lua_version") | |
" Default is lua 5.2 | |
1 0.000003 let lua_version = 5 | |
1 0.000001 let lua_subversion = 2 | |
1 0.000002 elseif !exists("lua_subversion") | |
" lua_version exists, but lua_subversion doesn't. So, set it to 0 | |
let lua_subversion = 0 | |
endif | |
1 0.000002 syn case match | |
" syncing method | |
1 0.000002 syn sync minlines=100 | |
" Comments | |
1 0.000013 syn keyword luaTodo contained TODO FIXME XXX | |
1 0.000011 syn match luaComment "--.*$" contains=luaTodo,@Spell | |
1 0.000002 if lua_version == 5 && lua_subversion == 0 | |
syn region luaComment matchgroup=luaComment start="--\[\[" end="\]\]" contains=luaTodo,luaInnerComment,@Spell | |
syn region luaInnerComment contained transparent start="\[\[" end="\]\]" | |
elseif lua_version > 5 || (lua_version == 5 && lua_subversion >= 1) | |
" Comments in Lua 5.1: --[[ ... ]], [=[ ... ]=], [===[ ... ]===], etc. | |
1 0.000011 syn region luaComment matchgroup=luaComment start="--\[\z(=*\)\[" end="\]\z1\]" contains=luaTodo,@Spell | |
1 0.000001 endif | |
" First line may start with #! | |
1 0.000004 syn match luaComment "\%^#!.*" | |
" catch errors caused by wrong parenthesis and wrong curly brackets or | |
" keywords placed outside their respective blocks | |
1 0.000073 syn region luaParen transparent start='(' end=')' contains=ALLBUT,luaParenError,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd,luaBlock,luaLoopBlock,luaIn,luaStatement | |
1 0.000040 syn region luaTableBlock transparent matchgroup=luaTable start="{" end="}" contains=ALLBUT,luaBraceError,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd,luaBlock,luaLoopBlock,luaIn,luaStatement | |
1 0.000004 syn match luaParenError ")" | |
1 0.000002 syn match luaBraceError "}" | |
1 0.000013 syn match luaError "\<\%(end\|else\|elseif\|then\|until\|in\)\>" | |
" function ... end | |
1 0.000022 syn region luaFunctionBlock transparent matchgroup=luaFunction start="\<function\>" end="\<end\>" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn | |
" if ... then | |
1 0.000034 syn region luaIfThen transparent matchgroup=luaCond start="\<if\>" end="\<then\>"me=e-4 contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaIn nextgroup=luaThenEnd skipwhite skipempty | |
" then ... end | |
1 0.000019 syn region luaThenEnd contained transparent matchgroup=luaCond start="\<then\>" end="\<end\>" contains=ALLBUT,luaTodo,luaSpecial,luaThenEnd,luaIn | |
" elseif ... then | |
1 0.000010 syn region luaElseifThen contained transparent matchgroup=luaCond start="\<elseif\>" end="\<then\>" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn | |
" else | |
1 0.000002 syn keyword luaElse contained else | |
" do ... end | |
1 0.000009 syn region luaBlock transparent matchgroup=luaStatement start="\<do\>" end="\<end\>" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn | |
" repeat ... until | |
1 0.000019 syn region luaLoopBlock transparent matchgroup=luaRepeat start="\<repeat\>" end="\<until\>" contains=ALLBUT,luaTodo,luaSpecial,luaElseifThen,luaElse,luaThenEnd,luaIn | |
" while ... do | |
1 0.000031 syn region luaLoopBlock transparent matchgroup=luaRepeat start="\<while\>" end="\<do\>"me=e-2 contains=ALLBUT,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd,luaIn nextgroup=luaBlock skipwhite skipempty | |
" for ... do and for ... in ... do | |
1 0.000020 syn region luaLoopBlock transparent matchgroup=luaRepeat start="\<for\>" end="\<do\>"me=e-2 contains=ALLBUT,luaTodo,luaSpecial,luaIfThen,luaElseifThen,luaElse,luaThenEnd nextgroup=luaBlock skipwhite skipempty | |
1 0.000002 syn keyword luaIn contained in | |
" other keywords | |
1 0.000002 syn keyword luaStatement return local break | |
1 0.000002 if lua_version > 5 || (lua_version == 5 && lua_subversion >= 2) | |
1 0.000003 syn keyword luaStatement goto | |
1 0.000013 syn match luaLabel "::\I\i*::" | |
1 0.000003 endif | |
1 0.000007 syn keyword luaOperator and or not | |
1 0.000006 syn keyword luaConstant nil | |
1 0.000002 if lua_version > 4 | |
1 0.000002 syn keyword luaConstant true false | |
1 0.000000 endif | |
" Strings | |
1 0.000001 if lua_version < 5 | |
syn match luaSpecial contained "\\[\\abfnrtv\'\"]\|\\[[:digit:]]\{,3}" | |
elseif lua_version == 5 | |
1 0.000002 if lua_subversion == 0 | |
syn match luaSpecial contained #\\[\\abfnrtv'"[\]]\|\\[[:digit:]]\{,3}# | |
syn region luaString2 matchgroup=luaString start=+\[\[+ end=+\]\]+ contains=luaString2,@Spell | |
else | |
1 0.000001 if lua_subversion == 1 | |
syn match luaSpecial contained #\\[\\abfnrtv'"]\|\\[[:digit:]]\{,3}# | |
else " Lua 5.2 | |
1 0.000009 syn match luaSpecial contained #\\[\\abfnrtvz'"]\|\\x[[:xdigit:]]\{2}\|\\[[:digit:]]\{,3}# | |
1 0.000001 endif | |
1 0.000017 syn region luaString2 matchgroup=luaString start="\[\z(=*\)\[" end="\]\z1\]" contains=@Spell | |
1 0.000000 endif | |
1 0.000000 endif | |
1 0.000033 syn region luaString start=+'+ end=+'+ skip=+\\\\\|\\'+ contains=luaSpecial,@Spell | |
1 0.000018 syn region luaString start=+"+ end=+"+ skip=+\\\\\|\\"+ contains=luaSpecial,@Spell | |
" integer number | |
1 0.000013 syn match luaNumber "\<\d\+\>" | |
" floating point number, with dot, optional exponent | |
1 0.000007 syn match luaNumber "\<\d\+\.\d*\%([eE][-+]\=\d\+\)\=\>" | |
" floating point number, starting with a dot, optional exponent | |
1 0.000006 syn match luaNumber "\.\d\+\%([eE][-+]\=\d\+\)\=\>" | |
" floating point number, without dot, with exponent | |
1 0.000005 syn match luaNumber "\<\d\+[eE][-+]\=\d\+\>" | |
" hex numbers | |
1 0.000001 if lua_version >= 5 | |
1 0.000001 if lua_subversion == 1 | |
syn match luaNumber "\<0[xX]\x\+\>" | |
elseif lua_subversion >= 2 | |
1 0.000062 syn match luaNumber "\<0[xX][[:xdigit:].]\+\%([pP][-+]\=\d\+\)\=\>" | |
1 0.000001 endif | |
1 0.000000 endif | |
1 0.000021 syn keyword luaFunc assert collectgarbage dofile error next | |
1 0.000004 syn keyword luaFunc print rawget rawset tonumber tostring type _VERSION | |
1 0.000001 if lua_version == 4 | |
syn keyword luaFunc _ALERT _ERRORMESSAGE gcinfo | |
syn keyword luaFunc call copytagmethods dostring | |
syn keyword luaFunc foreach foreachi getglobal getn | |
syn keyword luaFunc gettagmethod globals newtag | |
syn keyword luaFunc setglobal settag settagmethod sort | |
syn keyword luaFunc tag tinsert tremove | |
syn keyword luaFunc _INPUT _OUTPUT _STDIN _STDOUT _STDERR | |
syn keyword luaFunc openfile closefile flush seek | |
syn keyword luaFunc setlocale execute remove rename tmpname | |
syn keyword luaFunc getenv date clock exit | |
syn keyword luaFunc readfrom writeto appendto read write | |
syn keyword luaFunc PI abs sin cos tan asin | |
syn keyword luaFunc acos atan atan2 ceil floor | |
syn keyword luaFunc mod frexp ldexp sqrt min max log | |
syn keyword luaFunc log10 exp deg rad random | |
syn keyword luaFunc randomseed strlen strsub strlower strupper | |
syn keyword luaFunc strchar strrep ascii strbyte | |
syn keyword luaFunc format strfind gsub | |
syn keyword luaFunc getinfo getlocal setlocal setcallhook setlinehook | |
elseif lua_version == 5 | |
1 0.000004 syn keyword luaFunc getmetatable setmetatable | |
1 0.000002 syn keyword luaFunc ipairs pairs | |
1 0.000002 syn keyword luaFunc pcall xpcall | |
1 0.000003 syn keyword luaFunc _G loadfile rawequal require | |
1 0.000001 if lua_subversion == 0 | |
syn keyword luaFunc getfenv setfenv | |
syn keyword luaFunc loadstring unpack | |
syn keyword luaFunc gcinfo loadlib LUA_PATH _LOADED _REQUIREDNAME | |
else | |
1 0.000003 syn keyword luaFunc load select | |
1 0.000006 syn match luaFunc /\<package\.cpath\>/ | |
1 0.000005 syn match luaFunc /\<package\.loaded\>/ | |
1 0.000004 syn match luaFunc /\<package\.loadlib\>/ | |
1 0.000004 syn match luaFunc /\<package\.path\>/ | |
1 0.000001 if lua_subversion == 1 | |
syn keyword luaFunc getfenv setfenv | |
syn keyword luaFunc loadstring module unpack | |
syn match luaFunc /\<package\.loaders\>/ | |
syn match luaFunc /\<package\.preload\>/ | |
syn match luaFunc /\<package\.seeall\>/ | |
elseif lua_subversion == 2 | |
1 0.000002 syn keyword luaFunc _ENV rawlen | |
1 0.000004 syn match luaFunc /\<package\.config\>/ | |
1 0.000005 syn match luaFunc /\<package\.preload\>/ | |
1 0.000005 syn match luaFunc /\<package\.searchers\>/ | |
1 0.000006 syn match luaFunc /\<package\.searchpath\>/ | |
1 0.000004 syn match luaFunc /\<bit32\.arshift\>/ | |
1 0.000031 syn match luaFunc /\<bit32\.band\>/ | |
1 0.000009 syn match luaFunc /\<bit32\.bnot\>/ | |
1 0.000004 syn match luaFunc /\<bit32\.bor\>/ | |
1 0.000007 syn match luaFunc /\<bit32\.btest\>/ | |
1 0.000004 syn match luaFunc /\<bit32\.bxor\>/ | |
1 0.000004 syn match luaFunc /\<bit32\.extract\>/ | |
1 0.000004 syn match luaFunc /\<bit32\.lrotate\>/ | |
1 0.000004 syn match luaFunc /\<bit32\.lshift\>/ | |
1 0.000004 syn match luaFunc /\<bit32\.replace\>/ | |
1 0.000004 syn match luaFunc /\<bit32\.rrotate\>/ | |
1 0.000025 syn match luaFunc /\<bit32\.rshift\>/ | |
1 0.000001 endif | |
1 0.000008 syn match luaFunc /\<coroutine\.running\>/ | |
1 0.000001 endif | |
1 0.000005 syn match luaFunc /\<coroutine\.create\>/ | |
1 0.000004 syn match luaFunc /\<coroutine\.resume\>/ | |
1 0.000004 syn match luaFunc /\<coroutine\.status\>/ | |
1 0.000005 syn match luaFunc /\<coroutine\.wrap\>/ | |
1 0.000004 syn match luaFunc /\<coroutine\.yield\>/ | |
1 0.000004 syn match luaFunc /\<string\.byte\>/ | |
1 0.000004 syn match luaFunc /\<string\.char\>/ | |
1 0.000003 syn match luaFunc /\<string\.dump\>/ | |
1 0.000028 syn match luaFunc /\<string\.find\>/ | |
1 0.000008 syn match luaFunc /\<string\.format\>/ | |
1 0.000004 syn match luaFunc /\<string\.gsub\>/ | |
1 0.000005 syn match luaFunc /\<string\.len\>/ | |
1 0.000004 syn match luaFunc /\<string\.lower\>/ | |
1 0.000003 syn match luaFunc /\<string\.rep\>/ | |
1 0.000003 syn match luaFunc /\<string\.sub\>/ | |
1 0.000004 syn match luaFunc /\<string\.upper\>/ | |
1 0.000001 if lua_subversion == 0 | |
syn match luaFunc /\<string\.gfind\>/ | |
else | |
1 0.000005 syn match luaFunc /\<string\.gmatch\>/ | |
1 0.000004 syn match luaFunc /\<string\.match\>/ | |
1 0.000029 syn match luaFunc /\<string\.reverse\>/ | |
1 0.000001 endif | |
1 0.000001 if lua_subversion == 0 | |
syn match luaFunc /\<table\.getn\>/ | |
syn match luaFunc /\<table\.setn\>/ | |
syn match luaFunc /\<table\.foreach\>/ | |
syn match luaFunc /\<table\.foreachi\>/ | |
elseif lua_subversion == 1 | |
syn match luaFunc /\<table\.maxn\>/ | |
elseif lua_subversion == 2 | |
1 0.000004 syn match luaFunc /\<table\.pack\>/ | |
1 0.000004 syn match luaFunc /\<table\.unpack\>/ | |
1 0.000001 endif | |
1 0.000004 syn match luaFunc /\<table\.concat\>/ | |
1 0.000004 syn match luaFunc /\<table\.sort\>/ | |
1 0.000003 syn match luaFunc /\<table\.insert\>/ | |
1 0.000004 syn match luaFunc /\<table\.remove\>/ | |
1 0.000004 syn match luaFunc /\<math\.abs\>/ | |
1 0.000004 syn match luaFunc /\<math\.acos\>/ | |
1 0.000004 syn match luaFunc /\<math\.asin\>/ | |
1 0.000017 syn match luaFunc /\<math\.atan\>/ | |
1 0.000004 syn match luaFunc /\<math\.atan2\>/ | |
1 0.000004 syn match luaFunc /\<math\.ceil\>/ | |
1 0.000004 syn match luaFunc /\<math\.sin\>/ | |
1 0.000003 syn match luaFunc /\<math\.cos\>/ | |
1 0.000004 syn match luaFunc /\<math\.tan\>/ | |
1 0.000004 syn match luaFunc /\<math\.deg\>/ | |
1 0.000004 syn match luaFunc /\<math\.exp\>/ | |
1 0.000004 syn match luaFunc /\<math\.floor\>/ | |
1 0.000004 syn match luaFunc /\<math\.log\>/ | |
1 0.000020 syn match luaFunc /\<math\.max\>/ | |
1 0.000072 syn match luaFunc /\<math\.min\>/ | |
1 0.000001 if lua_subversion == 0 | |
syn match luaFunc /\<math\.mod\>/ | |
syn match luaFunc /\<math\.log10\>/ | |
else | |
1 0.000001 if lua_subversion == 1 | |
syn match luaFunc /\<math\.log10\>/ | |
endif | |
1 0.000004 syn match luaFunc /\<math\.huge\>/ | |
1 0.000003 syn match luaFunc /\<math\.fmod\>/ | |
1 0.000004 syn match luaFunc /\<math\.modf\>/ | |
1 0.000003 syn match luaFunc /\<math\.cosh\>/ | |
1 0.000004 syn match luaFunc /\<math\.sinh\>/ | |
1 0.000003 syn match luaFunc /\<math\.tanh\>/ | |
1 0.000001 endif | |
1 0.000004 syn match luaFunc /\<math\.pow\>/ | |
1 0.000004 syn match luaFunc /\<math\.rad\>/ | |
1 0.000014 syn match luaFunc /\<math\.sqrt\>/ | |
1 0.000013 syn match luaFunc /\<math\.frexp\>/ | |
1 0.000003 syn match luaFunc /\<math\.ldexp\>/ | |
1 0.000004 syn match luaFunc /\<math\.random\>/ | |
1 0.000005 syn match luaFunc /\<math\.randomseed\>/ | |
1 0.000003 syn match luaFunc /\<math\.pi\>/ | |
1 0.000004 syn match luaFunc /\<io\.close\>/ | |
1 0.000004 syn match luaFunc /\<io\.flush\>/ | |
1 0.000003 syn match luaFunc /\<io\.input\>/ | |
1 0.000004 syn match luaFunc /\<io\.lines\>/ | |
1 0.000015 syn match luaFunc /\<io\.open\>/ | |
1 0.000011 syn match luaFunc /\<io\.output\>/ | |
1 0.000003 syn match luaFunc /\<io\.popen\>/ | |
1 0.000004 syn match luaFunc /\<io\.read\>/ | |
1 0.000003 syn match luaFunc /\<io\.stderr\>/ | |
1 0.000004 syn match luaFunc /\<io\.stdin\>/ | |
1 0.000004 syn match luaFunc /\<io\.stdout\>/ | |
1 0.000004 syn match luaFunc /\<io\.tmpfile\>/ | |
1 0.000003 syn match luaFunc /\<io\.type\>/ | |
1 0.000004 syn match luaFunc /\<io\.write\>/ | |
1 0.000016 syn match luaFunc /\<os\.clock\>/ | |
1 0.000009 syn match luaFunc /\<os\.date\>/ | |
1 0.000005 syn match luaFunc /\<os\.difftime\>/ | |
1 0.000004 syn match luaFunc /\<os\.execute\>/ | |
1 0.000003 syn match luaFunc /\<os\.exit\>/ | |
1 0.000003 syn match luaFunc /\<os\.getenv\>/ | |
1 0.000004 syn match luaFunc /\<os\.remove\>/ | |
1 0.000003 syn match luaFunc /\<os\.rename\>/ | |
1 0.000004 syn match luaFunc /\<os\.setlocale\>/ | |
1 0.000004 syn match luaFunc /\<os\.time\>/ | |
1 0.000018 syn match luaFunc /\<os\.tmpname\>/ | |
1 0.000006 syn match luaFunc /\<debug\.debug\>/ | |
1 0.000009 syn match luaFunc /\<debug\.gethook\>/ | |
1 0.000006 syn match luaFunc /\<debug\.getinfo\>/ | |
1 0.000006 syn match luaFunc /\<debug\.getlocal\>/ | |
1 0.000007 syn match luaFunc /\<debug\.getupvalue\>/ | |
1 0.000007 syn match luaFunc /\<debug\.setlocal\>/ | |
1 0.000006 syn match luaFunc /\<debug\.setupvalue\>/ | |
1 0.000005 syn match luaFunc /\<debug\.sethook\>/ | |
1 0.000005 syn match luaFunc /\<debug\.traceback\>/ | |
1 0.000003 if lua_subversion == 1 | |
syn match luaFunc /\<debug\.getfenv\>/ | |
syn match luaFunc /\<debug\.setfenv\>/ | |
syn match luaFunc /\<debug\.getmetatable\>/ | |
syn match luaFunc /\<debug\.setmetatable\>/ | |
syn match luaFunc /\<debug\.getregistry\>/ | |
elseif lua_subversion == 2 | |
1 0.000031 syn match luaFunc /\<debug\.getmetatable\>/ | |
1 0.000016 syn match luaFunc /\<debug\.setmetatable\>/ | |
1 0.000005 syn match luaFunc /\<debug\.getregistry\>/ | |
1 0.000005 syn match luaFunc /\<debug\.getuservalue\>/ | |
1 0.000005 syn match luaFunc /\<debug\.setuservalue\>/ | |
1 0.000005 syn match luaFunc /\<debug\.upvalueid\>/ | |
1 0.000005 syn match luaFunc /\<debug\.upvaluejoin\>/ | |
1 0.000001 endif | |
1 0.000000 endif | |
" Define the default highlighting. | |
" For version 5.7 and earlier: only when not done already | |
" For version 5.8 and later: only when an item doesn't have highlighting yet | |
1 0.000003 if version >= 508 || !exists("did_lua_syntax_inits") | |
1 0.000001 if version < 508 | |
let did_lua_syntax_inits = 1 | |
command -nargs=+ HiLink hi link <args> | |
else | |
1 0.000013 command -nargs=+ HiLink hi def link <args> | |
1 0.000001 endif | |
1 0.000020 HiLink luaStatement Statement | |
1 0.000008 HiLink luaRepeat Repeat | |
1 0.000012 HiLink luaFor Repeat | |
1 0.000006 HiLink luaString String | |
1 0.000006 HiLink luaString2 String | |
1 0.000006 HiLink luaNumber Number | |
1 0.000010 HiLink luaOperator Operator | |
1 0.000007 HiLink luaIn Operator | |
1 0.000007 HiLink luaConstant Constant | |
1 0.000007 HiLink luaCond Conditional | |
1 0.000008 HiLink luaElse Conditional | |
1 0.000014 HiLink luaFunction Function | |
1 0.000012 HiLink luaComment Comment | |
1 0.000012 HiLink luaTodo Todo | |
1 0.000010 HiLink luaTable Structure | |
1 0.000010 HiLink luaError Error | |
1 0.000010 HiLink luaParenError Error | |
1 0.000010 HiLink luaBraceError Error | |
1 0.000012 HiLink luaSpecial SpecialChar | |
1 0.000013 HiLink luaFunc Identifier | |
1 0.000009 HiLink luaLabel Label | |
1 0.000002 delcommand HiLink | |
1 0.000000 endif | |
1 0.000003 let b:current_syntax = "lua" | |
1 0.000008 let &cpo = s:cpo_save | |
1 0.000002 unlet s:cpo_save | |
" vim: et ts=8 sw=2 | |
SCRIPT /usr/share/vim/vim74/syntax/perl.vim | |
Sourced 1 time | |
Total time: 0.005325 | |
Self time: 0.004681 | |
count total (s) self (s) | |
" Vim syntax file | |
" Language: Perl 5 | |
" Maintainer: vim-perl <[email protected]> | |
" Homepage: http://github.com/vim-perl/vim-perl/tree/master | |
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues | |
" Last Change: 2013-07-23 | |
" Contributors: Andy Lester <[email protected]> | |
" Hinrik Örn Sigurðsson <[email protected]> | |
" Lukas Mai <l.mai.web.de> | |
" Nick Hibma <[email protected]> | |
" Sonia Heimann <[email protected]> | |
" Rob Hoelz <[email protected]> | |
" and many others. | |
" | |
" Please download the most recent version first, before mailing | |
" any comments. | |
" | |
" The following parameters are available for tuning the | |
" perl syntax highlighting, with defaults given: | |
" | |
" let perl_include_pod = 1 | |
" unlet perl_no_scope_in_variables | |
" unlet perl_no_extended_vars | |
" unlet perl_string_as_statement | |
" unlet perl_no_sync_on_sub | |
" unlet perl_no_sync_on_global_var | |
" let perl_sync_dist = 100 | |
" unlet perl_fold | |
" unlet perl_fold_blocks | |
" unlet perl_nofold_packages | |
" let perl_nofold_subs = 1 | |
" unlet perl_fold_anonymous_subs | |
1 0.000003 if exists("b:current_syntax") | |
finish | |
endif | |
1 0.000005 let s:cpo_save = &cpo | |
1 0.000006 set cpo&vim | |
1 0.000002 if exists('®expengine') | |
1 0.000002 let s:regexpengine=®expengine | |
1 0.000004 set regexpengine=1 | |
1 0.000001 endif | |
" POD starts with ^=<word> and ends with ^=cut | |
1 0.000003 if !exists("perl_include_pod") || perl_include_pod == 1 | |
" Include a while extra syntax file | |
1 0.000211 syn include @Pod syntax/pod.vim | |
1 0.000003 unlet b:current_syntax | |
1 0.000002 if exists("perl_fold") | |
syn region perlPOD start="^=[a-z]" end="^=cut" contains=@Pod,@Spell,perlTodo keepend fold extend | |
syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend fold extend | |
else | |
1 0.000013 syn region perlPOD start="^=[a-z]" end="^=cut" contains=@Pod,@Spell,perlTodo keepend | |
1 0.000006 syn region perlPOD start="^=cut" end="^=cut" contains=perlTodo keepend | |
1 0.000001 endif | |
1 0.000000 else | |
" Use only the bare minimum of rules | |
if exists("perl_fold") | |
syn region perlPOD start="^=[a-z]" end="^=cut" fold | |
else | |
syn region perlPOD start="^=[a-z]" end="^=cut" | |
endif | |
endif | |
1 0.000002 syn cluster perlTop contains=TOP | |
1 0.000041 syn region perlBraces start="{" end="}" transparent extend | |
" All keywords | |
" | |
1 0.000013 syn match perlConditional "\<\%(if\|elsif\|unless\|given\|when\|default\)\>" | |
1 0.000012 syn match perlConditional "\<else\%(\%(\_s\*if\>\)\|\>\)" contains=perlElseIfError skipwhite skipnl skipempty | |
1 0.000012 syn match perlRepeat "\<\%(while\|for\%(each\)\=\|do\|until\|continue\)\>" | |
1 0.000015 syn match perlOperator "\<\%(defined\|undef\|eq\|ne\|[gl][et]\|cmp\|not\|and\|or\|xor\|not\|bless\|ref\|do\)\>" | |
" for some reason, adding this as the nextgroup for perlControl fixes BEGIN | |
" folding issues... | |
1 0.000007 syn match perlFakeGroup "" contained | |
1 0.000012 syn match perlControl "\<\%(BEGIN\|CHECK\|INIT\|END\|UNITCHECK\)\>\_s*" nextgroup=perlFakeGroup | |
1 0.000009 syn match perlStatementStorage "\<\%(my\|our\|local\|state\)\>" | |
1 0.000011 syn match perlStatementControl "\<\%(return\|last\|next\|redo\|goto\|break\)\>" | |
1 0.000052 syn match perlStatementScalar "\<\%(chom\=p\|chr\|crypt\|r\=index\|lc\%(first\)\=\|length\|ord\|pack\|sprintf\|substr\|uc\%(first\)\=\)\>" | |
1 0.000018 syn match perlStatementRegexp "\<\%(pos\|quotemeta\|split\|study\)\>" | |
1 0.000023 syn match perlStatementNumeric "\<\%(abs\|atan2\|cos\|exp\|hex\|int\|log\|oct\|rand\|sin\|sqrt\|srand\)\>" | |
1 0.000023 syn match perlStatementList "\<\%(splice\|unshift\|shift\|push\|pop\|join\|reverse\|grep\|map\|sort\|unpack\)\>" | |
1 0.000019 syn match perlStatementHash "\<\%(delete\|each\|exists\|keys\|values\)\>" | |
1 0.000021 syn match perlStatementIOfunc "\<\%(syscall\|dbmopen\|dbmclose\)\>" | |
1 0.000032 syn match perlStatementFiledesc "\<\%(binmode\|close\%(dir\)\=\|eof\|fileno\|getc\|lstat\|printf\=\|read\%(dir\|line\|pipe\)\|rewinddir\|say\|select\|stat\|tell\%(dir\)\=\|write\)\>" nextgroup=perlFiledescStatementNocomma skipwhite | |
1 0.000017 syn match perlStatementFiledesc "\<\%(fcntl\|flock\|ioctl\|open\%(dir\)\=\|read\|seek\%(dir\)\=\|sys\%(open\|read\|seek\|write\)\|truncate\)\>" nextgroup=perlFiledescStatementComma skipwhite | |
1 0.000019 syn match perlStatementVector "\<vec\>" | |
1 0.000016 syn match perlStatementFiles "\<\%(ch\%(dir\|mod\|own\|root\)\|glob\|link\|mkdir\|readlink\|rename\|rmdir\|symlink\|umask\|unlink\|utime\)\>" | |
1 0.000033 syn match perlStatementFiles "-[rwxoRWXOezsfdlpSbctugkTBMAC]\>" | |
1 0.000017 syn match perlStatementFlow "\<\%(caller\|die\|dump\|eval\|exit\|wantarray\)\>" | |
1 0.000011 syn match perlStatementInclude "\<\%(require\|import\)\>" | |
1 0.000034 syn match perlStatementInclude "\<\%(use\|no\)\s\+\%(\%(attributes\|attrs\|autouse\|parent\|base\|big\%(int\|num\|rat\)\|blib\|bytes\|charnames\|constant\|diagnostics\|encoding\%(::warnings\)\=\|feature\|fields\|filetest\|if\|integer\|less\|lib\|locale\|mro\|open\|ops\|overload\|re\|sigtrap\|sort\|strict\|subs\|threads\%(::shared\)\=\|utf8\|vars\|version\|vmsish\|warnings\%(::register\)\=\)\>\)\=" | |
1 0.000018 syn match perlStatementProc "\<\%(alarm\|exec\|fork\|get\%(pgrp\|ppid\|priority\)\|kill\|pipe\|set\%(pgrp\|priority\)\|sleep\|system\|times\|wait\%(pid\)\=\)\>" | |
1 0.000021 syn match perlStatementSocket "\<\%(accept\|bind\|connect\|get\%(peername\|sock\%(name\|opt\)\)\|listen\|recv\|send\|setsockopt\|shutdown\|socket\%(pair\)\=\)\>" | |
1 0.000017 syn match perlStatementIPC "\<\%(msg\%(ctl\|get\|rcv\|snd\)\|sem\%(ctl\|get\|op\)\|shm\%(ctl\|get\|read\|write\)\)\>" | |
1 0.000021 syn match perlStatementNetwork "\<\%(\%(end\|[gs]et\)\%(host\|net\|proto\|serv\)ent\|get\%(\%(host\|net\)by\%(addr\|name\)\|protoby\%(name\|number\)\|servby\%(name\|port\)\)\)\>" | |
1 0.000017 syn match perlStatementPword "\<\%(get\%(pw\%(uid\|nam\)\|gr\%(gid\|nam\)\|login\)\)\|\%(end\|[gs]et\)\%(pw\|gr\)ent\>" | |
1 0.000011 syn match perlStatementTime "\<\%(gmtime\|localtime\|time\)\>" | |
1 0.000047 syn match perlStatementMisc "\<\%(warn\|format\|formline\|reset\|scalar\|prototype\|lock\|tied\=\|untie\)\>" | |
1 0.000011 syn keyword perlTodo TODO TODO: TBD TBD: FIXME FIXME: XXX XXX: NOTE NOTE: contained | |
1 0.000030 syn region perlStatementIndirObjWrap matchgroup=perlStatementIndirObj start="\<\%(map\|grep\|sort\|printf\=\|say\|system\|exec\)\>\s*{" end="}" contains=@perlTop,perlBraces extend | |
1 0.000014 syn match perlLabel "^\s*\h\w*\s*::\@!\%(\<v\d\+\s*:\)\@<!" | |
" Perl Identifiers. | |
" | |
" Should be cleaned up to better handle identifiers in particular situations | |
" (in hash keys for example) | |
" | |
" Plain identifiers: $foo, @foo, $#foo, %foo, &foo and dereferences $$foo, @$foo, etc. | |
" We do not process complex things such as @{${"foo"}}. Too complicated, and | |
" too slow. And what is after the -> is *not* considered as part of the | |
" variable - there again, too complicated and too slow. | |
" Special variables first ($^A, ...) and ($|, $', ...) | |
1 0.000011 syn match perlVarPlain "$^[ACDEFHILMNOPRSTVWX]\=" | |
1 0.000007 syn match perlVarPlain "$[\\\"\[\]'&`+*.,;=%~!?@#$<>(-]" | |
1 0.000003 syn match perlVarPlain "%+" | |
1 0.000006 syn match perlVarPlain "$\%(0\|[1-9]\d*\)" | |
" Same as above, but avoids confusion in $::foo (equivalent to $main::foo) | |
1 0.000004 syn match perlVarPlain "$::\@!" | |
" These variables are not recognized within matches. | |
1 0.000010 syn match perlVarNotInMatches "$[|)]" | |
" This variable is not recognized within matches delimited by m//. | |
1 0.000042 syn match perlVarSlash "$/" | |
" And plain identifiers | |
1 0.000018 syn match perlPackageRef "[$@#%*&]\%(\%(::\|'\)\=\I\i*\%(\%(::\|'\)\I\i*\)*\)\=\%(::\|'\)\I"ms=s+1,me=e-1 contained | |
" To not highlight packages in variables as a scope reference - i.e. in | |
" $pack::var, pack:: is a scope, just set "perl_no_scope_in_variables" | |
" If you don't want complex things like @{${"foo"}} to be processed, | |
" just set the variable "perl_no_extended_vars"... | |
1 0.000003 if !exists("perl_no_scope_in_variables") | |
1 0.000031 syn match perlVarPlain "\%([@$]\|\$#\)\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod | |
1 0.000015 syn match perlVarPlain2 "%\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" contains=perlPackageRef | |
1 0.000017 syn match perlFunctionName "&\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" contains=perlPackageRef nextgroup=perlVarMember,perlVarSimpleMember,perlMethod | |
1 0.000001 else | |
syn match perlVarPlain "\%([@$]\|\$#\)\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod | |
syn match perlVarPlain2 "%\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" | |
syn match perlFunctionName "&\$*\%(\I\i*\)\=\%(\%(::\|'\)\I\i*\)*\%(::\|\i\@<=\)" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod | |
endif | |
1 0.000003 if !exists("perl_no_extended_vars") | |
1 0.000063 syn cluster perlExpr contains=perlStatementIndirObjWrap,perlStatementScalar,perlStatementRegexp,perlStatementNumeric,perlStatementList,perlStatementHash,perlStatementFiles,perlStatementTime,perlStatementMisc,perlVarPlain,perlVarPlain2,perlVarNotInMatches,perlVarSlash,perlVarBlock,perlVarBlock2,perlShellCommand,perlFloat,perlNumber,perlStringUnexpanded,perlString,perlQQ,perlArrow,perlBraces | |
1 0.000010 syn region perlArrow matchgroup=perlArrow start="->\s*(" end=")" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained | |
1 0.000010 syn region perlArrow matchgroup=perlArrow start="->\s*\[" end="\]" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained | |
1 0.000038 syn region perlArrow matchgroup=perlArrow start="->\s*{" end="}" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained | |
1 0.000019 syn match perlArrow "->\s*{\s*\I\i*\s*}" contains=perlVarSimpleMemberName nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained | |
1 0.000010 syn region perlArrow matchgroup=perlArrow start="->\s*\$*\I\i*\s*(" end=")" contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contained | |
1 0.000018 syn region perlVarBlock matchgroup=perlVarPlain start="\%($#\|[$@]\)\$*{" skip="\\}" end=+}\|\%(\%(<<\%('\|"\)\?\)\@=\)+ contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend | |
1 0.000042 syn region perlVarBlock2 matchgroup=perlVarPlain start="[%&*]\$*{" skip="\\}" end=+}\|\%(\%(<<\%('\|"\)\?\)\@=\)+ contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend | |
1 0.000010 syn match perlVarPlain2 "[%&*]\$*{\I\i*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend | |
1 0.000009 syn match perlVarPlain "\%(\$#\|[@$]\)\$*{\I\i*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend | |
1 0.000010 syn region perlVarMember matchgroup=perlVarPlain start="\%(->\)\={" skip="\\}" end="}" contained contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend | |
1 0.000008 syn match perlVarSimpleMember "\%(->\)\={\s*\I\i*\s*}" nextgroup=perlVarMember,perlVarSimpleMember,perlMethod contains=perlVarSimpleMemberName contained extend | |
1 0.000003 syn match perlVarSimpleMemberName "\I\i*" contained | |
1 0.000035 syn region perlVarMember matchgroup=perlVarPlain start="\%(->\)\=\[" skip="\\]" end="]" contained contains=@perlExpr nextgroup=perlVarMember,perlVarSimpleMember,perlMethod extend | |
1 0.000018 syn match perlPackageConst "__PACKAGE__" nextgroup=perlMethod | |
1 0.000006 syn match perlMethod "->\$*\I\i*" contained nextgroup=perlVarSimpleMember,perlVarMember,perlMethod | |
1 0.000001 endif | |
" File Descriptors | |
1 0.000010 syn match perlFiledescRead "<\h\w*>" | |
1 0.000012 syn match perlFiledescStatementComma "(\=\s*\u\w*\s*,"me=e-1 transparent contained contains=perlFiledescStatement | |
1 0.000006 syn match perlFiledescStatementNocomma "(\=\s*\u\w*\s*[^, \t]"me=e-1 transparent contained contains=perlFiledescStatement | |
1 0.000002 syn match perlFiledescStatement "\u\w*" contained | |
" Special characters in strings and matches | |
1 0.000014 syn match perlSpecialString "\\\%(\o\{1,3}\|x\%({\x\+}\|\x\{1,2}\)\|c.\|[^cx]\)" contained extend | |
1 0.000075 syn match perlSpecialStringU2 "\\." extend contained contains=NONE | |
1 0.000011 syn match perlSpecialStringU "\\\\" contained | |
1 0.000019 syn match perlSpecialMatch "\\[1-9]" contained extend | |
1 0.000006 syn match perlSpecialMatch "\\g\%(\d\+\|{\%(-\=\d\+\|\h\w*\)}\)" contained | |
1 0.000005 syn match perlSpecialMatch "\\k\%(<\h\w*>\|'\h\w*'\)" contained | |
1 0.000004 syn match perlSpecialMatch "{\d\+\%(,\%(\d\+\)\=\)\=}" contained | |
1 0.000005 syn match perlSpecialMatch "\[[]-]\=[^\[\]]*[]-]\=\]" contained extend | |
1 0.000003 syn match perlSpecialMatch "[+*()?.]" contained | |
1 0.000002 syn match perlSpecialMatch "(?[#:=!]" contained | |
1 0.000005 syn match perlSpecialMatch "(?[impsx]*\%(-[imsx]\+\)\=)" contained | |
1 0.000022 syn match perlSpecialMatch "(?\%([-+]\=\d\+\|R\))" contained | |
1 0.000005 syn match perlSpecialMatch "(?\%(&\|P[>=]\)\h\w*)" contained | |
1 0.000010 syn match perlSpecialMatch "(\*\%(\%(PRUNE\|SKIP\|THEN\)\%(:[^)]*\)\=\|\%(MARK\|\):[^)]*\|COMMIT\|F\%(AIL\)\=\|ACCEPT\))" contained | |
" Possible errors | |
" | |
" Highlight lines with only whitespace (only in blank delimited here documents) as errors | |
1 0.000013 syn match perlNotEmptyLine "^\s\+$" contained | |
" Highlight "} else if (...) {", it should be "} else { if (...) { " or "} elsif (...) {" | |
1 0.000008 syn match perlElseIfError "else\_s*if" containedin=perlConditional | |
1 0.000005 syn keyword perlElseIfError elseif containedin=perlConditional | |
" Variable interpolation | |
" | |
" These items are interpolated inside "" strings and similar constructs. | |
1 0.000006 syn cluster perlInterpDQ contains=perlSpecialString,perlVarPlain,perlVarNotInMatches,perlVarSlash,perlVarBlock | |
" These items are interpolated inside '' strings and similar constructs. | |
1 0.000004 syn cluster perlInterpSQ contains=perlSpecialStringU,perlSpecialStringU2 | |
" These items are interpolated inside m// matches and s/// substitutions. | |
1 0.000004 syn cluster perlInterpSlash contains=perlSpecialString,perlSpecialMatch,perlVarPlain,perlVarBlock | |
" These items are interpolated inside m## matches and s### substitutions. | |
1 0.000004 syn cluster perlInterpMatch contains=@perlInterpSlash,perlVarSlash | |
" Shell commands | |
1 0.000014 syn region perlShellCommand matchgroup=perlMatchStartEnd start="`" end="`" contains=@perlInterpDQ keepend | |
" Constants | |
" | |
" Numbers | |
1 0.000013 syn match perlNumber "\<\%(0\%(x\x[[:xdigit:]_]*\|b[01][01_]*\|\o[0-7_]*\|\)\|[1-9][[:digit:]_]*\)\>" | |
1 0.000006 syn match perlFloat "\<\d[[:digit:]_]*[eE][\-+]\=\d\+" | |
1 0.000007 syn match perlFloat "\<\d[[:digit:]_]*\.[[:digit:]_]*\%([eE][\-+]\=\d\+\)\=" | |
1 0.000028 syn match perlFloat "\.[[:digit:]][[:digit:]_]*\%([eE][\-+]\=\d\+\)\=" | |
1 0.000016 syn match perlString "\<\%(v\d\+\%(\.\d\+\)*\|\d\+\%(\.\d\+\)\{2,}\)\>" contains=perlVStringV | |
1 0.000002 syn match perlVStringV "\<v" contained | |
1 0.000013 syn region perlParensSQ start=+(+ end=+)+ extend contained contains=perlParensSQ,@perlInterpSQ keepend | |
1 0.000012 syn region perlBracketsSQ start=+\[+ end=+\]+ extend contained contains=perlBracketsSQ,@perlInterpSQ keepend | |
1 0.000012 syn region perlBracesSQ start=+{+ end=+}+ extend contained contains=perlBracesSQ,@perlInterpSQ keepend | |
1 0.000081 syn region perlAnglesSQ start=+<+ end=+>+ extend contained contains=perlAnglesSQ,@perlInterpSQ keepend | |
1 0.000015 syn region perlParensDQ start=+(+ end=+)+ extend contained contains=perlParensDQ,@perlInterpDQ keepend | |
1 0.000013 syn region perlBracketsDQ start=+\[+ end=+\]+ extend contained contains=perlBracketsDQ,@perlInterpDQ keepend | |
1 0.000010 syn region perlBracesDQ start=+{+ end=+}+ extend contained contains=perlBracesDQ,@perlInterpDQ keepend | |
1 0.000011 syn region perlAnglesDQ start=+<+ end=+>+ extend contained contains=perlAnglesDQ,@perlInterpDQ keepend | |
" Simple version of searches and matches | |
1 0.000053 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\>\s*\z([^[:space:]'([{<#]\)+ end=+\z1[msixpodualgc]*+ contains=@perlInterpMatch keepend extend | |
1 0.000018 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m#+ end=+#[msixpodualgc]*+ contains=@perlInterpMatch keepend extend | |
1 0.000009 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*'+ end=+'[msixpodualgc]*+ contains=@perlInterpSQ keepend extend | |
1 0.000008 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*/+ end=+/[msixpodualgc]*+ contains=@perlInterpSlash keepend extend | |
1 0.000008 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*(+ end=+)[msixpodualgc]*+ contains=@perlInterpMatch,perlParensDQ keepend extend | |
" A special case for m{}, m<> and m[] which allows for comments and extra whitespace in the pattern | |
1 0.000038 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*{+ end=+}[msixpodualgc]*+ contains=@perlInterpMatch,perlComment,perlBracesDQ extend | |
1 0.000009 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*<+ end=+>[msixpodualgc]*+ contains=@perlInterpMatch,perlAnglesDQ keepend extend | |
1 0.000017 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!m\s*\[+ end=+\][msixpodualgc]*+ contains=@perlInterpMatch,perlComment,perlBracketsDQ keepend extend | |
" Below some hacks to recognise the // variant. This is virtually impossible to catch in all | |
" cases as the / is used in so many other ways, but these should be the most obvious ones. | |
1 0.000053 syn region perlMatch matchgroup=perlMatchStartEnd start="\%([$@%&*]\@<!\%(\<split\|\<while\|\<if\|\<unless\|\.\.\|[-+*!~(\[{=]\)\s*\)\@<=/\%(/=\)\@!" start=+^/\%(/=\)\@!+ start=+\s\@<=/\%(/=\)\@![^[:space:][:digit:]$@%=]\@=\%(/\_s*\%([([{$@%&*[:digit:]"'`]\|\_s\w\|[[:upper:]_abd-fhjklnqrt-wyz]\)\)\@!+ skip=+\\/+ end=+/[msixpodualgc]*+ contains=@perlInterpSlash extend | |
" Substitutions | |
" perlMatch is the first part, perlSubstitution* is the substitution part | |
1 0.000021 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\>\s*\z([^[:space:]'([{<#]\)+ end=+\z1+me=e-1 contains=@perlInterpMatch nextgroup=perlSubstitutionGQQ keepend extend | |
1 0.000015 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*'+ end=+'+me=e-1 contains=@perlInterpSQ nextgroup=perlSubstitutionSQ keepend extend | |
1 0.000036 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*/+ end=+/+me=e-1 contains=@perlInterpSlash nextgroup=perlSubstitutionGQQ keepend extend | |
1 0.000009 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s#+ end=+#+me=e-1 contains=@perlInterpMatch nextgroup=perlSubstitutionGQQ keepend extend | |
1 0.000010 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*(+ end=+)+ contains=@perlInterpMatch,perlParensDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend extend | |
1 0.000009 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*<+ end=+>+ contains=@perlInterpMatch,perlAnglesDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend extend | |
1 0.000011 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*\[+ end=+\]+ contains=@perlInterpMatch,perlBracketsDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend extend | |
1 0.000042 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!s\s*{+ end=+}+ contains=@perlInterpMatch,perlBracesDQ nextgroup=perlSubstitutionGQQ skipwhite skipempty skipnl keepend extend | |
1 0.000013 syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+\z([^[:space:]'([{<]\)+ end=+\z1[msixpodualgcer]*+ keepend contained contains=@perlInterpDQ extend | |
1 0.000007 syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+(+ end=+)[msixpodualgcer]*+ contained contains=@perlInterpDQ,perlParensDQ keepend extend | |
1 0.000016 syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+\[+ end=+\][msixpodualgcer]*+ contained contains=@perlInterpDQ,perlBracketsDQ keepend extend | |
1 0.000006 syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+{+ end=+}[msixpodualgcer]*+ contained contains=@perlInterpDQ,perlBracesDQ keepend extend extend | |
1 0.000028 syn region perlSubstitutionGQQ matchgroup=perlMatchStartEnd start=+<+ end=+>[msixpodualgcer]*+ contained contains=@perlInterpDQ,perlAnglesDQ keepend extend | |
1 0.000007 syn region perlSubstitutionSQ matchgroup=perlMatchStartEnd start=+'+ end=+'[msixpodualgcer]*+ contained contains=@perlInterpSQ keepend extend | |
" Translations | |
" perlMatch is the first part, perlTranslation* is the second, translator part. | |
1 0.000025 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!\%(tr\|y\)\>\s*\z([^[:space:]([{<#]\)+ end=+\z1+me=e-1 contains=@perlInterpSQ nextgroup=perlTranslationGQ | |
1 0.000010 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!\%(tr\|y\)#+ end=+#+me=e-1 contains=@perlInterpSQ nextgroup=perlTranslationGQ | |
1 0.000010 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!\%(tr\|y\)\s*\[+ end=+\]+ contains=@perlInterpSQ,perlBracketsSQ nextgroup=perlTranslationGQ skipwhite skipempty skipnl | |
1 0.000033 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!\%(tr\|y\)\s*(+ end=+)+ contains=@perlInterpSQ,perlParensSQ nextgroup=perlTranslationGQ skipwhite skipempty skipnl | |
1 0.000012 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!\%(tr\|y\)\s*<+ end=+>+ contains=@perlInterpSQ,perlAnglesSQ nextgroup=perlTranslationGQ skipwhite skipempty skipnl | |
1 0.000009 syn region perlMatch matchgroup=perlMatchStartEnd start=+\<\%(::\|'\|->\)\@<!\%(tr\|y\)\s*{+ end=+}+ contains=@perlInterpSQ,perlBracesSQ nextgroup=perlTranslationGQ skipwhite skipempty skipnl | |
1 0.000010 syn region perlTranslationGQ matchgroup=perlMatchStartEnd start=+\z([^[:space:]([{<]\)+ end=+\z1[cdsr]*+ contained | |
1 0.000005 syn region perlTranslationGQ matchgroup=perlMatchStartEnd start=+(+ end=+)[cdsr]*+ contains=perlParensSQ contained | |
1 0.000026 syn region perlTranslationGQ matchgroup=perlMatchStartEnd start=+\[+ end=+\][cdsr]*+ contains=perlBracketsSQ contained | |
1 0.000006 syn region perlTranslationGQ matchgroup=perlMatchStartEnd start=+{+ end=+}[cdsr]*+ contains=perlBracesSQ contained | |
1 0.000009 syn region perlTranslationGQ matchgroup=perlMatchStartEnd start=+<+ end=+>[cdsr]*+ contains=perlAnglesSQ contained | |
" Strings and q, qq, qw and qr expressions | |
1 0.000019 syn region perlStringUnexpanded matchgroup=perlStringStartEnd start="'" end="'" contains=@perlInterpSQ keepend extend | |
1 0.000009 syn region perlString matchgroup=perlStringStartEnd start=+"+ end=+"+ contains=@perlInterpDQ keepend extend | |
1 0.000037 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q\>\s*\z([^[:space:]#([{<]\)+ end=+\z1+ contains=@perlInterpSQ keepend extend | |
1 0.000010 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q#+ end=+#+ contains=@perlInterpSQ keepend extend | |
1 0.000010 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q\s*(+ end=+)+ contains=@perlInterpSQ,perlParensSQ keepend extend | |
1 0.000012 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q\s*\[+ end=+\]+ contains=@perlInterpSQ,perlBracketsSQ keepend extend | |
1 0.000010 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q\s*{+ end=+}+ contains=@perlInterpSQ,perlBracesSQ keepend extend | |
1 0.000036 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q\s*<+ end=+>+ contains=@perlInterpSQ,perlAnglesSQ keepend extend | |
1 0.000012 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]\>\s*\z([^[:space:]#([{<]\)+ end=+\z1+ contains=@perlInterpDQ keepend extend | |
1 0.000010 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]#+ end=+#+ contains=@perlInterpDQ keepend extend | |
1 0.000011 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]\s*(+ end=+)+ contains=@perlInterpDQ,perlParensDQ keepend extend | |
1 0.000011 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]\s*\[+ end=+\]+ contains=@perlInterpDQ,perlBracketsDQ keepend extend | |
1 0.000035 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]\s*{+ end=+}+ contains=@perlInterpDQ,perlBracesDQ keepend extend | |
1 0.000012 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!q[qx]\s*<+ end=+>+ contains=@perlInterpDQ,perlAnglesDQ keepend extend | |
1 0.000012 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*\z([^[:space:]#([{<]\)+ end=+\z1+ contains=@perlInterpSQ keepend extend | |
1 0.000009 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw#+ end=+#+ contains=@perlInterpSQ keepend extend | |
1 0.000010 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*(+ end=+)+ contains=@perlInterpSQ,perlParensSQ keepend extend | |
1 0.000035 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*\[+ end=+\]+ contains=@perlInterpSQ,perlBracketsSQ keepend extend | |
1 0.000012 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*{+ end=+}+ contains=@perlInterpSQ,perlBracesSQ keepend extend | |
1 0.000011 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qw\s*<+ end=+>+ contains=@perlInterpSQ,perlAnglesSQ keepend extend | |
1 0.000013 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\>\s*\z([^[:space:]#([{<'/]\)+ end=+\z1[imosx]*+ contains=@perlInterpMatch keepend extend | |
1 0.000011 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*/+ end=+/[imosx]*+ contains=@perlInterpSlash keepend extend | |
1 0.000034 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr#+ end=+#[imosx]*+ contains=@perlInterpMatch keepend extend | |
1 0.000013 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*'+ end=+'[imosx]*+ contains=@perlInterpSQ keepend extend | |
1 0.000011 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*(+ end=+)[imosx]*+ contains=@perlInterpMatch,perlParensDQ keepend extend | |
" A special case for qr{}, qr<> and qr[] which allows for comments and extra whitespace in the pattern | |
1 0.000011 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*{+ end=+}[imosx]*+ contains=@perlInterpMatch,perlBracesDQ,perlComment keepend extend | |
1 0.000013 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*<+ end=+>[imosx]*+ contains=@perlInterpMatch,perlAnglesDQ,perlComment keepend extend | |
1 0.000039 syn region perlQQ matchgroup=perlStringStartEnd start=+\<\%(::\|'\|->\)\@<!qr\s*\[+ end=+\][imosx]*+ contains=@perlInterpMatch,perlBracketsDQ,perlComment keepend extend | |
" Constructs such as print <<EOF [...] EOF, 'here' documents | |
" | |
" XXX Any statements after the identifier are in perlString colour (i.e. | |
" 'if $a' in 'print <<EOF if $a'). This is almost impossible to get right it | |
" seems due to the 'auto-extending nature' of regions. | |
1 0.000004 if exists("perl_fold") | |
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\).*+ end=+^\z1$+ contains=@perlInterpDQ fold extend | |
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ end=+^\z1$+ contains=@perlInterpDQ fold extend | |
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ end=+^\z1$+ contains=@perlInterpSQ fold extend | |
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine fold extend | |
syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,perlNotEmptyLine fold extend | |
syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\s*\(['"]\=\)\z(END_\%(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL fold extend | |
else | |
1 0.000020 syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\z(\I\i*\).*+ end=+^\z1$+ contains=@perlInterpDQ | |
1 0.000024 syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*"\z([^\\"]*\%(\\.[^\\"]*\)*\)"+ end=+^\z1$+ contains=@perlInterpDQ | |
1 0.000020 syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*'\z([^\\']*\%(\\.[^\\']*\)*\)'+ end=+^\z1$+ contains=@perlInterpSQ | |
1 0.000010 syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*""+ end=+^$+ contains=@perlInterpDQ,perlNotEmptyLine | |
1 0.000046 syn region perlHereDoc matchgroup=perlStringStartEnd start=+<<\s*''+ end=+^$+ contains=@perlInterpSQ,perlNotEmptyLine | |
1 0.000033 syn region perlAutoload matchgroup=perlStringStartEnd start=+<<\s*\(['"]\=\)\z(END_\%(SUB\|OF_FUNC\|OF_AUTOLOAD\)\)\1+ end=+^\z1$+ contains=ALL | |
1 0.000001 endif | |
" Class declarations | |
" | |
1 0.000021 syn match perlPackageDecl "\<package\s\+\%(\h\|::\)\%(\w\|::\)*" contains=perlStatementPackage | |
1 0.000004 syn keyword perlStatementPackage package contained | |
" Functions | |
" sub [name] [(prototype)] { | |
" | |
1 0.000010 syn match perlSubError "[^[:space:];{#]" contained | |
1 0.000005 if v:version == 701 && !has('patch221') " XXX I hope that's the right one | |
syn match perlSubAttributes ":" contained | |
else | |
1 0.000013 syn match perlSubAttributesCont "\h\w*\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained | |
1 0.000011 syn region perlSubAttributesCont matchgroup=perlSubAttributesCont start="\h\w*(" end=")\_s*\%(:\_s*\)\=" nextgroup=@perlSubAttrMaybe contained contains=@perlInterpSQ,perlParensSQ | |
1 0.000005 syn cluster perlSubAttrMaybe contains=perlSubAttributesCont,perlSubError,perlFakeGroup | |
1 0.000008 syn match perlSubAttributes "" contained nextgroup=perlSubError | |
1 0.000037 syn match perlSubAttributes ":\_s*" contained nextgroup=@perlSubAttrMaybe | |
1 0.000001 endif | |
1 0.000023 syn match perlSubPrototypeError "(\%(\_s*\%(\%(\\\%([$@%&*]\|\[[$@%&*]\+\]\)\|[$&*]\|[@%]\%(\_s*)\)\@=\|;\%(\_s*[)$@%&*\\]\)\@=\|_\%(\_s*[);]\)\@=\)\_s*\)*\)\@>\zs\_[^)]\+" contained | |
1 0.000013 syn match perlSubPrototype +(\_[^)]*)\_s*\|+ nextgroup=perlSubAttributes,perlComment contained contains=perlSubPrototypeError | |
1 0.000014 syn match perlSubName +\%(\h\|::\|'\w\)\%(\w\|::\|'\w\)*\_s*\|+ contained nextgroup=perlSubPrototype,perlComment | |
1 0.000015 syn match perlFunction +\<sub\>\_s*+ nextgroup=perlSubName | |
1 0.000003 if !exists("perl_no_scope_in_variables") | |
1 0.000010 syn match perlFunctionPRef "\h\w*::" contained | |
1 0.000004 syn match perlFunctionName "\h\w*[^:]" contained | |
1 0.000002 else | |
syn match perlFunctionName "\h[[:alnum:]_:]*" contained | |
endif | |
" The => operator forces a bareword to the left of it to be interpreted as | |
" a string | |
1 0.000007 syn match perlString "\I\@<!-\?\I\i*\%(\s*=>\)\@=" | |
" All other # are comments, except ^#! | |
1 0.000008 syn match perlComment "#.*" contains=perlTodo,@Spell extend | |
1 0.000011 syn match perlSharpBang "^#!.*" | |
" Formats | |
1 0.000057 syn region perlFormat matchgroup=perlStatementIOFunc start="^\s*\<format\s\+\k\+\s*=\s*$"rs=s+6 end="^\s*\.\s*$" contains=perlFormatName,perlFormatField,perlVarPlain,perlVarPlain2 | |
1 0.000005 syn match perlFormatName "format\s\+\k\+\s*="lc=7,me=e-1 contained | |
1 0.000004 syn match perlFormatField "[@^][|<>~]\+\%(\.\.\.\)\=" contained | |
1 0.000003 syn match perlFormatField "[@^]#[#.]*" contained | |
1 0.000002 syn match perlFormatField "@\*" contained | |
1 0.000004 syn match perlFormatField "@[^A-Za-z_|<>~#*]"me=e-1 contained | |
1 0.000003 syn match perlFormatField "@$" contained | |
" __END__ and __DATA__ clauses | |
1 0.000002 if exists("perl_fold") | |
syntax region perlDATA start="^__DATA__$" skip="." end="." fold | |
syntax region perlDATA start="^__END__$" skip="." end="." contains=perlPOD,@perlDATA fold | |
else | |
1 0.000045 syntax region perlDATA start="^__DATA__$" skip="." end="." | |
1 0.000050 syntax region perlDATA start="^__END__$" skip="." end="." contains=perlPOD,@perlDATA | |
1 0.000001 endif | |
" | |
" Folding | |
1 0.000001 if exists("perl_fold") | |
" Note: this bit must come before the actual highlighting of the "package" | |
" keyword, otherwise this will screw up Pod lines that match /^package/ | |
if !exists("perl_nofold_packages") | |
syn region perlPackageFold start="^package \S\+;\s*\%(#.*\)\=$" end="^1;\=\s*\%(#.*\)\=$" end="\n\+package"me=s-1 transparent fold keepend | |
endif | |
if !exists("perl_nofold_subs") | |
if exists("perl_fold_anonymous_subs") && perl_fold_anonymous_subs | |
syn region perlSubFold start="\<sub\>[^\n;]*{" end="}" transparent fold keepend extend | |
syn region perlSubFold start="\<\%(BEGIN\|END\|CHECK\|INIT\)\>\s*{" end="}" transparent fold keepend | |
else | |
syn region perlSubFold start="^\z(\s*\)\<sub\>.*[^};]$" end="^\z1}\s*\%(#.*\)\=$" transparent fold keepend | |
syn region perlSubFold start="^\z(\s*\)\<\%(BEGIN\|END\|CHECK\|INIT\|UNITCHECK\)\>.*[^};]$" end="^\z1}\s*$" transparent fold keepend | |
endif | |
endif | |
if exists("perl_fold_blocks") | |
syn region perlBlockFold start="^\z(\s*\)\%(if\|elsif\|unless\|for\|while\|until\|given\)\s*(.*)\%(\s*{\)\=\s*\%(#.*\)\=$" start="^\z(\s*\)foreach\s*\%(\%(my\|our\)\=\s*\S\+\s*\)\=(.*)\%(\s*{\)\=\s*\%(#.*\)\=$" end="^\z1}\s*;\=\%(#.*\)\=$" transparent fold keepend | |
syn region perlBlockFold start="^\z(\s*\)\%(do\|else\)\%(\s*{\)\=\s*\%(#.*\)\=$" end="^\z1}\s*while" end="^\z1}\s*;\=\%(#.*\)\=$" transparent fold keepend | |
endif | |
setlocal foldmethod=syntax | |
syn sync fromstart | |
else | |
" fromstart above seems to set minlines even if perl_fold is not set. | |
1 0.000002 syn sync minlines=0 | |
1 0.000000 endif | |
1 0.000012 command -nargs=+ HiLink hi def link <args> | |
" NOTE: If you're linking new highlight groups to perlString, please also put | |
" them into b:match_skip in ftplugin/perl.vim. | |
" The default highlighting. | |
1 0.000016 HiLink perlSharpBang PreProc | |
1 0.000010 HiLink perlControl PreProc | |
1 0.000013 HiLink perlInclude Include | |
1 0.000014 HiLink perlSpecial Special | |
1 0.000008 HiLink perlString String | |
1 0.000014 HiLink perlCharacter Character | |
1 0.000007 HiLink perlNumber Number | |
1 0.000008 HiLink perlFloat Float | |
1 0.000014 HiLink perlType Type | |
1 0.000013 HiLink perlIdentifier Identifier | |
1 0.000007 HiLink perlLabel Label | |
1 0.000014 HiLink perlStatement Statement | |
1 0.000008 HiLink perlConditional Conditional | |
1 0.000008 HiLink perlRepeat Repeat | |
1 0.000008 HiLink perlOperator Operator | |
1 0.000007 HiLink perlFunction Keyword | |
1 0.000008 HiLink perlSubName Function | |
1 0.000007 HiLink perlSubPrototype Type | |
1 0.000008 HiLink perlSubAttributes PreProc | |
1 0.000003 HiLink perlSubAttributesCont perlSubAttributes | |
1 0.000007 HiLink perlComment Comment | |
1 0.000008 HiLink perlTodo Todo | |
1 0.000003 if exists("perl_string_as_statement") | |
HiLink perlStringStartEnd perlStatement | |
else | |
1 0.000003 HiLink perlStringStartEnd perlString | |
1 0.000001 endif | |
1 0.000002 HiLink perlVStringV perlStringStartEnd | |
1 0.000009 HiLink perlList perlStatement | |
1 0.000010 HiLink perlMisc perlStatement | |
1 0.000003 HiLink perlVarPlain perlIdentifier | |
1 0.000002 HiLink perlVarPlain2 perlIdentifier | |
1 0.000003 HiLink perlArrow perlIdentifier | |
1 0.000002 HiLink perlFiledescRead perlIdentifier | |
1 0.000002 HiLink perlFiledescStatement perlIdentifier | |
1 0.000003 HiLink perlVarSimpleMember perlIdentifier | |
1 0.000003 HiLink perlVarSimpleMemberName perlString | |
1 0.000002 HiLink perlVarNotInMatches perlIdentifier | |
1 0.000003 HiLink perlVarSlash perlIdentifier | |
1 0.000002 HiLink perlQQ perlString | |
1 0.000003 HiLink perlHereDoc perlString | |
1 0.000002 HiLink perlStringUnexpanded perlString | |
1 0.000002 HiLink perlSubstitutionSQ perlString | |
1 0.000003 HiLink perlSubstitutionGQQ perlString | |
1 0.000002 HiLink perlTranslationGQ perlString | |
1 0.000002 HiLink perlMatch perlString | |
1 0.000002 HiLink perlMatchStartEnd perlStatement | |
1 0.000002 HiLink perlFormatName perlIdentifier | |
1 0.000003 HiLink perlFormatField perlString | |
1 0.000002 HiLink perlPackageDecl perlType | |
1 0.000008 HiLink perlStorageClass perlType | |
1 0.000003 HiLink perlPackageRef perlType | |
1 0.000003 HiLink perlStatementPackage perlStatement | |
1 0.000002 HiLink perlStatementStorage perlStatement | |
1 0.000003 HiLink perlStatementControl perlStatement | |
1 0.000003 HiLink perlStatementScalar perlStatement | |
1 0.000002 HiLink perlStatementRegexp perlStatement | |
1 0.000003 HiLink perlStatementNumeric perlStatement | |
1 0.000003 HiLink perlStatementList perlStatement | |
1 0.000002 HiLink perlStatementHash perlStatement | |
1 0.000003 HiLink perlStatementIOfunc perlStatement | |
1 0.000002 HiLink perlStatementFiledesc perlStatement | |
1 0.000003 HiLink perlStatementVector perlStatement | |
1 0.000002 HiLink perlStatementFiles perlStatement | |
1 0.000002 HiLink perlStatementFlow perlStatement | |
1 0.000003 HiLink perlStatementInclude perlStatement | |
1 0.000002 HiLink perlStatementProc perlStatement | |
1 0.000002 HiLink perlStatementSocket perlStatement | |
1 0.000003 HiLink perlStatementIPC perlStatement | |
1 0.000002 HiLink perlStatementNetwork perlStatement | |
1 0.000002 HiLink perlStatementPword perlStatement | |
1 0.000002 HiLink perlStatementTime perlStatement | |
1 0.000002 HiLink perlStatementMisc perlStatement | |
1 0.000002 HiLink perlStatementIndirObj perlStatement | |
1 0.000002 HiLink perlFunctionName perlIdentifier | |
1 0.000003 HiLink perlMethod perlIdentifier | |
1 0.000002 HiLink perlFunctionPRef perlType | |
1 0.000003 HiLink perlPOD perlComment | |
1 0.000002 HiLink perlShellCommand perlString | |
1 0.000011 HiLink perlSpecialAscii perlSpecial | |
1 0.000009 HiLink perlSpecialDollar perlSpecial | |
1 0.000003 HiLink perlSpecialString perlSpecial | |
1 0.000002 HiLink perlSpecialStringU perlSpecial | |
1 0.000002 HiLink perlSpecialMatch perlSpecial | |
1 0.000003 HiLink perlDATA perlComment | |
" NOTE: Due to a bug in Vim (or more likely, a misunderstanding on my part), | |
" I had to remove the transparent property from the following regions | |
" in order to get them to highlight correctly. Feel free to remove | |
" these and reinstate the transparent property if you know how. | |
1 0.000002 HiLink perlParensSQ perlString | |
1 0.000003 HiLink perlBracketsSQ perlString | |
1 0.000002 HiLink perlBracesSQ perlString | |
1 0.000002 HiLink perlAnglesSQ perlString | |
1 0.000002 HiLink perlParensDQ perlString | |
1 0.000002 HiLink perlBracketsDQ perlString | |
1 0.000002 HiLink perlBracesDQ perlString | |
1 0.000002 HiLink perlAnglesDQ perlString | |
1 0.000002 HiLink perlSpecialStringU2 perlString | |
" Possible errors | |
1 0.000009 HiLink perlNotEmptyLine Error | |
1 0.000008 HiLink perlElseIfError Error | |
1 0.000008 HiLink perlSubPrototypeError Error | |
1 0.000007 HiLink perlSubError Error | |
1 0.000001 delcommand HiLink | |
" Syncing to speed up processing | |
" | |
1 0.000002 if !exists("perl_no_sync_on_sub") | |
1 0.000013 syn sync match perlSync grouphere NONE "^\s*\<package\s" | |
1 0.000011 syn sync match perlSync grouphere NONE "^\s*\<sub\>" | |
1 0.000004 syn sync match perlSync grouphere NONE "^}" | |
1 0.000001 endif | |
1 0.000003 if !exists("perl_no_sync_on_global_var") | |
1 0.000007 syn sync match perlSync grouphere NONE "^$\I[[:alnum:]_:]+\s*=\s*{" | |
1 0.000028 syn sync match perlSync grouphere NONE "^[@%]\I[[:alnum:]_:]+\s*=\s*(" | |
1 0.000001 endif | |
1 0.000002 if exists("perl_sync_dist") | |
execute "syn sync maxlines=" . perl_sync_dist | |
else | |
1 0.000001 syn sync maxlines=100 | |
1 0.000001 endif | |
1 0.000015 syn sync match perlSyncPOD grouphere perlPOD "^=pod" | |
1 0.000013 syn sync match perlSyncPOD grouphere perlPOD "^=head" | |
1 0.000006 syn sync match perlSyncPOD grouphere perlPOD "^=item" | |
1 0.000004 syn sync match perlSyncPOD grouphere NONE "^=cut" | |
1 0.000003 let b:current_syntax = "perl" | |
1 0.000003 if exists('®expengine') | |
1 0.000006 let ®expengine=s:regexpengine | |
1 0.000002 unlet s:regexpengine | |
1 0.000000 endif | |
1 0.000010 let &cpo = s:cpo_save | |
1 0.000001 unlet s:cpo_save | |
" XXX Change to sts=4:sw=4 | |
" vim:ts=8:sts=2:sw=2:expandtab:ft=vim | |
SCRIPT /usr/share/vim/vim74/syntax/pod.vim | |
Sourced 1 time | |
Total time: 0.000632 | |
Self time: 0.000632 | |
count total (s) self (s) | |
" Vim syntax file | |
" Language: Perl POD format | |
" Maintainer: vim-perl <[email protected]> | |
" Previously: Scott Bigham <[email protected]> | |
" Homepage: http://github.com/vim-perl/vim-perl | |
" Bugs/requests: http://github.com/vim-perl/vim-perl/issues | |
" Last Change: 2013-07-21 | |
" To add embedded POD documentation highlighting to your syntax file, add | |
" the commands: | |
" | |
" syn include @Pod <sfile>:p:h/pod.vim | |
" syn region myPOD start="^=pod" start="^=head" end="^=cut" keepend contained contains=@Pod | |
" | |
" and add myPod to the contains= list of some existing region, probably a | |
" comment. The "keepend" flag is needed because "=cut" is matched as a | |
" pattern in its own right. | |
" Remove any old syntax stuff hanging around (this is suppressed | |
" automatically by ":syn include" if necessary). | |
" For version 5.x: Clear all syntax items | |
" For version 6.x: Quit when a syntax file was already loaded | |
1 0.000002 if version < 600 | |
syntax clear | |
elseif exists("b:current_syntax") | |
finish | |
endif | |
1 0.000005 let s:cpo_save = &cpo | |
1 0.000004 set cpo&vim | |
" POD commands | |
1 0.000028 syn match podCommand "^=encoding" nextgroup=podCmdText contains=@NoSpell | |
1 0.000008 syn match podCommand "^=head[1234]" nextgroup=podCmdText contains=@NoSpell | |
1 0.000004 syn match podCommand "^=item" nextgroup=podCmdText contains=@NoSpell | |
1 0.000011 syn match podCommand "^=over" nextgroup=podOverIndent skipwhite contains=@NoSpell | |
1 0.000004 syn match podCommand "^=back" contains=@NoSpell | |
1 0.000004 syn match podCommand "^=cut" contains=@NoSpell | |
1 0.000004 syn match podCommand "^=pod" contains=@NoSpell | |
1 0.000010 syn match podCommand "^=for" nextgroup=podForKeywd skipwhite contains=@NoSpell | |
1 0.000029 syn match podCommand "^=begin" nextgroup=podForKeywd skipwhite contains=@NoSpell | |
1 0.000014 syn match podCommand "^=end" nextgroup=podForKeywd skipwhite contains=@NoSpell | |
" Text of a =head1, =head2 or =item command | |
1 0.000015 syn match podCmdText ".*$" contained contains=podFormat,@NoSpell | |
" Indent amount of =over command | |
1 0.000004 syn match podOverIndent "\d\+" contained contains=@NoSpell | |
" Formatter identifier keyword for =for, =begin and =end commands | |
1 0.000003 syn match podForKeywd "\S\+" contained contains=@NoSpell | |
" An indented line, to be displayed verbatim | |
1 0.000011 syn match podVerbatimLine "^\s.*$" contains=@NoSpell | |
" Inline textual items handled specially by POD | |
1 0.000023 syn match podSpecial "\(\<\|&\)\I\i*\(::\I\i*\)*([^)]*)" contains=@NoSpell | |
1 0.000005 syn match podSpecial "[$@%]\I\i*\(::\I\i*\)*\>" contains=@NoSpell | |
" Special formatting sequences | |
1 0.000008 syn region podFormat start="[IBSCLFX]<[^<]"me=e-1 end=">" oneline contains=podFormat,@NoSpell | |
1 0.000029 syn region podFormat start="[IBSCLFX]<<\s" end="\s>>" oneline contains=podFormat,@NoSpell | |
1 0.000003 syn match podFormat "Z<>" | |
1 0.000018 syn match podFormat "E<\(\d\+\|\I\i*\)>" contains=podEscape,podEscape2,@NoSpell | |
1 0.000011 syn match podEscape "\I\i*>"me=e-1 contained contains=@NoSpell | |
1 0.000003 syn match podEscape2 "\d\+>"me=e-1 contained contains=@NoSpell | |
" Define the default highlighting. | |
" For version 5.7 and earlier: only when not done already | |
" For version 5.8 and later: only when an item doesn't have highlighting yet | |
1 0.000002 if version >= 508 || !exists("did_pod_syntax_inits") | |
1 0.000001 if version < 508 | |
let did_pod_syntax_inits = 1 | |
command -nargs=+ HiLink hi link <args> | |
else | |
1 0.000007 command -nargs=+ HiLink hi def link <args> | |
1 0.000001 endif | |
1 0.000011 HiLink podCommand Statement | |
1 0.000012 HiLink podCmdText String | |
1 0.000007 HiLink podOverIndent Number | |
1 0.000006 HiLink podForKeywd Identifier | |
1 0.000006 HiLink podFormat Identifier | |
1 0.000006 HiLink podVerbatimLine PreProc | |
1 0.000006 HiLink podSpecial Identifier | |
1 0.000006 HiLink podEscape String | |
1 0.000006 HiLink podEscape2 Number | |
1 0.000002 delcommand HiLink | |
1 0.000001 endif | |
1 0.000003 if exists("perl_pod_spellcheck_headings") | |
" Spell-check headings | |
syn clear podCmdText | |
syn match podCmdText ".*$" contained contains=podFormat | |
endif | |
1 0.000002 if exists("perl_pod_formatting") | |
" By default, escapes like C<> are not checked for spelling. Remove B<> | |
" and I<> from the list of escapes. | |
syn clear podFormat | |
syn region podFormat start="[CLF]<[^<]"me=e-1 end=">" oneline contains=podFormat,@NoSpell | |
syn region podFormat start="[CLF]<<\s" end="\s>>" oneline contains=podFormat,@NoSpell | |
" Don't spell-check inside E<>, but ensure that the E< itself isn't | |
" marked as a spelling mistake. | |
syn match podFormat "E<\(\d\+\|\I\i*\)>" contains=podEscape,podEscape2,@NoSpell | |
" Z<> is a mock formatting code. Ensure Z<> on its own isn't marked as a | |
" spelling mistake. | |
syn match podFormat "Z<>" contains=podEscape,podEscape2,@NoSpell | |
" These are required so that whatever is *within* B<...>, I<...>, etc. is | |
" spell-checked, but not the B, I, ... itself. | |
syn match podBoldOpen "B<" contains=@NoSpell | |
syn match podItalicOpen "I<" contains=@NoSpell | |
syn match podNoSpaceOpen "S<" contains=@NoSpell | |
syn match podIndexOpen "X<" contains=@NoSpell | |
" Same as above but for the << >> syntax. | |
syn match podBoldAlternativeDelimOpen "B<< " contains=@NoSpell | |
syn match podItalicAlternativeDelimOpen "I<< " contains=@NoSpell | |
syn match podNoSpaceAlternativeDelimOpen "S<< " contains=@NoSpell | |
syn match podIndexAlternativeDelimOpen "X<< " contains=@NoSpell | |
" Add support for spell checking text inside B<>, I<>, S<> and X<>. | |
syn region podBold start="B<[^<]"me=e end=">" oneline contains=podBoldItalic,podBoldOpen | |
syn region podBoldAlternativeDelim start="B<<\s" end="\s>>" oneline contains=podBoldAlternativeDelimOpen | |
syn region podItalic start="I<[^<]"me=e end=">" oneline contains=podItalicBold,podItalicOpen | |
syn region podItalicAlternativeDelim start="I<<\s" end="\s>>" oneline contains=podItalicAlternativeDelimOpen | |
" Nested bold/italic and vice-versa | |
syn region podBoldItalic contained start="I<[^<]"me=e end=">" oneline | |
syn region podItalicBold contained start="B<[^<]"me=e end=">" oneline | |
syn region podNoSpace start="S<[^<]"ms=s-2 end=">"me=e oneline contains=podNoSpaceOpen | |
syn region podNoSpaceAlternativeDelim start="S<<\s"ms=s-2 end="\s>>"me=e oneline contains=podNoSpaceAlternativeDelimOpen | |
syn region podIndex start="X<[^<]"ms=s-2 end=">"me=e oneline contains=podIndexOpen | |
syn region podIndexAlternativeDelim start="X<<\s"ms=s-2 end="\s>>"me=e oneline contains=podIndexAlternativeDelimOpen | |
" Restore this (otherwise B<> is shown as bold inside verbatim) | |
syn match podVerbatimLine "^\s.*$" contains=@NoSpell | |
" Ensure formatted text can be displayed in headings and items | |
syn clear podCmdText | |
if exists("perl_pod_spellcheck_headings") | |
syn match podCmdText ".*$" contained contains=podFormat,podBold, | |
\podBoldAlternativeDelim,podItalic,podItalicAlternativeDelim, | |
\podBoldOpen,podItalicOpen,podBoldAlternativeDelimOpen, | |
\podItalicAlternativeDelimOpen,podNoSpaceOpen | |
else | |
syn match podCmdText ".*$" contained contains=podFormat,podBold, | |
\podBoldAlternativeDelim,podItalic,podItalicAlternativeDelim, | |
\@NoSpell | |
endif | |
" Specify how to display these | |
hi def podBold term=bold cterm=bold gui=bold | |
hi link podBoldAlternativeDelim podBold | |
hi link podBoldAlternativeDelimOpen podBold | |
hi link podBoldOpen podBold | |
hi link podNoSpace Identifier | |
hi link podNoSpaceAlternativeDelim Identifier | |
hi link podIndex Identifier | |
hi link podIndexAlternativeDelim Identifier | |
hi def podItalic term=italic cterm=italic gui=italic | |
hi link podItalicAlternativeDelim podItalic | |
hi link podItalicAlternativeDelimOpen podItalic | |
hi link podItalicOpen podItalic | |
hi def podBoldItalic term=italic,bold cterm=italic,bold gui=italic,bold | |
hi def podItalicBold term=italic,bold cterm=italic,bold gui=italic,bold | |
endif | |
1 0.000003 let b:current_syntax = "pod" | |
1 0.000005 let &cpo = s:cpo_save | |
1 0.000002 unlet s:cpo_save | |
" vim: ts=8 | |
SCRIPT /usr/share/vim/vim74/syntax/ruby.vim | |
Sourced 1 time | |
Total time: 0.005446 | |
Self time: 0.005446 | |
count total (s) self (s) | |
" Vim syntax file | |
" Language: Ruby | |
" Maintainer: Doug Kearns <[email protected]> | |
" URL: https://github.com/vim-ruby/vim-ruby | |
" Release Coordinator: Doug Kearns <[email protected]> | |
" ---------------------------------------------------------------------------- | |
" | |
" Previous Maintainer: Mirko Nasato | |
" Thanks to perl.vim authors, and to Reimer Behrends. :-) (MN) | |
" ---------------------------------------------------------------------------- | |
1 0.000003 if exists("b:current_syntax") | |
finish | |
endif | |
1 0.000003 if has("folding") && exists("ruby_fold") | |
setlocal foldmethod=syntax | |
endif | |
1 0.000036 syn cluster rubyNotTop contains=@rubyExtendedStringSpecial,@rubyRegexpSpecial,@rubyDeclaration,rubyConditional,rubyExceptional,rubyMethodExceptional,rubyTodo | |
1 0.000002 if exists("ruby_space_errors") | |
if !exists("ruby_no_trail_space_error") | |
syn match rubySpaceError display excludenl "\s\+$" | |
endif | |
if !exists("ruby_no_tab_space_error") | |
syn match rubySpaceError display " \+\t"me=e-1 | |
endif | |
endif | |
" Operators | |
1 0.000002 if exists("ruby_operators") | |
syn match rubyOperator "[~!^&|*/%+-]\|\%(class\s*\)\@<!<<\|<=>\|<=\|\%(<\|\<class\s\+\u\w*\s*\)\@<!<[^<]\@=\|===\|==\|=\~\|>>\|>=\|=\@<!>\|\*\*\|\.\.\.\|\.\.\|::" | |
syn match rubyOperator "->\|-=\|/=\|\*\*=\|\*=\|&&=\|&=\|&&\|||=\||=\|||\|%=\|+=\|!\~\|!=" | |
syn region rubyBracketOperator matchgroup=rubyOperator start="\%(\w[?!]\=\|[]})]\)\@<=\[\s*" end="\s*]" contains=ALLBUT,@rubyNotTop | |
endif | |
" Expression Substitution and Backslash Notation | |
1 0.000021 syn match rubyStringEscape "\\\\\|\\[abefnrstv]\|\\\o\{1,3}\|\\x\x\{1,2}" contained display | |
1 0.000043 syn match rubyStringEscape "\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)" contained display | |
1 0.000022 syn match rubyQuoteEscape "\\[\\']" contained display | |
1 0.000021 syn region rubyInterpolation matchgroup=rubyInterpolationDelimiter start="#{" end="}" contained contains=ALLBUT,@rubyNotTop | |
1 0.000049 syn match rubyInterpolation "#\%(\$\|@@\=\)\w\+" display contained contains=rubyInterpolationDelimiter,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable,rubyPredefinedVariable | |
1 0.000011 syn match rubyInterpolationDelimiter "#\ze\%(\$\|@@\=\)\w\+" display contained | |
1 0.000027 syn match rubyInterpolation "#\$\%(-\w\|\W\)" display contained contains=rubyInterpolationDelimiter,rubyPredefinedVariable,rubyInvalidVariable | |
1 0.000010 syn match rubyInterpolationDelimiter "#\ze\$\%(-\w\|\W\)" display contained | |
1 0.000014 syn region rubyNoInterpolation start="\\#{" end="}" contained | |
1 0.000027 syn match rubyNoInterpolation "\\#{" display contained | |
1 0.000011 syn match rubyNoInterpolation "\\#\%(\$\|@@\=\)\w\+" display contained | |
1 0.000003 syn match rubyNoInterpolation "\\#\$\W" display contained | |
1 0.000017 syn match rubyDelimEscape "\\[(<{\[)>}\]]" transparent display contained contains=NONE | |
1 0.000022 syn region rubyNestedParentheses start="(" skip="\\\\\|\\)" matchgroup=rubyString end=")" transparent contained | |
1 0.000021 syn region rubyNestedCurlyBraces start="{" skip="\\\\\|\\}" matchgroup=rubyString end="}" transparent contained | |
1 0.000047 syn region rubyNestedAngleBrackets start="<" skip="\\\\\|\\>" matchgroup=rubyString end=">" transparent contained | |
1 0.000030 syn region rubyNestedSquareBrackets start="\[" skip="\\\\\|\\\]" matchgroup=rubyString end="\]" transparent contained | |
" These are mostly Oniguruma ready | |
1 0.000019 syn region rubyRegexpComment matchgroup=rubyRegexpSpecial start="(?#" skip="\\)" end=")" contained | |
1 0.000056 syn region rubyRegexpParens matchgroup=rubyRegexpSpecial start="(\(?:\|?<\=[=!]\|?>\|?<[a-z_]\w*>\|?[imx]*-[imx]*:\=\|\%(?#\)\@!\)" skip="\\)" end=")" contained transparent contains=@rubyRegexpSpecial | |
1 0.000058 syn region rubyRegexpBrackets matchgroup=rubyRegexpCharClass start="\[\^\=" skip="\\\]" end="\]" contained transparent contains=rubyStringEscape,rubyRegexpEscape,rubyRegexpCharClass oneline | |
1 0.000006 syn match rubyRegexpCharClass "\\[DdHhSsWw]" contained display | |
1 0.000017 syn match rubyRegexpCharClass "\[:\^\=\%(alnum\|alpha\|ascii\|blank\|cntrl\|digit\|graph\|lower\|print\|punct\|space\|upper\|xdigit\):\]" contained | |
1 0.000018 syn match rubyRegexpEscape "\\[].*?+^$|\\/(){}[]" contained | |
1 0.000014 syn match rubyRegexpQuantifier "[*?+][?+]\=" contained display | |
1 0.000032 syn match rubyRegexpQuantifier "{\d\+\%(,\d*\)\=}?\=" contained display | |
1 0.000021 syn match rubyRegexpAnchor "[$^]\|\\[ABbGZz]" contained display | |
1 0.000011 syn match rubyRegexpDot "\." contained display | |
1 0.000009 syn match rubyRegexpSpecial "|" contained display | |
1 0.000011 syn match rubyRegexpSpecial "\\[1-9]\d\=\d\@!" contained display | |
1 0.000014 syn match rubyRegexpSpecial "\\k<\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\=>" contained display | |
1 0.000011 syn match rubyRegexpSpecial "\\k'\%([a-z_]\w*\|-\=\d\+\)\%([+-]\d\+\)\='" contained display | |
1 0.000012 syn match rubyRegexpSpecial "\\g<\%([a-z_]\w*\|-\=\d\+\)>" contained display | |
1 0.000010 syn match rubyRegexpSpecial "\\g'\%([a-z_]\w*\|-\=\d\+\)'" contained display | |
1 0.000006 syn cluster rubyStringSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape | |
1 0.000005 syn cluster rubyExtendedStringSpecial contains=@rubyStringSpecial,rubyNestedParentheses,rubyNestedCurlyBraces,rubyNestedAngleBrackets,rubyNestedSquareBrackets | |
1 0.000019 syn cluster rubyRegexpSpecial contains=rubyInterpolation,rubyNoInterpolation,rubyStringEscape,rubyRegexpSpecial,rubyRegexpEscape,rubyRegexpBrackets,rubyRegexpCharClass,rubyRegexpDot,rubyRegexpQuantifier,rubyRegexpAnchor,rubyRegexpParens,rubyRegexpComment | |
" Numbers and ASCII Codes | |
1 0.000020 syn match rubyASCIICode "\%(\w\|[]})\"'/]\)\@<!\%(?\%(\\M-\\C-\|\\C-\\M-\|\\M-\\c\|\\c\\M-\|\\c\|\\C-\|\\M-\)\=\%(\\\o\{1,3}\|\\x\x\{1,2}\|\\\=\S\)\)" | |
1 0.000056 syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[xX]\x\+\%(_\x\+\)*\>" display | |
1 0.000016 syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0[dD]\)\=\%(0\|[1-9]\d*\%(_\d\+\)*\)\>" display | |
1 0.000011 syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[oO]\=\o\+\%(_\o\+\)*\>" display | |
1 0.000010 syn match rubyInteger "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<0[bB][01]\+\%(_[01]\+\)*\>" display | |
1 0.000019 syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\.\d\+\%(_\d\+\)*\>" display | |
1 0.000017 syn match rubyFloat "\%(\%(\w\|[]})\"']\s*\)\@<!-\)\=\<\%(0\|[1-9]\d*\%(_\d\+\)*\)\%(\.\d\+\%(_\d\+\)*\)\=\%([eE][-+]\=\d\+\%(_\d\+\)*\)\>" display | |
" Identifiers | |
1 0.000020 syn match rubyLocalVariableOrMethod "\<[_[:lower:]][_[:alnum:]]*[?!=]\=" contains=NONE display transparent | |
1 0.000015 syn match rubyBlockArgument "&[_[:lower:]][_[:alnum:]]" contains=NONE display transparent | |
1 0.000016 syn match rubyConstant "\%(\%([.@$]\@<!\.\)\@<!\<\|::\)\_s*\zs\u\w*\%(\>\|::\)\@=\%(\s*(\)\@!" | |
1 0.000011 syn match rubyClassVariable "@@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display | |
1 0.000041 syn match rubyInstanceVariable "@\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" display | |
1 0.000020 syn match rubyGlobalVariable "$\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\|-.\)" | |
1 0.000019 syn match rubySymbol "[]})\"':]\@<!:\%(\^\|\~\|<<\|<=>\|<=\|<\|===\|[=!]=\|[=!]\~\|!\|>>\|>=\|>\||\|-@\|-\|/\|\[]=\|\[]\|\*\*\|\*\|&\|%\|+@\|+\|`\)" | |
1 0.000024 syn match rubySymbol "[]})\"':]\@<!:\$\%(-.\|[`~<=>_,;:!?/.'"@$*\&+0]\)" | |
1 0.000016 syn match rubySymbol "[]})\"':]\@<!:\%(\$\|@@\=\)\=\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" | |
1 0.000017 syn match rubySymbol "[]})\"':]\@<!:\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\%([?!=]>\@!\)\=" | |
1 0.000013 syn match rubySymbol "\%([{(,]\_s*\)\@<=\l\w*[!?]\=::\@!"he=e-1 | |
1 0.000021 syn match rubySymbol "[]})\"':]\@<!\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:\s\@="he=e-1 | |
1 0.000016 syn match rubySymbol "\%([{(,]\_s*\)\@<=[[:space:],{]\l\w*[!?]\=::\@!"hs=s+1,he=e-1 | |
1 0.000015 syn match rubySymbol "[[:space:],{]\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*[!?]\=:\s\@="hs=s+1,he=e-1 | |
1 0.000052 syn region rubySymbol start="[]})\"':]\@<!:'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape fold | |
1 0.000024 syn region rubySymbol start="[]})\"':]\@<!:\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial fold | |
1 0.000015 syn match rubyBlockParameter "\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*" contained | |
1 0.000019 syn region rubyBlockParameterList start="\%(\%(\<do\>\|{\)\s*\)\@<=|" end="|" oneline display contains=rubyBlockParameter | |
1 0.000006 syn match rubyInvalidVariable "$[^ A-Za-z_-]" | |
1 0.000034 syn match rubyPredefinedVariable #$[!$&"'*+,./0:;<=>?@\`~]# | |
1 0.000009 syn match rubyPredefinedVariable "$\d\+" display | |
1 0.000005 syn match rubyPredefinedVariable "$_\>" display | |
1 0.000005 syn match rubyPredefinedVariable "$-[0FIKadilpvw]\>" display | |
1 0.000008 syn match rubyPredefinedVariable "$\%(deferr\|defout\|stderr\|stdin\|stdout\)\>" display | |
1 0.000010 syn match rubyPredefinedVariable "$\%(DEBUG\|FILENAME\|KCODE\|LOADED_FEATURES\|LOAD_PATH\|PROGRAM_NAME\|SAFE\|VERBOSE\)\>" display | |
1 0.000031 syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(MatchingData\|ARGF\|ARGV\|ENV\)\>\%(\s*(\)\@!" | |
1 0.000008 syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(DATA\|FALSE\|NIL\)\>\%(\s*(\)\@!" | |
1 0.000014 syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(STDERR\|STDIN\|STDOUT\|TOPLEVEL_BINDING\|TRUE\)\>\%(\s*(\)\@!" | |
1 0.000019 syn match rubyPredefinedConstant "\%(\%(\.\@<!\.\)\@<!\|::\)\_s*\zs\%(RUBY_\%(VERSION\|RELEASE_DATE\|PLATFORM\|PATCHLEVEL\|REVISION\|DESCRIPTION\|COPYRIGHT\|ENGINE\)\)\>\%(\s*(\)\@!" | |
" Normal Regular Expression | |
1 0.000076 syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\%(^\|\<\%(and\|or\|while\|until\|unless\|if\|elsif\|when\|not\|then\|else\)\|[;\~=!|&(,[<>?:*+-]\)\s*\)\@<=/" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold | |
1 0.000032 syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="\%(\h\k*\s\+\)\@<=/[ \t=]\@!" end="/[iomxneus]*" skip="\\\\\|\\/" contains=@rubyRegexpSpecial fold | |
" Generalized Regular Expression | |
1 0.000028 syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\z([~`!@#$%^&*_\-+=|\:;"',.? /]\)" end="\z1[iomxneus]*" skip="\\\\\|\\\z1" contains=@rubyRegexpSpecial fold | |
1 0.000057 syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r{" end="}[iomxneus]*" skip="\\\\\|\\}" contains=@rubyRegexpSpecial fold | |
1 0.000031 syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r<" end=">[iomxneus]*" skip="\\\\\|\\>" contains=@rubyRegexpSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold | |
1 0.000025 syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r\[" end="\][iomxneus]*" skip="\\\\\|\\\]" contains=@rubyRegexpSpecial fold | |
1 0.000054 syn region rubyRegexp matchgroup=rubyRegexpDelimiter start="%r(" end=")[iomxneus]*" skip="\\\\\|\\)" contains=@rubyRegexpSpecial fold | |
" Normal String and Shell Command Output | |
1 0.000027 syn region rubyString matchgroup=rubyStringDelimiter start="\"" end="\"" skip="\\\\\|\\\"" contains=@rubyStringSpecial,@Spell fold | |
1 0.000026 syn region rubyString matchgroup=rubyStringDelimiter start="'" end="'" skip="\\\\\|\\'" contains=rubyQuoteEscape,@Spell fold | |
1 0.000054 syn region rubyString matchgroup=rubyStringDelimiter start="`" end="`" skip="\\\\\|\\`" contains=@rubyStringSpecial fold | |
" Generalized Single Quoted String, Symbol and Array of Strings | |
1 0.000029 syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" fold | |
1 0.000026 syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape | |
1 0.000056 syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape | |
1 0.000028 syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi]\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape | |
1 0.000026 syn region rubyString matchgroup=rubyStringDelimiter start="%[qwi](" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape | |
1 0.000054 syn region rubyString matchgroup=rubyStringDelimiter start="%q " end=" " skip="\\\\\|\\)" fold | |
1 0.000029 syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\z([~`!@#$%^&*_\-+=|\:;"',.? /]\)" end="\z1" skip="\\\\\|\\\z1" fold | |
1 0.000019 syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s{" end="}" skip="\\\\\|\\}" fold contains=rubyNestedCurlyBraces,rubyDelimEscape | |
1 0.000051 syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s<" end=">" skip="\\\\\|\\>" fold contains=rubyNestedAngleBrackets,rubyDelimEscape | |
1 0.000022 syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s\[" end="\]" skip="\\\\\|\\\]" fold contains=rubyNestedSquareBrackets,rubyDelimEscape | |
1 0.000020 syn region rubySymbol matchgroup=rubySymbolDelimiter start="%s(" end=")" skip="\\\\\|\\)" fold contains=rubyNestedParentheses,rubyDelimEscape | |
" Generalized Double Quoted String and Array of Strings and Shell Command Output | |
" Note: %= is not matched here as the beginning of a double quoted string | |
1 0.000062 syn region rubyString matchgroup=rubyStringDelimiter start="%\z([~`!@#$%^&*_\-+|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold | |
1 0.000028 syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\z([~`!@#$%^&*_\-+=|\:;"',.?/]\)" end="\z1" skip="\\\\\|\\\z1" contains=@rubyStringSpecial fold | |
1 0.000027 syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\={" end="}" skip="\\\\\|\\}" contains=@rubyStringSpecial,rubyNestedCurlyBraces,rubyDelimEscape fold | |
1 0.000054 syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=<" end=">" skip="\\\\\|\\>" contains=@rubyStringSpecial,rubyNestedAngleBrackets,rubyDelimEscape fold | |
1 0.000027 syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=\[" end="\]" skip="\\\\\|\\\]" contains=@rubyStringSpecial,rubyNestedSquareBrackets,rubyDelimEscape fold | |
1 0.000026 syn region rubyString matchgroup=rubyStringDelimiter start="%[QWIx]\=(" end=")" skip="\\\\\|\\)" contains=@rubyStringSpecial,rubyNestedParentheses,rubyDelimEscape fold | |
1 0.000053 syn region rubyString matchgroup=rubyStringDelimiter start="%[Qx] " end=" " skip="\\\\\|\\)" contains=@rubyStringSpecial fold | |
" Here Document | |
1 0.000108 syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs\%(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)+ end=+$+ oneline contains=ALLBUT,@rubyNotTop | |
1 0.000025 syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs"\%([^"]*\)"+ end=+$+ oneline contains=ALLBUT,@rubyNotTop | |
1 0.000021 syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs'\%([^']*\)'+ end=+$+ oneline contains=ALLBUT,@rubyNotTop | |
1 0.000049 syn region rubyHeredocStart matchgroup=rubyStringDelimiter start=+\%(\%(class\s*\|\%([]})"'.]\|::\)\)\_s*\|\w\)\@<!<<-\=\zs`\%([^`]*\)`+ end=+$+ oneline contains=ALLBUT,@rubyNotTop | |
1 0.000065 syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend | |
1 0.000036 syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<"\z([^"]*\)"\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend | |
1 0.000031 syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<'\z([^']*\)'\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc fold keepend | |
1 0.000031 syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]})"'.]\)\s\|\w\)\@<!<<`\z([^`]*\)`\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+2 matchgroup=rubyStringDelimiter end=+^\z1$+ contains=rubyHeredocStart,rubyHeredoc,@rubyStringSpecial fold keepend | |
1 0.000065 syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-\z(\%(\h\|[^\x00-\x7F]\)\%(\w\|[^\x00-\x7F]\)*\)\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend | |
1 0.000049 syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-"\z([^"]*\)"\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend | |
1 0.000033 syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-'\z([^']*\)'\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart fold keepend | |
1 0.000031 syn region rubyString start=+\%(\%(class\|::\)\_s*\|\%([]}).]\)\s\|\w\)\@<!<<-`\z([^`]*\)`\ze\%(.*<<-\=['`"]\=\h\)\@!+hs=s+3 matchgroup=rubyStringDelimiter end=+^\s*\zs\z1$+ contains=rubyHeredocStart,@rubyStringSpecial fold keepend | |
1 0.000008 if exists('main_syntax') && main_syntax == 'eruby' | |
let b:ruby_no_expensive = 1 | |
end | |
1 0.000045 syn match rubyAliasDeclaration "[^[:space:];#.()]\+" contained contains=rubySymbol,rubyGlobalVariable,rubyPredefinedVariable nextgroup=rubyAliasDeclaration2 skipwhite | |
1 0.000027 syn match rubyAliasDeclaration2 "[^[:space:];#.()]\+" contained contains=rubySymbol,rubyGlobalVariable,rubyPredefinedVariable | |
1 0.000088 syn match rubyMethodDeclaration "[^[:space:];#(]\+" contained contains=rubyConstant,rubyBoolean,rubyPseudoVariable,rubyInstanceVariable,rubyClassVariable,rubyGlobalVariable | |
1 0.000045 syn match rubyClassDeclaration "[^[:space:];#<]\+" contained contains=rubyConstant,rubyOperator | |
1 0.000023 syn match rubyModuleDeclaration "[^[:space:];#<]\+" contained contains=rubyConstant,rubyOperator | |
1 0.000016 syn match rubyFunction "\<[_[:alpha:]][_[:alnum:]]*[?!=]\=[[:alnum:]_.:?!=]\@!" contained containedin=rubyMethodDeclaration | |
1 0.000019 syn match rubyFunction "\%(\s\|^\)\@<=[_[:alpha:]][_[:alnum:]]*[?!=]\=\%(\s\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2 | |
1 0.000023 syn match rubyFunction "\%([[:space:].]\|^\)\@<=\%(\[\]=\=\|\*\*\|[+-]@\=\|[*/%|&^~]\|<<\|>>\|[<>]=\=\|<=>\|===\|[=!]=\|[=!]\~\|!\|`\)\%([[:space:];#(]\|$\)\@=" contained containedin=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration | |
1 0.000016 syn cluster rubyDeclaration contains=rubyAliasDeclaration,rubyAliasDeclaration2,rubyMethodDeclaration,rubyModuleDeclaration,rubyClassDeclaration,rubyFunction,rubyBlockParameter | |
" Keywords | |
" Note: the following keywords have already been defined: | |
" begin case class def do end for if module unless until while | |
1 0.000022 syn match rubyControl "\<\%(and\|break\|in\|next\|not\|or\|redo\|rescue\|retry\|return\)\>[?!]\@!" | |
1 0.000006 syn match rubyOperator "\<defined?" display | |
1 0.000014 syn match rubyKeyword "\<\%(super\|yield\)\>[?!]\@!" | |
1 0.000007 syn match rubyBoolean "\<\%(true\|false\)\>[?!]\@!" | |
1 0.000045 syn match rubyPseudoVariable "\<\%(nil\|self\|__ENCODING__\|__FILE__\|__LINE__\|__callee__\|__method__\)\>[?!]\@!" " TODO: reorganise | |
1 0.000030 syn match rubyBeginEnd "\<\%(BEGIN\|END\)\>[?!]\@!" | |
" Expensive Mode - match 'end' with the appropriate opening keyword for syntax | |
" based folding and special highlighting of module/class/method definitions | |
1 0.000004 if !exists("b:ruby_no_expensive") && !exists("ruby_no_expensive") | |
1 0.000016 syn match rubyDefine "\<alias\>" nextgroup=rubyAliasDeclaration skipwhite skipnl | |
1 0.000006 syn match rubyDefine "\<def\>" nextgroup=rubyMethodDeclaration skipwhite skipnl | |
1 0.000017 syn match rubyDefine "\<undef\>" nextgroup=rubyFunction skipwhite skipnl | |
1 0.000011 syn match rubyClass "\<class\>" nextgroup=rubyClassDeclaration skipwhite skipnl | |
1 0.000011 syn match rubyModule "\<module\>" nextgroup=rubyModuleDeclaration skipwhite skipnl | |
1 0.000020 syn region rubyMethodBlock start="\<def\>" matchgroup=rubyDefine end="\%(\<def\_s\+\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop fold | |
1 0.000068 syn region rubyBlock start="\<class\>" matchgroup=rubyClass end="\<end\>" contains=ALLBUT,@rubyNotTop fold | |
1 0.000020 syn region rubyBlock start="\<module\>" matchgroup=rubyModule end="\<end\>" contains=ALLBUT,@rubyNotTop fold | |
" modifiers | |
1 0.000014 syn match rubyConditionalModifier "\<\%(if\|unless\)\>" display | |
1 0.000016 syn match rubyRepeatModifier "\<\%(while\|until\)\>" display | |
1 0.000023 syn region rubyDoBlock matchgroup=rubyControl start="\<do\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold | |
" curly bracket block or hash literal | |
1 0.000023 syn region rubyCurlyBlock matchgroup=rubyCurlyBlockDelimiter start="{" end="}" contains=ALLBUT,@rubyNotTop fold | |
1 0.000069 syn region rubyArrayLiteral matchgroup=rubyArrayDelimiter start="\%(\w\|[\]})]\)\@<!\[" end="]" contains=ALLBUT,@rubyNotTop fold | |
" statements without 'do' | |
1 0.000026 syn region rubyBlockExpression matchgroup=rubyControl start="\<begin\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold | |
1 0.000020 syn region rubyCaseExpression matchgroup=rubyConditional start="\<case\>" end="\<end\>" contains=ALLBUT,@rubyNotTop fold | |
1 0.000036 syn region rubyConditionalExpression matchgroup=rubyConditional start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+=-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![?!]\)\s*\)\@<=\%(if\|unless\)\>" end="\%(\%(\%(\.\@<!\.\)\|::\)\s*\)\@<!\<end\>" contains=ALLBUT,@rubyNotTop fold | |
1 0.000010 syn match rubyConditional "\<\%(then\|else\|when\)\>[?!]\@!" contained containedin=rubyCaseExpression | |
1 0.000007 syn match rubyConditional "\<\%(then\|else\|elsif\)\>[?!]\@!" contained containedin=rubyConditionalExpression | |
1 0.000043 syn match rubyExceptional "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>[?!]\@!" contained containedin=rubyBlockExpression | |
1 0.000018 syn match rubyMethodExceptional "\<\%(\%(\%(;\|^\)\s*\)\@<=rescue\|else\|ensure\)\>[?!]\@!" contained containedin=rubyMethodBlock | |
" statements with optional 'do' | |
1 0.000059 syn region rubyOptionalDoLine matchgroup=rubyRepeat start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyOptionalDo end="\%(\<do\>\)" end="\ze\%(;\|$\)" oneline contains=ALLBUT,@rubyNotTop | |
1 0.000033 syn region rubyRepeatExpression start="\<for\>[?!]\@!" start="\%(\%(^\|\.\.\.\=\|[{:,;([<>~\*/%&^|+-]\|\%(\<[_[:lower:]][_[:alnum:]]*\)\@<![!=?]\)\s*\)\@<=\<\%(until\|while\)\>" matchgroup=rubyRepeat end="\<end\>" contains=ALLBUT,@rubyNotTop nextgroup=rubyOptionalDoLine fold | |
1 0.000002 if !exists("ruby_minlines") | |
1 0.000004 let ruby_minlines = 500 | |
1 0.000001 endif | |
1 0.000009 exec "syn sync minlines=" . ruby_minlines | |
1 0.000001 else | |
syn match rubyControl "\<def\>[?!]\@!" nextgroup=rubyMethodDeclaration skipwhite skipnl | |
syn match rubyControl "\<class\>[?!]\@!" nextgroup=rubyClassDeclaration skipwhite skipnl | |
syn match rubyControl "\<module\>[?!]\@!" nextgroup=rubyModuleDeclaration skipwhite skipnl | |
syn match rubyControl "\<\%(case\|begin\|do\|for\|if\|unless\|while\|until\|else\|elsif\|ensure\|then\|when\|end\)\>[?!]\@!" | |
syn match rubyKeyword "\<\%(alias\|undef\)\>[?!]\@!" | |
endif | |
" Special Methods | |
1 0.000002 if !exists("ruby_no_special_methods") | |
1 0.000020 syn keyword rubyAccess public protected private public_class_method private_class_method public_constant private_constant module_function | |
" attr is a common variable name | |
1 0.000016 syn match rubyAttribute "\%(\%(^\|;\)\s*\)\@<=attr\>\(\s*[.=]\)\@!" | |
1 0.000006 syn keyword rubyAttribute attr_accessor attr_reader attr_writer | |
1 0.000054 syn match rubyControl "\<\%(exit!\|\%(abort\|at_exit\|exit\|fork\|loop\|trap\)\>[?!]\@!\)" | |
1 0.000023 syn keyword rubyEval eval class_eval instance_eval module_eval | |
1 0.000015 syn keyword rubyException raise fail catch throw | |
" false positive with 'include?' | |
1 0.000015 syn match rubyInclude "\<include\>[?!]\@!" | |
1 0.000006 syn keyword rubyInclude autoload extend load prepend require require_relative | |
1 0.000005 syn keyword rubyKeyword callcc caller lambda proc | |
1 0.000001 endif | |
" Comments and Documentation | |
1 0.000012 syn match rubySharpBang "\%^#!.*" display | |
1 0.000005 syn keyword rubyTodo FIXME NOTE TODO OPTIMIZE XXX todo contained | |
1 0.000034 syn match rubyComment "#.*" contains=rubySharpBang,rubySpaceError,rubyTodo,@Spell | |
1 0.000003 if !exists("ruby_no_comment_fold") | |
1 0.000028 syn region rubyMultilineComment start="\%(\%(^\s*#.*\n\)\@<!\%(^\s*#.*\n\)\)\%(\(^\s*#.*\n\)\{1,}\)\@=" end="\%(^\s*#.*\n\)\@<=\%(^\s*#.*\n\)\%(^\s*#\)\@!" contains=rubyComment transparent fold keepend | |
1 0.000022 syn region rubyDocumentation start="^=begin\ze\%(\s.*\)\=$" end="^=end\%(\s.*\)\=$" contains=rubySpaceError,rubyTodo,@Spell fold | |
1 0.000001 else | |
syn region rubyDocumentation start="^=begin\s*$" end="^=end\s*$" contains=rubySpaceError,rubyTodo,@Spell | |
endif | |
" Note: this is a hack to prevent 'keywords' being highlighted as such when called as methods with an explicit receiver | |
1 0.000024 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(alias\|and\|begin\|break\|case\|class\|def\|defined\|do\|else\)\>" transparent contains=NONE | |
1 0.000020 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(elsif\|end\|ensure\|false\|for\|if\|in\|module\|next\|nil\)\>" transparent contains=NONE | |
1 0.000089 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(not\|or\|redo\|rescue\|retry\|return\|self\|super\|then\|true\)\>" transparent contains=NONE | |
1 0.000038 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(undef\|unless\|until\|when\|while\|yield\|BEGIN\|END\|__FILE__\|__LINE__\)\>" transparent contains=NONE | |
1 0.000016 syn match rubyKeywordAsMethod "\<\%(alias\|begin\|case\|class\|def\|do\|end\)[?!]" transparent contains=NONE | |
1 0.000008 syn match rubyKeywordAsMethod "\<\%(if\|module\|undef\|unless\|until\|while\)[?!]" transparent contains=NONE | |
1 0.000015 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(abort\|at_exit\|attr\|attr_accessor\|attr_reader\)\>" transparent contains=NONE | |
1 0.000012 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(attr_writer\|autoload\|callcc\|catch\|caller\)\>" transparent contains=NONE | |
1 0.000010 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(eval\|class_eval\|instance_eval\|module_eval\|exit\)\>" transparent contains=NONE | |
1 0.000013 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(extend\|fail\|fork\|include\|lambda\)\>" transparent contains=NONE | |
1 0.000011 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(load\|loop\|prepend\|private\|proc\|protected\)\>" transparent contains=NONE | |
1 0.000010 syn match rubyKeywordAsMethod "\%(\%(\.\@<!\.\)\|::\)\_s*\%(public\|require\|require_relative\|raise\|throw\|trap\)\>" transparent contains=NONE | |
" __END__ Directive | |
1 0.000073 syn region rubyData matchgroup=rubyDataDirective start="^__END__$" end="\%$" fold | |
1 0.000010 hi def link rubyClass rubyDefine | |
1 0.000012 hi def link rubyModule rubyDefine | |
1 0.000003 hi def link rubyMethodExceptional rubyDefine | |
1 0.000007 hi def link rubyDefine Define | |
1 0.000025 hi def link rubyFunction Function | |
1 0.000008 hi def link rubyConditional Conditional | |
1 0.000002 hi def link rubyConditionalModifier rubyConditional | |
1 0.000002 hi def link rubyExceptional rubyConditional | |
1 0.000007 hi def link rubyRepeat Repeat | |
1 0.000001 hi def link rubyRepeatModifier rubyRepeat | |
1 0.000002 hi def link rubyOptionalDo rubyRepeat | |
1 0.000013 hi def link rubyControl Statement | |
1 0.000008 hi def link rubyInclude Include | |
1 0.000007 hi def link rubyInteger Number | |
1 0.000008 hi def link rubyASCIICode Character | |
1 0.000007 hi def link rubyFloat Float | |
1 0.000008 hi def link rubyBoolean Boolean | |
1 0.000007 hi def link rubyException Exception | |
1 0.000003 if !exists("ruby_no_identifiers") | |
1 0.000014 hi def link rubyIdentifier Identifier | |
1 0.000001 else | |
hi def link rubyIdentifier NONE | |
endif | |
1 0.000008 hi def link rubyClassVariable rubyIdentifier | |
1 0.000012 hi def link rubyConstant Type | |
1 0.000012 hi def link rubyGlobalVariable rubyIdentifier | |
1 0.000007 hi def link rubyBlockParameter rubyIdentifier | |
1 0.000013 hi def link rubyInstanceVariable rubyIdentifier | |
1 0.000012 hi def link rubyPredefinedIdentifier rubyIdentifier | |
1 0.000008 hi def link rubyPredefinedConstant rubyPredefinedIdentifier | |
1 0.000007 hi def link rubyPredefinedVariable rubyPredefinedIdentifier | |
1 0.000013 hi def link rubySymbol Constant | |
1 0.000008 hi def link rubyKeyword Keyword | |
1 0.000007 hi def link rubyOperator Operator | |
1 0.000008 hi def link rubyBeginEnd Statement | |
1 0.000008 hi def link rubyAccess Statement | |
1 0.000008 hi def link rubyAttribute Statement | |
1 0.000007 hi def link rubyEval Statement | |
1 0.000008 hi def link rubyPseudoVariable Constant | |
1 0.000007 hi def link rubyComment Comment | |
1 0.000008 hi def link rubyData Comment | |
1 0.000007 hi def link rubyDataDirective Delimiter | |
1 0.000007 hi def link rubyDocumentation Comment | |
1 0.000008 hi def link rubyTodo Todo | |
1 0.000002 hi def link rubyQuoteEscape rubyStringEscape | |
1 0.000007 hi def link rubyStringEscape Special | |
1 0.000013 hi def link rubyInterpolationDelimiter Delimiter | |
1 0.000008 hi def link rubyNoInterpolation rubyString | |
1 0.000013 hi def link rubySharpBang PreProc | |
1 0.000013 hi def link rubyRegexpDelimiter rubyStringDelimiter | |
1 0.000007 hi def link rubySymbolDelimiter rubyStringDelimiter | |
1 0.000013 hi def link rubyStringDelimiter Delimiter | |
1 0.000007 hi def link rubyHeredoc rubyString | |
1 0.000013 hi def link rubyString String | |
1 0.000007 hi def link rubyRegexpEscape rubyRegexpSpecial | |
1 0.000008 hi def link rubyRegexpQuantifier rubyRegexpSpecial | |
1 0.000007 hi def link rubyRegexpAnchor rubyRegexpSpecial | |
1 0.000002 hi def link rubyRegexpDot rubyRegexpCharClass | |
1 0.000007 hi def link rubyRegexpCharClass rubyRegexpSpecial | |
1 0.000013 hi def link rubyRegexpSpecial Special | |
1 0.000008 hi def link rubyRegexpComment Comment | |
1 0.000012 hi def link rubyRegexp rubyString | |
1 0.000007 hi def link rubyInvalidVariable Error | |
1 0.000014 hi def link rubyError Error | |
1 0.000002 hi def link rubySpaceError rubyError | |
1 0.000003 let b:current_syntax = "ruby" | |
" vim: nowrap sw=2 sts=2 ts=8 noet: | |
SCRIPT /usr/share/vim/vim74/ftplugin/vim.vim | |
Sourced 1 time | |
Total time: 0.000312 | |
Self time: 0.000312 | |
count total (s) self (s) | |
" Vim filetype plugin | |
" Language: Vim | |
" Maintainer: Bram Moolenaar <[email protected]> | |
" Last Change: 2014 Sep 07 | |
" Only do this when not done yet for this buffer | |
1 0.000004 if exists("b:did_ftplugin") | |
finish | |
endif | |
" Don't load another plugin for this buffer | |
1 0.000003 let b:did_ftplugin = 1 | |
1 0.000004 let s:cpo_save = &cpo | |
1 0.000005 set cpo-=C | |
1 0.000003 let b:undo_ftplugin = "setl fo< isk< com< tw< commentstring<" | |
\ . "| unlet! b:match_ignorecase b:match_words b:match_skip" | |
" Set 'formatoptions' to break comment lines but not other lines, | |
" and insert the comment leader when hitting <CR> or using "o". | |
1 0.000005 setlocal fo-=t fo+=croql | |
" To allow tag lookup via CTRL-] for autoload functions, '#' must be a | |
" keyword character. E.g., for netrw#Nread(). | |
1 0.000027 setlocal isk+=# | |
" Set 'comments' to format dashed lists in comments | |
1 0.000004 setlocal com=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\" | |
" Format comments to be up to 78 characters long | |
1 0.000002 if &tw == 0 | |
1 0.000006 setlocal tw=78 | |
1 0.000000 endif | |
" Comments start with a double quote | |
1 0.000002 setlocal commentstring=\"%s | |
" Move around functions. | |
1 0.000065 nnoremap <silent><buffer> [[ m':call search('^\s*fu\%[nction]\>', "bW")<CR> | |
1 0.000016 vnoremap <silent><buffer> [[ m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "bW")<CR> | |
1 0.000012 nnoremap <silent><buffer> ]] m':call search('^\s*fu\%[nction]\>', "W")<CR> | |
1 0.000013 vnoremap <silent><buffer> ]] m':<C-U>exe "normal! gv"<Bar>call search('^\s*fu\%[nction]\>', "W")<CR> | |
1 0.000012 nnoremap <silent><buffer> [] m':call search('^\s*endf*\%[unction]\>', "bW")<CR> | |
1 0.000012 vnoremap <silent><buffer> [] m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf*\%[unction]\>', "bW")<CR> | |
1 0.000012 nnoremap <silent><buffer> ][ m':call search('^\s*endf*\%[unction]\>', "W")<CR> | |
1 0.000012 vnoremap <silent><buffer> ][ m':<C-U>exe "normal! gv"<Bar>call search('^\s*endf*\%[unction]\>', "W")<CR> | |
" Move around comments | |
1 0.000012 nnoremap <silent><buffer> ]" :call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR> | |
1 0.000012 vnoremap <silent><buffer> ]" :<C-U>exe "normal! gv"<Bar>call search('^\(\s*".*\n\)\@<!\(\s*"\)', "W")<CR> | |
1 0.000012 nnoremap <silent><buffer> [" :call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR> | |
1 0.000012 vnoremap <silent><buffer> [" :<C-U>exe "normal! gv"<Bar>call search('\%(^\s*".*\n\)\%(^\s*"\)\@!', "bW")<CR> | |
" Let the matchit plugin know what items can be matched. | |
1 0.000002 if exists("loaded_matchit") | |
let b:match_ignorecase = 0 | |
let b:match_words = | |
\ '\<fu\%[nction]\>:\<retu\%[rn]\>:\<endf\%[unction]\>,' . | |
\ '\<\(wh\%[ile]\|for\)\>:\<brea\%[k]\>:\<con\%[tinue]\>:\<end\(w\%[hile]\|fo\%[r]\)\>,' . | |
\ '\<if\>:\<el\%[seif]\>:\<en\%[dif]\>,' . | |
\ '\<try\>:\<cat\%[ch]\>:\<fina\%[lly]\>:\<endt\%[ry]\>,' . | |
\ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,' . | |
\ '(:)' | |
" Ignore syntax region commands and settings, any 'en*' would clobber | |
" if-endif. | |
" - set spl=de,en | |
" - au! FileType javascript syntax region foldBraces start=/{/ end=/}/ … | |
let b:match_skip = 'synIDattr(synID(line("."),col("."),1),"name") | |
\ =~? "comment\\|string\\|vimSynReg\\|vimSet"' | |
endif | |
1 0.000004 let &cpo = s:cpo_save | |
1 0.000001 unlet s:cpo_save | |
" removed this, because 'cpoptions' is a global option. | |
" setlocal cpo+=M " makes \%( match \) | |
SCRIPT /usr/share/vim/vim74/indent/vim.vim | |
Sourced 1 time | |
Total time: 0.000093 | |
Self time: 0.000093 | |
count total (s) self (s) | |
" Vim indent file | |
" Language: Vim script | |
" Maintainer: Bram Moolenaar <[email protected]> | |
" Last Change: 2014 Sep 19 | |
" Only load this indent file when no other was loaded. | |
1 0.000004 if exists("b:did_indent") | |
finish | |
endif | |
1 0.000002 let b:did_indent = 1 | |
1 0.000002 setlocal indentexpr=GetVimIndent() | |
1 0.000002 setlocal indentkeys+==end,=else,=cat,=fina,=END,0\\ | |
1 0.000002 let b:undo_indent = "setl indentkeys< indentexpr<" | |
" Only define the function once. | |
1 0.000002 if exists("*GetVimIndent") | |
finish | |
endif | |
1 0.000004 let s:keepcpo= &cpo | |
1 0.000004 set cpo&vim | |
1 0.000002 function GetVimIndent() | |
let ignorecase_save = &ignorecase | |
try | |
let &ignorecase = 0 | |
return GetVimIndentIntern() | |
finally | |
let &ignorecase = ignorecase_save | |
endtry | |
endfunc | |
1 0.000002 function GetVimIndentIntern() | |
" Find a non-blank line above the current line. | |
let lnum = prevnonblank(v:lnum - 1) | |
" If the current line doesn't start with '\' and below a line that starts | |
" with '\', use the indent of the line above it. | |
let cur_text = getline(v:lnum) | |
if cur_text !~ '^\s*\\' | |
while lnum > 0 && getline(lnum) =~ '^\s*\\' | |
let lnum = lnum - 1 | |
endwhile | |
endif | |
" At the start of the file use zero indent. | |
if lnum == 0 | |
return 0 | |
endif | |
let prev_text = getline(lnum) | |
" Add a 'shiftwidth' after :if, :while, :try, :catch, :finally, :function | |
" and :else. Add it three times for a line that starts with '\' after | |
" a line that doesn't (or g:vim_indent_cont if it exists). | |
let ind = indent(lnum) | |
if cur_text =~ '^\s*\\' && v:lnum > 1 && prev_text !~ '^\s*\\' | |
if exists("g:vim_indent_cont") | |
let ind = ind + g:vim_indent_cont | |
else | |
let ind = ind + &sw * 3 | |
endif | |
elseif prev_text =~ '^\s*aug\%[roup]' && prev_text !~ '^\s*aug\%[roup]\s*!\=\s\+END' | |
let ind = ind + &sw | |
else | |
" A line starting with :au does not increment/decrement indent. | |
if prev_text !~ '^\s*au\%[tocmd]' | |
let i = match(prev_text, '\(^\||\)\s*\(if\|wh\%[ile]\|for\|try\|cat\%[ch]\|fina\%[lly]\|fu\%[nction]\|el\%[seif]\)\>') | |
if i >= 0 | |
let ind += &sw | |
if strpart(prev_text, i, 1) == '|' && has('syntax_items') | |
\ && synIDattr(synID(lnum, i, 1), "name") =~ '\(Comment\|String\)$' | |
let ind -= &sw | |
endif | |
endif | |
endif | |
endif | |
" If the previous line contains an "end" after a pipe, but not in an ":au" | |
" command. And not when there is a backslash before the pipe. | |
" And when syntax HL is enabled avoid a match inside a string. | |
let i = match(prev_text, '[^\\]|\s*\(ene\@!\)') | |
if i > 0 && prev_text !~ '^\s*au\%[tocmd]' | |
if !has('syntax_items') || synIDattr(synID(lnum, i + 2, 1), "name") !~ '\(Comment\|String\)$' | |
let ind = ind - &sw | |
endif | |
endif | |
" Subtract a 'shiftwidth' on a :endif, :endwhile, :catch, :finally, :endtry, | |
" :endfun, :else and :augroup END. | |
if cur_text =~ '^\s*\(ene\@!\|cat\|fina\|el\|aug\%[roup]\s*!\=\s\+END\)' | |
let ind = ind - &sw | |
endif | |
return ind | |
endfunction | |
1 0.000004 let &cpo = s:keepcpo | |
1 0.000002 unlet s:keepcpo | |
" vim:sw=2 | |
FUNCTION unite#handlers#_on_text_changed() | |
Called 2 times | |
Total time: 0.070493 | |
Self time: 0.000027 | |
count total (s) self (s) | |
2 0.000019 0.000005 let unite = unite#get_current_unite() | |
2 0.000064 0.000007 if unite#helper#get_input(1) !=# unite.last_input | |
2 0.070403 0.000008 call s:check_redraw() | |
2 0.000001 endif | |
FUNCTION <SNR>37_repo_head_ref() | |
Called 11 times | |
Total time: 0.001249 | |
Self time: 0.001072 | |
count total (s) self (s) | |
11 0.000421 0.000309 if !filereadable(self.dir('HEAD')) | |
return '' | |
endif | |
11 0.000787 0.000722 return readfile(self.dir('HEAD'))[0] | |
FUNCTION neocomplete#variables#get_sources() | |
Called 66 times | |
Total time: 0.000532 | |
Self time: 0.000532 | |
count total (s) self (s) | |
66 0.000238 if !exists('s:sources') | |
let s:sources = {} | |
endif | |
66 0.000074 return s:sources | |
FUNCTION unite#all_quit_session() | |
Called 14 times | |
Total time: 1.874631 | |
Self time: 0.000175 | |
count total (s) self (s) | |
14 1.874615 0.000159 call unite#view#_quit(get(a:000, 0, 1), 1) | |
FUNCTION <SNR>119_vp_kill() | |
Called 14 times | |
Total time: 0.006967 | |
Self time: 0.000497 | |
count total (s) self (s) | |
14 0.000040 let sig = get(a:000, 0, g:vimproc#SIGTERM) | |
14 0.000016 if sig != 0 | |
14 0.000554 0.000048 call s:close_all(self) | |
14 0.000016 let self.is_valid = 0 | |
14 0.000008 endif | |
14 0.000018 let ret = 0 | |
28 0.000076 for pid in get(self, 'pid_list', [self.pid]) | |
14 0.003277 0.000068 call s:waitpid(pid) | |
14 0.002843 0.000088 let ret = vimproc#kill(pid, sig) | |
14 0.000012 endfor | |
14 0.000011 return ret | |
FUNCTION unite#view#_change_highlight() | |
Called 310 times | |
Total time: 0.433165 | |
Self time: 0.069579 | |
count total (s) self (s) | |
310 0.001281 if &filetype !=# 'unite' || !exists('b:current_syntax') | |
14 0.000012 return | |
endif | |
296 0.003036 0.000928 let unite = unite#get_current_unite() | |
296 0.000460 if empty(unite) | |
return | |
endif | |
296 0.023803 0.000934 call unite#view#_set_cursor_line() | |
296 0.001815 silent! syntax clear uniteCandidateInputKeyword | |
296 0.000526 syntax case ignore | |
592 0.046421 0.002534 for input_str in unite#helper#get_substitute_input( unite#helper#get_input()) | |
296 0.000391 if input_str == '' | |
74 0.000105 continue | |
endif | |
222 0.005446 let input_list = map(filter(split(input_str, '\\\@<! '), "v:val !~ '^[!:]'"), "substitute(v:val, '\\\\ ', ' ', 'g')") | |
888 0.002689 for source in filter(copy(unite.sources), "v:val.syntax != ''") | |
1332 0.157366 0.016151 for matcher in filter(copy(map(filter( copy(source.matchers), "type(v:val) == type('')"), 'unite#get_filters(v:val)')), "has_key(v:val, 'pattern')") | |
666 0.161265 0.007758 let patterns = map(copy(input_list), "escape(matcher.pattern(v:val), '/~')") | |
666 0.013471 silent! execute 'syntax match uniteCandidateInputKeyword' '/'.join(patterns, '\|').'/' 'containedin='.source.syntax.' contained' | |
666 0.000533 endfor | |
666 0.000381 endfor | |
222 0.000188 endfor | |
296 0.000491 syntax case match | |
FUNCTION airline#util#exec_funcrefs() | |
Called 181 times | |
Total time: 0.072160 | |
Self time: 0.005100 | |
count total (s) self (s) | |
503 0.000875 for Fn in a:list | |
503 0.069578 0.002518 let code = call(Fn, a:000) | |
503 0.000482 if code != 0 | |
181 0.000157 return code | |
endif | |
322 0.000206 endfor | |
return 0 | |
FUNCTION unite#util#is_cmdwin() | |
Called 149 times | |
Total time: 0.000737 | |
Self time: 0.000737 | |
count total (s) self (s) | |
149 0.000574 return bufname('%') ==# '[Command Line]' | |
FUNCTION unite#filters#lua_matcher() | |
Called 556 times | |
Total time: 1.726983 | |
Self time: 1.726983 | |
count total (s) self (s) | |
556 0.001568 if !has('lua') | |
return [] | |
endif | |
556 0.003284 let input = substitute(a:context.input, '\\ ', ' ', 'g') | |
556 0.002570 let input = substitute(input, '\\\(.\)', '\1', 'g') | |
556 0.000534 if a:ignorecase | |
556 0.001167 let input = tolower(input) | |
556 0.000289 endif | |
556 0.000721 lua << EOF | |
do | |
local input = vim.eval('input') | |
local candidates = vim.eval('a:candidates') | |
if (vim.eval('a:ignorecase') ~= 0) then | |
for i = #candidates-1, 0, -1 do | |
if (string.find(string.lower(candidates[i].word), input, 1, true) == nil) then | |
candidates[i] = nil | |
end | |
end | |
else | |
for i = #candidates-1, 0, -1 do | |
if (string.find(candidates[i].word, input, 1, true) == nil) then | |
candidates[i] = nil | |
end | |
end | |
end | |
end | |
EOF | |
556 0.001619 return a:candidates | |
FUNCTION <SNR>37_shellslash() | |
Called 60 times | |
Total time: 0.000664 | |
Self time: 0.000374 | |
count total (s) self (s) | |
60 0.000433 0.000143 if s:winshell() | |
return s:gsub(a:path,'\\','/') | |
else | |
60 0.000057 return a:path | |
endif | |
FUNCTION <SNR>12_SynSet() | |
Called 24 times | |
Total time: 0.067163 | |
Self time: 0.011903 | |
count total (s) self (s) | |
" clear syntax for :set syntax=OFF and any syntax name that doesn't exist | |
24 0.000740 syn clear | |
24 0.000051 if exists("b:current_syntax") | |
unlet b:current_syntax | |
endif | |
24 0.000053 let s = expand("<amatch>") | |
24 0.000036 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 | |
24 0.000024 if s != "" | |
" Load the syntax file(s). When there are several, separated by dots, | |
" load each in sequence. | |
48 0.000177 for name in split(s, '\.') | |
24 0.065607 0.010347 exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim" | |
24 0.000039 endfor | |
24 0.000014 endif | |
FUNCTION <SNR>105_is_directory_exist() | |
Called 62 times | |
Total time: 0.001430 | |
Self time: 0.001430 | |
count total (s) self (s) | |
62 0.001402 return isdirectory(a:path) && (g:neomru#directory_mru_ignore_pattern == '' || a:path !~ g:neomru#directory_mru_ignore_pattern) | |
FUNCTION airline#extensions#unite#apply() | |
Called 89 times | |
Total time: 0.002610 | |
Self time: 0.001582 | |
count total (s) self (s) | |
89 0.000381 if &ft == 'unite' | |
42 0.000416 0.000155 call a:1.add_section('airline_a', ' Unite ') | |
42 0.000316 0.000120 call a:1.add_section('airline_b', ' %{get(unite#get_context(), "buffer_name", "")} ') | |
42 0.000310 0.000123 call a:1.add_section('airline_c', ' %{unite#get_status_string()} ') | |
42 0.000297 0.000089 call a:1.split() | |
42 0.000288 0.000112 call a:1.add_section('airline_y', ' %{get(unite#get_context(), "real_buffer_name", "")} ') | |
42 0.000028 return 1 | |
endif | |
FUNCTION unite#variables#filters() | |
Called 4563 times | |
Total time: 0.596641 | |
Self time: 0.084795 | |
count total (s) self (s) | |
4563 0.004331 if a:0 == 0 | |
call unite#init#_default_scripts('filters', []) | |
else | |
4563 0.425516 0.020652 call unite#init#_default_scripts('filters', [a:1]) | |
4563 0.002427 endif | |
4563 0.126489 0.019507 let filters = unite#init#_filters() | |
4563 0.004190 if a:0 == 0 | |
return filters | |
endif | |
4563 0.009807 return get(filters, a:1, {}) | |
FUNCTION <SNR>175_skip_double_quote() | |
Called 42 times | |
Total time: 0.001739 | |
Self time: 0.001739 | |
count total (s) self (s) | |
42 0.000096 let max = len(a:script) | |
42 0.000050 let string = '' | |
42 0.000046 let i = a:i | |
" a:script[i] is always '"' when this function is called | |
42 0.000093 if i >= max || a:script[i] != '"' | |
throw 'Exception: Quote (") is not found.' | |
endif | |
42 0.000089 let string .= a:script[i] | |
42 0.000041 let i += 1 | |
42 0.000047 let ss = [] | |
42 0.000044 while i < max | |
42 0.000097 if a:script[i] == '\' && i+1 < max && a:script[i+1] == '"' | |
" Escape quote. | |
let ss += [a:script[i]] | |
let i += 1 | |
elseif a:script[i] == '"' | |
42 0.000035 break | |
endif | |
let ss += [a:script[i]] | |
let i += 1 | |
endwhile | |
42 0.000108 let string .= join(ss, '') | |
42 0.000034 if i < max | |
" must end with '"' | |
42 0.000054 if a:script[i] != '"' | |
throw 'Exception: Quote (") is not found.' | |
endif | |
42 0.000068 let string .= a:script[i] | |
42 0.000040 let i += 1 | |
42 0.000025 endif | |
42 0.000054 return [string, i] | |
FUNCTION unite#custom#get_profile() | |
Called 503 times | |
Total time: 0.014654 | |
Self time: 0.009215 | |
count total (s) self (s) | |
503 0.007222 0.001783 let custom = unite#custom#get() | |
503 0.002718 let profile_name = (a:profile_name == '' || !has_key(custom.profiles, a:profile_name)) ? 'default' : a:profile_name | |
503 0.001014 if !has_key(custom.profiles, profile_name) | |
let custom.profiles[profile_name] = { 'substitute_patterns' : {}, 'filters' : [], 'context' : {}, 'unite__save_pos' : {}, 'unite__inputs' : {}, } | |
endif | |
503 0.001243 return custom.profiles[profile_name][a:option_name] | |
FUNCTION unite#filters#converter_relative_word#lua() | |
Called 140 times | |
Total time: 2.225622 | |
Self time: 2.225251 | |
count total (s) self (s) | |
140 0.000246 let cwd = a:cwd | |
140 0.000369 if cwd != '/' && cwd[-1] != '/' | |
140 0.000264 let cwd .= '/' | |
140 0.000073 endif | |
140 0.000198 lua << EOF | |
do | |
local candidates = vim.eval('a:candidates') | |
local cwd = vim.eval('cwd') | |
local home = vim.eval('unite#util#substitute_path_separator(expand("~/"))') | |
for candidate in candidates() do | |
local path = candidate.action__path or candidate.word | |
if path:find(cwd, 1, true) == 1 then | |
candidate.word = path:sub(cwd:len() + 1) | |
elseif path:find(home, 1, true) == 1 then | |
candidate.word = path:sub(home:len() + 1) | |
end | |
end | |
end | |
EOF | |
140 0.001014 return a:candidates | |
FUNCTION vimproc#util#iconv() | |
Called 123 times | |
Total time: 0.002190 | |
Self time: 0.001662 | |
count total (s) self (s) | |
123 0.001112 0.000584 if !vimproc#util#has_iconv() || a:expr == '' || a:from == '' || a:to == '' || a:from ==# a:to | |
14 0.000011 return a:expr | |
endif | |
109 0.000655 let result = iconv(a:expr, a:from, a:to) | |
109 0.000168 return result != '' ? result : a:expr | |
FUNCTION neocomplete#helper#get_source_filetypes() | |
Called 38 times | |
Total time: 0.006356 | |
Self time: 0.002519 | |
count total (s) self (s) | |
38 0.000166 let filetype = (a:filetype == '') ? 'nothing' : a:filetype | |
38 0.000093 let filetypes = [filetype] | |
38 0.000239 if filetype =~ '\.' | |
if exists('g:neocomplete#ignore_composite_filetypes') && has_key(g:neocomplete#ignore_composite_filetypes, filetype) | |
let filetypes = [g:neocomplete#ignore_composite_filetypes[filetype]] | |
else | |
" Set composite filetype. | |
let filetypes += split(filetype, '\.') | |
endif | |
endif | |
38 0.000124 if exists('g:neocomplete#same_filetypes') | |
76 0.000189 for ft in copy(filetypes) | |
38 0.000405 let filetypes += split(get(g:neocomplete#same_filetypes, ft, get(g:neocomplete#same_filetypes, '_', '')), ',') | |
38 0.000036 endfor | |
38 0.000030 endif | |
38 0.000833 0.000175 if neocomplete#is_text_mode() | |
call add(filetypes, 'text') | |
endif | |
38 0.003371 0.000192 return neocomplete#util#uniq(filetypes) | |
FUNCTION neocomplete#util#uniq() | |
Called 55 times | |
Total time: 0.054993 | |
Self time: 0.000594 | |
count total (s) self (s) | |
55 0.054958 0.000559 return call(s:get_list().uniq, a:000) | |
FUNCTION vimproc#parser#parse_pipe() | |
Called 14 times | |
Total time: 0.051108 | |
Self time: 0.001247 | |
count total (s) self (s) | |
14 0.000020 let commands = [] | |
28 0.014039 0.000150 for cmdline in vimproc#parser#split_pipe(a:statement) | |
" Split args. | |
14 0.018691 0.000095 let cmdline = s:parse_cmdline(cmdline) | |
" Parse redirection. | |
14 0.000095 if cmdline =~ '[<>]' | |
let [fd, cmdline] = s:parse_redirection(cmdline) | |
else | |
14 0.000048 let fd = { 'stdin' : '', 'stdout' : '', 'stderr' : '' } | |
14 0.000008 endif | |
42 0.000053 for key in ['stdout', 'stderr'] | |
28 0.000068 if fd[key] == '' || fd[key] =~ '^>' | |
28 0.000031 continue | |
endif | |
if fd[key] ==# '/dev/clip' | |
" Clear. | |
let @+ = '' | |
elseif fd[key] ==# '/dev/quickfix' | |
" Clear quickfix. | |
call setqflist([]) | |
endif | |
endfor | |
14 0.017529 0.000153 call add(commands, { 'args' : vimproc#parser#split_args(cmdline), 'fd' : fd}) | |
14 0.000006 endfor | |
14 0.000012 return commands | |
FUNCTION neocomplete#helper#ftdictionary2list() | |
Called 38 times | |
Total time: 0.007277 | |
Self time: 0.000574 | |
count total (s) self (s) | |
38 0.007247 0.000544 return map(filter(neocomplete#get_source_filetypes(a:filetype), 'has_key(a:dictionary, v:val)'), 'a:dictionary[v:val]') | |
FUNCTION unite#util#strwidthpart_reverse() | |
Called 75 times | |
Total time: 0.049795 | |
Self time: 0.000529 | |
count total (s) self (s) | |
75 0.049756 0.000490 return call(s:get_prelude().strwidthpart_reverse, a:000) | |
FUNCTION <SNR>126_all_exit() | |
Called 3 times | |
Total time: 0.235714 | |
Self time: 0.000038 | |
count total (s) self (s) | |
3 0.235707 0.000031 call unite#all_quit_session() | |
FUNCTION <SNR>107__create_hash() | |
Called 11 times | |
Total time: 0.000365 | |
Self time: 0.000365 | |
count total (s) self (s) | |
11 0.000041 if len(a:dir) + len(a:str) < 150 | |
11 0.000165 let hash = substitute(substitute( a:str, ':', '=-', 'g'), '[/\\]', '=+', 'g') | |
11 0.000013 elseif exists('*sha256') | |
let hash = sha256(a:str) | |
else | |
" Use simple hash. | |
let sum = 0 | |
for i in range(len(a:str)) | |
let sum += char2nr(a:str[i]) * (i + 1) | |
endfor | |
let hash = printf('%x', sum) | |
endif | |
11 0.000012 return hash | |
FUNCTION airline#check_mode() | |
Called 543 times | |
Total time: 0.522150 | |
Self time: 0.040139 | |
count total (s) self (s) | |
543 0.002495 let context = s:contexts[a:winnr] | |
543 0.001961 if get(w:, 'airline_active', 1) | |
343 0.001150 let l:m = mode() | |
343 0.000719 if l:m ==# "i" | |
226 0.000580 let l:mode = ['insert'] | |
226 0.000307 elseif l:m ==# "R" | |
let l:mode = ['replace'] | |
elseif l:m =~# '\v(v|V||s|S|)' | |
let l:mode = ['visual'] | |
else | |
117 0.000354 let l:mode = ['normal'] | |
117 0.000103 endif | |
343 0.002061 let w:airline_current_mode = get(g:airline_mode_map, l:m, l:m) | |
343 0.000267 else | |
200 0.000372 let l:mode = ['inactive'] | |
200 0.000806 let w:airline_current_mode = get(g:airline_mode_map, '__') | |
200 0.000138 endif | |
543 0.001806 if g:airline_detect_modified && &modified | |
4 0.000063 call add(l:mode, 'modified') | |
4 0.000004 endif | |
543 0.000910 if g:airline_detect_paste && &paste | |
call add(l:mode, 'paste') | |
endif | |
543 0.000890 if &readonly || ! &modifiable | |
16 0.000165 call add(l:mode, 'readonly') | |
16 0.000035 endif | |
543 0.002221 let mode_string = join(l:mode) | |
543 0.002094 if get(w:, 'airline_lastmode', '') != mode_string | |
54 0.006298 0.000471 call airline#highlighter#highlight_modified_inactive(context.bufnr) | |
54 0.476683 0.000499 call airline#highlighter#highlight(l:mode) | |
54 0.000148 let w:airline_lastmode = mode_string | |
54 0.000029 endif | |
543 0.000532 return '' | |
FUNCTION unite#filters#matcher_glob#glob_matcher() | |
Called 447 times | |
Total time: 1.850704 | |
Self time: 0.024829 | |
count total (s) self (s) | |
447 0.015999 0.003749 let input = substitute(unite#util#expand(a:input), '\\ ', ' ', 'g') | |
447 0.001005 if input =~ '^!' | |
if input == '!' | |
return a:candidates | |
endif | |
" Exclusion. | |
let input = substitute(unite#util#escape_match(input), '\\\@<!|', '\\|', 'g') | |
let expr = 'v:val.word !~ ' . string(input[1:]) | |
elseif input =~ '^:' | |
" Executes command. | |
let a:context.execute_command = input[1:] | |
return a:candidates | |
elseif input =~ '\\\@<![*|]' | |
" Wildcard(*) or OR(|). | |
let input = s:matcher.pattern(input) | |
let expr = 'v:val.word =~ ' . string(input) | |
elseif unite#util#has_lua() | |
447 0.000629 let expr = 'if_lua' | |
447 0.000833 let a:context.input = input | |
447 0.000250 else | |
let input = substitute(input, '\\\(.\)', '\1', 'g') | |
let expr = &ignorecase ? printf('stridx(tolower(v:val.word), %s) != -1', string(tolower(input))) : printf('stridx(v:val.word, %s) != -1', string(input)) | |
endif | |
447 1.805897 0.003687 return unite#filters#filter_matcher(a:candidates, expr, a:context) | |
FUNCTION <SNR>37_repo() | |
Called 22 times | |
Total time: 0.000847 | |
Self time: 0.000847 | |
count total (s) self (s) | |
22 0.000190 let dir = a:0 ? a:1 : (exists('b:git_dir') && b:git_dir !=# '' ? b:git_dir : fugitive#extract_git_dir(expand('%:p'))) | |
22 0.000031 if dir !=# '' | |
22 0.000069 if has_key(s:repos, dir) | |
21 0.000065 let repo = get(s:repos, dir) | |
21 0.000018 else | |
1 0.000004 let repo = {'git_dir': dir} | |
1 0.000004 let s:repos[dir] = repo | |
1 0.000001 endif | |
22 0.000344 return extend(extend(repo, s:repo_prototype, 'keep'), s:abstract_prototype, 'keep') | |
endif | |
call s:throw('not a git repository: '.expand('%:p')) | |
FUNCTION unite#util#is_sudo() | |
Called 10 times | |
Total time: 0.000045 | |
Self time: 0.000045 | |
count total (s) self (s) | |
10 0.000032 return $SUDO_USER != '' && $USER !=# $SUDO_USER && $HOME !=# expand('~'.$USER) && $HOME ==# expand('~'.$SUDO_USER) | |
FUNCTION <SNR>118_iconv() | |
Called 194298 times | |
Total time: 1.756623 | |
Self time: 1.756623 | |
count total (s) self (s) | |
194298 0.423129 if a:from == '' || a:to == '' || a:from ==? a:to | |
return a:expr | |
endif | |
194298 0.831094 let result = iconv(a:expr, a:from, a:to) | |
194298 0.239373 return result != '' ? result : a:expr | |
FUNCTION <SNR>175_parse_tilde() | |
Called 14 times | |
Total time: 0.018028 | |
Self time: 0.005793 | |
count total (s) self (s) | |
14 0.000017 let script = '' | |
14 0.000009 let i = 0 | |
14 0.000024 let max = len(a:script) | |
420 0.000298 while i < max | |
406 0.000675 if a:script[i] == ' ' && a:script[i+1] == '~' | |
" Tilde. | |
" Expand home directory. | |
let script .= ' ' . escape(substitute($HOME, '\\', '/', 'g'), '\ ') | |
let i += 2 | |
elseif i == 0 && a:script[i] == '~' | |
" Tilde. | |
" Expand home directory. | |
let script .= escape(substitute($HOME, '\\', '/', 'g'), '\ ') | |
let i += 1 | |
else | |
406 0.013764 0.001529 let [script, i] = s:skip_else(script, a:script, i) | |
406 0.000170 endif | |
406 0.000155 endwhile | |
14 0.000010 return script | |
FUNCTION airline#util#append() | |
Called 351 times | |
Total time: 0.004102 | |
Self time: 0.004102 | |
count total (s) self (s) | |
351 0.000798 if a:minwidth > 0 && winwidth(0) < a:minwidth | |
return '' | |
endif | |
351 0.001405 let prefix = s:spc == "\ua0" ? s:spc : s:spc.s:spc | |
351 0.001077 return empty(a:text) ? '' : prefix.g:airline_left_alt_sep.s:spc.a:text | |
FUNCTION <SNR>175_parse_single_quote() | |
Called 14 times | |
Total time: 0.003182 | |
Self time: 0.003182 | |
count total (s) self (s) | |
14 0.000027 if a:script[a:i] != "'" | |
return ['', a:i] | |
endif | |
14 0.000016 let arg = '' | |
14 0.000026 let i = a:i + 1 | |
14 0.000021 let max = len(a:script) | |
350 0.000220 while i < max | |
350 0.000375 if a:script[i] == "'" | |
14 0.000018 if i+1 < max && a:script[i+1] == "'" | |
" Escape quote. | |
let arg .= "'" | |
let i += 2 | |
else | |
" Quote end. | |
14 0.000019 return [arg, i+1] | |
endif | |
else | |
336 0.000465 let arg .= a:script[i] | |
336 0.000254 let i += 1 | |
336 0.000116 endif | |
336 0.000127 endwhile | |
throw 'Exception: Quote ('') is not found.' | |
FUNCTION <SNR>158_exists_current_source() | |
Called 17 times | |
Total time: 0.000651 | |
Self time: 0.000172 | |
count total (s) self (s) | |
17 0.000628 0.000149 return has_key(s:buffer_sources, bufnr('%')) && !s:check_changed_buffer(bufnr('%')) | |
FUNCTION neocomplete#get_current_neocomplete() | |
Called 958 times | |
Total time: 0.007831 | |
Self time: 0.007831 | |
count total (s) self (s) | |
958 0.002911 if !exists('b:neocomplete') | |
call neocomplete#init#_current_neocomplete() | |
endif | |
958 0.001143 return b:neocomplete | |
FUNCTION vimproc#plineopen3() | |
Called 14 times | |
Total time: 0.126806 | |
Self time: 0.000541 | |
count total (s) self (s) | |
14 0.000060 let commands = type(a:commands) == type('') ? vimproc#parser#parse_pipe(a:commands) : a:commands | |
14 0.000024 let is_pty = get(a:000, 0, 0) | |
14 0.126671 0.000406 return s:plineopen(3, commands, is_pty) | |
FUNCTION <SNR>165_make_cache_lines() | |
Called 19 times | |
Total time: 0.000183 | |
Self time: 0.000183 | |
count total (s) self (s) | |
19 0.000047 let filetype = a:filetype | |
19 0.000087 if get(g:neocomplete#sources#member#prefix_patterns, filetype, '') == '' | |
19 0.000011 return | |
endif | |
if !has_key(s:member_sources, a:srcname) | |
call s:initialize_source(a:srcname, filetype) | |
endif | |
let source = s:member_sources[a:srcname] | |
let member_pattern = s:get_member_pattern(filetype) | |
let prefix_pattern = member_pattern . '\m\%(' . g:neocomplete#sources#member#prefix_patterns[filetype] . '\m\)' | |
let keyword_pattern = prefix_pattern . member_pattern | |
" Cache member pattern. | |
for line in a:lines | |
let match = match(line, keyword_pattern) | |
while match >= 0 "{{{ | |
let match_str = matchstr(line, '^'.keyword_pattern, match) | |
" Next match. | |
let match = matchend(line, prefix_pattern, match) | |
let member_name = matchstr(match_str, member_pattern . '$') | |
if member_name == '' | |
continue | |
endif | |
let var_name = match_str[ : -len(member_name)-1] | |
if !has_key(source.member_cache, var_name) | |
let source.member_cache[var_name] = {} | |
endif | |
if !has_key(source.member_cache[var_name], member_name) | |
let source.member_cache[var_name][member_name] = 1 | |
endif | |
let match_str = matchstr(var_name, '^'.keyword_pattern) | |
endwhile"}}} | |
endfor | |
FUNCTION vimproc#kill() | |
Called 19 times | |
Total time: 0.004460 | |
Self time: 0.000697 | |
count total (s) self (s) | |
19 0.000062 if a:sig == 0 && vimproc#util#is_windows() | |
" Use waitpid(). | |
let cond = s:waitpid(a:pid)[0] | |
return cond ==# 'run' | |
endif | |
19 0.000018 try | |
19 0.003898 0.000135 let [ret] = s:libcall('vp_kill', [a:pid, a:sig]) | |
4 0.000002 catch | |
15 0.000049 let s:last_errmsg = v:exception | |
15 0.000030 return 1 | |
endtry | |
4 0.000004 return ret | |
FUNCTION <SNR>171_check_in_do_auto_complete() | |
Called 296 times | |
Total time: 0.020817 | |
Self time: 0.007168 | |
count total (s) self (s) | |
296 0.014791 0.001142 if neocomplete#is_locked() | |
return 1 | |
endif | |
296 0.000532 if &l:completefunc == '' | |
let &l:completefunc = 'neocomplete#complete#manual_complete' | |
endif | |
" Detect completefunc. | |
296 0.001678 if &l:completefunc !~# '^neocomplete#' | |
296 0.001357 if &l:buftype =~ 'nofile' | |
296 0.000314 return 1 | |
endif | |
if g:neocomplete#force_overwrite_completefunc | |
" Set completefunc. | |
let &l:completefunc = 'neocomplete#complete#manual_complete' | |
else | |
" Warning. | |
redir => output | |
99verbose setl completefunc? | |
redir END | |
call neocomplete#print_error(output) | |
call neocomplete#print_error( 'Another plugin set completefunc! Disabled neocomplete.') | |
NeoCompleteLock | |
return 1 | |
endif | |
endif | |
" Detect AutoComplPop. | |
if exists('g:acp_enableAtStartup') && g:acp_enableAtStartup | |
call neocomplete#print_error( 'Detected enabled AutoComplPop! Disabled neocomplete.') | |
NeoCompleteLock | |
return 1 | |
endif | |
FUNCTION unite#init#_unite_buffer() | |
Called 14 times | |
Total time: 0.250403 | |
Self time: 0.012640 | |
count total (s) self (s) | |
14 0.000132 0.000061 let current_unite = unite#variables#current_unite() | |
14 0.000169 let is_bufexists = bufexists(current_unite.real_buffer_name) | |
14 0.000037 let current_unite.context.real_buffer_name = current_unite.real_buffer_name | |
14 0.000019 let context = current_unite.context | |
14 0.000024 if !context.temporary && context.tab | |
tabnew | |
endif | |
14 0.115871 0.000085 call unite#view#_switch_unite_buffer( current_unite.buffer_name, context) | |
14 0.001662 let b:unite = current_unite | |
14 0.000543 0.000315 let unite = unite#get_current_unite() | |
14 0.000062 let unite.bufnr = bufnr('%') | |
14 0.000031 let unite.prev_line = line('.') | |
" Note: If unite buffer initialize is incomplete, &modified or &modifiable. | |
14 0.000026 if !is_bufexists || &modified || &modifiable | |
" Basic settings. | |
12 0.000051 setlocal bufhidden=hide | |
12 0.000024 setlocal buftype=nofile | |
12 0.000018 setlocal nolist | |
12 0.000012 setlocal nobuflisted | |
12 0.000021 if has('cursorbind') | |
12 0.000016 setlocal nocursorbind | |
12 0.000005 endif | |
12 0.000008 setlocal noscrollbind | |
12 0.000016 setlocal noswapfile | |
12 0.000013 setlocal nospell | |
12 0.000012 setlocal noreadonly | |
12 0.000012 setlocal nofoldenable | |
12 0.000013 setlocal nomodeline | |
12 0.000009 setlocal nonumber | |
12 0.000027 setlocal foldcolumn=0 | |
12 0.000306 setlocal iskeyword+=-,+,\\,!,~ | |
12 0.000023 setlocal matchpairs-=<:> | |
12 0.000019 setlocal completefunc=unite#dummy_completefunc | |
12 0.000018 setlocal omnifunc= | |
12 0.000009 match | |
12 0.000021 if has('conceal') | |
12 0.000014 setlocal conceallevel=3 | |
12 0.000015 setlocal concealcursor=n | |
12 0.000006 endif | |
12 0.000018 if exists('+cursorcolumn') | |
12 0.000012 setlocal nocursorcolumn | |
12 0.000005 endif | |
12 0.000012 if exists('+colorcolumn') | |
12 0.000018 setlocal colorcolumn=0 | |
12 0.000003 endif | |
12 0.000012 if exists('+relativenumber') | |
12 0.000011 setlocal norelativenumber | |
12 0.000004 endif | |
" Autocommands. | |
12 0.000024 augroup plugin-unite | |
12 0.008072 autocmd! * <buffer> | |
12 0.000055 autocmd InsertEnter <buffer> call unite#handlers#_on_insert_enter() | |
12 0.000029 autocmd InsertLeave <buffer> call unite#handlers#_on_insert_leave() | |
12 0.000029 autocmd CursorHoldI <buffer> call unite#handlers#_on_cursor_hold_i() | |
12 0.000027 autocmd CursorMovedI <buffer> call unite#handlers#_on_cursor_moved_i() | |
12 0.000053 autocmd CursorMoved,CursorMovedI <buffer> nested call unite#handlers#_on_cursor_moved() | |
12 0.000039 autocmd BufUnload,BufHidden <buffer> call unite#handlers#_on_buf_unload(expand('<afile>')) | |
12 0.000054 autocmd WinEnter,BufWinEnter <buffer> call unite#handlers#_on_bufwin_enter(bufnr(expand('<abuf>'))) | |
12 0.000042 autocmd WinLeave,BufWinLeave <buffer> call unite#handlers#_restore_updatetime() | |
12 0.000009 augroup END | |
12 0.000027 if v:version > 703 || v:version == 703 && has('patch418') | |
" Enable auto narrow feature. | |
12 0.000036 autocmd plugin-unite InsertCharPre <buffer> call unite#handlers#_on_insert_char_pre() | |
12 0.000008 endif | |
12 0.000013 if v:version > 703 || v:version == 703 && has('patch867') | |
" Enable auto narrow feature. | |
12 0.000047 autocmd plugin-unite TextChanged <buffer> call unite#handlers#_on_text_changed() | |
12 0.000005 endif | |
12 0.000006 endif | |
14 0.000016 if context.wipe | |
setlocal bufhidden=wipe | |
endif | |
14 0.031206 0.000067 call unite#mappings#define_default_mappings() | |
14 0.000039 let &l:wrap = context.wrap | |
14 0.000023 if exists('&redrawtime') | |
" Save redrawtime | |
14 0.000058 let unite.redrawtime_save = &redrawtime | |
14 0.000023 let &redrawtime = 100 | |
14 0.000008 endif | |
14 0.000387 0.000039 call unite#handlers#_save_updatetime() | |
" User's initialization. | |
14 0.000024 setlocal nomodifiable | |
14 0.000025 set sidescrolloff=0 | |
14 0.000018 setlocal nocursorline | |
14 0.090258 0.000067 setfiletype unite | |
FUNCTION <SNR>109_clear_previewed_buffer_list() | |
Called 14 times | |
Total time: 0.000362 | |
Self time: 0.000227 | |
count total (s) self (s) | |
14 0.000189 0.000054 let unite = unite#get_current_unite() | |
14 0.000027 for bufnr in unite.previewed_buffer_list | |
if buflisted(bufnr) | |
if bufnr == bufnr('%') | |
call unite#util#alternate_buffer() | |
endif | |
silent execute 'bdelete!' bufnr | |
endif | |
endfor | |
14 0.000025 let unite.previewed_buffer_list = [] | |
FUNCTION unite#view#_redraw_candidates() | |
Called 140 times | |
Total time: 1.124022 | |
Self time: 0.012212 | |
count total (s) self (s) | |
140 0.000391 let is_gather_all = get(a:000, 0, 0) | |
140 0.005344 0.000399 call unite#view#_resize_window() | |
140 0.001133 0.000338 let unite = unite#get_current_unite() | |
140 0.000166 let context = unite.context | |
140 0.180948 0.000549 let candidates = unite#candidates#gather(is_gather_all) | |
140 0.000150 if context.prompt_direction ==# 'below' | |
let unite.init_prompt_linenr = len(candidates) + 1 | |
endif | |
140 0.000306 let pos = getpos('.') | |
140 0.000282 let modifiable_save = &l:modifiable | |
140 0.000135 try | |
140 0.000392 setlocal modifiable | |
140 0.000180 if context.prompt_direction !=# 'below' | |
140 0.012479 0.000665 call unite#view#_redraw_prompt() | |
140 0.000063 endif | |
140 0.709033 0.001468 call unite#view#_set_candidates_lines( unite#view#_convert_lines(candidates)) | |
140 0.000278 if context.prompt_direction ==# 'below' && unite.prompt_linenr != 0 | |
if empty(candidates) | |
let unite.prompt_linenr = 1 | |
else | |
call append(unite.prompt_linenr, '') | |
let unite.prompt_linenr += 1 | |
endif | |
call unite#view#_redraw_prompt() | |
endif | |
140 0.000960 let unite.current_candidates = candidates | |
140 0.000068 finally | |
140 0.000223 let &l:modifiable = l:modifiable_save | |
140 0.000319 if pos != getpos('.') | |
call setpos('.', pos) | |
endif | |
140 0.000069 endtry | |
140 0.000326 if context.input == '' && context.log || context.prompt_direction ==# 'below' | |
" Move to bottom. | |
call cursor(line('$'), 0) | |
endif | |
140 0.000200 if context.prompt_direction ==# 'below' && mode() ==# 'i' | |
call unite#view#_bottom_cursor() | |
endif | |
" Set syntax. | |
140 0.207313 0.001021 call s:set_syntax() | |
FUNCTION airline#themes#get_highlight() | |
Called 4350 times | |
Total time: 0.367400 | |
Self time: 0.026009 | |
count total (s) self (s) | |
4350 0.366032 0.024641 return call('airline#highlighter#get_highlight', [a:group] + a:000) | |
FUNCTION unite#custom#get() | |
Called 1038 times | |
Total time: 0.011092 | |
Self time: 0.011092 | |
count total (s) self (s) | |
1038 0.002468 if !exists('s:custom') | |
let s:custom = {} | |
let s:custom.sources = {} | |
let s:custom.sources._ = {} | |
let s:custom.actions = {} | |
let s:custom.default_actions = {} | |
let s:custom.aliases = {} | |
let s:custom.profiles = {} | |
endif | |
1038 0.001010 return s:custom | |
FUNCTION unite#filters#sorter_rank#_sort() | |
Called 241 times | |
Total time: 0.296062 | |
Self time: 0.157580 | |
count total (s) self (s) | |
" Initialize. | |
241 0.000899 let is_path = has_key(a:candidates[0], 'action__path') | |
30399 0.017683 for candidate in a:candidates | |
30158 0.029378 let candidate.filter__rank = 0 | |
30158 0.081007 let candidate.filter__word = is_path ? fnamemodify(candidate.word, ':t') : candidate.word | |
30158 0.011467 endfor | |
241 0.005296 let inputs = map(split(a:input, '\\\@<! '), " tolower(substitute(substitute(v:val, '\\\\ ', ' ', 'g'), '\\*', '', 'g'))") | |
241 0.140471 0.001989 let candidates = a:has_lua ? s:sort_lua(a:candidates, inputs) : s:sort_vim(a:candidates, inputs) | |
" let candidates = s:sort_vim(a:candidates, inputs) | |
" echomsg a:input | |
" echomsg string(map(copy(candidates), | |
" \ '[v:val.word, v:val.filter__rank]')) | |
241 0.000244 return candidates | |
FUNCTION <SNR>91_getfullname() | |
Called 36 times | |
Total time: 0.000677 | |
Self time: 0.000677 | |
count total (s) self (s) | |
36 0.000063 let f = a:f | |
36 0.000169 let f = f=~"'." ? s:getmarkfile(f[1]) : f | |
36 0.000115 let f = len(f) ? f : expand('%') | |
36 0.000286 return fnamemodify(f, ':p') | |
FUNCTION <SNR>115_sort_lua() | |
Called 241 times | |
Total time: 0.138482 | |
Self time: 0.138482 | |
count total (s) self (s) | |
241 0.000327 lua << EOF | |
do | |
local candidates = vim.eval('a:candidates') | |
-- Calc rank | |
local inputs = vim.eval('a:inputs') | |
for i = 0, #inputs-1 do | |
for j = 0, #candidates-1 do | |
local word = string.lower(candidates[j].filter__word) | |
local index = string.find(word, inputs[i], 1, true) | |
candidates[j].filter__rank = candidates[j].filter__rank | |
+ string.len(word) - (index ~= nil | |
and ((200 - string.len(word)) / (index+1)) * 10 or 0) | |
end | |
end | |
-- Sort | |
local t = {} | |
for i = 1, #candidates do | |
t[i] = candidates[i-1] | |
end | |
table.sort(t, function(a, b) | |
return a.filter__rank < b.filter__rank | |
end) | |
for i = 0, #candidates-1 do | |
candidates[i] = t[i+1] | |
end | |
end | |
EOF | |
241 0.000470 return a:candidates | |
FUNCTION unite#get_kinds() | |
Called 90 times | |
Total time: 0.019659 | |
Self time: 0.000623 | |
count total (s) self (s) | |
90 0.019613 0.000577 return call('unite#variables#kinds', a:000) | |
FUNCTION unite#util#alternate_buffer() | |
Called 14 times | |
Total time: 0.651420 | |
Self time: 0.002245 | |
count total (s) self (s) | |
14 0.000133 0.000041 let unite = unite#get_current_unite() | |
14 0.000235 0.000065 if s:buflisted(unite.prev_bufnr) | |
14 0.651017 0.002104 execute 'buffer' unite.prev_bufnr | |
14 0.000012 return | |
endif | |
let listed_buffer_len = len(filter(range(1, bufnr('$')), 's:buflisted(v:val) && getbufvar(v:val, "&filetype") !=# "unite"')) | |
if listed_buffer_len <= 1 | |
enew | |
return | |
endif | |
let cnt = 0 | |
let pos = 1 | |
let current = 0 | |
while pos <= bufnr('$') | |
if s:buflisted(pos) | |
if pos == bufnr('%') | |
let current = cnt | |
endif | |
let cnt += 1 | |
endif | |
let pos += 1 | |
endwhile | |
if current > cnt / 2 | |
bprevious | |
else | |
bnext | |
endif | |
FUNCTION unite#helper#convert_source_name() | |
Called 9054 times | |
Total time: 0.118194 | |
Self time: 0.064138 | |
count total (s) self (s) | |
9054 0.078273 0.024217 let unite = unite#get_current_unite() | |
9054 0.035430 return (len(unite.sources) == 1 || !unite.context.short_source_names) ? a:source_name : a:source_name !~ '\A' ? a:source_name[:1] : substitute(a:source_name, '\a\zs\a\+', '', 'g') | |
FUNCTION unite#init#_loaded_sources() | |
Called 14 times | |
Total time: 0.038418 | |
Self time: 0.004890 | |
count total (s) self (s) | |
14 0.033405 0.000190 let all_sources = unite#init#_sources( unite#helper#get_source_names(a:sources)) | |
14 0.000020 let sources = [] | |
14 0.000018 let number = 0 | |
56 0.000499 0.000186 for [source, args] in unite#helper#get_source_args(a:sources) | |
42 0.000104 if type(source) == type('') | |
42 0.000065 let source_name = source | |
42 0.000043 unlet source | |
42 0.000091 if !has_key(all_sources, source_name) | |
if a:context.unite__is_vimfiler || a:context.unite__is_complete | |
" Ignore error. | |
continue | |
endif | |
if source_name =~ '^-' | |
call unite#util#print_error( 'unite.vim: Invalid option "' . source_name . '" is detected.') | |
throw 'unite.vim: Invalid option' | |
else | |
call unite#util#print_error( 'unite.vim: Invalid source name "' . source_name . '" is detected.') | |
if source_name ==# 'file_mru' || source_name ==# 'directory_mru' | |
call unite#util#print_error( 'To use MRU features, you must install neomru from ' . 'https://github.com/Shougo/neomru.vim.') | |
endif | |
throw 'unite.vim: Invalid source' | |
endif | |
endif | |
42 0.000722 let source = deepcopy(all_sources[source_name]) | |
42 0.000030 else | |
" Use source dictionary. | |
call unite#init#_sources(source) | |
endif | |
42 0.000064 let source.args = args | |
42 0.000074 let source.unite__is_invalidate = 1 | |
42 0.001030 let source.unite__context = deepcopy(a:context) | |
42 0.000125 let source.unite__context.is_async = has_key(source, 'async_gather_candidates') | |
42 0.000074 let source.unite__context.source = source | |
42 0.000058 let source.unite__candidates = [] | |
42 0.000060 let source.unite__cached_candidates = [] | |
42 0.000069 let source.unite__cached_change_candidates = [] | |
42 0.000061 let source.unite__number = number | |
42 0.000059 let number += 1 | |
42 0.000159 call add(sources, source) | |
42 0.000036 unlet source | |
42 0.000028 endfor | |
14 0.000016 return sources | |
FUNCTION <SNR>21_LoadIndent() | |
Called 24 times | |
Total time: 0.004658 | |
Self time: 0.004233 | |
count total (s) self (s) | |
24 0.000086 if exists("b:undo_indent") | |
exe b:undo_indent | |
unlet! b:undo_indent b:did_indent | |
endif | |
24 0.000070 let s = expand("<amatch>") | |
24 0.000035 if s != "" | |
24 0.000039 if exists("b:did_indent") | |
unlet b:did_indent | |
endif | |
" When there is a dot it is used to separate filetype names. Thus for | |
" "aaa.bbb" load "indent/aaa.vim" and then "indent/bbb.vim". | |
48 0.000144 for name in split(s, '\.') | |
24 0.004012 0.003587 exe 'runtime! indent/' . name . '.vim' | |
24 0.000030 endfor | |
24 0.000011 endif | |
FUNCTION <SNR>176_which() | |
Called 14 times | |
Total time: 0.000274 | |
Self time: 0.000274 | |
count total (s) self (s) | |
14 0.000058 let maxcount = (a:0 >= 2 && type(a:2) == type(0)) ? a:2 : 1 | |
14 0.000037 if maxcount == 1 && exists('*exepath') | |
14 0.000086 let full = exepath(a:command) | |
14 0.000033 if s:is_windows && (full =~? '\.lnk$') && (getftype(full) ==# 'file') | |
return resolve(full) | |
endif | |
14 0.000014 return full | |
endif | |
let pathlist = a:command =~# s:path_sep_pattern ? [''] : !a:0 ? split($PATH, s:path_separator) : type(a:1) == type([]) ? copy(a:1) : split(a:1, s:path_separator) | |
let pathlist = vimproc#util#uniq(pathlist) | |
let pathext = s:path_extensions() | |
if index(pathext, '.' . tolower(fnamemodify(a:command, ':e'))) != -1 | |
let pathext = [''] | |
endif | |
let dirsep = s:separator() | |
let cmdlist = [] | |
for dir in pathlist | |
let head = dir ==# '' ? '' : dir . dirsep | |
for ext in pathext | |
let full = fnamemodify(head . a:command . ext, ':p') | |
if s:is_windows && (full =~? '\.lnk$') && (getftype(full) ==# 'file') | |
let full = resolve(full) | |
endif | |
if executable(full) | |
if s:is_case_tolerant() | |
let full = glob(substitute( vimproc#util#substitute_path_separator( toupper(full)), '\u:\@!', '[\0\L\0]', 'g'), 1) | |
endif | |
if full != '' | |
let cmdlist += [full] | |
if maxcount > 0 && len(cmdlist) >= maxcount | |
return join(cmdlist, "\n") | |
endif | |
endif | |
endif | |
endfor | |
endfor | |
return join(cmdlist, "\n") | |
FUNCTION unite#action#do() | |
Called 11 times | |
Total time: 4.133491 | |
Self time: 0.002985 | |
count total (s) self (s) | |
11 0.000071 if &filetype == 'vimfiler' && has_key(b:vimfiler, 'unite') | |
" Restore unite condition in vimfiler. | |
call unite#set_current_unite(b:vimfiler.unite) | |
endif | |
11 1.240543 0.000062 call unite#redraw() | |
11 0.001436 0.000092 let candidates = get(a:000, 0, unite#helper#get_marked_candidates()) | |
11 0.000044 let new_context = get(a:000, 1, {}) | |
11 0.000027 let sources = get(a:000, 2, {}) | |
11 0.000148 0.000050 let unite = unite#get_current_unite() | |
11 0.000025 if empty(candidates) | |
11 0.000629 0.000065 if empty(unite#helper#get_current_candidate()) | |
" Ignore. | |
return [] | |
endif | |
11 0.000605 0.000059 let candidates = [ unite#helper#get_current_candidate() ] | |
11 0.000008 endif | |
11 0.000138 let candidates = filter(copy(candidates), "!empty(v:val) && !get(v:val, 'is_dummy', 0)") | |
11 0.000023 if empty(candidates) | |
return [] | |
endif | |
11 0.140461 0.000198 let action_tables = s:get_candidates_action_table( a:action_name, candidates, sources) | |
11 0.000017 let old_context = {} | |
11 0.000020 if !empty(new_context) | |
" Set new context. | |
let new_context = extend( deepcopy(unite#get_context()), new_context) | |
let old_context = unite#set_context(new_context) | |
let unite = unite#get_current_unite() | |
endif | |
" Execute action. | |
11 0.000014 let is_quit = 0 | |
11 0.000014 let is_redraw = 0 | |
11 0.000013 let _ = [] | |
22 0.000032 for table in action_tables | |
11 0.001064 0.000085 if a:action_name !=# 'preview' && !empty(unite#helper#get_marked_candidates()) | |
call s:clear_marks(candidates) | |
call unite#force_redraw() | |
let is_redraw = 0 | |
endif | |
" Check quit flag. | |
11 0.000050 if table.action.is_quit && unite.profile_name !=# 'action' && !table.action.is_start && !(table.action.is_tab && !unite.context.quit) | |
11 1.639031 0.000076 call unite#all_quit_session(0) | |
11 0.000035 let is_quit = 1 | |
11 0.000017 endif | |
11 0.000017 try | |
11 1.107428 0.000152 call add(_, table.action.func(table.candidates)) | |
11 0.000016 catch /^Vim\%((\a\+)\)\=:E325/ | |
let save_shortmess = &shortmess | |
try | |
set shortmess+=A " Ignore 'SwapExists' and try again. | |
call add(_, table.action.func(table.candidates)) | |
finally | |
let &shortmess = save_shortmess | |
endtry | |
catch | |
call unite#print_error(v:throwpoint) | |
call unite#print_error(v:exception) | |
call unite#print_error( 'Error occurred while executing "'.table.action.name.'" action!') | |
endtry | |
" Executes command. | |
11 0.000031 if unite.context.execute_command != '' | |
execute unite.context.execute_command | |
endif | |
" Check invalidate cache flag. | |
11 0.000017 if table.action.is_invalidate_cache | |
for source_name in table.source_names | |
call unite#helper#invalidate_cache(source_name) | |
endfor | |
let is_redraw = 1 | |
endif | |
11 0.000007 endfor | |
11 0.000023 if (!is_quit || !unite.context.quit) && unite.context.keep_focus | |
let winnr = bufwinnr(unite.bufnr) | |
if winnr > 0 | |
" Restore focus. | |
execute winnr 'wincmd w' | |
endif | |
endif | |
11 0.000018 if !empty(new_context) | |
" Restore context. | |
let unite.context = old_context | |
endif | |
11 0.000029 if is_redraw && !empty(filter(range(1, winnr('$')), "getwinvar(v:val, '&filetype') ==# 'vimfiler'")) | |
" Redraw vimfiler buffer. | |
call vimfiler#force_redraw_all_vimfiler(1) | |
endif | |
11 0.000010 if !is_quit && is_redraw | |
call s:clear_marks(candidates) | |
call unite#force_redraw() | |
endif | |
11 0.000011 return _ | |
FUNCTION projectroot#guess() | |
Called 36 times | |
Total time: 0.006566 | |
Self time: 0.000322 | |
count total (s) self (s) | |
36 0.006433 0.000189 let projroot = projectroot#get(a:0 ? a:1 : '') | |
36 0.000058 if len(projroot) | |
36 0.000032 return projroot | |
endif | |
" Not found: return parent directory of current file / file itself. | |
let fullfile = s:getfullname(a:0 ? a:1 : '') | |
return !isdirectory(fullfile) ? fnamemodify(fullfile, ':h') : fullfile | |
FUNCTION <SNR>28_is_windows() | |
Called 1178 times | |
Total time: 0.002220 | |
Self time: 0.002220 | |
count total (s) self (s) | |
1178 0.001400 return s:is_windows | |
FUNCTION <SNR>18_BMTruncName() | |
Called 10 times | |
Total time: 0.000245 | |
Self time: 0.000245 | |
count total (s) self (s) | |
10 0.000019 let name = a:fname | |
10 0.000017 if g:bmenu_max_pathlen < 5 | |
let name = "" | |
else | |
10 0.000024 let len = strlen(name) | |
10 0.000013 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 | |
10 0.000005 endif | |
10 0.000011 return name | |
FUNCTION <SNR>25_get_process() | |
Called 194312 times | |
Total time: 0.859512 | |
Self time: 0.859512 | |
count total (s) self (s) | |
194312 0.334112 if !exists('s:Process') | |
let s:Process = unite#util#get_vital().import('Process') | |
endif | |
194312 0.125874 return s:Process | |
FUNCTION unite#view#_switch_unite_buffer() | |
Called 14 times | |
Total time: 0.115786 | |
Self time: 0.001652 | |
count total (s) self (s) | |
" Search unite window. | |
14 0.000472 0.000065 let winnr = unite#helper#get_unite_winnr(a:buffer_name) | |
14 0.000019 if a:context.split && winnr > 0 | |
silent execute winnr 'wincmd w' | |
return | |
endif | |
" Search unite buffer. | |
14 0.000673 0.000060 let bufnr = unite#helper#get_unite_bufnr(a:buffer_name) | |
14 0.000021 if a:context.split && !a:context.unite__direct_switch | |
" Split window. | |
noautocmd execute a:context.direction ((bufnr > 0) ? ((a:context.vertical) ? 'vsplit' : 'split') : ((a:context.vertical) ? 'vnew' : 'new')) | |
endif | |
14 0.000012 if bufnr > 0 | |
14 0.000818 silent noautocmd execute bufnr 'buffer' | |
14 0.000012 else | |
if bufname('%') == '' | |
noautocmd silent enew | |
endif | |
silent! execute 'noautocmd edit' fnameescape(a:context.real_buffer_name) | |
endif | |
14 0.001193 0.000087 call unite#handlers#_on_bufwin_enter(bufnr('%')) | |
14 0.056565 0.000093 doautocmd WinEnter | |
14 0.055583 0.000047 doautocmd BufWinEnter | |
FUNCTION fugitive#buffer() | |
Called 10 times | |
Total time: 0.000377 | |
Self time: 0.000060 | |
count total (s) self (s) | |
10 0.000370 0.000053 return s:buffer(a:0 ? a:1 : '%') | |
FUNCTION <SNR>119_vp_pipe_close() | |
Called 42 times | |
Total time: 0.006474 | |
Self time: 0.000592 | |
count total (s) self (s) | |
" echomsg 'close:'.self.fd | |
42 0.000112 if self.fd != 0 | |
42 0.006168 0.000286 call s:libcall('vp_pipe_close', [self.fd]) | |
42 0.000064 let self.fd = 0 | |
42 0.000025 endif | |
FUNCTION <SNR>78_is_excluded_window() | |
Called 139 times | |
Total time: 0.006175 | |
Self time: 0.006175 | |
count total (s) self (s) | |
139 0.000304 for matchft in g:airline_exclude_filetypes | |
if matchft ==# &ft | |
return 1 | |
endif | |
endfor | |
556 0.000621 for matchw in g:airline_exclude_filenames | |
417 0.002560 if matchstr(expand('%'), matchw) ==# matchw | |
return 1 | |
endif | |
417 0.000244 endfor | |
139 0.000217 if g:airline_exclude_preview && &previewwindow | |
return 1 | |
endif | |
139 0.000101 return 0 | |
FUNCTION unite#filters#filter_patterns() | |
Called 91 times | |
Total time: 5.055396 | |
Self time: 0.001136 | |
count total (s) self (s) | |
91 5.055338 0.001078 return unite#util#has_lua()? unite#filters#lua_filter_patterns( a:candidates, a:patterns, a:whites) : unite#filters#vim_filter_patterns( a:candidates, a:patterns, a:whites) | |
FUNCTION <SNR>177_get_action_table() | |
Called 79 times | |
Total time: 0.203024 | |
Self time: 0.110872 | |
count total (s) self (s) | |
79 0.018047 0.000419 let kind = unite#get_kinds(a:kind_name) | |
79 0.004968 0.000724 let source = empty(a:source_table) ? unite#get_sources(a:source_name) : unite#util#get_name(a:source_table, a:source_name, {}) | |
79 0.000142 if empty(source) | |
call unite#print_error('[unite.vim] source "' . a:source_name . '" is not found.') | |
return {} | |
endif | |
79 0.000104 if empty(kind) | |
call unite#print_error('[unite.vim] kind "' . a:kind_name . '" is not found.') | |
return {} | |
endif | |
79 0.000138 let action_table = {} | |
79 0.000309 let source_kind = 'source/'.a:source_name.'/'.a:kind_name | |
79 0.000229 let source_kind_wild = 'source/'.a:source_name.'/*' | |
79 0.001287 0.000350 let custom = unite#custom#get() | |
79 0.000115 if !a:is_parents_action | |
" Source/kind custom actions. | |
79 0.000217 if has_key(custom.actions, source_kind) | |
let action_table = s:extend_actions(a:self_func, action_table, custom.actions[source_kind], 'custom/'.source.name.'/'.kind.name) | |
endif | |
" Source/kind actions. | |
79 0.000189 if has_key(source.action_table, a:kind_name) | |
let action_table = s:extend_actions(a:self_func, action_table, source.action_table[a:kind_name], source.name.'/'.kind.name) | |
endif | |
" Source/* custom actions. | |
79 0.000164 if has_key(custom.actions, source_kind_wild) | |
let action_table = s:extend_actions(a:self_func, action_table, custom.actions[source_kind_wild], 'custom/source/'.source.name) | |
endif | |
" Source/* actions. | |
79 0.000144 if has_key(source.action_table, '*') | |
63 0.003026 0.000519 let action_table = s:extend_actions(a:self_func, action_table, source.action_table['*'], 'source/'.source.name) | |
63 0.000048 endif | |
" Kind custom actions. | |
79 0.000168 if has_key(custom.actions, a:kind_name) | |
24 0.001151 0.000229 let action_table = s:extend_actions(a:self_func, action_table, custom.actions[a:kind_name], 'custom/'.kind.name) | |
24 0.000016 endif | |
" Kind actions. | |
79 0.008749 0.000623 let action_table = s:extend_actions(a:self_func, action_table, kind.action_table, kind.name) | |
79 0.000048 endif | |
" Parents actions. | |
79 0.000143 for parent in source.parents | |
let parent_kind = unite#get_kinds(parent) | |
let action_table = s:extend_actions(a:self_func, action_table, parent_kind.action_table, parent) | |
endfor | |
147 0.000292 for parent in kind.parents | |
68 0.002559 let action_table = s:extend_actions(a:self_func, action_table, unite#action#get_action_table(a:source_name, parent, a:self_func, 0, a:source_table)) | |
68 0.000046 endfor | |
79 0.000123 if !a:is_parents_action | |
" Kind aliases. | |
79 0.002382 0.000596 call s:filter_alias_action(action_table, kind.alias_table, kind.name) | |
" Kind custom aliases. | |
79 0.000185 if has_key(custom.aliases, a:kind_name) | |
call s:filter_alias_action(action_table, custom.aliases[a:kind_name], 'custom/'.kind.name) | |
endif | |
" Source/* aliases. | |
79 0.000138 if has_key(source.alias_table, '*') | |
call s:filter_alias_action(action_table, source.alias_table['*'], 'source/'.source.name) | |
endif | |
" Source/* custom aliases. | |
79 0.000166 if has_key(custom.aliases, source_kind_wild) | |
call s:filter_alias_action(action_table, custom.aliases[source_kind_wild], 'custom/source/'.source.name) | |
endif | |
" Source/kind aliases. | |
79 0.000139 if has_key(custom.aliases, source_kind) | |
call s:filter_alias_action(action_table, custom.aliases[source_kind], 'source/'.source.name.'/'.kind.name) | |
endif | |
" Source/kind custom aliases. | |
79 0.000146 if has_key(source.alias_table, a:kind_name) | |
call s:filter_alias_action(action_table, source.alias_table[a:kind_name], 'custom/source/'.source.name.'/'.kind.name) | |
endif | |
79 0.000047 endif | |
" Initialize action. | |
1800 0.003085 for [action_name, action] in items(action_table) | |
1721 0.002450 if !has_key(action, 'name') | |
9 0.000023 let action.name = action_name | |
9 0.000006 endif | |
1721 0.002289 if !has_key(action, 'from') | |
let action.from = '' | |
endif | |
1721 0.002549 if !has_key(action, 'description') | |
let action.description = '' | |
endif | |
1721 0.002456 if !has_key(action, 'is_quit') | |
let action.is_quit = 1 | |
endif | |
1721 0.002467 if !has_key(action, 'is_start') | |
9 0.000016 let action.is_start = 0 | |
9 0.000005 endif | |
1721 0.002403 if !has_key(action, 'is_tab') | |
9 0.000012 let action.is_tab = 0 | |
9 0.000005 endif | |
1721 0.002671 if !has_key(action, 'is_selectable') | |
let action.is_selectable = 0 | |
endif | |
1721 0.002888 if !has_key(action, 'is_invalidate_cache') | |
let action.is_invalidate_cache = 0 | |
endif | |
1721 0.002507 if !has_key(action, 'is_listed') | |
9 0.000109 let action.is_listed = (action.name !~ '^unite__\|^vimfiler__') | |
9 0.000005 endif | |
1721 0.000862 endfor | |
" Filtering nop action. | |
79 0.002750 return filter(action_table, 'v:key !=# "nop"') | |
FUNCTION <SNR>136_uniq_by() | |
Called 1 time | |
Total time: 0.000056 | |
Self time: 0.000056 | |
count total (s) self (s) | |
1 0.000012 let list = map(copy(a:list), printf('[v:val, %s]', a:f)) | |
1 0.000001 let i = 0 | |
1 0.000002 let seen = {} | |
3 0.000004 while i < len(list) | |
2 0.000007 let key = string(list[i][1]) | |
2 0.000003 if has_key(seen, key) | |
call remove(list, i) | |
else | |
2 0.000005 let seen[key] = 1 | |
2 0.000002 let i += 1 | |
2 0.000001 endif | |
2 0.000002 endwhile | |
1 0.000005 return map(list, 'v:val[0]') | |
FUNCTION <SNR>138__encode_name() | |
Called 4 times | |
Total time: 0.000182 | |
Self time: 0.000067 | |
count total (s) self (s) | |
" Check cache directory. | |
4 0.000008 if !isdirectory(a:cache_dir) | |
call mkdir(a:cache_dir, 'p') | |
endif | |
4 0.000007 let cache_dir = a:cache_dir | |
4 0.000017 if cache_dir !~ '/$' | |
let cache_dir .= '/' | |
endif | |
4 0.000134 0.000019 return cache_dir . s:_create_hash(cache_dir, a:filename) | |
FUNCTION unite#util#escape_pattern() | |
Called 28 times | |
Total time: 0.000475 | |
Self time: 0.000199 | |
count total (s) self (s) | |
28 0.000453 0.000177 return call(s:get_prelude().escape_pattern, a:000) | |
FUNCTION unite#util#path2directory() | |
Called 12852 times | |
Total time: 0.239766 | |
Self time: 0.055752 | |
count total (s) self (s) | |
12852 0.236825 0.052811 return call(s:get_prelude().path2directory, a:000) | |
FUNCTION unite#helper#get_unite_winnr() | |
Called 28 times | |
Total time: 0.001029 | |
Self time: 0.001029 | |
count total (s) self (s) | |
28 0.000517 for winnr in filter(range(1, winnr('$')), "getbufvar(winbufnr(v:val), '&filetype') ==# 'unite'") | |
let buffer_context = get(getbufvar( winbufnr(winnr), 'unite'), 'context', {}) | |
if !empty(buffer_context) && buffer_context.buffer_name ==# a:buffer_name | |
if buffer_context.temporary && !empty(filter(copy(buffer_context.unite__old_buffer_info), 'v:val.buffer_name ==# buffer_context.buffer_name')) | |
" Disable resume. | |
let buffer_context.unite__old_buffer_info = [] | |
endif | |
return winnr | |
endif | |
endfor | |
28 0.000027 return -1 | |
FUNCTION unite#handlers#_on_cursor_hold() | |
Called 1 time | |
Total time: 0.000127 | |
Self time: 0.000112 | |
count total (s) self (s) | |
1 0.000008 let is_async = 0 | |
1 0.000027 0.000012 call s:restore_statusline() | |
1 0.000002 if &filetype ==# 'unite' | |
" Redraw. | |
call unite#redraw() | |
let unite = unite#get_current_unite() | |
let is_async = unite.is_async | |
if !unite.is_async && unite.context.auto_quit | |
call unite#force_quit_session() | |
endif | |
else | |
" Search other unite window. | |
1 0.000038 for winnr in filter(range(1, winnr('$')), "getbufvar(winbufnr(v:val), '&filetype') ==# 'unite'") | |
let unite = getbufvar(winbufnr(winnr), 'unite') | |
if unite.is_async | |
" Redraw unite buffer. | |
call unite#redraw(winnr) | |
let is_async = unite.is_async | |
endif | |
endfor | |
1 0.000001 endif | |
1 0.000002 if is_async | |
" Ignore key sequences. | |
call feedkeys("g\<ESC>", 'n') | |
endif | |
FUNCTION unite#loaded_source_names_string() | |
Called 28 times | |
Total time: 0.001268 | |
Self time: 0.000186 | |
count total (s) self (s) | |
28 0.001234 0.000152 return join(unite#loaded_source_names()) | |
FUNCTION airline#parts#filetype() | |
Called 317 times | |
Total time: 0.000900 | |
Self time: 0.000900 | |
count total (s) self (s) | |
317 0.000641 return &filetype | |
FUNCTION airline#extensions#netrw#apply() | |
Called 47 times | |
Total time: 0.000810 | |
Self time: 0.000810 | |
count total (s) self (s) | |
47 0.000160 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 117 times | |
Total time: 0.000831 | |
Self time: 0.000831 | |
count total (s) self (s) | |
117 0.000334 if g:airline_detect_iminsert && &iminsert && exists('b:keymap_name') | |
return toupper(b:keymap_name) | |
endif | |
117 0.000120 return '' | |
FUNCTION <SNR>83_new_builder() | |
Called 52 times | |
Total time: 0.002891 | |
Self time: 0.001635 | |
count total (s) self (s) | |
52 0.000548 let builder_context = { 'active' : 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), } | |
52 0.000119 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 | |
52 0.000179 let builder_context.left_sep = get(g:, 'airline#extensions#tabline#left_sep' , ' ') | |
52 0.000172 let builder_context.left_alt_sep = get(g:, 'airline#extensions#tabline#left_alt_sep' , '|') | |
52 0.000026 endif | |
52 0.001474 0.000218 return airline#builder#new(builder_context) | |
FUNCTION neosnippet#helpers#get_filetype() | |
Called 1 time | |
Total time: 0.000016 | |
Self time: 0.000016 | |
count total (s) self (s) | |
1 0.000002 if !exists('s:exists_context_filetype') | |
" context_filetype.vim installation check. | |
try | |
call context_filetype#version() | |
let s:exists_context_filetype = 1 | |
catch | |
let s:exists_context_filetype = 0 | |
endtry | |
endif | |
1 0.000003 let context_filetype = s:exists_context_filetype ? context_filetype#get_filetype() : &filetype | |
1 0.000001 if context_filetype == '' | |
let context_filetype = 'nothing' | |
endif | |
1 0.000000 return context_filetype | |
FUNCTION neocomplete#get_context_filetype() | |
Called 19 times | |
Total time: 0.000784 | |
Self time: 0.000315 | |
count total (s) self (s) | |
19 0.000097 let neocomplete = exists('b:neocomplete') ? b:neocomplete : neocomplete#get_current_neocomplete() | |
19 0.000050 if a:0 != 0 || mode() !=# 'i' || neocomplete.context_filetype == '' | |
19 0.000551 0.000082 call neocomplete#context_filetype#set() | |
19 0.000011 endif | |
19 0.000021 return neocomplete.context_filetype | |
FUNCTION <SNR>98_sort() | |
Called 463 times | |
Total time: 0.006076 | |
Self time: 0.006076 | |
count total (s) self (s) | |
463 0.002450 if type(a:expr) == type(function('function')) | |
return sort(a:list, a:expr) | |
endif | |
463 0.000775 let s:expr = a:expr | |
463 0.001510 return sort(a:list, 's:_compare') | |
FUNCTION projectroot#get() | |
Called 36 times | |
Total time: 0.006244 | |
Self time: 0.005567 | |
count total (s) self (s) | |
36 0.000859 0.000182 let fullfile = s:getfullname(a:0 ? a:1 : '') | |
36 0.000209 if fullfile =~ '^fugitive:/' | |
return '' " skip any fugitive buffers early | |
endif | |
36 0.000073 if exists('b:projectroot') | |
if stridx(fullfile, fnamemodify(b:projectroot, ':p'))==0 | |
return b:projectroot | |
endif | |
endif | |
72 0.000133 for marker in g:rootmarkers | |
72 0.000110 let pivot=fullfile | |
327 0.000174 while 1 | |
327 0.000393 let prev=pivot | |
327 0.000749 let pivot=fnamemodify(pivot, ':h') | |
327 0.001736 if filereadable(pivot.'/'.marker) || isdirectory(pivot.'/'.marker) | |
36 0.000031 return pivot | |
endif | |
291 0.000392 if pivot==prev | |
36 0.000021 break | |
endif | |
255 0.000163 endwhile | |
36 0.000017 endfor | |
return '' | |
FUNCTION <SNR>126_clear_complete() | |
Called 13 times | |
Total time: 0.000376 | |
Self time: 0.000238 | |
count total (s) self (s) | |
13 0.000210 0.000072 let unite = unite#get_current_unite() | |
13 0.000050 if has_key(unite, 'complete_cur_text') | |
call remove(unite, 'complete_cur_text') | |
redraw | |
echo '' | |
endif | |
13 0.000021 return '' | |
FUNCTION <SNR>119_libcall() | |
Called 104 times | |
Total time: 0.115981 | |
Self time: 0.106476 | |
count total (s) self (s) | |
" End Of Value | |
104 0.000218 let EOV = "\xFF" | |
104 0.001322 let args = empty(a:args) ? '' : (join(reverse(copy(a:args)), EOV) . EOV) | |
104 0.100850 let stack_buf = libcall(g:vimproc#dll_path, a:func, args) | |
104 0.010086 0.001390 let result = s:split(stack_buf, EOV) | |
104 0.000377 if get(result, -1, 'error') != '' | |
25 0.000109 if stack_buf[len(stack_buf) - 1] ==# EOV | |
" Note: If &encoding equals "cp932" and output ends multibyte first byte, | |
" will fail split. | |
return result | |
endif | |
25 0.000060 let s:lasterr = result | |
25 0.001159 0.000350 let msg = vimproc#util#iconv(string(result), vimproc#util#systemencoding(), &encoding) | |
24 3.389988 throw printf('vimproc: %s: %s', a:func, msg) | |
endif | |
79 0.000226 return result[:-2] | |
FUNCTION unite#view#_get_status_string() | |
Called 14 times | |
Total time: 0.001180 | |
Self time: 0.001180 | |
count total (s) self (s) | |
14 0.000032 let statusline = "%#uniteStatusHead# %{unite#view#_get_status_head_string()}%*" | |
14 0.000016 let cnt = 0 | |
14 0.000025 if empty(a:unite.sources) | |
let statusline .= "%#uniteStatusSourceNames#interactive%*" | |
let statusline .= "%#uniteStatusSourceCandidates#%{" | |
let statusline .= "unite#view#_get_source_candidates_string(" | |
let statusline .= "unite#loaded_sources_list()[0])} %*" | |
else | |
56 0.000091 for cnt in range(0, len(a:unite.sources)-1) | |
42 0.000087 let statusline .= "%#uniteStatusSourceNames#%{" | |
42 0.000088 let statusline .= "unite#view#_get_source_name_string(" | |
42 0.000127 let statusline .= "b:unite.sources[".cnt."])}" | |
42 0.000090 let statusline .= "%#uniteStatusSourceCandidates#%{" | |
42 0.000096 let statusline .= "unite#view#_get_source_candidates_string(" | |
42 0.000108 let statusline .= "b:unite.sources[".cnt."])} %*" | |
42 0.000028 endfor | |
14 0.000008 endif | |
14 0.000037 let statusline .= "%=%#uniteStatusMessage# %{unite#view#_get_status_tail_string()} %*" | |
14 0.000033 let statusline .= "%#LineNR#%{printf('%'.len(b:unite.candidates_len" | |
14 0.000032 let statusline .= "+b:unite.prompt_linenr).'d/%d',line('.')," | |
14 0.000031 let statusline .= "b:unite.candidates_len+b:unite.prompt_linenr)}%*" | |
14 0.000016 return statusline | |
FUNCTION unite#util#strchars() | |
Called 140 times | |
Total time: 0.002993 | |
Self time: 0.001358 | |
count total (s) self (s) | |
140 0.002859 0.001224 return call(s:get_string().strchars, a:000) | |
FUNCTION unite#helper#paths2candidates() | |
Called 91 times | |
Total time: 0.345012 | |
Self time: 0.345012 | |
count total (s) self (s) | |
91 0.000161 let candidates = [] | |
91 0.000139 lua << EOF | |
do | |
local paths = vim.eval('a:paths') | |
local candidates = vim.eval('candidates') | |
for path in paths() do | |
local candidate = vim.dict() | |
candidate.word = path | |
candidate.action__path = path | |
candidates:add(candidate) | |
end | |
end | |
EOF | |
91 0.000391 return candidates | |
FUNCTION unite#variables#loaded_sources() | |
Called 702 times | |
Total time: 0.014978 | |
Self time: 0.009563 | |
count total (s) self (s) | |
" Initialize load. | |
702 0.007716 0.002301 let unite = unite#get_current_unite() | |
702 0.006332 return a:0 == 0 ? unite.sources : get(filter(copy(unite.sources), 'v:val.name ==# a:1'), 0, {}) | |
FUNCTION unite#handlers#_on_buf_unload() | |
Called 28 times | |
Total time: 0.018223 | |
Self time: 0.006261 | |
count total (s) self (s) | |
28 0.000724 0.000094 call unite#view#_clear_match() | |
" Save unite value. | |
28 0.005314 silent! let unite = getbufvar(a:bufname, 'unite') | |
28 0.000077 if type(unite) != type({}) | |
" Invalid unite. | |
return | |
endif | |
28 0.000463 0.000211 if &l:statusline == unite#get_current_unite().statusline | |
" Restore statusline. | |
let &l:statusline = &g:statusline | |
endif | |
28 0.000025 if unite.is_finalized | |
14 0.000008 return | |
endif | |
" Restore options. | |
14 0.000028 if has_key(unite, 'redrawtime_save') | |
14 0.000039 let &redrawtime = unite.redrawtime_save | |
14 0.000007 endif | |
14 0.000034 let &sidescrolloff = unite.sidescrolloff_save | |
14 0.000295 0.000048 call unite#handlers#_restore_updatetime() | |
" Call finalize functions. | |
14 0.010919 0.000086 call unite#helper#call_hook(unite#loaded_sources_list(), 'on_close') | |
14 0.000023 let unite.is_finalized = 1 | |
FUNCTION fugitive#detect() | |
Called 10 times | |
Total time: 0.010887 | |
Self time: 0.001636 | |
count total (s) self (s) | |
10 0.000036 if exists('b:git_dir') && (b:git_dir ==# '' || b:git_dir =~# '/$') | |
unlet b:git_dir | |
endif | |
10 0.000013 if !exists('b:git_dir') | |
10 0.003108 0.000059 let dir = fugitive#extract_git_dir(a:path) | |
10 0.000010 if dir !=# '' | |
10 0.000016 let b:git_dir = dir | |
10 0.000007 endif | |
10 0.000003 endif | |
10 0.000016 if exists('b:git_dir') | |
10 0.000047 if exists('#User#FugitiveBoot') | |
try | |
let [save_mls, &modelines] = [&mls, 0] | |
doautocmd User FugitiveBoot | |
finally | |
let &mls = save_mls | |
endtry | |
endif | |
10 0.000506 cnoremap <buffer> <expr> <C-R><C-G> fnameescape(<SID>recall()) | |
10 0.000181 nnoremap <buffer> <silent> y<C-G> :call setreg(v:register, <SID>recall())<CR> | |
10 0.000437 0.000060 let buffer = fugitive#buffer() | |
10 0.000084 if expand('%:p') =~# '//' | |
call buffer.setvar('&path', s:sub(buffer.getvar('&path'), '^\.%(,|$)', '')) | |
endif | |
10 0.000100 0.000066 if stridx(buffer.getvar('&tags'), escape(b:git_dir, ', ')) == -1 | |
10 0.000053 if filereadable(b:git_dir.'/tags') | |
call buffer.setvar('&tags', escape(b:git_dir.'/tags', ', ').','.buffer.getvar('&tags')) | |
endif | |
10 0.000045 if &filetype !=# '' && filereadable(b:git_dir.'/'.&filetype.'.tags') | |
call buffer.setvar('&tags', escape(b:git_dir.'/'.&filetype.'.tags', ', ').','.buffer.getvar('&tags')) | |
endif | |
10 0.000004 endif | |
10 0.000009 try | |
10 0.000064 let [save_mls, &modelines] = [&mls, 0] | |
10 0.005840 0.000049 doautocmd User Fugitive | |
10 0.000007 finally | |
10 0.000039 let &mls = save_mls | |
10 0.000010 endtry | |
10 0.000005 endif | |
FUNCTION <SNR>175_parse_cmdline() | |
Called 14 times | |
Total time: 0.018596 | |
Self time: 0.000568 | |
count total (s) self (s) | |
14 0.000023 let cmdline = a:cmdline | |
" Expand block. | |
14 0.000044 if cmdline =~ '{' | |
let cmdline = s:parse_block(cmdline) | |
endif | |
" Expand tilde. | |
14 0.000030 if cmdline =~ '\~' | |
let cmdline = s:parse_tilde(cmdline) | |
endif | |
" Expand filename. | |
14 0.000038 if cmdline =~ ' =' | |
let cmdline = s:parse_equal(cmdline) | |
endif | |
" Expand variables. | |
14 0.000025 if cmdline =~ '\$' | |
let cmdline = s:parse_variables(cmdline) | |
endif | |
" Expand wildcard. | |
14 0.000125 if cmdline =~ '[[*?]\|\\[()|]' | |
let cmdline = s:parse_wildcard(cmdline) | |
endif | |
14 0.018077 0.000049 return s:parse_tilde(cmdline) | |
FUNCTION unite#candidates#_gather_pos() | |
Called 71 times | |
Total time: 0.010427 | |
Self time: 0.002047 | |
count total (s) self (s) | |
71 0.000687 0.000220 let unite = unite#get_current_unite() | |
71 0.000120 if unite.context.is_redraw || unite.candidates_pos == 0 | |
return [] | |
endif | |
71 0.000666 0.000232 let unite = unite#get_current_unite() | |
71 0.000293 let candidates = unite.candidates[unite.candidates_pos : unite.candidates_pos + a:offset - 1] | |
" Post filter. | |
71 0.000148 for filter_name in unite.post_filters | |
let candidates = unite#helper#call_filter( filter_name, candidates, unite.context) | |
endfor | |
71 0.000167 let unite.candidates_pos += len(candidates) | |
71 0.007726 0.000247 return unite#init#_candidates(candidates) | |
FUNCTION 10() | |
Called 933 times | |
Total time: 0.153507 | |
Self time: 0.020570 | |
count total (s) self (s) | |
933 0.150917 0.017980 let patterns = map(filter(copy(map(copy(s:default_matchers), 'unite#get_filters(v:val)')), "v:val != self && has_key(v:val, 'pattern')"), 'v:val.pattern(a:input)') | |
933 0.001962 return join(patterns,'\|') | |
FUNCTION 11() | |
Called 420 times | |
Total time: 1.938385 | |
Self time: 0.011269 | |
count total (s) self (s) | |
420 0.000749 let candidates = a:candidates | |
840 0.001367 for default in s:default_matchers | |
420 0.061272 0.001783 let filter = unite#get_filters(default) | |
420 0.000652 if !empty(filter) | |
420 1.870238 0.002611 let candidates = filter.filter(candidates, a:context) | |
420 0.000270 endif | |
420 0.000268 endfor | |
420 0.000359 return candidates | |
FUNCTION 12() | |
Called 420 times | |
Total time: 0.373632 | |
Self time: 0.011060 | |
count total (s) self (s) | |
420 0.000735 let candidates = a:candidates | |
840 0.001398 for default in s:default_sorters | |
420 0.058454 0.001821 let filter = unite#get_filters(default) | |
420 0.000611 if !empty(filter) | |
420 0.308252 0.002313 let candidates = filter.filter(candidates, a:context) | |
420 0.000301 endif | |
420 0.000293 endfor | |
420 0.000349 return candidates | |
FUNCTION 19() | |
Called 233 times | |
Total time: 0.001305 | |
Self time: 0.001305 | |
count total (s) self (s) | |
233 0.001193 call add(self._sections, ['|', a:0 ? a:1 : '%=']) | |
FUNCTION <SNR>119_read_lines() | |
Called 1617 times | |
Total time: 9.025260 | |
Self time: 1.054436 | |
count total (s) self (s) | |
1617 0.001917 if self.__eof | |
171 0.000082 return [] | |
endif | |
1446 0.003634 let lines = self.buffer[:-2] | |
1446 0.004776 let res = get(self.buffer, -1, '') | |
1446 7.980623 0.009799 let out = call(self.read, a:000, self) | |
1446 0.004053 if out !=# '' | |
1368 0.870085 let outs = split(out, '\r*\n', 1) | |
1368 0.004743 let res .= outs[0] | |
1368 0.002720 if len(outs) > 1 | |
1368 0.115640 let lines += [substitute(res, '\r*$', '', '')] + outs[1:-2] | |
1368 0.002976 let res = outs[-1] | |
1368 0.000990 endif | |
1368 0.000793 endif | |
1446 0.009361 if self.__eof || out ==# '' | |
87 0.000126 if res !=# '' | |
let lines += [res] | |
endif | |
87 0.000212 let self.buffer = [] | |
87 0.000067 else | |
1359 0.003116 let self.buffer = [res] | |
1359 0.000834 endif | |
1446 0.001618 return lines | |
FUNCTION <SNR>119_SID_PREFIX() | |
Called 938 times | |
Total time: 0.009322 | |
Self time: 0.009322 | |
count total (s) self (s) | |
938 0.006092 if !exists('s:sid_prefix') | |
let s:sid_prefix = matchstr(expand('<sfile>'), '<SNR>\d\+_\zeSID_PREFIX$') | |
endif | |
938 0.000765 return s:sid_prefix | |
FUNCTION <SNR>37_buffer_spec() | |
Called 40 times | |
Total time: 0.000817 | |
Self time: 0.000413 | |
count total (s) self (s) | |
40 0.000109 let bufname = bufname(self['#']) | |
40 0.000687 0.000283 return s:shellslash(bufname == '' ? '' : fnamemodify(bufname,':p')) | |
FUNCTION airline#highlighter#add_separator() | |
Called 938 times | |
Total time: 0.234227 | |
Self time: 0.012312 | |
count total (s) self (s) | |
938 0.005935 let s:separators[a:from.a:to] = [a:from, a:to, a:inverse] | |
938 0.227846 0.005931 call <sid>exec_separator({}, a:from, a:to, a:inverse, '') | |
FUNCTION unite#helper#parse_options() | |
Called 14 times | |
Total time: 0.005307 | |
Self time: 0.004419 | |
count total (s) self (s) | |
14 0.000037 let args = [] | |
14 0.000041 let options = {} | |
56 0.001132 for arg in split(a:args, '\%(\\\@<!\s\)\+') | |
42 0.000405 let arg = substitute(arg, '\\\( \)', '\1', 'g') | |
42 0.000288 let arg_key = substitute(arg, '=\zs.*$', '', '') | |
42 0.000360 let name = substitute(tr(arg_key, '-', '_'), '=$', '', '') | |
42 0.000264 let value = (arg_key =~ '=$') ? arg[len(arg_key) :] : 1 | |
42 0.001682 0.000794 if arg_key =~ '^-custom-' || index(unite#variables#options(), arg_key) >= 0 | |
let options[name[1:]] = value | |
else | |
42 0.000431 call add(args, arg) | |
42 0.000039 endif | |
42 0.000043 endfor | |
14 0.000031 return [args, options] | |
FUNCTION unite#filters#filter_matcher() | |
Called 558 times | |
Total time: 1.805082 | |
Self time: 0.078099 | |
count total (s) self (s) | |
558 0.002106 if a:context.unite__max_candidates <= 0 || !a:context.unite__is_interactive || len(a:context.input_list) > 1 | |
362 0.983704 0.003688 return a:expr == '' ? a:list : (a:expr ==# 'if_lua') ? unite#filters#lua_matcher( a:list, a:context, &ignorecase) : (a:expr ==# 'if_lua_fuzzy') ? unite#filters#lua_fuzzy_matcher( a:list, a:context, &ignorecase) : filter(a:list, a:expr) | |
endif | |
196 0.000314 if a:expr == '' | |
74 0.001473 return a:list[: a:context.unite__max_candidates - 1] | |
endif | |
122 0.000143 let _ = [] | |
122 0.000131 let len = 0 | |
122 0.000193 let max = a:context.unite__max_candidates * 5 | |
122 0.000161 let offset = max*4 | |
339 0.000738 for cnt in range(0, len(a:list) / offset) | |
231 0.052888 let list = a:list[cnt*offset : cnt*offset + offset] | |
231 0.752369 0.005402 let list = (a:expr ==# 'if_lua') ? unite#filters#lua_matcher(list, a:context, &ignorecase) : (a:expr ==# 'if_lua_fuzzy') ? unite#filters#lua_fuzzy_matcher(list, a:context, &ignorecase) : filter(list, a:expr) | |
231 0.000651 let len += len(list) | |
231 0.003354 let _ += list | |
231 0.000322 if len >= max | |
14 0.000018 break | |
endif | |
217 0.000184 endfor | |
122 0.001906 return _[: max] | |
FUNCTION neocomplete#sources#member#make_cache_current_line() | |
Called 19 times | |
Total time: 0.001846 | |
Self time: 0.000299 | |
count total (s) self (s) | |
19 0.000169 0.000066 if !neocomplete#is_enabled() | |
call neocomplete#initialize() | |
endif | |
" Make cache from current line. | |
19 0.001587 0.000143 return s:make_cache_current_buffer(line('.')-1, line('.')+1) | |
FUNCTION vimproc#parser#parse_statements() | |
Called 14 times | |
Total time: 0.024956 | |
Self time: 0.020299 | |
count total (s) self (s) | |
14 0.000089 if type(a:script) == type('') && a:script =~ '^\s*:' | |
return [ { 'statement' : a:script, 'condition' : 'always' } ] | |
endif | |
14 0.000735 let script = type(a:script) == type([]) ? a:script : split(a:script, '\zs') | |
14 0.000036 let max = len(script) | |
14 0.000017 let statements = [] | |
14 0.000015 let statement = '' | |
14 0.000016 let i = 0 | |
420 0.000319 while i < max | |
406 0.000529 if script[i] == ';' | |
if statement != '' | |
call add(statements, { 'statement' : statement, 'condition' : 'always',}) | |
endif | |
let statement = '' | |
let i += 1 | |
elseif script[i] == '&' | |
if i+1 < max && script[i+1] == '&' | |
if statement != '' | |
call add(statements, { 'statement' : statement, 'condition' : 'true',}) | |
endif | |
let statement = '' | |
let i += 2 | |
else | |
let statement .= script[i] | |
let i += 1 | |
endif | |
elseif script[i] == '|' | |
if i+1 < max && script[i+1] == '|' | |
if statement != '' | |
call add(statements, { 'statement' : statement, 'condition' : 'false',}) | |
endif | |
let statement = '' | |
let i += 2 | |
else | |
let statement .= script[i] | |
let i += 1 | |
endif | |
elseif script[i] == "'" | |
" Single quote. | |
14 0.004107 0.000106 let [string, i] = s:skip_single_quote(script, i) | |
14 0.000023 let statement .= string | |
14 0.000013 elseif script[i] == '"' | |
" Double quote. | |
14 0.000768 0.000112 let [string, i] = s:skip_double_quote(script, i) | |
14 0.000021 let statement .= string | |
14 0.000013 elseif script[i] == '`' | |
" Back quote. | |
let [string, i] = s:skip_back_quote(script, i) | |
let statement .= string | |
elseif script[i] == '\' | |
" Escape. | |
let i += 1 | |
if i >= max | |
throw 'Exception: Join to next line (\).' | |
endif | |
let statement .= '\' . script[i] | |
let i += 1 | |
elseif script[i] == '#' && statement == '' | |
" Comment. | |
break | |
else | |
378 0.000673 let statement .= script[i] | |
378 0.000334 let i += 1 | |
378 0.000169 endif | |
406 0.000226 endwhile | |
14 0.000088 if statement !~ '^\s*$' | |
14 0.000112 call add(statements, { 'statement' : statement, 'condition' : 'always',}) | |
14 0.000008 endif | |
14 0.000012 return statements | |
FUNCTION <SNR>99_make_word() | |
Called 508 times | |
Total time: 0.011630 | |
Self time: 0.010859 | |
count total (s) self (s) | |
508 0.001937 let filetype = getbufvar(a:bufnr, '&filetype') | |
508 0.000532 if filetype ==# 'vimfiler' | |
let path = getbufvar(a:bufnr, 'vimfiler').current_dir | |
let path = printf('*vimfiler* [%s]', unite#util#substitute_path_separator(simplify(path))) | |
elseif filetype ==# 'vimshell' | |
let vimshell = getbufvar(a:bufnr, 'vimshell') | |
let path = printf('*vimshell*: [%s]', unite#util#substitute_path_separator(simplify(vimshell.current_dir))) | |
else | |
508 0.003320 0.002549 let path = unite#util#substitute_path_separator(simplify(bufname(a:bufnr))) | |
508 0.000269 endif | |
508 0.000395 return path | |
FUNCTION 21() | |
Called 1439 times | |
Total time: 0.007453 | |
Self time: 0.007453 | |
count total (s) self (s) | |
1439 0.006991 call add(self._sections, [a:group, a:contents]) | |
FUNCTION 22() | |
Called 106 times | |
Total time: 0.000503 | |
Self time: 0.000503 | |
count total (s) self (s) | |
106 0.000455 call add(self._sections, ['', a:text]) | |
FUNCTION 24() | |
Called 14 times | |
Total time: 0.015316 | |
Self time: 0.000384 | |
count total (s) self (s) | |
14 0.000066 let a:context.source__is_bang = (get(a:args, 0, '') ==# '!') | |
14 0.000041 let a:context.source__is_question = (get(a:args, 0, '') ==# '?') | |
14 0.000037 let a:context.source__is_plus = (get(a:args, 0, '') ==# '+') | |
14 0.000047 let a:context.source__is_minus = (get(a:args, 0, '') ==# '-') | |
14 0.015092 0.000160 let a:context.source__buffer_list = s:get_buffer_list(a:context.source__is_bang, a:context.source__is_question, a:context.source__is_plus, a:context.source__is_minus) | |
FUNCTION 26() | |
Called 140 times | |
Total time: 0.035291 | |
Self time: 0.009025 | |
count total (s) self (s) | |
536 0.000573 for candidate in a:context.candidates | |
396 0.014755 0.005522 let candidate.action__path = unite#util#substitute_path_separator( fnamemodify(s:make_word(candidate.action__buffer_nr), ':p')) | |
396 0.018567 0.001534 let candidate.action__directory = unite#helper#get_buffer_directory(candidate.action__buffer_nr) | |
396 0.000297 endfor | |
FUNCTION 27() | |
Called 14 times | |
Total time: 0.015098 | |
Self time: 0.002179 | |
count total (s) self (s) | |
14 0.000017 if a:context.is_redraw | |
" Recaching. | |
let a:context.source__buffer_list = s:get_buffer_list(a:context.source__is_bang, a:context.source__is_question, a:context.source__is_plus, a:context.source__is_minus) | |
endif | |
14 0.014957 0.002038 let candidates = map(a:context.source__buffer_list, "{ 'word' : unite#util#substitute_path_separator( s:make_word(v:val.action__buffer_nr)), 'abbr' : s:make_abbr(v:val.action__buffer_nr, v:val.source__flags) . s:format_time(v:val.source__time), 'action__buffer_nr' : v:val.action__buffer_nr,}") | |
14 0.000017 return candidates | |
FUNCTION unite#helper#get_substitute_input() | |
Called 436 times | |
Total time: 0.056509 | |
Self time: 0.020143 | |
count total (s) self (s) | |
436 0.004471 0.001369 let unite = unite#get_current_unite() | |
436 0.000665 let input = a:input | |
436 0.000878 if empty(unite.args) && input =~ '^.\{-}\%(\\\@<!\s\)\+' | |
" Ignore source name | |
let input = matchstr(input, '^.\{-}\%(\\\@<!\s\)\+\zs.*') | |
endif | |
436 0.036469 0.005237 let substitute_patterns = reverse(unite#util#sort_by( values(unite#custom#get_profile(unite.profile_name, 'substitute_patterns')), 'v:val.priority')) | |
436 0.001408 if unite.input != '' && stridx(input, unite.input) == 0 && !empty(unite.args) | |
" Substitute after input. | |
let input_save = input | |
let input = input_save[len(unite.input) :] | |
let head = input_save[: len(unite.input)-1] | |
else | |
" Substitute all input. | |
436 0.000526 let head = '' | |
436 0.000236 endif | |
436 0.004345 0.002313 let inputs = unite#helper#get_substitute_input_loop( input, substitute_patterns) | |
436 0.002500 return map(inputs, 'head . v:val') | |
FUNCTION unite#mappings#cursor_down() | |
Called 12 times | |
Total time: 0.002452 | |
Self time: 0.001330 | |
count total (s) self (s) | |
12 0.000190 let is_insert = mode() ==# 'i' | |
12 0.000399 0.000132 let prompt_linenr = unite#get_current_unite().prompt_linenr | |
12 0.000078 let num = line('.') - 1 | |
12 0.000021 let cnt = 1 | |
12 0.000042 let offset = prompt_linenr == 1 ? 1 : 0 | |
12 0.000038 if line('.') == prompt_linenr | |
2 0.000004 let cnt += 1 | |
2 0.000002 endif | |
12 0.000028 while 1 | |
12 0.000421 0.000190 let candidate = get(unite#get_unite_candidates(), num - offset + cnt, {}) | |
12 0.000086 if !empty(candidate) && (candidate.is_dummy || (a:is_skip_not_matched && !candidate.is_matched)) | |
let cnt += 1 | |
continue | |
endif | |
12 0.000020 break | |
endwhile | |
12 0.000019 if is_insert | |
12 0.000814 0.000190 return repeat("\<Down>", cnt) . (unite#helper#is_prompt(line('.') + cnt) ? "\<End>" : "\<Home>") | |
else | |
return cnt == 1 ? 'j' : cnt.'j' | |
endif | |
FUNCTION unite#variables#sources() | |
Called 79 times | |
Total time: 0.003749 | |
Self time: 0.001368 | |
count total (s) self (s) | |
79 0.001058 0.000305 let unite = unite#get_current_unite() | |
79 0.000190 if !has_key(unite, 'sources') | |
return {} | |
endif | |
79 0.000077 if a:0 == 0 | |
return unite.sources | |
endif | |
79 0.002017 0.000389 return unite#util#get_name(unite.sources, a:1, {}) | |
FUNCTION unite#get_filters() | |
Called 4563 times | |
Total time: 0.620668 | |
Self time: 0.024027 | |
count total (s) self (s) | |
4563 0.619073 0.022432 return call('unite#variables#filters', a:000) | |
FUNCTION neocomplete#handler#_on_text_changed() | |
Called 108 times | |
Total time: 0.004357 | |
Self time: 0.001056 | |
count total (s) self (s) | |
108 0.003635 0.000334 if neocomplete#is_cache_disabled() | |
return | |
endif | |
108 0.000162 if getline('.') == '' | |
call s:make_cache_current_line() | |
endif | |
FUNCTION unite#view#_match_line() | |
Called 470 times | |
Total time: 0.007681 | |
Self time: 0.007681 | |
count total (s) self (s) | |
470 0.007420 return exists('*matchaddpos') ? matchaddpos(a:highlight, [a:line], 10, a:id) : matchadd(a:highlight, '^\%'.a:line.'l.*', 10, a:id) | |
FUNCTION unite#action#_get_candidate_action_table() | |
Called 11 times | |
Total time: 0.111634 | |
Self time: 0.000204 | |
count total (s) self (s) | |
11 0.111618 0.000188 return unite#action#get_action_table( a:candidate.source, a:candidate.kind, unite#get_self_functions()[-1], 0, a:sources) | |
FUNCTION unite#util#read_lines() | |
Called 154 times | |
Total time: 9.102010 | |
Self time: 0.076750 | |
count total (s) self (s) | |
154 0.000342 let lines = [] | |
1771 0.003071 for _ in range(a:timeout / 100) | |
1617 9.088155 0.062895 let lines += a:source.read_lines(-1, 100) | |
1617 0.008797 endfor | |
154 0.000154 return lines | |
FUNCTION <SNR>180_execute_command() | |
Called 9 times | |
Total time: 1.028239 | |
Self time: 0.000388 | |
count total (s) self (s) | |
9 0.000366 0.000051 let dir = unite#util#path2directory(a:candidate.action__path) | |
" Auto make directory. | |
9 0.000140 if dir !~ '^\a\+:' && !isdirectory(dir) && !unite#util#is_sudo() && unite#util#input_yesno( printf('"%s" does not exist. Create?', dir)) | |
call mkdir(dir, 'p') | |
endif | |
9 1.027683 0.000147 call unite#util#smart_execute_command( a:command, unite#util#substitute_path_separator( fnamemodify(a:candidate.action__path, ':~:.'))) | |
FUNCTION <SNR>105_uniq_by() | |
Called 35 times | |
Total time: 0.233566 | |
Self time: 0.233566 | |
count total (s) self (s) | |
35 0.047984 let list = map(copy(a:list), printf('[v:val, %s]', a:f)) | |
35 0.000064 let i = 0 | |
35 0.000035 let seen = {} | |
17398 0.017341 while i < len(list) | |
17363 0.045779 let key = string(list[i][1]) | |
17363 0.021155 if has_key(seen, key) | |
950 0.002003 call remove(list, i) | |
950 0.000322 else | |
16413 0.026327 let seen[key] = 1 | |
16413 0.011787 let i += 1 | |
16413 0.006098 endif | |
17363 0.006822 endwhile | |
35 0.020525 return map(list, 'v:val[0]') | |
FUNCTION unite#helper#is_prompt() | |
Called 12 times | |
Total time: 0.000624 | |
Self time: 0.000237 | |
count total (s) self (s) | |
12 0.000195 0.000067 let prompt_linenr = unite#get_current_unite().prompt_linenr | |
12 0.000325 0.000066 let context = unite#get_context() | |
12 0.000076 return (context.prompt_direction ==# 'below' && a:line >= prompt_linenr) || (context.prompt_direction !=# 'below' && a:line <= prompt_linenr) | |
FUNCTION unite#handlers#_on_cursor_hold_i() | |
Called 30 times | |
Total time: 0.056868 | |
Self time: 0.001148 | |
count total (s) self (s) | |
30 0.001000 0.000308 let unite = unite#get_current_unite() | |
30 0.055209 0.000181 call unite#view#_change_highlight() | |
30 0.000085 if unite.max_source_candidates > unite.redraw_hold_candidates | |
call s:check_redraw() | |
endif | |
30 0.000061 if unite.is_async && &l:modifiable | |
" Ignore key sequences. | |
20 0.000133 call feedkeys("a\<BS>", 'n') | |
" call feedkeys("\<C-r>\<ESC>", 'n') | |
20 0.000018 endif | |
FUNCTION unite#sources#buffer#variables#append() | |
Called 76 times | |
Total time: 0.000670 | |
Self time: 0.000670 | |
count total (s) self (s) | |
" Append the current buffer. | |
76 0.000602 let s:buffer_list[a:bufnr] = { 'action__buffer_nr' : a:bufnr, 'source__time' : localtime(), } | |
FUNCTION neocomplete#init#_context() | |
Called 308 times | |
Total time: 0.004467 | |
Self time: 0.004467 | |
count total (s) self (s) | |
308 0.004256 return extend(a:context, { 'input' : '', 'prev_complete_pos' : -1, 'prev_candidates' : [], 'complete_pos' : -1, 'complete_str' : '', 'candidates' : [] }) | |
FUNCTION unite#variables#dynamic() | |
Called 4678 times | |
Total time: 0.031011 | |
Self time: 0.031011 | |
count total (s) self (s) | |
4678 0.009003 if !exists('s:dynamic') | |
let s:dynamic = {} | |
let s:dynamic.sources = {} | |
let s:dynamic.kinds = {} | |
let s:dynamic.filters = {} | |
endif | |
4678 0.003691 return s:dynamic | |
FUNCTION unite#util#escape_match() | |
Called 933 times | |
Total time: 0.010119 | |
Self time: 0.010119 | |
count total (s) self (s) | |
933 0.009763 return substitute(substitute(escape(a:str, '~\.^$[]'), '\*\@<!\*\*\@!', '[^/]*', 'g'), '\*\*\+', '.*', 'g') | |
FUNCTION 48() | |
Called 14 times | |
Total time: 0.021744 | |
Self time: 0.000259 | |
count total (s) self (s) | |
14 0.000019 if !self.is_loaded | |
call self.load() | |
endif | |
14 0.000020 if a:context.is_redraw && g:neomru#do_validate | |
call self.reload() | |
endif | |
14 0.021617 0.000132 return exists('*unite#helper#paths2candidates') ? unite#helper#paths2candidates(self.candidates) : map(copy(self.candidates), "{ 'word' : v:val, 'action__path' : v:val,}") | |
FUNCTION <SNR>51_append() | |
Called 76 times | |
Total time: 0.001817 | |
Self time: 0.001147 | |
count total (s) self (s) | |
76 0.000303 if bufnr('%') != expand('<abuf>') | |
return | |
endif | |
76 0.000270 if !has('vim_starting') || bufname(bufnr('%')) != '' | |
76 0.001002 0.000332 call unite#sources#buffer#variables#append(bufnr('%')) | |
76 0.000041 endif | |
FUNCTION neobundle#util#uniq() | |
Called 25 times | |
Total time: 0.000656 | |
Self time: 0.000656 | |
count total (s) self (s) | |
25 0.000129 let list = a:0 ? map(copy(a:list), printf('[v:val, %s]', a:1)) : copy(a:list) | |
25 0.000033 let i = 0 | |
25 0.000032 let seen = {} | |
25 0.000083 while i < len(list) | |
let key = string(a:0 ? list[i][1] : list[i]) | |
if has_key(seen, key) | |
call remove(list, i) | |
else | |
let seen[key] = 1 | |
let i += 1 | |
endif | |
endwhile | |
25 0.000056 return a:0 ? map(list, 'v:val[0]') : list | |
FUNCTION <SNR>171_make_cache_current_line() | |
Called 19 times | |
Total time: 0.083911 | |
Self time: 0.001715 | |
count total (s) self (s) | |
19 0.000254 0.000105 let neocomplete = neocomplete#get_current_neocomplete() | |
19 0.004938 0.000123 if neocomplete#helper#is_enabled_source('buffer', neocomplete.context_filetype) | |
" Caching current cache line. | |
19 0.071333 0.000131 call neocomplete#sources#buffer#make_cache_current_line() | |
19 0.000017 endif | |
19 0.005315 0.001131 if neocomplete#helper#is_enabled_source('member', neocomplete.context_filetype) | |
" Caching current cache line. | |
19 0.001958 0.000112 call neocomplete#sources#member#make_cache_current_line() | |
19 0.000015 endif | |
FUNCTION vimproc#analyze_shebang() | |
Called 14 times | |
Total time: 0.000225 | |
Self time: 0.000225 | |
count total (s) self (s) | |
14 0.000186 if !filereadable(a:filename) || getfsize(a:filename) > 100000 || (vimproc#util#is_windows() && '.'.fnamemodify(a:filename, ':e') !~? '^'.substitute($PATHEXT, ';', '$\\|^', 'g').'$') | |
" Maybe a binary file. | |
14 0.000019 return [a:filename] | |
endif | |
let lines = readfile(a:filename, '', 1) | |
if empty(lines) || lines[0] !~ '^#!.\+' | |
" Shebang not found. | |
return [a:filename] | |
endif | |
" Get shebang line. | |
let shebang = split(matchstr(lines[0], '^#!\zs.\+')) | |
" Convert command name. | |
if vimproc#util#is_windows() && shebang[0] =~ '^/' | |
let shebang[0] = vimproc#get_command_name( fnamemodify(shebang[0], ':t')) | |
endif | |
return shebang + [a:filename] | |
FUNCTION neocomplete#is_enabled() | |
Called 581 times | |
Total time: 0.003899 | |
Self time: 0.002463 | |
count total (s) self (s) | |
581 0.003501 0.002065 return neocomplete#init#is_enabled() | |
FUNCTION <SNR>119_is_pseudo_device() | |
Called 28 times | |
Total time: 0.000232 | |
Self time: 0.000200 | |
count total (s) self (s) | |
28 0.000133 0.000101 if vimproc#util#is_windows() && ( a:filename ==# '/dev/stdin' || a:filename ==# '/dev/stdout' || a:filename ==# '/dev/stderr') | |
return 1 | |
endif | |
28 0.000048 return a:filename == '' || a:filename ==# '/dev/clip' || a:filename ==# '/dev/quickfix' | |
FUNCTION 50() | |
Called 157 times | |
Total time: 0.000674 | |
Self time: 0.000674 | |
count total (s) self (s) | |
157 0.000590 return self.mtime < getftime(self.mru_file) | |
FUNCTION 51() | |
Called 33 times | |
Total time: 0.572692 | |
Self time: 0.006541 | |
count total (s) self (s) | |
33 0.000301 0.000087 if s:is_sudo() | |
return | |
endif | |
33 0.000097 let opts = a:0 >= 1 && type(a:1) == type({}) ? a:1 : {} | |
33 0.000206 0.000105 if self.has_external_update() && filereadable(self.mru_file) | |
" only need to get the list which contains the latest MRUs | |
let [ver; items] = readfile(self.mru_file) | |
if self.version_check(ver) | |
call extend(self.candidates, items) | |
endif | |
endif | |
33 0.210187 0.000951 let self.candidates = s:uniq(self.candidates) | |
33 0.000085 if len(self.candidates) > self.limit | |
let self.candidates = self.candidates[: self.limit - 1] | |
endif | |
33 0.000070 if get(opts, 'event') ==# 'VimLeavePre' | |
33 0.334788 0.001230 call self.validate() | |
33 0.000017 endif | |
33 0.026225 0.003183 call s:writefile(self.mru_file, [self.version] + self.candidates) | |
33 0.000214 let self.mtime = getftime(self.mru_file) | |
FUNCTION 52() | |
Called 124 times | |
Total time: 0.028901 | |
Self time: 0.002041 | |
count total (s) self (s) | |
124 0.000363 let is_force = get(a:000, 0, 0) | |
" everything is loaded, done! | |
124 0.001070 0.000497 if !is_force && self.is_loaded && !self.has_external_update() | |
122 0.000086 return | |
endif | |
2 0.000002 let mru_file = self.mru_file | |
2 0.000011 if !filereadable(mru_file) | |
return | |
endif | |
2 0.000366 let file = readfile(mru_file) | |
2 0.000003 if empty(file) | |
return | |
endif | |
2 0.000202 let [ver; items] = file | |
2 0.000032 0.000013 if !self.version_check(ver) | |
return | |
endif | |
" Assume properly saved and sorted. unique sort is not necessary here | |
2 0.000212 call extend(self.candidates, items) | |
2 0.000002 if self.is_loaded | |
2 0.026314 0.000046 let self.candidates = s:uniq(self.candidates) | |
2 0.000002 endif | |
2 0.000014 let self.mtime = getftime(mru_file) | |
2 0.000003 let self.is_loaded = 1 | |
FUNCTION 54() | |
Called 124 times | |
Total time: 0.604396 | |
Self time: 0.002803 | |
count total (s) self (s) | |
124 0.029529 0.000628 call self.load() | |
124 0.000465 let index = index(self.candidates, a:path) | |
124 0.000103 if index == 0 | |
77 0.000037 return | |
endif | |
47 0.000044 if index > 0 | |
47 0.000269 call remove(self.candidates, index) | |
47 0.000022 endif | |
47 0.000170 call insert(self.candidates, a:path) | |
47 0.000101 if len(self.candidates) > self.limit | |
let self.candidates = self.candidates[: self.limit - 1] | |
endif | |
47 0.000191 if localtime() > getftime(self.mru_file) + self.update_interval | |
33 0.573011 0.000319 call self.save() | |
33 0.000016 endif | |
FUNCTION 55() | |
Called 2 times | |
Total time: 0.000019 | |
Self time: 0.000019 | |
count total (s) self (s) | |
2 0.000009 if str2float(a:ver) < self.version | |
call s:print_error('Sorry, the version of MRU file is too old.') | |
return 0 | |
else | |
2 0.000000 return 1 | |
endif | |
FUNCTION 56() | |
Called 16 times | |
Total time: 0.323271 | |
Self time: 0.041301 | |
count total (s) self (s) | |
16 0.000033 if self.do_validate | |
16 0.323197 0.041227 call filter(self.candidates, 's:is_file_exist(v:val)') | |
16 0.000015 endif | |
FUNCTION 58() | |
Called 14 times | |
Total time: 0.000313 | |
Self time: 0.000313 | |
count total (s) self (s) | |
14 0.000179 syntax match uniteSource__FileMru_Time /([^)]*)\s\+/ contained containedin=uniteSource__FileMru | |
14 0.000105 highlight default link uniteSource__FileMru_Time Statement | |
FUNCTION neocomplete#context_filetype#set() | |
Called 19 times | |
Total time: 0.000469 | |
Self time: 0.000347 | |
count total (s) self (s) | |
19 0.000209 0.000087 let neocomplete = neocomplete#get_current_neocomplete() | |
19 0.000081 let context_filetype = s:exists_context_filetype ? context_filetype#get_filetype() : &filetype | |
19 0.000032 if context_filetype == '' | |
let context_filetype = 'nothing' | |
endif | |
19 0.000042 let neocomplete.context_filetype = context_filetype | |
19 0.000028 return neocomplete.context_filetype | |
FUNCTION neobundle#autoload#unite_sources() | |
Called 25 times | |
Total time: 0.004117 | |
Self time: 0.001803 | |
count total (s) self (s) | |
25 0.000044 let bundles = [] | |
25 0.001688 0.000200 let sources_bundles = filter(neobundle#config#get_autoload_bundles(), "has_key(v:val.autoload, 'unite_sources')") | |
103 0.000139 for source_name in a:sources | |
78 0.000122 if source_name ==# 'source' | |
" In source source, load all sources. | |
let bundles += copy(sources_bundles) | |
else | |
78 0.000464 let bundles += filter(copy(sources_bundles), "!empty(filter(copy(v:val.autoload.unite_sources), 'stridx(source_name, v:val) >= 0'))") | |
78 0.000060 endif | |
78 0.000052 endfor | |
25 0.001067 0.000241 call neobundle#config#source_bundles(neobundle#util#uniq(bundles)) | |
FUNCTION unite#helper#cursor_prompt() | |
Called 14 times | |
Total time: 0.000212 | |
Self time: 0.000131 | |
count total (s) self (s) | |
" Move to prompt linenr. | |
14 0.000123 0.000042 let unite = unite#get_current_unite() | |
14 0.000062 call cursor((unite.context.prompt_direction ==# 'below' ? line('$') : unite.init_prompt_linenr), 0) | |
FUNCTION unite#handlers#_restore_updatetime() | |
Called 28 times | |
Total time: 0.000563 | |
Self time: 0.000372 | |
count total (s) self (s) | |
28 0.000277 0.000086 let unite = unite#get_current_unite() | |
28 0.000056 if !has_key(unite, 'update_time_save') | |
return | |
endif | |
28 0.000058 if unite.context.update_time > 0 && &updatetime < unite.update_time_save | |
12 0.000045 let &updatetime = unite.update_time_save | |
12 0.000005 endif | |
FUNCTION unite#util#iconv() | |
Called 194298 times | |
Total time: 3.555014 | |
Self time: 0.938964 | |
count total (s) self (s) | |
194298 3.509224 0.893174 return call(s:get_process().iconv, a:000) | |
FUNCTION unite#variables#use_current_unite() | |
Called 16501 times | |
Total time: 0.022234 | |
Self time: 0.022234 | |
count total (s) self (s) | |
16501 0.017284 return s:use_current_unite | |
FUNCTION neocomplete#handler#_on_insert_leave() | |
Called 14 times | |
Total time: 0.066406 | |
Self time: 0.000566 | |
count total (s) self (s) | |
14 0.004731 0.000106 call neocomplete#helper#clear_result() | |
14 0.001625 0.000123 call s:close_preview_window() | |
14 0.059713 0.000092 call s:make_cache_current_line() | |
14 0.000171 0.000079 let neocomplete = neocomplete#get_current_neocomplete() | |
14 0.000036 let neocomplete.cur_text = '' | |
14 0.000044 let neocomplete.completed_item = {} | |
14 0.000030 let neocomplete.overlapped_items = {} | |
FUNCTION unite#init#_context() | |
Called 14 times | |
Total time: 0.008362 | |
Self time: 0.007498 | |
count total (s) self (s) | |
14 0.000065 let source_names = get(a:000, 0, []) | |
14 0.001789 0.000925 let default_context = extend(copy(unite#variables#default_context()), unite#custom#get_profile('default', 'context')) | |
14 0.000037 if len(source_names) == 1 | |
" Overwrite source context by profile. | |
call extend(default_context, unite#custom#get_profile( 'source/' . source_names[0], 'context')) | |
endif | |
14 0.000098 let profile_name = get(a:context, 'profile_name', get(a:context, 'buffer_name', 'default')) | |
14 0.000031 if profile_name !=# 'default' | |
" Overwrite context by profile. | |
call extend(default_context, unite#custom#get_profile( profile_name, 'context')) | |
endif | |
14 0.000072 let context = extend(default_context, a:context) | |
14 0.000031 if context.temporary || context.script | |
" User can overwrite context by profile context. | |
let context = extend(context, unite#custom#get_profile(profile_name, 'context')) | |
endif | |
" Generic no. | |
28 0.004719 for option in map(filter(items(context), "stridx(v:val[0], 'no_') == 0 && v:val[1]"), 'v:val[0]') | |
14 0.000062 let context[option[3:]] = 0 | |
14 0.000016 endfor | |
" Complex initializer. | |
14 0.000020 if context.complete | |
let context.start_insert = 1 | |
endif | |
14 0.000014 if context.horizontal | |
" Disable vertically. | |
let context.vertical = 0 | |
endif | |
14 0.000016 if context.immediately | |
" Ignore empty unite buffer. | |
let context.empty = 0 | |
endif | |
14 0.000016 if context.tab | |
let context.split = 0 | |
endif | |
14 0.000013 if context.here | |
" Set direction. | |
let context.horizontal = 1 | |
let context.direction = 'belowright' | |
endif | |
14 0.000059 if &l:modified && !&l:hidden | |
" Split automatically. | |
let context.split = 1 | |
endif | |
14 0.000044 if !has_key(a:context, 'buffer_name') && context.script | |
" Set buffer-name automatically. | |
let context.buffer_name = join(source_names) | |
endif | |
14 0.000016 if context.auto_preview | |
let context.winheight -= &previewheight | |
endif | |
14 0.000026 if context.prompt_direction == '' | |
14 0.000321 let context.prompt_direction = (context.direction =~# 'bel\|bot') && !context.vertical && !context.log ? 'below' : 'top' | |
14 0.000012 endif | |
14 0.000042 if context.prompt_direction ==# 'below' && !get(context, 'no_auto_resize', 0) | |
let context.auto_resize = 1 | |
endif | |
14 0.000032 if context.path != '' && context.path !~ '/$' | |
let context.path .= '/' | |
endif | |
14 0.000032 let context.is_changed = 0 | |
14 0.000018 return context | |
FUNCTION <SNR>99_get_buffer_list() | |
Called 14 times | |
Total time: 0.014932 | |
Self time: 0.012523 | |
count total (s) self (s) | |
" Get :ls flags. | |
14 0.000059 redir => output | |
14 0.005148 silent! ls | |
14 0.000106 redir END | |
14 0.000055 let flag_dict = {} | |
126 0.001562 for out in map(split(output, '\n'), 'split(v:val)') | |
112 0.001178 let flag_dict[out[0]] = matchstr(join(out), '^.*\ze\s\+"') | |
112 0.000083 endfor | |
" Make buffer list. | |
14 0.000022 let list = [] | |
14 0.000019 let bufnr = 1 | |
14 0.000218 0.000121 let buffer_list = unite#sources#buffer#variables#get_buffer_list() | |
168 0.000272 while bufnr <= bufnr('$') | |
154 0.002650 0.000928 if s:is_listed(a:is_bang, a:is_question, a:is_plus, a:is_minus, bufnr) && bufnr != bufnr('%') | |
98 0.000477 let dict = get(buffer_list, bufnr, { 'action__buffer_nr' : bufnr, 'source__time' : 0, }) | |
98 0.000320 let dict.source__flags = get(flag_dict, bufnr, '') | |
98 0.000324 call add(list, dict) | |
98 0.000058 endif | |
154 0.000189 let bufnr += 1 | |
154 0.000082 endwhile | |
14 0.000771 0.000359 call sort(list, 's:compare') | |
14 0.000224 0.000073 if s:is_listed(a:is_bang, a:is_question, a:is_plus, a:is_minus, bufnr('%')) | |
" Add current buffer. | |
14 0.000156 0.000129 let dict = get(unite#sources#buffer#variables#get_buffer_list(), bufnr('%'), { 'action__buffer_nr' : bufnr('%'), 'source__time' : 0, }) | |
14 0.000051 let dict.source__flags = get(flag_dict, bufnr('%'), '') | |
14 0.000047 call add(list, dict) | |
14 0.000011 endif | |
14 0.000012 return list | |
FUNCTION unite#helper#parse_options_args() | |
Called 14 times | |
Total time: 0.007643 | |
Self time: 0.002336 | |
count total (s) self (s) | |
14 0.000163 let _ = [] | |
14 0.005467 0.000160 let [args, options] = unite#helper#parse_options(a:args) | |
56 0.000087 for arg in args | |
" Add source name. | |
42 0.000445 let source_name = matchstr(arg, '^[^:]*') | |
42 0.000212 let source_arg = arg[len(source_name)+1 :] | |
42 0.000548 let source_args = source_arg == '' ? [] : map(split(source_arg, '\\\@<!:', 1), 'substitute(v:val, ''\\\(.\)'', "\\1", "g")') | |
42 0.000350 call add(_, insert(source_args, source_name)) | |
42 0.000037 endfor | |
14 0.000035 return [_, options] | |
FUNCTION 60() | |
Called 140 times | |
Total time: 0.293800 | |
Self time: 0.000745 | |
count total (s) self (s) | |
140 0.293715 0.000660 return s:on_post_filter(a:args, a:context) | |
FUNCTION 62() | |
Called 14 times | |
Total time: 0.021940 | |
Self time: 0.000134 | |
count total (s) self (s) | |
14 0.000118 0.000056 let mru = neomru#_get_mrus().file | |
14 0.021809 0.000065 return mru.gather_candidates(a:args, a:context) | |
FUNCTION <SNR>88_get_seperator() | |
Called 973 times | |
Total time: 0.322651 | |
Self time: 0.010964 | |
count total (s) self (s) | |
973 0.133602 0.004850 if s:should_change_group(a:prev_group, a:group) | |
705 0.187023 0.004088 return s:get_transitioned_seperator(a:self, a:prev_group, a:group, a:side) | |
else | |
268 0.000600 return a:side ? a:self._context.left_alt_sep : a:self._context.right_alt_sep | |
endif | |
FUNCTION 66() | |
Called 140 times | |
Total time: 0.001510 | |
Self time: 0.000739 | |
count total (s) self (s) | |
140 0.001412 0.000641 return s:converter(a:candidates, a:context) | |
FUNCTION unite#view#_clear_match() | |
Called 658 times | |
Total time: 0.011080 | |
Self time: 0.006835 | |
count total (s) self (s) | |
658 0.006178 0.001933 let unite = unite#get_current_unite() | |
658 0.000714 if unite.match_id > 0 | |
658 0.003247 silent! call matchdelete(unite.match_id) | |
658 0.000348 endif | |
FUNCTION unite#handlers#_on_insert_char_pre() | |
Called 144 times | |
Total time: 0.002816 | |
Self time: 0.001400 | |
count total (s) self (s) | |
144 0.002082 0.000666 let prompt_linenr = unite#get_current_unite().prompt_linenr | |
144 0.000385 if line('.') == prompt_linenr | |
144 0.000121 return | |
endif | |
call cursor(prompt_linenr, 0) | |
startinsert! | |
call unite#handlers#_on_cursor_moved() | |
FUNCTION unite#util#convert2list() | |
Called 1979 times | |
Total time: 0.005976 | |
Self time: 0.005976 | |
count total (s) self (s) | |
1979 0.005321 return type(a:expr) ==# type([]) ? a:expr : [a:expr] | |
FUNCTION unite#variables#set_current_unite() | |
Called 42 times | |
Total time: 0.000162 | |
Self time: 0.000162 | |
count total (s) self (s) | |
42 0.000128 let s:current_unite = a:unite | |
FUNCTION airline#extensions#default#apply() | |
Called 139 times | |
Total time: 0.051258 | |
Self time: 0.006272 | |
count total (s) self (s) | |
139 0.000270 let winnr = a:context.winnr | |
139 0.000208 let active = a:context.active | |
139 0.001350 0.000773 if airline#util#getwinvar(winnr, 'airline_render_left', active || (!active && !g:airline_inactive_collapse)) | |
47 0.008810 0.000258 call s:build_sections(a:builder, a:context, s:layout[0]) | |
47 0.000031 else | |
92 0.003276 0.000396 let text = s:get_section(winnr, 'c') | |
92 0.000120 if empty(text) | |
let text = ' %f%m ' | |
endif | |
92 0.001144 0.000477 call a:builder.add_section('airline_c'.(a:context.bufnr), text) | |
92 0.000061 endif | |
139 0.005481 0.000987 call a:builder.split(s:get_section(winnr, 'gutter', '', '')) | |
139 0.000901 0.000496 if airline#util#getwinvar(winnr, 'airline_render_right', 1) | |
139 0.028133 0.000722 call s:build_sections(a:builder, a:context, s:layout[1]) | |
139 0.000071 endif | |
139 0.000083 return 1 | |
FUNCTION <SNR>83_get_buffer_list() | |
Called 2160 times | |
Total time: 0.367929 | |
Self time: 0.367929 | |
count total (s) self (s) | |
2160 0.002976 let buffers = [] | |
2160 0.004794 let cur = bufnr('%') | |
28786 0.023624 for nr in range(1, bufnr('$')) | |
26626 0.045936 if buflisted(nr) && bufexists(nr) | |
20146 0.018981 for ex in s:excludes | |
if match(bufname(nr), ex) | |
continue | |
endif | |
endfor | |
20146 0.037277 if getbufvar(nr, 'current_syntax') == 'qf' | |
continue | |
endif | |
20146 0.046252 call add(buffers, nr) | |
20146 0.008518 endif | |
26626 0.012609 endfor | |
2160 0.004640 let s:current_buffer_list = buffers | |
2160 0.001812 return buffers | |
FUNCTION 86() | |
Called 420 times | |
Total time: 0.305939 | |
Self time: 0.004357 | |
count total (s) self (s) | |
420 0.001790 if a:context.input == '' || !has('float') || empty(a:candidates) | |
179 0.000197 return a:candidates | |
endif | |
241 0.303244 0.001662 return unite#filters#sorter_rank#_sort( a:candidates, a:context.input, unite#util#has_lua()) | |
FUNCTION unite#sources#buffer#variables#get_buffer_list() | |
Called 28 times | |
Total time: 0.000124 | |
Self time: 0.000124 | |
count total (s) self (s) | |
28 0.000077 return s:buffer_list | |
FUNCTION neosnippet#mappings#_clear_select_mode_mappings() | |
Called 36 times | |
Total time: 0.046801 | |
Self time: 0.046801 | |
count total (s) self (s) | |
36 0.000071 if !g:neosnippet#disable_select_mode_mappings | |
return | |
endif | |
36 0.000139 redir => mappings | |
36 0.016510 silent! smap | |
36 0.000128 redir END | |
42 0.027209 for map in map(filter(split(mappings, '\n'), "v:val !~# '^s' && v:val !~ '^\\a*\\s*<\\S\\+>'"), "matchstr(v:val, '^\\a*\\s*\\zs\\S\\+')") | |
6 0.000130 silent! execute 'sunmap' map | |
6 0.000022 silent! execute 'sunmap <buffer>' map | |
6 0.000005 endfor | |
" Define default select mode mappings. | |
36 0.000831 snoremap <CR> a<BS> | |
36 0.000473 snoremap <BS> a<BS> | |
36 0.000444 snoremap <Del> a<BS> | |
36 0.000424 snoremap <C-h> a<BS> | |
FUNCTION <SNR>44_on_window_changed() | |
Called 89 times | |
Total time: 0.470874 | |
Self time: 0.001147 | |
count total (s) self (s) | |
89 0.000236 if pumvisible() | |
return | |
endif | |
89 0.001773 0.000295 call <sid>init() | |
89 0.468582 0.000333 call airline#update_statusline() | |
FUNCTION 76() | |
Called 14 times | |
Total time: 0.380683 | |
Self time: 0.002263 | |
count total (s) self (s) | |
14 0.001286 0.000083 let a:context.source__directory = s:get_path(a:args, a:context) | |
14 0.000374 0.000043 if !unite#util#has_vimproc() | |
call unite#print_source_message( 'vimproc plugin is not installed.', self.name) | |
let a:context.is_async = 0 | |
return [] | |
endif | |
14 0.000023 let directory = a:context.source__directory | |
14 0.161018 0.000112 call unite#print_source_message( 'directory: ' . directory, self.name) | |
14 0.002142 0.000173 call s:init_continuation(a:context, directory) | |
14 0.000024 let continuation = a:context.source__continuation | |
14 0.000030 if empty(continuation.rest) || continuation.end | |
" Disable async. | |
let a:context.is_async = 0 | |
let continuation.end = 1 | |
return deepcopy(continuation.files) | |
endif | |
14 0.000037 let command = g:unite_source_rec_async_command | |
14 0.000013 if a:context.source__is_directory | |
" Use find command. | |
let command = 'find' | |
endif | |
14 0.000167 let args = split(command) | |
14 0.000132 if empty(args) || !executable(args[0]) | |
if empty(args) | |
call unite#print_source_message( 'You must install file list command and specify ' . 'g:unite_source_rec_async_command variable.', self.name) | |
else | |
call unite#print_source_message('async command : "'. command.'" is not executable.', self.name) | |
endif | |
let a:context.is_async = 0 | |
return [] | |
endif | |
" Note: If find command and args used, uses whole command line. | |
14 0.000026 if args[0] ==# 'find' | |
let command .= ' ' . string(directory) | |
if g:unite_source_rec_async_command ==# 'find' | |
" Default option. | |
let command .= ' -path ''*/\.git/*'' -prune -o -type l -print -o -type ' . (a:context.source__is_directory ? 'd' : 'f') . ' -print' | |
endif | |
else | |
14 0.000053 let command .= ' ' . string(directory) | |
14 0.000010 endif | |
" Note: "pt" needs pty. | |
14 0.210600 0.000626 let a:context.source__proc = vimproc#pgroup_open(command, fnamemodify(args[0], ':t') ==# 'pt') | |
" Close handles. | |
14 0.004202 0.000165 call a:context.source__proc.stdin.close() | |
14 0.000039 return [] | |
FUNCTION 77() | |
Called 77 times | |
Total time: 14.456950 | |
Self time: 1.085787 | |
count total (s) self (s) | |
77 0.000193 let stderr = a:context.source__proc.stderr | |
77 0.000087 if !stderr.eof | |
" Print error. | |
77 7.457160 0.001602 let errors = filter(unite#util#read_lines(stderr, 100), "v:val !~ '^\\s*$'") | |
77 0.000211 if !empty(errors) | |
call unite#print_source_error(errors, self.name) | |
endif | |
77 0.000054 endif | |
77 0.000281 let continuation = a:context.source__continuation | |
77 0.000196 let stdout = a:context.source__proc.stdout | |
77 6.167440 0.965974 let paths = map(filter( unite#util#read_lines(stdout, 2000), 'v:val != ""'), "unite#util#iconv(v:val, 'char', &encoding)") | |
77 0.001281 0.000256 if unite#util#is_windows() | |
let paths = map(paths, 'unite#util#substitute_path_separator(v:val)') | |
endif | |
77 0.323987 0.000460 let candidates = unite#helper#paths2candidates(paths) | |
77 0.000531 if stdout.eof || ( g:unite_source_rec_max_cache_files > 0 && len(continuation.files) > g:unite_source_rec_max_cache_files) | |
" Disable async. | |
10 0.000009 if !stdout.eof | |
call unite#print_source_message( 'Too many candidates.', self.name) | |
endif | |
10 0.000023 let a:context.is_async = 0 | |
10 0.000017 let continuation.end = 1 | |
10 0.003632 0.000176 call a:context.source__proc.waitpid() | |
10 0.000005 endif | |
77 0.011197 let continuation.files += candidates | |
77 0.000108 if stdout.eof | |
10 0.386217 0.000086 call s:write_cache(a:context, a:context.source__directory, continuation.files) | |
10 0.000004 endif | |
77 0.102155 return deepcopy(candidates) | |
FUNCTION 78() | |
Called 14 times | |
Total time: 0.005873 | |
Self time: 0.000144 | |
count total (s) self (s) | |
14 0.000043 let a:context.source__is_directory = 0 | |
14 0.005821 0.000092 call s:on_init(a:args, a:context) | |
FUNCTION 79() | |
Called 14 times | |
Total time: 0.009617 | |
Self time: 0.000139 | |
count total (s) self (s) | |
14 0.000041 if has_key(a:context, 'source__proc') | |
14 0.009558 0.000080 call a:context.source__proc.kill() | |
14 0.000008 endif | |
FUNCTION neosnippet#variables#data_dir() | |
Called 2 times | |
Total time: 0.000155 | |
Self time: 0.000155 | |
count total (s) self (s) | |
2 0.000141 let g:neosnippet#data_directory = substitute(fnamemodify(get( g:, 'neosnippet#data_directory', ($XDG_CACHE_HOME != '' ? $XDG_CACHE_HOME . '/neosnippet' : expand('~/.cache/neosnippet'))), ':p'), '\\', '/', 'g') | |
2 0.000004 if !isdirectory(g:neosnippet#data_directory) | |
call mkdir(g:neosnippet#data_directory, 'p') | |
endif | |
2 0.000002 return g:neosnippet#data_directory | |
FUNCTION <SNR>119_waitpid() | |
Called 24 times | |
Total time: 0.004531 | |
Self time: 0.000911 | |
count total (s) self (s) | |
24 0.000039 try | |
24 0.003735 0.000150 let [cond, status] = s:libcall('vp_waitpid', [a:pid]) | |
" echomsg string([a:pid, cond, status]) | |
14 0.000018 if cond ==# 'run' | |
" Add process list. | |
4 0.000015 let s:bg_processes[a:pid] = a:pid | |
4 0.000011 let [cond, status] = ['exit', '0'] | |
4 0.000006 elseif vimproc#util#is_windows() | |
call s:libcall('vp_close_handle', [a:pid]) | |
endif | |
14 0.000039 let s:last_status = str2nr(status) | |
14 0.000011 catch | |
10 0.000041 let [cond, status] = ['error', '0'] | |
10 0.000017 let s:last_status = -1 | |
10 0.000013 endtry | |
24 0.000062 return [cond, str2nr(status)] | |
FUNCTION unite#view#_set_candidates_lines() | |
Called 140 times | |
Total time: 0.015189 | |
Self time: 0.014392 | |
count total (s) self (s) | |
140 0.001174 0.000377 let unite = unite#get_current_unite() | |
140 0.000230 let modifiable_save = &l:modifiable | |
140 0.000124 try | |
140 0.000295 let pos = getpos('.') | |
140 0.000266 setlocal modifiable | |
" Clear candidates | |
140 0.000197 if unite.context.prompt_direction ==# 'below' | |
silent! execute '1,'.(unite.prompt_linenr-1).'$delete _' | |
call setline(1, a:lines) | |
let start = (unite.prompt_linenr == 0) ? len(a:lines)+1 : unite.prompt_linenr+1 | |
silent! execute start.',$delete _' | |
else | |
140 0.005246 silent! execute (unite.prompt_linenr+1).',$delete _' | |
140 0.005195 call setline(unite.prompt_linenr+1, a:lines) | |
140 0.000102 endif | |
140 0.000087 finally | |
140 0.000347 call setpos('.', pos) | |
140 0.000276 let &l:modifiable = modifiable_save | |
140 0.000113 endtry | |
FUNCTION neocomplete#is_locked() | |
Called 296 times | |
Total time: 0.013649 | |
Self time: 0.001934 | |
count total (s) self (s) | |
296 0.013389 0.001674 return neocomplete#is_cache_disabled() || &paste || g:neocomplete#disable_auto_complete | |
FUNCTION <SNR>112_strchars() | |
Called 140 times | |
Total time: 0.000563 | |
Self time: 0.000563 | |
count total (s) self (s) | |
140 0.000427 return strchars(a:str) | |
FUNCTION unite#helper#call_hook() | |
Called 910 times | |
Total time: 0.409789 | |
Self time: 0.033363 | |
count total (s) self (s) | |
910 0.018321 0.003709 let context = unite#get_context() | |
910 0.001019 if context.unite__disable_hooks | |
return | |
endif | |
1876 0.002358 for source in a:sources | |
966 0.002403 if !has_key(source.hooks, a:hook_name) | |
616 0.000822 continue | |
endif | |
350 0.000392 try | |
350 0.364443 0.002629 call call(source.hooks[a:hook_name], [source.args, source.unite__context], source.hooks) | |
350 0.000240 catch | |
call unite#print_error(v:throwpoint) | |
call unite#print_error(v:exception) | |
call unite#print_error( '[unite.vim] Error occurred in calling hook "' . a:hook_name . '"!') | |
call unite#print_error( '[unite.vim] Source name is ' . source.name) | |
endtry | |
350 0.000199 endfor | |
FUNCTION unite#view#_redraw_echo() | |
Called 14 times | |
Total time: 0.158607 | |
Self time: 0.157781 | |
count total (s) self (s) | |
14 0.000071 if has('vim_starting') | |
echo join(s:msg2list(a:expr), "\n") | |
return | |
endif | |
14 0.000028 let more_save = &more | |
14 0.000028 let showcmd_save = &showcmd | |
14 0.000015 let ruler_save = &ruler | |
14 0.000015 try | |
14 0.000049 set nomore | |
14 0.000015 set noshowcmd | |
14 0.000019 set noruler | |
14 0.001013 0.000187 let msg = map(s:msg2list(a:expr), "unite#util#truncate_smart( v:val, &columns-1, &columns/2, '...')") | |
14 0.000042 let height = max([1, &cmdheight]) | |
28 0.000080 for i in range(0, len(msg)-1, height) | |
14 0.152227 redraw | |
14 0.004510 echo join(msg[i : i+height-1], "\n") | |
14 0.000035 endfor | |
14 0.000015 finally | |
14 0.000094 let &more = more_save | |
14 0.000036 let &showcmd = showcmd_save | |
14 0.000038 let &ruler = ruler_save | |
14 0.000021 endtry | |
FUNCTION 84() | |
Called 933 times | |
Total time: 0.016500 | |
Self time: 0.006381 | |
count total (s) self (s) | |
933 0.016092 0.005973 return substitute(unite#util#escape_match(a:input), '\\\@<!|', '\\|', 'g') | |
FUNCTION 85() | |
Called 420 times | |
Total time: 1.867627 | |
Self time: 0.014051 | |
count total (s) self (s) | |
420 0.000857 if a:context.input == '' | |
111 0.003407 0.000535 return unite#filters#filter_matcher( a:candidates, '', a:context) | |
endif | |
309 0.000498 let candidates = a:candidates | |
756 0.001186 for input in a:context.input_list | |
447 1.858272 0.007568 let candidates = unite#filters#matcher_glob#glob_matcher( candidates, input, a:context) | |
447 0.000556 endfor | |
309 0.000293 return candidates | |
FUNCTION 87() | |
Called 280 times | |
Total time: 0.044464 | |
Self time: 0.007125 | |
count total (s) self (s) | |
280 0.000473 let candidates = a:candidates | |
560 0.000922 for default in s:default_converters | |
280 0.037890 0.001191 let filter = unite#get_filters(default) | |
280 0.000396 if !empty(filter) | |
280 0.002071 0.001431 let candidates = filter.filter(candidates, a:context) | |
280 0.000155 endif | |
280 0.000242 endfor | |
280 0.000225 return candidates | |
FUNCTION <SNR>85_get_syn() | |
Called 11544 times | |
Total time: 0.261084 | |
Self time: 0.261084 | |
count total (s) self (s) | |
" need to pass in mode, known to break on 7.3.547 | |
11544 0.037938 let mode = has('gui_running') ? 'gui' : 'cterm' | |
11544 0.084792 let color = synIDattr(synIDtrans(hlID(a:group)), a:what, mode) | |
11544 0.018208 if empty(color) || color == -1 | |
1132 0.007620 let color = synIDattr(synIDtrans(hlID('Normal')), a:what, mode) | |
1132 0.000586 endif | |
11544 0.015982 if empty(color) || color == -1 | |
if has('gui_running') | |
let color = a:what ==# 'fg' ? '#000000' : '#FFFFFF' | |
else | |
let color = a:what ==# 'fg' ? 0 : 1 | |
endif | |
endif | |
11544 0.008558 return color | |
FUNCTION <SNR>99_format_time() | |
Called 112 times | |
Total time: 0.001205 | |
Self time: 0.001205 | |
count total (s) self (s) | |
112 0.000203 if empty(a:time) | |
return '' | |
endif | |
112 0.000785 return strftime(g:unite_source_buffer_time_format, a:time) | |
FUNCTION airline#util#wrap() | |
Called 854 times | |
Total time: 0.004751 | |
Self time: 0.004751 | |
count total (s) self (s) | |
854 0.002012 if a:minwidth > 0 && winwidth(0) < a:minwidth | |
return '' | |
endif | |
854 0.001016 return a:text | |
FUNCTION <SNR>118_has_vimproc() | |
Called 14 times | |
Total time: 0.000146 | |
Self time: 0.000146 | |
count total (s) self (s) | |
14 0.000036 if !exists('s:exists_vimproc') | |
try | |
call vimproc#version() | |
let s:exists_vimproc = 1 | |
catch | |
let s:exists_vimproc = 0 | |
endtry | |
endif | |
14 0.000012 return s:exists_vimproc | |
FUNCTION unite#helper#get_substitute_input_loop() | |
Called 436 times | |
Total time: 0.002032 | |
Self time: 0.002032 | |
count total (s) self (s) | |
436 0.000961 if empty(a:substitute_patterns) | |
436 0.000740 return [a:input] | |
endif | |
let inputs = [a:input] | |
for pattern in a:substitute_patterns | |
let cnt = 0 | |
for input in inputs | |
if input =~ pattern.pattern | |
if type(pattern.subst) == type([]) | |
if len(inputs) == 1 | |
" List substitute. | |
let inputs = [] | |
for subst in pattern.subst | |
call add(inputs, substitute(input, pattern.pattern, subst, 'g')) | |
endfor | |
endif | |
else | |
let inputs[cnt] = substitute( input, pattern.pattern, pattern.subst, 'g') | |
endif | |
endif | |
let cnt += 1 | |
endfor | |
endfor | |
return inputs | |
FUNCTION <SNR>18_BMMunge() | |
Called 10 times | |
Total time: 0.000757 | |
Self time: 0.000512 | |
count total (s) self (s) | |
10 0.000036 let name = a:fname | |
10 0.000013 if name == '' | |
if !exists("g:menutrans_no_file") | |
let g:menutrans_no_file = "[No file]" | |
endif | |
let name = g:menutrans_no_file | |
else | |
10 0.000052 let name = fnamemodify(name, ':p:~') | |
10 0.000006 endif | |
" detach file name and separate it out: | |
10 0.000028 let name2 = fnamemodify(name, ':t') | |
10 0.000013 if a:bnum >= 0 | |
10 0.000027 let name2 = name2 . ' (' . a:bnum . ')' | |
10 0.000005 endif | |
10 0.000326 0.000081 let name = name2 . "\t" . <SID>BMTruncName(fnamemodify(name,':h')) | |
10 0.000051 let name = escape(name, "\\. \t|") | |
10 0.000061 let name = substitute(name, "&", "&&", "g") | |
10 0.000035 let name = substitute(name, "\n", "^@", "g") | |
10 0.000011 return name | |
FUNCTION unite#get_status_string() | |
Called 226 times | |
Total time: 0.043115 | |
Self time: 0.003338 | |
count total (s) self (s) | |
226 0.000655 if !exists('b:unite') | |
return '' | |
endif | |
226 0.041614 0.001837 return unite#view#_get_status_plane_string() . ' | '. unite#view#_get_status_tail_string() | |
FUNCTION unite#view#_quit() | |
Called 14 times | |
Total time: 1.874456 | |
Self time: 1.216047 | |
count total (s) self (s) | |
14 0.000037 if &filetype !=# 'unite' | |
return | |
endif | |
14 0.000036 let is_all = get(a:000, 0, 0) | |
" Save unite value. | |
14 0.000181 0.000068 let unite_save = unite#variables#current_unite() | |
14 0.000197 0.000066 call unite#set_current_unite(b:unite) | |
14 0.000018 let unite = b:unite | |
14 0.000023 let context = unite.context | |
" Clear mark. | |
56 0.000384 0.000095 for source in unite#loaded_sources_list() | |
199172 0.135167 for candidate in source.unite__cached_candidates | |
199130 0.215908 let candidate.unite__is_marked = 0 | |
199130 0.068257 endfor | |
42 0.000026 endfor | |
14 0.003087 0.000134 call unite#view#_save_position() | |
14 0.000023 if a:is_force || context.quit | |
14 0.000039 let bufname = bufname('%') | |
14 0.000038 if winnr('$') == 1 || !context.split | |
14 0.651494 0.000074 call unite#util#alternate_buffer() | |
14 0.000021 elseif is_all || !context.temporary | |
close! | |
if unite.winnr != winnr() | |
execute unite.winnr . 'wincmd w' | |
endif | |
call unite#view#_resize_window() | |
endif | |
14 0.003227 0.000250 call unite#handlers#_on_buf_unload(bufname) | |
14 0.000016 if !unite.has_preview_window | |
14 0.000160 let preview_windows = filter(range(1, winnr('$')), 'getwinvar(v:val, "&previewwindow") != 0') | |
14 0.000025 if !empty(preview_windows) | |
" Close preview window. | |
noautocmd pclose! | |
endif | |
14 0.000007 endif | |
14 0.000424 0.000062 call s:clear_previewed_buffer_list() | |
14 0.000046 if winnr('$') != 1 && !unite.context.temporary && winnr('$') == unite.winmax | |
14 0.000097 execute unite.win_rest_cmd | |
14 0.000043 execute unite.prev_winnr 'wincmd w' | |
14 0.000009 endif | |
14 0.000007 else | |
" Note: Except preview window. | |
let winnr = get(filter(range(1, winnr('$')), "winbufnr(v:val) == unite.prev_bufnr && !getwinvar(v:val, '&previewwindow')"), 0, unite.prev_winnr) | |
if winnr == winnr() | |
new | |
else | |
execute winnr 'wincmd w' | |
endif | |
let unite.prev_winnr = winnr() | |
endif | |
14 0.000015 if context.complete | |
if context.col < col('$') | |
startinsert | |
else | |
startinsert! | |
endif | |
" Skip next auto completion. | |
if exists('*neocomplcache#skip_next_complete') | |
call neocomplcache#skip_next_complete() | |
endif | |
else | |
14 0.756925 redraw | |
14 0.000049 endif | |
" Restore unite. | |
14 0.000321 0.000157 call unite#set_current_unite(unite_save) | |
FUNCTION <SNR>31_LocalBrowse() | |
Called 36 times | |
Total time: 0.000973 | |
Self time: 0.000973 | |
count total (s) self (s) | |
" Unfortunate interaction -- only DechoMsg debugging calls can be safely used here. | |
" Otherwise, the BufEnter event gets triggered when attempts to write to | |
" the DBG buffer are made. | |
36 0.000093 if !exists("s:vimentered") | |
" If s:vimentered doesn't exist, then the VimEnter event hasn't fired. It will, | |
" and so s:VimEnter() will then be calling this routine, but this time with s:vimentered defined. | |
" call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered doesn't exist)") | |
" call Dret("s:LocalBrowse") | |
return | |
endif | |
" call Dfunc("s:LocalBrowse(dirname<".a:dirname.">) (s:vimentered=".s:vimentered.")") | |
36 0.000128 if has("amiga") | |
" The check against '' is made for the Amiga, where the empty | |
" string is the current directory and not checking would break | |
" things such as the help command. | |
" call Decho("(LocalBrowse) dirname<".a:dirname."> (isdirectory, amiga)") | |
if a:dirname != '' && isdirectory(a:dirname) | |
sil! call netrw#LocalBrowseCheck(a:dirname) | |
endif | |
elseif isdirectory(a:dirname) | |
" call Decho("(LocalBrowse) dirname<".a:dirname."> (isdirectory, not amiga)") | |
sil! call netrw#LocalBrowseCheck(a:dirname) | |
else | |
" not a directory, ignore it | |
" call Decho("(LocalBrowse) dirname<".a:dirname."> not a directory, ignoring...") | |
36 0.000024 endif | |
" call Dret("s:LocalBrowse") | |
FUNCTION <SNR>167_uniq_by() | |
Called 55 times | |
Total time: 0.053364 | |
Self time: 0.053364 | |
count total (s) self (s) | |
55 0.009060 let list = map(copy(a:list), printf('[v:val, %s]', a:f)) | |
55 0.000086 let i = 0 | |
55 0.000080 let seen = {} | |
3670 0.004462 while i < len(list) | |
3615 0.009040 let key = string(list[i][1]) | |
3615 0.005069 if has_key(seen, key) | |
242 0.000638 call remove(list, i) | |
242 0.000099 else | |
3373 0.006164 let seen[key] = 1 | |
3373 0.002842 let i += 1 | |
3373 0.001477 endif | |
3615 0.001727 endwhile | |
55 0.005192 return map(list, 'v:val[0]') | |
FUNCTION unite#init#_candidates() | |
Called 211 times | |
Total time: 0.169258 | |
Self time: 0.166036 | |
count total (s) self (s) | |
211 0.001892 0.000611 let unite = unite#get_current_unite() | |
211 0.000274 let context = unite.context | |
211 0.003267 0.001326 let [max_width, max_source_name] = unite#helper#adjustments( winwidth(0), unite.max_source_name, 2) | |
211 0.000240 let is_multiline = 0 | |
211 0.000221 let candidates = [] | |
8276 0.005197 for candidate in a:candidates | |
8065 0.019454 let candidate.unite__abbr = get(candidate, 'abbr', candidate.word) | |
" Delete too long abbr. | |
8065 0.010336 if !&l:wrap && (candidate.is_multiline || context.multi_line) | |
let candidate.unite__abbr = candidate.unite__abbr[: max_width * (context.max_multi_lines + 1)+10] | |
elseif len(candidate.unite__abbr) > max_width * 2 && !context.wrap | |
let candidate.unite__abbr = candidate.unite__abbr[: max_width * 2] | |
endif | |
" Substitute tab. | |
8065 0.016807 if candidate.unite__abbr =~ '\t' | |
let candidate.unite__abbr = substitute( candidate.unite__abbr, '\t', repeat(' ', &tabstop), 'g') | |
endif | |
8065 0.010430 if context.wrap || (!candidate.is_multiline && !context.multi_line) | |
8065 0.017525 call add(candidates, candidate) | |
8065 0.005205 continue | |
endif | |
if candidate.unite__abbr !~ '\n' | |
" Auto split. | |
let abbr = candidate.unite__abbr | |
let candidate.unite__abbr = '' | |
while abbr !~ '^\s\+$' | |
let trunc_abbr = unite#util#strwidthpart( abbr, max_width) | |
let candidate.unite__abbr .= trunc_abbr . "~\n" | |
let abbr = ' ' . abbr[len(trunc_abbr):] | |
endwhile | |
let candidate.unite__abbr = substitute(candidate.unite__abbr, '\~\n$', '', '') | |
else | |
let candidate.unite__abbr = substitute(candidate.unite__abbr, '\r\?\n$', '^@', '') | |
endif | |
if candidate.unite__abbr !~ '\n' | |
let candidate.is_multiline = 0 | |
call add(candidates, candidate) | |
continue | |
endif | |
" Convert multi line. | |
let cnt = 0 | |
for multi in split( candidate.unite__abbr, '\r\?\n', 1)[: context.max_multi_lines-1] | |
let candidate_multi = (cnt != 0) ? deepcopy(candidate) : candidate | |
let candidate_multi.unite__abbr = (cnt == 0 ? '+ ' : '| ') . multi | |
if cnt != 0 | |
let candidate_multi.is_dummy = 1 | |
endif | |
let is_multiline = 1 | |
call add(candidates, candidate_multi) | |
let cnt += 1 | |
endfor | |
endfor | |
" Multiline check. | |
211 0.000289 if is_multiline || context.multi_line | |
for candidate in filter(copy(candidates), '!v:val.is_multiline') | |
let candidate.unite__abbr = ' ' . candidate.unite__abbr | |
endfor | |
let unite.is_multi_line = 1 | |
endif | |
211 0.000193 return candidates | |
FUNCTION airline#extensions#tabline#get() | |
Called 217 times | |
Total time: 0.334856 | |
Self time: 0.003767 | |
count total (s) self (s) | |
217 0.000862 let curtabcnt = tabpagenr('$') | |
217 0.000420 if curtabcnt != s:current_tabcnt | |
let s:current_tabcnt = curtabcnt | |
let s:current_bufnr = -1 " force a refresh... | |
endif | |
217 0.000360 if s:show_buffers && curtabcnt == 1 | |
217 0.332209 0.001120 return s:get_buffers() | |
else | |
return s:get_tabs() | |
endif | |
FUNCTION 90() | |
Called 140 times | |
Total time: 2.251089 | |
Self time: 0.016149 | |
count total (s) self (s) | |
140 0.001973 if a:context.input =~ '^\%(/\|\a\+:/\)' | |
" Use full path. | |
return unite#filters#converter_full_path#define().filter( a:candidates, a:context) | |
endif | |
140 0.000140 try | |
140 0.001417 0.001086 let directory = unite#util#substitute_path_separator(getcwd()) | |
140 0.000204 let old_dir = directory | |
140 0.000333 if has_key(a:context, 'source__directory') | |
140 0.000850 let directory = substitute(a:context.source__directory, '*', '', 'g') | |
140 0.001446 if directory !=# old_dir && isdirectory(directory) && a:context.input == '' | |
34 0.001085 0.000137 call unite#util#lcd(directory) | |
34 0.000020 endif | |
140 0.000073 endif | |
140 0.004137 0.000396 if unite#util#has_lua() | |
140 2.226842 0.001220 return unite#filters#converter_relative_word#lua( a:candidates, directory) | |
endif | |
for candidate in a:candidates | |
let candidate.word = unite#util#substitute_path_separator( fnamemodify(get(candidate, 'action__path', candidate.word), ':~:.')) | |
endfor | |
finally | |
140 0.000814 if has_key(a:context, 'source__directory') && directory !=# old_dir | |
137 0.008321 0.004023 call unite#util#lcd(old_dir) | |
137 0.000073 endif | |
140 0.000133 endtry | |
return a:candidates | |
FUNCTION <SNR>37_winshell() | |
Called 60 times | |
Total time: 0.000290 | |
Self time: 0.000290 | |
count total (s) self (s) | |
60 0.000261 return &shell =~? 'cmd' || exists('+shellslash') && !&shellslash | |
FUNCTION unite#set_context() | |
Called 14 times | |
Total time: 0.000655 | |
Self time: 0.000264 | |
count total (s) self (s) | |
14 0.000361 0.000053 let old_context = unite#get_context() | |
14 0.000036 if exists('b:unite') && !unite#variables#use_current_unite() | |
let b:unite.context = a:context | |
else | |
14 0.000138 0.000055 let current_unite = unite#variables#current_unite() | |
14 0.000033 let current_unite.context = a:context | |
14 0.000007 endif | |
14 0.000014 return old_context | |
FUNCTION neocomplete#get_source_filetypes() | |
Called 38 times | |
Total time: 0.006703 | |
Self time: 0.000347 | |
count total (s) self (s) | |
38 0.006663 0.000307 return neocomplete#helper#get_source_filetypes(a:filetype) | |
FUNCTION <SNR>136_uniq() | |
Called 1 time | |
Total time: 0.000063 | |
Self time: 0.000007 | |
count total (s) self (s) | |
1 0.000063 0.000007 return s:uniq_by(a:list, 'v:val') | |
FUNCTION <SNR>37_buffer_commit() | |
Called 10 times | |
Total time: 0.000365 | |
Self time: 0.000118 | |
count total (s) self (s) | |
10 0.000360 0.000113 return matchstr(self.spec(),'^fugitive://.\{-\}//\zs\w*') | |
FUNCTION unite#helper#parse_project_bang() | |
Called 14 times | |
Total time: 0.000257 | |
Self time: 0.000257 | |
count total (s) self (s) | |
14 0.000122 let args = filter(copy(a:args), "v:val != '!'") | |
14 0.000017 if empty(args) | |
let args = [''] | |
endif | |
14 0.000026 if get(a:args, 0, '') == '!' | |
" Use project directory. | |
let args[0] = unite#util#path2project_directory(args[0], 1) | |
endif | |
14 0.000011 return args | |
FUNCTION unite#variables#static() | |
Called 9356 times | |
Total time: 0.062114 | |
Self time: 0.062114 | |
count total (s) self (s) | |
9356 0.017557 if !exists('s:static') | |
let s:static = {} | |
let s:static.sources = {} | |
let s:static.kinds = {} | |
let s:static.filters = {} | |
endif | |
9356 0.007322 return s:static | |
FUNCTION unite#helper#get_current_candidate() | |
Called 50 times | |
Total time: 0.002206 | |
Self time: 0.001294 | |
count total (s) self (s) | |
50 0.000172 let linenr = a:0 >= 1? a:1 : line('.') | |
50 0.000512 0.000153 let unite = unite#get_current_unite() | |
50 0.000102 if unite.context.prompt_direction ==# 'below' | |
let num = unite.prompt_linenr == 0 ? linenr - line('$') - 1 : linenr == unite.prompt_linenr ? -1 : linenr - line('$') | |
else | |
50 0.000147 let num = linenr == unite.prompt_linenr ? 0 : linenr - 1 - unite.prompt_linenr | |
50 0.000032 endif | |
50 0.000082 let unite.candidate_cursor = num | |
50 0.000797 0.000244 return get(unite#get_unite_candidates(), num, {}) | |
FUNCTION <SNR>104_on_post_filter() | |
Called 140 times | |
Total time: 0.293055 | |
Self time: 0.062902 | |
count total (s) self (s) | |
12587 0.008296 for candidate in a:context.candidates | |
12447 0.276703 0.046550 let candidate.action__directory = unite#util#path2directory(candidate.action__path) | |
12447 0.005028 endfor | |
FUNCTION airline#util#getwinvar() | |
Called 1105 times | |
Total time: 0.003824 | |
Self time: 0.003824 | |
count total (s) self (s) | |
1105 0.003457 return getwinvar(a:winnr, a:key, a:def) | |
FUNCTION unite#util#smart_execute_command() | |
Called 9 times | |
Total time: 1.027518 | |
Self time: 0.022531 | |
count total (s) self (s) | |
9 1.027506 0.022519 execute a:action . ' ' . fnameescape(a:word) | |
FUNCTION <SNR>37_define_commands() | |
Called 10 times | |
Total time: 0.002523 | |
Self time: 0.002523 | |
count total (s) self (s) | |
280 0.000241 for command in s:commands | |
270 0.002035 exe 'command! -buffer '.command | |
270 0.000163 endfor | |
FUNCTION <SNR>175_skip_else() | |
Called 406 times | |
Total time: 0.012235 | |
Self time: 0.008203 | |
count total (s) self (s) | |
406 0.000664 if a:script[a:i] == "'" | |
" Single quote. | |
14 0.003588 0.000076 let [string, i] = s:skip_single_quote(a:script, a:i) | |
14 0.000021 let script = a:args . string | |
14 0.000013 elseif a:script[a:i] == '"' | |
" Double quote. | |
14 0.000581 0.000061 let [string, i] = s:skip_double_quote(a:script, a:i) | |
14 0.000024 let script = a:args . string | |
14 0.000014 elseif a:script[a:i] == '`' | |
" Back quote. | |
let [string, i] = s:skip_back_quote(a:script, a:i) | |
let script = a:args . string | |
elseif a:script[a:i] == '\' | |
" Escape. | |
let script = a:args . '\' . a:script[a:i+1] | |
let i = a:i + 2 | |
else | |
378 0.000725 let script = a:args . a:script[a:i] | |
378 0.000355 let i = a:i + 1 | |
378 0.000143 endif | |
406 0.000448 return [script, i] | |
FUNCTION <SNR>99_compare() | |
Called 189 times | |
Total time: 0.000412 | |
Self time: 0.000412 | |
count total (s) self (s) | |
189 0.000354 return a:candidate_b.source__time - a:candidate_a.source__time | |
FUNCTION vimproc#util#substitute_path_separator() | |
Called 14 times | |
Total time: 0.000070 | |
Self time: 0.000070 | |
count total (s) self (s) | |
14 0.000053 return s:is_windows ? substitute(a:path, '\\', '/', 'g') : a:path | |
FUNCTION <SNR>175_skip_single_quote() | |
Called 42 times | |
Total time: 0.011198 | |
Self time: 0.011198 | |
count total (s) self (s) | |
42 0.000081 let max = len(a:script) | |
42 0.000047 let string = '' | |
42 0.000041 let i = a:i | |
" a:script[i] is always "'" when this function is called | |
42 0.000088 if i >= max || a:script[i] != '''' | |
throw 'Exception: Quote ('') is not found.' | |
endif | |
42 0.000072 let string .= a:script[i] | |
42 0.000038 let i += 1 | |
42 0.000042 let ss = [] | |
1050 0.000730 while i < max | |
1050 0.001353 if a:script[i] == '''' | |
42 0.000062 if i+1 < max && a:script[i+1] == '''' | |
" Escape quote. | |
let ss += [a:script[i]] | |
let i += 1 | |
else | |
42 0.000023 break | |
endif | |
endif | |
1008 0.001669 let ss += [a:script[i]] | |
1008 0.000804 let i += 1 | |
1008 0.000502 endwhile | |
42 0.000293 let string .= join(ss, '') | |
42 0.000037 if i < max | |
" must end with "'" | |
42 0.000061 if a:script[i] != '''' | |
throw 'Exception: Quote ('') is not found.' | |
endif | |
42 0.000081 let string .= a:script[i] | |
42 0.000039 let i += 1 | |
42 0.000022 endif | |
42 0.000054 return [string, i] | |
FUNCTION neocomplete#is_cache_disabled() | |
Called 548 times | |
Total time: 0.022357 | |
Self time: 0.014383 | |
count total (s) self (s) | |
548 0.002140 let ignore_filetypes = ['fuf', 'ku'] | |
548 0.002237 let bufnr = a:0 > 0 ? a:1 : bufnr('%') | |
548 0.017199 0.009225 return !neocomplete#is_enabled() || index(ignore_filetypes, &filetype) >= 0 || neocomplete#get_current_neocomplete().lock || (g:neocomplete#lock_buffer_name_pattern != '' && bufname(bufnr) =~ g:neocomplete#lock_buffer_name_pattern) | |
FUNCTION unite#util#truncate_smart() | |
Called 14 times | |
Total time: 0.000779 | |
Self time: 0.000127 | |
count total (s) self (s) | |
14 0.000771 0.000119 return call(s:get_prelude().truncate_skipping, a:000) | |
FUNCTION unite#get_current_unite() | |
Called 16832 times | |
Total time: 0.114477 | |
Self time: 0.089454 | |
count total (s) self (s) | |
16832 0.109070 0.084047 return exists('b:unite') && !unite#variables#use_current_unite() ? b:unite : unite#variables#current_unite() | |
FUNCTION <SNR>37_buffer_type() | |
Called 10 times | |
Total time: 0.001625 | |
Self time: 0.000898 | |
count total (s) self (s) | |
10 0.000058 0.000035 if self.getvar('fugitive_type') != '' | |
let type = self.getvar('fugitive_type') | |
elseif fnamemodify(self.spec(),':p') =~# '.\git/refs/\|\.git/\w*HEAD$' | |
let type = 'head' | |
elseif self.getline(1) =~ '^tree \x\{40\}$' && self.getline(2) == '' | |
let type = 'tree' | |
elseif self.getline(1) =~ '^\d\{6\} \w\{4\} \x\{40\}\>\t' | |
let type = 'tree' | |
elseif self.getline(1) =~ '^\d\{6\} \x\{40\}\> \d\t' | |
let type = 'index' | |
elseif isdirectory(self.spec()) | |
let type = 'directory' | |
elseif self.spec() == '' | |
let type = 'null' | |
else | |
10 0.000010 let type = 'file' | |
10 0.000006 endif | |
10 0.000007 if a:0 | |
10 0.000094 return !empty(filter(copy(a:000),'v:val ==# type')) | |
else | |
return type | |
endif | |
FUNCTION unite#print_source_message() | |
Called 14 times | |
Total time: 0.160906 | |
Self time: 0.000151 | |
count total (s) self (s) | |
14 0.160892 0.000137 return unite#view#_print_source_message(a:message, a:source_name) | |
FUNCTION neocomplete#init#is_enabled() | |
Called 581 times | |
Total time: 0.001436 | |
Self time: 0.001436 | |
count total (s) self (s) | |
581 0.000921 return s:is_enabled | |
FUNCTION unite#helper#get_postfix() | |
Called 14 times | |
Total time: 0.001121 | |
Self time: 0.001121 | |
count total (s) self (s) | |
14 0.000114 let prefix = substitute(a:prefix, '@\d\+$', '', '') | |
14 0.000064 let buffers = get(a:000, 0, range(1, bufnr('$'))) | |
14 0.000748 let buflist = sort(filter(map(buffers, 'bufname(v:val)'), 'stridx(v:val, prefix) >= 0')) | |
14 0.000040 if empty(buflist) | |
return '' | |
endif | |
14 0.000107 return a:is_create ? '@'.(matchstr(buflist[-1], '@\zs\d\+$') + 1) : matchstr(buflist[-1], '@\d\+$') | |
FUNCTION <SNR>37_repo_dir() | |
Called 22 times | |
Total time: 0.000177 | |
Self time: 0.000177 | |
count total (s) self (s) | |
22 0.000159 return join([self.git_dir]+a:000,'/') | |
FUNCTION <SNR>119_libcall_raw_read() | |
Called 2916 times | |
Total time: 7.664452 | |
Self time: 7.664452 | |
count total (s) self (s) | |
" End Of Value | |
2916 0.005321 let EOV = "\xFF" | |
2916 0.036598 let args = empty(a:args) ? '' : (join(reverse(copy(a:args)), EOV) . EOV) | |
2916 7.557628 let result = libcall(g:vimproc#dll_path, a:func, args) | |
" SUCCESS:: EOV | EOF[0|1] | Bin | |
" ERROR :: ErrStr | |
2916 0.013950 if result[0] !=# EOV | |
let s:lasterr = [result] | |
let msg = vimproc#util#iconv(string(result), vimproc#util#systemencoding(), &encoding) | |
throw printf('vimproc: %s: %s', a:func, msg) | |
endif | |
2916 0.016515 return [result[2:], result[1]] | |
FUNCTION unite#handlers#_on_insert_leave() | |
Called 14 times | |
Total time: 0.000791 | |
Self time: 0.000361 | |
count total (s) self (s) | |
14 0.000194 0.000057 let unite = unite#get_current_unite() | |
14 0.000036 if line('.') != unite.prompt_linenr | |
2 0.000013 call cursor(0, 1) | |
2 0.000002 endif | |
14 0.000026 let unite.is_insert = 0 | |
14 0.000352 0.000059 let unite.context.input = unite#helper#get_input() | |
14 0.000018 if &filetype ==# 'unite' | |
14 0.000058 setlocal nomodifiable | |
14 0.000007 endif | |
FUNCTION unite#get_data_directory() | |
Called 24 times | |
Total time: 0.001953 | |
Self time: 0.001953 | |
count total (s) self (s) | |
24 0.001732 let g:unite_data_directory = substitute(substitute(fnamemodify( get(g:, 'unite_data_directory', ($XDG_CACHE_HOME != '' ? $XDG_CACHE_HOME . '/unite' : expand('~/.cache/unite'))), ':p'), '\\', '/', 'g'), '/$', '', '') | |
24 0.000077 if !isdirectory(g:unite_data_directory) | |
call mkdir(g:unite_data_directory, 'p') | |
endif | |
24 0.000030 return g:unite_data_directory | |
FUNCTION unite#init#_filters() | |
Called 4563 times | |
Total time: 0.106982 | |
Self time: 0.046738 | |
count total (s) self (s) | |
4563 0.105414 0.045170 return extend(copy(unite#variables#static().filters), unite#variables#dynamic().filters) | |
FUNCTION <SNR>106_get_path() | |
Called 14 times | |
Total time: 0.001203 | |
Self time: 0.000581 | |
count total (s) self (s) | |
14 0.000315 0.000058 let args = unite#helper#parse_project_bang(a:args) | |
14 0.000028 let directory = get(args, 0, '') | |
14 0.000016 if directory == '' | |
let directory = isdirectory(a:context.path) ? a:context.path : getcwd() | |
endif | |
14 0.000013 if a:context.unite__is_restart | |
let directory = unite#util#input('Target: ', directory, 'dir', a:context.source_name) | |
endif | |
14 0.000575 0.000210 let directory = unite#util#substitute_path_separator( fnamemodify(unite#util#expand(directory), ':p')) | |
14 0.000076 if directory != '/' && directory =~ '/$' | |
14 0.000031 let directory = directory[: -2] | |
14 0.000004 endif | |
14 0.000012 return directory | |
FUNCTION 23() | |
Called 233 times | |
Total time: 0.546877 | |
Self time: 0.080057 | |
count total (s) self (s) | |
233 0.000278 let side = 1 | |
233 0.000283 let line = '' | |
233 0.000238 let i = 0 | |
233 0.000488 let length = len(self._sections) | |
233 0.000226 let split = 0 | |
2011 0.002339 while i < length | |
1778 0.003356 let section = self._sections[i] | |
1778 0.002807 let group = section[0] | |
1778 0.002774 let contents = section[1] | |
1778 0.027833 0.007898 let prev_group = s:get_prev_group(self._sections, i) | |
1778 0.001854 if group == '' | |
106 0.000212 let line .= contents | |
106 0.000095 elseif group == '|' | |
233 0.000221 let side = 0 | |
233 0.000424 let line .= contents | |
233 0.000240 let split = 1 | |
233 0.000110 else | |
1439 0.001569 if prev_group == '' | |
233 0.000608 let line .= '%#'.group.'#' | |
233 0.000197 elseif split | |
233 0.068621 0.001378 let line .= s:get_transitioned_seperator(self, prev_group, group, side) | |
233 0.000278 let split = 0 | |
233 0.000119 else | |
973 0.327933 0.005282 let line .= s:get_seperator(self, prev_group, group, side) | |
973 0.000626 endif | |
1439 0.066771 0.009780 let line .= s:get_accented_line(self, group, contents) | |
1439 0.000810 endif | |
1778 0.002670 let i = i + 1 | |
1778 0.001158 endwhile | |
233 0.000247 if !self._context.active | |
92 0.002583 let line = substitute(line, '%#.\{-}\ze#', '\0_inactive', 'g') | |
92 0.000058 endif | |
233 0.000241 return line | |
FUNCTION <SNR>83_get_buffers() | |
Called 217 times | |
Total time: 0.331089 | |
Self time: 0.020806 | |
count total (s) self (s) | |
217 0.000626 let cur = bufnr('%') | |
217 0.000311 if cur == s:current_bufnr | |
167 0.000684 if !g:airline_detect_modified || getbufvar(cur, '&modified') == s:current_modified | |
165 0.000355 return s:current_tabline | |
endif | |
2 0.000001 endif | |
52 0.000066 let l:index = 1 | |
52 0.003097 0.000206 let b = s:new_builder() | |
52 0.000167 let tab_bufs = tabpagebuflist(tabpagenr()) | |
482 0.135767 0.000586 for nr in s:get_visible_buffers() | |
430 0.000340 if nr < 0 | |
12 0.000120 0.000060 call b.add_raw('%#airline_tabhid#...') | |
12 0.000014 continue | |
endif | |
418 0.000342 if cur == nr | |
38 0.000093 if g:airline_detect_modified && getbufvar(nr, '&modified') | |
1 0.000002 let group = 'airline_tabmod' | |
1 0.000000 else | |
37 0.000045 let group = 'airline_tabsel' | |
37 0.000017 endif | |
38 0.000110 let s:current_modified = (group == 'airline_tabmod') ? 1 : 0 | |
38 0.000019 else | |
380 0.000909 if g:airline_detect_modified && getbufvar(nr, '&modified') | |
let group = 'airline_tabmod_unsel' | |
elseif index(tab_bufs, nr) > -1 | |
51 0.000057 let group = 'airline_tab' | |
51 0.000048 else | |
329 0.000394 let group = 'airline_tabhid' | |
329 0.000166 endif | |
380 0.000185 endif | |
418 0.000412 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 | |
418 0.004391 0.002252 call b.add_section(group, s:spc.'%(%{airline#extensions#tabline#get_buffer_name('.nr.')}%)'.s:spc) | |
418 0.000185 endif | |
418 0.000235 endfor | |
52 0.000447 0.000185 call b.add_section('airline_tabfill', '') | |
52 0.000385 0.000123 call b.split() | |
52 0.000377 0.000152 call b.add_section('airline_tabfill', '') | |
52 0.000350 0.000135 call b.add_section('airline_tabtype', ' buffers ') | |
52 0.000097 let s:current_bufnr = cur | |
52 0.169329 0.000281 let s:current_tabline = b.build() | |
52 0.000070 return s:current_tabline | |
FUNCTION <SNR>106_on_init() | |
Called 14 times | |
Total time: 0.005729 | |
Self time: 0.005729 | |
count total (s) self (s) | |
14 0.000061 augroup plugin-unite-source-file_rec | |
14 0.005418 autocmd! | |
14 0.000203 autocmd BufEnter,BufWinEnter,BufFilePost,BufWritePost * call unite#sources#rec#_append() | |
14 0.000017 augroup END | |
FUNCTION 25() | |
Called 14 times | |
Total time: 0.001604 | |
Self time: 0.001604 | |
count total (s) self (s) | |
14 0.000221 syntax match uniteSource__Buffer_Name /[^/ \[\]]\+\s/ contained containedin=uniteSource__Buffer | |
14 0.000106 highlight default link uniteSource__Buffer_Name Function | |
14 0.000172 syntax match uniteSource__Buffer_Prefix /\s\d\+\s\%(\S\+\)\?/ contained containedin=uniteSource__Buffer | |
14 0.000103 highlight default link uniteSource__Buffer_Prefix Constant | |
14 0.000151 syntax match uniteSource__Buffer_Info /\[.\{-}\] / contained containedin=uniteSource__Buffer | |
14 0.000098 highlight default link uniteSource__Buffer_Info PreProc | |
14 0.000140 syntax match uniteSource__Buffer_Modified /\[.\{-}+\]/ contained containedin=uniteSource__Buffer | |
14 0.000102 highlight default link uniteSource__Buffer_Modified Statement | |
14 0.000140 syntax match uniteSource__Buffer_NoFile /\[nofile\]/ contained containedin=uniteSource__Buffer | |
14 0.000093 highlight default link uniteSource__Buffer_NoFile Function | |
14 0.000132 syntax match uniteSource__Buffer_Time /(.\{-}) / contained containedin=uniteSource__Buffer | |
14 0.000097 highlight default link uniteSource__Buffer_Time Statement | |
FUNCTION fugitive#extract_git_dir() | |
Called 10 times | |
Total time: 0.003049 | |
Self time: 0.001766 | |
count total (s) self (s) | |
10 0.000255 0.000097 if s:shellslash(a:path) =~# '^fugitive://.*//' | |
return matchstr(s:shellslash(a:path), '\C^fugitive://\zs.\{-\}\ze//') | |
endif | |
10 0.000268 0.000166 let root = s:shellslash(simplify(fnamemodify(a:path, ':p:s?[\/]$??'))) | |
10 0.000011 let previous = "" | |
28 0.000041 while root !=# previous | |
28 0.000149 if root =~# '\v^//%([^/]+/?)?$' | |
" This is for accessing network shares from Cygwin Vim. There won't be | |
" any git directory called //.git or //serverName/.git so let's avoid | |
" checking for them since such checks are extremely slow. | |
break | |
endif | |
28 0.000142 if index(split($GIT_CEILING_DIRECTORIES, ':'), root) >= 0 | |
break | |
endif | |
28 0.000068 if root ==# $GIT_WORK_TREE && fugitive#is_git_dir($GIT_DIR) | |
return $GIT_DIR | |
endif | |
28 0.000503 0.000097 if fugitive#is_git_dir($GIT_DIR) | |
" Ensure that we've cached the worktree | |
call s:configured_tree($GIT_DIR) | |
if has_key(s:dir_for_worktree, root) | |
return s:dir_for_worktree[root] | |
endif | |
endif | |
28 0.000283 0.000110 let dir = s:sub(root, '[\/]$', '') . '/.git' | |
28 0.000087 let type = getftype(dir) | |
28 0.000251 0.000063 if type ==# 'dir' && fugitive#is_git_dir(dir) | |
10 0.000008 return dir | |
elseif type ==# 'link' && fugitive#is_git_dir(dir) | |
return resolve(dir) | |
elseif type !=# '' && filereadable(dir) | |
let line = get(readfile(dir, '', 1), 0, '') | |
if line =~# '^gitdir: \.' && fugitive#is_git_dir(root.'/'.line[8:-1]) | |
return simplify(root.'/'.line[8:-1]) | |
elseif line =~# '^gitdir: ' && fugitive#is_git_dir(line[8:-1]) | |
return line[8:-1] | |
endif | |
elseif fugitive#is_git_dir(root) | |
return root | |
endif | |
18 0.000023 let previous = root | |
18 0.000044 let root = fnamemodify(root, ':h') | |
18 0.000013 endwhile | |
return '' | |
FUNCTION <SNR>107__encode_name() | |
Called 11 times | |
Total time: 0.000779 | |
Self time: 0.000414 | |
count total (s) self (s) | |
" Check cache directory. | |
11 0.000106 if !isdirectory(a:cache_dir) | |
call mkdir(a:cache_dir, 'p') | |
endif | |
11 0.000024 let cache_dir = a:cache_dir | |
11 0.000120 if cache_dir !~ '/$' | |
11 0.000021 let cache_dir .= '/' | |
11 0.000003 endif | |
11 0.000438 0.000073 return cache_dir . s:_create_hash(cache_dir, a:filename) | |
FUNCTION unite#loaded_sources_list() | |
Called 282 times | |
Total time: 0.006608 | |
Self time: 0.001304 | |
count total (s) self (s) | |
282 0.006381 0.001077 return unite#variables#loaded_sources() | |
FUNCTION unite#get_sources() | |
Called 79 times | |
Total time: 0.004244 | |
Self time: 0.000495 | |
count total (s) self (s) | |
79 0.004197 0.000448 return call('unite#variables#sources', a:000) | |
FUNCTION unite#util#strwidthpart() | |
Called 75 times | |
Total time: 0.066856 | |
Self time: 0.000480 | |
count total (s) self (s) | |
75 0.066820 0.000444 return call(s:get_prelude().strwidthpart, a:000) | |
FUNCTION <SNR>28_strwidthpart() | |
Called 75 times | |
Total time: 0.066025 | |
Self time: 0.057174 | |
count total (s) self (s) | |
75 0.000069 if a:width <= 0 | |
return '' | |
endif | |
75 0.000096 let ret = a:str | |
75 0.000483 0.000255 let width = s:wcswidth(a:str) | |
4771 0.003742 while width > a:width | |
4696 0.027489 let char = matchstr(ret, '.$') | |
4696 0.009088 let ret = ret[: -1 - len(char)] | |
4696 0.020774 0.012151 let width -= s:wcswidth(char) | |
4696 0.002060 endwhile | |
75 0.000061 return ret | |
FUNCTION unite#redraw() | |
Called 135 times | |
Total time: 23.119373 | |
Self time: 0.001485 | |
count total (s) self (s) | |
135 23.119258 0.001370 call unite#view#_redraw(0, get(a:000, 0, 0), get(a:000, 1, 0)) | |
FUNCTION neosnippet#commands#_make_cache() | |
Called 24 times | |
Total time: 0.002620 | |
Self time: 0.000988 | |
count total (s) self (s) | |
24 0.000251 0.000094 call neosnippet#init#check() | |
24 0.000059 let filetype = a:filetype == '' ? &filetype : a:filetype | |
24 0.000024 if filetype ==# '' | |
let filetype = 'nothing' | |
endif | |
24 0.000247 0.000079 let snippets = neosnippet#variables#snippets() | |
24 0.000044 if has_key(snippets, filetype) | |
23 0.000016 return | |
endif | |
1 0.000002 let snippets[filetype] = {} | |
1 0.000059 0.000010 let path = join(neosnippet#helpers#get_snippets_directory(), ',') | |
1 0.000002 let snippets_files = [] | |
4 0.000096 0.000042 for glob in s:get_list().flatten( map(split(get(g:neosnippet#scope_aliases, filetype, filetype), '\s*,\s*'), " [v:val . '.snip*', v:val . '/**/*.snip*'] + (filetype != '_' && !has_key(g:neosnippet#scope_aliases, filetype) ? [v:val . '_*.snip*'] : [])")) | |
3 0.000443 let snippets_files += split(globpath(path, glob), '\n') | |
3 0.000003 endfor | |
1 0.000010 0.000005 let snippets = neosnippet#variables#snippets() | |
3 0.000082 0.000014 for snippet_file in reverse(s:get_list().uniq(snippets_files)) | |
2 0.001175 0.000044 let snippets[filetype] = extend(snippets[filetype], neosnippet#parser#_parse(snippet_file)) | |
2 0.000002 endfor | |
FUNCTION <SNR>125_check_redraw() | |
Called 136 times | |
Total time: 21.882330 | |
Self time: 0.002286 | |
count total (s) self (s) | |
136 0.001658 0.000506 let unite = unite#get_current_unite() | |
136 0.000258 let prompt_linenr = unite.prompt_linenr | |
136 0.000449 if line('.') == prompt_linenr || unite.context.is_redraw | |
" Redraw. | |
124 21.879449 0.000557 call unite#redraw() | |
124 0.000060 endif | |
FUNCTION <SNR>119_fdopen_pipes() | |
Called 42 times | |
Total time: 0.005576 | |
Self time: 0.001075 | |
count total (s) self (s) | |
42 0.005527 0.001026 return { 'eof' : 0, '__eof' : 0, 'is_valid' : 1, 'buffer' : [], 'fd' : a:fd, 'f_close' : s:funcref(a:f_close), 'close' : s:funcref('close'), 'read' : s:funcref(a:f_read), 'write' : s:funcref(a:f_write), 'read_line' : s:funcref('read_line'), 'read_lines' : s:funcref('read_lines'),} | |
FUNCTION unite#view#_save_position() | |
Called 14 times | |
Total time: 0.002953 | |
Self time: 0.000940 | |
count total (s) self (s) | |
14 0.000039 let unite = b:unite | |
14 0.000030 let context = unite.context | |
14 0.000822 0.000056 let key = unite#loaded_source_names_string() | |
14 0.000031 if key == '' | |
return | |
endif | |
" Save position. | |
14 0.000491 0.000084 let positions = unite#custom#get_profile( unite.profile_name, 'unite__save_pos') | |
14 0.000739 0.000158 let positions[key] = { 'pos' : getpos('.'), 'candidate' : unite#helper#get_current_candidate(), } | |
14 0.000023 if context.input == '' | |
3 0.000001 return | |
endif | |
" Save input. | |
11 0.000311 0.000052 let inputs = unite#custom#get_profile( unite.profile_name, 'unite__inputs') | |
11 0.000022 if !has_key(inputs, key) | |
let inputs[key] = [] | |
endif | |
11 0.000307 call insert(filter(inputs[key], 'v:val !=# unite.context.input'), context.input) | |
FUNCTION <SNR>55_append() | |
Called 86 times | |
Total time: 0.617237 | |
Self time: 0.000779 | |
count total (s) self (s) | |
86 0.000361 if bufnr('%') != expand('<abuf>') || a:path == '' | |
10 0.000008 return | |
endif | |
76 0.616697 0.000239 call neomru#_append() | |
FUNCTION unite#action#get_default_action() | |
Called 11 times | |
Total time: 0.027274 | |
Self time: 0.000162 | |
count total (s) self (s) | |
11 0.000112 0.000059 let kinds = unite#util#convert2list(a:kind) | |
11 0.027136 0.000077 return s:get_default_action(a:source_name, kinds[-1]) | |
FUNCTION <SNR>90_get_section() | |
Called 836 times | |
Total time: 0.022489 | |
Self time: 0.019647 | |
count total (s) self (s) | |
836 0.002140 if has_key(s:section_truncate_width, a:key) | |
464 0.001175 if winwidth(a:winnr) < s:section_truncate_width[a:key] | |
9 0.000004 return '' | |
endif | |
455 0.000224 endif | |
827 0.001332 let spc = g:airline_symbols.space | |
827 0.008106 0.005264 let text = airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key}) | |
827 0.004310 let [prefix, suffix] = [get(a:000, 0, '%('.spc), get(a:000, 1, spc.'%)')] | |
827 0.002337 return empty(text) ? '' : prefix.text.suffix | |
FUNCTION 92() | |
Called 140 times | |
Total time: 0.251017 | |
Self time: 0.251017 | |
count total (s) self (s) | |
140 0.000475 if stridx(a:context.input, '.') >= 0 | |
return unite#filters#filter_matcher( a:candidates, '', a:context) | |
endif | |
140 0.250022 return filter(a:candidates, " get(v:val, 'action__path', v:val.word) !~ '\\%(^\\|/\\)\\.[^/]*/\\?$'") | |
FUNCTION neocomplete#handler#_do_auto_complete() | |
Called 148 times | |
Total time: 0.009826 | |
Self time: 0.000849 | |
count total (s) self (s) | |
148 0.009556 0.000579 if s:check_in_do_auto_complete() | |
148 0.000099 return | |
endif | |
let neocomplete = neocomplete#get_current_neocomplete() | |
let neocomplete.skipped = 0 | |
let neocomplete.event = a:event | |
let cur_text = neocomplete#get_cur_text(1) | |
call neocomplete#print_debug('cur_text = ' . cur_text) | |
try | |
" Prevent infinity loop. | |
if s:is_skip_auto_complete(cur_text) | |
call neocomplete#print_debug('Skipped.') | |
return | |
endif | |
if neocomplete#helper#is_omni(cur_text) && neocomplete.old_cur_text !=# cur_text | |
call s:complete_key("\<Plug>(neocomplete_start_omni_complete)") | |
return | |
endif | |
" Check multibyte input or eskk or spaces. | |
" Note: Spaces are skipped by performance problem. | |
if cur_text =~ '^\s*$\|\s\+$' || neocomplete#is_eskk_enabled() || neocomplete#is_multibyte_input(cur_text) | |
call neocomplete#print_debug('Skipped.') | |
return | |
endif | |
" Check complete position. | |
let complete_sources = neocomplete#complete#_set_results_pos(cur_text) | |
if empty(complete_sources) | |
call neocomplete#print_debug('Skipped.') | |
return | |
endif | |
" Check previous position | |
let complete_pos = neocomplete#complete#_get_complete_pos(complete_sources) | |
if neocomplete.skip_next_complete && complete_pos == neocomplete.old_complete_pos && stridx(cur_text, neocomplete.old_cur_text) == 0 | |
" Same position. | |
return | |
endif | |
finally | |
let neocomplete.old_cur_text = cur_text | |
let neocomplete.old_linenr = line('.') | |
endtry | |
let neocomplete.skip_next_complete = 0 | |
let neocomplete.old_complete_pos = complete_pos | |
let &l:completefunc = 'neocomplete#complete#auto_complete' | |
if neocomplete#is_prefetch() | |
" Do prefetch. | |
let neocomplete.complete_sources = neocomplete#complete#_get_results(cur_text) | |
if empty(neocomplete.complete_sources) | |
if !empty(g:neocomplete#fallback_mappings) && len(matchstr(cur_text, '\h\w*$')) > g:neocomplete#auto_completion_start_length | |
let key = '' | |
for i in range(0, len(g:neocomplete#fallback_mappings)-1) | |
let key .= '<C-r>=neocomplete#mappings#fallback(' . i . ')<CR>' | |
endfor | |
execute 'inoremap <silent> <Plug>(neocomplete_fallback)' key | |
" Fallback to omnifunc | |
call s:complete_key("\<Plug>(neocomplete_fallback)") | |
else | |
call neocomplete#print_debug('Skipped.') | |
return | |
endif | |
return | |
endif | |
endif | |
" Start auto complete. | |
call s:complete_key("\<Plug>(neocomplete_start_auto_complete)") | |
FUNCTION <SNR>158_check_changed_buffer() | |
Called 17 times | |
Total time: 0.000479 | |
Self time: 0.000479 | |
count total (s) self (s) | |
17 0.000063 let source = s:buffer_sources[a:bufnr] | |
17 0.000061 let ft = getbufvar(a:bufnr, '&filetype') | |
17 0.000031 if ft == '' | |
let ft = 'nothing' | |
endif | |
17 0.000065 let filename = fnamemodify(bufname(a:bufnr), ':t') | |
17 0.000023 if filename == '' | |
let filename = '[No Name]' | |
endif | |
17 0.000063 return source.name != filename || source.filetype != ft | |
FUNCTION unite#view#_get_status_tail_string() | |
Called 226 times | |
Total time: 0.005163 | |
Self time: 0.005163 | |
count total (s) self (s) | |
226 0.000601 if !exists('b:unite') | |
return '' | |
endif | |
226 0.003764 return b:unite.context.path != '' ? '['. b:unite.context.path.']' : (b:unite.is_async || get(b:unite.msgs, 0, '') == '') ? '' : substitute(get(b:unite.msgs, 0, ''), '^\[.\{-}\]\s*', '', '') | |
FUNCTION neocomplete#handler#_on_insert_char_pre() | |
Called 144 times | |
Total time: 0.036179 | |
Self time: 0.003557 | |
count total (s) self (s) | |
144 0.008090 0.000749 if neocomplete#is_cache_disabled() | |
return | |
endif | |
144 0.001659 0.000668 let neocomplete = neocomplete#get_current_neocomplete() | |
144 0.000518 if neocomplete.old_char != ' ' && v:char == ' ' && v:count == 0 | |
5 0.024322 0.000032 call s:make_cache_current_line() | |
5 0.000002 endif | |
144 0.000339 let neocomplete.old_char = v:char | |
FUNCTION <SNR>119_vp_pgroup_waitpid() | |
Called 10 times | |
Total time: 0.003456 | |
Self time: 0.000172 | |
count total (s) self (s) | |
10 0.002512 0.000053 call s:close_all(self) | |
10 0.000017 let self.is_valid = 0 | |
10 0.000021 if !has_key(self, 'cond') || !has_key(self, 'status') | |
7 0.000869 0.000044 return s:waitpid(self.pid) | |
endif | |
3 0.000005 return [self.cond, self.status] | |
FUNCTION unite#util#substitute_path_separator() | |
Called 1951 times | |
Total time: 0.003158 | |
Self time: 0.003158 | |
count total (s) self (s) | |
1951 0.002010 return a:path | |
FUNCTION unite#get_unite_candidates() | |
Called 89 times | |
Total time: 0.001166 | |
Self time: 0.000411 | |
count total (s) self (s) | |
89 0.001101 0.000346 return unite#get_current_unite().current_candidates | |
FUNCTION neobundle#config#source_bundles() | |
Called 73 times | |
Total time: 0.000470 | |
Self time: 0.000470 | |
count total (s) self (s) | |
73 0.000175 if !empty(a:bundles) | |
call neobundle#config#source(map(copy(a:bundles), "type(v:val) == type({}) ? v:val.name : v:val")) | |
endif | |
FUNCTION airline#highlighter#highlight() | |
Called 54 times | |
Total time: 0.476184 | |
Self time: 0.103357 | |
count total (s) self (s) | |
54 0.000243 let p = g:airline#themes#{g:airline_theme}#palette | |
" draw the base mode, followed by any overrides | |
54 0.001009 let mapped = map(a:modes, 'v:val == a:modes[0] ? v:val : a:modes[0]."_".v:val') | |
54 0.000156 let suffix = a:modes[0] == 'inactive' ? '_inactive' : '' | |
111 0.000233 for mode in mapped | |
57 0.000330 if exists('g:airline#themes#{g:airline_theme}#palette[mode]') | |
54 0.000193 let dict = g:airline#themes#{g:airline_theme}#palette[mode] | |
1627 0.003200 for kvp in items(dict) | |
1573 0.002672 let mode_colors = kvp[1] | |
1573 0.056131 0.007352 call airline#highlighter#exec(kvp[0].suffix, mode_colors) | |
3146 0.004430 for accent in keys(s:accents) | |
1573 0.002794 if !has_key(p.accents, accent) | |
continue | |
endif | |
1573 0.004012 let colors = copy(mode_colors) | |
1573 0.002570 if p.accents[accent][0] != '' | |
let colors[0] = p.accents[accent][0] | |
endif | |
1573 0.002120 if p.accents[accent][2] != '' | |
let colors[2] = p.accents[accent][2] | |
endif | |
1573 0.001964 if len(colors) >= 5 | |
324 0.000825 let colors[4] = get(p.accents[accent], 4, '') | |
324 0.000194 else | |
1249 0.005547 call add(colors, get(p.accents[accent], 4, '')) | |
1249 0.000581 endif | |
1573 0.057991 0.008161 call airline#highlighter#exec(kvp[0].suffix.'_'.accent, colors) | |
1573 0.001022 endfor | |
1573 0.000787 endfor | |
" TODO: optimize this | |
1291 0.002004 for sep in items(s:separators) | |
1237 0.284275 0.010057 call <sid>exec_separator(dict, sep[1][0], sep[1][1], sep[1][2], suffix) | |
1237 0.000890 endfor | |
54 0.000024 endif | |
57 0.000033 endfor | |
FUNCTION unite#init#_tab_variables() | |
Called 28 times | |
Total time: 0.000160 | |
Self time: 0.000160 | |
count total (s) self (s) | |
28 0.000080 if !exists('t:unite') | |
let t:unite = { 'last_unite_bufnr' : -1 } | |
endif | |
FUNCTION <SNR>28_truncate_skipping() | |
Called 14 times | |
Total time: 0.000574 | |
Self time: 0.000257 | |
count total (s) self (s) | |
14 0.000104 0.000057 let width = s:wcswidth(a:str) | |
14 0.000016 if width <= a:max | |
14 0.000017 let ret = a:str | |
14 0.000009 else | |
let header_width = a:max - s:wcswidth(a:separator) - a:footer_width | |
let ret = s:strwidthpart(a:str, header_width) . a:separator . s:strwidthpart_reverse(a:str, a:footer_width) | |
endif | |
14 0.000320 0.000050 return s:truncate(ret, a:max) | |
FUNCTION 203() | |
Called 2 times | |
Total time: 0.077736 | |
Self time: 0.000150 | |
count total (s) self (s) | |
4 0.000008 for candidate in a:candidates | |
2 0.077720 0.000134 execute 'buffer' candidate.action__buffer_nr | |
2 0.000002 endfor | |
FUNCTION <SNR>119_plineopen() | |
Called 14 times | |
Total time: 0.126265 | |
Self time: 0.005186 | |
count total (s) self (s) | |
14 0.000016 let pid_list = [] | |
14 0.000016 let stdin_list = [] | |
14 0.000017 let stdout_list = [] | |
14 0.000013 let stderr_list = [] | |
14 0.000017 let npipe = a:npipe | |
" Open input. | |
14 0.000066 let hstdin = (empty(a:commands) || a:commands[0].fd.stdin == '')? 0 : vimproc#fopen(a:commands[0].fd.stdin, 'r').fd | |
14 0.000089 0.000057 let is_pty = !vimproc#util#is_windows() && a:is_pty | |
14 0.000013 let cnt = 0 | |
28 0.000056 for command in a:commands | |
14 0.000029 if is_pty && command.fd.stdout == '' && cnt == 0 && len(a:commands) != 1 | |
" pty_open() use pipe. | |
let hstdout = 1 | |
else | |
14 0.000045 if command.fd.stdout =~ '^>' | |
let mode = 'a' | |
let command.fd.stdout = command.fd.stdout[1:] | |
else | |
14 0.000020 let mode = 'w' | |
14 0.000014 endif | |
14 0.000218 0.000093 let hstdout = s:is_pseudo_device(command.fd.stdout) ? 0 : vimproc#fopen(command.fd.stdout, mode).fd | |
14 0.000007 endif | |
14 0.000023 if is_pty && command.fd.stderr == '' && cnt == 0 && len(a:commands) != 1 | |
" pty_open() use pipe. | |
let hstderr = 1 | |
else | |
14 0.000029 if command.fd.stderr =~ '^>' | |
let mode = 'a' | |
let command.fd.stderr = command.fd.stderr[1:] | |
else | |
14 0.000018 let mode = 'w' | |
14 0.000005 endif | |
14 0.000165 0.000058 let hstderr = s:is_pseudo_device(command.fd.stderr) ? 0 : vimproc#fopen(command.fd.stderr, mode).fd | |
14 0.000006 endif | |
14 0.000018 if command.fd.stderr ==# '/dev/stdout' | |
let npipe = 2 | |
endif | |
14 0.003954 0.000075 let args = s:convert_args(command.args) | |
14 0.000046 let command_name = fnamemodify(args[0], ':t:r') | |
14 0.000112 let pty_npipe = cnt == 0 && hstdin == 0 && hstdout == 0 && hstderr == 0 && exists('g:vimproc#popen2_commands') && get(g:vimproc#popen2_commands, command_name, 0) != 0 ? 2 : npipe | |
14 0.000028 if is_pty && (cnt == 0 || cnt == len(a:commands)-1) | |
" Use pty_open(). | |
let pipe = s:vp_pty_open(pty_npipe, s:get_winwidth(), winheight(0), hstdin, hstdout, hstderr, args) | |
else | |
14 0.102976 0.000186 let pipe = s:vp_pipe_open(pty_npipe, hstdin, hstdout, hstderr, args) | |
14 0.000016 endif | |
14 0.000026 if len(pipe) == 4 | |
14 0.000047 let [pid, fd_stdin, fd_stdout, fd_stderr] = pipe | |
14 0.002905 0.000170 let stderr = s:fdopen(fd_stderr, 'vp_pipe_close', 'vp_pipe_read', 'vp_pipe_write') | |
14 0.000012 else | |
let [pid, fd_stdin, fd_stdout] = pipe | |
let stderr = s:closed_fdopen( 'vp_pipe_close', 'vp_pipe_read', 'vp_pipe_write') | |
endif | |
14 0.000197 call add(pid_list, pid) | |
14 0.002489 0.000075 let stdin = s:fdopen(fd_stdin, 'vp_pipe_close', 'vp_pipe_read', 'vp_pipe_write') | |
14 0.000062 let stdin.is_pty = is_pty && (cnt == 0 || cnt == len(a:commands)-1) && hstdin == 0 | |
14 0.000068 call add(stdin_list, stdin) | |
14 0.002336 0.000075 let stdout = s:fdopen(fd_stdout, 'vp_pipe_close', 'vp_pipe_read', 'vp_pipe_write') | |
14 0.000045 let stdout.is_pty = is_pty && (cnt == 0 || cnt == len(a:commands)-1) && hstdout == 0 | |
14 0.000063 call add(stdout_list, stdout) | |
14 0.000040 let stderr.is_pty = is_pty && (cnt == 0 || cnt == len(a:commands)-1) && hstderr == 0 | |
14 0.000056 call add(stderr_list, stderr) | |
14 0.000043 let hstdin = stdout_list[-1].fd | |
14 0.000048 let cnt += 1 | |
14 0.000029 endfor | |
14 0.000029 let proc = {} | |
14 0.000028 let proc.pid_list = pid_list | |
14 0.000029 let proc.pid = pid_list[-1] | |
14 0.002058 0.000149 let proc.stdin = s:fdopen_pipes(stdin_list, 'vp_pipes_close', 'read_pipes', 'write_pipes') | |
14 0.001797 0.000077 let proc.stdout = s:fdopen_pipes(stdout_list, 'vp_pipes_close', 'read_pipes', 'write_pipes') | |
14 0.002010 0.000063 let proc.stderr = s:fdopen_pipes(stderr_list, 'vp_pipes_close', 'read_pipes', 'write_pipes') | |
14 0.000287 0.000053 let proc.get_winsize = s:funcref('vp_get_winsize') | |
14 0.000305 0.000045 let proc.set_winsize = s:funcref('vp_set_winsize') | |
14 0.000265 0.000047 let proc.kill = s:funcref('vp_kill') | |
14 0.000267 0.000048 let proc.waitpid = s:funcref('vp_waitpid') | |
14 0.000273 0.000044 let proc.checkpid = s:funcref('vp_checkpid') | |
14 0.000017 let proc.is_valid = 1 | |
14 0.000024 let proc.is_pty = is_pty | |
14 0.000014 if a:is_pty | |
let proc.ttyname = '' | |
let proc.width = winwidth(0) - &l:numberwidth - &l:foldcolumn | |
let proc.height = winheight(0) | |
let proc.get_winsize = s:funcref('vp_get_winsize') | |
let proc.set_winsize = s:funcref('vp_set_winsize') | |
endif | |
14 0.000038 return proc | |
FUNCTION neosnippet#variables#snippets() | |
Called 25 times | |
Total time: 0.000173 | |
Self time: 0.000173 | |
count total (s) self (s) | |
25 0.000076 if !exists('s:snippets') | |
let s:snippets= {} | |
endif | |
25 0.000021 return s:snippets | |
FUNCTION <SNR>105_substitute_path_separator() | |
Called 186 times | |
Total time: 0.000636 | |
Self time: 0.000636 | |
count total (s) self (s) | |
186 0.000526 return s:is_windows ? substitute(a:path, '\\', '/', 'g') : a:path | |
FUNCTION vimproc#pgroup_open() | |
Called 14 times | |
Total time: 0.209974 | |
Self time: 0.000763 | |
count total (s) self (s) | |
14 0.000047 if type(a:statements) == type('') | |
14 0.025075 0.000119 let statements = vimproc#parser#parse_statements(a:statements) | |
28 0.000042 for statement in statements | |
14 0.051226 0.000118 let statement.statement = vimproc#parser#parse_pipe(statement.statement) | |
14 0.000008 endfor | |
14 0.000006 else | |
let statements = a:statements | |
endif | |
14 0.000033 let is_pty = get(a:000, 0, 0) | |
14 0.000025 let npipe = get(a:000, 1, 3) | |
14 0.133384 0.000237 return s:pgroup_open(statements, is_pty && !vimproc#util#is_windows(), npipe) | |
FUNCTION airline#parts#ffenc() | |
Called 303 times | |
Total time: 0.004628 | |
Self time: 0.004628 | |
count total (s) self (s) | |
303 0.004391 return printf('%s%s', &fenc, strlen(&ff) > 0 ? '['.&ff.']' : '') | |
FUNCTION <SNR>119_fdopen() | |
Called 42 times | |
Total time: 0.007410 | |
Self time: 0.001407 | |
count total (s) self (s) | |
42 0.007364 0.001361 return { 'fd' : a:fd, 'eof' : 0, '__eof' : 0, 'is_valid' : 1, 'buffer' : [], 'f_close' : s:funcref(a:f_close), 'f_read' : s:funcref(a:f_read), 'f_write' : s:funcref(a:f_write), 'close' : s:funcref('close'), 'read' : s:funcref('read'), 'write' : s:funcref('write'), 'read_line' : s:funcref('read_line'), 'read_lines' : s:funcref('read_lines'),} | |
FUNCTION unite#start() | |
Called 14 times | |
Total time: 4.909307 | |
Self time: 0.000233 | |
count total (s) self (s) | |
14 4.909279 0.000205 return call('unite#start#standard', a:000) | |
FUNCTION unite#helper#adjustments() | |
Called 351 times | |
Total time: 0.003133 | |
Self time: 0.003133 | |
count total (s) self (s) | |
351 0.001089 let max_width = a:currentwinwidth - a:the_max_source_name - a:size | |
351 0.000329 if max_width < 20 | |
return [a:currentwinwidth - a:size, 0] | |
else | |
351 0.000654 return [max_width, a:the_max_source_name] | |
endif | |
FUNCTION neocomplete#helper#clear_result() | |
Called 28 times | |
Total time: 0.009205 | |
Self time: 0.004195 | |
count total (s) self (s) | |
28 0.000463 0.000176 let neocomplete = neocomplete#get_current_neocomplete() | |
28 0.000088 let neocomplete.complete_str = '' | |
28 0.000092 let neocomplete.candidates = [] | |
28 0.000065 let neocomplete.complete_sources = [] | |
28 0.000049 let neocomplete.complete_pos = -1 | |
" Restore completeopt. | |
28 0.000099 if neocomplete.completeopt !=# &completeopt | |
" Restore completeopt. | |
let &completeopt = neocomplete.completeopt | |
endif | |
" Clear context. | |
336 0.001083 0.000827 for source in values(neocomplete#variables#get_sources()) | |
308 0.006523 0.002056 let source.neocomplete__context = neocomplete#init#_context( source.neocomplete__context) | |
308 0.000259 endfor | |
FUNCTION <SNR>98_uniq() | |
Called 10 times | |
Total time: 1.003734 | |
Self time: 0.012703 | |
count total (s) self (s) | |
10 1.003727 0.012696 return s:uniq_by(a:list, 'v:val') | |
FUNCTION <SNR>85_get_array() | |
Called 5772 times | |
Total time: 0.057578 | |
Self time: 0.057578 | |
count total (s) self (s) | |
5772 0.008078 let fg = a:fg | |
5772 0.006897 let bg = a:bg | |
5772 0.037772 return has('gui_running') ? [ fg, bg, '', '', join(a:opts, ',') ] : [ '', '', fg, bg, join(a:opts, ',') ] | |
FUNCTION <SNR>37_sub() | |
Called 95 times | |
Total time: 0.000819 | |
Self time: 0.000819 | |
count total (s) self (s) | |
95 0.000778 return substitute(a:str,'\v\C'.a:pat,a:rep,'') | |
FUNCTION vimproc#parser#split_pipe() | |
Called 14 times | |
Total time: 0.013889 | |
Self time: 0.009641 | |
count total (s) self (s) | |
14 0.000695 let script = type(a:script) == type([]) ? a:script : split(a:script, '\zs') | |
14 0.000025 let max = len(script) | |
14 0.000012 let command = '' | |
14 0.000013 let i = 0 | |
14 0.000024 let commands = [] | |
420 0.000280 while i < max | |
406 0.000450 if script[i] == '|' | |
" Pipe. | |
call add(commands, command) | |
" Search next command. | |
let command = '' | |
let i += 1 | |
elseif script[i] == "'" | |
" Single quote. | |
14 0.003766 0.000081 let [string, i] = s:skip_single_quote(script, i) | |
14 0.000025 let command .= string | |
14 0.000012 elseif script[i] == '"' | |
" Double quote. | |
14 0.000632 0.000069 let [string, i] = s:skip_double_quote(script, i) | |
14 0.000020 let command .= string | |
14 0.000011 elseif script[i] == '`' | |
" Back quote. | |
let [string, i] = s:skip_back_quote(script, i) | |
let command .= string | |
elseif script[i] == '\' && i + 1 < max | |
" Escape. | |
let command .= '\' . script[i+1] | |
let i += 2 | |
else | |
378 0.000560 let command .= script[i] | |
378 0.000291 let i += 1 | |
378 0.000139 endif | |
406 0.000180 endwhile | |
14 0.000062 call add(commands, command) | |
14 0.000013 return commands | |
FUNCTION unite#view#_resize_window() | |
Called 140 times | |
Total time: 0.004945 | |
Self time: 0.002503 | |
count total (s) self (s) | |
140 0.000272 if &filetype !=# 'unite' | |
return | |
endif | |
140 0.002049 0.000378 let context = unite#get_context() | |
140 0.001205 0.000434 let unite = unite#get_current_unite() | |
140 0.000571 if (winheight(0) + &cmdheight + 2 >= &lines && !context.vertical) || !context.resize | |
" Cannot resize. | |
140 0.000208 let context.unite__is_resize = 0 | |
140 0.000083 return | |
endif | |
if context.unite__old_winwidth != 0 && context.unite__old_winheight != 0 && winheight(0) != context.unite__old_winheight && winwidth(0) != context.unite__old_winwidth | |
" Disabled resize. | |
let context.winwidth = 0 | |
let context.winheight = 0 | |
let context.unite__is_resize = 1 | |
return | |
endif | |
if context.auto_resize | |
" Auto resize. | |
let max_len = unite.candidates_len | |
if unite.prompt_linenr > 0 | |
let max_len += 1 | |
endif | |
let winheight = winheight(0) | |
silent! execute 'resize' min([max_len, context.winheight]) | |
if line('.') == unite.prompt_linenr || line('$') < winheight | |
call unite#view#_bottom_cursor() | |
endif | |
let context.unite__is_resize = winheight != winheight(0) | |
elseif context.vertical && context.unite__old_winwidth == 0 | |
execute 'vertical resize' context.winwidth | |
let context.unite__is_resize = 1 | |
elseif !context.vertical && (context.unite__old_winheight == 0 || context.auto_preview) | |
execute 'resize' context.winheight | |
let context.unite__is_resize = 1 | |
else | |
let context.unite__is_resize = 0 | |
endif | |
let context.unite__old_winheight = winheight(winnr()) | |
let context.unite__old_winwidth = winwidth(winnr()) | |
FUNCTION <SNR>78_sync_active_winnr() | |
Called 41 times | |
Total time: 0.000401 | |
Self time: 0.000401 | |
count total (s) self (s) | |
41 0.000265 if exists('#airline') && winnr() != s:active_winnr | |
call airline#update_statusline() | |
endif | |
FUNCTION neocomplete#is_text_mode() | |
Called 38 times | |
Total time: 0.000658 | |
Self time: 0.000357 | |
count total (s) self (s) | |
38 0.000491 0.000190 let neocomplete = neocomplete#get_current_neocomplete() | |
38 0.000133 return get(g:neocomplete#text_mode_filetypes, neocomplete.context_filetype, 0) | |
FUNCTION <SNR>111_recache_candidates_loop() | |
Called 140 times | |
Total time: 25.693491 | |
Self time: 0.102345 | |
count total (s) self (s) | |
140 0.001876 0.000542 let unite = unite#get_current_unite() | |
140 0.003761 0.000768 let input_len = unite#util#strchars(a:context.input) | |
140 0.000270 let candidate_sources = [] | |
140 0.000238 let unite.max_source_candidates = 0 | |
560 0.000751 for source in unite.sources | |
" Check required pattern length. | |
420 0.000796 if input_len < source.required_pattern_length | |
continue | |
endif | |
" Set context. | |
420 0.000789 let context = source.unite__context | |
420 0.000971 let context.input = a:context.input | |
420 0.000886 let context.path = a:context.path | |
420 0.001080 let context.source_name = source.name | |
420 0.000764 if source.required_pattern_length > 0 && !source.is_forced | |
" Forced redraw. | |
let context.is_redraw = 1 | |
let source.is_forced = 1 | |
else | |
420 0.000785 let context.is_redraw = a:context.is_redraw | |
420 0.000271 endif | |
420 0.000710 let context.is_changed = a:context.is_changed | |
420 0.000876 let context.is_invalidate = source.unite__is_invalidate | |
420 0.000728 let context.is_list_input = a:context.is_list_input | |
420 0.004086 let context.input_list = split(context.input, '\\\@<! ', 1) | |
420 0.001391 let context.unite__max_candidates = (unite.disabled_max_candidates ? 0 : source.max_candidates) | |
420 0.000492 if context.unite__is_vimfiler | |
" Disable ignore feature. | |
let source.ignore_pattern = '' | |
let source.ignore_globs = [] | |
endif | |
420 20.471153 0.004163 let source_candidates = s:get_source_candidates(source) | |
" Call pre_filter hook. | |
420 0.003453 let context.candidates = source_candidates | |
420 0.026043 0.004049 call unite#helper#call_hook([source], 'on_pre_filter') | |
" Set filters. | |
420 0.000857 let sorters = source.sorters | |
420 0.001272 if sorters ==# ['sorter_nothing'] || unite.context.unite__is_vimfiler | |
let sorters = [] | |
endif | |
420 0.001380 let context.unite__is_sort_nothing = empty(sorters) && context.unite__is_interactive | |
420 0.001212 let source.unite__orig_len_candidates = len(source_candidates) | |
420 0.001748 let unite.max_source_candidates += (context.unite__is_sort_nothing && context.unite__max_candidates > 0) ? source.max_candidates : source.unite__orig_len_candidates | |
420 0.000462 if !unite.context.unite__is_vimfiler | |
" Call filters. | |
1960 0.004581 for Filter in source.matchers + source.sorters + source.converters | |
1540 0.003904 if type(Filter) == type('') | |
1400 5.103455 0.013859 let source_candidates = unite#helper#call_filter( Filter, source_candidates, context) | |
1400 0.000973 else | |
140 0.002473 0.000963 let source_candidates = call(Filter, [source_candidates, context], source) | |
140 0.000087 endif | |
1540 0.001695 unlet Filter | |
1540 0.002641 endfor | |
420 0.000223 endif | |
" Get execute_command. | |
420 0.001408 let a:context.execute_command = context.execute_command | |
420 0.003626 let source.unite__candidates += source_candidates | |
420 0.000688 if !empty(source_candidates) | |
369 0.009886 0.003157 call add(candidate_sources, unite#helper#convert_source_name(source.name)) | |
369 0.000237 endif | |
420 0.000272 endfor | |
140 0.000342 if !a:context.hide_source_names && len(unite.sources) > 1 | |
140 0.001422 let unite.max_source_name = max(map(candidate_sources, 'len(v:val)')) + 1 | |
140 0.000086 endif | |
FUNCTION unite#util#index_name() | |
Called 79 times | |
Total time: 0.001072 | |
Self time: 0.001072 | |
count total (s) self (s) | |
79 0.001031 return index(map(copy(a:list), 'v:val.name'), a:name) | |
FUNCTION unite#handlers#_on_bufwin_enter() | |
Called 56 times | |
Total time: 0.002202 | |
Self time: 0.001345 | |
count total (s) self (s) | |
56 0.000237 silent! let unite = getbufvar(a:bufnr, 'unite') | |
56 0.000177 if type(unite) != type({}) || bufwinnr(a:bufnr) < 1 | |
28 0.000016 return | |
endif | |
28 0.000048 if bufwinnr(a:bufnr) != winnr() | |
let winnr = winnr() | |
execute bufwinnr(a:bufnr) 'wincmd w' | |
endif | |
28 0.000643 0.000072 call unite#handlers#_save_updatetime() | |
28 0.000221 0.000095 call s:restore_statusline() | |
28 0.000037 if unite.context.split && winnr('$') != 1 | |
call unite#view#_resize_window() | |
endif | |
28 0.000088 setlocal nomodified | |
28 0.000052 if exists('winnr') | |
execute winnr.'wincmd w' | |
endif | |
28 0.000237 0.000077 call unite#init#_tab_variables() | |
28 0.000053 let t:unite.last_unite_bufnr = a:bufnr | |
FUNCTION <SNR>98_sort_by() | |
Called 463 times | |
Total time: 0.013429 | |
Self time: 0.007353 | |
count total (s) self (s) | |
463 0.003926 let pairs = map(a:list, printf('[v:val, %s]', a:expr)) | |
463 0.009168 0.003092 return map(s:sort(pairs, 'a:a[1] ==# a:b[1] ? 0 : a:a[1] ># a:b[1] ? 1 : -1'), 'v:val[0]') | |
FUNCTION <SNR>119_vp_pipe_read() | |
Called 2916 times | |
Total time: 7.715664 | |
Self time: 0.051212 | |
count total (s) self (s) | |
2916 0.005238 if self.fd == 0 | |
return ['', 1] | |
endif | |
2916 7.693778 0.029326 let [hd, eof] = s:libcall_raw_read('vp_pipe_read', [self.fd, a:number, a:timeout]) | |
2916 0.007430 return [hd, eof] | |
FUNCTION <SNR>88_should_change_group() | |
Called 973 times | |
Total time: 0.128752 | |
Self time: 0.013471 | |
count total (s) self (s) | |
973 0.002076 if a:group1 == a:group2 | |
262 0.000194 return 0 | |
endif | |
711 0.063368 0.002872 let color1 = airline#highlighter#get_highlight(a:group1) | |
711 0.057743 0.002958 let color2 = airline#highlighter#get_highlight(a:group2) | |
711 0.001562 if has('gui_running') | |
711 0.002049 return color1[1] != color2[1] || color1[0] != color2[0] | |
else | |
return color1[3] != color2[3] || color1[2] != color2[2] | |
endif | |
FUNCTION unite#view#_set_syntax() | |
Called 14 times | |
Total time: 0.012632 | |
Self time: 0.004622 | |
count total (s) self (s) | |
14 0.000045 syntax clear | |
14 0.000122 syntax match uniteQuickMatchMarker /^.|/ contained | |
14 0.000102 syntax match uniteInputCommand /\\\@<! :\S\+/ contained | |
14 0.000264 0.000059 let unite = unite#get_current_unite() | |
" Set highlight. | |
14 0.000049 let match_prompt = escape(unite.prompt, '\/*~.^$[]') | |
14 0.000118 execute 'syntax match uniteInputPrompt' '/^'.match_prompt.'/ contained' | |
14 0.000367 0.000085 let candidate_icon = unite#util#escape_pattern( unite.context.candidate_icon) | |
14 0.000303 execute 'syntax region uniteNonMarkedLine start=/^'. candidate_icon.' / end=''$'' keepend'. ' contains=uniteCandidateMarker,'. 'uniteCandidateSourceName' | |
14 0.000107 execute 'syntax match uniteCandidateMarker /^'. candidate_icon.' / contained' | |
14 0.000251 0.000058 let marked_icon = unite#util#escape_pattern( unite.context.marked_icon) | |
14 0.000137 execute 'syntax region uniteMarkedLine start=/^'. marked_icon.'/ end=''$'' keepend' | |
14 0.000078 silent! syntax clear uniteCandidateSourceName | |
14 0.000019 if unite.max_source_name > 0 | |
14 0.000117 syntax match uniteCandidateSourceName /\%3c[[:alnum:]_\/-]\+/ contained | |
14 0.000007 else | |
execute 'syntax match uniteCandidateSourceName /^'. candidate_icon.' / contained' | |
endif | |
" Set syntax. | |
14 0.000022 let syntax = {} | |
56 0.000226 for source in filter(copy(unite.sources), 'v:val.syntax != ""') | |
" Skip previous syntax | |
42 0.000080 if has_key(syntax, source.name) | |
continue | |
endif | |
42 0.000081 let syntax[source.name] = 1 | |
42 0.001084 0.000203 let name = unite.max_source_name > 0 ? unite#helper#convert_source_name(source.name) : '' | |
42 0.000366 execute 'highlight default link' source.syntax unite.context.abbr_highlight | |
42 0.001373 execute printf('syntax match %s "^\%(['. unite.context.candidate_icon.' ] \|.|\)%s" '. 'nextgroup='.source.syntax. ' keepend contains=uniteCandidateMarker,uniteQuickMatchMarker,%s', 'uniteSourceLine__'.source.syntax, (name == '' ? '' : name . '\>'), (name == '' ? '' : 'uniteCandidateSourceName') ) | |
42 0.004435 0.000179 call unite#helper#call_hook([source], 'on_syntax') | |
42 0.000019 endfor | |
14 0.001260 0.000069 call s:set_syntax() | |
14 0.001056 0.000054 call unite#view#_redraw_prompt() | |
14 0.000026 let b:current_syntax = 'unite' | |
FUNCTION neosnippet#variables#snippets_dir() | |
Called 1 time | |
Total time: 0.000005 | |
Self time: 0.000005 | |
count total (s) self (s) | |
1 0.000002 if !exists('s:snippets_dir') | |
let s:snippets_dir = [] | |
endif | |
1 0.000001 return s:snippets_dir | |
FUNCTION <SNR>104_converter() | |
Called 140 times | |
Total time: 0.000771 | |
Self time: 0.000771 | |
count total (s) self (s) | |
140 0.000494 if g:neomru#filename_format == '' && g:neomru#time_format == '' | |
140 0.000155 return a:candidates | |
endif | |
for candidate in filter(copy(a:candidates), "!has_key(v:val, 'abbr')") | |
let path = (g:neomru#filename_format == '') ? candidate.action__path : unite#util#substitute_path_separator( fnamemodify(candidate.action__path, g:neomru#filename_format)) | |
if path == '' | |
let path = candidate.action__path | |
endif | |
" Set default abbr. | |
let candidate.abbr = (g:neomru#time_format == '') ? '' : strftime(g:neomru#time_format, getftime(candidate.action__path)) | |
let candidate.abbr .= path | |
endfor | |
return a:candidates | |
FUNCTION airline#parts#paste() | |
Called 117 times | |
Total time: 0.000535 | |
Self time: 0.000535 | |
count total (s) self (s) | |
117 0.000429 return g:airline_detect_paste && &paste ? g:airline_symbols.paste : '' | |
FUNCTION airline#update_statusline() | |
Called 89 times | |
Total time: 0.468249 | |
Self time: 0.007718 | |
count total (s) self (s) | |
181 0.001254 for nr in filter(range(1, winnr('$')), 'v:val != winnr()') | |
92 0.000395 call setwinvar(nr, 'airline_active', 0) | |
92 0.000413 let context = { 'winnr': nr, 'active': 0, 'bufnr': winbufnr(nr) } | |
92 0.198234 0.000751 call s:invoke_funcrefs(context, s:inactive_funcrefs) | |
92 0.000078 endfor | |
89 0.000135 unlet! w:airline_render_left | |
89 0.000085 unlet! w:airline_render_right | |
801 0.000650 for section in s:sections | |
712 0.001081 unlet! w:airline_section_{section} | |
712 0.000318 endfor | |
89 0.000136 let w:airline_active = 1 | |
89 0.000397 let context = { 'winnr': winnr(), 'active': 1, 'bufnr': winbufnr(winnr()) } | |
89 0.263910 0.000862 call s:invoke_funcrefs(context, g:airline_statusline_funcrefs) | |
FUNCTION <SNR>158_make_cache_current_buffer() | |
Called 19 times | |
Total time: 0.070862 | |
Self time: 0.017770 | |
count total (s) self (s) | |
19 0.000063 let srcname = bufnr('%') | |
" Make cache from current buffer. | |
19 0.000731 0.000104 if !s:should_create_cache(srcname) | |
2 0.000003 return | |
endif | |
17 0.000732 0.000081 if !s:exists_current_source() | |
call s:initialize_source(srcname) | |
endif | |
17 0.000045 let source = s:buffer_sources[srcname] | |
17 0.000039 let keyword_pattern = source.keyword_pattern | |
17 0.000024 if keyword_pattern == '' | |
return | |
endif | |
17 0.000027 let words = [] | |
17 0.000030 lua << EOF | |
do | |
local words = vim.eval('words') | |
local dup = {} | |
local b = vim.buffer() | |
local min_length = vim.eval('g:neocomplete#min_keyword_length') | |
for linenr = vim.eval('a:start'), vim.eval('a:end') do | |
local match = 0 | |
while 1 do | |
local match_str = vim.eval('matchstr(getline('..linenr.. | |
'), keyword_pattern, ' .. match .. ')') | |
if match_str == '' then | |
break | |
end | |
if dup[match_str] == nil | |
and string.len(match_str) >= min_length then | |
dup[match_str] = 1 | |
words:add(match_str) | |
end | |
-- Next match. | |
match = vim.eval('matchend(getline(' .. linenr .. | |
'), keyword_pattern, ' .. match .. ')') | |
end | |
end | |
end | |
EOF | |
17 0.055197 0.003383 let source.words = neocomplete#util#uniq(source.words + words) | |
FUNCTION <SNR>119_funcref() | |
Called 938 times | |
Total time: 0.016055 | |
Self time: 0.006733 | |
count total (s) self (s) | |
938 0.015731 0.006409 return function(s:SID_PREFIX().a:funcname) | |
FUNCTION unite#get_all_sources() | |
Called 11 times | |
Total time: 0.024286 | |
Self time: 0.000079 | |
count total (s) self (s) | |
11 0.024278 0.000071 return call('unite#variables#all_sources', a:000) | |
FUNCTION <SNR>105_writefile() | |
Called 33 times | |
Total time: 0.023042 | |
Self time: 0.023042 | |
count total (s) self (s) | |
33 0.000210 let path = fnamemodify(a:path, ':p') | |
33 0.000127 if !isdirectory(fnamemodify(path, ':h')) | |
call mkdir(fnamemodify(path, ':h'), 'p') | |
endif | |
33 0.022571 call writefile(a:list, path) | |
FUNCTION neobundle#autoload#explorer() | |
Called 96 times | |
Total time: 0.004045 | |
Self time: 0.002770 | |
count total (s) self (s) | |
96 0.000562 if bufnr('%') != expand('<abuf>') || a:path == '' | |
10 0.000006 return | |
endif | |
86 0.000136 let path = a:path | |
" For ":edit ~". | |
86 0.000234 if fnamemodify(path, ':t') ==# '~' | |
let path = '~' | |
endif | |
86 0.001639 0.000364 let path = neobundle#util#expand(path) | |
86 0.000882 if !(isdirectory(path) || (!filereadable(path) && path =~ '^\h\w\+://')) | |
86 0.000068 return | |
endif | |
let bundles = filter(neobundle#config#get_autoload_bundles(), "get(v:val.autoload, 'explorer', 0)") | |
if empty(bundles) | |
augroup neobundle-explorer | |
autocmd! | |
augroup END | |
else | |
call neobundle#config#source_bundles(bundles) | |
execute 'doautocmd' a:event | |
endif | |
FUNCTION unite#variables#options() | |
Called 42 times | |
Total time: 0.000888 | |
Self time: 0.000888 | |
count total (s) self (s) | |
42 0.000235 if !exists('s:options') | |
let s:options = map(filter(items(unite#variables#default_context()), "v:val[0] !~ '^unite__'"), "'-' . tr(v:val[0], '_', '-') . (type(v:val[1]) == type(0) && (v:val[1] == 0 || v:val[1] == 1) ? '' : '=')") | |
" Generic no options. | |
let s:options += map(filter(copy(s:options), "v:val[-1:] != '='"), "'-no' . v:val") | |
endif | |
42 0.000089 return s:options | |
FUNCTION neomru#_append() | |
Called 76 times | |
Total time: 0.616458 | |
Self time: 0.006823 | |
count total (s) self (s) | |
76 0.000456 if &l:buftype =~ 'help\|nofile' | |
14 0.000008 return | |
endif | |
62 0.000965 0.000697 let path = s:substitute_path_separator(expand('%:p')) | |
62 0.000481 if path !~ '\a\+:' | |
62 0.000934 0.000778 let path = s:substitute_path_separator( simplify(resolve(path))) | |
62 0.000037 endif | |
" Append the current buffer to the mru list. | |
62 0.003375 0.000202 if s:is_file_exist(path) | |
62 0.518964 0.000387 call s:file_mru.append(path) | |
62 0.000027 endif | |
62 0.000289 let filetype = getbufvar(bufnr('%'), '&filetype') | |
62 0.000193 if filetype ==# 'vimfiler' && type(getbufvar(bufnr('%'), 'vimfiler')) == type({}) | |
let path = getbufvar(bufnr('%'), 'vimfiler').current_dir | |
elseif filetype ==# 'vimshell' && type(getbufvar(bufnr('%'), 'vimshell')) == type({}) | |
let path = getbufvar(bufnr('%'), 'vimshell').current_dir | |
else | |
62 0.000658 let path = getcwd() | |
62 0.000032 endif | |
62 0.000840 0.000628 let path = s:substitute_path_separator(simplify(resolve(path))) | |
" Chomp last /. | |
62 0.000436 let path = substitute(path, '/$', '', '') | |
" Append the current buffer to the mru list. | |
62 0.001664 0.000234 if s:is_directory_exist(path) | |
62 0.086105 0.000286 call s:directory_mru.append(path) | |
62 0.000032 endif | |
FUNCTION <SNR>28_truncate() | |
Called 16069 times | |
Total time: 0.157552 | |
Self time: 0.157552 | |
count total (s) self (s) | |
" Original function is from mattn. | |
" http://github.com/mattn/googlereader-vim/tree/master | |
16069 0.070269 if a:str =~# '^[\x00-\x7f]*$' | |
16069 0.066224 return len(a:str) < a:width ? printf('%-'.a:width.'s', a:str) : strpart(a:str, 0, a:width) | |
endif | |
let ret = a:str | |
let width = s:wcswidth(a:str) | |
if width > a:width | |
let ret = s:strwidthpart(ret, a:width) | |
let width = s:wcswidth(ret) | |
endif | |
if width < a:width | |
let ret .= repeat(' ', a:width - width) | |
endif | |
return ret | |
FUNCTION <SNR>119_convert_args() | |
Called 14 times | |
Total time: 0.003879 | |
Self time: 0.001116 | |
count total (s) self (s) | |
14 0.000023 if empty(a:args) | |
return [] | |
endif | |
14 0.001979 0.000594 let args = map(copy(a:args), 'vimproc#util#iconv( v:val, &encoding, vimproc#util#systemencoding())') | |
14 0.000061 0.000044 if vimproc#util#is_windows() && !executable(a:args[0]) | |
" Search from internal commands. | |
let internal_commands = [ 'copy', 'date', 'del', 'dir', 'echo', 'erase', 'for', 'ftype', 'if', 'md', 'mkdir', 'move', 'path', 'rd', 'ren', 'rename', 'rmdir', 'start', 'time', 'type', 'ver', 'vol'] | |
let index = index(internal_commands, a:args[0], 0, 1) | |
if index >= 0 | |
" Use cmd.exe | |
return ['cmd', '/c', args[0]] + args[1:] | |
endif | |
endif | |
14 0.000959 0.000068 let command_name = vimproc#get_command_name(a:args[0]) | |
14 0.000684 0.000214 return map(vimproc#analyze_shebang(command_name), 'vimproc#util#iconv( v:val, &encoding, vimproc#util#systemencoding())') + args[1:] | |
FUNCTION <SNR>171_close_preview_window() | |
Called 148 times | |
Total time: 0.014296 | |
Self time: 0.002456 | |
count total (s) self (s) | |
148 0.013790 0.001950 if g:neocomplete#enable_auto_close_preview && bufname('%') !=# '[Command Line]' && winnr('$') != 1 && !&l:previewwindow && !s:check_in_do_auto_complete() | |
" Close preview window. | |
pclose! | |
endif | |
FUNCTION <SNR>165_make_cache_current_buffer() | |
Called 19 times | |
Total time: 0.001444 | |
Self time: 0.000477 | |
count total (s) self (s) | |
19 0.000889 0.000105 let filetype = neocomplete#get_context_filetype(1) | |
19 0.000077 if !has_key(s:member_sources, bufnr('%')) | |
call s:initialize_source(bufnr('%'), filetype) | |
endif | |
19 0.000373 0.000190 call s:make_cache_lines(bufnr('%'), filetype, getline(a:start, a:end)) | |
FUNCTION neosnippet#helpers#get_snippets_directory() | |
Called 1 time | |
Total time: 0.000049 | |
Self time: 0.000023 | |
count total (s) self (s) | |
1 0.000011 0.000006 let snippets_dir = copy(neosnippet#variables#snippets_dir()) | |
1 0.000024 0.000008 if !get(g:neosnippet#disable_runtime_snippets, neosnippet#helpers#get_filetype(), get(g:neosnippet#disable_runtime_snippets, '_', 0)) | |
1 0.000010 0.000005 let snippets_dir += neosnippet#variables#runtime_dir() | |
1 0.000001 endif | |
1 0.000001 return snippets_dir | |
FUNCTION unite#util#uniq() | |
Called 10 times | |
Total time: 1.003903 | |
Self time: 0.000092 | |
count total (s) self (s) | |
10 1.003894 0.000083 return call(s:get_list().uniq, a:000) | |
FUNCTION <SNR>175_parse_double_quote() | |
Called 14 times | |
Total time: 0.000427 | |
Self time: 0.000427 | |
count total (s) self (s) | |
14 0.000027 if a:script[a:i] != '"' | |
return ['', a:i] | |
endif | |
14 0.000151 let escape_sequences = { 'a' : "\<C-g>", 'b' : "\<BS>", 't' : "\<Tab>", 'r' : "\<CR>", 'n' : "\<LF>", 'e' : "\<Esc>", '\' : '\', '?' : '?', '"' : '"', "'" : "'", '`' : '`', '$' : '$',} | |
14 0.000017 let arg = '' | |
14 0.000020 let i = a:i + 1 | |
14 0.000050 let script = type(a:script) == type([]) ? a:script : split(a:script, '\zs') | |
14 0.000022 let max = len(script) | |
14 0.000014 while i < max | |
14 0.000021 if script[i] == '"' | |
" Quote end. | |
14 0.000023 return [arg, i+1] | |
elseif script[i] == '$' | |
" Eval variables. | |
let var = matchstr(join(script[i :], ''), '^$\h\w*') | |
if var != '' | |
let arg .= s:parse_variables(var) | |
let i += len(var) | |
else | |
let arg .= '$' | |
let i += 1 | |
endif | |
elseif script[i] == '`' | |
" Backquote. | |
let [arg_quote, i] = s:parse_back_quote(script, i) | |
let arg .= arg_quote | |
elseif script[i] == '\' | |
" Escape. | |
let i += 1 | |
if i >= max | |
throw 'Exception: Join to next line (\).' | |
endif | |
if script[i] == 'x' | |
let num = matchstr(join(script[i+1 :], ''), '^\x\+') | |
let arg .= nr2char(str2nr(num, 16)) | |
let i += len(num) | |
elseif has_key(escape_sequences, script[i]) | |
let arg .= escape_sequences[script[i]] | |
else | |
let arg .= '\' . script[i] | |
endif | |
let i += 1 | |
else | |
let arg .= script[i] | |
let i += 1 | |
endif | |
endwhile | |
throw 'Exception: Quote (") is not found.' | |
FUNCTION neocomplete#helper#is_enabled_source() | |
Called 38 times | |
Total time: 0.008999 | |
Self time: 0.001446 | |
count total (s) self (s) | |
38 0.001090 0.000814 let source = type(a:source) == type('') ? get(neocomplete#variables#get_sources(), a:source, {}) : a:source | |
38 0.007831 0.000554 return !empty(source) && (empty(source.filetypes) || !empty(neocomplete#helper#ftdictionary2list( source.filetypes, a:filetype))) && (!get(source.disabled_filetypes, '_', 0) && empty(neocomplete#helper#ftdictionary2list( source.disabled_filetypes, a:filetype))) | |
FUNCTION airline#highlighter#exec() | |
Called 5374 times | |
Total time: 0.171072 | |
Self time: 0.171072 | |
count total (s) self (s) | |
5374 0.006977 let colors = a:colors | |
5374 0.004941 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 | |
5374 0.126023 exec printf('hi %s %s %s %s %s %s %s %s', a:group, get(colors, 0, '') != '' ? 'guifg='.colors[0] : '', get(colors, 1, '') != '' ? 'guibg='.colors[1] : '', get(colors, 2, '') != '' ? 'ctermfg='.colors[2] : '', get(colors, 3, '') != '' ? 'ctermbg='.colors[3] : '', get(colors, 4, '') != '' ? 'gui='.colors[4] : '', get(colors, 4, '') != '' ? 'cterm='.colors[4] : '', get(colors, 4, '') != '' ? 'term='.colors[4] : '') | |
FUNCTION neosnippet#get_placeholder_marker_pattern() | |
Called 34 times | |
Total time: 0.000096 | |
Self time: 0.000096 | |
count total (s) self (s) | |
34 0.000058 return '<`\d\+\%(:.\{-}\)\?\\\@<!`>' | |
FUNCTION unite#view#_init_cursor() | |
Called 14 times | |
Total time: 0.008615 | |
Self time: 0.001199 | |
count total (s) self (s) | |
14 0.000129 0.000042 let unite = unite#get_current_unite() | |
14 0.000018 let context = unite.context | |
14 0.000365 0.000053 let positions = unite#custom#get_profile( unite.profile_name, 'unite__save_pos') | |
14 0.000551 0.000049 let key = unite#loaded_source_names_string() | |
14 0.000668 0.000153 let is_restore = context.restore && has_key(positions, key) && context.select <= 0 && positions[key].candidate ==# unite#helper#get_current_candidate(positions[key].pos[1]) | |
14 0.000021 if context.start_insert && !context.auto_quit | |
14 0.000041 let unite.is_insert = 1 | |
14 0.000031 if is_restore && context.resume && positions[key].pos[1] != unite.prompt_linenr | |
" Restore position. | |
call setpos('.', positions[key].pos) | |
call cursor(0, 1) | |
startinsert | |
else | |
14 0.000250 0.000038 call unite#helper#cursor_prompt() | |
14 0.000020 startinsert! | |
14 0.000008 endif | |
14 0.000001 else | |
let unite.is_insert = 0 | |
if is_restore | |
" Restore position. | |
call setpos('.', positions[key].pos) | |
else | |
call unite#helper#cursor_prompt() | |
endif | |
call cursor(0, 1) | |
stopinsert | |
endif | |
14 0.000012 if context.select > 0 | |
" Select specified candidate. | |
call cursor(unite#helper#get_current_candidate_linenr( context.select), 0) | |
elseif context.input == '' && context.log | |
call unite#view#_redraw_candidates(1) | |
endif | |
14 0.000010 if context.quick_match | |
call unite#helper#cursor_prompt() | |
call unite#mappings#_quick_match(0) | |
endif | |
14 0.000054 if line('.') <= winheight(0) || (context.prompt_direction ==# 'below' && (line('$') - line('.')) <= winheight(0)) | |
14 0.000398 0.000047 call unite#view#_bottom_cursor() | |
14 0.000005 endif | |
14 0.000013 if !context.focus | |
if winbufnr(winnr('#')) > 0 | |
wincmd p | |
else | |
execute bufwinnr(unite.prev_bufnr).'wincmd w' | |
endif | |
endif | |
14 0.000027 let unite.prev_line = line('.') | |
14 0.000987 0.000042 call unite#view#_set_cursor_line() | |
14 0.004537 0.000045 call unite#handlers#_on_cursor_moved() | |
FUNCTION unite#filters#globs2lua_patterns() | |
Called 182 times | |
Total time: 0.053704 | |
Self time: 0.053704 | |
count total (s) self (s) | |
182 0.000325 let patterns = [] | |
1547 0.001826 for glob in a:globs | |
1365 0.003138 if glob !~ '^/' | |
1365 0.001591 let glob = '/' . glob | |
1365 0.000586 endif | |
1365 0.002164 let glob = tolower(glob) | |
1365 0.005670 let glob = substitute(glob, '//', '/', 'g') | |
1365 0.007406 let glob = substitute(glob, '[%().+^$-]', '%\0', 'g') | |
1365 0.007810 let glob = substitute(glob, '\*\@<!\*\*\@!', '[^/]*', 'g') | |
1365 0.006049 let glob = substitute(glob, '\\\@<!\*\*\+', '.*', 'g') | |
1365 0.005476 let glob = substitute(glob, '\\\@<!?', '[^/]', 'g') | |
1365 0.001580 let glob .= '$' | |
1365 0.004203 call add(patterns, glob) | |
1365 0.001683 endfor | |
182 0.000167 return patterns | |
FUNCTION SetFileTypeSH() | |
Called 3 times | |
Total time: 0.039201 | |
Self time: 0.000193 | |
count total (s) self (s) | |
3 0.000022 if expand("<amatch>") =~ g:ft_ignore_pat | |
return | |
endif | |
3 0.000011 if a:name =~ '\<csh\>' | |
" Some .sh scripts contain #!/bin/csh. | |
call SetFileTypeShell("csh") | |
return | |
elseif a:name =~ '\<tcsh\>' | |
" Some .sh scripts contain #!/bin/tcsh. | |
call SetFileTypeShell("tcsh") | |
return | |
elseif a:name =~ '\<zsh\>' | |
" Some .sh scripts contain #!/bin/zsh. | |
call SetFileTypeShell("zsh") | |
return | |
elseif a:name =~ '\<ksh\>' | |
let b:is_kornshell = 1 | |
if exists("b:is_bash") | |
unlet b:is_bash | |
endif | |
if exists("b:is_sh") | |
unlet b:is_sh | |
endif | |
elseif exists("g:bash_is_sh") || a:name =~ '\<bash\>' || a:name =~ '\<bash2\>' | |
3 0.000005 let b:is_bash = 1 | |
3 0.000007 if exists("b:is_kornshell") | |
unlet b:is_kornshell | |
endif | |
3 0.000006 if exists("b:is_sh") | |
unlet b:is_sh | |
endif | |
3 0.000002 elseif a:name =~ '\<sh\>' | |
let b:is_sh = 1 | |
if exists("b:is_kornshell") | |
unlet b:is_kornshell | |
endif | |
if exists("b:is_bash") | |
unlet b:is_bash | |
endif | |
endif | |
3 0.039026 0.000018 call SetFileTypeShell("sh") | |
FUNCTION airline#extensions#tabline#default#wrap_name() | |
Called 2108 times | |
Total time: 0.030779 | |
Self time: 0.030779 | |
count total (s) self (s) | |
2108 0.005988 let _ = s:buf_nr_show ? printf(s:buf_nr_format, a:bufnr) : '' | |
2108 0.011159 let _ .= substitute(a:buffer_name, '\\', '/', 'g') | |
2108 0.005933 if getbufvar(a:bufnr, '&modified') == 1 | |
3 0.000006 let _ .= s:buf_modified_symbol | |
3 0.000002 endif | |
2108 0.001678 return _ | |
FUNCTION neosnippet#parser#_parse() | |
Called 2 times | |
Total time: 0.001131 | |
Self time: 0.000636 | |
count total (s) self (s) | |
2 0.000013 if !filereadable(a:snippet_file) | |
call neosnippet#util#print_error( printf('snippet file "%s" is not found.', a:snippet_file)) | |
return {} | |
endif | |
2 0.000164 0.000009 let cache_dir = neosnippet#variables#data_dir() | |
2 0.000152 0.000015 if s:Cache.check_old_cache(cache_dir, a:snippet_file) | |
let snippets = s:parse(a:snippet_file) | |
if len(snippets) > 5 | |
call s:Cache.writefile(cache_dir, a:snippet_file, [string(snippets)]) | |
endif | |
else | |
2 0.000775 0.000572 sandbox let snippets = eval(s:Cache.readfile(cache_dir, a:snippet_file)[0]) | |
2 0.000002 endif | |
2 0.000002 return snippets | |
FUNCTION <SNR>99_make_abbr() | |
Called 112 times | |
Total time: 0.008582 | |
Self time: 0.008395 | |
count total (s) self (s) | |
112 0.000485 let bufname = fnamemodify(bufname(a:bufnr), ':t') | |
112 0.000138 if bufname == '' | |
let bufname = bufname(a:bufnr) | |
endif | |
112 0.000284 let filetype = getbufvar(a:bufnr, '&filetype') | |
112 0.000207 if filetype ==# 'vimfiler' || filetype ==# 'vimshell' | |
if filetype ==# 'vimfiler' | |
let vimfiler = getbufvar(a:bufnr, 'vimfiler') | |
let path = vimfiler.current_dir | |
if vimfiler.source !=# 'file' | |
let path = vimfiler.source . ':' . path | |
endif | |
else | |
let path = simplify(getbufvar(a:bufnr, 'vimshell').current_dir) | |
endif | |
let path = printf('%s [%s : %s]', bufname, path, filetype) | |
else | |
112 0.000957 let path = bufname(a:bufnr) == '' ? 'No Name' : simplify(fnamemodify(bufname(a:bufnr), ':~:.')) | |
112 0.000147 if a:flags != '' | |
" Format flags so that buffer numbers are aligned on the left. | |
" example: '42 a% +' => ' 42 a%+ ' | |
" '3 h +' => ' 3 h+ ' | |
112 0.000990 let nowhitespace = substitute(a:flags, '\s*', '', 'g') | |
112 0.001434 let path = substitute(nowhitespace, '\v(\d+)(.*)', '\=printf("%*s %-*s", 3, submatch(1), 4, submatch(2))', 'g') . path | |
112 0.000075 endif | |
112 0.000127 if filetype != '' | |
112 0.000277 let path .= ' [' . filetype . ']' | |
112 0.000061 endif | |
112 0.000057 endif | |
112 0.001250 0.001063 return (getbufvar(a:bufnr, '&buftype') =~# 'nofile' ? '[nofile] ' : '' ) . unite#util#substitute_path_separator(path) . ' ' | |
FUNCTION unite#do_action() | |
Called 11 times | |
Total time: 0.000214 | |
Self time: 0.000214 | |
count total (s) self (s) | |
11 0.000173 return printf("%s:\<C-u>call unite#action#do(%s)\<CR>", (mode() ==# 'i' ? "\<ESC>" : ''), string(a:action)) | |
FUNCTION unite#init#_kinds() | |
Called 90 times | |
Total time: 0.006507 | |
Self time: 0.004954 | |
count total (s) self (s) | |
90 0.002752 0.001199 let kinds = extend(copy(unite#variables#static().kinds), unite#variables#dynamic().kinds) | |
90 0.002481 for kind in values(filter(copy(kinds), '!has_key(v:val, "is_initialized")')) | |
let kind.is_initialized = 1 | |
if !has_key(kind, 'action_table') | |
let kind.action_table = {} | |
endif | |
if !has_key(kind, 'alias_table') | |
let kind.alias_table = {} | |
endif | |
if !has_key(kind, 'parents') | |
let kind.parents = ['common'] | |
endif | |
endfor | |
90 0.000088 return kinds | |
FUNCTION unite#variables#disable_current_unite() | |
Called 14 times | |
Total time: 0.000057 | |
Self time: 0.000057 | |
count total (s) self (s) | |
14 0.000037 let s:use_current_unite = 0 | |
FUNCTION unite#loaded_source_names() | |
Called 28 times | |
Total time: 0.001082 | |
Self time: 0.000474 | |
count total (s) self (s) | |
28 0.001063 0.000455 return map(copy(unite#loaded_sources_list()), 'v:val.name') | |
FUNCTION airline#parts#mode() | |
Called 117 times | |
Total time: 0.000715 | |
Self time: 0.000715 | |
count total (s) self (s) | |
117 0.000575 return get(w:, 'airline_current_mode', '') | |
FUNCTION unite#view#_convert_lines() | |
Called 140 times | |
Total time: 0.692376 | |
Self time: 0.117549 | |
count total (s) self (s) | |
140 0.000452 let quick_match_table = get(a:000, 0, {}) | |
140 0.001278 0.000364 let unite = unite#get_current_unite() | |
140 0.002028 0.000373 let context = unite#get_context() | |
140 0.001966 0.000774 let [max_width, max_source_name] = unite#helper#adjustments( winwidth(0), unite.max_source_name, 2) | |
" Create key table. | |
140 0.000163 let keys = {} | |
140 0.000353 for [key, number] in items(quick_match_table) | |
let keys[number] = key . '|' | |
endfor | |
140 0.685403 0.114337 return map(copy(a:candidates), "(v:val.is_dummy ? ' ' : v:val.unite__is_marked ? context.marked_icon . ' ' : empty(quick_match_table) ? context.candidate_icon . ' ' : get(keys, v:key, ' ')) . (unite.max_source_name == 0 ? '' : unite#util#truncate(unite#helper#convert_source_name( (v:val.is_dummy ? '' : v:val.source)), max_source_name)) . unite#util#truncate_wrap(v:val.unite__abbr, " . max_width . ", (context.truncate ? 0 : max_width/2), '..')") | |
FUNCTION 57() | |
Called 17 times | |
Total time: 0.010287 | |
Self time: 0.010287 | |
count total (s) self (s) | |
17 0.000021 if self.do_validate | |
17 0.010233 call filter(self.candidates, 'getftype(v:val) ==# "dir"') | |
17 0.000015 endif | |
FUNCTION <SNR>119_close() | |
Called 221 times | |
Total time: 0.023904 | |
Self time: 0.001204 | |
count total (s) self (s) | |
221 0.000191 if self.is_valid | |
126 0.007590 0.001116 call self.f_close() | |
126 0.000057 endif | |
221 0.000249 let self.is_valid = 0 | |
221 0.000224 let self.eof = 1 | |
221 0.000217 let self.__eof = 1 | |
FUNCTION <SNR>28_substitute_path_separator() | |
Called 13313 times | |
Total time: 0.030248 | |
Self time: 0.030248 | |
count total (s) self (s) | |
13313 0.026549 return s:is_windows ? substitute(a:path, '\\', '/', 'g') : a:path | |
FUNCTION unite#filters#lua_filter_patterns() | |
Called 91 times | |
Total time: 5.052313 | |
Self time: 5.052313 | |
count total (s) self (s) | |
91 0.000141 lua << EOF | |
do | |
local patterns = vim.eval('a:patterns') | |
local whites = vim.eval('a:whites') | |
local candidates = vim.eval('a:candidates') | |
for i = #candidates-1, 0, -1 do | |
local word = string.lower(candidates[i].action__path | |
or candidates[i].word) | |
for j = #patterns-1, 0, -1 do | |
if string.find(word, patterns[j]) then | |
local match = nil | |
-- Search from whites | |
for k = #whites-1, 0, -1 do | |
if string.find(word, whites[k]) then | |
match = k | |
break | |
end | |
end | |
if match == nil then | |
candidates[i] = nil | |
end | |
end | |
end | |
end | |
end | |
EOF | |
91 0.000611 return a:candidates | |
FUNCTION <SNR>18_BMHash() | |
Called 10 times | |
Total time: 0.000413 | |
Self time: 0.000413 | |
count total (s) self (s) | |
" Make name all upper case, so that chars are between 32 and 96 | |
10 0.000131 let nm = substitute(a:name, ".*", '\U\0', "") | |
10 0.000047 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 | |
10 0.000020 let sp = char2nr(' ') | |
10 0.000005 endif | |
" convert first six chars into a number for sorting: | |
10 0.000133 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>119_vp_pipe_open() | |
Called 14 times | |
Total time: 0.102790 | |
Self time: 0.001136 | |
count total (s) self (s) | |
14 0.000017 try | |
14 0.000049 0.000032 if vimproc#util#is_windows() | |
let cmdline = s:quote_arg(substitute(a:argv[0], '/', '\', 'g')) | |
for arg in a:argv[1:] | |
let cmdline .= ' ' . s:quote_arg(arg) | |
endfor | |
let [pid; fdlist] = s:libcall('vp_pipe_open', [a:npipe, a:hstdin, a:hstdout, a:hstderr, cmdline]) | |
else | |
14 0.102130 0.000493 let [pid; fdlist] = s:libcall('vp_pipe_open', [a:npipe, a:hstdin, a:hstdout, a:hstderr, len(a:argv)] + a:argv) | |
14 0.000010 endif | |
14 0.000018 catch | |
call s:print_error(v:throwpoint) | |
call s:print_error(v:exception) | |
call s:print_error( 'vimproc: Error occurred in calling s:vp_pipe_open()') | |
call s:print_error(printf( 'a:argv = %s', string(a:argv))) | |
call s:print_error(printf( 'original a:argv = %s', vimproc#util#iconv( string(a:argv), vimproc#util#systemencoding(), &encoding))) | |
endtry | |
14 0.000037 if a:npipe != len(fdlist) | |
call s:print_error(printf( 'a:npipe = %d, a:argv = %s', a:npipe, string(a:argv))) | |
call s:print_error(printf( 'pid = %d, fdlist = %s', pid, string(fdlist))) | |
echoerr 'Bug behavior is detected!: ' . pid | |
endif | |
14 0.000080 return [pid] + fdlist | |
FUNCTION unite#variables#loaded_defaults() | |
Called 4678 times | |
Total time: 0.025510 | |
Self time: 0.025510 | |
count total (s) self (s) | |
4678 0.011128 if !exists('s:loaded_defaults') | |
let s:loaded_defaults = {} | |
endif | |
4678 0.004770 return s:loaded_defaults | |
FUNCTION unite#action#get_action_table() | |
Called 79 times | |
Total time: 0.207131 | |
Self time: 0.002293 | |
count total (s) self (s) | |
79 0.000320 let is_parents_action = get(a:000, 0, 0) | |
79 0.000251 let source_table = get(a:000, 1, {}) | |
79 0.000122 let action_table = {} | |
158 0.000970 0.000524 for kind_name in unite#util#convert2list(a:kind) | |
79 0.074453 0.013809 call extend(action_table, s:get_action_table(a:source_name, kind_name, a:self_func, is_parents_action, source_table)) | |
79 0.000056 endfor | |
79 0.000086 return action_table | |
FUNCTION <SNR>28_path2directory() | |
Called 12852 times | |
Total time: 0.126440 | |
Self time: 0.097742 | |
count total (s) self (s) | |
12852 0.123411 0.094713 return s:substitute_path_separator(isdirectory(a:path) ? a:path : fnamemodify(a:path, ':p:h')) | |
FUNCTION unite#candidates#_recache() | |
Called 140 times | |
Total time: 26.354353 | |
Self time: 0.056150 | |
count total (s) self (s) | |
140 0.001694 0.000499 let unite = unite#get_current_unite() | |
" Save options. | |
140 0.000289 let ignorecase_save = &ignorecase | |
140 0.000235 let context = unite.context | |
140 0.000155 try | |
140 0.000179 if context.smartcase | |
140 0.001059 let &ignorecase = a:input !~ '\u' | |
140 0.000112 else | |
let &ignorecase = context.ignorecase | |
endif | |
140 0.000261 let context.is_redraw = a:is_force | |
140 0.000483 let context.is_changed = a:input !=# unite.last_input || context.path !=# unite.last_path | |
140 0.000306 if empty(unite.args) | |
if a:input !~ '^.\{-}\%(\\\@<!\s\)\+' | |
" Use interactive source. | |
let sources = unite#init#_loaded_sources(['interactive'], context) | |
else | |
" Use specified source. | |
let args = unite#helper#parse_options_args( matchstr(a:input, '^.\{-}\%(\\\@<!\s\)\+'))[0] | |
try | |
" Ignore source name | |
let context.input = matchstr(context.input, '^.\{-}\%(\\\@<!\s\)\+\zs.*') | |
let sources = unite#init#_loaded_sources(args, context) | |
catch | |
let sources = [] | |
finally | |
let context.input = a:input | |
endtry | |
endif | |
if get(unite.sources, 0, {'name' : ''}).name !=# get(sources, 0, {'name' : ''}).name | |
" Finalize previous sources. | |
call unite#helper#call_hook(unite.sources, 'on_close') | |
let unite.sources = sources | |
let unite.source_names = unite#helper#get_source_names(sources) | |
let prev_winnr = winnr() | |
try | |
execute bufwinnr(unite.prev_bufnr).'wincmd w' | |
" Initialize. | |
call unite#helper#call_hook(sources, 'on_init') | |
finally | |
if winnr() != prev_winnr | |
execute prev_winnr . 'wincmd w' | |
endif | |
endtry | |
if &filetype ==# 'unite' | |
call unite#view#_set_syntax() | |
endif | |
endif | |
endif | |
560 0.000862 for source in unite.sources | |
420 0.004749 let source.unite__candidates = [] | |
420 0.000284 endfor | |
140 0.023478 0.001603 let inputs = unite#helper#get_substitute_input(a:input) | |
140 0.000441 let context.is_list_input = len(inputs) > 1 | |
280 0.000437 for input in inputs | |
140 0.000301 let context.input = input | |
140 25.694784 0.001293 call s:recache_candidates_loop(context, a:is_force) | |
140 0.000110 endfor | |
" Restore prompt input | |
140 0.000324 let context.input = a:input | |
140 0.000206 let filtered_count = 0 | |
560 0.000585 for source in unite.sources | |
420 0.000634 let source.unite__is_invalidate = 0 | |
420 0.001764 if !context.unite__not_buffer && source.max_candidates != 0 && context.unite__is_interactive && !unite.disabled_max_candidates && len(source.unite__candidates) > source.max_candidates | |
" Filtering too many candidates. | |
40 0.002046 let source.unite__candidates = source.unite__candidates[: source.max_candidates - 1] | |
40 0.000065 if context.verbose && filtered_count < &cmdheight | |
echohl WarningMsg | echomsg printf( '[%s] Filtering too many candidates.', source.name) | echohl None | |
let filtered_count += 1 | |
endif | |
40 0.000017 endif | |
420 0.000424 if source.is_grouped | |
let source.unite__candidates = unite#candidates#_group_post_filters(source.unite__candidates) | |
endif | |
" Call post_filter hook. | |
420 0.007830 let source.unite__context.candidates = source.unite__candidates | |
420 0.354095 0.003781 call unite#helper#call_hook([source], 'on_post_filter') | |
420 0.231494 0.002668 let source.unite__candidates = unite#init#_candidates_source( source.unite__context.candidates, source.name) | |
420 0.000985 let source.unite__len_candidates = len(source.unite__candidates) | |
420 0.000219 endfor | |
" Update async state. | |
140 0.001326 let unite.is_async = len(filter(copy(unite.sources), 'v:val.unite__context.is_async')) > 0 | |
140 0.000102 finally | |
140 0.000499 let &ignorecase = ignorecase_save | |
140 0.000091 endtry | |
140 0.003147 0.000645 call unite#handlers#_save_updatetime() | |
FUNCTION <SNR>25_get_string() | |
Called 140 times | |
Total time: 0.001072 | |
Self time: 0.001072 | |
count total (s) self (s) | |
140 0.000387 if !exists('s:String') | |
let s:String = unite#util#get_vital().import('Data.String') | |
endif | |
140 0.000140 return s:String | |
FUNCTION <SNR>119_read() | |
Called 1446 times | |
Total time: 7.835162 | |
Self time: 0.119498 | |
count total (s) self (s) | |
1446 0.002213 if self.__eof | |
let self.eof = 1 | |
return '' | |
endif | |
1446 0.003146 let maxsize = get(a:000, 0, -1) | |
1446 0.003412 let timeout = get(a:000, 1, s:read_timeout) | |
1446 0.001866 let buf = [] | |
1446 0.001574 let eof = 0 | |
2925 0.005570 while maxsize != 0 && !eof | |
2916 7.741823 0.026159 let [out, eof] = self.f_read(maxsize, (timeout < s:read_timeout ? timeout : s:read_timeout)) | |
2916 0.006848 if out ==# '' | |
1437 0.003040 let timeout -= s:read_timeout | |
1437 0.001739 if timeout <= 0 | |
1437 0.001427 break | |
endif | |
else | |
1479 0.006984 let buf += [out] | |
1479 0.006807 let maxsize -= len(out) | |
1479 0.003016 let timeout = 0 | |
1479 0.001528 endif | |
1479 0.001748 endwhile | |
1446 0.002662 let self.eof = eof | |
1446 0.002198 let self.__eof = eof | |
1446 0.008019 return join(buf, '') | |
FUNCTION unite#filters#globs2patterns() | |
Called 182 times | |
Total time: 0.061195 | |
Self time: 0.001709 | |
count total (s) self (s) | |
182 0.061031 0.001545 return unite#util#has_lua() ? unite#filters#globs2lua_patterns(a:globs) : unite#filters#globs2vim_patterns(a:globs) | |
FUNCTION unite#view#_redraw_prompt() | |
Called 154 times | |
Total time: 0.012816 | |
Self time: 0.011640 | |
count total (s) self (s) | |
154 0.001665 0.000489 let unite = unite#get_current_unite() | |
154 0.000185 if unite.prompt_linenr < 0 | |
return | |
endif | |
154 0.000225 let modifiable_save = &l:modifiable | |
154 0.000125 try | |
154 0.000180 setlocal modifiable | |
154 0.001686 call setline(unite.prompt_linenr, unite.prompt . unite.context.input) | |
154 0.003278 silent! syntax clear uniteInputLine | |
154 0.004128 execute 'syntax match uniteInputLine' '/\%'.unite.prompt_linenr.'l.*/' 'contains=uniteInputPrompt,uniteInputPromptError,'. 'uniteInputCommand' | |
154 0.000120 finally | |
154 0.000303 let &l:modifiable = modifiable_save | |
154 0.000101 endtry | |
FUNCTION <SNR>83_get_visible_buffers() | |
Called 52 times | |
Total time: 0.135181 | |
Self time: 0.008658 | |
count total (s) self (s) | |
52 0.010051 0.000228 let buffers = s:get_buffer_list() | |
52 0.000095 let cur = bufnr('%') | |
52 0.000069 let total_width = 0 | |
52 0.000067 let max_width = 0 | |
502 0.000423 for nr in buffers | |
450 0.119304 0.002604 let width = len(airline#extensions#tabline#get_buffer_name(nr)) + 4 | |
450 0.000783 let total_width += width | |
450 0.001282 let max_width = max([max_width, width]) | |
450 0.000312 endfor | |
" only show current and surrounding buffers if there are too many buffers | |
52 0.000140 let position = index(buffers, cur) | |
52 0.000093 let vimwidth = &columns | |
52 0.000091 if total_width > vimwidth && position > -1 | |
12 0.000024 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 | |
12 0.000019 let buf_max = vimwidth / max_width | |
12 0.000013 let buf_right = 1 | |
12 0.000031 let buf_left = max([0, buf_max - buf_right]) | |
12 0.000029 let start = max([0, position - buf_left]) | |
12 0.000028 let end = min([buf_count, position + buf_right]) | |
" fill up available space on the right | |
12 0.000013 if position < buf_left | |
2 0.000003 let end += (buf_left - position) | |
2 0.000000 endif | |
" fill up available space on the left | |
12 0.000023 if end > buf_count - 1 - buf_right | |
10 0.000032 let start -= max([0, buf_right - (buf_count - 1 - position)]) | |
10 0.000004 endif | |
12 0.000066 let buffers = eval('buffers[' . start . ':' . end . ']') | |
12 0.000011 if start > 0 | |
10 0.000044 call insert(buffers, -1, 0) | |
10 0.000002 endif | |
12 0.000014 if end < buf_count - 1 | |
2 0.000005 call add(buffers, -1) | |
2 0.000001 endif | |
12 0.000008 endif | |
52 0.000149 let g:current_visible_buffers = buffers | |
52 0.000043 return buffers | |
FUNCTION <SNR>90_add_section() | |
Called 605 times | |
Total time: 0.028497 | |
Self time: 0.008979 | |
count total (s) self (s) | |
" i have no idea why the warning section needs special treatment, but it's | |
" needed to prevent separators from showing up | |
605 0.000966 if a:key == 'warning' | |
47 0.000401 0.000143 call a:builder.add_raw('%(') | |
47 0.000026 endif | |
605 0.023340 0.004265 call a:builder.add_section('airline_'.a:key, s:get_section(a:context.winnr, a:key)) | |
605 0.000721 if a:key == 'warning' | |
47 0.000306 0.000121 call a:builder.add_raw('%)') | |
47 0.000032 endif | |
FUNCTION unite#candidates#gather() | |
Called 140 times | |
Total time: 0.180399 | |
Self time: 0.017806 | |
count total (s) self (s) | |
140 0.000353 let is_gather_all = get(a:000, 0, 0) | |
140 0.001121 0.000307 let unite = unite#get_current_unite() | |
140 0.002953 let unite.candidates = [] | |
560 0.000490 for source in unite.sources | |
420 0.002086 let unite.candidates += source.unite__candidates | |
420 0.000202 endfor | |
140 0.000230 if unite.context.prompt_direction ==# 'below' | |
let unite.candidates = reverse(unite.candidates) | |
endif | |
140 0.000114 if unite.context.unique | |
" Uniq filter. | |
let unite.candidates = unite#util#uniq_by(unite.candidates, "string(v:val.kind) . ' ' . v:val.word") | |
endif | |
140 0.000285 if is_gather_all || unite.context.prompt_direction ==# 'below' || unite.context.quick_match | |
let unite.candidates_pos = len(unite.candidates) | |
elseif unite.context.is_redraw || unite.candidates_pos == 0 | |
14 0.000043 let unite.candidates_pos = line('.') + winheight(0) | |
14 0.000006 endif | |
140 0.163374 0.001595 let candidates = unite#init#_candidates( unite.candidates[: unite.candidates_pos-1]) | |
140 0.000263 if empty(candidates) && unite.prompt_linenr == 0 | |
let unite.prompt_linenr = 1 | |
endif | |
140 0.000249 let unite.context.unite__max_candidates = 0 | |
140 0.001494 let unite.context.input_list = split(unite.context.input, '\\\@<! ', 1) | |
" Post filter. | |
140 0.000224 for filter_name in unite.post_filters | |
let candidates = unite#helper#call_filter( filter_name, candidates, unite.context) | |
endfor | |
140 0.002274 let unite.candidates_len = len(candidates) + len(unite.candidates[unite.candidates_pos :]) | |
140 0.000187 if unite.context.prompt_direction ==# 'below' | |
if unite.prompt_linenr == 0 | |
let unite.init_prompt_linenr = unite.candidates_len + 1 | |
else | |
let unite.prompt_linenr = unite.candidates_len | |
if unite.prompt_linenr == 0 | |
let unite.prompt_linenr = 1 | |
endif | |
endif | |
endif | |
140 0.000121 return candidates | |
FUNCTION <SNR>125_cursor_up() | |
Called 12 times | |
Total time: 0.002043 | |
Self time: 0.002043 | |
count total (s) self (s) | |
12 0.001055 nnoremap <expr><buffer> <Plug>(unite_loop_cursor_up) unite#mappings#cursor_up(0) | |
12 0.000351 nnoremap <expr><buffer> <Plug>(unite_skip_cursor_up) unite#mappings#cursor_up(1) | |
12 0.000321 inoremap <expr><buffer> <Plug>(unite_select_previous_line) unite#mappings#cursor_up(0) | |
12 0.000280 inoremap <expr><buffer> <Plug>(unite_skip_previous_line) unite#mappings#cursor_up(1) | |
FUNCTION unite#get_self_functions() | |
Called 11 times | |
Total time: 0.000427 | |
Self time: 0.000427 | |
count total (s) self (s) | |
11 0.000402 return split(matchstr(expand('<sfile>'), '^function \zs.*$'), '\.\.')[: -2] | |
FUNCTION unite#util#truncate() | |
Called 16055 times | |
Total time: 0.302310 | |
Self time: 0.072926 | |
count total (s) self (s) | |
16055 0.298711 0.069327 return call(s:get_prelude().truncate, a:000) | |
FUNCTION unite#init#_sources() | |
Called 25 times | |
Total time: 0.056581 | |
Self time: 0.042736 | |
count total (s) self (s) | |
" args: source_names or source_definition | |
" Initialize load. | |
25 0.000113 if type(get(a:000, 0, [])) != type({}) | |
25 0.000132 let source_names = type(get(a:000, 0, [])) == type([]) ? get(a:000, 0, []) : [] | |
25 0.000073 let head_name = get(a:000, 1, '') | |
25 0.000065 if empty(source_names) && head_name != '' | |
11 0.000020 let source_names = [head_name] | |
11 0.000007 endif | |
25 0.007904 0.000158 call unite#init#_default_scripts('sources', source_names) | |
25 0.000013 endif | |
25 0.000266 let default_source = { 'is_volatile' : 0, 'is_listed' : 1, 'is_forced' : 0, 'is_grouped' : 0, 'required_pattern_length' : 0, 'action_table' : {}, 'default_action' : {}, 'default_kind' : 'common', 'alias_table' : {}, 'parents' : [], 'description' : '', 'syntax' : '', } | |
25 0.000041 let sources = {} | |
25 0.000657 0.000454 let sources = extend(sources, unite#variables#static().sources) | |
25 0.000376 0.000160 let sources = extend(sources, unite#variables#dynamic().sources) | |
25 0.000108 if type(get(a:000, 0, [])) == type({}) | |
let sources[a:1.name] = a:1 | |
endif | |
25 0.000359 0.000100 let custom = unite#custom#get() | |
400 0.000497 for source in type(sources) == type([]) ? sources : values(sources) | |
375 0.000331 try | |
375 0.000784 if !get(source, 'is_initialized', 0) | |
let source.is_initialized = 1 | |
if !has_key(source, 'hooks') | |
let source.hooks = {} | |
elseif has_key(source.hooks, 'on_pre_init') | |
" Call pre_init hook. | |
" Set dummy value. | |
let source.args = [] | |
let source.unite__context = { 'source' : source } | |
" Overwrite source values. | |
call unite#helper#call_hook([source], 'on_pre_init') | |
endif | |
let source = extend(source, default_source, 'keep') | |
if source.syntax == '' | |
" Set default syntax. | |
let source.syntax = 'uniteSource__' . substitute(substitute(source.name, '\%(^\|[^[:alnum:]]\+\)\zs[[:alnum:]]', '\u\0', 'g'), '[^[:alnum:]]', '', 'g') | |
endif | |
if !empty(source.action_table) | |
let action = values(source.action_table)[0] | |
" Check if '*' action_table? | |
if has_key(action, 'func') && type(action.func) == type(function('type')) | |
" Syntax sugar. | |
let source.action_table = { '*' : source.action_table } | |
endif | |
endif | |
if type(source.default_action) == type('') | |
" Syntax sugar. | |
let source.default_action = { '*' : source.default_action } | |
endif | |
if !empty(source.alias_table) | |
" Check if '*' alias_table? | |
if type(values(source.alias_table)[0]) == type('') | |
" Syntax sugar. | |
let source.alias_table = { '*' : source.alias_table } | |
endif | |
endif | |
if source.is_volatile && !has_key(source, 'change_candidates') | |
let source.change_candidates = source.gather_candidates | |
call remove(source, 'gather_candidates') | |
endif | |
endif | |
" For custom sources. | |
375 0.001128 let custom_source = get(custom.sources, source.name, {}) | |
" Set filters. | |
375 0.000650 if has_key(custom_source, 'filters') | |
call unite#print_error( '[unite.vim] Custom filters feature is removed.'. ' You must use matchers/sorters/converters feature.') | |
endif | |
375 0.003709 0.002553 let source.matchers = unite#util#convert2list( get(custom_source, 'matchers', get(source, 'matchers', 'matcher_default'))) | |
375 0.003423 0.002340 let source.sorters = unite#util#convert2list( get(custom_source, 'sorters', get(source, 'sorters', 'sorter_default'))) | |
375 0.003382 0.002298 let source.converters = unite#util#convert2list( get(custom_source, 'converters', get(source, 'converters', 'converter_default'))) | |
375 0.001432 let source.max_candidates = get(custom_source, 'max_candidates', get(source, 'max_candidates', 0)) | |
375 0.001637 let source.ignore_pattern = get(custom_source, 'ignore_pattern', get(source, 'ignore_pattern', '')) | |
375 0.003191 0.002146 let source.ignore_globs = unite#util#convert2list( get(custom_source, 'ignore_globs', get(source, 'ignore_globs', []))) | |
375 0.003209 0.002156 let source.white_globs = unite#util#convert2list( get(custom_source, 'white_globs', get(source, 'white_globs', []))) | |
375 0.000545 let source.unite__len_candidates = 0 | |
375 0.000520 let source.unite__orig_len_candidates = 0 | |
375 0.000547 let source.unite__candidates = [] | |
375 0.000212 catch | |
call unite#print_error(v:throwpoint) | |
call unite#print_error(v:exception) | |
call unite#print_error( '[unite.vim] Error occurred in source initialization!') | |
call unite#print_error( '[unite.vim] Source name is ' . source.name) | |
endtry | |
375 0.000219 endfor | |
25 0.000024 return sources | |
FUNCTION unite#helper#call_filter() | |
Called 1400 times | |
Total time: 5.089596 | |
Self time: 0.020814 | |
count total (s) self (s) | |
1400 0.217778 0.007583 let filter = unite#get_filters(a:filter_name) | |
1400 0.001948 if empty(filter) | |
return a:candidates | |
endif | |
1400 4.866268 0.007681 return filter.filter(a:candidates, a:context) | |
FUNCTION unite#handlers#_on_insert_enter() | |
Called 14 times | |
Total time: 0.000266 | |
Self time: 0.000172 | |
count total (s) self (s) | |
14 0.000031 if &filetype !=# 'unite' | |
return | |
endif | |
14 0.000027 setlocal modifiable | |
14 0.000128 0.000034 let unite = unite#get_current_unite() | |
14 0.000016 let unite.is_insert = 1 | |
14 0.000012 if unite.prompt_linenr != 0 | |
14 0.000006 return | |
endif | |
" Restore prompt | |
let unite.prompt_linenr = unite.init_prompt_linenr | |
call append((unite.context.prompt_direction ==# 'below' ? '$' : 0), '') | |
call unite#view#_redraw_prompt() | |
FUNCTION unite#filters#vim_filter_pattern() | |
Called 14 times | |
Total time: 0.221307 | |
Self time: 0.221307 | |
count total (s) self (s) | |
14 0.221295 return filter(a:candidates, "get(v:val, 'action__path', v:val.word) !~? a:pattern") | |
FUNCTION <SNR>136_flatten() | |
Called 2 times | |
Total time: 0.000077 | |
Self time: 0.000049 | |
count total (s) self (s) | |
2 0.000003 let limit = a:0 > 0 ? a:1 : -1 | |
2 0.000002 let memo = [] | |
2 0.000002 if limit == 0 | |
return a:list | |
endif | |
2 0.000002 let limit -= 1 | |
6 0.000006 for Value in a:list | |
4 0.000014 let memo += type(Value) == type([]) ? s:flatten(Value, limit) : [Value] | |
4 0.000002 unlet! Value | |
4 0.000002 endfor | |
2 0.000001 return memo | |
FUNCTION <SNR>90_build_sections() | |
Called 186 times | |
Total time: 0.035963 | |
Self time: 0.007466 | |
count total (s) self (s) | |
883 0.001026 for key in a:keys | |
697 0.001132 if key == 'warning' && !a:context.active | |
92 0.000099 continue | |
endif | |
605 0.031017 0.002520 call s:add_section(a:builder, a:context, key) | |
605 0.000428 endfor | |
FUNCTION unite#variables#enable_current_unite() | |
Called 14 times | |
Total time: 0.000088 | |
Self time: 0.000088 | |
count total (s) self (s) | |
14 0.000060 let s:use_current_unite = 1 | |
FUNCTION unite#init#_candidates_source() | |
Called 420 times | |
Total time: 0.228826 | |
Self time: 0.219152 | |
count total (s) self (s) | |
420 0.011480 0.001806 let source = unite#variables#loaded_sources(a:source_name) | |
420 0.002009 let default_candidate = { 'kind' : source.default_kind, 'is_dummy' : 0, 'is_matched' : 1, 'is_multiline' : 0, 'unite__is_marked' : 0, } | |
420 0.000463 let candidates = [] | |
27354 0.015851 for candidate in a:candidates | |
26934 0.081773 let candidate = extend(candidate, default_candidate, 'keep') | |
26934 0.034626 let candidate.source = a:source_name | |
26934 0.056430 call add(candidates, candidate) | |
26934 0.010664 endfor | |
420 0.000353 return candidates | |
FUNCTION <SNR>177_get_default_action() | |
Called 11 times | |
Total time: 0.027059 | |
Self time: 0.000626 | |
count total (s) self (s) | |
11 0.024342 0.000056 let source = unite#get_all_sources(a:source_name) | |
11 0.000017 if empty(source) | |
return '' | |
endif | |
11 0.000041 let source_kind = 'source/'.a:source_name.'/'.a:kind_name | |
11 0.000027 let source_kind_wild = 'source/'.a:source_name.'/*' | |
11 0.000172 0.000056 let custom = unite#custom#get() | |
" Source/kind custom default actions. | |
11 0.000028 if has_key(custom.default_actions, source_kind) | |
return custom.default_actions[source_kind] | |
endif | |
" Source custom default actions. | |
11 0.000035 if has_key(source.default_action, a:kind_name) | |
return source.default_action[a:kind_name] | |
endif | |
" Source/* custom default actions. | |
11 0.000021 if has_key(custom.default_actions, source_kind_wild) | |
return custom.default_actions[source_kind_wild] | |
endif | |
" Source/* default actions. | |
11 0.000016 if has_key(source.default_action, '*') | |
return source.default_action['*'] | |
endif | |
" Kind custom default actions. | |
11 0.000017 if has_key(custom.default_actions, a:kind_name) | |
return custom.default_actions[a:kind_name] | |
endif | |
" Kind default actions. | |
11 0.002079 0.000048 let kind = unite#get_kinds(a:kind_name) | |
11 0.000025 return get(kind, 'default_action', '') | |
FUNCTION <SNR>119_garbage_collect() | |
Called 1 time | |
Total time: 0.003237 | |
Self time: 0.000394 | |
count total (s) self (s) | |
6 0.000022 for pid in values(s:bg_processes) | |
" Check processes. | |
5 0.000010 try | |
5 0.001173 0.000059 let [cond, _] = s:libcall('vp_waitpid', [pid]) | |
" echomsg string([pid, cond, _]) | |
5 0.000013 if cond !=# 'run' || a:is_force | |
5 0.000009 if cond !=# 'exit' | |
" Kill process. | |
5 0.001763 0.000058 call vimproc#kill(pid, g:vimproc#SIGTERM) | |
5 0.000006 endif | |
5 0.000054 0.000030 if vimproc#util#is_windows() | |
call s:libcall('vp_close_handle', [pid]) | |
endif | |
5 0.000052 call remove(s:bg_processes, pid) | |
5 0.000006 endif | |
5 0.000005 catch | |
" Ignore error. | |
endtry | |
5 0.000009 endfor | |
FUNCTION <SNR>37_buffer_getvar() | |
Called 50 times | |
Total time: 0.000160 | |
Self time: 0.000160 | |
count total (s) self (s) | |
50 0.000146 return getbufvar(self['#'],a:var) | |
FUNCTION <SNR>177_filter_alias_action() | |
Called 79 times | |
Total time: 0.001786 | |
Self time: 0.001786 | |
count total (s) self (s) | |
90 0.000303 for [alias_name, alias_action] in items(a:alias_table) | |
11 0.000025 if alias_action ==# 'nop' | |
if has_key(a:action_table, alias_name) | |
" Delete nop action. | |
call remove(a:action_table, alias_name) | |
endif | |
elseif has_key(a:action_table, alias_action) | |
11 0.000080 let a:action_table[alias_name] = copy(a:action_table[alias_action]) | |
11 0.000031 let a:action_table[alias_name].from = a:from | |
11 0.000027 let a:action_table[alias_name].name = alias_name | |
11 0.000011 endif | |
11 0.000010 endfor | |
FUNCTION <SNR>88_get_transitioned_seperator() | |
Called 938 times | |
Total time: 0.250178 | |
Self time: 0.015951 | |
count total (s) self (s) | |
938 0.001315 let line = '' | |
938 0.238752 0.004525 call airline#highlighter#add_separator(a:prev_group, a:group, a:side) | |
938 0.003369 let line .= '%#'.a:prev_group.'_to_'.a:group.'#' | |
938 0.002963 let line .= a:side ? a:self._context.left_sep : a:self._context.right_sep | |
938 0.001747 let line .= '%#'.a:group.'#' | |
938 0.000804 return line | |
FUNCTION <SNR>18_BMAdd() | |
Called 10 times | |
Total time: 0.003545 | |
Self time: 0.000265 | |
count total (s) self (s) | |
10 0.000016 if s:bmenu_wait == 0 | |
" when adding too many buffers, redraw in short format | |
10 0.000027 if s:bmenu_count == &menuitems && s:bmenu_short == 0 | |
call s:BMShow() | |
else | |
10 0.003384 0.000104 call <SID>BMFilename(expand("<afile>"), expand("<abuf>")) | |
10 0.000037 let s:bmenu_count = s:bmenu_count + 1 | |
10 0.000008 endif | |
10 0.000005 endif | |
FUNCTION unite#util#get_name() | |
Called 79 times | |
Total time: 0.001628 | |
Self time: 0.000556 | |
count total (s) self (s) | |
79 0.001586 0.000514 return get(a:list, unite#util#index_name(a:list, a:name), a:default) | |
FUNCTION <SNR>25_get_list() | |
Called 473 times | |
Total time: 0.003062 | |
Self time: 0.003062 | |
count total (s) self (s) | |
473 0.001090 if !exists('s:List') | |
let s:List = unite#util#get_vital().import('Data.List') | |
endif | |
473 0.000391 return s:List | |
FUNCTION unite#mappings#define_default_mappings() | |
Called 14 times | |
Total time: 0.031139 | |
Self time: 0.028796 | |
count total (s) self (s) | |
" Plugin keymappings "{{{ | |
14 0.001002 nnoremap <silent><buffer> <Plug>(unite_exit) :<C-u>call <SID>exit()<CR> | |
14 0.000252 nnoremap <silent><buffer> <Plug>(unite_all_exit) :<C-u>call <SID>all_exit()<CR> | |
14 0.000233 nnoremap <silent><buffer> <Plug>(unite_choose_action) :<C-u>call <SID>choose_action()<CR> | |
14 0.000021 if b:unite.prompt_linenr == 0 | |
nnoremap <silent><buffer> <Plug>(unite_insert_enter) :<C-u>call <SID>insert_enter2()<CR> | |
nnoremap <silent><buffer> <Plug>(unite_insert_head) :<C-u>call <SID>insert_enter2()<CR> | |
nnoremap <silent><buffer> <Plug>(unite_append_enter) :<C-u>call <SID>insert_enter2()<CR> | |
nnoremap <silent><buffer> <Plug>(unite_append_end) :<C-u>call <SID>insert_enter2()<CR> | |
else | |
14 0.000229 nnoremap <expr><buffer> <Plug>(unite_insert_enter) <SID>insert_enter('i') | |
14 0.000265 nnoremap <expr><buffer> <Plug>(unite_insert_head) <SID>insert_enter('A'. (repeat("\<Left>", len(substitute( unite#helper#get_input(), '.', 'x', 'g'))))) | |
14 0.000214 nnoremap <expr><buffer> <Plug>(unite_append_enter) <SID>insert_enter('a') | |
14 0.000192 nnoremap <expr><buffer> <Plug>(unite_append_end) <SID>insert_enter('A') | |
14 0.000009 endif | |
14 0.000218 nnoremap <silent><buffer> <Plug>(unite_toggle_mark_current_candidate) :<C-u>call <SID>toggle_mark('j')<CR> | |
14 0.000226 nnoremap <silent><buffer> <Plug>(unite_toggle_mark_current_candidate_up) :<C-u>call <SID>toggle_mark('k')<CR> | |
14 0.000212 nnoremap <silent><buffer> <Plug>(unite_redraw) :<C-u>call <SID>redraw()<CR> | |
14 0.000212 nnoremap <silent><buffer> <Plug>(unite_rotate_next_source) :<C-u>call <SID>rotate_source(1)<CR> | |
14 0.000202 nnoremap <silent><buffer> <Plug>(unite_rotate_previous_source) :<C-u>call <SID>rotate_source(0)<CR> | |
14 0.000206 nnoremap <silent><buffer> <Plug>(unite_print_candidate) :<C-u>call <SID>print_candidate()<CR> | |
14 0.000207 nnoremap <silent><buffer> <Plug>(unite_print_message_log) :<C-u>call <SID>print_message_log()<CR> | |
14 0.000207 nnoremap <buffer><expr> <Plug>(unite_cursor_top) 'gg0z.' | |
14 0.000214 nnoremap <silent><buffer> <Plug>(unite_cursor_bottom) :<C-u>call <SID>redraw_all_candidates()<CR>G | |
14 0.000233 nnoremap <buffer><silent> <Plug>(unite_next_screen) :<C-u>call <SID>move_screen(1)<CR> | |
14 0.000209 nnoremap <buffer><silent> <Plug>(unite_next_half_screen) :<C-u>call <SID>move_half_screen(1)<CR> | |
14 0.000239 nnoremap <silent><buffer> <Plug>(unite_quick_match_default_action) :<C-u>call unite#mappings#_quick_match(0)<CR> | |
14 0.000207 nnoremap <silent><buffer> <Plug>(unite_quick_match_choose_action) :<C-u>call unite#mappings#_quick_match(1)<CR> | |
14 0.000216 nnoremap <silent><buffer> <Plug>(unite_input_directory) :<C-u>call <SID>input_directory()<CR> | |
14 0.000221 nnoremap <silent><buffer><expr> <Plug>(unite_do_default_action) unite#do_action(unite#get_current_unite().context.default_action) | |
14 0.000208 nnoremap <silent><buffer> <Plug>(unite_delete_backward_path) :<C-u>call <SID>delete_backward_path()<CR> | |
14 0.000192 nnoremap <silent><buffer> <Plug>(unite_restart) :<C-u>call <SID>restart()<CR> | |
14 0.000206 nnoremap <buffer><silent> <Plug>(unite_toggle_mark_all_candidates) :<C-u>call <SID>toggle_mark_all_candidates()<CR> | |
14 0.000203 nnoremap <buffer><silent> <Plug>(unite_toggle_transpose_window) :<C-u>call <SID>toggle_transpose_window()<CR> | |
14 0.000201 nnoremap <buffer><silent> <Plug>(unite_toggle_auto_preview) :<C-u>call <SID>toggle_auto_preview()<CR> | |
14 0.000222 nnoremap <buffer><silent> <Plug>(unite_toggle_auto_highlight) :<C-u>call <SID>toggle_auto_highlight()<CR> | |
14 0.000204 nnoremap <buffer><silent> <Plug>(unite_narrowing_input_history) :<C-u>call <SID>narrowing_input_history()<CR> | |
14 0.000194 nnoremap <buffer><silent> <Plug>(unite_narrowing_dot) :<C-u>call <SID>narrowing_dot()<CR> | |
14 0.000200 nnoremap <buffer><silent> <Plug>(unite_disable_max_candidates) :<C-u>call <SID>disable_max_candidates()<CR> | |
14 0.000197 nnoremap <buffer><silent> <Plug>(unite_quick_help) :<C-u>call <SID>quick_help()<CR> | |
14 0.000196 nnoremap <buffer><silent> <Plug>(unite_new_candidate) :<C-u>call <SID>do_new_candidate_action()<CR> | |
14 0.000247 vnoremap <buffer><silent> <Plug>(unite_toggle_mark_selected_candidates) :<C-u>call <SID>toggle_mark_candidates( getpos("'<")[1], getpos("'>")[1])<CR> | |
14 0.000214 inoremap <silent><buffer> <Plug>(unite_exit) <ESC>:<C-u>call <SID>exit()<CR> | |
14 0.000193 inoremap <silent><buffer> <Plug>(unite_insert_leave) <ESC>:<C-u>call <SID>insert_leave()<CR> | |
14 0.000280 inoremap <silent><expr><buffer> <Plug>(unite_delete_backward_char) <SID>smart_imap("\<ESC>:\<C-u>call \<SID>all_exit()\<CR>", (unite#helper#get_input() == '' ? "\<ESC>:\<C-u>call \<SID>all_exit()\<CR>" : "\<C-h>")) | |
14 0.000245 inoremap <silent><expr><buffer> <Plug>(unite_delete_backward_line) <SID>smart_imap('', repeat("\<C-h>", col('.')-(len(unite#get_current_unite().prompt)+1))) | |
14 0.000194 inoremap <silent><expr><buffer> <Plug>(unite_delete_backward_word) <SID>smart_imap('', "\<C-w>") | |
14 0.000200 inoremap <silent><buffer> <Plug>(unite_delete_backward_path) <C-o>:<C-u>call <SID>delete_backward_path()<CR> | |
14 0.000213 inoremap <expr><buffer> <Plug>(unite_select_next_page) pumvisible() ? "\<PageDown>" : repeat("\<Down>", winheight(0)) | |
14 0.000206 inoremap <expr><buffer> <Plug>(unite_select_previous_page) pumvisible() ? "\<PageUp>" : repeat("\<Up>", winheight(0)) | |
14 0.000193 inoremap <silent><buffer> <Plug>(unite_toggle_mark_current_candidate) <C-o>:<C-u>call <SID>toggle_mark('j')<CR> | |
14 0.000201 inoremap <silent><buffer> <Plug>(unite_toggle_mark_current_candidate_up) <C-o>:<C-u>call <SID>toggle_mark('k')<CR> | |
14 0.000181 inoremap <silent><buffer> <Plug>(unite_choose_action) <C-o>:<C-u>call <SID>choose_action()<CR> | |
14 0.000252 inoremap <expr><buffer> <Plug>(unite_move_head) <SID>smart_imap("\<ESC>".<SID>insert_enter('A'), repeat("\<Left>", len(substitute( unite#helper#get_input(), '.', 'x', 'g')))) | |
14 0.000196 inoremap <silent><buffer> <Plug>(unite_quick_match_default_action) <C-o>:<C-u>call unite#mappings#_quick_match(0)<CR> | |
14 0.000198 inoremap <silent><buffer> <Plug>(unite_quick_match_choose_action) <C-o>:<C-u>call unite#mappings#_quick_match(1)<CR> | |
14 0.000184 inoremap <silent><buffer> <Plug>(unite_input_directory) <C-o>:<C-u>call <SID>input_directory()<CR> | |
14 0.000200 inoremap <silent><buffer><expr> <Plug>(unite_do_default_action) unite#do_action(unite#get_current_unite().context.default_action) | |
14 0.000190 inoremap <silent><buffer> <Plug>(unite_toggle_transpose_window) <C-o>:<C-u>call <SID>toggle_transpose_window()<CR> | |
14 0.000190 inoremap <silent><buffer> <Plug>(unite_toggle_auto_preview) <C-o>:<C-u>call <SID>toggle_auto_preview()<CR> | |
14 0.000192 inoremap <silent><buffer> <Plug>(unite_toggle_auto_highlight) <C-o>:<C-u>call <SID>toggle_auto_highlight()<CR> | |
14 0.000192 inoremap <silent><buffer> <Plug>(unite_narrowing_input_history) <C-o>:<C-u>call <SID>narrowing_input_history()<CR> | |
14 0.000190 inoremap <silent><buffer> <Plug>(unite_disable_max_candidates) <C-o>:<C-u>call <SID>disable_max_candidates()<CR> | |
14 0.000173 inoremap <silent><buffer> <Plug>(unite_redraw) <C-o>:<C-u>call <SID>redraw()<CR> | |
14 0.000186 inoremap <buffer><silent> <Plug>(unite_new_candidate) <C-o>:<C-u>call <SID>do_new_candidate_action()<CR> | |
14 0.000185 inoremap <silent><buffer> <Plug>(unite_print_message_log) <C-o>:<C-u>call <SID>print_message_log()<CR> | |
14 0.000194 inoremap <expr><silent><buffer> <Plug>(unite_complete) <SID>complete() | |
"}}} | |
14 0.000044 if exists('g:unite_no_default_keymappings') && g:unite_no_default_keymappings | |
return | |
endif | |
" Normal mode key-mappings. | |
14 0.000390 0.000303 execute s:nowait_nmap() 'i' '<Plug>(unite_insert_enter)' | |
14 0.000313 0.000262 execute s:nowait_nmap() 'I' '<Plug>(unite_insert_head)' | |
14 0.000292 0.000239 execute s:nowait_nmap() 'A' '<Plug>(unite_append_end)' | |
14 0.000296 0.000243 execute s:nowait_nmap() 'q' '<Plug>(unite_exit)' | |
14 0.000293 0.000243 execute s:nowait_nmap() '<C-g>' '<Plug>(unite_exit)' | |
14 0.000295 0.000248 execute s:nowait_nmap() 'Q' '<Plug>(unite_all_exit)' | |
14 0.000320 0.000253 execute s:nowait_nmap() 'g<C-g>' '<Plug>(unite_all_exit)' | |
14 0.000314 0.000263 execute s:nowait_nmap() '<CR>' '<Plug>(unite_do_default_action)' | |
14 0.000312 0.000260 execute s:nowait_nmap() '<Space>' '<Plug>(unite_toggle_mark_current_candidate)' | |
14 0.000311 0.000261 execute s:nowait_nmap() '<S-Space>' '<Plug>(unite_toggle_mark_current_candidate_up)' | |
14 0.000282 0.000232 execute s:nowait_nmap() '<Tab>' '<Plug>(unite_choose_action)' | |
14 0.000292 0.000240 execute s:nowait_nmap() '<C-n>' '<Plug>(unite_rotate_next_source)' | |
14 0.000314 0.000247 execute s:nowait_nmap() '<C-p>' '<Plug>(unite_rotate_previous_source)' | |
14 0.000292 0.000238 execute s:nowait_nmap() '<C-a>' '<Plug>(unite_print_message_log)' | |
14 0.000286 0.000235 execute s:nowait_nmap() '<C-k>' '<Plug>(unite_print_candidate)' | |
14 0.000317 0.000262 execute s:nowait_nmap() '<C-l>' '<Plug>(unite_redraw)' | |
14 0.000303 0.000251 execute s:nowait_nmap() 'gg' '<Plug>(unite_cursor_top)' | |
14 0.000283 0.000229 execute s:nowait_nmap() 'G' '<Plug>(unite_cursor_bottom)' | |
14 0.000300 0.000234 execute s:nowait_nmap() 'j' '<Plug>(unite_loop_cursor_down)' | |
14 0.000310 0.000255 execute s:nowait_nmap() '<Down>' '<Plug>(unite_loop_cursor_down)' | |
14 0.000278 0.000228 execute s:nowait_nmap() 'k' '<Plug>(unite_loop_cursor_up)' | |
14 0.000295 0.000242 execute s:nowait_nmap() '<Up>' '<Plug>(unite_loop_cursor_up)' | |
14 0.000296 0.000244 execute s:nowait_nmap() 'J' '<Plug>(unite_skip_cursor_down)' | |
14 0.000291 0.000236 execute s:nowait_nmap() 'K' '<Plug>(unite_skip_cursor_up)' | |
14 0.000293 0.000241 execute s:nowait_nmap() '<C-h>' '<Plug>(unite_delete_backward_path)' | |
14 0.000296 0.000248 execute s:nowait_nmap() '<C-r>' '<Plug>(unite_restart)' | |
14 0.000296 0.000242 execute s:nowait_nmap() '*' '<Plug>(unite_toggle_mark_all_candidates)' | |
14 0.000285 0.000234 execute s:nowait_nmap() 'M' '<Plug>(unite_disable_max_candidates)' | |
14 0.000287 0.000234 execute s:nowait_nmap() 'g?' '<Plug>(unite_quick_help)' | |
14 0.000303 0.000226 execute s:nowait_nmap() 'N' '<Plug>(unite_new_candidate)' | |
14 0.000283 0.000232 execute s:nowait_nmap() '.' '<Plug>(unite_narrowing_dot)' | |
14 0.000303 0.000252 execute s:nowait_nmap() '<2-LeftMouse>' '<Plug>(unite_do_default_action)' | |
14 0.000308 0.000255 execute s:nowait_nmap() '<RightMouse>' '<Plug>(unite_exit)' | |
14 0.000404 0.000316 execute s:nowait_expr('nmap') 'a' 'unite#smart_map("\<Plug>(unite_append_enter)", "\<Plug>(unite_choose_action)")' | |
14 0.000319 0.000263 execute s:nowait_expr('nnoremap') 'd' 'unite#smart_map(''d'', unite#do_action(''delete''))' | |
14 0.000319 0.000250 execute s:nowait_expr('nnoremap') 'b' 'unite#smart_map(''b'', unite#do_action(''bookmark''))' | |
14 0.000299 0.000246 execute s:nowait_expr('nnoremap') 'e' 'unite#smart_map(''e'', unite#do_action(''edit''))' | |
14 0.000290 0.000241 execute s:nowait_expr('nnoremap') 'p' 'unite#smart_map(''p'', unite#mappings#smart_preview())' | |
14 0.000315 0.000264 execute s:nowait_expr('nmap') 'x' 'unite#smart_map(''x'', "\<Plug>(unite_quick_match_default_action)")' | |
14 0.000306 0.000254 execute s:nowait_expr('nnoremap') 't' 'unite#smart_map(''t'', unite#do_action(''tabopen''))' | |
14 0.000304 0.000250 execute s:nowait_expr('nnoremap') 'yy' 'unite#smart_map(''yy'', unite#do_action(''yank''))' | |
14 0.000294 0.000240 execute s:nowait_expr('nnoremap') 'o' 'unite#smart_map(''o'', unite#do_action(''open''))' | |
" Visual mode key-mappings. | |
14 0.000202 xmap <buffer> <Space> <Plug>(unite_toggle_mark_selected_candidates) | |
" Insert mode key-mappings. | |
14 0.000179 imap <buffer> <TAB> <Plug>(unite_choose_action) | |
14 0.000165 imap <buffer> <C-n> <Plug>(unite_select_next_line) | |
14 0.000165 imap <buffer> <Down> <Plug>(unite_select_next_line) | |
14 0.000163 imap <buffer> <C-p> <Plug>(unite_select_previous_line) | |
14 0.000163 imap <buffer> <Up> <Plug>(unite_select_previous_line) | |
14 0.000154 imap <buffer> <C-f> <Plug>(unite_select_next_page) | |
14 0.000165 imap <buffer> <C-b> <Plug>(unite_select_previous_page) | |
14 0.000154 imap <buffer> <CR> <Plug>(unite_do_default_action) | |
14 0.000175 imap <buffer> <C-h> <Plug>(unite_delete_backward_char) | |
14 0.000160 imap <buffer> <BS> <Plug>(unite_delete_backward_char) | |
14 0.000168 imap <buffer> <C-u> <Plug>(unite_delete_backward_line) | |
14 0.000168 imap <buffer> <C-w> <Plug>(unite_delete_backward_word) | |
14 0.000163 imap <buffer> <C-a> <Plug>(unite_move_head) | |
14 0.000179 imap <buffer> <Home> <Plug>(unite_move_head) | |
14 0.000163 imap <buffer> <C-l> <Plug>(unite_redraw) | |
14 0.000041 if has('gui_running') | |
14 0.000182 imap <buffer> <ESC> <Plug>(unite_insert_leave) | |
14 0.000008 endif | |
14 0.000165 imap <buffer> <C-g> <Plug>(unite_exit) | |
14 0.000176 imap <buffer> <2-LeftMouse> <Plug>(unite_do_default_action) | |
14 0.000172 imap <buffer> <RightMouse> <Plug>(unite_exit) | |
14 0.000185 imap <silent><buffer><expr> <Space> unite#smart_map(' ', "\<Plug>(unite_toggle_mark_current_candidate)") | |
14 0.000190 imap <silent><buffer><expr> <S-Space> unite#smart_map(' ', "\<Plug>(unite_toggle_mark_current_candidate_up)") | |
14 0.000146 inoremap <silent><buffer><expr> <C-d> unite#do_action('delete') | |
14 0.000146 inoremap <silent><buffer><expr> <C-e> unite#do_action('edit') | |
14 0.000150 inoremap <silent><buffer><expr> <C-t> unite#do_action('tabopen') | |
14 0.000158 inoremap <silent><buffer><expr> <C-y> unite#do_action('yank') | |
14 0.000160 inoremap <silent><buffer><expr> <C-o> unite#do_action('open') | |
FUNCTION <SNR>119_pgroup_open() | |
Called 14 times | |
Total time: 0.133147 | |
Self time: 0.000944 | |
count total (s) self (s) | |
14 0.000016 let proc = {} | |
14 0.127027 0.000221 let proc.current_proc = vimproc#plineopen{a:npipe}(a:statements[0].statement, a:is_pty) | |
14 0.000027 let proc.pid = proc.current_proc.pid | |
14 0.000019 let proc.pid_list = proc.current_proc.pid_list | |
14 0.000047 let proc.condition = a:statements[0].condition | |
14 0.000027 let proc.statements = a:statements[1:] | |
14 0.001789 0.000163 let proc.stdin = s:fdopen_pgroup(proc, proc.current_proc.stdin, 'vp_pgroup_close', 'read_pgroup', 'write_pgroup') | |
14 0.001730 0.000074 let proc.stdout = s:fdopen_pgroup(proc, proc.current_proc.stdout, 'vp_pgroup_close', 'read_pgroup', 'write_pgroup') | |
14 0.001729 0.000075 let proc.stderr = s:fdopen_pgroup(proc, proc.current_proc.stderr, 'vp_pgroup_close', 'read_pgroup', 'write_pgroup') | |
14 0.000280 0.000049 let proc.kill = s:funcref('vp_pgroup_kill') | |
14 0.000282 0.000052 let proc.waitpid = s:funcref('vp_pgroup_waitpid') | |
14 0.000018 let proc.is_valid = 1 | |
14 0.000017 let proc.is_pty = 0 | |
" echomsg expand('<sfile>') | |
" echomsg 'open:' string(map(copy(proc.current_proc.stdin.fd), 'v:val.fd')) | |
" echomsg 'open:' string(map(copy(proc.current_proc.stdout.fd), 'v:val.fd')) | |
" echomsg 'open:' string(map(copy(proc.current_proc.stderr.fd), 'v:val.fd')) | |
14 0.000037 return proc | |
FUNCTION unite#sources#rec#_append() | |
Called 76 times | |
Total time: 1.013451 | |
Self time: 0.009338 | |
count total (s) self (s) | |
76 0.000676 let path = expand('%:p') | |
76 0.000529 if path !~ '\a\+:' | |
76 0.000657 let path = simplify(resolve(path)) | |
76 0.000042 endif | |
" Append the current buffer to the mru list. | |
76 0.000632 if !filereadable(path) || &l:buftype =~# 'help\|nofile' | |
14 0.000006 return | |
endif | |
62 0.000409 0.000283 let path = unite#util#substitute_path_separator(path) | |
" Check continuation. | |
62 0.000427 0.000343 let base_path = unite#util#substitute_path_separator( fnamemodify(path, ':h')) . '/' | |
72 0.001297 for continuation in values(filter(copy(s:continuation.file), "stridx(v:key.'/', base_path) == 0")) | |
10 1.008091 0.004188 let continuation.files = unite#util#uniq(add( continuation.files, { 'word' : path, 'action__path' : path, })) | |
10 0.000027 endfor | |
FUNCTION <SNR>37_buffer() | |
Called 30 times | |
Total time: 0.000779 | |
Self time: 0.000676 | |
count total (s) self (s) | |
30 0.000145 let buffer = {'#': bufnr(a:0 ? a:1 : '%')} | |
30 0.000357 call extend(extend(buffer,s:buffer_prototype,'keep'),s:abstract_prototype,'keep') | |
30 0.000212 0.000109 if buffer.getvar('git_dir') !=# '' | |
30 0.000031 return buffer | |
endif | |
call s:throw('not a git repository: '.expand('%:p')) | |
FUNCTION <SNR>158_should_create_cache() | |
Called 19 times | |
Total time: 0.000627 | |
Self time: 0.000627 | |
count total (s) self (s) | |
19 0.000314 let filepath = fnamemodify(bufname(a:bufnr), ':p') | |
19 0.000280 return getfsize(filepath) < g:neocomplete#sources#buffer#cache_limit_size && getbufvar(a:bufnr, '&modifiable') && !getwinvar(bufwinnr(a:bufnr), '&previewwindow') && (g:neocomplete#sources#buffer#disabled_pattern == '' || filepath !~# g:neocomplete#sources#buffer#disabled_pattern) | |
FUNCTION <SNR>119_read_pipes() | |
Called 1446 times | |
Total time: 7.871497 | |
Self time: 0.036335 | |
count total (s) self (s) | |
1446 0.005695 if type(self.fd[-1]) != type({}) | |
let self.eof = 1 | |
return '' | |
endif | |
1446 0.003341 let number = get(a:000, 0, -1) | |
1446 0.003544 let timeout = get(a:000, 1, s:read_timeout) | |
1446 7.844463 0.009301 let output = self.fd[-1].read(number, timeout) | |
1446 0.003810 let self.eof = self.fd[-1].eof | |
1446 0.004001 return output | |
FUNCTION <SNR>25_get_prelude() | |
Called 30738 times | |
Total time: 0.140938 | |
Self time: 0.140938 | |
count total (s) self (s) | |
30738 0.054405 if !exists('s:Prelude') | |
let s:Prelude = unite#util#get_vital().import('Prelude') | |
endif | |
30738 0.020416 return s:Prelude | |
FUNCTION <SNR>37_repo_head() | |
Called 11 times | |
Total time: 0.002446 | |
Self time: 0.000549 | |
count total (s) self (s) | |
11 0.001706 0.000134 let head = s:repo().head_ref() | |
11 0.000138 if head =~# '^ref: ' | |
11 0.000452 0.000127 let branch = s:sub(head,'^ref: %(refs/%(heads/|remotes/|tags/)=)=','') | |
11 0.000016 elseif head =~# '^\x\{40\}$' | |
" truncate hash to a:1 characters if we're in detached head mode | |
let len = a:0 ? a:1 : 0 | |
let branch = len ? head[0:len-1] : '' | |
else | |
return '' | |
endif | |
11 0.000016 return branch | |
FUNCTION unite#util#truncate_wrap() | |
Called 8065 times | |
Total time: 0.324752 | |
Self time: 0.051659 | |
count total (s) self (s) | |
8065 0.018191 let width = strwidth(a:str) | |
8065 0.006781 if width <= a:max | |
7990 0.177733 0.021291 return unite#util#truncate(a:str, a:max) | |
elseif &l:wrap | |
return a:str | |
endif | |
75 0.000280 let header_width = a:max - strwidth(a:separator) - a:footer_width | |
75 0.117312 0.000661 return unite#util#strwidthpart(a:str, header_width) . a:separator . unite#util#strwidthpart_reverse(a:str, a:footer_width) | |
FUNCTION unite#variables#kinds() | |
Called 90 times | |
Total time: 0.019036 | |
Self time: 0.002029 | |
count total (s) self (s) | |
90 0.000136 if a:0 == 0 | |
call unite#init#_default_scripts('kinds', []) | |
else | |
90 0.011046 0.000546 call unite#init#_default_scripts('kinds', [a:1]) | |
90 0.000059 endif | |
90 0.007015 0.000508 let kinds = unite#init#_kinds() | |
90 0.000347 return (a:0 == 0) ? kinds : get(kinds, a:1, {}) | |
FUNCTION <SNR>138__create_hash() | |
Called 4 times | |
Total time: 0.000115 | |
Self time: 0.000115 | |
count total (s) self (s) | |
4 0.000010 if len(a:dir) + len(a:str) < 150 | |
4 0.000059 let hash = substitute(substitute( a:str, ':', '=-', 'g'), '[/\\]', '=+', 'g') | |
4 0.000004 elseif exists('*sha256') | |
let hash = sha256(a:str) | |
else | |
" Use simple hash. | |
let sum = 0 | |
for i in range(len(a:str)) | |
let sum += char2nr(a:str[i]) * (i + 1) | |
endfor | |
let hash = printf('%x', sum) | |
endif | |
4 0.000003 return hash | |
FUNCTION unite#helper#get_source_names() | |
Called 42 times | |
Total time: 0.001428 | |
Self time: 0.001428 | |
count total (s) self (s) | |
42 0.001386 return map(map(copy(a:sources), "type(v:val) == type([]) ? v:val[0] : v:val"), "type(v:val) == type('') ? v:val : v:val.name") | |
FUNCTION fugitive#is_git_dir() | |
Called 56 times | |
Total time: 0.000850 | |
Self time: 0.000529 | |
count total (s) self (s) | |
56 0.000549 0.000228 let path = s:sub(a:path, '[\/]$', '') . '/' | |
56 0.000265 return isdirectory(path.'objects') && isdirectory(path.'refs') && getfsize(path.'HEAD') > 10 | |
FUNCTION unite#set_current_unite() | |
Called 42 times | |
Total time: 0.000405 | |
Self time: 0.000243 | |
count total (s) self (s) | |
42 0.000351 0.000189 return unite#variables#set_current_unite(a:unite) | |
FUNCTION airline#extensions#branch#head() | |
Called 117 times | |
Total time: 0.005024 | |
Self time: 0.001786 | |
count total (s) self (s) | |
117 0.000699 if exists('b:airline_head') && !empty(b:airline_head) | |
106 0.000154 return b:airline_head | |
endif | |
11 0.000024 let b:airline_head = '' | |
11 0.000021 let found_fugitive_head = 0 | |
11 0.000043 if s:has_fugitive && !exists('b:mercurial_dir') | |
11 0.003321 0.000083 let b:airline_head = fugitive#head(7) | |
11 0.000025 let found_fugitive_head = 1 | |
11 0.000036 if empty(b:airline_head) && !exists('b:git_dir') | |
let b:airline_head = s:get_git_branch(expand("%:p:h")) | |
endif | |
11 0.000008 endif | |
11 0.000021 if empty(b:airline_head) | |
if s:has_lawrencium | |
let b:airline_head = lawrencium#statusline() | |
endif | |
endif | |
11 0.000016 if empty(b:airline_head) | |
if s:has_vcscommand | |
call VCSCommandEnableBufferSetup() | |
if exists('b:VCSCommandBufferInfo') | |
let b:airline_head = get(b:VCSCommandBufferInfo, 0, '') | |
endif | |
endif | |
endif | |
11 0.000041 if empty(b:airline_head) || !found_fugitive_head && !s:check_in_path() | |
let b:airline_head = '' | |
endif | |
11 0.000043 if exists("g:airline#extensions#branch#displayed_head_limit") | |
let w:displayed_head_limit = g:airline#extensions#branch#displayed_head_limit | |
if len(b:airline_head) > w:displayed_head_limit - 1 | |
let b:airline_head = b:airline_head[0:w:displayed_head_limit - 1].'…' | |
endif | |
endif | |
11 0.000015 return b:airline_head | |
FUNCTION <SNR>28_wcswidth() | |
Called 9406 times | |
Total time: 0.017165 | |
Self time: 0.017165 | |
count total (s) self (s) | |
9406 0.014965 return strwidth(a:str) | |
FUNCTION neosnippet#init#check() | |
Called 24 times | |
Total time: 0.000157 | |
Self time: 0.000157 | |
count total (s) self (s) | |
24 0.000083 if !exists('s:is_initialized') | |
call neosnippet#init#_initialize() | |
endif | |
FUNCTION <SNR>107_filereadable() | |
Called 3 times | |
Total time: 0.000194 | |
Self time: 0.000043 | |
count total (s) self (s) | |
3 0.000168 0.000017 let cache_name = s:_encode_name(a:cache_dir, a:filename) | |
3 0.000023 return filereadable(cache_name) | |
FUNCTION unite#init#_current_unite() | |
Called 14 times | |
Total time: 0.069163 | |
Self time: 0.003300 | |
count total (s) self (s) | |
14 0.000048 let context = a:context | |
" Overwrite previous unite buffer. | |
14 0.000039 if !context.create && !context.temporary && context.unite__is_interactive | |
14 0.000708 0.000086 let winnr = unite#helper#get_unite_winnr(context.buffer_name) | |
14 0.000021 if winnr > 0 | |
execute winnr 'wincmd w' | |
if context.input == '' | |
" Get input text. | |
let context.input = unite#helper#get_input() | |
endif | |
endif | |
14 0.000011 endif | |
" The current buffer is initialized. | |
14 0.000034 let buffer_name = '[unite] - ' | |
14 0.000042 let buffer_name .= context.buffer_name | |
14 0.000029 let winnr = winnr() | |
14 0.000067 let win_rest_cmd = winrestcmd() | |
" Check sources. | |
14 0.038545 0.000127 let sources = unite#init#_loaded_sources(a:sources, a:context) | |
" Set parameters. | |
14 0.000020 let unite = {} | |
14 0.000026 let unite.winnr = winnr | |
14 0.000032 let unite.winmax = winnr('$') | |
14 0.000051 let unite.win_rest_cmd = (!context.unite__direct_switch) ? win_rest_cmd : '' | |
14 0.000023 let unite.context = context | |
14 0.000018 let unite.current_candidates = [] | |
14 0.000020 let unite.sources = sources | |
14 0.000435 0.000084 let unite.source_names = unite#helper#get_source_names(sources) | |
14 0.000046 let unite.buffer_name = (context.buffer_name == '') ? 'default' : context.buffer_name | |
14 0.000045 let unite.profile_name = (context.profile_name != '') ? context.profile_name : unite.buffer_name | |
14 0.000041 let unite.prev_bufnr = bufnr('%') | |
14 0.000023 let unite.prev_winnr = winnr() | |
14 0.000019 let unite.prev_line = 0 | |
14 0.000030 let unite.update_time_save = &updatetime | |
14 0.001251 0.000071 let unite.statusline = unite#view#_get_status_string(unite) | |
" Create new buffer name. | |
14 0.001209 0.000088 let postfix = unite#helper#get_postfix( buffer_name, unite.context.create) | |
14 0.000040 let unite.buffer_name .= postfix | |
14 0.000050 let unite.real_buffer_name = buffer_name . postfix | |
14 0.000047 let unite.prompt = context.prompt | |
14 0.000026 let unite.input = context.input | |
14 0.000025 let unite.last_input = context.input | |
14 0.000031 let unite.last_path = context.path | |
14 0.000038 let unite.sidescrolloff_save = &sidescrolloff | |
14 0.000022 let unite.init_prompt_linenr = 1 | |
14 0.000068 let unite.prompt_linenr = (!context.prompt_visible && context.input == '' && !context.start_insert) ? 0 : unite.init_prompt_linenr | |
14 0.000167 let unite.is_async = len(filter(copy(sources), 'v:val.unite__context.is_async')) > 0 | |
14 0.000036 let unite.access_time = localtime() | |
14 0.000023 let unite.is_finalized = 0 | |
14 0.000026 let unite.previewed_buffer_list = [] | |
14 0.000612 0.000112 let unite.post_filters = unite#util#convert2list( unite#custom#get_profile(unite.profile_name, 'filters')) | |
14 0.000029 let unite.preview_candidate = {} | |
14 0.000025 let unite.highlight_candidate = {} | |
14 0.000023 let unite.max_source_name = 0 | |
14 0.000021 let unite.candidates_pos = 0 | |
14 0.000020 let unite.candidates = [] | |
14 0.000017 let unite.candidates_len = 0 | |
14 0.000021 let unite.candidate_cursor = -1 | |
14 0.000019 let unite.max_source_candidates = 0 | |
14 0.000018 let unite.is_multi_line = 0 | |
14 0.000355 0.000069 let unite.args = unite#helper#get_source_args(a:sources) | |
14 0.000025 let unite.msgs = [] | |
14 0.000020 let unite.err_msgs = [] | |
14 0.000036 let unite.redraw_hold_candidates = g:unite_redraw_hold_candidates | |
14 0.000022 let unite.disabled_max_candidates = 0 | |
14 0.000037 let unite.cursor_line_time = reltime() | |
14 0.000037 let unite.match_id = 11 | |
14 0.000017 if context.here | |
let context.winheight = winheight(0) - winline() + 1 | |
if context.winheight < 5 | |
let context.winheight = 5 | |
endif | |
endif | |
" Preview windows check. | |
14 0.000240 let unite.has_preview_window = len(filter(range(1, winnr('$')), 'getwinvar(v:val, "&previewwindow")')) > 0 | |
14 0.000175 0.000065 call unite#set_current_unite(unite) | |
14 0.000713 0.000058 call unite#set_context(context) | |
14 0.000017 if !context.unite__is_complete | |
14 0.022692 0.000072 call unite#helper#call_hook(sources, 'on_init') | |
14 0.000006 endif | |
14 0.000016 return unite | |
FUNCTION unite#util#has_lua() | |
Called 1101 times | |
Total time: 0.028405 | |
Self time: 0.011300 | |
count total (s) self (s) | |
" Note: Disabled if_lua feature if less than 7.3.885. | |
" Because if_lua has double free problem. | |
" Note: Cannot use lua interface in Windows environment if encoding is not utf-8. | |
" https://github.com/Shougo/unite.vim/issues/466 | |
1101 0.026095 0.008990 return has('lua') && (v:version > 703 || v:version == 703 && has('patch885')) && (!unite#util#is_windows() || &encoding ==# 'utf-8' || &encoding ==# 'latin1') | |
FUNCTION unite#util#is_windows() | |
Called 1178 times | |
Total time: 0.018130 | |
Self time: 0.008782 | |
count total (s) self (s) | |
1178 0.017559 0.008211 return call(s:get_prelude().is_windows, a:000) | |
FUNCTION unite#get_context() | |
Called 1682 times | |
Total time: 0.027684 | |
Self time: 0.012869 | |
count total (s) self (s) | |
1682 0.020901 0.006086 let unite = unite#get_current_unite() | |
1682 0.005506 return has_key(unite, 'context') ? unite.context : unite#init#_context({}) | |
FUNCTION unite#handlers#_save_updatetime() | |
Called 182 times | |
Total time: 0.003421 | |
Self time: 0.001874 | |
count total (s) self (s) | |
182 0.002141 0.000594 let unite = unite#get_current_unite() | |
182 0.000440 if unite.is_async && unite.context.update_time > 0 && &updatetime > unite.context.update_time | |
12 0.000023 let unite.update_time_save = &updatetime | |
12 0.000045 let &updatetime = unite.context.update_time | |
12 0.000006 endif | |
FUNCTION unite#view#_bottom_cursor() | |
Called 14 times | |
Total time: 0.000351 | |
Self time: 0.000351 | |
count total (s) self (s) | |
14 0.000048 let pos = getpos('.') | |
14 0.000014 try | |
14 0.000210 normal! zb | |
14 0.000011 finally | |
14 0.000028 call setpos('.', pos) | |
14 0.000012 endtry | |
FUNCTION neosnippet#variables#runtime_dir() | |
Called 1 time | |
Total time: 0.000005 | |
Self time: 0.000005 | |
count total (s) self (s) | |
1 0.000001 if !exists('s:runtime_dir') | |
let s:runtime_dir = [] | |
endif | |
1 0.000001 return s:runtime_dir | |
FUNCTION <SNR>54_call_unite_empty() | |
Called 14 times | |
Total time: 4.917412 | |
Self time: 0.000462 | |
count total (s) self (s) | |
14 0.007895 0.000252 let [args, options] = unite#helper#parse_options_args(a:args) | |
14 4.909468 0.000161 call unite#start(args, options) | |
FUNCTION <SNR>105_is_sudo() | |
Called 33 times | |
Total time: 0.000214 | |
Self time: 0.000214 | |
count total (s) self (s) | |
33 0.000200 return $SUDO_USER != '' && $USER !=# $SUDO_USER && $HOME !=# expand('~'.$USER) && $HOME ==# expand('~'.$SUDO_USER) | |
FUNCTION <SNR>66_Highlight_Matching_Pair() | |
Called 311 times | |
Total time: 0.080539 | |
Self time: 0.080539 | |
count total (s) self (s) | |
" Remove any previous match. | |
311 0.001506 if exists('w:paren_hl_on') && w:paren_hl_on | |
3 0.000008 silent! call matchdelete(3) | |
3 0.000005 let w:paren_hl_on = 0 | |
3 0.000001 endif | |
" Avoid that we remove the popup menu. | |
" Return when there are no colors (looks like the cursor jumps). | |
311 0.002464 if pumvisible() || (&t_Co < 8 && !has("gui_running")) | |
return | |
endif | |
" Get the character under the cursor and check if it's in 'matchpairs'. | |
311 0.000831 let c_lnum = line('.') | |
311 0.000819 let c_col = col('.') | |
311 0.000392 let before = 0 | |
311 0.000946 let text = getline(c_lnum) | |
311 0.000930 let c = text[c_col - 1] | |
311 0.004793 let plist = split(&matchpairs, '.\zs[:,]') | |
311 0.000950 let i = index(plist, c) | |
311 0.000320 if i < 0 | |
" not found, in Insert mode try character before the cursor | |
307 0.000971 if c_col > 1 && (mode() == 'i' || mode() == 'R') | |
230 0.000337 let before = 1 | |
230 0.000521 let c = text[c_col - 2] | |
230 0.000557 let i = index(plist, c) | |
230 0.000177 endif | |
307 0.000255 if i < 0 | |
" not found, nothing to do | |
307 0.000270 return | |
endif | |
endif | |
" Figure out the arguments for searchpairpos(). | |
4 0.000004 if i % 2 == 0 | |
1 0.000001 let s_flags = 'nW' | |
1 0.000002 let c2 = plist[i + 1] | |
1 0.000001 else | |
3 0.000004 let s_flags = 'nbW' | |
3 0.000003 let c2 = c | |
3 0.000006 let c = plist[i - 1] | |
3 0.000002 endif | |
4 0.000005 if c == '[' | |
3 0.000003 let c = '\[' | |
3 0.000002 let c2 = '\]' | |
3 0.000000 endif | |
" Find the match. When it was just before the cursor move it there for a | |
" moment. | |
4 0.000004 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. | |
4 0.000013 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. | |
4 0.057542 execute 'if' s_skip '| let s_skip = 0 | endif' | |
" Limit the search to lines visible in the window. | |
4 0.000015 let stoplinebottom = line('w$') | |
4 0.000008 let stoplinetop = line('w0') | |
4 0.000005 if i % 2 == 0 | |
1 0.000002 let stopline = stoplinebottom | |
1 0.000000 else | |
3 0.000004 let stopline = stoplinetop | |
3 0.000002 endif | |
" Limit the search time to 300 msec to avoid a hang on very long lines. | |
" This fails when a timeout is not supported. | |
4 0.000010 if mode() == 'i' || mode() == 'R' | |
let timeout = exists("b:matchparen_insert_timeout") ? b:matchparen_insert_timeout : g:matchparen_insert_timeout | |
else | |
4 0.000014 let timeout = exists("b:matchparen_timeout") ? b:matchparen_timeout : g:matchparen_timeout | |
4 0.000002 endif | |
4 0.000004 try | |
4 0.000349 let [m_lnum, m_col] = searchpairpos(c, '', c2, s_flags, s_skip, stopline, timeout) | |
4 0.000006 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 | |
4 0.000005 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. | |
4 0.000009 if m_lnum > 0 && m_lnum >= stoplinetop && m_lnum <= stoplinebottom | |
4 0.000009 if exists('*matchaddpos') | |
4 0.000099 call matchaddpos('MatchParen', [[c_lnum, c_col - before], [m_lnum, m_col]], 10, 3) | |
4 0.000003 else | |
exe '3match MatchParen /\(\%' . c_lnum . 'l\%' . (c_col - before) . 'c\)\|\(\%' . m_lnum . 'l\%' . m_col . 'c\)/' | |
endif | |
4 0.000008 let w:paren_hl_on = 1 | |
4 0.000002 endif | |
FUNCTION airline#extensions#quickfix#apply() | |
Called 89 times | |
Total time: 0.000745 | |
Self time: 0.000745 | |
count total (s) self (s) | |
89 0.000228 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 <SNR>37_can_diffoff() | |
Called 65 times | |
Total time: 0.000519 | |
Self time: 0.000519 | |
count total (s) self (s) | |
65 0.000449 return getwinvar(bufwinnr(a:buf), '&diff') && !empty(getbufvar(a:buf, 'git_dir')) && !empty(getwinvar(bufwinnr(a:buf), 'fugitive_diff_restore')) | |
FUNCTION vimproc#util#has_iconv() | |
Called 123 times | |
Total time: 0.000528 | |
Self time: 0.000528 | |
count total (s) self (s) | |
" On Windows, some encodings can be converted by iconv() even if | |
" libiconv.dll is not available. | |
123 0.000407 return (has('iconv') || (s:is_windows && exists('*iconv'))) | |
FUNCTION unite#helper#get_marked_candidates() | |
Called 27 times | |
Total time: 0.003556 | |
Self time: 0.001758 | |
count total (s) self (s) | |
27 0.003533 0.001735 return unite#util#sort_by(filter(copy(unite#get_unite_candidates()), 'v:val.unite__is_marked'), 'v:val.unite__marked_time') | |
FUNCTION neocomplete#handler#_on_moved_i() | |
Called 134 times | |
Total time: 0.021403 | |
Self time: 0.002966 | |
count total (s) self (s) | |
134 0.002298 0.000794 let neocomplete = neocomplete#get_current_neocomplete() | |
134 0.000383 if neocomplete.linenr != line('.') | |
12 0.004206 0.000067 call neocomplete#helper#clear_result() | |
12 0.000010 endif | |
134 0.000344 let neocomplete.linenr = line('.') | |
134 0.013498 0.000704 call s:close_preview_window() | |
FUNCTION vimproc#util#is_windows() | |
Called 85 times | |
Total time: 0.000157 | |
Self time: 0.000157 | |
count total (s) self (s) | |
85 0.000092 return s:is_windows | |
FUNCTION <SNR>138_readfile() | |
Called 2 times | |
Total time: 0.000203 | |
Self time: 0.000118 | |
count total (s) self (s) | |
2 0.000093 0.000008 let cache_name = s:_encode_name(a:cache_dir, a:filename) | |
2 0.000106 return filereadable(cache_name) ? readfile(cache_name) : [] | |
FUNCTION neobundle#util#get_filetypes() | |
Called 24 times | |
Total time: 0.000269 | |
Self time: 0.000269 | |
count total (s) self (s) | |
24 0.000111 let filetype = exists('b:neocomplcache.context_filetype') ? b:neocomplcache.context_filetype : &filetype | |
24 0.000134 return split(filetype, '\.') | |
FUNCTION <SNR>45_invoke_funcrefs() | |
Called 181 times | |
Total time: 0.460531 | |
Self time: 0.005970 | |
count total (s) self (s) | |
181 0.005369 0.000797 let builder = airline#builder#new(a:context) | |
181 0.073674 0.001514 let err = airline#util#exec_funcrefs(a:funcrefs + s:core_funcrefs, builder, a:context) | |
181 0.000172 if err == 1 | |
181 0.378889 0.001060 let a:context.line = builder.build() | |
181 0.000968 let s:contexts[a:context.winnr] = a:context | |
181 0.001087 call setwinvar(a:context.winnr, '&statusline', '%!airline#statusline('.a:context.winnr.')') | |
181 0.000100 endif | |
FUNCTION <SNR>107_writefile() | |
Called 8 times | |
Total time: 0.213600 | |
Self time: 0.212972 | |
count total (s) self (s) | |
8 0.000735 0.000107 let cache_name = s:_encode_name(a:cache_dir, a:filename) | |
8 0.212840 call writefile(a:list, cache_name) | |
FUNCTION <SNR>109_set_syntax() | |
Called 154 times | |
Total time: 0.207483 | |
Self time: 0.012589 | |
count total (s) self (s) | |
154 0.001621 0.000541 let unite = unite#get_current_unite() | |
" Set syntax. | |
616 0.002075 for source in filter(copy(unite.sources), 'v:val.syntax != ""') | |
462 0.003638 silent! execute 'syntax clear' source.syntax | |
462 0.004461 execute 'syntax region' source.syntax 'start=// end=/$/ keepend contained' | |
462 0.000251 endfor | |
154 0.194458 0.000644 call unite#view#_change_highlight() | |
FUNCTION <SNR>119_vp_pipes_close() | |
Called 42 times | |
Total time: 0.007894 | |
Self time: 0.000922 | |
count total (s) self (s) | |
84 0.000168 for fd in self.fd | |
42 0.000093 try | |
42 0.007173 0.000201 call fd.close() | |
42 0.000093 catch /vimproc: vp_pipe_close: / | |
" Ignore error. | |
endtry | |
42 0.000033 endfor | |
FUNCTION unite#view#_set_cursor_line() | |
Called 470 times | |
Total time: 0.036652 | |
Self time: 0.018131 | |
count total (s) self (s) | |
470 0.001510 if !exists('b:current_syntax') || &filetype !=# 'unite' | |
return | |
endif | |
470 0.004190 0.001258 let unite = unite#get_current_unite() | |
470 0.000683 let context = unite.context | |
470 0.000458 if !context.cursor_line | |
return | |
endif | |
470 0.000764 let prompt_linenr = unite.prompt_linenr | |
470 0.009250 0.001342 call unite#view#_clear_match() | |
470 0.000795 if line('.') != prompt_linenr | |
16 0.000745 0.000126 call unite#view#_match_line(context.cursor_line_highlight, line('.'), unite.match_id) | |
16 0.000075 elseif (context.prompt_direction !=# 'below' && line('$') == prompt_linenr) || (context.prompt_direction ==# 'below' && prompt_linenr == 1) | |
call unite#view#_match_line('uniteError', prompt_linenr, unite.match_id) | |
else | |
454 0.009902 0.002840 call unite#view#_match_line(context.cursor_line_highlight, prompt_linenr+(context.prompt_direction ==# 'below' ? -1 : 1), unite.match_id) | |
454 0.000220 endif | |
470 0.001295 let unite.cursor_line_time = reltime() | |
FUNCTION unite#util#expand() | |
Called 461 times | |
Total time: 0.012590 | |
Self time: 0.007906 | |
count total (s) self (s) | |
461 0.012263 0.007579 return s:get_prelude().substitute_path_separator( (a:path =~ '^\~') ? fnamemodify(a:path, ':p') : (a:path =~ '^\$\h\w*') ? substitute(a:path, '^\$\h\w*', '\=eval(submatch(0))', '') : a:path) | |
FUNCTION SetFileTypeShell() | |
Called 3 times | |
Total time: 0.039008 | |
Self time: 0.000143 | |
count total (s) self (s) | |
3 0.000020 if expand("<amatch>") =~ g:ft_ignore_pat | |
return | |
endif | |
3 0.000004 let l = 2 | |
4 0.000032 while l < 20 && l < line("$") && getline(l) =~ '^\s*\(#\|$\)' | |
" Skip empty and comment lines. | |
1 0.000002 let l = l + 1 | |
1 0.000001 endwhile | |
3 0.000024 if l < line("$") && getline(l) =~ '\s*exec\s' && getline(l - 1) =~ '^\s*#.*\\$' | |
" Found an "exec" line after a comment with continuation | |
let n = substitute(getline(l),'\s*exec\s\+\([^ ]*/\)\=', '', '') | |
if n =~ '\<tclsh\|\<wish' | |
setf tcl | |
return | |
endif | |
endif | |
3 0.038885 0.000020 exe "setf " . a:name | |
FUNCTION <SNR>18_BMFilename() | |
Called 10 times | |
Total time: 0.003280 | |
Self time: 0.002110 | |
count total (s) self (s) | |
10 0.000043 if isdirectory(a:name) | |
return | |
endif | |
10 0.000872 0.000115 let munge = <SID>BMMunge(a:name, a:num) | |
10 0.000479 0.000066 let hash = <SID>BMHash(munge) | |
10 0.000018 if s:bmenu_short == 0 | |
10 0.000045 let name = 'an ' . g:bmenu_priority . '.' . hash . ' &Buffers.' . munge | |
10 0.000007 else | |
let name = 'an ' . g:bmenu_priority . '.' . hash . '.' . hash . ' &Buffers.' . <SID>BMHash2(munge) . munge | |
endif | |
" set 'cpo' to include the <CR> | |
10 0.000074 let cpo_save = &cpo | |
10 0.000091 set cpo&vim | |
10 0.001475 exe name . ' :confirm b' . a:num . '<CR>' | |
10 0.000091 let &cpo = cpo_save | |
FUNCTION unite#init#_default_scripts() | |
Called 4678 times | |
Total time: 0.423110 | |
Self time: 0.362574 | |
count total (s) self (s) | |
4678 0.012923 let names = empty(a:names) ? [''] : a:names | |
4678 0.008979 if a:kind ==# 'sources' && !empty(a:names) | |
25 0.000115 call add(names, 'alias') | |
25 0.000087 if !exists('*neobundle#autoload#unite_sources') | |
" Dummy call. | |
try | |
call neobundle#autoload#unite_sources([]) | |
catch /E117.*/ | |
endtry | |
endif | |
25 0.000065 if exists('*neobundle#autoload#unite_sources') | |
25 0.004250 0.000133 call neobundle#autoload#unite_sources(a:names) | |
25 0.000019 endif | |
25 0.000012 endif | |
4678 0.042488 0.016978 let loaded_defaults = unite#variables#loaded_defaults() | |
4678 0.017212 if get(loaded_defaults, a:kind, '') ==# &runtimepath | |
return | |
endif | |
4678 0.044695 0.013786 let static = unite#variables#static() | |
9409 0.010723 for name in names | |
4731 0.022288 if name != '' && has_key(static[a:kind], name) || (a:kind ==# 'sources' && name ==# 'alias' && has_key(loaded_defaults, 'alias')) | |
4731 0.005716 continue | |
endif | |
if name == '' | |
let loaded_defaults[a:kind] = &runtimepath | |
elseif a:kind ==# 'sources' && name ==# 'alias' | |
let loaded_defaults.alias = 1 | |
endif | |
" Search files by prefix or postfix. | |
if a:kind ==# 'filters' | |
let prefix_name = substitute(name,'^\%(matcher\|sorter\|converter\)_[^/_-]\+\zs[/_-].*$', '', '') | |
let postfix_name = '' | |
let postfix_name2 = '' | |
else | |
let prefix_name = matchstr(name, '^[^/_-]\+') | |
let postfix_name = matchstr(name, '[^/_-]\+$') | |
let postfix_name2 = matchstr(name, '^[^/_-]\+[/_-]\+\zs[^/_-]\+') | |
endif | |
let files = [] | |
for prefix in filter(unite#util#uniq([ prefix_name, postfix_name, postfix_name2]), "name == '' || v:val != ''") | |
let files += split(globpath(&runtimepath, 'autoload/unite/'.a:kind.'/'.prefix.'*.vim', 1), '\n') | |
endfor | |
if a:kind == 'sources' | |
call filter(files, "index(g:unite_ignore_source_files, fnamemodify(v:val, ':t')) < 0") | |
endif | |
for define in map(files, "unite#{a:kind}#{fnamemodify(v:val, ':t:r')}#define()") | |
for dict in filter(unite#util#convert2list(define), '!empty(v:val) && !has_key(static[a:kind], v:val.name)') | |
let static[a:kind][dict.name] = dict | |
endfor | |
unlet define | |
endfor | |
endfor | |
FUNCTION neobundle#autoload#filename() | |
Called 10 times | |
Total time: 0.001051 | |
Self time: 0.000242 | |
count total (s) self (s) | |
10 0.000930 0.000121 let bundles = filter(neobundle#config#get_autoload_bundles(), "has_key(v:val.autoload, 'filename_patterns')") | |
10 0.000029 if !empty(bundles) | |
call neobundle#config#source_bundles(filter(copy(bundles)," len(filter(copy(v:val.autoload.filename_patterns), 'a:filename =~? v:val')) > 0")) | |
endif | |
FUNCTION fugitive#head() | |
Called 11 times | |
Total time: 0.003238 | |
Self time: 0.000268 | |
count total (s) self (s) | |
11 0.000044 if !exists('b:git_dir') | |
return '' | |
endif | |
11 0.003160 0.000190 return s:repo().head(a:0 ? a:1 : 0) | |
FUNCTION <SNR>119_vp_pgroup_kill() | |
Called 14 times | |
Total time: 0.009478 | |
Self time: 0.000304 | |
count total (s) self (s) | |
14 0.000051 let sig = get(a:000, 0, g:vimproc#SIGTERM) | |
14 0.000013 if sig != 0 | |
14 0.002263 0.000056 call s:close_all(self) | |
14 0.000020 let self.is_valid = 0 | |
14 0.000005 endif | |
14 0.000018 if self.pid == 0 | |
" Ignore. | |
return | |
endif | |
14 0.007047 0.000080 return self.current_proc.kill(sig) | |
FUNCTION <SNR>119_split() | |
Called 104 times | |
Total time: 0.008696 | |
Self time: 0.008696 | |
count total (s) self (s) | |
104 0.000312 let result = [] | |
104 0.000143 lua << EOF | |
do | |
local result = vim.eval('result') | |
local str = vim.eval('a:str') | |
local sep = vim.eval('a:sep') | |
local last | |
if string.find(str, sep, 1, true) == nil then | |
result:add(str) | |
else | |
for part, pos in string.gmatch(str, | |
'(.-)' .. sep .. '()') do | |
result:add(part) | |
last = pos | |
end | |
result:add(string.sub(str, last)) | |
end | |
end | |
EOF | |
104 0.000174 return result | |
FUNCTION neomru#_get_mrus() | |
Called 14 times | |
Total time: 0.000062 | |
Self time: 0.000062 | |
count total (s) self (s) | |
14 0.000032 return s:MRUs | |
FUNCTION <SNR>177_extend_actions() | |
Called 234 times | |
Total time: 0.016695 | |
Self time: 0.008063 | |
count total (s) self (s) | |
234 0.010084 0.001452 let filterd_table = s:filter_self_func(a:action_table2, a:self_func) | |
234 0.000294 if a:0 > 0 | |
973 0.001210 for action in values(filterd_table) | |
807 0.001902 let action.from = a:1 | |
807 0.000474 endfor | |
166 0.000101 endif | |
234 0.001405 return extend(a:action_table1, filterd_table, 'keep') | |
FUNCTION unite#helper#get_buffer_directory() | |
Called 396 times | |
Total time: 0.017033 | |
Self time: 0.007225 | |
count total (s) self (s) | |
396 0.001148 let filetype = getbufvar(a:bufnr, '&filetype') | |
396 0.000356 if filetype ==# 'vimfiler' | |
let dir = getbufvar(a:bufnr, 'vimfiler').current_dir | |
elseif filetype ==# 'vimshell' | |
let dir = getbufvar(a:bufnr, 'vimshell').current_dir | |
elseif filetype ==# 'vinarise' | |
let dir = getbufvar(a:bufnr, 'vinarise').current_dir | |
else | |
396 0.001829 0.001319 let path = unite#util#substitute_path_separator(bufname(a:bufnr)) | |
396 0.010519 0.001221 let dir = unite#util#path2directory(path) | |
396 0.000187 endif | |
396 0.000281 return dir | |
FUNCTION neobundle#config#get_autoload_bundles() | |
Called 73 times | |
Total time: 0.004264 | |
Self time: 0.004264 | |
count total (s) self (s) | |
73 0.004205 return filter(values(s:neobundles), "!v:val.sourced && v:val.lazy") | |
FUNCTION unite#view#_remove_previewed_buffer_list() | |
Called 9 times | |
Total time: 0.000248 | |
Self time: 0.000110 | |
count total (s) self (s) | |
9 0.000170 0.000032 let unite = unite#get_current_unite() | |
9 0.000064 call filter(unite.previewed_buffer_list, 'v:val != a:bufnr') | |
FUNCTION unite#start#standard() | |
Called 14 times | |
Total time: 4.909074 | |
Self time: 0.002329 | |
count total (s) self (s) | |
" Check command line window. | |
14 0.000214 0.000079 if unite#util#is_cmdwin() | |
call unite#print_error( '[unite.vim] Command line buffer is detected! '. 'Please close command line buffer.') | |
return | |
endif | |
14 0.000075 let context = get(a:000, 0, {}) | |
14 0.009170 0.000219 let context = unite#init#_context(context, unite#helper#get_source_names(a:sources)) | |
14 0.000035 if empty(a:sources) | |
echohl Comment | |
call unite#view#_redraw_echo( '[unite.vim] interactive mode: Please input source name') | |
echohl None | |
endif | |
14 0.000016 if context.resume | |
" Check resume buffer. | |
let resume_bufnr = s:get_resume_buffer(context.buffer_name) | |
if resume_bufnr > 0 && getbufvar(resume_bufnr, 'unite').source_names ==# unite#helper#get_source_names(a:sources) | |
return unite#start#resume(context.buffer_name, context) | |
endif | |
endif | |
14 0.000188 0.000100 call unite#variables#enable_current_unite() | |
14 0.000021 if context.toggle "{{{ | |
if unite#view#_close(context.buffer_name) | |
return | |
endif | |
endif"}}} | |
14 0.000030 try | |
14 0.069281 0.000118 call unite#init#_current_unite(a:sources, context) | |
14 0.000017 catch /^unite.vim: Invalid / | |
call unite#print_error('[unite.vim] ' . v:exception) | |
return | |
endtry | |
" Caching. | |
14 0.000193 0.000087 let current_unite = unite#variables#current_unite() | |
14 0.000036 let current_unite.last_input = context.input | |
14 0.000026 let current_unite.input = context.input | |
14 0.000028 let current_unite.last_path = context.path | |
14 4.424840 0.000159 call unite#candidates#_recache(context.input, context.is_redraw) | |
14 0.000046 if !current_unite.is_async && (context.force_immediately || context.immediately || !context.empty) "{{{ | |
let candidates = unite#candidates#gather() | |
if empty(candidates) | |
" Ignore. | |
call unite#variables#disable_current_unite() | |
return | |
elseif (context.immediately && len(candidates) == 1) || context.force_immediately | |
" Immediately action. | |
call unite#action#do( context.default_action, [candidates[0]]) | |
call unite#variables#disable_current_unite() | |
return | |
endif | |
endif"}}} | |
14 0.250485 0.000082 call unite#init#_unite_buffer() | |
14 0.000106 0.000049 call unite#variables#disable_current_unite() | |
14 0.000027 setlocal modifiable | |
14 0.143757 0.000054 call unite#view#_redraw_candidates() | |
14 0.000921 0.000078 call unite#handlers#_on_bufwin_enter(bufnr('%')) | |
14 0.008670 0.000055 call unite#view#_init_cursor() | |
FUNCTION airline#extensions#tabline#get_buffer_name() | |
Called 2108 times | |
Total time: 0.498768 | |
Self time: 0.021323 | |
count total (s) self (s) | |
2108 0.497884 0.020439 return airline#extensions#tabline#{s:formatter}#format(a:nr, get(s:, 'current_buffer_list', s:get_buffer_list())) | |
FUNCTION <SNR>105_is_file_exist() | |
Called 11054 times | |
Total time: 0.285143 | |
Self time: 0.285143 | |
count total (s) self (s) | |
11054 0.281454 return (g:neomru#file_mru_ignore_pattern == '' || a:path !~ '^\a\w\+:\|\%(' . g:neomru#file_mru_ignore_pattern . '\)') && getftype(a:path) ==# 'file' | |
FUNCTION unite#view#_get_status_plane_string() | |
Called 226 times | |
Total time: 0.034614 | |
Self time: 0.018993 | |
count total (s) self (s) | |
226 0.034310 0.018689 return (b:unite.is_async ? '[async] ' : '') . join(map(copy(unite#loaded_sources_list()), " (v:val.unite__len_candidates == 0) ? '_' : join(insert(filter(copy(v:val.args), 'type(v:val) <= 1'), unite#helper#convert_source_name(v:val.name)), ':') . (v:val.unite__len_candidates == 0 ? '' : v:val.unite__orig_len_candidates == v:val.unite__len_candidates ? '(' . v:val.unite__len_candidates . ')' : printf('(%s/%s)', v:val.unite__len_candidates, v:val.unite__orig_len_candidates)) ")) | |
FUNCTION <SNR>111_get_source_candidates() | |
Called 420 times | |
Total time: 20.466990 | |
Self time: 0.233035 | |
count total (s) self (s) | |
420 0.000787 let context = a:source.unite__context | |
420 0.006827 0.002486 let custom_source = get(unite#custom#get().sources, a:source.name, {}) | |
420 0.004640 let context_ignore = { 'path' : context.path, 'ignore_pattern' : get(custom_source, 'ignore_pattern', a:source.ignore_pattern), 'ignore_globs' : get(custom_source, 'ignore_globs', a:source.ignore_globs), 'white_globs' : get(custom_source, 'white_globs', a:source.white_globs), } | |
420 0.000722 let funcname = 's:get_source_candidates()' | |
420 0.000476 try | |
420 0.000418 if context.unite__is_vimfiler | |
if context.vimfiler__is_dummy | |
let funcname = 'vimfiler_dummy_candidates' | |
return has_key(a:source, 'vimfiler_dummy_candidates') ? copy(a:source.vimfiler_dummy_candidates( a:source.args, a:source.unite__context)) : [] | |
else | |
let funcname = 'vimfiler_gather_candidates' | |
return has_key(a:source, 'vimfiler_gather_candidates') ? copy(a:source.vimfiler_gather_candidates( a:source.args, a:source.unite__context)) : [] | |
endif | |
endif | |
420 0.000679 if context.is_redraw || a:source.unite__is_invalidate | |
" Recaching. | |
42 0.000091 let a:source.unite__cached_candidates = [] | |
42 0.000070 let funcname = 'gather_candidates' | |
42 0.000088 if has_key(a:source, 'gather_candidates') | |
42 0.658691 0.002823 let a:source.unite__cached_candidates += s:ignore_candidates(copy( a:source.gather_candidates(a:source.args, a:source.unite__context)), context_ignore) | |
42 0.000070 endif | |
42 0.000026 endif | |
420 0.001535 if has_key(a:source, 'change_candidates') && (context.is_redraw || context.is_changed || a:source.unite__is_invalidate) | |
" Recaching. | |
let funcname = 'change_candidates' | |
let a:source.unite__cached_change_candidates = s:ignore_candidates(a:source.change_candidates( a:source.args, a:source.unite__context), context_ignore) | |
endif | |
420 0.000519 if a:source.unite__context.is_async | |
" Get asynchronous candidates. | |
77 0.000137 let funcname = 'async_gather_candidates' | |
77 0.000079 while 1 | |
77 19.591897 0.018151 let a:source.unite__cached_candidates += s:ignore_candidates( a:source.async_gather_candidates(a:source.args, context), context_ignore) | |
77 0.000311 if (!context.sync && context.unite__is_interactive) || !a:source.unite__context.is_async | |
77 0.000094 break | |
endif | |
endwhile | |
77 0.000057 endif | |
420 0.000373 catch | |
call unite#print_error(v:throwpoint) | |
call unite#print_error(v:exception) | |
call unite#print_error( '[unite.vim] Error occurred in ' . funcname . '!') | |
call unite#print_error( '[unite.vim] Source name is ' . a:source.name) | |
return [] | |
endtry | |
420 0.177054 return a:source.unite__cached_candidates + a:source.unite__cached_change_candidates | |
FUNCTION <SNR>3_unite_settings() | |
Called 14 times | |
Total time: 0.001209 | |
Self time: 0.001209 | |
count total (s) self (s) | |
14 0.000293 imap <buffer> <esc> <c-u><bs> | |
14 0.000192 nnoremap <buffer><cr> <cr> | |
" move between lines | |
14 0.000197 imap <buffer> <C-j> <Plug>(unite_select_next_line) | |
14 0.000182 imap <buffer> <C-k> <Plug>(unite_select_previous_line) | |
" open in new splits | |
14 0.000155 imap <silent><buffer><expr> <C-x> unite#do_action('split') | |
14 0.000149 imap <silent><buffer><expr> <C-v> unite#do_action('vsplit') | |
FUNCTION neocomplete#sources#buffer#make_cache_current_line() | |
Called 19 times | |
Total time: 0.071202 | |
Self time: 0.000340 | |
count total (s) self (s) | |
" let start = reltime() | |
19 0.071149 0.000287 call s:make_cache_current_buffer( max([1, line('.')-10]), min([line('$'), line('.') + 10])) | |
" echomsg reltimestr(reltime(start)) | |
FUNCTION airline#statusline() | |
Called 543 times | |
Total time: 0.013089 | |
Self time: 0.013089 | |
count total (s) self (s) | |
543 0.006367 if has_key(s:contexts, a:winnr) | |
543 0.004891 return '%{airline#check_mode('.a:winnr.')}'.s:contexts[a:winnr].line | |
endif | |
" in rare circumstances this happens...see #276 | |
return '' | |
FUNCTION <SNR>126_smart_imap() | |
Called 13 times | |
Total time: 0.000865 | |
Self time: 0.000272 | |
count total (s) self (s) | |
13 0.000464 0.000088 call s:clear_complete() | |
13 0.000380 0.000163 return line('.') != unite#get_current_unite().prompt_linenr || col('.') <= (strwidth(unite#get_current_unite().prompt)) ? a:lhs : a:rhs | |
FUNCTION <SNR>98_uniq_by() | |
Called 10 times | |
Total time: 0.991031 | |
Self time: 0.991031 | |
count total (s) self (s) | |
10 0.101515 let list = map(copy(a:list), printf('[v:val, %s]', a:f)) | |
10 0.000032 let i = 0 | |
10 0.000014 let seen = {} | |
71495 0.069410 while i < len(list) | |
71485 0.305327 let key = string(list[i][1]) | |
71485 0.099987 if has_key(seen, key) | |
9 0.000070 call remove(list, i) | |
9 0.000005 else | |
71476 0.125481 let seen[key] = 1 | |
71476 0.048623 let i += 1 | |
71476 0.025445 endif | |
71485 0.026277 endwhile | |
10 0.081904 return map(list, 'v:val[0]') | |
FUNCTION neosnippet#get_sync_placeholder_marker_pattern() | |
Called 34 times | |
Total time: 0.000077 | |
Self time: 0.000077 | |
count total (s) self (s) | |
34 0.000043 return '<{\d\+\%(:.\{-}\)\?\\\@<!}>' | |
FUNCTION <SNR>177_filter_self_func() | |
Called 234 times | |
Total time: 0.008632 | |
Self time: 0.008632 | |
count total (s) self (s) | |
234 0.008525 return filter(copy(a:action_table), printf("string(v:val.func) !=# \"function('%s')\"", a:self_func)) | |
FUNCTION <SNR>119_read_pgroup() | |
Called 1446 times | |
Total time: 7.970824 | |
Self time: 0.097499 | |
count total (s) self (s) | |
1446 0.004408 let number = get(a:000, 0, -1) | |
1446 0.004178 let timeout = get(a:000, 1, s:read_timeout) | |
1446 0.002328 let output = '' | |
1446 0.002471 if !self.fd.eof | |
1446 7.879668 0.008171 let output = self.fd.read(number, timeout) | |
1446 0.001014 endif | |
1446 0.004195 if self.proc.current_proc.stdout.eof && self.proc.current_proc.stderr.eof | |
" Get status. | |
3 0.001874 0.000046 let [cond, status] = self.proc.current_proc.waitpid() | |
3 0.000013 if empty(self.proc.statements) || (self.proc.condition ==# 'true' && status) || (self.proc.condition ==# 'false' && !status) | |
3 0.000005 let self.proc.statements = [] | |
" Caching status. | |
3 0.000004 let self.proc.cond = cond | |
3 0.000003 let self.proc.status = status | |
3 0.000003 else | |
" Initialize next statement. | |
let proc = vimproc#plineopen3(self.proc.statements[0].statement) | |
let self.proc.current_proc = proc | |
let self.pid = proc.pid | |
let self.pid_list = proc.pid_list | |
let self.proc.pid = proc.pid | |
let self.proc.pid_list = proc.pid_list | |
let self.proc.condition = self.proc.statements[0].condition | |
let self.proc.statements = self.proc.statements[1:] | |
let self.proc.stdin = s:fdopen_pgroup(self.proc, proc.stdin, 'vp_pgroup_close', 'read_pgroup', 'write_pgroup') | |
let self.proc.stdout = s:fdopen_pgroup(self.proc, proc.stdout, 'vp_pgroup_close', 'read_pgroup', 'write_pgroup') | |
let self.proc.stderr = s:fdopen_pgroup(self.proc, proc.stderr, 'vp_pgroup_close', 'read_pgroup', 'write_pgroup') | |
endif | |
3 0.000001 endif | |
1446 0.002159 if self.proc.current_proc.stdout.eof | |
10 0.000011 let self.proc.stdout.eof = 1 | |
10 0.000011 let self.proc.stdout.__eof = 1 | |
10 0.000003 endif | |
1446 0.001707 if self.proc.current_proc.stderr.eof | |
6 0.000008 let self.proc.stderr.eof = 1 | |
6 0.000006 let self.proc.stderr.__eof = 1 | |
6 0.000002 endif | |
1446 0.003699 return output | |
FUNCTION <SNR>125_cursor_down() | |
Called 160 times | |
Total time: 0.010514 | |
Self time: 0.010514 | |
count total (s) self (s) | |
160 0.002908 nnoremap <expr><buffer> <Plug>(unite_loop_cursor_down) unite#mappings#cursor_down(0) | |
160 0.002531 nnoremap <expr><buffer> <Plug>(unite_skip_cursor_down) unite#mappings#cursor_down(1) | |
160 0.002503 inoremap <expr><buffer> <Plug>(unite_select_next_line) unite#mappings#cursor_down(0) | |
160 0.002324 inoremap <expr><buffer> <Plug>(unite_skip_next_line) unite#mappings#cursor_down(1) | |
FUNCTION fugitive#reload_status() | |
Called 4 times | |
Total time: 0.001185 | |
Self time: 0.001185 | |
count total (s) self (s) | |
4 0.000057 if exists('s:reloading_status') | |
return | |
endif | |
4 0.000009 try | |
4 0.000031 let s:reloading_status = 1 | |
4 0.000022 let mytab = tabpagenr() | |
12 0.000066 for tab in [mytab] + range(1,tabpagenr('$')) | |
24 0.000075 for winnr in range(1,tabpagewinnr(tab,'$')) | |
16 0.000183 if getbufvar(tabpagebuflist(tab)[winnr-1],'fugitive_type') ==# 'index' | |
execute 'tabnext '.tab | |
if winnr != winnr() | |
execute winnr.'wincmd w' | |
let restorewinnr = 1 | |
endif | |
try | |
if !&modified | |
call s:BufReadIndex() | |
endif | |
finally | |
if exists('restorewinnr') | |
wincmd p | |
endif | |
execute 'tabnext '.mytab | |
endtry | |
endif | |
16 0.000014 endfor | |
8 0.000010 endfor | |
4 0.000004 finally | |
4 0.000010 unlet! s:reloading_status | |
4 0.000006 endtry | |
FUNCTION <SNR>126_nowait_expr() | |
Called 126 times | |
Total time: 0.000526 | |
Self time: 0.000526 | |
count total (s) self (s) | |
126 0.000477 return a:map . ' <buffer><silent><expr>' . ((v:version > 703 || (v:version == 703 && has('patch1261'))) ? '<nowait>' : '') | |
FUNCTION neobundle#autoload#insert() | |
Called 14 times | |
Total time: 0.000766 | |
Self time: 0.000166 | |
count total (s) self (s) | |
14 0.000675 0.000075 let bundles = filter(neobundle#config#get_autoload_bundles(), "get(v:val.autoload, 'insert', 0)") | |
14 0.000022 if !empty(bundles) | |
call neobundle#config#source_bundles(bundles) | |
doautocmd InsertEnter | |
endif | |
FUNCTION neobundle#util#expand() | |
Called 86 times | |
Total time: 0.001275 | |
Self time: 0.001275 | |
count total (s) self (s) | |
86 0.000880 let path = (a:path =~ '^\~') ? fnamemodify(a:path, ':p') : (a:path =~ '^\$\h\w*') ? substitute(a:path, '^\$\h\w*', '\=eval(submatch(0))', '') : a:path | |
86 0.000295 return (s:is_windows && path =~ '\\') ? neobundle#util#substitute_path_separator(path) : path | |
FUNCTION neosnippet#get_mirror_placeholder_marker_pattern() | |
Called 34 times | |
Total time: 0.000075 | |
Self time: 0.000075 | |
count total (s) self (s) | |
34 0.000043 return '<|\d\+|>' | |
FUNCTION unite#variables#current_unite() | |
Called 690 times | |
Total time: 0.004202 | |
Self time: 0.004202 | |
count total (s) self (s) | |
690 0.001831 if !exists('s:current_unite') | |
let s:current_unite = {} | |
endif | |
690 0.000683 return s:current_unite | |
FUNCTION <SNR>105_uniq() | |
Called 35 times | |
Total time: 0.235504 | |
Self time: 0.001938 | |
count total (s) self (s) | |
35 0.235463 0.001897 return s:uniq_by(a:list, 'tolower(v:val)') | |
FUNCTION unite#variables#all_sources() | |
Called 11 times | |
Total time: 0.024207 | |
Self time: 0.000258 | |
count total (s) self (s) | |
11 0.000016 if a:0 == 0 | |
return unite#init#_sources() | |
endif | |
11 0.000128 0.000033 let unite = unite#get_current_unite() | |
11 0.023933 0.000079 let all_sources = unite#init#_sources([], a:1) | |
11 0.000034 let source = get(all_sources, a:1, {}) | |
11 0.000043 return empty(source) ? get(filter(copy(get(unite, 'sources', [])), 'v:val.name ==# a:1'), 0, {}) : source | |
FUNCTION airline#extensions#apply() | |
Called 139 times | |
Total time: 0.011637 | |
Self time: 0.005462 | |
count total (s) self (s) | |
139 0.000359 let s:active_winnr = winnr() | |
139 0.006673 0.000498 if s:is_excluded_window() | |
return -1 | |
endif | |
139 0.000222 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 | |
139 0.000123 if &previewwindow | |
let w:airline_section_a = 'Preview' | |
let w:airline_section_b = '' | |
let w:airline_section_c = bufname(winbufnr(winnr())) | |
endif | |
139 0.000773 if has_key(s:filetype_overrides, &ft) | |
let args = s:filetype_overrides[&ft] | |
call airline#extensions#apply_left_override(args[0], args[1]) | |
endif | |
139 0.000402 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 neocomplete#handler#_on_insert_enter() | |
Called 14 times | |
Total time: 0.000931 | |
Self time: 0.000283 | |
count total (s) self (s) | |
14 0.000159 0.000053 if !neocomplete#is_enabled() | |
return | |
endif | |
14 0.000158 0.000057 let neocomplete = neocomplete#get_current_neocomplete() | |
14 0.000025 if neocomplete.linenr != line('.') | |
2 0.000448 0.000007 call neocomplete#helper#clear_result() | |
2 0.000000 endif | |
14 0.000029 let neocomplete.linenr = line('.') | |
14 0.000027 if &l:foldmethod ==# 'expr' && foldlevel('.') != 0 | |
foldopen | |
endif | |
FUNCTION unite#helper#get_source_args() | |
Called 28 times | |
Total time: 0.000599 | |
Self time: 0.000599 | |
count total (s) self (s) | |
28 0.000578 return map(copy(a:sources), 'type(v:val) == type([]) ? [v:val[0], v:val[1:]] : [v:val, []]') | |
FUNCTION unite#handlers#_on_cursor_moved() | |
Called 160 times | |
Total time: 0.072403 | |
Self time: 0.032270 | |
count total (s) self (s) | |
160 0.000288 if &filetype !=# 'unite' | |
return | |
endif | |
160 0.001590 0.000475 let unite = unite#get_current_unite() | |
160 0.000266 let prompt_linenr = unite.prompt_linenr | |
160 0.000230 let context = unite.context | |
160 0.000802 let &l:modifiable = line('.') == prompt_linenr && col('.') >= len(context.prompt) | |
160 0.000231 if line('.') == 1 | |
148 0.010466 nnoremap <silent><buffer> <Plug>(unite_loop_cursor_up) :call unite#mappings#loop_cursor_up('n')<CR> | |
148 0.002760 nnoremap <silent><buffer> <Plug>(unite_skip_cursor_up) :call unite#mappings#loop_cursor_up('n')<CR> | |
148 0.002850 inoremap <silent><buffer> <Plug>(unite_select_previous_line) <ESC>:call unite#mappings#loop_cursor_up('i')<CR> | |
148 0.002359 inoremap <silent><buffer> <Plug>(unite_skip_previous_line) <ESC>:call unite#mappings#loop_cursor_up('i')<CR> | |
148 0.009835 0.000567 call s:cursor_down() | |
148 0.000229 elseif line('.') == line('$') | |
nnoremap <silent><buffer> <Plug>(unite_loop_cursor_down) :call unite#mappings#loop_cursor_down('n')<CR> | |
nnoremap <silent><buffer> <Plug>(unite_skip_cursor_down) :call unite#mappings#loop_cursor_down('n')<CR> | |
inoremap <silent><buffer> <Plug>(unite_select_next_line) <ESC>:call unite#mappings#loop_cursor_down('i')<CR> | |
inoremap <silent><buffer> <Plug>(unite_skip_next_line) <ESC>:call unite#mappings#loop_cursor_down('i')<CR> | |
call s:cursor_up() | |
else | |
12 0.002097 0.000054 call s:cursor_up() | |
12 0.001316 0.000070 call s:cursor_down() | |
12 0.000013 endif | |
160 0.000389 if exists('b:current_syntax') | |
160 0.003002 0.000460 call unite#view#_clear_match() | |
160 0.000794 let is_prompt = (prompt_linenr == 0 && (context.prompt_direction == 'below' && line('.') == line('$') || line('.') == 1)) || line('.') == prompt_linenr | |
160 0.000845 if is_prompt || mode('.') == 'i' || unite.is_async || abs(line('.') - unite.prev_line) != 1 || split(reltimestr(reltime(unite.cursor_line_time)))[0] > context.cursor_line_time | |
160 0.013334 0.000496 call unite#view#_set_cursor_line() | |
160 0.000080 endif | |
160 0.000295 let unite.cursor_line_time = reltime() | |
160 0.000270 let unite.prev_line = line('.') | |
160 0.000075 endif | |
160 0.000163 if context.auto_preview | |
call unite#view#_do_auto_preview() | |
endif | |
160 0.000129 if context.auto_highlight | |
call unite#view#_do_auto_highlight() | |
endif | |
160 0.001192 0.000538 call s:restore_statusline() | |
" Check lines. "{{{ | |
160 0.000641 if !context.auto_resize && winheight(0) < line('$') && line('.') + winheight(0) < line('$') | |
89 0.000030 return | |
endif | |
71 0.000259 let height = (!unite.context.split || unite.context.winheight == 0) ? winheight(0) : unite.context.winheight | |
71 0.010747 0.000320 let candidates = unite#candidates#_gather_pos(height) | |
71 0.000136 if !context.auto_resize && empty(candidates) | |
" Nothing. | |
71 0.000035 return | |
endif | |
call unite#view#_resize_window() | |
let modifiable_save = &l:modifiable | |
try | |
setlocal modifiable | |
let pos = getpos('.') | |
let lines = unite#view#_convert_lines(candidates) | |
silent! call append('$', lines) | |
finally | |
let &l:modifiable = l:modifiable_save | |
endtry | |
let context = unite.context | |
let unite.current_candidates += candidates | |
if pos != getpos('.') | |
call setpos('.', pos) | |
endif"}}} | |
FUNCTION unite#util#has_vimproc() | |
Called 14 times | |
Total time: 0.000331 | |
Self time: 0.000100 | |
count total (s) self (s) | |
14 0.000325 0.000094 return call(s:get_process().has_vimproc, a:000) | |
FUNCTION 88() | |
Called 280 times | |
Total time: 0.000640 | |
Self time: 0.000640 | |
count total (s) self (s) | |
" Nothing. | |
280 0.000341 return a:candidates | |
FUNCTION airline#highlighter#get_highlight() | |
Called 5772 times | |
Total time: 0.456672 | |
Self time: 0.138010 | |
count total (s) self (s) | |
5772 0.160271 0.023328 let fg = s:get_syn(a:group, 'fg') | |
5772 0.144817 0.020676 let bg = s:get_syn(a:group, 'bg') | |
5772 0.060075 let reverse = has('gui_running') ? synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'gui') : synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'cterm')|| synIDattr(synIDtrans(hlID(a:group)), 'reverse', 'term') | |
5772 0.087069 0.029491 return reverse ? s:get_array(bg, fg, a:000) : s:get_array(fg, bg, a:000) | |
FUNCTION <SNR>109_msg2list() | |
Called 42 times | |
Total time: 0.000226 | |
Self time: 0.000226 | |
count total (s) self (s) | |
42 0.000202 return type(a:expr) ==# type([]) ? a:expr : split(a:expr, '\n') | |
FUNCTION neobundle#autoload#filetype() | |
Called 24 times | |
Total time: 0.002862 | |
Self time: 0.000926 | |
count total (s) self (s) | |
24 0.001543 0.000176 let bundles = filter(neobundle#config#get_autoload_bundles(), "has_key(v:val.autoload, 'filetypes')") | |
72 0.000511 0.000242 for filetype in add(neobundle#util#get_filetypes(), 'all') | |
48 0.000659 0.000359 call neobundle#config#source_bundles(filter(copy(bundles)," index(v:val.autoload.filetypes, filetype) >= 0")) | |
48 0.000030 endfor | |
FUNCTION <SNR>99_is_listed() | |
Called 168 times | |
Total time: 0.001873 | |
Self time: 0.001873 | |
count total (s) self (s) | |
168 0.001782 return bufexists(a:bufnr) && (a:is_question ? !buflisted(a:bufnr) : (a:is_bang || buflisted(a:bufnr))) && (!a:is_plus || getbufvar(a:bufnr, '&mod')) && (!a:is_minus || getbufvar(a:bufnr, '&buftype') !~# 'nofile') && (getbufvar(a:bufnr, '&filetype') !=# 'unite' || getbufvar(a:bufnr, 'unite').buffer_name !=# unite#get_current_unite().buffer_name) | |
FUNCTION <SNR>119_close_all() | |
Called 41 times | |
Total time: 0.006378 | |
Self time: 0.000765 | |
count total (s) self (s) | |
41 0.000117 if has_key(a:self, 'stdin') | |
41 0.000452 0.000141 call a:self.stdin.close() | |
41 0.000017 endif | |
41 0.000066 if has_key(a:self, 'stdout') | |
41 0.003102 0.000113 call a:self.stdout.close() | |
41 0.000019 endif | |
41 0.000068 if has_key(a:self, 'stderr') | |
41 0.002451 0.000138 call a:self.stderr.close() | |
41 0.000021 endif | |
FUNCTION unite#variables#default_context() | |
Called 14 times | |
Total time: 0.000169 | |
Self time: 0.000169 | |
count total (s) self (s) | |
14 0.000065 if !exists('s:default_context') | |
call s:initialize_default() | |
endif | |
14 0.000022 return s:default_context | |
FUNCTION <SNR>53_append() | |
Called 65 times | |
Total time: 0.000564 | |
Self time: 0.000564 | |
count total (s) self (s) | |
65 0.000131 if &filetype == 'unite' | |
" Ignore unite window. | |
28 0.000018 return | |
endif | |
" Save unite window information. | |
37 0.000252 let w:unite_window = { 'time' : localtime(), 'cwd' : getcwd(),} | |
FUNCTION <SNR>119_vp_waitpid() | |
Called 3 times | |
Total time: 0.001828 | |
Self time: 0.000125 | |
count total (s) self (s) | |
3 0.001225 0.000019 call s:close_all(self) | |
3 0.000004 let self.is_valid = 0 | |
3 0.000008 if has_key(self, 'cond') && has_key(self, 'status') | |
" Use cache. | |
let [cond, status] = [self.cond, self.status] | |
else | |
3 0.000526 0.000029 let [cond, status] = s:waitpid(self.pid) | |
3 0.000002 endif | |
3 0.000003 if cond ==# 'exit' | |
3 0.000003 let self.pid = 0 | |
3 0.000001 endif | |
3 0.000006 if has_key(self, 'pid_list') | |
3 0.000007 for pid in self.pid_list[: -2] | |
call s:waitpid(pid) | |
endfor | |
3 0.000002 endif | |
3 0.000007 return [cond, str2nr(status)] | |
FUNCTION unite#helper#get_unite_bufnr() | |
Called 14 times | |
Total time: 0.000613 | |
Self time: 0.000613 | |
count total (s) self (s) | |
14 0.000388 for bufnr in filter(range(1, bufnr('$')), "getbufvar(v:val, '&filetype') ==# 'unite'") | |
14 0.000063 let buffer_context = get(getbufvar(bufnr, 'unite'), 'context', {}) | |
14 0.000043 if !empty(buffer_context) && buffer_context.buffer_name ==# a:buffer_name | |
14 0.000037 if buffer_context.temporary && !empty(filter(copy(buffer_context.unite__old_buffer_info), 'v:val.buffer_name ==# buffer_context.buffer_name')) | |
" Disable resume. | |
let buffer_context.unite__old_buffer_info = [] | |
endif | |
14 0.000010 return bufnr | |
endif | |
endfor | |
return -1 | |
FUNCTION airline#highlighter#highlight_modified_inactive() | |
Called 54 times | |
Total time: 0.005827 | |
Self time: 0.001987 | |
count total (s) self (s) | |
54 0.000310 if getbufvar(a:bufnr, '&modified') | |
1 0.000008 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 : [] | |
1 0.000001 else | |
53 0.000620 let colors = exists('g:airline#themes#{g:airline_theme}#palette.inactive.airline_c') ? g:airline#themes#{g:airline_theme}#palette.inactive.airline_c : [] | |
53 0.000035 endif | |
54 0.000100 if !empty(colors) | |
53 0.004281 0.000441 call airline#highlighter#exec('airline_c'.(a:bufnr).'_inactive', colors) | |
53 0.000045 endif | |
FUNCTION <SNR>37_buffer_getline() | |
Called 30 times | |
Total time: 0.000134 | |
Self time: 0.000134 | |
count total (s) self (s) | |
30 0.000118 return get(getbufline(self['#'], a:lnum), 0, '') | |
FUNCTION vimproc#get_command_name() | |
Called 14 times | |
Total time: 0.000891 | |
Self time: 0.000452 | |
count total (s) self (s) | |
14 0.000038 let path = get(a:000, 0, $PATH) | |
14 0.000021 let cnt = a:0 < 2 ? 1 : a:2 | |
14 0.000665 0.000226 let files = split(substitute(vimproc#util#substitute_path_separator( vimproc#filepath#which(a:command, path, cnt)), '//', '/', 'g'), '\n') | |
14 0.000012 if cnt < 0 | |
return files | |
endif | |
14 0.000035 let file = get(files, cnt-1, '') | |
14 0.000013 if file == '' | |
throw printf( 'vimproc#get_command_name: File "%s" is not found.', a:command) | |
endif | |
14 0.000009 return file | |
FUNCTION unite#view#_redraw() | |
Called 135 times | |
Total time: 23.117888 | |
Self time: 0.015187 | |
count total (s) self (s) | |
135 0.001063 0.000461 if unite#util#is_cmdwin() | |
return | |
endif | |
135 0.001600 0.000560 let unite_save = unite#variables#current_unite() | |
135 0.000297 let winnr_save = winnr() | |
135 0.000168 if a:winnr > 0 | |
" Set current unite. | |
let unite = getbufvar(winbufnr(a:winnr), 'unite') | |
execute a:winnr 'wincmd w' | |
endif | |
135 0.000414 let pos = getpos('.') | |
135 0.001629 0.000485 let unite = unite#get_current_unite() | |
135 0.000261 let context = unite.context | |
135 0.000246 try | |
135 0.000231 if &filetype !=# 'unite' | |
return | |
endif | |
135 0.000205 if !context.is_redraw | |
135 0.000302 let context.is_redraw = a:is_force | |
135 0.000104 endif | |
135 0.000132 if context.is_redraw | |
call unite#clear_message() | |
endif | |
135 0.006266 0.000665 let input = unite#helper#get_input(1) | |
135 0.000754 if !context.is_redraw && input ==# unite.last_input && context.path ==# unite.last_path && !unite.is_async && !context.unite__is_resize && !a:is_gather_all | |
9 0.000009 return | |
endif | |
126 0.000394 let is_gather_all = a:is_gather_all || context.log | |
126 0.000509 if context.is_redraw || input !=# unite.last_input || context.path !=# unite.last_path || unite.is_async || empty(unite.args) | |
" Recaching. | |
126 21.930546 0.000874 call unite#candidates#_recache(input, a:is_force) | |
126 0.000064 endif | |
126 0.000262 let unite.last_input = input | |
126 0.000259 let unite.last_path = context.path | |
" Redraw. | |
126 0.980977 0.000658 call unite#view#_redraw_candidates(is_gather_all) | |
126 0.184929 0.000606 call unite#view#_change_highlight() | |
126 0.000226 let unite.context.is_redraw = 0 | |
126 0.000080 finally | |
135 0.000294 if empty(unite.args) && getpos('.') !=# pos | |
call setpos('.', pos) | |
if context.prompt_direction ==# 'below' | |
call cursor(line('$'), 0) | |
call unite#view#_bottom_cursor() | |
endif | |
endif | |
135 0.000152 if a:winnr > 0 | |
" Restore current unite. | |
call unite#set_current_unite(unite_save) | |
execute winnr_save 'wincmd w' | |
endif | |
135 0.000099 endtry | |
126 0.000134 if context.auto_preview | |
call unite#view#_do_auto_preview() | |
endif | |
126 0.000109 if context.auto_highlight | |
call unite#view#_do_auto_highlight() | |
endif | |
FUNCTION airline#extensions#branch#get_head() | |
Called 117 times | |
Total time: 0.008013 | |
Self time: 0.002989 | |
count total (s) self (s) | |
117 0.005698 0.000674 let head = airline#extensions#branch#head() | |
117 0.000742 let empty_message = get(g:, 'airline#extensions#branch#empty_message', get(g:, 'airline_branch_empty_message', '')) | |
117 0.000523 let symbol = get(g:, 'airline#extensions#branch#symbol', g:airline_symbols.branch) | |
117 0.000824 return empty(head) ? empty_message : printf('%s%s', empty(symbol) ? '' : symbol.(g:airline_symbols.space), head) | |
FUNCTION <SNR>85_exec_separator() | |
Called 2175 times | |
Total time: 0.496133 | |
Self time: 0.060110 | |
count total (s) self (s) | |
2175 0.202747 0.010827 let l:from = airline#themes#get_highlight(a:from.a:suffix) | |
2175 0.184989 0.009509 let l:to = airline#themes#get_highlight(a:to.a:suffix) | |
2175 0.005596 let group = a:from.'_to_'.a:to.a:suffix | |
2175 0.001793 if a:inverse | |
857 0.003116 let colors = [ l:from[1], l:to[1], l:from[3], l:to[3] ] | |
857 0.000474 else | |
1318 0.004814 let colors = [ l:to[1], l:from[1], l:to[3], l:from[3] ] | |
1318 0.000651 endif | |
2175 0.006316 let a:dict[group] = colors | |
2175 0.077635 0.009012 call airline#highlighter#exec(group, colors) | |
FUNCTION vimproc#parser#split_args() | |
Called 14 times | |
Total time: 0.017376 | |
Self time: 0.013767 | |
count total (s) self (s) | |
14 0.000649 let script = type(a:script) == type([]) ? a:script : split(a:script, '\zs') | |
14 0.000022 let max = len(script) | |
14 0.000012 let args = [] | |
14 0.000012 let arg = '' | |
14 0.000013 let i = 0 | |
420 0.000266 while i < max | |
406 0.000453 if script[i] == "'" | |
" Single quote. | |
14 0.003259 0.000077 let [arg_quote, i] = s:parse_single_quote(script, i) | |
14 0.000020 let arg .= arg_quote | |
14 0.000011 if arg == '' | |
call add(args, '') | |
endif | |
14 0.000010 elseif script[i] == '"' | |
" Double quote. | |
14 0.000522 0.000095 let [arg_quote, i] = s:parse_double_quote(script, i) | |
14 0.000019 let arg .= arg_quote | |
14 0.000020 if arg == '' | |
14 0.000034 call add(args, '') | |
14 0.000005 endif | |
14 0.000010 elseif script[i] == '`' | |
" Back quote. | |
let head = i > 0 ? script[: i-1] : [] | |
let [arg_quote, i] = s:parse_back_quote(script, i) | |
" Re-parse script. | |
return vimproc#parser#split_args( head + split(arg_quote, '\zs') + script[i :]) | |
elseif script[i] == '\' | |
" Escape. | |
let i += 1 | |
if i >= max | |
throw 'Exception: Join to next line (\).' | |
endif | |
let arg .= script[i] | |
let i += 1 | |
elseif script[i] == '#' && arg == '' | |
" Comment. | |
break | |
elseif script[i] != ' ' | |
308 0.000436 let arg .= script[i] | |
308 0.000242 let i += 1 | |
308 0.000102 else | |
" Space. | |
70 0.000048 if arg != '' | |
56 0.000180 call add(args, arg) | |
56 0.000021 endif | |
70 0.000060 let arg = '' | |
70 0.000058 let i += 1 | |
70 0.000020 endif | |
406 0.000223 endwhile | |
14 0.000013 if arg != '' | |
14 0.000040 call add(args, arg) | |
14 0.000005 endif | |
14 0.000012 return args | |
FUNCTION <SNR>126_nowait_nmap() | |
Called 462 times | |
Total time: 0.001817 | |
Self time: 0.001817 | |
count total (s) self (s) | |
462 0.001681 return 'nmap <buffer>' . ((v:version > 703 || (v:version == 703 && has('patch1261'))) ? '<nowait>' : '') | |
FUNCTION <SNR>177_get_candidates_action_table() | |
Called 11 times | |
Total time: 0.140263 | |
Self time: 0.001355 | |
count total (s) self (s) | |
11 0.000023 let action_tables = [] | |
22 0.000047 for candidate in a:candidates | |
11 0.111737 0.000103 let action_table = unite#action#_get_candidate_action_table( candidate, a:sources) | |
11 0.000024 let action_name = a:action_name | |
11 0.000017 if action_name ==# 'default' | |
" Get default action. | |
11 0.027366 0.000092 let action_name = unite#action#get_default_action( candidate.source, candidate.kind) | |
11 0.000006 endif | |
11 0.000015 if action_name == '' | |
" Ignore. | |
return [] | |
endif | |
11 0.000024 if !has_key(action_table, action_name) | |
call unite#util#print_error( candidate.unite__abbr . '(' . candidate.source . ')') | |
call unite#util#print_error( 'No such action : ' . action_name) | |
return [] | |
endif | |
11 0.000024 let action = action_table[action_name] | |
" Check selectable flag. | |
11 0.000021 if !action.is_selectable && len(a:candidates) > 1 | |
call unite#util#print_error( candidate.unite__abbr . '(' . candidate.source . ')') | |
call unite#util#print_error( 'Not selectable action : ' . action_name) | |
return [] | |
endif | |
11 0.000016 let found = 0 | |
11 0.000014 for table in action_tables | |
if action == table.action | |
" Add list. | |
call add(table.candidates, candidate) | |
call add(table.source_names, candidate.source) | |
let found = 1 | |
break | |
endif | |
endfor | |
11 0.000010 if !found | |
" Add action table. | |
11 0.000099 call add(action_tables, { 'action' : action, 'source_names' : [candidate.source], 'candidates' : (!action.is_selectable ? candidate : [candidate]), }) | |
11 0.000006 endif | |
11 0.000009 endfor | |
11 0.000013 return action_tables | |
FUNCTION <SNR>119_vp_pgroup_close() | |
Called 42 times | |
Total time: 0.007561 | |
Self time: 0.000279 | |
count total (s) self (s) | |
42 0.007474 0.000192 call self.fd.close() | |
FUNCTION <SNR>14_StarSetf() | |
Called 3 times | |
Total time: 0.035787 | |
Self time: 0.000056 | |
count total (s) self (s) | |
3 0.000036 if expand("<amatch>") !~ g:ft_ignore_pat | |
3 0.035745 0.000014 exe 'setf ' . a:ft | |
3 0.000001 endif | |
FUNCTION unite#view#_print_source_message() | |
Called 14 times | |
Total time: 0.160755 | |
Self time: 0.000334 | |
count total (s) self (s) | |
14 0.160742 0.000321 call unite#view#_print_message( map(copy(s:msg2list(a:message)), "printf('[%s] %s', a:source_name, v:val)")) | |
FUNCTION <SNR>134_get_list() | |
Called 2 times | |
Total time: 0.000010 | |
Self time: 0.000010 | |
count total (s) self (s) | |
2 0.000004 if !exists('s:List') | |
let s:List = vital#of('neosnippet').import('Data.List') | |
endif | |
2 0.000002 return s:List | |
FUNCTION <SNR>20_LoadFTPlugin() | |
Called 24 times | |
Total time: 0.021801 | |
Self time: 0.019423 | |
count total (s) self (s) | |
24 0.000085 if exists("b:undo_ftplugin") | |
exe b:undo_ftplugin | |
unlet! b:undo_ftplugin b:did_ftplugin | |
endif | |
24 0.000076 let s = expand("<amatch>") | |
24 0.000038 if s != "" | |
24 0.000149 if &cpo =~# "S" && exists("b:did_ftplugin") | |
" In compatible mode options are reset to the global values, need to | |
" set the local values also when a plugin was already used. | |
unlet b:did_ftplugin | |
endif | |
" When there is a dot it is used to separate filetype names. Thus for | |
" "aaa.bbb" load "aaa" and then "bbb". | |
48 0.000165 for name in split(s, '\.') | |
24 0.020893 0.018515 exe 'runtime! ftplugin/' . name . '.vim ftplugin/' . name . '_*.vim ftplugin/' . name . '/*.vim' | |
24 0.000059 endfor | |
24 0.000016 endif | |
FUNCTION <SNR>106_init_continuation() | |
Called 14 times | |
Total time: 0.001969 | |
Self time: 0.000681 | |
count total (s) self (s) | |
14 0.001333 0.000109 let cache_dir = unite#get_data_directory() . '/rec/' . (a:context.source__is_directory ? 'directory' : 'file') | |
14 0.000044 let continuation = (a:context.source__is_directory) ? s:continuation.directory : s:continuation.file | |
14 0.000124 0.000060 if !has_key(continuation, a:directory) && s:Cache.filereadable(cache_dir, a:directory) | |
" Use cache file. | |
let files = unite#helper#paths2candidates( s:Cache.readfile(cache_dir, a:directory)) | |
let continuation[a:directory] = { 'files' : files, 'rest' : [], 'directory' : a:directory, 'end' : 1, } | |
else | |
14 0.000028 let a:context.is_async = 1 | |
14 0.000088 let continuation[a:directory] = { 'files' : [], 'rest' : [a:directory], 'directory' : a:directory, 'end' : 0, } | |
14 0.000009 endif | |
14 0.000041 let a:context.source__continuation = continuation[a:directory] | |
14 0.000154 let a:context.source__continuation.files = filter(copy(a:context.source__continuation.files), (a:context.source__is_directory) ? 'isdirectory(v:val.action__path)' : 'filereadable(v:val.action__path)') | |
FUNCTION vimproc#util#systemencoding() | |
Called 123 times | |
Total time: 0.000249 | |
Self time: 0.000249 | |
count total (s) self (s) | |
123 0.000197 return s:is_windows ? 'utf-8' : 'char' | |
FUNCTION <SNR>111_ignore_candidates() | |
Called 119 times | |
Total time: 5.354943 | |
Self time: 0.017045 | |
count total (s) self (s) | |
119 0.012539 let candidates = copy(a:candidates) | |
119 0.000413 if a:context.ignore_pattern != '' | |
14 0.221438 0.000131 let candidates = unite#filters#vim_filter_pattern( candidates, a:context.ignore_pattern) | |
14 0.000036 endif | |
119 0.000311 if !empty(a:context.ignore_globs) | |
91 5.117964 0.001373 let candidates = unite#filters#filter_patterns(candidates, unite#filters#globs2patterns(a:context.ignore_globs), unite#filters#globs2patterns(a:context.white_globs)) | |
91 0.000103 endif | |
119 0.000424 if a:context.path != '' | |
let candidates = unite#filters#{unite#util#has_lua()? 'lua' : 'vim'}_filter_head(candidates, a:context.path) | |
endif | |
119 0.000120 return candidates | |
FUNCTION unite#helper#get_input() | |
Called 457 times | |
Total time: 0.015920 | |
Self time: 0.012654 | |
count total (s) self (s) | |
457 0.001504 let is_force = get(a:000, 0, 0) | |
457 0.004593 0.001327 let unite = unite#get_current_unite() | |
457 0.000920 if !is_force && mode() !=# 'i' | |
40 0.000057 return unite.context.input | |
endif | |
417 0.000434 if unite.prompt_linenr == 0 | |
return '' | |
endif | |
" Prompt check. | |
417 0.001648 if stridx(getline(unite.prompt_linenr), unite.prompt) != 0 | |
let modifiable_save = &l:modifiable | |
setlocal modifiable | |
" Restore prompt. | |
call setline(unite.prompt_linenr, unite.prompt) | |
let &l:modifiable = modifiable_save | |
endif | |
417 0.001354 return getline(unite.prompt_linenr)[len(unite.prompt):] | |
FUNCTION unite#smart_map() | |
Called 5 times | |
Total time: 0.001471 | |
Self time: 0.000134 | |
count total (s) self (s) | |
5 0.001452 0.000115 return (line('.') == unite#get_current_unite().prompt_linenr && empty(unite#helper#get_marked_candidates())) ? a:narrow_map : a:select_map | |
FUNCTION <SNR>141_get_list() | |
Called 55 times | |
Total time: 0.000477 | |
Self time: 0.000477 | |
count total (s) self (s) | |
55 0.000159 if !exists('s:List') | |
let s:List = neocomplete#util#get_vital().import('Data.List') | |
endif | |
55 0.000058 return s:List | |
FUNCTION <SNR>28_escape_pattern() | |
Called 28 times | |
Total time: 0.000114 | |
Self time: 0.000114 | |
count total (s) self (s) | |
28 0.000095 return escape(a:str, '~"\.^$[]*') | |
FUNCTION <SNR>44_init() | |
Called 89 times | |
Total time: 0.001478 | |
Self time: 0.001478 | |
count total (s) self (s) | |
89 0.000156 if !s:airline_initialized | |
let s:airline_initialized = 1 | |
call airline#init#bootstrap() | |
call airline#extensions#load() | |
call airline#init#sections() | |
let s:airline_theme_defined = exists('g:airline_theme') | |
if s:airline_theme_defined || !airline#switch_matching_theme() | |
let g:airline_theme = get(g:, 'airline_theme', 'dark') | |
call airline#switch_theme(g:airline_theme) | |
endif | |
endif | |
FUNCTION <SNR>28_strwidthpart_reverse() | |
Called 75 times | |
Total time: 0.048857 | |
Self time: 0.040590 | |
count total (s) self (s) | |
75 0.000084 if a:width <= 0 | |
return '' | |
endif | |
75 0.000095 let ret = a:str | |
75 0.000385 0.000217 let width = s:wcswidth(a:str) | |
4621 0.003625 while width > a:width | |
4546 0.012950 let char = matchstr(ret, '^.') | |
4546 0.008022 let ret = ret[len(char) :] | |
4546 0.019669 0.011570 let width -= s:wcswidth(char) | |
4546 0.001916 endwhile | |
75 0.000056 return ret | |
FUNCTION <SNR>88_get_prev_group() | |
Called 1778 times | |
Total time: 0.019935 | |
Self time: 0.019935 | |
count total (s) self (s) | |
1778 0.002690 let x = a:i - 1 | |
2070 0.002525 while x >= 0 | |
1827 0.003807 let group = a:sections[x][0] | |
1827 0.003831 if group != '' && group != '|' | |
1535 0.001858 return group | |
endif | |
292 0.000392 let x = x - 1 | |
292 0.000243 endwhile | |
243 0.000183 return '' | |
FUNCTION <SNR>25_buflisted() | |
Called 14 times | |
Total time: 0.000170 | |
Self time: 0.000170 | |
count total (s) self (s) | |
14 0.000150 return (getbufvar(a:bufnr, '&bufhidden') == '' || buflisted(a:bufnr)) && (exists('t:tabpagebuffer') ? has_key(t:tabpagebuffer, a:bufnr) && bufloaded(a:bufnr) : bufloaded(a:bufnr)) | |
FUNCTION airline#extensions#tabline#default#format() | |
Called 2108 times | |
Total time: 0.119339 | |
Self time: 0.088560 | |
count total (s) self (s) | |
2108 0.002776 let _ = '' | |
2108 0.004740 let name = bufname(a:bufnr) | |
2108 0.003533 if empty(name) | |
let _ .= '[No Name]' | |
else | |
2108 0.002087 if s:fnamecollapse | |
2108 0.050401 let _ .= substitute(fnamemodify(name, s:fmod), '\v\w\zs.{-}\ze(\\|/)', '', 'g') | |
2108 0.001529 else | |
let _ .= fnamemodify(name, s:fmod) | |
endif | |
2108 0.001080 endif | |
2108 0.040548 0.009769 return airline#extensions#tabline#default#wrap_name(a:bufnr, _) | |
FUNCTION vimproc#filepath#which() | |
Called 14 times | |
Total time: 0.000369 | |
Self time: 0.000095 | |
count total (s) self (s) | |
14 0.000362 0.000088 return s:which(a:command, a:path, a:maxcount) | |
FUNCTION <SNR>167_uniq() | |
Called 55 times | |
Total time: 0.053922 | |
Self time: 0.000558 | |
count total (s) self (s) | |
55 0.053889 0.000525 return s:uniq_by(a:list, 'v:val') | |
FUNCTION unite#view#_print_message() | |
Called 14 times | |
Total time: 0.160296 | |
Self time: 0.001261 | |
count total (s) self (s) | |
14 0.000298 0.000049 let context = unite#get_context() | |
14 0.000165 0.000040 let unite = unite#get_current_unite() | |
14 0.000100 0.000046 let message = s:msg2list(a:message) | |
14 0.000022 if !empty(unite) | |
14 0.000023 let unite.msgs += message | |
14 0.000010 endif | |
14 0.000027 if !get(context, 'silent', 0) | |
14 0.159602 0.000995 echohl Comment | call unite#view#_redraw_echo(message[: &cmdheight-1]) | echohl None | |
14 0.000014 endif | |
FUNCTION unite#remove_previewed_buffer_list() | |
Called 9 times | |
Total time: 0.000296 | |
Self time: 0.000048 | |
count total (s) self (s) | |
9 0.000290 0.000042 return unite#view#_remove_previewed_buffer_list(a:bufnr) | |
FUNCTION 137() | |
Called 9 times | |
Total time: 1.029540 | |
Self time: 0.001005 | |
count total (s) self (s) | |
18 0.000042 for candidate in a:candidates | |
9 0.000290 if buflisted(candidate.action__path) | |
execute 'buffer' bufnr(candidate.action__path) | |
else | |
9 1.028314 0.000075 call s:execute_command('edit', candidate) | |
9 0.000009 endif | |
9 0.000707 0.000411 call unite#remove_previewed_buffer_list(bufnr(candidate.action__path)) | |
9 0.000007 endfor | |
FUNCTION unite#handlers#_on_cursor_moved_i() | |
Called 134 times | |
Total time: 21.816656 | |
Self time: 0.003381 | |
count total (s) self (s) | |
134 0.001897 0.000557 let unite = unite#get_current_unite() | |
134 0.000305 let prompt_linenr = unite.prompt_linenr | |
134 0.000304 if unite.max_source_candidates <= unite.redraw_hold_candidates | |
134 21.812678 0.000743 call s:check_redraw() | |
134 0.000069 endif | |
" Prompt check. | |
134 0.000564 if line('.') == prompt_linenr && col('.') <= len(unite.prompt) | |
startinsert! | |
endif | |
FUNCTION unite#util#sort_by() | |
Called 463 times | |
Total time: 0.020111 | |
Self time: 0.003697 | |
count total (s) self (s) | |
463 0.019845 0.003431 return call(s:get_list().sort_by, a:000) | |
FUNCTION <SNR>119_fdopen_pgroup() | |
Called 42 times | |
Total time: 0.004936 | |
Self time: 0.001006 | |
count total (s) self (s) | |
42 0.004915 0.000985 return { 'eof' : 0, '__eof' : 0, 'is_valid' : 1, 'buffer' : [], 'proc' : a:proc, 'fd' : a:fd, 'f_close' : s:funcref(a:f_close), 'close' : s:funcref('close'), 'read' : s:funcref(a:f_read), 'write' : s:funcref(a:f_write), 'read_line' : s:funcref('read_line'), 'read_lines' : s:funcref('read_lines'),} | |
FUNCTION unite#util#lcd() | |
Called 171 times | |
Total time: 0.005246 | |
Self time: 0.005246 | |
count total (s) self (s) | |
171 0.001284 if isdirectory(a:dir) | |
171 0.003573 execute 'lcd' fnameescape(a:dir) | |
171 0.000119 endif | |
FUNCTION <SNR>125_restore_statusline() | |
Called 189 times | |
Total time: 0.000795 | |
Self time: 0.000795 | |
count total (s) self (s) | |
189 0.000529 if &filetype !=# 'unite' || !g:unite_force_overwrite_statusline | |
189 0.000112 return | |
endif | |
let unite = unite#get_current_unite() | |
if &l:statusline != unite.statusline | |
" Restore statusline. | |
let &l:statusline = unite.statusline | |
endif | |
FUNCTION <SNR>88_get_accented_line() | |
Called 1439 times | |
Total time: 0.056991 | |
Self time: 0.056991 | |
count total (s) self (s) | |
1439 0.001718 if a:self._context.active | |
1071 0.001370 let contents = [] | |
1071 0.006961 let content_parts = split(a:contents, '__accent') | |
2082 0.002802 for cpart in content_parts | |
1011 0.007193 let accent = matchstr(cpart, '_\zs[^#]*\ze') | |
1011 0.004181 call add(contents, cpart) | |
1011 0.000747 endfor | |
1071 0.003230 let line = join(contents, a:group) | |
1071 0.006313 let line = substitute(line, '__restore__', a:group, 'g') | |
1071 0.000590 else | |
368 0.003767 let line = substitute(a:contents, '%#__accent[^#]*#', '', 'g') | |
368 0.002127 let line = substitute(line, '%#__restore__#', '', 'g') | |
368 0.000203 endif | |
1439 0.001245 return line | |
FUNCTION <SNR>106_write_cache() | |
Called 10 times | |
Total time: 0.386131 | |
Self time: 0.171627 | |
count total (s) self (s) | |
10 0.000793 0.000064 let cache_dir = unite#get_data_directory() . '/rec/' . (a:context.source__is_directory ? 'directory' : 'file') | |
10 0.000108 0.000063 if g:unite_source_rec_min_cache_files >= 0 && !unite#util#is_sudo() && len(a:files) > g:unite_source_rec_min_cache_files | |
8 0.384926 0.171326 call s:Cache.writefile(cache_dir, a:directory, map(copy(a:files), 'v:val.action__path')) | |
8 0.000082 elseif s:Cache.filereadable(cache_dir, a:directory) | |
" Delete old cache files. | |
call s:Cache.deletefile(cache_dir, a:directory) | |
endif | |
FUNCTION <SNR>138_check_old_cache() | |
Called 2 times | |
Total time: 0.000137 | |
Self time: 0.000040 | |
count total (s) self (s) | |
" Check old cache file. | |
2 0.000108 0.000011 let cache_name = s:_encode_name(a:cache_dir, a:filename) | |
2 0.000017 let ret = getftime(cache_name) == -1 || getftime(cache_name) <= getftime(a:filename) | |
2 0.000003 if ret && filereadable(cache_name) | |
" Delete old cache. | |
call delete(cache_name) | |
endif | |
2 0.000002 return ret | |
FUNCTION airline#builder#new() | |
Called 233 times | |
Total time: 0.005828 | |
Self time: 0.005828 | |
count total (s) self (s) | |
233 0.001375 let builder = copy(s:prototype) | |
233 0.000449 let builder._context = a:context | |
233 0.000328 let builder._sections = [] | |
233 0.003071 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') | |
233 0.000244 return builder | |
FUNCTIONS SORTED ON TOTAL TIME | |
count total (s) self (s) function | |
140 26.354353 0.056150 unite#candidates#_recache() | |
140 25.693491 0.102345 <SNR>111_recache_candidates_loop() | |
135 23.119373 0.001485 unite#redraw() | |
135 23.117888 0.015187 unite#view#_redraw() | |
136 21.882330 0.002286 <SNR>125_check_redraw() | |
134 21.816656 0.003381 unite#handlers#_on_cursor_moved_i() | |
420 20.466990 0.233035 <SNR>111_get_source_candidates() | |
77 14.456950 1.085787 77() | |
154 9.102010 0.076750 unite#util#read_lines() | |
1617 9.025260 1.054436 <SNR>119_read_lines() | |
1446 7.970824 0.097499 <SNR>119_read_pgroup() | |
1446 7.871497 0.036335 <SNR>119_read_pipes() | |
1446 7.835162 0.119498 <SNR>119_read() | |
2916 7.715664 0.051212 <SNR>119_vp_pipe_read() | |
2916 7.664452 <SNR>119_libcall_raw_read() | |
119 5.354943 0.017045 <SNR>111_ignore_candidates() | |
1400 5.089596 0.020814 unite#helper#call_filter() | |
91 5.055396 0.001136 unite#filters#filter_patterns() | |
91 5.052313 unite#filters#lua_filter_patterns() | |
14 4.917412 0.000462 <SNR>54_call_unite_empty() | |
FUNCTIONS SORTED ON SELF TIME | |
count total (s) self (s) function | |
2916 7.664452 <SNR>119_libcall_raw_read() | |
91 5.052313 unite#filters#lua_filter_patterns() | |
140 2.225622 2.225251 unite#filters#converter_relative_word#lua() | |
194298 1.756623 <SNR>118_iconv() | |
556 1.726983 unite#filters#lua_matcher() | |
14 1.874456 1.216047 unite#view#_quit() | |
77 14.456950 1.085787 77() | |
1617 9.025260 1.054436 <SNR>119_read_lines() | |
10 0.991031 <SNR>98_uniq_by() | |
194298 3.555014 0.938964 unite#util#iconv() | |
194312 0.859512 <SNR>25_get_process() | |
2160 0.367929 <SNR>83_get_buffer_list() | |
4678 0.423110 0.362574 unite#init#_default_scripts() | |
91 0.345012 unite#helper#paths2candidates() | |
11054 0.285143 <SNR>105_is_file_exist() | |
11544 0.261084 <SNR>85_get_syn() | |
140 0.251017 92() | |
35 0.233566 <SNR>105_uniq_by() | |
420 20.466990 0.233035 <SNR>111_get_source_candidates() | |
14 0.221307 unite#filters#vim_filter_pattern() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment