Skip to content

Instantly share code, notes, and snippets.

@eknowlton
Created December 5, 2018 18:42
Show Gist options
  • Save eknowlton/6c12f39e267b1ead9910f1154fd36f3b to your computer and use it in GitHub Desktop.
Save eknowlton/6c12f39e267b1ead9910f1154fd36f3b to your computer and use it in GitHub Desktop.
with omnifunc set
This file has been truncated, but you can view the full file.
SCRIPT /Users/ethanknowlton/.vim/plugged/vim-leader-guide/syntax/leaderGuide.vim
Sourced 2 times
Total time: 0.000134
Self time: 0.000134
count total (s) self (s)
2 0.000012 if exists("b:current_syntax")
finish
endif
2 0.000004 let b:current_syntax = "leaderguide"
2 0.000033 syn region LeaderGuideKeys start="\["hs=e+1 end="\]\s"he=s-1
\ contained
2 0.000019 syn region LeaderGuideBrackets start="\(^\|\s\+\)\[" end="\]\s\+"
\ contains=LeaderGuideKeys keepend
2 0.000014 syn region LeaderGuideDesc start="^" end="$"
\ contains=LeaderGuideBrackets
2 0.000012 hi def link LeaderGuideDesc Identifier
2 0.000004 hi def link LeaderGuideKeys Type
2 0.000011 hi def link LeaderGuideBrackets Delimiter
SCRIPT /Users/ethanknowlton/.vim/plugged/vim-airline/autoload/airline/async.vim
Sourced 1 time
Total time: 0.000205
Self time: 0.000205
count total (s) self (s)
" MIT License. Copyright (c) 2013-2018 C.Brabandt et al.
" vim: et ts=2 sts=2 sw=2
1 0.000003 scriptencoding utf-8
1 0.000003 let s:untracked_jobs = {}
1 0.000001 let s:mq_jobs = {}
1 0.000001 let s:po_jobs = {}
" Generic functions handling on exit event of the various async functions
1 0.000003 function! s:untracked_output(dict, buf)
if a:buf =~? ('^'. a:dict.cfg['untracked_mark'])
let a:dict.cfg.untracked[a:dict.file] = get(g:, 'airline#extensions#branch#notexists', g:airline_symbols.notexists)
else
let a:dict.cfg.untracked[a:dict.file] = ''
endif
endfunction
" also called from branch extension (for non-async vims)
1 0.000004 function! airline#async#mq_output(buf, file)
let buf=a:buf
if !empty(a:buf)
if a:buf =~# 'no patches applied' ||
\ a:buf =~# "unknown command 'qtop'" ||
\ a:buf =~# "abort"
let buf = ''
elseif exists("b:mq") && b:mq isnot# buf
" make sure, statusline is updated
unlet! b:airline_head
endif
let b:mq = buf
endif
if has_key(s:mq_jobs, a:file)
call remove(s:mq_jobs, a:file)
endif
endfunction
1 0.000002 function! s:po_output(buf, file)
if !empty(a:buf)
let b:airline_po_stats = printf("%s", a:buf)
else
let b:airline_po_stats = ''
endif
if has_key(s:po_jobs, a:file)
call remove(s:po_jobs, a:file)
endif
endfunction
1 0.000001 function! s:valid_dir(dir)
if empty(a:dir) || !isdirectory(a:dir)
return getcwd()
endif
return a:dir
endfunction
1 0.000005 if v:version >= 800 && has("job")
" Vim 8.0 with Job feature
" TODO: Check if we need the cwd option for the job_start() functions
" (only works starting with Vim 8.0.0902)
function! s:on_stdout(channel, msg) dict abort
let self.buf .= a:msg
endfunction
function! s:on_exit_mq(channel) dict abort
call airline#async#mq_output(self.buf, self.file)
endfunction
function! s:on_exit_untracked(channel) dict abort
call s:untracked_output(self, self.buf)
if has_key(s:untracked_jobs, self.file)
call remove(s:untracked_jobs, self.file)
endif
endfunction
function! s:on_exit_po(channel) dict abort
call s:po_output(self.buf, self.file)
call airline#extensions#po#shorten()
endfunction
function! airline#async#get_mq_async(cmd, file)
if g:airline#init#is_windows && &shell =~ 'cmd'
let cmd = a:cmd
else
let cmd = ['sh', '-c', a:cmd]
endif
let options = {'cmd': a:cmd, 'buf': '', 'file': a:file}
if has_key(s:mq_jobs, a:file)
if job_status(get(s:mq_jobs, a:file)) == 'run'
return
elseif has_key(s:mq_jobs, a:file)
call remove(s:mq_jobs, a:file)
endif
endif
let id = job_start(cmd, {
\ 'err_io': 'out',
\ 'out_cb': function('s:on_stdout', options),
\ 'close_cb': function('s:on_exit_mq', options)})
let s:mq_jobs[a:file] = id
endfunction
function! airline#async#get_msgfmt_stat(cmd, file)
if g:airline#init#is_windows || !executable('msgfmt')
" no msgfmt on windows?
return
else
let cmd = ['sh', '-c', a:cmd. shellescape(a:file)]
endif
let options = {'buf': '', 'file': a:file}
if has_key(s:po_jobs, a:file)
if job_status(get(s:po_jobs, a:file)) == 'run'
return
elseif has_key(s:po_jobs, a:file)
call remove(s:po_jobs, a:file)
endif
endif
let id = job_start(cmd, {
\ 'err_io': 'out',
\ 'out_cb': function('s:on_stdout', options),
\ 'close_cb': function('s:on_exit_po', options)})
let s:po_jobs[a:file] = id
endfunction
function! airline#async#vim_vcs_untracked(config, file)
if g:airline#init#is_windows && &shell =~ 'cmd'
let cmd = a:config['cmd'] . shellescape(a:file)
else
let cmd = ['sh', '-c', a:config['cmd'] . shellescape(a:file)]
endif
let options = {'cfg': a:config, 'buf': '', 'file': a:file}
if has_key(s:untracked_jobs, a:file)
if job_status(get(s:untracked_jobs, a:file)) == 'run'
return
elseif has_key(s:untracked_jobs, a:file)
call remove(s:untracked_jobs, a:file)
endif
endif
let id = job_start(cmd, {
\ 'err_io': 'out',
\ 'out_cb': function('s:on_stdout', options),
\ 'close_cb': function('s:on_exit_untracked', options)})
let s:untracked_jobs[a:file] = id
endfunction
elseif has("nvim")
" NVim specific functions
1 0.000002 function! s:nvim_output_handler(job_id, data, event) dict
if a:event == 'stdout' || a:event == 'stderr'
let self.buf .= join(a:data)
endif
endfunction
1 0.000002 function! s:nvim_untracked_job_handler(job_id, data, event) dict
if a:event == 'exit'
call s:untracked_output(self, self.buf)
if has_key(s:untracked_jobs, self.file)
call remove(s:untracked_jobs, self.file)
endif
endif
endfunction
1 0.000001 function! s:nvim_mq_job_handler(job_id, data, event) dict
if a:event == 'exit'
call airline#async#mq_output(self.buf, self.file)
endif
endfunction
1 0.000001 function! s:nvim_po_job_handler(job_id, data, event) dict
if a:event == 'exit'
call s:po_output(self.buf, self.file)
call airline#extensions#po#shorten()
endif
endfunction
1 0.000002 function! airline#async#nvim_get_mq_async(cmd, file)
let config = {
\ 'buf': '',
\ 'file': a:file,
\ 'cwd': s:valid_dir(fnamemodify(a:file, ':p:h')),
\ 'on_stdout': function('s:nvim_output_handler'),
\ 'on_stderr': function('s:nvim_output_handler'),
\ 'on_exit': function('s:nvim_mq_job_handler')
\ }
if g:airline#init#is_windows && &shell =~ 'cmd'
let cmd = a:cmd
else
let cmd = ['sh', '-c', a:cmd]
endif
if has_key(s:mq_jobs, a:file)
call remove(s:mq_jobs, a:file)
endif
let id = jobstart(cmd, config)
let s:mq_jobs[a:file] = id
endfunction
1 0.000002 function! airline#async#nvim_get_msgfmt_stat(cmd, file)
let config = {
\ 'buf': '',
\ 'file': a:file,
\ 'cwd': s:valid_dir(fnamemodify(a:file, ':p:h')),
\ 'on_stdout': function('s:nvim_output_handler'),
\ 'on_stderr': function('s:nvim_output_handler'),
\ 'on_exit': function('s:nvim_po_job_handler')
\ }
if g:airline#init#is_windows && &shell =~ 'cmd'
" no msgfmt on windows?
return
else
let cmd = ['sh', '-c', a:cmd. shellescape(a:file)]
endif
if has_key(s:po_jobs, a:file)
call remove(s:po_jobs, a:file)
endif
let id = jobstart(cmd, config)
let s:po_jobs[a:file] = id
endfunction
1 0.000001 endif
" Should work in either Vim pre 8 or Nvim
1 0.000002 function! airline#async#nvim_vcs_untracked(cfg, file, vcs)
let cmd = a:cfg.cmd . shellescape(a:file)
let id = -1
let config = {
\ 'buf': '',
\ 'vcs': a:vcs,
\ 'cfg': a:cfg,
\ 'file': a:file,
\ 'cwd': s:valid_dir(fnamemodify(a:file, ':p:h'))
\ }
if has("nvim")
call extend(config, {
\ 'on_stdout': function('s:nvim_output_handler'),
\ 'on_exit': function('s:nvim_untracked_job_handler')})
if has_key(s:untracked_jobs, config.file)
" still running
return
endif
try
let id = jobstart(cmd, config)
catch
" catch-all, jobstart() failed, fall back to system()
let id=-1
endtry
let s:untracked_jobs[a:file] = id
endif
" vim without job feature or nvim jobstart failed
if id < 1
let output=system(cmd)
call s:untracked_output(config, output)
call airline#extensions#branch#update_untracked_config(a:file, a:vcs)
endif
endfunction
SCRIPT /Users/ethanknowlton/.vim/plugged/ctrlp.vim/autoload/ctrlp/utils.vim
Sourced 1 time
Total time: 0.000219
Self time: 0.000129
count total (s) self (s)
" =============================================================================
" File: autoload/ctrlp/utils.vim
" Description: Utilities
" Author: Kien Nguyen <github.com/kien>
" =============================================================================
" Static variables {{{1
1 0.000004 fu! ctrlp#utils#lash()
retu &ssl || !exists('+ssl') ? '/' : '\'
endf
1 0.000002 fu! s:lash(...)
retu ( a:0 ? a:1 : getcwd() ) !~ '[\/]$' ? s:lash : ''
endf
1 0.000002 fu! ctrlp#utils#opts()
let s:lash = ctrlp#utils#lash()
let usrhome = $HOME . s:lash( $HOME )
let cahome = exists('$XDG_CACHE_HOME') ? $XDG_CACHE_HOME : usrhome.'.cache'
let cadir = isdirectory(usrhome.'.ctrlp_cache')
\ ? usrhome.'.ctrlp_cache' : cahome.s:lash(cahome).'ctrlp'
if exists('g:ctrlp_cache_dir')
let cadir = expand(g:ctrlp_cache_dir, 1)
if isdirectory(cadir.s:lash(cadir).'.ctrlp_cache')
let cadir = cadir.s:lash(cadir).'.ctrlp_cache'
en
en
let s:cache_dir = cadir
endf
1 0.000099 0.000008 cal ctrlp#utils#opts()
1 0.000003 let s:wig_cond = v:version > 702 || ( v:version == 702 && has('patch051') )
" Files and Directories {{{1
1 0.000002 fu! ctrlp#utils#cachedir()
retu s:cache_dir
endf
1 0.000002 fu! ctrlp#utils#cachefile(...)
let [tail, dir] = [a:0 == 1 ? '.'.a:1 : '', a:0 == 2 ? a:1 : getcwd()]
let cache_file = substitute(dir, '\([\/]\|^\a\zs:\)', '%', 'g').tail.'.txt'
retu a:0 == 1 ? cache_file : s:cache_dir.s:lash(s:cache_dir).cache_file
endf
1 0.000002 fu! ctrlp#utils#readfile(file)
if filereadable(a:file)
let data = readfile(a:file)
if empty(data) || type(data) != 3
unl data
let data = []
en
retu data
en
retu []
endf
1 0.000002 fu! ctrlp#utils#mkdir(dir)
if exists('*mkdir') && !isdirectory(a:dir)
sil! cal mkdir(a:dir, 'p')
en
retu a:dir
endf
1 0.000002 fu! ctrlp#utils#writecache(lines, ...)
if isdirectory(ctrlp#utils#mkdir(a:0 ? a:1 : s:cache_dir))
sil! cal writefile(a:lines, a:0 >= 2 ? a:2 : ctrlp#utils#cachefile())
en
endf
1 0.000002 fu! ctrlp#utils#glob(...)
let path = ctrlp#utils#fnesc(a:1, 'g')
retu s:wig_cond ? glob(path, a:2) : glob(path)
endf
1 0.000002 fu! ctrlp#utils#globpath(...)
retu call('globpath', s:wig_cond ? a:000 : a:000[:1])
endf
1 0.000002 fu! ctrlp#utils#fnesc(path, type, ...)
if exists('*fnameescape')
if exists('+ssl')
if a:type == 'c'
let path = escape(a:path, '%#')
elsei a:type == 'f'
let path = fnameescape(a:path)
elsei a:type == 'g'
let path = escape(a:path, '?*')
en
let path = substitute(path, '[', '[[]', 'g')
el
let path = fnameescape(a:path)
en
el
if exists('+ssl')
if a:type == 'c'
let path = escape(a:path, '%#')
elsei a:type == 'f'
let path = escape(a:path, " \t\n%#*?|<\"")
elsei a:type == 'g'
let path = escape(a:path, '?*')
en
let path = substitute(path, '[', '[[]', 'g')
el
let path = escape(a:path, " \t\n*?[{`$\\%#'\"|!<")
en
en
retu a:0 ? escape(path, a:1) : path
endf
"}}}
" vim:fen:fdm=marker:fmr={{{,}}}:fdl=0:fdc=1:ts=2:sw=2:sts=2
SCRIPT /Users/ethanknowlton/.vim/plugged/neoterm/autoload/neoterm/repl.vim
Sourced 1 time
Total time: 0.000076
Self time: 0.000076
count total (s) self (s)
1 0.000006 let g:neoterm.repl = { 'loaded': 0 }
1 0.000002 function! g:neoterm.repl.instance()
if !has_key(l:self, 'instance_id')
if !g:neoterm.has_any()
call neoterm#new({ 'handlers': neoterm#repl#handlers() })
end
call neoterm#repl#term(g:neoterm.last_id)
end
return g:neoterm.instances[l:self.instance_id]
endfunction
1 0.000002 function! neoterm#repl#handlers()
return { 'on_exit': function('s:repl_result_handler') }
endfunction
1 0.000001 function! s:repl_result_handler(...)
let g:neoterm.repl.loaded = 0
endfunction
1 0.000002 function! neoterm#repl#term(id)
if has_key(g:neoterm.instances, a:id)
let g:neoterm.repl.instance_id = a:id
let g:neoterm.repl.loaded = 1
if !empty(get(g:, 'neoterm_repl_command', ''))
\ && g:neoterm_auto_repl_cmd
\ && !g:neoterm_direct_open_repl
call neoterm#exec({
\ 'cmd': [g:neoterm_repl_command, g:neoterm_eof],
\ 'target': g:neoterm.repl.instance().id
\ })
end
else
echoe printf('There is no %s term.', a:id)
end
endfunction
1 0.000002 function! neoterm#repl#set(value)
let g:neoterm_repl_command = a:value
endfunction
1 0.000002 function! neoterm#repl#selection()
let [l:lnum1, l:col1] = getpos("'<")[1:2]
let [l:lnum2, l:col2] = getpos("'>")[1:2]
if &selection ==# 'exclusive'
let l:col2 -= 1
endif
let l:lines = getline(l:lnum1, l:lnum2)
let l:lines[-1] = l:lines[-1][:l:col2 - 1]
let l:lines[0] = l:lines[0][l:col1 - 1:]
call g:neoterm.repl.exec(l:lines)
endfunction
1 0.000003 function! neoterm#repl#line(...)
let l:lines = getline(a:1, a:2)
call g:neoterm.repl.exec(l:lines)
endfunction
1 0.000002 function! neoterm#repl#opfunc(type)
let [l:lnum1, l:col1] = getpos("'[")[1:2]
let [l:lnum2, l:col2] = getpos("']")[1:2]
let l:lines = getline(l:lnum1, l:lnum2)
if a:type ==# 'char'
let l:lines[-1] = l:lines[-1][:l:col2 - 1]
let l:lines[0] = l:lines[0][l:col1 - 1:]
endif
call g:neoterm.repl.exec(l:lines)
endfunction
1 0.000001 function! g:neoterm.repl.exec(command)
call g:neoterm.repl.instance().exec(add(a:command, g:neoterm_eof))
endfunction
SCRIPT /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/ftplugin/php.vim
Sourced 1 time
Total time: 0.001882
Self time: 0.001082
count total (s) self (s)
" Vim filetype plugin file
" Language: php
" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
" Last Changed: 20 Jan 2009
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
1 0.000005 if exists("b:did_ftplugin") | finish | endif
" Make sure the continuation lines below do not cause problems in
" compatibility mode.
1 0.000003 let s:keepcpo= &cpo
1 0.000008 set cpo&vim
" Define some defaults in case the included ftplugins don't set them.
1 0.000002 let s:undo_ftplugin = ""
1 0.000003 let s:browsefilter = "HTML Files (*.html, *.htm)\t*.html;*.htm\n" .
\ "All Files (*.*)\t*.*\n"
1 0.000001 let s:match_words = ""
1 0.001700 0.000901 runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim
1 0.000003 let b:did_ftplugin = 1
" Override our defaults if these were set by an included ftplugin.
1 0.000003 if exists("b:undo_ftplugin")
1 0.000002 let s:undo_ftplugin = b:undo_ftplugin
1 0.000002 endif
1 0.000002 if exists("b:browsefilter")
let s:browsefilter = b:browsefilter
endif
1 0.000002 if exists("b:match_words")
1 0.000002 let s:match_words = b:match_words
1 0.000001 endif
1 0.000002 if exists("b:match_skip")
unlet b:match_skip
endif
" Change the :browse e filter to primarily show PHP-related files.
1 0.000002 if has("gui_win32")
let b:browsefilter="PHP Files (*.php)\t*.php\n" . s:browsefilter
endif
" ###
" Provided by Mikolaj Machowski <mikmach at wp dot pl>
1 0.000004 setlocal include=\\\(require\\\|include\\\)\\\(_once\\\)\\\?
" Disabled changing 'iskeyword', it breaks a command such as "*"
" setlocal iskeyword+=$
1 0.000002 if exists("loaded_matchit")
1 0.000008 let b:match_words = '<?php:?>,\<switch\>:\<endswitch\>,' .
\ '\<if\>:\<elseif\>:\<else\>:\<endif\>,' .
\ '\<while\>:\<endwhile\>,' .
\ '\<do\>:\<while\>,' .
\ '\<for\>:\<endfor\>,' .
\ '\<foreach\>:\<endforeach\>,' .
\ '(:),[:],{:},' .
\ s:match_words
1 0.000001 endif
" ###
1 0.000002 if exists('&omnifunc')
1 0.000002 setlocal omnifunc=phpcomplete#CompletePHP
1 0.000001 endif
" Section jumping: [[ and ]] provided by Antony Scriven <adscriven at gmail dot com>
1 0.000002 let s:function = '\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function'
1 0.000001 let s:class = '\(abstract\s\+\|final\s\+\)*class'
1 0.000001 let s:interface = 'interface'
1 0.000004 let s:section = '\(.*\%#\)\@!\_^\s*\zs\('.s:function.'\|'.s:class.'\|'.s:interface.'\)'
1 0.000025 exe 'nno <buffer> <silent> [[ ?' . escape(s:section, '|') . '?<CR>:nohls<CR>'
1 0.000014 exe 'nno <buffer> <silent> ]] /' . escape(s:section, '|') . '/<CR>:nohls<CR>'
1 0.000014 exe 'ono <buffer> <silent> [[ ?' . escape(s:section, '|') . '?<CR>:nohls<CR>'
1 0.000014 exe 'ono <buffer> <silent> ]] /' . escape(s:section, '|') . '/<CR>:nohls<CR>'
1 0.000003 setlocal commentstring=/*%s*/
" Undo the stuff we changed.
1 0.000004 let b:undo_ftplugin = "setlocal commentstring< include< omnifunc<" .
\ " | unlet! b:browsefilter b:match_words | " .
\ s:undo_ftplugin
" Restore the saved compatibility options.
1 0.000004 let &cpo = s:keepcpo
1 0.000004 unlet s:keepcpo
SCRIPT /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/ftplugin/html.vim
Sourced 1 time
Total time: 0.000787
Self time: 0.000264
count total (s) self (s)
" Vim filetype plugin file
" Language: html
" Maintainer: Dan Sharp <dwsharp at users dot sourceforge dot net>
" Last Changed: 20 Jan 2009
" URL: http://dwsharp.users.sourceforge.net/vim/ftplugin
1 0.000005 if exists("b:did_ftplugin") | finish | endif
1 0.000002 let b:did_ftplugin = 1
" Make sure the continuation lines below do not cause problems in
" compatibility mode.
1 0.000003 let s:save_cpo = &cpo
1 0.000005 set cpo-=C
1 0.000006 setlocal matchpairs+=<:>
1 0.000003 setlocal commentstring=<!--%s-->
1 0.000003 setlocal comments=s:<!--,m:\ \ \ \ ,e:-->
1 0.000003 if exists("g:ft_html_autocomment") && (g:ft_html_autocomment == 1)
setlocal formatoptions-=t formatoptions+=croql
endif
1 0.000002 if exists('&omnifunc')
1 0.000004 setlocal omnifunc=htmlcomplete#CompleteTags
1 0.000704 0.000182 call htmlcomplete#DetectOmniFlavor()
1 0.000001 endif
" HTML: thanks to Johannes Zellner and Benji Fisher.
1 0.000002 if exists("loaded_matchit")
1 0.000001 let b:match_ignorecase = 1
1 0.000005 let b:match_words = '<:>,' .
\ '<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>,' .
\ '<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>,' .
\ '<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>'
1 0.000001 endif
" Change the :browse e filter to primarily show HTML-related files.
1 0.000004 if has("gui_win32")
let b:browsefilter="HTML Files (*.html,*.htm)\t*.htm;*.html\n" .
\ "JavaScript Files (*.js)\t*.js\n" .
\ "Cascading StyleSheets (*.css)\t*.css\n" .
\ "All Files (*.*)\t*.*\n"
endif
" Undo the stuff we changed.
1 0.000004 let b:undo_ftplugin = "setlocal commentstring< matchpairs< omnifunc< comments< formatoptions<" .
\ " | unlet! b:match_ignorecase b:match_skip b:match_words b:browsefilter"
" Restore the saved compatibility options.
1 0.000005 let &cpo = s:save_cpo
1 0.000004 unlet s:save_cpo
SCRIPT /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/autoload/htmlcomplete.vim
Sourced 1 time
Total time: 0.000399
Self time: 0.000399
count total (s) self (s)
" Vim completion script
" Language: HTML and XHTML
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Last Change: 2014 Jun 20
" Distinguish between HTML versions.
" To use with other HTML versions add another "elseif" condition to match
" proper DOCTYPE.
1 0.000003 function! htmlcomplete#DetectOmniFlavor()
if &filetype == 'xhtml'
let b:html_omni_flavor = 'xhtml10s'
else
let b:html_omni_flavor = 'html401t'
endif
let i = 1
let line = ""
while i < 10 && i < line("$")
let line = getline(i)
if line =~ '<!DOCTYPE.*\<DTD '
break
endif
let i += 1
endwhile
if line =~ '<!DOCTYPE.*\<DTD ' " doctype line found above
if line =~ ' HTML 3\.2'
let b:html_omni_flavor = 'html32'
elseif line =~ ' XHTML 1\.1'
let b:html_omni_flavor = 'xhtml11'
else " two-step detection with strict/frameset/transitional
if line =~ ' XHTML 1\.0'
let b:html_omni_flavor = 'xhtml10'
elseif line =~ ' HTML 4\.01'
let b:html_omni_flavor = 'html401'
elseif line =~ ' HTML 4.0\>'
let b:html_omni_flavor = 'html40'
endif
if line =~ '\<Transitional\>'
let b:html_omni_flavor .= 't'
elseif line =~ '\<Frameset\>'
let b:html_omni_flavor .= 'f'
else
let b:html_omni_flavor .= 's'
endif
endif
endif
endfunction
1 0.000002 function! htmlcomplete#CompleteTags(findstart, base)
if a:findstart
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
let curline = line('.')
let compl_begin = col('.') - 2
while start >= 0 && line[start - 1] =~ '\(\k\|[!:.-]\)'
let start -= 1
endwhile
" Handling of entities {{{
if start >= 0 && line[start - 1] =~ '&'
let b:entitiescompl = 1
let b:compl_context = ''
return start
endif
" }}}
" Handling of <style> tag {{{
let stylestart = searchpair('<style\>', '', '<\/style\>', "bnW")
let styleend = searchpair('<style\>', '', '<\/style\>', "nW")
if stylestart != 0 && styleend != 0
if stylestart <= curline && styleend >= curline
let start = col('.') - 1
let b:csscompl = 1
while start >= 0 && line[start - 1] =~ '\(\k\|-\)'
let start -= 1
endwhile
endif
endif
" }}}
" Handling of <script> tag {{{
let scriptstart = searchpair('<script\>', '', '<\/script\>', "bnW")
let scriptend = searchpair('<script\>', '', '<\/script\>', "nW")
if scriptstart != 0 && scriptend != 0
if scriptstart <= curline && scriptend >= curline
let start = col('.') - 1
let b:jscompl = 1
let b:jsrange = [scriptstart, scriptend]
while start >= 0 && line[start - 1] =~ '\k'
let start -= 1
endwhile
" We are inside of <script> tag. But we should also get contents
" of all linked external files and (secondary, less probably) other <script> tags
" This logic could possible be done in separate function - may be
" reused in events scripting (also with option could be reused for
" CSS
let b:js_extfiles = []
let l = line('.')
let c = col('.')
call cursor(1,1)
while search('<\@<=script\>', 'W') && line('.') <= l
if synIDattr(synID(line('.'),col('.')-1,0),"name") !~? 'comment'
let sname = matchstr(getline('.'), '<script[^>]*src\s*=\s*\([''"]\)\zs.\{-}\ze\1')
if filereadable(sname)
let b:js_extfiles += readfile(sname)
endif
endif
endwhile
call cursor(1,1)
let js_scripttags = []
while search('<script\>', 'W') && line('.') < l
if matchstr(getline('.'), '<script[^>]*src') == ''
let js_scripttag = getline(line('.'), search('</script>', 'W'))
let js_scripttags += js_scripttag
endif
endwhile
let b:js_extfiles += js_scripttags
call cursor(l,c)
unlet! l c
endif
endif
" }}}
if !exists("b:csscompl") && !exists("b:jscompl")
let b:compl_context = getline('.')[0:(compl_begin)]
if b:compl_context !~ '<[^>]*$'
" Look like we may have broken tag. Check previous lines.
let i = 1
while 1
let context_line = getline(curline-i)
if context_line =~ '<[^>]*$'
" Yep, this is this line
let context_lines = getline(curline-i, curline-1) + [b:compl_context]
let b:compl_context = join(context_lines, ' ')
break
elseif context_line =~ '>[^<]*$' || i == curline
" We are in normal tag line, no need for completion at all
" OR reached first line without tag at all
let b:compl_context = ''
break
endif
let i += 1
endwhile
" Make sure we don't have counter
unlet! i
endif
let b:compl_context = matchstr(b:compl_context, '.*\zs<.*')
" Return proper start for on-events. Without that beginning of
" completion will be badly reported
if b:compl_context =~? 'on[a-z]*\s*=\s*\(''[^'']*\|"[^"]*\)$'
let start = col('.') - 1
while start >= 0 && line[start - 1] =~ '\k'
let start -= 1
endwhile
endif
" If b:compl_context begins with <? we are inside of PHP code. It
" wasn't closed so PHP completion passed it to HTML
if &filetype =~? 'php' && b:compl_context =~ '^<?'
let b:phpcompl = 1
let start = col('.') - 1
while start >= 0 && line[start - 1] =~ '[a-zA-Z_0-9\x7f-\xff$]'
let start -= 1
endwhile
endif
else
let b:compl_context = getline('.')[0:compl_begin]
endif
return start
else
" Initialize base return lists
let res = []
let res2 = []
" a:base is very short - we need context
let context = b:compl_context
" Check if we should do CSS completion inside of <style> tag
" or JS completion inside of <script> tag or PHP completion in case of <?
" tag AND &ft==php
if exists("b:csscompl")
unlet! b:csscompl
let context = b:compl_context
unlet! b:compl_context
return csscomplete#CompleteCSS(0, context)
elseif exists("b:jscompl")
unlet! b:jscompl
return javascriptcomplete#CompleteJS(0, a:base)
elseif exists("b:phpcompl")
unlet! b:phpcompl
let context = b:compl_context
return phpcomplete#CompletePHP(0, a:base)
else
if len(b:compl_context) == 0 && !exists("b:entitiescompl")
return []
endif
let context = matchstr(b:compl_context, '.\zs.*')
endif
unlet! b:compl_context
" Entities completion {{{
if exists("b:entitiescompl")
unlet! b:entitiescompl
if !exists("b:html_doctype")
call htmlcomplete#CheckDoctype()
endif
if !exists("b:html_omni")
"runtime! autoload/xml/xhtml10s.vim
call htmlcomplete#LoadData()
endif
let entities = b:html_omni['vimxmlentities']
if len(a:base) == 1
for m in entities
if m =~ '^'.a:base
call add(res, m.';')
endif
endfor
return res
else
for m in entities
if m =~? '^'.a:base
call add(res, m.';')
elseif m =~? a:base
call add(res2, m.';')
endif
endfor
return res + res2
endif
endif
" }}}
if context =~ '>'
" Generally if context contains > it means we are outside of tag and
" should abandon action - with one exception: <style> span { bo
if context =~ 'style[^>]\{-}>[^<]\{-}$'
return csscomplete#CompleteCSS(0, context)
elseif context =~ 'script[^>]\{-}>[^<]\{-}$'
let b:jsrange = [line('.'), search('<\/script\>', 'nW')]
return javascriptcomplete#CompleteJS(0, context)
else
return []
endif
endif
" If context contains > it means we are already outside of tag and we
" should abandon action
" If context contains white space it is attribute.
" It can be also value of attribute.
" We have to get first word to offer proper completions
if context == ''
let tag = ''
else
let tag = split(context)[0]
" Detect if tag is uppercase to return in proper case,
" we need to make it lowercase for processing
if tag =~ '^[A-Z]*$'
let uppercase_tag = 1
let tag = tolower(tag)
else
let uppercase_tag = 0
endif
endif
" Get last word, it should be attr name
let attr = matchstr(context, '.*\s\zs.*')
" Possible situations where any prediction would be difficult:
" 1. Events attributes
if context =~ '\s'
" Sort out style, class, and on* cases
if context =~? "\\(on[a-z]*\\|id\\|style\\|class\\)\\s*=\\s*[\"']"
" Id, class completion {{{
if context =~? "\\(id\\|class\\)\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
if context =~? "class\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
let search_for = "class"
elseif context =~? "id\\s*=\\s*[\"'][a-zA-Z0-9_ -]*$"
let search_for = "id"
endif
" Handle class name completion
" 1. Find lines of <link stylesheet>
" 1a. Check file for @import
" 2. Extract filename(s?) of stylesheet,
call cursor(1,1)
let head = getline(search('<head\>'), search('<\/head>'))
let headjoined = join(copy(head), ' ')
if headjoined =~ '<style'
" Remove possibly confusing CSS operators
let stylehead = substitute(headjoined, '+>\*[,', ' ', 'g')
if search_for == 'class'
let styleheadlines = split(stylehead)
let headclasslines = filter(copy(styleheadlines), "v:val =~ '\\([a-zA-Z0-9:]\\+\\)\\?\\.[a-zA-Z0-9_-]\\+'")
else
let stylesheet = split(headjoined, '[{}]')
" Get all lines which fit id syntax
let classlines = filter(copy(stylesheet), "v:val =~ '#[a-zA-Z0-9_-]\\+'")
" Filter out possible color definitions
call filter(classlines, "v:val !~ ':\\s*#[a-zA-Z0-9_-]\\+'")
" Filter out complex border definitions
call filter(classlines, "v:val !~ '\\(none\\|hidden\\|dotted\\|dashed\\|solid\\|double\\|groove\\|ridge\\|inset\\|outset\\)\\s*#[a-zA-Z0-9_-]\\+'")
let templines = join(classlines, ' ')
let headclasslines = split(templines)
call filter(headclasslines, "v:val =~ '#[a-zA-Z0-9_-]\\+'")
endif
let internal = 1
else
let internal = 0
endif
let styletable = []
let secimportfiles = []
let filestable = filter(copy(head), "v:val =~ '\\(@import\\|link.*stylesheet\\)'")
for line in filestable
if line =~ "@import"
let styletable += [matchstr(line, "import\\s\\+\\(url(\\)\\?[\"']\\?\\zs\\f\\+\\ze")]
elseif line =~ "<link"
let styletable += [matchstr(line, "href\\s*=\\s*[\"']\\zs\\f\\+\\ze")]
endif
endfor
for file in styletable
if filereadable(file)
let stylesheet = readfile(file)
let secimport = filter(copy(stylesheet), "v:val =~ '@import'")
if len(secimport) > 0
for line in secimport
let secfile = matchstr(line, "import\\s\\+\\(url(\\)\\?[\"']\\?\\zs\\f\\+\\ze")
let secfile = fnamemodify(file, ":p:h").'/'.secfile
let secimportfiles += [secfile]
endfor
endif
endif
endfor
let cssfiles = styletable + secimportfiles
let classes = []
for file in cssfiles
let classlines = []
if filereadable(file)
let stylesheet = readfile(file)
let stylefile = join(stylesheet, ' ')
let stylefile = substitute(stylefile, '+>\*[,', ' ', 'g')
if search_for == 'class'
let stylesheet = split(stylefile)
let classlines = filter(copy(stylesheet), "v:val =~ '\\([a-zA-Z0-9:]\\+\\)\\?\\.[a-zA-Z0-9_-]\\+'")
else
let stylesheet = split(stylefile, '[{}]')
" Get all lines which fit id syntax
let classlines = filter(copy(stylesheet), "v:val =~ '#[a-zA-Z0-9_-]\\+'")
" Filter out possible color definitions
call filter(classlines, "v:val !~ ':\\s*#[a-zA-Z0-9_-]\\+'")
" Filter out complex border definitions
call filter(classlines, "v:val !~ '\\(none\\|hidden\\|dotted\\|dashed\\|solid\\|double\\|groove\\|ridge\\|inset\\|outset\\)\\s*#[a-zA-Z0-9_-]\\+'")
let templines = join(classlines, ' ')
let stylelines = split(templines)
let classlines = filter(stylelines, "v:val =~ '#[a-zA-Z0-9_-]\\+'")
endif
endif
" We gathered classes definitions from all external files
let classes += classlines
endfor
if internal == 1
let classes += headclasslines
endif
if search_for == 'class'
let elements = {}
for element in classes
if element =~ '^\.'
let class = matchstr(element, '^\.\zs[a-zA-Z][a-zA-Z0-9_-]*\ze')
let class = substitute(class, ':.*', '', '')
if has_key(elements, 'common')
let elements['common'] .= ' '.class
else
let elements['common'] = class
endif
else
let class = matchstr(element, '[a-zA-Z1-6]*\.\zs[a-zA-Z][a-zA-Z0-9_-]*\ze')
let tagname = tolower(matchstr(element, '[a-zA-Z1-6]*\ze.'))
if tagname != ''
if has_key(elements, tagname)
let elements[tagname] .= ' '.class
else
let elements[tagname] = class
endif
endif
endif
endfor
if has_key(elements, tag) && has_key(elements, 'common')
let values = split(elements[tag]." ".elements['common'])
elseif has_key(elements, tag) && !has_key(elements, 'common')
let values = split(elements[tag])
elseif !has_key(elements, tag) && has_key(elements, 'common')
let values = split(elements['common'])
else
return []
endif
elseif search_for == 'id'
" Find used IDs
" 1. Catch whole file
let filelines = getline(1, line('$'))
" 2. Find lines with possible id
let used_id_lines = filter(filelines, 'v:val =~ "id\\s*=\\s*[\"''][a-zA-Z0-9_-]\\+"')
" 3a. Join all filtered lines
let id_string = join(used_id_lines, ' ')
" 3b. And split them to be sure each id is in separate item
let id_list = split(id_string, 'id\s*=\s*')
" 4. Extract id values
let used_id = map(id_list, 'matchstr(v:val, "[\"'']\\zs[a-zA-Z0-9_-]\\+\\ze")')
let joined_used_id = ','.join(used_id, ',').','
let allvalues = map(classes, 'matchstr(v:val, ".*#\\zs[a-zA-Z0-9_-]\\+")')
let values = []
for element in classes
if joined_used_id !~ ','.element.','
let values += [element]
endif
endfor
endif
" We need special version of sbase
let classbase = matchstr(context, ".*[\"']")
let classquote = matchstr(classbase, '.$')
let entered_class = matchstr(attr, ".*=\\s*[\"']\\zs.*")
for m in sort(values)
if m =~? '^'.entered_class
call add(res, m . classquote)
elseif m =~? entered_class
call add(res2, m . classquote)
endif
endfor
return res + res2
elseif context =~? "style\\s*=\\s*[\"'][^\"']*$"
return csscomplete#CompleteCSS(0, context)
endif
" }}}
" Complete on-events {{{
if context =~? 'on[a-z]*\s*=\s*\(''[^'']*\|"[^"]*\)$'
" We have to:
" 1. Find external files
let b:js_extfiles = []
let l = line('.')
let c = col('.')
call cursor(1,1)
while search('<\@<=script\>', 'W') && line('.') <= l
if synIDattr(synID(line('.'),col('.')-1,0),"name") !~? 'comment'
let sname = matchstr(getline('.'), '<script[^>]*src\s*=\s*\([''"]\)\zs.\{-}\ze\1')
if filereadable(sname)
let b:js_extfiles += readfile(sname)
endif
endif
endwhile
" 2. Find at least one <script> tag
call cursor(1,1)
let js_scripttags = []
while search('<script\>', 'W') && line('.') < l
if matchstr(getline('.'), '<script[^>]*src') == ''
let js_scripttag = getline(line('.'), search('</script>', 'W'))
let js_scripttags += js_scripttag
endif
endwhile
let b:js_extfiles += js_scripttags
" 3. Proper call for javascriptcomplete#CompleteJS
call cursor(l,c)
let js_context = matchstr(a:base, '\k\+$')
let js_shortcontext = substitute(a:base, js_context.'$', '', '')
let b:compl_context = context
let b:jsrange = [l, l]
unlet! l c
return javascriptcomplete#CompleteJS(0, js_context)
endif
" }}}
let stripbase = matchstr(context, ".*\\(on[a-zA-Z]*\\|style\\|class\\)\\s*=\\s*[\"']\\zs.*")
" Now we have context stripped from all chars up to style/class.
" It may fail with some strange style value combinations.
if stripbase !~ "[\"']"
return []
endif
endif
" Value of attribute completion {{{
" If attr contains =\s*[\"'] we catched value of attribute
if attr =~ "=\s*[\"']" || attr =~ "=\s*$"
" Let do attribute specific completion
let attrname = matchstr(attr, '.*\ze\s*=')
let entered_value = matchstr(attr, ".*=\\s*[\"']\\?\\zs.*")
let values = []
" Load data {{{
if !exists("b:html_doctype")
call htmlcomplete#CheckDoctype()
endif
if !exists("b:html_omni")
"runtime! autoload/xml/xhtml10s.vim
call htmlcomplete#LoadData()
endif
" }}}
if attrname == 'href'
" Now we are looking for local anchors defined by name or id
if entered_value =~ '^#'
let file = join(getline(1, line('$')), ' ')
" Split it be sure there will be one id/name element in
" item, it will be also first word [a-zA-Z0-9_-] in element
let oneelement = split(file, "\\(meta \\)\\@<!\\(name\\|id\\)\\s*=\\s*[\"']")
for i in oneelement
let values += ['#'.matchstr(i, "^[a-zA-Z][a-zA-Z0-9%_-]*")]
endfor
endif
else
if has_key(b:html_omni, tag) && has_key(b:html_omni[tag][1], attrname)
let values = b:html_omni[tag][1][attrname]
else
return []
endif
endif
if len(values) == 0
return []
endif
" We need special version of sbase
let attrbase = matchstr(context, ".*[\"']")
let attrquote = matchstr(attrbase, '.$')
if attrquote !~ "['\"]"
let attrquoteopen = '"'
let attrquote = '"'
else
let attrquoteopen = ''
endif
for m in values
" This if is needed to not offer all completions as-is
" alphabetically but sort them. Those beginning with entered
" part will be as first choices
if m =~ '^'.entered_value
call add(res, attrquoteopen . m . attrquote)
elseif m =~ entered_value
call add(res2, attrquoteopen . m . attrquote)
endif
endfor
return res + res2
endif
" }}}
" Attribute completion {{{
" Shorten context to not include last word
let sbase = matchstr(context, '.*\ze\s.*')
" Load data {{{
if !exists("b:html_doctype")
call htmlcomplete#CheckDoctype()
endif
if !exists("b:html_omni")
call htmlcomplete#LoadData()
endif
" }}}
if has_key(b:html_omni, tag)
let attrs = keys(b:html_omni[tag][1])
else
return []
endif
for m in sort(attrs)
if m =~ '^'.attr
call add(res, m)
elseif m =~ attr
call add(res2, m)
endif
endfor
let menu = res + res2
if has_key(b:html_omni, 'vimxmlattrinfo')
let final_menu = []
for i in range(len(menu))
let item = menu[i]
if has_key(b:html_omni['vimxmlattrinfo'], item)
let m_menu = b:html_omni['vimxmlattrinfo'][item][0]
let m_info = b:html_omni['vimxmlattrinfo'][item][1]
else
let m_menu = ''
let m_info = ''
endif
if len(b:html_omni[tag][1][item]) > 0 && b:html_omni[tag][1][item][0] =~ '^\(BOOL\|'.item.'\)$'
let item = item
let m_menu = 'Bool'
else
let item .= '="'
endif
let final_menu += [{'word':item, 'menu':m_menu, 'info':m_info}]
endfor
else
let final_menu = []
for i in range(len(menu))
let item = menu[i]
if len(b:html_omni[tag][1][item]) > 0 && b:html_omni[tag][1][item][0] =~ '^\(BOOL\|'.item.'\)$'
let item = item
else
let item .= '="'
endif
let final_menu += [item]
endfor
return final_menu
endif
return final_menu
endif
" }}}
" Close tag {{{
let b:unaryTagsStack = "base meta link hr br param img area input col"
if context =~ '^\/'
if context =~ '^\/.'
return []
else
let opentag = xmlcomplete#GetLastOpenTag("b:unaryTagsStack")
return [opentag.">"]
endif
endif
" }}}
" Load data {{{
if !exists("b:html_doctype")
call htmlcomplete#CheckDoctype()
endif
if !exists("b:html_omni")
"runtime! autoload/xml/xhtml10s.vim
call htmlcomplete#LoadData()
endif
" }}}
" Tag completion {{{
" Deal with tag completion.
let opentag = tolower(xmlcomplete#GetLastOpenTag("b:unaryTagsStack"))
" MM: TODO: GLOT works always the same but with some weird situation it
" behaves as intended in HTML but screws in PHP
if opentag == '' || &filetype == 'php' && !has_key(b:html_omni, opentag)
" Hack for sometimes failing GetLastOpenTag.
" As far as I tested fail isn't GLOT fault but problem
" of invalid document - not properly closed tags and other mish-mash.
" Also when document is empty. Return list of *all* tags.
let tags = keys(b:html_omni)
call filter(tags, 'v:val !~ "^vimxml"')
else
if has_key(b:html_omni, opentag)
let tags = b:html_omni[opentag][0]
else
return []
endif
endif
" }}}
if exists("uppercase_tag") && uppercase_tag == 1
let context = tolower(context)
endif
" Handle XML keywords: DOCTYPE
if opentag == ''
let tags += [
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
\ '!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/1999/xhtml">'
\ ]
endif
for m in sort(tags)
if m =~ '^'.context
call add(res, m)
elseif m =~ context
call add(res2, m)
endif
endfor
let menu = res + res2
if has_key(b:html_omni, 'vimxmltaginfo')
let final_menu = []
for i in range(len(menu))
let item = menu[i]
if has_key(b:html_omni['vimxmltaginfo'], item)
let m_menu = b:html_omni['vimxmltaginfo'][item][0]
let m_info = b:html_omni['vimxmltaginfo'][item][1]
else
let m_menu = ''
let m_info = ''
endif
if &filetype == 'html' && exists("uppercase_tag") && uppercase_tag == 1 && item !~ 'DOCTYPE'
let item = toupper(item)
endif
if item =~ 'DOCTYPE'
let abbr = 'DOCTYPE '.matchstr(item, 'DTD \zsX\?HTML .\{-}\ze\/\/')
else
let abbr = item
endif
let final_menu += [{'abbr':abbr, 'word':item, 'menu':m_menu, 'info':m_info}]
endfor
else
let final_menu = menu
endif
return final_menu
" }}}
endif
endfunction
1 0.000002 function! htmlcomplete#LoadData() " {{{
if !exists("b:html_omni_flavor")
if &filetype == 'html'
let b:html_omni_flavor = 'html401t'
else
let b:html_omni_flavor = 'xhtml10s'
endif
endif
" With that if we still have bloated memory but create new buffer
" variables only by linking to existing g:variable, not sourcing whole
" file.
if exists('g:xmldata_'.b:html_omni_flavor)
exe 'let b:html_omni = g:xmldata_'.b:html_omni_flavor
else
exe 'runtime! autoload/xml/'.b:html_omni_flavor.'.vim'
exe 'let b:html_omni = g:xmldata_'.b:html_omni_flavor
endif
endfunction
" }}}
1 0.000001 function! htmlcomplete#CheckDoctype() " {{{
if exists('b:html_omni_flavor')
let old_flavor = b:html_omni_flavor
else
let old_flavor = ''
endif
let i = 1
while i < 10 && i < line("$")
let line = getline(i)
if line =~ '<!DOCTYPE.*\<DTD HTML 3\.2'
let b:html_omni_flavor = 'html32'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.0 Transitional'
let b:html_omni_flavor = 'html40t'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.0 Frameset'
let b:html_omni_flavor = 'html40f'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.0'
let b:html_omni_flavor = 'html40s'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.01 Transitional'
let b:html_omni_flavor = 'html401t'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.01 Frameset'
let b:html_omni_flavor = 'html401f'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE.*\<DTD HTML 4\.01'
let b:html_omni_flavor = 'html401s'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE.*\<DTD XHTML 1\.0 Transitional'
let b:html_omni_flavor = 'xhtml10t'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE.*\<DTD XHTML 1\.0 Frameset'
let b:html_omni_flavor = 'xhtml10f'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE.*\<DTD XHTML 1\.0 Strict'
let b:html_omni_flavor = 'xhtml10s'
let b:html_doctype = 1
break
elseif line =~ '<!DOCTYPE.*\<DTD XHTML 1\.1'
let b:html_omni_flavor = 'xhtml11'
let b:html_doctype = 1
break
endif
let i += 1
endwhile
if !exists("b:html_doctype")
return
else
" Tie g:xmldata with b:html_omni this way we need to sourca data file only
" once, not every time per buffer.
if old_flavor == b:html_omni_flavor
return
else
if exists('g:xmldata_'.b:html_omni_flavor)
exe 'let b:html_omni = g:xmldata_'.b:html_omni_flavor
else
exe 'runtime! autoload/xml/'.b:html_omni_flavor.'.vim'
exe 'let b:html_omni = g:xmldata_'.b:html_omni_flavor
endif
return
endif
endif
endfunction
" }}}
" vim:set foldmethod=marker:
SCRIPT /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/indent/php.vim
Sourced 1 time
Total time: 0.000593
Self time: 0.000558
count total (s) self (s)
" Vim indent file
" Language: PHP
" Author: John Wellesz <John.wellesz (AT) teaser (DOT) fr>
" URL: http://www.2072productions.com/vim/indent/php.vim
" Home: https://github.com/2072/PHP-Indenting-for-VIm
" Last Change: 2017 Jun 13
" Version: 1.62
"
"
" Type :help php-indent for available options
"
" A fully commented version of this file is available on github
"
"
" If you find a bug, please open a ticket on github.org
" ( https://github.com/2072/PHP-Indenting-for-VIm/issues ) with an example of
" code that breaks the algorithm.
"
" NOTE: This script must be used with PHP syntax ON and with the php syntax
" script by Lutz Eymers (http://www.isp.de/data/php.vim ) or with the
" script by Peter Hodge (http://www.vim.org/scripts/script.php?script_id=1571 )
" the later is bunbdled by default with Vim 7.
"
"
" In the case you have syntax errors in your script such as HereDoc end
" identifiers not at col 1 you'll have to indent your file 2 times (This
" script will automatically put HereDoc end identifiers at col 1 if
" they are followed by a ';').
"
" NOTE: If you are editing files in Unix file format and that (by accident)
" there are '\r' before new lines, this script won't be able to proceed
" correctly and will make many mistakes because it won't be able to match
" '\s*$' correctly.
" So you have to remove those useless characters first with a command like:
"
" :%s /\r$//g
"
" or simply 'let' the option PHP_removeCRwhenUnix to 1 and the script will
" silently remove them when VIM load this script (at each bufread).
1 0.000004 if exists("b:did_indent")
finish
endif
1 0.000002 let b:did_indent = 1
1 0.000003 let g:php_sync_method = 0
1 0.000002 if exists("PHP_default_indenting")
let b:PHP_default_indenting = PHP_default_indenting * shiftwidth()
else
1 0.000001 let b:PHP_default_indenting = 0
1 0.000001 endif
1 0.000002 if exists("PHP_outdentSLComments")
let b:PHP_outdentSLComments = PHP_outdentSLComments * shiftwidth()
else
1 0.000001 let b:PHP_outdentSLComments = 0
1 0.000001 endif
1 0.000002 if exists("PHP_BracesAtCodeLevel")
let b:PHP_BracesAtCodeLevel = PHP_BracesAtCodeLevel
else
1 0.000001 let b:PHP_BracesAtCodeLevel = 0
1 0.000000 endif
1 0.000002 if exists("PHP_autoformatcomment")
let b:PHP_autoformatcomment = PHP_autoformatcomment
else
1 0.000001 let b:PHP_autoformatcomment = 1
1 0.000000 endif
1 0.000002 if exists("PHP_outdentphpescape")
let b:PHP_outdentphpescape = PHP_outdentphpescape
else
1 0.000001 let b:PHP_outdentphpescape = 1
1 0.000000 endif
1 0.000002 if exists("PHP_vintage_case_default_indent") && PHP_vintage_case_default_indent
let b:PHP_vintage_case_default_indent = 1
else
1 0.000001 let b:PHP_vintage_case_default_indent = 0
1 0.000000 endif
1 0.000001 let b:PHP_lastindented = 0
1 0.000002 let b:PHP_indentbeforelast = 0
1 0.000001 let b:PHP_indentinghuge = 0
1 0.000002 let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
1 0.000001 let b:PHP_LastIndentedWasComment = 0
1 0.000001 let b:PHP_InsideMultilineComment = 0
1 0.000002 let b:InPHPcode = 0
1 0.000001 let b:InPHPcode_checked = 0
1 0.000001 let b:InPHPcode_and_script = 0
1 0.000001 let b:InPHPcode_tofind = ""
1 0.000001 let b:PHP_oldchangetick = b:changedtick
1 0.000001 let b:UserIsTypingComment = 0
1 0.000001 let b:optionsset = 0
1 0.000004 setlocal nosmartindent
1 0.000004 setlocal noautoindent
1 0.000002 setlocal nocindent
1 0.000006 setlocal nolisp
1 0.000003 setlocal indentexpr=GetPhpIndent()
1 0.000003 setlocal indentkeys=0{,0},0),0],:,!^F,o,O,e,*<Return>,=?>,=<?,=*/
1 0.000001 let s:searchpairflags = 'bWr'
1 0.000003 if &fileformat == "unix" && exists("PHP_removeCRwhenUnix") && PHP_removeCRwhenUnix
silent! %s/\r$//g
endif
1 0.000002 if exists("*GetPhpIndent")
call ResetPhpOptions()
finish
endif
1 0.000002 let s:PHP_validVariable = '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
1 0.000002 let s:notPhpHereDoc = '\%(break\|return\|continue\|exit\|die\|else\)'
1 0.000005 let s:blockstart = '\%(\%(\%(}\s*\)\=else\%(\s\+\)\=\)\=if\>\|\%(}\s*\)\?else\>\|do\>\|while\>\|switch\>\|case\>\|default\>\|for\%(each\)\=\>\|declare\>\|class\>\|trait\>\|use\>\|interface\>\|abstract\>\|final\>\|try\>\|\%(}\s*\)\=catch\>\|\%(}\s*\)\=finally\>\)'
1 0.000003 let s:functionDecl = '\<function\>\%(\s\+'.s:PHP_validVariable.'\)\=\s*(.*'
1 0.000001 let s:endline = '\s*\%(//.*\|#.*\|/\*.*\*/\s*\)\=$'
1 0.000004 let s:unstated = '\%(^\s*'.s:blockstart.'.*)\|\%(//.*\)\@<!\<e'.'lse\>\)'.s:endline
1 0.000004 let s:terminated = '\%(\%(;\%(\s*\%(?>\|}\)\)\=\|<<<\s*[''"]\=\a\w*[''"]\=$\|^\s*}\|^\s*'.s:PHP_validVariable.':\)'.s:endline.'\)'
1 0.000002 let s:PHP_startindenttag = '<?\%(.*?>\)\@!\|<script[^>]*>\%(.*<\/script>\)\@!'
1 0.000005 let s:structureHead = '^\s*\%(' . s:blockstart . '\)\|'. s:functionDecl . s:endline . '\|\<new\s\+class\>'
1 0.000001 let s:escapeDebugStops = 0
1 0.000002 function! DebugPrintReturn(scriptLine)
if ! s:escapeDebugStops
echo "debug:" . a:scriptLine
let c = getchar()
if c == "\<Del>"
let s:escapeDebugStops = 1
end
endif
endfunction
1 0.000001 function! GetLastRealCodeLNum(startline) " {{{
let lnum = a:startline
if b:GetLastRealCodeLNum_ADD && b:GetLastRealCodeLNum_ADD == lnum + 1
let lnum = b:GetLastRealCodeLNum_ADD
endif
while lnum > 1
let lnum = prevnonblank(lnum)
let lastline = getline(lnum)
if b:InPHPcode_and_script && lastline =~ '?>\s*$'
let lnum = lnum - 1
elseif lastline =~ '^\s*?>.*<?\%(php\)\=\s*$'
let lnum = lnum - 1
elseif lastline =~ '^\s*\%(//\|#\|/\*.*\*/\s*$\)'
let lnum = lnum - 1
elseif lastline =~ '\*/\s*$'
call cursor(lnum, 1)
if lastline !~ '^\*/'
call search('\*/', 'W')
endif
let lnum = searchpair('/\*', '', '\*/', s:searchpairflags, 'Skippmatch2()')
let lastline = getline(lnum)
if lastline =~ '^\s*/\*'
let lnum = lnum - 1
else
break
endif
elseif lastline =~? '\%(//\s*\|?>.*\)\@<!<?\%(php\)\=\s*$\|^\s*<script\>'
while lastline !~ '\(<?.*\)\@<!?>' && lnum > 1
let lnum = lnum - 1
let lastline = getline(lnum)
endwhile
if lastline =~ '^\s*?>'
let lnum = lnum - 1
else
break
endif
elseif lastline =~? '^\a\w*;\=$' && lastline !~? s:notPhpHereDoc
let tofind=substitute( lastline, '\(\a\w*\);\=', '<<<\\s*[''"]\\=\1[''"]\\=$', '')
while getline(lnum) !~? tofind && lnum > 1
let lnum = lnum - 1
endwhile
elseif lastline =~ '^[^''"`]*[''"`][;,]'.s:endline
let tofind=substitute( lastline, '^.*\([''"`]\)[;,].*$', '^[^\1]\\+[\1]$\\|^[^\1]\\+[=([]\\s*[\1]', '')
let trylnum = lnum
while getline(trylnum) !~? tofind && trylnum > 1
let trylnum = trylnum - 1
endwhile
if trylnum == 1
break
else
if lastline =~ ';'.s:endline
while getline(trylnum) !~? s:terminated && getline(trylnum) !~? '{'.s:endline && trylnum > 1
let trylnum = prevnonblank(trylnum - 1)
endwhile
if trylnum == 1
break
end
end
let lnum = trylnum
end
else
break
endif
endwhile
if lnum==1 && getline(lnum) !~ '<?'
let lnum=0
endif
if b:InPHPcode_and_script && 1 > b:InPHPcode
let b:InPHPcode_and_script = 0
endif
return lnum
endfunction " }}}
1 0.000001 function! Skippmatch2()
let line = getline(".")
if line =~ "\\([\"']\\).*/\\*.*\\1" || line =~ '\%(//\|#\).*/\*'
return 1
else
return 0
endif
endfun
1 0.000001 function! Skippmatch() " {{{
let synname = synIDattr(synID(line("."), col("."), 0), "name")
if synname == "Delimiter" || synname == "phpRegionDelimiter" || synname =~# "^phpParent" || synname == "phpArrayParens" || synname =~# '^php\%(Block\|Brace\)' || synname == "javaScriptBraces" || synname =~# '^php\%(Doc\)\?Comment' && b:UserIsTypingComment
return 0
else
return 1
endif
endfun " }}}
1 0.000001 function! FindOpenBracket(lnum, blockStarter) " {{{
call cursor(a:lnum, 1)
let line = searchpair('{', '', '}', 'bW', 'Skippmatch()')
if a:blockStarter == 1
while line > 1
let linec = getline(line)
if linec =~ s:terminated || linec =~ s:structureHead
break
endif
let line = GetLastRealCodeLNum(line - 1)
endwhile
endif
return line
endfun " }}}
1 0.000004 let s:blockChars = {'{':1, '[': 1, '(': 1, ')':-1, ']':-1, '}':-1}
1 0.000001 function! BalanceDirection (str)
let balance = 0
for c in split(a:str, '\zs')
if has_key(s:blockChars, c)
let balance += s:blockChars[c]
endif
endfor
return balance
endfun
1 0.000001 function! FindTheIfOfAnElse (lnum, StopAfterFirstPrevElse) " {{{
if getline(a:lnum) =~# '^\s*}\s*else\%(if\)\=\>'
let beforeelse = a:lnum
else
let beforeelse = GetLastRealCodeLNum(a:lnum - 1)
endif
if !s:level
let s:iftoskip = 0
endif
if getline(beforeelse) =~# '^\s*\%(}\s*\)\=else\%(\s*if\)\@!\>'
let s:iftoskip = s:iftoskip + 1
endif
if getline(beforeelse) =~ '^\s*}'
let beforeelse = FindOpenBracket(beforeelse, 0)
if getline(beforeelse) =~ '^\s*{'
let beforeelse = GetLastRealCodeLNum(beforeelse - 1)
endif
endif
if !s:iftoskip && a:StopAfterFirstPrevElse && getline(beforeelse) =~# '^\s*\%([}]\s*\)\=else\%(if\)\=\>'
return beforeelse
endif
if getline(beforeelse) !~# '^\s*if\>' && beforeelse>1 || s:iftoskip && beforeelse>1
if s:iftoskip && getline(beforeelse) =~# '^\s*if\>'
let s:iftoskip = s:iftoskip - 1
endif
let s:level = s:level + 1
let beforeelse = FindTheIfOfAnElse(beforeelse, a:StopAfterFirstPrevElse)
endif
return beforeelse
endfunction " }}}
1 0.000002 let s:defaultORcase = '^\s*\%(default\|case\).*:'
1 0.000001 function! FindTheSwitchIndent (lnum) " {{{
let test = GetLastRealCodeLNum(a:lnum - 1)
if test <= 1
return indent(1) - shiftwidth() * b:PHP_vintage_case_default_indent
end
while getline(test) =~ '^\s*}' && test > 1
let test = GetLastRealCodeLNum(FindOpenBracket(test, 0) - 1)
if getline(test) =~ '^\s*switch\>'
let test = GetLastRealCodeLNum(test - 1)
endif
endwhile
if getline(test) =~# '^\s*switch\>'
return indent(test)
elseif getline(test) =~# s:defaultORcase
return indent(test) - shiftwidth() * b:PHP_vintage_case_default_indent
else
return FindTheSwitchIndent(test)
endif
endfunction "}}}
1 0.000005 let s:SynPHPMatchGroups = {'phpParent':1, 'Delimiter':1, 'Define':1, 'Storageclass':1, 'StorageClass':1, 'Structure':1, 'Exception':1}
1 0.000001 function! IslinePHP (lnum, tofind) " {{{
let cline = getline(a:lnum)
if a:tofind==""
let tofind = "^\\s*[\"'`]*\\s*\\zs\\S"
else
let tofind = a:tofind
endif
let tofind = tofind . '\c'
let coltotest = match (cline, tofind) + 1
let synname = synIDattr(synID(a:lnum, coltotest, 0), "name")
if synname == 'phpStringSingle' || synname == 'phpStringDouble' || synname == 'phpBacktick'
if cline !~ '^\s*[''"`]'
return "SpecStringEntrails"
else
return synname
end
end
if get(s:SynPHPMatchGroups, synname) || synname =~ '^php' || synname =~? '^javaScript'
return synname
else
return ""
endif
endfunction " }}}
1 0.000002 let s:autoresetoptions = 0
1 0.000001 if ! s:autoresetoptions
1 0.000001 let s:autoresetoptions = 1
1 0.000001 endif
1 0.000001 function! ResetPhpOptions()
if ! b:optionsset && &filetype =~ "php"
if b:PHP_autoformatcomment
setlocal comments=s1:/*,mb:*,ex:*/,://,:#
setlocal formatoptions-=t
setlocal formatoptions+=q
setlocal formatoptions+=r
setlocal formatoptions+=o
setlocal formatoptions+=c
setlocal formatoptions+=b
endif
let b:optionsset = 1
endif
endfunc
1 0.000041 0.000006 call ResetPhpOptions()
1 0.000001 function! GetPhpIndent()
let b:GetLastRealCodeLNum_ADD = 0
let UserIsEditing=0
if b:PHP_oldchangetick != b:changedtick
let b:PHP_oldchangetick = b:changedtick
let UserIsEditing=1
endif
if b:PHP_default_indenting
let b:PHP_default_indenting = g:PHP_default_indenting * shiftwidth()
endif
let cline = getline(v:lnum)
if !b:PHP_indentinghuge && b:PHP_lastindented > b:PHP_indentbeforelast
if b:PHP_indentbeforelast
let b:PHP_indentinghuge = 1
endif
let b:PHP_indentbeforelast = b:PHP_lastindented
endif
if b:InPHPcode_checked && prevnonblank(v:lnum - 1) != b:PHP_lastindented
if b:PHP_indentinghuge
let b:PHP_indentinghuge = 0
let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
endif
let real_PHP_lastindented = v:lnum
let b:PHP_LastIndentedWasComment=0
let b:PHP_InsideMultilineComment=0
let b:PHP_indentbeforelast = 0
let b:InPHPcode = 0
let b:InPHPcode_checked = 0
let b:InPHPcode_and_script = 0
let b:InPHPcode_tofind = ""
elseif v:lnum > b:PHP_lastindented
let real_PHP_lastindented = b:PHP_lastindented
else
let real_PHP_lastindented = v:lnum
endif
let b:PHP_lastindented = v:lnum
if !b:InPHPcode_checked " {{{ One time check
let b:InPHPcode_checked = 1
let b:UserIsTypingComment = 0
let synname = ""
if cline !~ '<?.*?>'
let synname = IslinePHP (prevnonblank(v:lnum), "")
endif
if synname!=""
if synname == "SpecStringEntrails"
let b:InPHPcode = -1 " thumb down
let b:InPHPcode_tofind = ""
elseif synname != "phpHereDoc" && synname != "phpHereDocDelimiter"
let b:InPHPcode = 1
let b:InPHPcode_tofind = ""
if synname =~# '^php\%(Doc\)\?Comment'
let b:UserIsTypingComment = 1
let b:InPHPcode_checked = 0
endif
if synname =~? '^javaScript'
let b:InPHPcode_and_script = 1
endif
else
let b:InPHPcode = 0
let lnum = v:lnum - 1
while getline(lnum) !~? '<<<\s*[''"]\=\a\w*[''"]\=$' && lnum > 1
let lnum = lnum - 1
endwhile
let b:InPHPcode_tofind = substitute( getline(lnum), '^.*<<<\s*[''"]\=\(\a\w*\)[''"]\=$', '^\\s*\1;\\=$', '')
endif
else
let b:InPHPcode = 0
let b:InPHPcode_tofind = s:PHP_startindenttag
endif
endif "!b:InPHPcode_checked }}}
" Test if we are indenting PHP code {{{
let lnum = prevnonblank(v:lnum - 1)
let last_line = getline(lnum)
let endline= s:endline
if b:InPHPcode_tofind!=""
if cline =~? b:InPHPcode_tofind
let b:InPHPcode_tofind = ""
let b:UserIsTypingComment = 0
if b:InPHPcode == -1
let b:InPHPcode = 1
return -1
end
let b:InPHPcode = 1
if cline =~ '\*/'
call cursor(v:lnum, 1)
if cline !~ '^\*/'
call search('\*/', 'W')
endif
let lnum = searchpair('/\*', '', '\*/', s:searchpairflags, 'Skippmatch2()')
let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
let b:PHP_LastIndentedWasComment = 0
if cline =~ '^\s*\*/'
return indent(lnum) + 1
else
return indent(lnum)
endif
elseif cline =~? '<script\>'
let b:InPHPcode_and_script = 1
let b:GetLastRealCodeLNum_ADD = v:lnum
endif
endif
endif
if 1 == b:InPHPcode
if !b:InPHPcode_and_script && last_line =~ '\%(<?.*\)\@<!?>\%(.*<?\)\@!' && IslinePHP(lnum, '?>')=~"Delimiter"
if cline !~? s:PHP_startindenttag
let b:InPHPcode = 0
let b:InPHPcode_tofind = s:PHP_startindenttag
elseif cline =~? '<script\>'
let b:InPHPcode_and_script = 1
endif
elseif last_line =~ '^[^''"`]\+[''"`]$' " a string identifier with nothing after it and no other string identifier before
let b:InPHPcode = -1
let b:InPHPcode_tofind = substitute( last_line, '^.*\([''"`]\).*$', '^[^\1]*\1[;,]$', '')
elseif last_line =~? '<<<\s*[''"]\=\a\w*[''"]\=$'
let b:InPHPcode = 0
let b:InPHPcode_tofind = substitute( last_line, '^.*<<<\s*[''"]\=\(\a\w*\)[''"]\=$', '^\\s*\1;\\=$', '')
elseif !UserIsEditing && cline =~ '^\s*/\*\%(.*\*/\)\@!' && getline(v:lnum + 1) !~ '^\s*\*'
let b:InPHPcode = 0
let b:InPHPcode_tofind = '\*/'
elseif cline =~? '^\s*</script>'
let b:InPHPcode = 0
let b:InPHPcode_tofind = s:PHP_startindenttag
endif
endif " }}}
if 1 > b:InPHPcode && !b:InPHPcode_and_script
return -1
endif
" Indent successive // or # comment the same way the first is {{{
let addSpecial = 0
if cline =~ '^\s*\%(//\|#\|/\*.*\*/\s*$\)'
let addSpecial = b:PHP_outdentSLComments
if b:PHP_LastIndentedWasComment == 1
return indent(real_PHP_lastindented)
endif
let b:PHP_LastIndentedWasComment = 1
else
let b:PHP_LastIndentedWasComment = 0
endif " }}}
" Indent multiline /* comments correctly {{{
if b:PHP_InsideMultilineComment || b:UserIsTypingComment
if cline =~ '^\s*\*\%(\/\)\@!'
if last_line =~ '^\s*/\*'
return indent(lnum) + 1
else
return indent(lnum)
endif
else
let b:PHP_InsideMultilineComment = 0
endif
endif
if !b:PHP_InsideMultilineComment && cline =~ '^\s*/\*\%(.*\*/\)\@!'
if getline(v:lnum + 1) !~ '^\s*\*'
return -1
endif
let b:PHP_InsideMultilineComment = 1
endif " }}}
" Things always indented at col 1 (PHP delimiter: <?, ?>, Heredoc end) {{{
if cline =~# '^\s*<?' && cline !~ '?>' && b:PHP_outdentphpescape
return 0
endif
if cline =~ '^\s*?>' && cline !~# '<?' && b:PHP_outdentphpescape
return 0
endif
if cline =~? '^\s*\a\w*;$\|^\a\w*$\|^\s*[''"`][;,]' && cline !~? s:notPhpHereDoc
return 0
endif " }}}
let s:level = 0
let lnum = GetLastRealCodeLNum(v:lnum - 1)
let last_line = getline(lnum)
let ind = indent(lnum)
if ind==0 && b:PHP_default_indenting
let ind = b:PHP_default_indenting
endif
if lnum == 0
return b:PHP_default_indenting + addSpecial
endif
if cline =~ '^\s*}\%(}}\)\@!'
let ind = indent(FindOpenBracket(v:lnum, 1))
let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
return ind
endif
if cline =~ '^\s*\*/'
call cursor(v:lnum, 1)
if cline !~ '^\*/'
call search('\*/', 'W')
endif
let lnum = searchpair('/\*', '', '\*/', s:searchpairflags, 'Skippmatch2()')
let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
if cline =~ '^\s*\*/'
return indent(lnum) + 1
else
return indent(lnum)
endif
endif
if last_line =~ '[;}]'.endline && last_line !~ '^[)\]]' && last_line !~# s:defaultORcase
if ind==b:PHP_default_indenting
return b:PHP_default_indenting + addSpecial
elseif b:PHP_indentinghuge && ind==b:PHP_CurrentIndentLevel && cline !~# '^\s*\%(else\|\%(case\|default\).*:\|[})];\=\)' && last_line !~# '^\s*\%(\%(}\s*\)\=else\)' && getline(GetLastRealCodeLNum(lnum - 1))=~';'.endline
return b:PHP_CurrentIndentLevel + addSpecial
endif
endif
let LastLineClosed = 0
let terminated = s:terminated
let unstated = s:unstated
if ind != b:PHP_default_indenting && cline =~# '^\s*else\%(if\)\=\>'
let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
return indent(FindTheIfOfAnElse(v:lnum, 1))
elseif cline =~# s:defaultORcase
return FindTheSwitchIndent(v:lnum) + shiftwidth() * b:PHP_vintage_case_default_indent
elseif cline =~ '^\s*)\=\s*{'
let previous_line = last_line
let last_line_num = lnum
while last_line_num > 1
if previous_line =~ terminated || previous_line =~ s:structureHead
let ind = indent(last_line_num)
if b:PHP_BracesAtCodeLevel
let ind = ind + shiftwidth()
endif
return ind
endif
let last_line_num = GetLastRealCodeLNum(last_line_num - 1)
let previous_line = getline(last_line_num)
endwhile
elseif last_line =~# unstated && cline !~ '^\s*);\='.endline
let ind = ind + shiftwidth() " we indent one level further when the preceding line is not stated
return ind + addSpecial
elseif (ind != b:PHP_default_indenting || last_line =~ '^[)\]]' ) && last_line =~ terminated
let previous_line = last_line
let last_line_num = lnum
let LastLineClosed = 1
let isSingleLineBlock = 0
while 1
if ! isSingleLineBlock && previous_line =~ '^\s*}\|;\s*}'.endline " XXX
call cursor(last_line_num, 1)
if previous_line !~ '^}'
call search('}\|;\s*}'.endline, 'W')
end
let oldLastLine = last_line_num
let last_line_num = searchpair('{', '', '}', 'bW', 'Skippmatch()')
if getline(last_line_num) =~ '^\s*{'
let last_line_num = GetLastRealCodeLNum(last_line_num - 1)
elseif oldLastLine == last_line_num
let isSingleLineBlock = 1
continue
endif
let previous_line = getline(last_line_num)
continue
else
let isSingleLineBlock = 0
if getline(last_line_num) =~# '^\s*else\%(if\)\=\>'
let last_line_num = FindTheIfOfAnElse(last_line_num, 0)
continue
endif
let last_match = last_line_num
let one_ahead_indent = indent(last_line_num)
let last_line_num = GetLastRealCodeLNum(last_line_num - 1)
let two_ahead_indent = indent(last_line_num)
let after_previous_line = previous_line
let previous_line = getline(last_line_num)
if previous_line =~# s:defaultORcase.'\|{'.endline
break
endif
if after_previous_line=~# '^\s*'.s:blockstart.'.*)'.endline && previous_line =~# '[;}]'.endline
break
endif
if one_ahead_indent == two_ahead_indent || last_line_num < 1
if previous_line =~# '\%(;\|^\s*}\)'.endline || last_line_num < 1
break
endif
endif
endif
endwhile
if indent(last_match) != ind
let ind = indent(last_match)
let b:PHP_CurrentIndentLevel = b:PHP_default_indenting
return ind + addSpecial
endif
endif
if (last_line !~ '^\s*}\%(}}\)\@!')
let plinnum = GetLastRealCodeLNum(lnum - 1)
else
let plinnum = GetLastRealCodeLNum(FindOpenBracket(lnum, 1) - 1)
endif
let AntepenultimateLine = getline(plinnum)
let last_line = substitute(last_line,"\\(//\\|#\\)\\(\\(\\([^\"']*\\([\"']\\)[^\"']*\\5\\)\\+[^\"']*$\\)\\|\\([^\"']*$\\)\\)",'','')
if ind == b:PHP_default_indenting
if last_line =~ terminated && last_line !~# s:defaultORcase
let LastLineClosed = 1
endif
endif
if !LastLineClosed
if last_line =~# '[{(\[]'.endline || last_line =~? '\h\w*\s*(.*,$' && AntepenultimateLine !~ '[,(\[]'.endline && BalanceDirection(last_line) > 0
let dontIndent = 0
if last_line =~ '\S\+\s*{'.endline && last_line !~ '^\s*[)\]]\+\s*{'.endline && last_line !~ s:structureHead
let dontIndent = 1
endif
if !dontIndent && (!b:PHP_BracesAtCodeLevel || last_line !~# '^\s*{')
let ind = ind + shiftwidth()
endif
if b:PHP_BracesAtCodeLevel || b:PHP_vintage_case_default_indent == 1
let b:PHP_CurrentIndentLevel = ind
return ind + addSpecial
endif
elseif last_line =~ '\S\+\s*),'.endline && BalanceDirection(last_line) < 0
call cursor(lnum, 1)
call search('),'.endline, 'W') " line never begins with ) so no need for 'c' flag
let openedparent = searchpair('(', '', ')', 'bW', 'Skippmatch()')
if openedparent != lnum
let ind = indent(openedparent)
endif
elseif last_line =~ '^\s*'.s:blockstart
let ind = ind + shiftwidth()
elseif AntepenultimateLine =~ '{'.endline && AntepenultimateLine !~? '^\s*use\>' || AntepenultimateLine =~ terminated || AntepenultimateLine =~# s:defaultORcase
let ind = ind + shiftwidth()
endif
endif
if cline =~ '^\s*[)\]];\='
let ind = ind - shiftwidth()
endif
let b:PHP_CurrentIndentLevel = ind
return ind + addSpecial
endfunction
SCRIPT /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/syntax/php.vim
Sourced 1 time
Total time: 0.016853
Self time: 0.003694
count total (s) self (s)
" Vim syntax file
" Language: php PHP 3/4/5/7
" Maintainer: Jason Woofenden <jason@jasonwoof.com>
" Last Change: Jul 14, 2017
" URL: https://jasonwoof.com/gitweb/?p=vim-syntax.git;a=blob;f=php.vim;hb=HEAD
" Former Maintainers: Peter Hodge <toomuchphp-vim@yahoo.com>
" Debian VIM Maintainers <pkg-vim-maintainers@lists.alioth.debian.org>
"
" Note: If you are using a colour terminal with dark background, you will
" probably find the 'elflord' colorscheme is much better for PHP's syntax
" than the default colourscheme, because elflord's colours will better
" highlight the break-points (Statements) in your code.
"
" Options:
" Set to anything to enable:
" php_sql_query SQL syntax highlighting inside strings
" php_htmlInStrings HTML syntax highlighting inside strings
" php_baselib highlighting baselib functions
" php_asp_tags highlighting ASP-style short tags
" php_parent_error_close highlighting parent error ] or )
" php_parent_error_open skipping an php end tag, if there exists
" an open ( or [ without a closing one
" php_oldStyle use old colorstyle
" php_noShortTags don't sync <? ?> as php
" Set to a specific value:
" php_folding = 1 fold classes and functions
" php_folding = 2 fold all { } regions
" php_sync_method = x where x is an integer:
" -1 sync by search ( default )
" >0 sync at least x lines backwards
" 0 sync from start
" Set to 0 to _disable_: (Added by Peter Hodge On June 9, 2006)
" php_special_functions = 0 highlight functions with abnormal behaviour
" php_alt_comparisons = 0 comparison operators in an alternate colour
" php_alt_assignByReference = 0 '= &' in an alternate colour
"
"
" Note:
" Setting php_folding=1 will match a closing } by comparing the indent
" before the class or function keyword with the indent of a matching }.
" Setting php_folding=2 will match all of pairs of {,} ( see known
" bugs ii )
" Known Bugs:
" - setting php_parent_error_close on and php_parent_error_open off
" has these two leaks:
" i) A closing ) or ] inside a string match to the last open ( or [
" before the string, when the the closing ) or ] is on the same line
" where the string started. In this case a following ) or ] after
" the string would be highlighted as an error, what is incorrect.
" ii) Same problem if you are setting php_folding = 2 with a closing
" } inside an string on the first line of this string.
" quit when a syntax file was already loaded
1 0.000004 if exists("b:current_syntax")
finish
endif
1 0.000002 if !exists("main_syntax")
1 0.000002 let main_syntax = 'php'
1 0.000001 endif
1 0.012755 0.000220 runtime! syntax/html.vim
1 0.000002 unlet b:current_syntax
" accept old options
1 0.000003 if !exists("php_sync_method")
if exists("php_minlines")
let php_sync_method=php_minlines
else
let php_sync_method=-1
endif
endif
1 0.000003 if exists("php_parentError") && !exists("php_parent_error_open") && !exists("php_parent_error_close")
let php_parent_error_close=1
let php_parent_error_open=1
endif
1 0.000011 syn cluster htmlPreproc add=phpRegion,phpRegionAsp,phpRegionSc
1 0.000823 0.000199 syn include @sqlTop syntax/sql.vim
1 0.000003 syn sync clear
1 0.000002 unlet b:current_syntax
1 0.000004 syn cluster sqlTop remove=sqlString,sqlComment
1 0.000003 if exists( "php_sql_query")
syn cluster phpAddStrings contains=@sqlTop
endif
1 0.000002 if exists( "php_htmlInStrings")
syn cluster phpAddStrings add=@htmlTop
endif
" make sure we can use \ at the beginning of the line to do a continuation
1 0.000003 let s:cpo_save = &cpo
1 0.000004 set cpo&vim
1 0.000001 syn case match
" Env Variables
1 0.000014 syn keyword phpEnvVar GATEWAY_INTERFACE SERVER_NAME SERVER_SOFTWARE SERVER_PROTOCOL REQUEST_METHOD QUERY_STRING DOCUMENT_ROOT HTTP_ACCEPT HTTP_ACCEPT_CHARSET HTTP_ENCODING HTTP_ACCEPT_LANGUAGE HTTP_CONNECTION HTTP_HOST HTTP_REFERER HTTP_USER_AGENT REMOTE_ADDR REMOTE_PORT SCRIPT_FILENAME SERVER_ADMIN SERVER_PORT SERVER_SIGNATURE PATH_TRANSLATED SCRIPT_NAME REQUEST_URI contained
" Internal Variables
1 0.000007 syn keyword phpIntVar GLOBALS PHP_ERRMSG PHP_SELF HTTP_GET_VARS HTTP_POST_VARS HTTP_COOKIE_VARS HTTP_POST_FILES HTTP_ENV_VARS HTTP_SERVER_VARS HTTP_SESSION_VARS HTTP_RAW_POST_DATA HTTP_STATE_VARS _GET _POST _COOKIE _FILES _SERVER _ENV _SERVER _REQUEST _SESSION contained
" Constants
1 0.000006 syn keyword phpCoreConstant PHP_VERSION PHP_OS DEFAULT_INCLUDE_PATH PEAR_INSTALL_DIR PEAR_EXTENSION_DIR PHP_EXTENSION_DIR PHP_BINDIR PHP_LIBDIR PHP_DATADIR PHP_SYSCONFDIR PHP_LOCALSTATEDIR PHP_CONFIG_FILE_PATH PHP_OUTPUT_HANDLER_START PHP_OUTPUT_HANDLER_CONT PHP_OUTPUT_HANDLER_END contained
" Predefined constants
" Generated by: curl -q http://php.net/manual/en/errorfunc.constants.php | grep -oP 'E_\w+' | sort -u
1 0.000004 syn keyword phpCoreConstant E_ALL E_COMPILE_ERROR E_COMPILE_WARNING E_CORE_ERROR E_CORE_WARNING E_DEPRECATED E_ERROR E_NOTICE E_PARSE E_RECOVERABLE_ERROR E_STRICT E_USER_DEPRECATED E_USER_ERROR E_USER_NOTICE E_USER_WARNING E_WARNING contained
1 0.000001 syn case ignore
1 0.000009 syn keyword phpConstant __LINE__ __FILE__ __FUNCTION__ __METHOD__ __CLASS__ __DIR__ __NAMESPACE__ __TRAIT__ contained
" Function and Methods ripped from php_manual_de.tar.gz Jan 2003
1 0.000012 syn keyword phpFunctions apache_child_terminate apache_get_modules apache_get_version apache_getenv apache_lookup_uri apache_note apache_request_headers apache_response_headers apache_setenv ascii2ebcdic ebcdic2ascii getallheaders virtual contained
1 0.000033 syn keyword phpFunctions array_change_key_case array_chunk array_column array_combine array_count_values array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_diff array_fill_keys array_fill array_filter array_flip array_intersect_assoc array_intersect_key array_intersect_uassoc array_intersect_ukey array_intersect array_key_exists array_keys array_map array_merge_recursive array_merge array_multisort array_pad array_pop array_product array_push array_rand array_reduce array_replace_recursive array_replace array_reverse array_search array_shift array_slice array_splice array_sum array_udiff_assoc array_udiff_uassoc array_udiff array_uintersect_assoc array_uintersect_uassoc array_uintersect array_unique array_unshift array_values array_walk_recursive array_walk arsort asort count current each end in_array key_exists key krsort ksort natcasesort natsort next pos prev range reset rsort shuffle sizeof sort uasort uksort usort contained
1 0.000003 syn keyword phpFunctions aspell_check aspell_new aspell_suggest contained
1 0.000004 syn keyword phpFunctions bcadd bccomp bcdiv bcmod bcmul bcpow bcpowmod bcscale bcsqrt bcsub contained
1 0.000004 syn keyword phpFunctions bzclose bzcompress bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite contained
1 0.000009 syn keyword phpFunctions cal_days_in_month cal_from_jd cal_info cal_to_jd easter_date easter_days frenchtojd gregoriantojd jddayofweek jdmonthname jdtofrench jdtogregorian jdtojewish jdtojulian jdtounix jewishtojd juliantojd unixtojd contained
1 0.000006 syn keyword phpFunctions ccvs_add ccvs_auth ccvs_command ccvs_count ccvs_delete ccvs_done ccvs_init ccvs_lookup ccvs_new ccvs_report ccvs_return ccvs_reverse ccvs_sale ccvs_status ccvs_textvalue ccvs_void contained
1 0.000008 syn keyword phpFunctions call_user_method_array call_user_method class_exists get_class_methods get_class_vars get_class get_declared_classes get_object_vars get_parent_class is_a is_subclass_of method_exists contained
1 0.000010 syn keyword phpFunctions com VARIANT com_addref com_get com_invoke com_isenum com_load_typelib com_load com_propget com_propput com_propset com_release com_set contained
1 0.000028 syn keyword phpFunctions cpdf_add_annotation cpdf_add_outline cpdf_arc cpdf_begin_text cpdf_circle cpdf_clip cpdf_close cpdf_closepath_fill_stroke cpdf_closepath_stroke cpdf_closepath cpdf_continue_text cpdf_curveto cpdf_end_text cpdf_fill_stroke cpdf_fill cpdf_finalize_page cpdf_finalize cpdf_global_set_document_limits cpdf_import_jpeg cpdf_lineto cpdf_moveto cpdf_newpath cpdf_open cpdf_output_buffer cpdf_page_init cpdf_place_inline_image cpdf_rect cpdf_restore cpdf_rlineto cpdf_rmoveto cpdf_rotate_text cpdf_rotate cpdf_save_to_file cpdf_save cpdf_scale cpdf_set_action_url cpdf_set_char_spacing cpdf_set_creator cpdf_set_current_page cpdf_set_font_directories cpdf_set_font_map_file cpdf_set_font cpdf_set_horiz_scaling cpdf_set_keywords cpdf_set_leading cpdf_set_page_animation cpdf_set_subject cpdf_set_text_matrix cpdf_set_text_pos cpdf_set_text_rendering cpdf_set_text_rise cpdf_set_title cpdf_set_viewer_preferences cpdf_set_word_spacing cpdf_setdash cpdf_setflat cpdf_setgray_fill cpdf_setgray_stroke cpdf_setg 1 0.000005 syn keyword phpFunctions crack_check crack_closedict crack_getlastmessage crack_opendict contained
1 0.000004 syn keyword phpFunctions ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_graph ctype_lower ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit contained
1 0.000006 syn keyword phpFunctions curl_close curl_errno curl_error curl_exec curl_getinfo curl_init curl_multi_add_handle curl_multi_close curl_multi_exec curl_multi_getcontent curl_multi_info_read curl_multi_init curl_multi_remove_handle curl_multi_select curl_setopt curl_version contained
1 0.000003 syn keyword phpFunctions cybercash_base64_decode cybercash_base64_encode cybercash_decr cybercash_encr contained
1 0.000003 syn keyword phpFunctions cyrus_authenticate cyrus_bind cyrus_close cyrus_connect cyrus_query cyrus_unbind contained
1 0.000007 syn keyword phpFunctions checkdate date getdate gettimeofday gmdate gmmktime gmstrftime localtime microtime mktime strftime strtotime time contained
1 0.000006 syn keyword phpFunctions dba_close dba_delete dba_exists dba_fetch dba_firstkey dba_handlers dba_insert dba_key_split dba_list dba_nextkey dba_open dba_optimize dba_popen dba_replace dba_sync contained
1 0.000005 syn keyword phpFunctions dbase_add_record dbase_close dbase_create dbase_delete_record dbase_get_header_info dbase_get_record_with_names dbase_get_record dbase_numfields dbase_numrecords dbase_open dbase_pack dbase_replace_record contained
1 0.000004 syn keyword phpFunctions dblist dbmclose dbmdelete dbmexists dbmfetch dbmfirstkey dbminsert dbmnextkey dbmopen dbmreplace contained
1 0.000017 syn keyword phpFunctions dbplus_add dbplus_aql dbplus_chdir dbplus_close dbplus_curr dbplus_errcode dbplus_errno dbplus_find dbplus_first dbplus_flush dbplus_freealllocks dbplus_freelock dbplus_freerlocks dbplus_getlock dbplus_getunique dbplus_info dbplus_last dbplus_lockrel dbplus_next dbplus_open dbplus_prev dbplus_rchperm dbplus_rcreate dbplus_rcrtexact dbplus_rcrtlike dbplus_resolve dbplus_restorepos dbplus_rkeys dbplus_ropen dbplus_rquery dbplus_rrename dbplus_rsecindex dbplus_runlink dbplus_rzap dbplus_savepos dbplus_setindex dbplus_setindexbynumber dbplus_sql dbplus_tcl dbplus_tremove dbplus_undo dbplus_undoprepare dbplus_unlockrel dbplus_unselect dbplus_update dbplus_xlockrel dbplus_xunlockrel contained
1 0.000004 syn keyword phpFunctions dbx_close dbx_compare dbx_connect dbx_error dbx_escape_string dbx_fetch_row dbx_query dbx_sort contained
1 0.000004 syn keyword phpFunctions dio_close dio_fcntl dio_open dio_read dio_seek dio_stat dio_tcsetattr dio_truncate dio_write contained
1 0.000004 syn keyword phpFunctions chdir chroot dir closedir getcwd opendir readdir rewinddir scandir contained
1 0.000011 syn keyword phpFunctions domxml_new_doc domxml_open_file domxml_open_mem domxml_version domxml_xmltree domxml_xslt_stylesheet_doc domxml_xslt_stylesheet_file domxml_xslt_stylesheet xpath_eval_expression xpath_eval xpath_new_context xptr_eval xptr_new_context contained
1 0.000026 syn keyword phpMethods name specified value create_attribute create_cdata_section create_comment create_element_ns create_element create_entity_reference create_processing_instruction create_text_node doctype document_element dump_file dump_mem get_element_by_id get_elements_by_tagname html_dump_mem xinclude entities internal_subset name notations public_id system_id get_attribute_node get_attribute get_elements_by_tagname has_attribute remove_attribute set_attribute tagname add_namespace append_child append_sibling attributes child_nodes clone_node dump_node first_child get_content has_attributes has_child_nodes insert_before is_blank_node last_child next_sibling node_name node_type node_value owner_document parent_node prefix previous_sibling remove_child replace_child replace_node set_content set_name set_namespace unlink_node data target process result_dump_file result_dump_mem contained
1 0.000002 syn keyword phpFunctions dotnet_load contained
1 0.000004 syn keyword phpFunctions debug_backtrace debug_print_backtrace error_log error_reporting restore_error_handler set_error_handler trigger_error user_error contained
1 0.000004 syn keyword phpFunctions escapeshellarg escapeshellcmd exec passthru proc_close proc_get_status proc_nice proc_open proc_terminate shell_exec system contained
1 0.000005 syn keyword phpFunctions fam_cancel_monitor fam_close fam_monitor_collection fam_monitor_directory fam_monitor_file fam_next_event fam_open fam_pending fam_resume_monitor fam_suspend_monitor contained
1 0.000023 syn keyword phpFunctions fbsql_affected_rows fbsql_autocommit fbsql_change_user fbsql_close fbsql_commit fbsql_connect fbsql_create_blob fbsql_create_clob fbsql_create_db fbsql_data_seek fbsql_database_password fbsql_database fbsql_db_query fbsql_db_status fbsql_drop_db fbsql_errno fbsql_error fbsql_fetch_array fbsql_fetch_assoc fbsql_fetch_field fbsql_fetch_lengths fbsql_fetch_object fbsql_fetch_row fbsql_field_flags fbsql_field_len fbsql_field_name fbsql_field_seek fbsql_field_table fbsql_field_type fbsql_free_result fbsql_get_autostart_info fbsql_hostname fbsql_insert_id fbsql_list_dbs fbsql_list_fields fbsql_list_tables fbsql_next_result fbsql_num_fields fbsql_num_rows fbsql_password fbsql_pconnect fbsql_query fbsql_read_blob fbsql_read_clob fbsql_result fbsql_rollback fbsql_select_db fbsql_set_lob_mode fbsql_set_transaction fbsql_start_db fbsql_stop_db fbsql_tablename fbsql_username fbsql_warnings contained
1 0.000012 syn keyword phpFunctions fdf_add_doc_javascript fdf_add_template fdf_close fdf_create fdf_enum_values fdf_errno fdf_error fdf_get_ap fdf_get_attachment fdf_get_encoding fdf_get_file fdf_get_flags fdf_get_opt fdf_get_status fdf_get_value fdf_get_version fdf_header fdf_next_field_name fdf_open_string fdf_open fdf_remove_item fdf_save_string fdf_save fdf_set_ap fdf_set_encoding fdf_set_file fdf_set_flags fdf_set_javascript_action fdf_set_opt fdf_set_status fdf_set_submit_form_action fdf_set_target_frame fdf_set_value fdf_set_version contained
1 0.000004 syn keyword phpFunctions filepro_fieldcount filepro_fieldname filepro_fieldtype filepro_fieldwidth filepro_retrieve filepro_rowcount filepro contained
1 0.000022 syn keyword phpFunctions basename chgrp chmod chown clearstatcache copy delete dirname disk_free_space disk_total_space diskfreespace fclose feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents file fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype flock fnmatch fopen fpassthru fputs fread fscanf fseek fstat ftell ftruncate fwrite glob is_dir is_executable is_file is_link is_readable is_uploaded_file is_writable is_writeable link linkinfo lstat mkdir move_uploaded_file parse_ini_file pathinfo pclose popen readfile readlink realpath rename rewind rmdir set_file_buffer stat symlink tempnam tmpfile touch umask unlink contained
1 0.000004 syn keyword phpFunctions fribidi_log2vis contained
1 0.000013 syn keyword phpFunctions ftp_alloc ftp_cdup ftp_chdir ftp_chmod ftp_close ftp_connect ftp_delete ftp_exec ftp_fget ftp_fput ftp_get_option ftp_get ftp_login ftp_mdtm ftp_mkdir ftp_nb_continue ftp_nb_fget ftp_nb_fput ftp_nb_get ftp_nb_put ftp_nlist ftp_pasv ftp_put ftp_pwd ftp_quit ftp_raw ftp_rawlist ftp_rename ftp_rmdir ftp_set_option ftp_site ftp_size ftp_ssl_connect ftp_systype contained
1 0.000005 syn keyword phpFunctions call_user_func_array call_user_func create_function func_get_arg func_get_args func_num_args function_exists get_defined_functions register_shutdown_function register_tick_function unregister_tick_function contained
1 0.000007 syn keyword phpFunctions bind_textdomain_codeset bindtextdomain dcgettext dcngettext dgettext dngettext gettext ngettext textdomain contained
1 0.000090 syn keyword phpFunctions gmp_abs gmp_add gmp_and gmp_clrbit gmp_cmp gmp_com gmp_div_q gmp_div_qr gmp_div_r gmp_div gmp_divexact gmp_fact gmp_gcd gmp_gcdext gmp_hamdist gmp_init gmp_intval gmp_invert gmp_jacobi gmp_legendre gmp_mod gmp_mul gmp_neg gmp_or gmp_perfect_square gmp_popcount gmp_pow gmp_powm gmp_prob_prime gmp_random gmp_scan0 gmp_scan1 gmp_setbit gmp_sign gmp_sqrt gmp_sqrtrem gmp_sqrtrm gmp_strval gmp_sub gmp_xor contained
1 0.000003 syn keyword phpFunctions header headers_list headers_sent setcookie contained
1 0.000003 syn keyword phpFunctions hw_api_attribute hwapi_hgcsp hw_api_content hw_api_object contained
1 0.000017 syn keyword phpMethods key langdepvalue value values checkin checkout children mimetype read content copy dbstat dcstat dstanchors dstofsrcanchors count reason find ftstat hwstat identify info insert insertanchor insertcollection insertdocument link lock move assign attreditable count insert remove title value object objectbyanchor parents description type remove replace setcommitedversion srcanchors srcsofdst unlock user userlist contained
1 0.000022 syn keyword phpFunctions hw_Array2Objrec hw_changeobject hw_Children hw_ChildrenObj hw_Close hw_Connect hw_connection_info hw_cp hw_Deleteobject hw_DocByAnchor hw_DocByAnchorObj hw_Document_Attributes hw_Document_BodyTag hw_Document_Content hw_Document_SetContent hw_Document_Size hw_dummy hw_EditText hw_Error hw_ErrorMsg hw_Free_Document hw_GetAnchors hw_GetAnchorsObj hw_GetAndLock hw_GetChildColl hw_GetChildCollObj hw_GetChildDocColl hw_GetChildDocCollObj hw_GetObject hw_GetObjectByQuery hw_GetObjectByQueryColl hw_GetObjectByQueryCollObj hw_GetObjectByQueryObj hw_GetParents hw_GetParentsObj hw_getrellink hw_GetRemote hw_getremotechildren hw_GetSrcByDestObj hw_GetText hw_getusername hw_Identify hw_InCollections hw_Info hw_InsColl hw_InsDoc hw_insertanchors hw_InsertDocument hw_InsertObject hw_mapid hw_Modifyobject hw_mv hw_New_Document hw_objrec2array hw_Output_Document hw_pConnect hw_PipeDocument hw_Root hw_setlinkroot hw_stat hw_Unlock hw_Who contained
1 0.000014 syn keyword phpFunctions ibase_add_user ibase_affected_rows ibase_blob_add ibase_blob_cancel ibase_blob_close ibase_blob_create ibase_blob_echo ibase_blob_get ibase_blob_import ibase_blob_info ibase_blob_open ibase_close ibase_commit_ret ibase_commit ibase_connect ibase_delete_user ibase_drop_db ibase_errcode ibase_errmsg ibase_execute ibase_fetch_assoc ibase_fetch_object ibase_fetch_row ibase_field_info ibase_free_event_handler ibase_free_query ibase_free_result ibase_gen_id ibase_modify_user ibase_name_result ibase_num_fields ibase_num_params ibase_param_info ibase_pconnect ibase_prepare ibase_query ibase_rollback_ret ibase_rollback ibase_set_event_handler ibase_timefmt ibase_trans ibase_wait_event contained
1 0.000007 syn keyword phpFunctions iconv_get_encoding iconv_mime_decode_headers iconv_mime_decode iconv_mime_encode iconv_set_encoding iconv_strlen iconv_strpos iconv_strrpos iconv_substr iconv ob_iconv_handler contained
1 0.000017 syn keyword phpFunctions ifx_affected_rows ifx_blobinfile_mode ifx_byteasvarchar ifx_close ifx_connect ifx_copy_blob ifx_create_blob ifx_create_char ifx_do ifx_error ifx_errormsg ifx_fetch_row ifx_fieldproperties ifx_fieldtypes ifx_free_blob ifx_free_char ifx_free_result ifx_get_blob ifx_get_char ifx_getsqlca ifx_htmltbl_result ifx_nullformat ifx_num_fields ifx_num_rows ifx_pconnect ifx_prepare ifx_query ifx_textasvarchar ifx_update_blob ifx_update_char ifxus_close_slob ifxus_create_slob ifxus_free_slob ifxus_open_slob ifxus_read_slob ifxus_seek_slob ifxus_tell_slob ifxus_write_slob contained
1 0.000035 syn keyword phpFunctions exif_imagetype exif_read_data exif_thumbnail gd_info getimagesize image_type_to_mime_type image2wbmp imagealphablending imageantialias imagearc imagechar imagecharup imagecolorallocate imagecolorallocatealpha imagecolorat imagecolorclosest imagecolorclosestalpha imagecolorclosesthwb imagecolordeallocate imagecolorexact imagecolorexactalpha imagecolormatch imagecolorresolve imagecolorresolvealpha imagecolorset imagecolorsforindex imagecolorstotal imagecolortransparent imagecopy imagecopymerge imagecopymergegray imagecopyresampled imagecopyresized imagecreate imagecreatefromgd2 imagecreatefromgd2part imagecreatefromgd imagecreatefromgif imagecreatefromjpeg imagecreatefrompng imagecreatefromstring imagecreatefromwbmp imagecreatefromxbm imagecreatefromxpm imagecreatetruecolor imagedashedline imagedestroy imageellipse imagefill imagefilledarc imagefilledellipse imagefilledpolygon imagefilledrectangle imagefilltoborder imagefontheight imagefontwidth imageftbbox imagefttext imagegammacorrect 1 0.000022 syn keyword phpFunctions imap_8bit imap_alerts imap_append imap_base64 imap_binary imap_body imap_bodystruct imap_check imap_clearflag_full imap_close imap_createmailbox imap_delete imap_deletemailbox imap_errors imap_expunge imap_fetch_overview imap_fetchbody imap_fetchheader imap_fetchstructure imap_get_quota imap_get_quotaroot imap_getacl imap_getmailboxes imap_getsubscribed imap_header imap_headerinfo imap_headers imap_last_error imap_list imap_listmailbox imap_listscan imap_listsubscribed imap_lsub imap_mail_compose imap_mail_copy imap_mail_move imap_mail imap_mailboxmsginfo imap_mime_header_decode imap_msgno imap_num_msg imap_num_recent imap_open imap_ping imap_qprint imap_renamemailbox imap_reopen imap_rfc822_parse_adrlist imap_rfc822_parse_headers imap_rfc822_write_address imap_scanmailbox imap_search imap_set_quota imap_setacl imap_setflag_full imap_sort imap_status imap_subscribe imap_thread imap_timeout imap_uid imap_undelete imap_unsubscribe imap_utf7_decode imap_utf7_encode imap_utf8 contained
1 0.000017 syn keyword phpFunctions assert_options assert dl extension_loaded get_cfg_var get_current_user get_defined_constants get_extension_funcs get_include_path get_included_files get_loaded_extensions get_magic_quotes_gpc get_magic_quotes_runtime get_required_files getenv getlastmod getmygid getmyinode getmypid getmyuid getopt getrusage ini_alter ini_get_all ini_get ini_restore ini_set main memory_get_usage php_ini_scanned_files php_logo_guid php_sapi_name php_uname phpcredits phpinfo phpversion putenv restore_include_path set_include_path set_magic_quotes_runtime set_time_limit version_compare zend_logo_guid zend_version contained
1 0.000007 syn keyword phpFunctions ingres_autocommit ingres_close ingres_commit ingres_connect ingres_fetch_array ingres_fetch_object ingres_fetch_row ingres_field_length ingres_field_name ingres_field_nullable ingres_field_precision ingres_field_scale ingres_field_type ingres_num_fields ingres_num_rows ingres_pconnect ingres_query ingres_rollback contained
1 0.000008 syn keyword phpFunctions ircg_channel_mode ircg_disconnect ircg_fetch_error_msg ircg_get_username ircg_html_encode ircg_ignore_add ircg_ignore_del ircg_is_conn_alive ircg_join ircg_kick ircg_lookup_format_messages ircg_msg ircg_nick ircg_nickname_escape ircg_nickname_unescape ircg_notice ircg_part ircg_pconnect ircg_register_format_messages ircg_set_current ircg_set_file ircg_set_on_die ircg_topic ircg_whois contained
1 0.000002 syn keyword phpFunctions java_last_exception_clear java_last_exception_get contained
1 0.000007 syn keyword phpFunctions json_decode json_encode json_last_error contained
1 0.000013 syn keyword phpFunctions ldap_8859_to_t61 ldap_add ldap_bind ldap_close ldap_compare ldap_connect ldap_count_entries ldap_delete ldap_dn2ufn ldap_err2str ldap_errno ldap_error ldap_explode_dn ldap_first_attribute ldap_first_entry ldap_first_reference ldap_free_result ldap_get_attributes ldap_get_dn ldap_get_entries ldap_get_option ldap_get_values_len ldap_get_values ldap_list ldap_mod_add ldap_mod_del ldap_mod_replace ldap_modify ldap_next_attribute ldap_next_entry ldap_next_reference ldap_parse_reference ldap_parse_result ldap_read ldap_rename ldap_search ldap_set_option ldap_set_rebind_proc ldap_sort ldap_start_tls ldap_t61_to_8859 ldap_unbind contained
1 0.000002 syn keyword phpFunctions lzf_compress lzf_decompress lzf_optimized_for contained
1 0.000002 syn keyword phpFunctions ezmlm_hash mail contained
1 0.000009 syn keyword phpFunctions mailparse_determine_best_xfer_encoding mailparse_msg_create mailparse_msg_extract_part_file mailparse_msg_extract_part mailparse_msg_free mailparse_msg_get_part_data mailparse_msg_get_part mailparse_msg_get_structure mailparse_msg_parse_file mailparse_msg_parse mailparse_rfc822_parse_addresses mailparse_stream_encode mailparse_uudecode_all contained
1 0.000015 syn keyword phpFunctions abs acos acosh asin asinh atan2 atan atanh base_convert bindec ceil cos cosh decbin dechex decoct deg2rad exp expm1 floor fmod getrandmax hexdec hypot is_finite is_infinite is_nan lcg_value log10 log1p log max min mt_getrandmax mt_rand mt_srand octdec pi pow rad2deg rand round sin sinh sqrt srand tan tanh contained
1 0.000018 syn keyword phpFunctions mb_convert_case mb_convert_encoding mb_convert_kana mb_convert_variables mb_decode_mimeheader mb_decode_numericentity mb_detect_encoding mb_detect_order mb_encode_mimeheader mb_encode_numericentity mb_ereg_match mb_ereg_replace mb_ereg_search_getpos mb_ereg_search_getregs mb_ereg_search_init mb_ereg_search_pos mb_ereg_search_regs mb_ereg_search_setpos mb_ereg_search mb_ereg mb_eregi_replace mb_eregi mb_get_info mb_http_input mb_http_output mb_internal_encoding mb_language mb_output_handler mb_parse_str mb_preferred_mime_name mb_regex_encoding mb_regex_set_options mb_send_mail mb_split mb_strcut mb_strimwidth mb_strlen mb_strpos mb_strrpos mb_strtolower mb_strtoupper mb_strwidth mb_substitute_character mb_substr_count mb_substr contained
1 0.000015 syn keyword phpFunctions mcal_append_event mcal_close mcal_create_calendar mcal_date_compare mcal_date_valid mcal_day_of_week mcal_day_of_year mcal_days_in_month mcal_delete_calendar mcal_delete_event mcal_event_add_attribute mcal_event_init mcal_event_set_alarm mcal_event_set_category mcal_event_set_class mcal_event_set_description mcal_event_set_end mcal_event_set_recur_daily mcal_event_set_recur_monthly_mday mcal_event_set_recur_monthly_wday mcal_event_set_recur_none mcal_event_set_recur_weekly mcal_event_set_recur_yearly mcal_event_set_start mcal_event_set_title mcal_expunge mcal_fetch_current_stream_event mcal_fetch_event mcal_is_leap_year mcal_list_alarms mcal_list_events mcal_next_recurrence mcal_open mcal_popen mcal_rename_calendar mcal_reopen mcal_snooze mcal_store_event mcal_time_valid mcal_week_of_year contained
1 0.000021 syn keyword phpFunctions mcrypt_cbc mcrypt_cfb mcrypt_create_iv mcrypt_decrypt mcrypt_ecb mcrypt_enc_get_algorithms_name mcrypt_enc_get_block_size mcrypt_enc_get_iv_size mcrypt_enc_get_key_size mcrypt_enc_get_modes_name mcrypt_enc_get_supported_key_sizes mcrypt_enc_is_block_algorithm_mode mcrypt_enc_is_block_algorithm mcrypt_enc_is_block_mode mcrypt_enc_self_test mcrypt_encrypt mcrypt_generic_deinit mcrypt_generic_end mcrypt_generic_init mcrypt_generic mcrypt_get_block_size mcrypt_get_cipher_name mcrypt_get_iv_size mcrypt_get_key_size mcrypt_list_algorithms mcrypt_list_modes mcrypt_module_close mcrypt_module_get_algo_block_size mcrypt_module_get_algo_key_size mcrypt_module_get_supported_key_sizes mcrypt_module_is_block_algorithm_mode mcrypt_module_is_block_algorithm mcrypt_module_is_block_mode mcrypt_module_open mcrypt_module_self_test mcrypt_ofb mdecrypt_generic contained
1 0.000026 syn keyword phpFunctions mcve_adduser mcve_adduserarg mcve_bt mcve_checkstatus mcve_chkpwd mcve_chngpwd mcve_completeauthorizations mcve_connect mcve_connectionerror mcve_deleteresponse mcve_deletetrans mcve_deleteusersetup mcve_deluser mcve_destroyconn mcve_destroyengine mcve_disableuser mcve_edituser mcve_enableuser mcve_force mcve_getcell mcve_getcellbynum mcve_getcommadelimited mcve_getheader mcve_getuserarg mcve_getuserparam mcve_gft mcve_gl mcve_gut mcve_initconn mcve_initengine mcve_initusersetup mcve_iscommadelimited mcve_liststats mcve_listusers mcve_maxconntimeout mcve_monitor mcve_numcolumns mcve_numrows mcve_override mcve_parsecommadelimited mcve_ping mcve_preauth mcve_preauthcompletion mcve_qc mcve_responseparam mcve_return mcve_returncode mcve_returnstatus mcve_sale mcve_setblocking mcve_setdropfile mcve_setip mcve_setssl_files mcve_setssl mcve_settimeout mcve_settle mcve_text_avs mcve_text_code mcve_text_cv mcve_transactionauth mcve_transactionavs mcve_transactionbatch mcve_transactioncv mcve_t 1 0.000003 syn keyword phpFunctions mhash_count mhash_get_block_size mhash_get_hash_name mhash_keygen_s2k mhash contained
1 0.000002 syn keyword phpFunctions mime_content_type contained
1 0.000007 syn keyword phpFunctions ming_setcubicthreshold ming_setscale ming_useswfversion SWFAction SWFBitmap swfbutton_keypress SWFbutton SWFDisplayItem SWFFill SWFFont SWFGradient SWFMorph SWFMovie SWFShape SWFSprite SWFText SWFTextField contained
1 0.000025 syn keyword phpMethods getHeight getWidth addAction addShape setAction setdown setHit setOver setUp addColor move moveTo multColor remove Rotate rotateTo scale scaleTo setDepth setName setRatio skewX skewXTo skewY skewYTo moveTo rotateTo scaleTo skewXTo skewYTo getwidth addEntry getshape1 getshape2 add nextframe output remove save setbackground setdimension setframes setrate streammp3 addFill drawCurve drawCurveTo drawLine drawLineTo movePen movePenTo setLeftFill setLine setRightFill add nextframe remove setframes addString getWidth moveTo setColor setFont setHeight setSpacing addstring align setbounds setcolor setFont setHeight setindentation setLeftMargin setLineSpacing setMargins setname setrightMargin contained
1 0.000009 syn keyword phpFunctions connection_aborted connection_status connection_timeout constant define defined die eval exit get_browser highlight_file highlight_string ignore_user_abort pack show_source sleep uniqid unpack usleep contained
1 0.000008 syn keyword phpFunctions udm_add_search_limit udm_alloc_agent udm_api_version udm_cat_list udm_cat_path udm_check_charset udm_check_stored udm_clear_search_limits udm_close_stored udm_crc32 udm_errno udm_error udm_find udm_free_agent udm_free_ispell_data udm_free_res udm_get_doc_count udm_get_res_field udm_get_res_param udm_load_ispell_data udm_open_stored udm_set_agent_param contained
1 0.000010 syn keyword phpFunctions msession_connect msession_count msession_create msession_destroy msession_disconnect msession_find msession_get_array msession_get msession_getdata msession_inc msession_list msession_listvar msession_lock msession_plugin msession_randstr msession_set_array msession_set msession_setdata msession_timeout msession_uniq msession_unlock contained
1 0.000012 syn keyword phpFunctions msql_affected_rows msql_close msql_connect msql_create_db msql_createdb msql_data_seek msql_dbname msql_drop_db msql_dropdb msql_error msql_fetch_array msql_fetch_field msql_fetch_object msql_fetch_row msql_field_seek msql_fieldflags msql_fieldlen msql_fieldname msql_fieldtable msql_fieldtype msql_free_result msql_freeresult msql_list_dbs msql_list_fields msql_list_tables msql_listdbs msql_listfields msql_listtables msql_num_fields msql_num_rows msql_numfields msql_numrows msql_pconnect msql_query msql_regcase msql_result msql_select_db msql_selectdb msql_tablename msql contained
1 0.000013 syn keyword phpFunctions mssql_bind mssql_close mssql_connect mssql_data_seek mssql_execute mssql_fetch_array mssql_fetch_assoc mssql_fetch_batch mssql_fetch_field mssql_fetch_object mssql_fetch_row mssql_field_length mssql_field_name mssql_field_seek mssql_field_type mssql_free_result mssql_free_statement mssql_get_last_message mssql_guid_string mssql_init mssql_min_error_severity mssql_min_message_severity mssql_next_result mssql_num_fields mssql_num_rows mssql_pconnect mssql_query mssql_result mssql_rows_affected mssql_select_db contained
1 0.000006 syn keyword phpFunctions muscat_close muscat_get muscat_give muscat_setup_net muscat_setup contained
1 0.000019 syn keyword phpFunctions mysql_affected_rows mysql_change_user mysql_client_encoding mysql_close mysql_connect mysql_create_db mysql_data_seek mysql_db_name mysql_db_query mysql_drop_db mysql_errno mysql_error mysql_escape_string mysql_fetch_array mysql_fetch_assoc mysql_fetch_field mysql_fetch_lengths mysql_fetch_object mysql_fetch_row mysql_field_flags mysql_field_len mysql_field_name mysql_field_seek mysql_field_table mysql_field_type mysql_free_result mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql_insert_id mysql_list_dbs mysql_list_fields mysql_list_processes mysql_list_tables mysql_num_fields mysql_num_rows mysql_pconnect mysql_ping mysql_query mysql_real_escape_string mysql_result mysql_select_db mysql_stat mysql_tablename mysql_thread_id mysql_unbuffered_query contained
1 0.000033 syn keyword phpFunctions mysqli_affected_rows mysqli_autocommit mysqli_bind_param mysqli_bind_result mysqli_change_user mysqli_character_set_name mysqli_close mysqli_commit mysqli_connect mysqli_data_seek mysqli_debug mysqli_disable_reads_from_master mysqli_disable_rpl_parse mysqli_dump_debug_info mysqli_enable_reads_from_master mysqli_enable_rpl_parse mysqli_errno mysqli_error mysqli_execute mysqli_fetch_array mysqli_fetch_assoc mysqli_fetch_field_direct mysqli_fetch_field mysqli_fetch_fields mysqli_fetch_lengths mysqli_fetch_object mysqli_fetch_row mysqli_fetch mysqli_field_count mysqli_field_seek mysqli_field_tell mysqli_free_result mysqli_get_client_info mysqli_get_host_info mysqli_get_proto_info mysqli_get_server_info mysqli_get_server_version mysqli_info mysqli_init mysqli_insert_id mysqli_kill mysqli_master_query mysqli_num_fields mysqli_num_rows mysqli_options mysqli_param_count mysqli_ping mysqli_prepare_result mysqli_prepare mysqli_profiler mysqli_query mysqli_read_query_result mysqli_real_connect m 1 0.000060 syn keyword phpFunctions ncurses_addch ncurses_addchnstr ncurses_addchstr ncurses_addnstr ncurses_addstr ncurses_assume_default_colors ncurses_attroff ncurses_attron ncurses_attrset ncurses_baudrate ncurses_beep ncurses_bkgd ncurses_bkgdset ncurses_border ncurses_bottom_panel ncurses_can_change_color ncurses_cbreak ncurses_clear ncurses_clrtobot ncurses_clrtoeol ncurses_color_content ncurses_color_set ncurses_curs_set ncurses_def_prog_mode ncurses_def_shell_mode ncurses_define_key ncurses_del_panel ncurses_delay_output ncurses_delch ncurses_deleteln ncurses_delwin ncurses_doupdate ncurses_echo ncurses_echochar ncurses_end ncurses_erase ncurses_erasechar ncurses_filter ncurses_flash ncurses_flushinp ncurses_getch ncurses_getmaxyx ncurses_getmouse ncurses_getyx ncurses_halfdelay ncurses_has_colors ncurses_has_ic ncurses_has_il ncurses_has_key ncurses_hide_panel ncurses_hline ncurses_inch ncurses_init_color ncurses_init_pair ncurses_init ncurses_insch ncurses_insdelln ncurses_insertln ncurses_insstr ncurses_inst 1 0.000009 syn keyword phpFunctions checkdnsrr closelog debugger_off debugger_on define_syslog_variables dns_check_record dns_get_mx dns_get_record fsockopen gethostbyaddr gethostbyname gethostbynamel getmxrr getprotobyname getprotobynumber getservbyname getservbyport ip2long long2ip openlog pfsockopen socket_get_status socket_set_blocking socket_set_timeout syslog contained
1 0.000004 syn keyword phpFunctions yp_all yp_cat yp_err_string yp_errno yp_first yp_get_default_domain yp_master yp_match yp_next yp_order contained
1 0.000008 syn keyword phpFunctions notes_body notes_copy_db notes_create_db notes_create_note notes_drop_db notes_find_note notes_header_info notes_list_msgs notes_mark_read notes_mark_unread notes_nav_create notes_search notes_unread notes_version contained
1 0.000003 syn keyword phpFunctions nsapi_request_headers nsapi_response_headers nsapi_virtual contained
1 0.000005 syn keyword phpFunctions aggregate_info aggregate_methods_by_list aggregate_methods_by_regexp aggregate_methods aggregate_properties_by_list aggregate_properties_by_regexp aggregate_properties aggregate aggregation_info deaggregate contained
1 0.000019 syn keyword phpFunctions ocibindbyname ocicancel ocicloselob ocicollappend ocicollassign ocicollassignelem ocicollgetelem ocicollmax ocicollsize ocicolltrim ocicolumnisnull ocicolumnname ocicolumnprecision ocicolumnscale ocicolumnsize ocicolumntype ocicolumntyperaw ocicommit ocidefinebyname ocierror ociexecute ocifetch ocifetchinto ocifetchstatement ocifreecollection ocifreecursor ocifreedesc ocifreestatement ociinternaldebug ociloadlob ocilogoff ocilogon ocinewcollection ocinewcursor ocinewdescriptor ocinlogon ocinumcols ociparse ociplogon ociresult ocirollback ocirowcount ocisavelob ocisavelobfile ociserverversion ocisetprefetch ocistatementtype ociwritelobtofile ociwritetemporarylob contained
1 0.000020 syn keyword phpFunctions odbc_autocommit odbc_binmode odbc_close_all odbc_close odbc_columnprivileges odbc_columns odbc_commit odbc_connect odbc_cursor odbc_data_source odbc_do odbc_error odbc_errormsg odbc_exec odbc_execute odbc_fetch_array odbc_fetch_into odbc_fetch_object odbc_fetch_row odbc_field_len odbc_field_name odbc_field_num odbc_field_precision odbc_field_scale odbc_field_type odbc_foreignkeys odbc_free_result odbc_gettypeinfo odbc_longreadlen odbc_next_result odbc_num_fields odbc_num_rows odbc_pconnect odbc_prepare odbc_primarykeys odbc_procedurecolumns odbc_procedures odbc_result_all odbc_result odbc_rollback odbc_setoption odbc_specialcolumns odbc_statistics odbc_tableprivileges odbc_tables contained
1 0.000025 syn keyword phpFunctions openssl_cipher_iv_length openssl_csr_export_to_file openssl_csr_export openssl_csr_get_public_key openssl_csr_get_subject openssl_csr_new openssl_csr_sign openssl_decrypt openssl_dh_compute_key openssl_digest openssl_encrypt openssl_error_string openssl_free_key openssl_get_cert_locations openssl_get_cipher_methods openssl_get_md_methods openssl_get_privatekey openssl_get_publickey openssl_open openssl_pbkdf2 openssl_pkcs12_export_to_file openssl_pkcs12_export openssl_pkcs12_read openssl_pkcs7_decrypt openssl_pkcs7_encrypt openssl_pkcs7_sign openssl_pkcs7_verify openssl_pkey_export_to_file openssl_pkey_export openssl_pkey_free openssl_pkey_get_details openssl_pkey_get_private openssl_pkey_get_public openssl_pkey_new openssl_private_decrypt openssl_private_encrypt openssl_public_decrypt openssl_public_encrypt openssl_random_pseudo_bytes openssl_seal openssl_sign openssl_spki_export_challenge openssl_spki_export openssl_spki_new openssl_spki_verify openssl_verify openssl_x509_check_priv 1 0.000010 syn keyword phpFunctions ora_bind ora_close ora_columnname ora_columnsize ora_columntype ora_commit ora_commitoff ora_commiton ora_do ora_error ora_errorcode ora_exec ora_fetch_into ora_fetch ora_getcolumn ora_logoff ora_logon ora_numcols ora_numrows ora_open ora_parse ora_plogon ora_rollback contained
1 0.000007 syn keyword phpFunctions flush ob_clean ob_end_clean ob_end_flush ob_flush ob_get_clean ob_get_contents ob_get_flush ob_get_length ob_get_level ob_get_status ob_gzhandler ob_implicit_flush ob_list_handlers ob_start output_add_rewrite_var output_reset_rewrite_vars contained
1 0.000002 syn keyword phpFunctions overload contained
1 0.000018 syn keyword phpFunctions ovrimos_close ovrimos_commit ovrimos_connect ovrimos_cursor ovrimos_exec ovrimos_execute ovrimos_fetch_into ovrimos_fetch_row ovrimos_field_len ovrimos_field_name ovrimos_field_num ovrimos_field_type ovrimos_free_result ovrimos_longreadlen ovrimos_num_fields ovrimos_num_rows ovrimos_prepare ovrimos_result_all ovrimos_result ovrimos_rollback contained
1 0.000004 syn keyword phpFunctions pcntl_exec pcntl_fork pcntl_signal pcntl_waitpid pcntl_wexitstatus pcntl_wifexited pcntl_wifsignaled pcntl_wifstopped pcntl_wstopsig pcntl_wtermsig contained
1 0.000018 syn keyword phpFunctions preg_grep preg_match_all preg_match preg_quote preg_replace_callback preg_replace preg_split contained
1 0.000058 syn keyword phpFunctions pdf_add_annotation pdf_add_bookmark pdf_add_launchlink pdf_add_locallink pdf_add_note pdf_add_outline pdf_add_pdflink pdf_add_thumbnail pdf_add_weblink pdf_arc pdf_arcn pdf_attach_file pdf_begin_page pdf_begin_pattern pdf_begin_template pdf_circle pdf_clip pdf_close_image pdf_close_pdi_page pdf_close_pdi pdf_close pdf_closepath_fill_stroke pdf_closepath_stroke pdf_closepath pdf_concat pdf_continue_text pdf_curveto pdf_delete pdf_end_page pdf_end_pattern pdf_end_template pdf_endpath pdf_fill_stroke pdf_fill pdf_findfont pdf_get_buffer pdf_get_font pdf_get_fontname pdf_get_fontsize pdf_get_image_height pdf_get_image_width pdf_get_majorversion pdf_get_minorversion pdf_get_parameter pdf_get_pdi_parameter pdf_get_pdi_value pdf_get_value pdf_initgraphics pdf_lineto pdf_makespotcolor pdf_moveto pdf_new pdf_open_CCITT pdf_open_file pdf_open_gif pdf_open_image_file pdf_open_image pdf_open_jpeg pdf_open_memory_image pdf_open_pdi_page pdf_open_pdi pdf_open_png pdf_open_tiff pdf_open pdf_place_im 1 0.000018 syn keyword phpFunctions pfpro_cleanup pfpro_init pfpro_process_raw pfpro_process pfpro_version contained
1 0.000031 syn keyword phpFunctions pg_affected_rows pg_cancel_query pg_client_encoding pg_close pg_connect pg_connection_busy pg_connection_reset pg_connection_status pg_convert pg_copy_from pg_copy_to pg_dbname pg_delete pg_end_copy pg_escape_bytea pg_escape_string pg_fetch_all pg_fetch_array pg_fetch_assoc pg_fetch_object pg_fetch_result pg_fetch_row pg_field_is_null pg_field_name pg_field_num pg_field_prtlen pg_field_size pg_field_type pg_free_result pg_get_notify pg_get_pid pg_get_result pg_host pg_insert pg_last_error pg_last_notice pg_last_oid pg_lo_close pg_lo_create pg_lo_export pg_lo_import pg_lo_open pg_lo_read_all pg_lo_read pg_lo_seek pg_lo_tell pg_lo_unlink pg_lo_write pg_meta_data pg_num_fields pg_num_rows pg_options pg_pconnect pg_ping pg_port pg_put_line pg_query pg_result_error pg_result_seek pg_result_status pg_select pg_send_query pg_set_client_encoding pg_trace pg_tty pg_unescape_bytea pg_untrace pg_update contained
1 0.000013 syn keyword phpFunctions posix_ctermid posix_get_last_error posix_getcwd posix_getegid posix_geteuid posix_getgid posix_getgrgid posix_getgrnam posix_getgroups posix_getlogin posix_getpgid posix_getpgrp posix_getpid posix_getppid posix_getpwnam posix_getpwuid posix_getrlimit posix_getsid posix_getuid posix_isatty posix_kill posix_mkfifo posix_setegid posix_seteuid posix_setgid posix_setpgid posix_setsid posix_setuid posix_strerror posix_times posix_ttyname posix_uname contained
1 0.000012 syn keyword phpFunctions printer_abort printer_close printer_create_brush printer_create_dc printer_create_font printer_create_pen printer_delete_brush printer_delete_dc printer_delete_font printer_delete_pen printer_draw_bmp printer_draw_chord printer_draw_elipse printer_draw_line printer_draw_pie printer_draw_rectangle printer_draw_roundrect printer_draw_text printer_end_doc printer_end_page printer_get_option printer_list printer_logical_fontheight printer_open printer_select_brush printer_select_font printer_select_pen printer_set_option printer_start_doc printer_start_page printer_write contained
1 0.000007 syn keyword phpFunctions pspell_add_to_personal pspell_add_to_session pspell_check pspell_clear_session pspell_config_create pspell_config_ignore pspell_config_mode pspell_config_personal pspell_config_repl pspell_config_runtogether pspell_config_save_repl pspell_new_config pspell_new_personal pspell_new pspell_save_wordlist pspell_store_replacement pspell_suggest contained
1 0.000002 syn keyword phpFunctions qdom_error qdom_tree contained
1 0.000004 syn keyword phpFunctions readline_add_history readline_clear_history readline_completion_function readline_info readline_list_history readline_read_history readline_write_history readline contained
1 0.000002 syn keyword phpFunctions recode_file recode_string recode contained
1 0.000005 syn keyword phpFunctions ereg_replace ereg eregi_replace eregi split spliti sql_regcase contained
1 0.000008 syn keyword phpFunctions ftok msg_get_queue msg_receive msg_remove_queue msg_send msg_set_queue msg_stat_queue sem_acquire sem_get sem_release sem_remove shm_attach shm_detach shm_get_var shm_put_var shm_remove_var shm_remove contained
1 0.000008 syn keyword phpFunctions sesam_affected_rows sesam_commit sesam_connect sesam_diagnostic sesam_disconnect sesam_errormsg sesam_execimm sesam_fetch_array sesam_fetch_result sesam_fetch_row sesam_field_array sesam_field_name sesam_free_result sesam_num_fields sesam_query sesam_rollback sesam_seek_row sesam_settransaction contained
1 0.000010 syn keyword phpFunctions session_cache_expire session_cache_limiter session_decode session_destroy session_encode session_get_cookie_params session_id session_is_registered session_module_name session_name session_regenerate_id session_register session_save_path session_set_cookie_params session_set_save_handler session_start session_unregister session_unset session_write_close contained
1 0.000003 syn keyword phpFunctions shmop_close shmop_delete shmop_open shmop_read shmop_size shmop_write contained
1 0.000007 syn keyword phpFunctions snmp_get_quick_print snmp_set_quick_print snmpget snmprealwalk snmpset snmpwalk snmpwalkoid contained
1 0.000015 syn keyword phpFunctions socket_accept socket_bind socket_clear_error socket_close socket_connect socket_create_listen socket_create_pair socket_create socket_get_option socket_getpeername socket_getsockname socket_iovec_add socket_iovec_alloc socket_iovec_delete socket_iovec_fetch socket_iovec_free socket_iovec_set socket_last_error socket_listen socket_read socket_readv socket_recv socket_recvfrom socket_recvmsg socket_select socket_send socket_sendmsg socket_sendto socket_set_block socket_set_nonblock socket_set_option socket_shutdown socket_strerror socket_write socket_writev contained
1 0.000012 syn keyword phpFunctions sqlite_array_query sqlite_busy_timeout sqlite_changes sqlite_close sqlite_column sqlite_create_aggregate sqlite_create_function sqlite_current sqlite_error_string sqlite_escape_string sqlite_fetch_array sqlite_fetch_single sqlite_fetch_string sqlite_field_name sqlite_has_more sqlite_last_error sqlite_last_insert_rowid sqlite_libencoding sqlite_libversion sqlite_next sqlite_num_fields sqlite_num_rows sqlite_open sqlite_popen sqlite_query sqlite_rewind sqlite_seek sqlite_udf_decode_binary sqlite_udf_encode_binary sqlite_unbuffered_query contained
1 0.000014 syn keyword phpFunctions stream_context_create stream_context_get_options stream_context_set_option stream_context_set_params stream_copy_to_stream stream_filter_append stream_filter_prepend stream_filter_register stream_get_contents stream_get_filters stream_get_line stream_get_meta_data stream_get_transports stream_get_wrappers stream_register_wrapper stream_select stream_set_blocking stream_set_timeout stream_set_write_buffer stream_socket_accept stream_socket_client stream_socket_get_name stream_socket_recvfrom stream_socket_sendto stream_socket_server stream_wrapper_register contained
1 0.000028 syn keyword phpFunctions addcslashes addslashes bin2hex chop chr chunk_split convert_cyr_string count_chars crc32 crypt explode fprintf get_html_translation_table hebrev hebrevc html_entity_decode htmlentities htmlspecialchars implode join levenshtein localeconv ltrim md5_file md5 metaphone money_format nl_langinfo nl2br number_format ord parse_str print printf quoted_printable_decode quotemeta rtrim setlocale sha1_file sha1 similar_text soundex sprintf sscanf str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split str_word_count strcasecmp strchr strcmp strcoll strcspn strip_tags stripcslashes stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpos strrchr strrev strripos strrpos strspn strstr strtok strtolower strtoupper strtr substr_compare substr_count substr_replace substr trim ucfirst ucwords vprintf vsprintf wordwrap contained
1 0.000025 syn keyword phpFunctions swf_actiongeturl swf_actiongotoframe swf_actiongotolabel swf_actionnextframe swf_actionplay swf_actionprevframe swf_actionsettarget swf_actionstop swf_actiontogglequality swf_actionwaitforframe swf_addbuttonrecord swf_addcolor swf_closefile swf_definebitmap swf_definefont swf_defineline swf_definepoly swf_definerect swf_definetext swf_endbutton swf_enddoaction swf_endshape swf_endsymbol swf_fontsize swf_fontslant swf_fonttracking swf_getbitmapinfo swf_getfontinfo swf_getframe swf_labelframe swf_lookat swf_modifyobject swf_mulcolor swf_nextid swf_oncondition swf_openfile swf_ortho2 swf_ortho swf_perspective swf_placeobject swf_polarview swf_popmatrix swf_posround swf_pushmatrix swf_removeobject swf_rotate swf_scale swf_setfont swf_setframe swf_shapearc swf_shapecurveto3 swf_shapecurveto swf_shapefillbitmapclip swf_shapefillbitmaptile swf_shapefilloff swf_shapefillsolid swf_shapelinesolid swf_shapelineto swf_shapemoveto swf_showframe swf_startbutton swf_startdoaction swf_startshape swf_ 1 0.000016 syn keyword phpFunctions sybase_affected_rows sybase_close sybase_connect sybase_data_seek sybase_deadlock_retry_count sybase_fetch_array sybase_fetch_assoc sybase_fetch_field sybase_fetch_object sybase_fetch_row sybase_field_seek sybase_free_result sybase_get_last_message sybase_min_client_severity sybase_min_error_severity sybase_min_message_severity sybase_min_server_severity sybase_num_fields sybase_num_rows sybase_pconnect sybase_query sybase_result sybase_select_db sybase_set_message_handler sybase_unbuffered_query contained
1 0.000010 syn keyword phpFunctions tidy_access_count tidy_clean_repair tidy_config_count tidy_diagnose tidy_error_count tidy_get_body tidy_get_config tidy_get_error_buffer tidy_get_head tidy_get_html_ver tidy_get_html tidy_get_output tidy_get_release tidy_get_root tidy_get_status tidy_getopt tidy_is_xhtml tidy_load_config tidy_parse_file tidy_parse_string tidy_repair_file tidy_repair_string tidy_reset_config tidy_save_config tidy_set_encoding tidy_setopt tidy_warning_count contained
1 0.000006 syn keyword phpMethods attributes children get_attr get_nodes has_children has_siblings is_asp is_comment is_html is_jsp is_jste is_text is_xhtml is_xml next prev tidy_node contained
1 0.000002 syn keyword phpFunctions token_get_all token_name contained
1 0.000004 syn keyword phpFunctions base64_decode base64_encode get_meta_tags http_build_query parse_url rawurldecode rawurlencode urldecode urlencode contained
1 0.000012 syn keyword phpFunctions doubleval empty floatval get_defined_vars get_resource_type gettype import_request_variables intval is_array is_bool is_callable is_double is_float is_int is_integer is_long is_null is_numeric is_object is_real is_resource is_scalar is_string isset print_r serialize settype strval unserialize unset var_dump var_export contained
1 0.000007 syn keyword phpFunctions vpopmail_add_alias_domain_ex vpopmail_add_alias_domain vpopmail_add_domain_ex vpopmail_add_domain vpopmail_add_user vpopmail_alias_add vpopmail_alias_del_domain vpopmail_alias_del vpopmail_alias_get_all vpopmail_alias_get vpopmail_auth_user vpopmail_del_domain_ex vpopmail_del_domain vpopmail_del_user vpopmail_error vpopmail_passwd vpopmail_set_user_quota contained
1 0.000003 syn keyword phpFunctions w32api_deftype w32api_init_dtype w32api_invoke_function w32api_register_function w32api_set_call_method contained
1 0.000004 syn keyword phpFunctions wddx_add_vars wddx_deserialize wddx_packet_end wddx_packet_start wddx_serialize_value wddx_serialize_vars contained
1 0.000013 syn keyword phpFunctions utf8_decode utf8_encode xml_error_string xml_get_current_byte_index xml_get_current_column_number xml_get_current_line_number xml_get_error_code xml_parse_into_struct xml_parse xml_parser_create_ns xml_parser_create xml_parser_free xml_parser_get_option xml_parser_set_option xml_set_character_data_handler xml_set_default_handler xml_set_element_handler xml_set_end_namespace_decl_handler xml_set_external_entity_ref_handler xml_set_notation_decl_handler xml_set_object xml_set_processing_instruction_handler xml_set_start_namespace_decl_handler xml_set_unparsed_entity_decl_handler contained
1 0.000007 syn keyword phpFunctions xmlrpc_decode_request xmlrpc_decode xmlrpc_encode_request xmlrpc_encode xmlrpc_get_type xmlrpc_parse_method_descriptions xmlrpc_server_add_introspection_data xmlrpc_server_call_method xmlrpc_server_create xmlrpc_server_destroy xmlrpc_server_register_introspection_callback xmlrpc_server_register_method xmlrpc_set_type contained
1 0.000005 syn keyword phpFunctions xslt_create xslt_errno xslt_error xslt_free xslt_output_process xslt_set_base xslt_set_encoding xslt_set_error_handler xslt_set_log xslt_set_sax_handler xslt_set_sax_handlers xslt_set_scheme_handler xslt_set_scheme_handlers contained
1 0.000010 syn keyword phpFunctions yaz_addinfo yaz_ccl_conf yaz_ccl_parse yaz_close yaz_connect yaz_database yaz_element yaz_errno yaz_error yaz_es_result yaz_get_option yaz_hits yaz_itemorder yaz_present yaz_range yaz_record yaz_scan_result yaz_scan yaz_schema yaz_search yaz_set_option yaz_sort yaz_syntax yaz_wait contained
1 0.000005 syn keyword phpFunctions zip_close zip_entry_close zip_entry_compressedsize zip_entry_compressionmethod zip_entry_filesize zip_entry_name zip_entry_open zip_entry_read zip_open zip_read contained
1 0.000007 syn keyword phpFunctions gzclose gzcompress gzdeflate gzencode gzeof gzfile gzgetc gzgets gzgetss gzinflate gzopen gzpassthru gzputs gzread gzrewind gzseek gztell gzuncompress gzwrite readgzfile zlib_get_coding_type contained
1 0.000006 if exists( "php_baselib" )
syn keyword phpMethods query next_record num_rows affected_rows nf f p np num_fields haltmsg seek link_id query_id metadata table_names nextid connect halt free register unregister is_registered delete url purl self_url pself_url hidden_session add_query padd_query reimport_get_vars reimport_post_vars reimport_cookie_vars set_container set_tokenname release_token put_headers get_id get_id put_id freeze thaw gc reimport_any_vars start url purl login_if is_authenticated auth_preauth auth_loginform auth_validatelogin auth_refreshlogin auth_registerform auth_doregister start check have_perm permsum perm_invalid contained
syn keyword phpFunctions page_open page_close sess_load sess_save contained
endif
" Conditional
1 0.000007 syn keyword phpConditional declare else enddeclare endswitch elseif endif if switch contained
" Repeat
1 0.000006 syn keyword phpRepeat as do endfor endforeach endwhile for foreach while contained
" Repeat
1 0.000004 syn keyword phpLabel case default switch contained
" Statement
1 0.000007 syn keyword phpStatement return break continue exit goto yield contained
" Keyword
1 0.000004 syn keyword phpKeyword var const contained
" Type
1 0.000007 syn keyword phpType bool boolean int integer real double float string array object NULL callable iterable contained
" Structure
1 0.000005 syn keyword phpStructure namespace extends implements instanceof parent self contained
" Operator
1 0.000006 syn match phpOperator "[-=+%^&|*!.~?:]" contained display
1 0.000003 syn match phpOperator "[-+*/%^&|.]=" contained display
1 0.000003 syn match phpOperator "/[^*/]"me=e-1 contained display
1 0.000002 syn match phpOperator "\$" contained display
1 0.000005 syn match phpOperator "&&\|\<and\>" contained display
1 0.000003 syn match phpOperator "||\|\<x\=or\>" contained display
1 0.000005 syn match phpRelation "[!=<>]=" contained display
1 0.000002 syn match phpRelation "[<>]" contained display
1 0.000005 syn match phpMemberSelector "->" contained display
1 0.000004 syn match phpVarSelector "\$" contained display
" Identifier
1 0.000008 syn match phpIdentifier "$\h\w*" contained contains=phpEnvVar,phpIntVar,phpVarSelector display
1 0.000008 syn match phpIdentifierSimply "${\h\w*}" contains=phpOperator,phpParent contained display
1 0.000014 syn region phpIdentifierComplex matchgroup=phpParent start="{\$"rs=e-1 end="}" contains=phpIdentifier,phpMemberSelector,phpVarSelector,phpIdentifierComplexP contained extend
1 0.000008 syn region phpIdentifierComplexP matchgroup=phpParent start="\[" end="]" contains=@phpClInside contained
" Interpolated indentifiers (inside strings)
1 0.000005 syn match phpBrackets "[][}{]" contained display
" errors
1 0.000005 syn match phpInterpSimpleError "\[[^]]*\]" contained display " fallback (if nothing else matches)
1 0.000005 syn match phpInterpSimpleError "->[^a-zA-Z_]" contained display
" make sure these stay above the correct DollarCurlies so they don't take priority
1 0.000005 syn match phpInterpBogusDollarCurley "${[^}]*}" contained display " fallback (if nothing else matches)
1 0.000005 syn match phpinterpSimpleBracketsInner "\w\+" contained
1 0.000007 syn match phpInterpSimpleBrackets "\[\h\w*]" contained contains=phpBrackets,phpInterpSimpleBracketsInner
1 0.000004 syn match phpInterpSimpleBrackets "\[\d\+]" contained contains=phpBrackets,phpInterpSimpleBracketsInner
1 0.000005 syn match phpInterpSimpleBrackets "\[0[xX]\x\+]" contained contains=phpBrackets,phpInterpSimpleBracketsInner
1 0.000014 syn match phpInterpSimple "\$\h\w*\(\[[^]]*\]\|->\h\w*\)\?" contained contains=phpInterpSimpleBrackets,phpIdentifier,phpInterpSimpleError,phpMethods,phpMemberSelector display
1 0.000005 syn match phpInterpVarname "\h\w*" contained
1 0.000004 syn match phpInterpMethodName "\h\w*" contained " default color
1 0.000006 syn match phpInterpSimpleCurly "\${\h\w*}" contains=phpInterpVarname contained extend
1 0.000008 syn region phpInterpDollarCurley1Helper matchgroup=phpParent start="{" end="\[" contains=phpInterpVarname contained
1 0.000010 syn region phpInterpDollarCurly1 matchgroup=phpParent start="\${\h\w*\["rs=s+1 end="]}" contains=phpInterpDollarCurley1Helper,@phpClConst contained extend
1 0.000007 syn match phpInterpDollarCurley2Helper "{\h\w*->" contains=phpBrackets,phpInterpVarname,phpMemberSelector contained
1 0.000012 syn region phpInterpDollarCurly2 matchgroup=phpParent start="\${\h\w*->"rs=s+1 end="}" contains=phpInterpDollarCurley2Helper,phpInterpMethodName contained
1 0.000003 syn match phpInterpBogusDollarCurley "${\h\w*->}" contained display
1 0.000002 syn match phpInterpBogusDollarCurley "${\h\w*\[]}" contained display
1 0.000016 syn region phpInterpComplex matchgroup=phpParent start="{\$"rs=e-1 end="}" contains=phpIdentifier,phpMemberSelector,phpVarSelector,phpIdentifierComplexP contained extend
1 0.000005 syn region phpIdentifierComplexP matchgroup=phpParent start="\[" end="]" contains=@phpClInside contained
" define a cluster to get all interpolation syntaxes for double-quoted strings
1 0.000007 syn cluster phpInterpDouble contains=phpInterpSimple,phpInterpSimpleCurly,phpInterpDollarCurly1,phpInterpDollarCurly2,phpInterpBogusDollarCurley,phpInterpComplex
" Methoden
1 0.000007 syn match phpMethodsVar "->\h\w*" contained contains=phpMethods,phpMemberSelector display
" Include
1 0.000005 syn keyword phpInclude include require include_once require_once use contained
" Define
1 0.000004 syn keyword phpDefine new clone contained
" Boolean
1 0.000004 syn keyword phpBoolean true false contained
" Number
1 0.000005 syn match phpNumber "-\=\<\d\+\>" contained display
1 0.000006 syn match phpNumber "\<0x\x\{1,8}\>" contained display
" Float
1 0.000006 syn match phpFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained display
" Backslash escapes
1 0.000001 syn case match
" for double quotes and heredoc
1 0.000005 syn match phpBackslashSequences "\\[fnrtv\\\"$]" contained display
1 0.000006 syn match phpBackslashSequences "\\\d\{1,3}" contained contains=phpOctalError display
1 0.000003 syn match phpBackslashSequences "\\x\x\{1,2}" contained display
" additional sequence for double quotes only
1 0.000005 syn match phpBackslashDoubleQuote "\\[\"]" contained display
" for single quotes only
1 0.000008 syn match phpBackslashSingleQuote "\\[\\']" contained display
1 0.000001 syn case ignore
" Error
1 0.000002 syn match phpOctalError "[89]" contained display
1 0.000003 if exists("php_parent_error_close")
syn match phpParentError "[)\]}]" contained display
endif
" Todo
1 0.000005 syn keyword phpTodo todo fixme xxx contained
" Comment
1 0.000002 if exists("php_parent_error_open")
syn region phpComment start="/\*" end="\*/" contained contains=phpTodo,@Spell
else
1 0.000008 syn region phpComment start="/\*" end="\*/" contained contains=phpTodo,@Spell extend
1 0.000001 endif
1 0.000005 syn match phpComment "#.\{-}\(?>\|$\)\@=" contained contains=phpTodo,@Spell
1 0.000004 syn match phpComment "//.\{-}\(?>\|$\)\@=" contained contains=phpTodo,@Spell
" String
1 0.000002 if exists("php_parent_error_open")
syn region phpStringDouble matchgroup=phpStringDouble start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble,@Spell contained keepend
syn region phpBacktick matchgroup=phpBacktick start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpBackslashSequences,phpIdentifierSimply,phpIdentifierComplex contained keepend
syn region phpStringSingle matchgroup=phpStringSingle start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote,@Spell contained keepend
else
1 0.000013 syn region phpStringDouble matchgroup=phpStringDouble start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=@phpAddStrings,phpBackslashSequences,phpBackslashDoubleQuote,@phpInterpDouble,@Spell contained extend keepend
1 0.000016 syn region phpBacktick matchgroup=phpBacktick start=+`+ skip=+\\\\\|\\"+ end=+`+ contains=@phpAddStrings,phpIdentifier,phpBackslashSequences,phpIdentifierSimply,phpIdentifierComplex contained extend keepend
1 0.000011 syn region phpStringSingle matchgroup=phpStringSingle start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=@phpAddStrings,phpBackslashSingleQuote,@Spell contained keepend extend
1 0.000003 endif
" HereDoc and NowDoc
1 0.000001 syn case match
" HereDoc
1 0.000019 syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\I\i*\)\2$" end="^\z1\(;\=$\)\@=" contained contains=phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend
" including HTML,JavaScript,SQL even if not enabled via options
1 0.000018 syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend
1 0.000020 syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,phpIdentifier,phpIdentifierSimply,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend
1 0.000015 syn region phpHereDoc matchgroup=Delimiter start="\(<<<\)\@<=\(\"\=\)\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)\2$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,phpIdentifierSimply,phpIdentifier,phpIdentifierComplex,phpBackslashSequences,phpMethodsVar,@Spell keepend extend
" NowDoc
1 0.000014 syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\I\i*\)'$" end="^\z1\(;\=$\)\@=" contained contains=@Spell keepend extend
" including HTML,JavaScript,SQL even if not enabled via options
1 0.000010 syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(html\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlTop,@Spell keepend extend
1 0.000009 syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(sql\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@sqlTop,@Spell keepend extend
1 0.000010 syn region phpNowDoc matchgroup=Delimiter start="\(<<<\)\@<='\z(\(\I\i*\)\=\(javascript\)\c\(\i*\)\)'$" end="^\z1\(;\=$\)\@=" contained contains=@htmlJavascript,@Spell keepend extend
1 0.000001 syn case ignore
" Parent
1 0.000004 if exists("php_parent_error_close") || exists("php_parent_error_open")
syn match phpParent "[{}]" contained
syn region phpParent matchgroup=Delimiter start="(" end=")" contained contains=@phpClInside transparent
syn region phpParent matchgroup=Delimiter start="\[" end="\]" contained contains=@phpClInside transparent
if !exists("php_parent_error_close")
syn match phpParent "[\])]" contained
endif
else
1 0.000003 syn match phpParent "[({[\]})]" contained
1 0.000001 endif
1 0.000026 syn cluster phpClConst contains=phpFunctions,phpIdentifier,phpConditional,phpRepeat,phpStatement,phpOperator,phpRelation,phpStringSingle,phpStringDouble,phpBacktick,phpNumber,phpFloat,phpKeyword,phpType,phpBoolean,phpStructure,phpMethodsVar,phpConstant,phpCoreConstant,phpException
1 0.000014 syn cluster phpClInside contains=@phpClConst,phpComment,phpLabel,phpParent,phpParentError,phpInclude,phpHereDoc,phpNowDoc
1 0.000008 syn cluster phpClFunction contains=@phpClInside,phpDefine,phpParentError,phpStorageClass
1 0.000017 syn cluster phpClTop contains=@phpClFunction,phpFoldFunction,phpFoldClass,phpFoldInterface,phpFoldTry,phpFoldCatch
" Php Region
1 0.000002 if exists("php_parent_error_open")
if exists("php_noShortTags")
syn region phpRegion matchgroup=Delimiter start="<?php" end="?>" contains=@phpClTop
else
syn region phpRegion matchgroup=Delimiter start="<?\(php\)\=" end="?>" contains=@phpClTop
endif
syn region phpRegionSc matchgroup=Delimiter start=+<script language="php">+ end=+</script>+ contains=@phpClTop
if exists("php_asp_tags")
syn region phpRegionAsp matchgroup=Delimiter start="<%\(=\)\=" end="%>" contains=@phpClTop
endif
else
1 0.000002 if exists("php_noShortTags")
syn region phpRegion matchgroup=Delimiter start="<?php" end="?>" contains=@phpClTop keepend
else
1 0.000008 syn region phpRegion matchgroup=Delimiter start="<?\(php\)\=" end="?>" contains=@phpClTop keepend
1 0.000001 endif
1 0.000022 syn region phpRegionSc matchgroup=Delimiter start=+<script language="php">+ end=+</script>+ contains=@phpClTop keepend
1 0.000003 if exists("php_asp_tags")
syn region phpRegionAsp matchgroup=Delimiter start="<%\(=\)\=" end="%>" contains=@phpClTop keepend
endif
1 0.000001 endif
" Fold
1 0.000002 if exists("php_folding") && php_folding==1
" match one line constructs here and skip them at folding
syn keyword phpSCKeyword abstract final private protected public static contained
syn keyword phpFCKeyword function contained
syn keyword phpStorageClass global contained
syn match phpDefine "\(\s\|^\)\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function\(\s\+.*[;}]\)\@=" contained contains=phpSCKeyword
syn match phpStructure "\(\s\|^\)\(abstract\s\+\|final\s\+\)*\(trait\|class\)\(\s\+.*}\)\@=" contained
syn match phpStructure "\(\s\|^\)interface\(\s\+.*}\)\@=" contained
syn match phpException "\(\s\|^\)try\(\s\+.*}\)\@=" contained
syn match phpException "\(\s\|^\)catch\(\s\+.*}\)\@=" contained
syn match phpException "\(\s\|^\)finally\(\s\+.*}\)\@=" contained
set foldmethod=syntax
syn region phpFoldHtmlInside matchgroup=Delimiter start="?>" end="<?\(php\)\=" contained transparent contains=@htmlTop
syn region phpFoldFunction matchgroup=Storageclass start="^\z(\s*\)\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function\s\([^};]*$\)\@="rs=e-9 matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldHtmlInside,phpFCKeyword contained transparent fold extend
syn region phpFoldFunction matchgroup=Define start="^function\s\([^};]*$\)\@=" matchgroup=Delimiter end="^}" contains=@phpClFunction,phpFoldHtmlInside contained transparent fold extend
syn region phpFoldClass matchgroup=Structure start="^\z(\s*\)\(abstract\s\+\|final\s\+\)*\(trait\|class\)\s\+\([^}]*$\)\@=" matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldFunction,phpSCKeyword contained transparent fold extend
syn region phpFoldInterface matchgroup=Structure start="^\z(\s*\)interface\s\+\([^}]*$\)\@=" matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldFunction contained transparent fold extend
syn region phpFoldCatch matchgroup=Exception start="^\z(\s*\)catch\s\+\([^}]*$\)\@=" matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldFunction contained transparent fold extend
syn region phpFoldTry matchgroup=Exception start="^\z(\s*\)try\s\+\([^}]*$\)\@=" matchgroup=Delimiter end="^\z1}" contains=@phpClFunction,phpFoldFunction contained transparent fold extend
else
1 0.000002 syn keyword phpDefine function contained
1 0.000013 syn keyword phpStructure abstract class trait interface contained
1 0.000003 syn keyword phpException catch throw try finally contained
1 0.000003 syn keyword phpStorageClass final global private protected public static contained
1 0.000003 if exists("php_folding") && php_folding==2
set foldmethod=syntax
syn region phpFoldHtmlInside matchgroup=Delimiter start="?>" end="<?\(php\)\=" contained transparent contains=@htmlTop
syn region phpParent matchgroup=Delimiter start="{" end="}" contained contains=@phpClFunction,phpFoldHtmlInside transparent fold
endif
1 0.000001 endif
" ================================================================
" Peter Hodge - June 9, 2006
" Some of these changes (highlighting isset/unset/echo etc) are not so
" critical, but they make things more colourful. :-)
" different syntax highlighting for 'echo', 'print', 'switch', 'die' and 'list' keywords
" to better indicate what they are.
1 0.000003 syntax keyword phpDefine echo print contained
1 0.000002 syntax keyword phpStructure list contained
1 0.000002 syntax keyword phpConditional switch contained
1 0.000041 syntax keyword phpStatement die contained
" Highlighting for PHP5's user-definable magic class methods
1 0.000047 syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier
\ __construct __destruct __call __callStatic __get __set __isset __unset __sleep __wakeup __toString __invoke __set_state __clone __debugInfo
" Highlighting for __autoload slightly different from line above
1 0.000024 syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar
\ __autoload
1 0.000002 hi def link phpSpecialFunction phpOperator
" Highlighting for PHP5's built-in classes
" - built-in classes harvested from get_declared_classes() in 5.1.4
1 0.000122 syntax keyword phpClasses containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar
\ stdClass __PHP_Incomplete_Class php_user_filter Directory ArrayObject
\ Exception ErrorException LogicException BadFunctionCallException BadMethodCallException DomainException
\ RecursiveIteratorIterator IteratorIterator FilterIterator RecursiveFilterIterator ParentIterator LimitIterator
\ CachingIterator RecursiveCachingIterator NoRewindIterator AppendIterator InfiniteIterator EmptyIterator
\ ArrayIterator RecursiveArrayIterator DirectoryIterator RecursiveDirectoryIterator
\ InvalidArgumentException LengthException OutOfRangeException RuntimeException OutOfBoundsException
\ OverflowException RangeException UnderflowException UnexpectedValueException
\ PDO PDOException PDOStatement PDORow
\ Reflection ReflectionFunction ReflectionParameter ReflectionMethod ReflectionClass
\ ReflectionObject ReflectionProperty ReflectionExtension ReflectionException
\ SplFileInfo SplFileObject SplTempFileObject SplObjectStorage
\ XMLWriter LibXMLError XMLReader SimpleXMLElement SimpleXMLIterator
\ DOMException DOMStringList DOMNameList DOMDomError DOMErrorHandler
\ DOMImplementation DOMImplementationList DOMImplementationSource
\ DOMNode DOMNameSpaceNode DOMDocumentFragment DOMDocument DOMNodeList DOMNamedNodeMap
\ DOMCharacterData DOMAttr DOMElement DOMText DOMComment DOMTypeinfo DOMUserDataHandler
\ DOMLocator DOMConfiguration DOMCdataSection DOMDocumentType DOMNotation DOMEntity
\ DOMEntityReference DOMProcessingInstruction DOMStringExtend DOMXPath
1 0.000002 hi def link phpClasses phpFunctions
" Highlighting for PHP5's built-in interfaces
" - built-in classes harvested from get_declared_interfaces() in 5.1.4
1 0.000015 syntax keyword phpInterfaces containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar
\ Iterator IteratorAggregate RecursiveIterator OuterIterator SeekableIterator
\ Traversable ArrayAccess Serializable Countable SplObserver SplSubject Reflector
1 0.000001 hi def link phpInterfaces phpConstant
" option defaults:
1 0.000004 if ! exists('php_special_functions')
1 0.000017 let php_special_functions = 1
1 0.000001 endif
1 0.000002 if ! exists('php_alt_comparisons')
1 0.000001 let php_alt_comparisons = 1
1 0.000001 endif
1 0.000002 if ! exists('php_alt_assignByReference')
1 0.000004 let php_alt_assignByReference = 1
1 0.000001 endif
1 0.000001 if php_special_functions
" Highlighting for PHP built-in functions which exhibit special behaviours
" - isset()/unset()/empty() are not real functions.
" - compact()/extract() directly manipulate variables in the local scope where
" regular functions would not be able to.
" - eval() is the token 'make_your_code_twice_as_complex()' function for PHP.
" - user_error()/trigger_error() can be overloaded by set_error_handler and also
" have the capacity to terminate your script when type is E_USER_ERROR.
1 0.000009 syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle
\ user_error trigger_error isset unset eval extract compact empty
1 0.000001 endif
1 0.000001 if php_alt_assignByReference
" special highlighting for '=&' operator
1 0.000010 syntax match phpAssignByRef /=\s*&/ containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle
1 0.000003 hi def link phpAssignByRef Type
1 0.000001 endif
1 0.000001 if php_alt_comparisons
" highlight comparison operators differently
1 0.000011 syntax match phpComparison "\v[=!]\=\=?" contained containedin=phpRegion
1 0.000006 syntax match phpComparison "\v[=<>-]@<![<>]\=?[<>]@!" contained containedin=phpRegion
" highlight the 'instanceof' operator as a comparison operator rather than a structure
1 0.000001 syntax case ignore
1 0.000003 syntax keyword phpComparison instanceof contained containedin=phpRegion
1 0.000003 hi def link phpComparison Statement
1 0.000001 endif
" ================================================================
" Sync
1 0.000001 if php_sync_method==-1
if exists("php_noShortTags")
syn sync match phpRegionSync grouphere phpRegion "^\s*<?php\s*$"
else
syn sync match phpRegionSync grouphere phpRegion "^\s*<?\(php\)\=\s*$"
endif
syn sync match phpRegionSync grouphere phpRegionSc +^\s*<script language="php">\s*$+
if exists("php_asp_tags")
syn sync match phpRegionSync grouphere phpRegionAsp "^\s*<%\(=\)\=\s*$"
endif
syn sync match phpRegionSync grouphere NONE "^\s*?>\s*$"
syn sync match phpRegionSync grouphere NONE "^\s*%>\s*$"
syn sync match phpRegionSync grouphere phpRegion "function\s.*(.*\$"
"syn sync match phpRegionSync grouphere NONE "/\i*>\s*$"
elseif php_sync_method>0
exec "syn sync minlines=" . php_sync_method
else
1 0.000003 exec "syn sync fromstart"
1 0.000001 endif
1 0.000008 syntax match phpDocCustomTags "@[a-zA-Z]*\(\s\+\|\n\|\r\)" containedin=phpComment
1 0.000012 syntax region phpDocTags start="{@\(example\|id\|internal\|inheritdoc\|link\|source\|toc\|tutorial\)" end="}" containedin=phpComment
1 0.000024 syntax match phpDocTags "@\(abstract\|access\|author\|category\|copyright\|deprecated\|example\|final\|global\|ignore\|internal\|license\|link\|method\|name\|package\|param\|property\|return\|see\|since\|static\|staticvar\|subpackage\|tutorial\|uses\|var\|version\|contributor\|modified\|filename\|description\|filesource\|throws\)\(\s\+\)\?" containedin=phpComment
1 0.000007 syntax match phpDocTodo "@\(todo\|fixme\|xxx\)\(\s\+\)\?" containedin=phpComment
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
1 0.000003 hi def link phpConstant Constant
1 0.000003 hi def link phpCoreConstant Constant
1 0.000003 hi def link phpComment Comment
1 0.000002 hi def link phpDocTags PreProc
1 0.000003 hi def link phpDocCustomTags Type
1 0.000002 hi def link phpException Exception
1 0.000002 hi def link phpBoolean Boolean
1 0.000003 hi def link phpStorageClass StorageClass
1 0.000002 hi def link phpSCKeyword StorageClass
1 0.000005 hi def link phpFCKeyword Define
1 0.000003 hi def link phpStructure Structure
1 0.000003 hi def link phpStringSingle String
1 0.000003 hi def link phpStringDouble String
1 0.000003 hi def link phpBacktick String
1 0.000003 hi def link phpNumber Number
1 0.000002 hi def link phpFloat Float
1 0.000003 hi def link phpMethods Function
1 0.000003 hi def link phpFunctions Function
1 0.000005 hi def link phpBaselib Function
1 0.000003 hi def link phpRepeat Repeat
1 0.000003 hi def link phpConditional Conditional
1 0.000002 hi def link phpLabel Label
1 0.000003 hi def link phpStatement Statement
1 0.000003 hi def link phpKeyword Statement
1 0.000003 hi def link phpType Type
1 0.000002 hi def link phpInclude Include
1 0.000002 hi def link phpDefine Define
1 0.000003 hi def link phpBackslashSequences SpecialChar
1 0.000003 hi def link phpBackslashDoubleQuote SpecialChar
1 0.000003 hi def link phpBackslashSingleQuote SpecialChar
1 0.000003 hi def link phpParent Delimiter
1 0.000003 hi def link phpBrackets Delimiter
1 0.000005 hi def link phpIdentifierConst Delimiter
1 0.000003 hi def link phpParentError Error
1 0.000003 hi def link phpOctalError Error
1 0.000003 hi def link phpInterpSimpleError Error
1 0.000003 hi def link phpInterpBogusDollarCurley Error
1 0.000003 hi def link phpInterpDollarCurly1 Error
1 0.000003 hi def link phpInterpDollarCurly2 Error
1 0.000003 hi def link phpInterpSimpleBracketsInner String
1 0.000003 hi def link phpInterpSimpleCurly Delimiter
1 0.000005 hi def link phpInterpVarname Identifier
1 0.000003 hi def link phpTodo Todo
1 0.000002 hi def link phpDocTodo Todo
1 0.000003 hi def link phpMemberSelector Structure
1 0.000003 if exists("php_oldStyle")
hi def phpIntVar guifg=Red ctermfg=DarkRed
hi def phpEnvVar guifg=Red ctermfg=DarkRed
hi def phpOperator guifg=SeaGreen ctermfg=DarkGreen
hi def phpVarSelector guifg=SeaGreen ctermfg=DarkGreen
hi def phpRelation guifg=SeaGreen ctermfg=DarkGreen
hi def phpIdentifier guifg=DarkGray ctermfg=Brown
hi def phpIdentifierSimply guifg=DarkGray ctermfg=Brown
else
1 0.000003 hi def link phpIntVar Identifier
1 0.000003 hi def link phpEnvVar Identifier
1 0.000003 hi def link phpOperator Operator
1 0.000003 hi def link phpVarSelector Operator
1 0.000003 hi def link phpRelation Operator
1 0.000003 hi def link phpIdentifier Identifier
1 0.000003 hi def link phpIdentifierSimply Identifier
1 0.000001 endif
1 0.000002 let b:current_syntax = "php"
1 0.000002 if main_syntax == 'php'
1 0.000001 unlet main_syntax
1 0.000001 endif
" put cpoptions back the way we found it
1 0.000005 let &cpo = s:cpo_save
1 0.000001 unlet s:cpo_save
" vim: ts=8 sts=2 sw=2 expandtab
SCRIPT /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/syntax/html.vim
Sourced 1 time
Total time: 0.012522
Self time: 0.003089
count total (s) self (s)
" Vim syntax file
" Language: HTML
" Maintainer: Jorge Maldonado Ventura <jorgesumle@freakspot.net>
" Previous Maintainer: Claudio Fleiner <claudio@fleiner.com>
" Repository: https://notabug.org/jorgesumle/vim-html-syntax
" Last Change: 2017 Sep 30
" included patch from Christian Brabandt to make use of the strikethrough attributes
"
" Please check :help html.vim for some comments and a description of the options
" quit when a syntax file was already loaded
1 0.000003 if !exists("main_syntax")
if exists("b:current_syntax")
finish
endif
let main_syntax = 'html'
endif
1 0.000003 let s:cpo_save = &cpo
1 0.000004 set cpo&vim
1 0.000002 syntax spell toplevel
1 0.000001 syn case ignore
" mark illegal characters
1 0.000014 syn match htmlError "[<>&]"
" tags
1 0.000013 syn region htmlString contained start=+"+ end=+"+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc
1 0.000007 syn region htmlString contained start=+'+ end=+'+ contains=htmlSpecialChar,javaScriptExpression,@htmlPreproc
1 0.000011 syn match htmlValue contained "=[\t ]*[^'" \t>][^ \t>]*"hs=s+1 contains=javaScriptExpression,@htmlPreproc
1 0.000009 syn region htmlEndTag start=+</+ end=+>+ contains=htmlTagN,htmlTagError
1 0.000015 syn region htmlTag start=+<[^/]+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent,htmlCssDefinition,@htmlPreproc,@htmlArgCluster
1 0.000009 syn match htmlTagN contained +<\s*[-a-zA-Z0-9]\++hs=s+1 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
1 0.000007 syn match htmlTagN contained +</\s*[-a-zA-Z0-9]\++hs=s+2 contains=htmlTagName,htmlSpecialTagName,@htmlTagNameCluster
1 0.000003 syn match htmlTagError contained "[^>]<"ms=s+1
" tag names
1 0.000004 syn keyword htmlTagName contained address applet area a base basefont
1 0.000003 syn keyword htmlTagName contained big blockquote br caption center
1 0.000004 syn keyword htmlTagName contained cite code dd dfn dir div dl dt font
1 0.000005 syn keyword htmlTagName contained form hr html img
1 0.000003 syn keyword htmlTagName contained input isindex kbd li link map menu
1 0.000003 syn keyword htmlTagName contained meta ol option param pre p samp span
1 0.000003 syn keyword htmlTagName contained select small sub sup
1 0.000007 syn keyword htmlTagName contained table td textarea th tr tt ul var xmp
1 0.000006 syn match htmlTagName contained "\<\(b\|i\|u\|h[1-6]\|em\|strong\|head\|body\|title\)\>"
" new html 4.0 tags
1 0.000003 syn keyword htmlTagName contained abbr acronym bdo button col label
1 0.000003 syn keyword htmlTagName contained colgroup fieldset iframe ins legend
1 0.000003 syn keyword htmlTagName contained object optgroup q s tbody tfoot thead
" new html 5 tags
1 0.000005 syn keyword htmlTagName contained article aside audio bdi canvas data
1 0.000003 syn keyword htmlTagName contained datalist details embed figcaption figure
1 0.000006 syn keyword htmlTagName contained footer header hgroup keygen main mark
1 0.000003 syn keyword htmlTagName contained menuitem meter nav output picture
1 0.000003 syn keyword htmlTagName contained progress rb rp rt rtc ruby section
1 0.000003 syn keyword htmlTagName contained slot source template time track video wbr
" legal arg names
1 0.000002 syn keyword htmlArg contained action
1 0.000003 syn keyword htmlArg contained align alink alt archive background bgcolor
1 0.000002 syn keyword htmlArg contained border bordercolor cellpadding
1 0.000003 syn keyword htmlArg contained cellspacing checked class clear code codebase color
1 0.000003 syn keyword htmlArg contained cols colspan content coords enctype face
1 0.000002 syn keyword htmlArg contained gutter height hspace id
1 0.000002 syn keyword htmlArg contained link lowsrc marginheight
1 0.000003 syn keyword htmlArg contained marginwidth maxlength method name prompt
1 0.000005 syn keyword htmlArg contained rel rev rows rowspan scrolling selected shape
1 0.000003 syn keyword htmlArg contained size src start target text type url
1 0.000003 syn keyword htmlArg contained usemap ismap valign value vlink vspace width wrap
1 0.000004 syn match htmlArg contained "\<\(http-equiv\|href\|title\)="me=e-1
" Netscape extensions
1 0.000003 syn keyword htmlTagName contained frame noframes frameset nobr blink
1 0.000003 syn keyword htmlTagName contained layer ilayer nolayer spacer
1 0.000020 syn keyword htmlArg contained frameborder noresize pagex pagey above below
1 0.000014 syn keyword htmlArg contained left top visibility clip id noshade
1 0.000003 syn match htmlArg contained "\<z-index\>"
" Microsoft extensions
1 0.000003 syn keyword htmlTagName contained marquee
" html 4.0 arg names
1 0.000008 syn match htmlArg contained "\<\(accept-charset\|label\)\>"
1 0.000012 syn keyword htmlArg contained abbr accept accesskey axis char charoff charset
1 0.000009 syn keyword htmlArg contained cite classid codetype compact data datetime
1 0.000011 syn keyword htmlArg contained declare defer dir disabled for frame
1 0.000010 syn keyword htmlArg contained headers hreflang lang language longdesc
1 0.000007 syn keyword htmlArg contained multiple nohref nowrap object profile readonly
1 0.000003 syn keyword htmlArg contained rules scheme scope span standby style
1 0.000003 syn keyword htmlArg contained summary tabindex valuetype version
" html 5 arg names
1 0.000003 syn keyword htmlArg contained allowfullscreen async autocomplete autofocus
1 0.000003 syn keyword htmlArg contained autoplay challenge contenteditable contextmenu
1 0.000003 syn keyword htmlArg contained controls crossorigin default dirname download
1 0.000003 syn keyword htmlArg contained draggable dropzone form formaction formenctype
1 0.000003 syn keyword htmlArg contained formmethod formnovalidate formtarget hidden
1 0.000003 syn keyword htmlArg contained high icon inputmode keytype kind list loop low
1 0.000003 syn keyword htmlArg contained max min minlength muted nonce novalidate open
1 0.000005 syn keyword htmlArg contained optimum pattern placeholder poster preload
1 0.000003 syn keyword htmlArg contained radiogroup required reversed sandbox spellcheck
1 0.000003 syn keyword htmlArg contained sizes srcset srcdoc srclang step title translate
1 0.000002 syn keyword htmlArg contained typemustmatch
" special characters
1 0.000006 syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};"
" Comments (the real ones or the old netscape ones)
1 0.000003 if exists("html_wrong_comments")
syn region htmlComment start=+<!--+ end=+--\s*>+ contains=@Spell
else
1 0.000028 syn region htmlComment start=+<!+ end=+>+ contains=htmlCommentPart,htmlCommentError,@Spell
1 0.000003 syn match htmlCommentError contained "[^><!]"
1 0.000006 syn region htmlCommentPart contained start=+--+ end=+--\s*+ contains=@htmlPreProc,@Spell
1 0.000003 endif
1 0.000007 syn region htmlComment start=+<!DOCTYPE+ keepend end=+>+
" server-parsed commands
1 0.000012 syn region htmlPreProc start=+<!--#+ end=+-->+ contains=htmlPreStmt,htmlPreError,htmlPreAttr
1 0.000007 syn match htmlPreStmt contained "<!--#\(config\|echo\|exec\|fsize\|flastmod\|include\|printenv\|set\|if\|elif\|else\|endif\|geoguide\)\>"
1 0.000005 syn match htmlPreError contained "<!--#\S*"ms=s+4
1 0.000010 syn match htmlPreAttr contained "\w\+=[^"]\S\+" contains=htmlPreProcAttrError,htmlPreProcAttrName
1 0.000013 syn region htmlPreAttr contained start=+\w\+="+ skip=+\\\\\|\\"+ end=+"+ contains=htmlPreProcAttrName keepend
1 0.000003 syn match htmlPreProcAttrError contained "\w\+="he=e-1
1 0.000005 syn match htmlPreProcAttrName contained "\(expr\|errmsg\|sizefmt\|timefmt\|var\|cgi\|cmd\|file\|virtual\|value\)="he=e-1
1 0.000003 if !exists("html_no_rendering")
" rendering
1 0.000014 syn cluster htmlTop contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,javaScript,@htmlPreproc
1 0.000032 syn region htmlStrike start="<del\>" end="</del>"me=e-6 contains=@htmlTop
1 0.000006 syn region htmlStrike start="<strike\>" end="</strike>"me=e-9 contains=@htmlTop
1 0.000012 syn region htmlBold start="<b\>" end="</b>"me=e-4 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic
1 0.000010 syn region htmlBold start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop,htmlBoldUnderline,htmlBoldItalic
1 0.000008 syn region htmlBoldUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlBoldUnderlineItalic
1 0.000007 syn region htmlBoldItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop,htmlBoldItalicUnderline
1 0.000006 syn region htmlBoldItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop,htmlBoldItalicUnderline
1 0.000005 syn region htmlBoldUnderlineItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop
1 0.000007 syn region htmlBoldUnderlineItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop
1 0.000005 syn region htmlBoldItalicUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlBoldUnderlineItalic
1 0.000011 syn region htmlUnderline start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlUnderlineBold,htmlUnderlineItalic
1 0.000007 syn region htmlUnderlineBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop,htmlUnderlineBoldItalic
1 0.000009 syn region htmlUnderlineBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop,htmlUnderlineBoldItalic
1 0.000007 syn region htmlUnderlineItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop,htmlUnderlineItalicBold
1 0.000008 syn region htmlUnderlineItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop,htmlUnderlineItalicBold
1 0.000004 syn region htmlUnderlineItalicBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop
1 0.000007 syn region htmlUnderlineItalicBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop
1 0.000010 syn region htmlUnderlineBoldItalic contained start="<i\>" end="</i>"me=e-4 contains=@htmlTop
1 0.000005 syn region htmlUnderlineBoldItalic contained start="<em\>" end="</em>"me=e-5 contains=@htmlTop
1 0.000010 syn region htmlItalic start="<i\>" end="</i>"me=e-4 contains=@htmlTop,htmlItalicBold,htmlItalicUnderline
1 0.000004 syn region htmlItalic start="<em\>" end="</em>"me=e-5 contains=@htmlTop
1 0.000010 syn region htmlItalicBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop,htmlItalicBoldUnderline
1 0.000006 syn region htmlItalicBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop,htmlItalicBoldUnderline
1 0.000005 syn region htmlItalicBoldUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop
1 0.000007 syn region htmlItalicUnderline contained start="<u\>" end="</u>"me=e-4 contains=@htmlTop,htmlItalicUnderlineBold
1 0.000004 syn region htmlItalicUnderlineBold contained start="<b\>" end="</b>"me=e-4 contains=@htmlTop
1 0.000008 syn region htmlItalicUnderlineBold contained start="<strong\>" end="</strong>"me=e-9 contains=@htmlTop
1 0.000006 syn match htmlLeadingSpace "^\s\+" contained
1 0.000016 syn region htmlLink start="<a\>\_[^>]*\<href\>" end="</a>"me=e-4 contains=@Spell,htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLeadingSpace,javaScript,@htmlPreproc
1 0.000006 syn region htmlH1 start="<h1\>" end="</h1>"me=e-5 contains=@htmlTop
1 0.000008 syn region htmlH2 start="<h2\>" end="</h2>"me=e-5 contains=@htmlTop
1 0.000006 syn region htmlH3 start="<h3\>" end="</h3>"me=e-5 contains=@htmlTop
1 0.000009 syn region htmlH4 start="<h4\>" end="</h4>"me=e-5 contains=@htmlTop
1 0.000006 syn region htmlH5 start="<h5\>" end="</h5>"me=e-5 contains=@htmlTop
1 0.000006 syn region htmlH6 start="<h6\>" end="</h6>"me=e-5 contains=@htmlTop
1 0.000024 syn region htmlHead start="<head\>" end="</head>"me=e-7 end="<body\>"me=e-5 end="<h[1-6]\>"me=e-3 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,htmlLink,htmlTitle,javaScript,cssStyle,@htmlPreproc
1 0.000015 syn region htmlTitle start="<title\>" end="</title>"me=e-8 contains=htmlTag,htmlEndTag,htmlSpecialChar,htmlPreProc,htmlComment,javaScript,@htmlPreproc
1 0.000001 endif
1 0.000003 syn keyword htmlTagName contained noscript
1 0.000002 syn keyword htmlSpecialTagName contained script style
1 0.000003 if main_syntax != 'java' || exists("java_javascript")
" JAVA SCRIPT
1 0.000707 0.000280 syn include @htmlJavaScript syntax/javascript.vim
1 0.000002 unlet b:current_syntax
1 0.000021 syn region javaScript start=+<script\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlJavaScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
1 0.000014 syn region htmlScriptTag contained start=+<script+ end=+>+ fold contains=htmlTagN,htmlString,htmlArg,htmlValue,htmlTagError,htmlEvent
1 0.000002 hi def link htmlScriptTag htmlTag
" html events (i.e. arguments that include javascript commands)
1 0.000003 if exists("html_extended_events")
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ contains=htmlEventSQ
syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ contains=htmlEventDQ
else
1 0.000005 syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*'+ end=+'+ keepend contains=htmlEventSQ
1 0.000005 syn region htmlEvent contained start=+\<on\a\+\s*=[\t ]*"+ end=+"+ keepend contains=htmlEventDQ
1 0.000001 endif
1 0.000008 syn region htmlEventSQ contained start=+'+ms=s+1 end=+'+me=s-1 contains=@htmlJavaScript
1 0.000005 syn region htmlEventDQ contained start=+"+ms=s+1 end=+"+me=s-1 contains=@htmlJavaScript
1 0.000006 hi def link htmlEventSQ htmlEvent
1 0.000001 hi def link htmlEventDQ htmlEvent
" a javascript expression is used as an arg value
1 0.000007 syn region javaScriptExpression contained start=+&{+ keepend end=+};+ contains=@htmlJavaScript,@htmlPreproc
1 0.000001 endif
1 0.000003 if main_syntax != 'java' || exists("java_vb")
" VB SCRIPT
1 0.002022 0.000200 syn include @htmlVbScript syntax/vb.vim
1 0.000002 unlet b:current_syntax
1 0.000014 syn region javaScript start=+<script \_[^>]*language *=\_[^>]*vbscript\_[^>]*>+ keepend end=+</script\_[^>]*>+me=s-1 contains=@htmlVbScript,htmlCssStyleComment,htmlScriptTag,@htmlPreproc
1 0.000003 endif
1 0.000004 syn cluster htmlJavaScript add=@htmlPreproc
1 0.000003 if main_syntax != 'java' || exists("java_css")
" embedded style sheets
1 0.000003 syn keyword htmlArg contained media
1 0.007382 0.000199 syn include @htmlCss syntax/css.vim
1 0.000002 unlet b:current_syntax
1 0.000018 syn region cssStyle start=+<style+ keepend end=+</style>+ contains=@htmlCss,htmlTag,htmlEndTag,htmlCssStyleComment,@htmlPreproc
1 0.000004 syn match htmlCssStyleComment contained "\(<!--\|-->\)"
1 0.001158 syn region htmlCssDefinition matchgroup=htmlArg start='style="' keepend matchgroup=htmlString end='"' contains=css.*Attr,css.*Prop,cssComment,cssLength,cssColor,cssURL,cssImportant,cssError,cssString,@htmlPreproc
1 0.000004 hi def link htmlStyleArg htmlString
1 0.000001 endif
1 0.000002 if main_syntax == "html"
" synchronizing (does not always work if a comment includes legal
" html tags, but doing it right would mean to always start
" at the first line, which is too slow)
syn sync match htmlHighlight groupthere NONE "<[/a-zA-Z]"
syn sync match htmlHighlight groupthere javaScript "<script"
syn sync match htmlHighlightSkip "^.*['\"].*$"
syn sync minlines=10
endif
" The default highlighting.
1 0.000004 hi def link htmlTag Function
1 0.000004 hi def link htmlEndTag Identifier
1 0.000004 hi def link htmlArg Type
1 0.000004 hi def link htmlTagName htmlStatement
1 0.000003 hi def link htmlSpecialTagName Exception
1 0.000003 hi def link htmlValue String
1 0.000003 hi def link htmlSpecialChar Special
1 0.000003 if !exists("html_no_rendering")
1 0.000004 hi def link htmlH1 Title
1 0.000002 hi def link htmlH2 htmlH1
1 0.000002 hi def link htmlH3 htmlH2
1 0.000002 hi def link htmlH4 htmlH3
1 0.000002 hi def link htmlH5 htmlH4
1 0.000002 hi def link htmlH6 htmlH5
1 0.000003 hi def link htmlHead PreProc
1 0.000003 hi def link htmlTitle Title
1 0.000002 hi def link htmlBoldItalicUnderline htmlBoldUnderlineItalic
1 0.000002 hi def link htmlUnderlineBold htmlBoldUnderline
1 0.000002 hi def link htmlUnderlineItalicBold htmlBoldUnderlineItalic
1 0.000005 hi def link htmlUnderlineBoldItalic htmlBoldUnderlineItalic
1 0.000002 hi def link htmlItalicUnderline htmlUnderlineItalic
1 0.000002 hi def link htmlItalicBold htmlBoldItalic
1 0.000002 hi def link htmlItalicBoldUnderline htmlBoldUnderlineItalic
1 0.000002 hi def link htmlItalicUnderlineBold htmlBoldUnderlineItalic
1 0.000003 hi def link htmlLink Underlined
1 0.000004 hi def link htmlLeadingSpace None
1 0.000002 if !exists("html_my_rendering")
1 0.000004 hi def htmlBold term=bold cterm=bold gui=bold
1 0.000004 hi def htmlBoldUnderline term=bold,underline cterm=bold,underline gui=bold,underline
1 0.000004 hi def htmlBoldItalic term=bold,italic cterm=bold,italic gui=bold,italic
1 0.000004 hi def htmlBoldUnderlineItalic term=bold,italic,underline cterm=bold,italic,underline gui=bold,italic,underline
1 0.000003 hi def htmlUnderline term=underline cterm=underline gui=underline
1 0.000004 hi def htmlUnderlineItalic term=italic,underline cterm=italic,underline gui=italic,underline
1 0.000003 hi def htmlItalic term=italic cterm=italic gui=italic
1 0.000005 if v:version > 800 || v:version == 800 && has("patch1038")
hi def htmlStrike term=strikethrough cterm=strikethrough gui=strikethrough
else
1 0.000003 hi def htmlStrike term=underline cterm=underline gui=underline
1 0.000001 endif
1 0.000001 endif
1 0.000001 endif
1 0.000003 hi def link htmlPreStmt PreProc
1 0.000003 hi def link htmlPreError Error
1 0.000003 hi def link htmlPreProc PreProc
1 0.000007 hi def link htmlPreAttr String
1 0.000003 hi def link htmlPreProcAttrName PreProc
1 0.000003 hi def link htmlPreProcAttrError Error
1 0.000004 hi def link htmlSpecial Special
1 0.000003 hi def link htmlSpecialChar Special
1 0.000003 hi def link htmlString String
1 0.000004 hi def link htmlStatement Statement
1 0.000003 hi def link htmlComment Comment
1 0.000003 hi def link htmlCommentPart Comment
1 0.000003 hi def link htmlValue String
1 0.000003 hi def link htmlCommentError htmlError
1 0.000002 hi def link htmlTagError htmlError
1 0.000002 hi def link htmlEvent javaScript
1 0.000003 hi def link htmlError Error
1 0.000003 hi def link javaScript Special
1 0.000003 hi def link javaScriptExpression javaScript
1 0.000003 hi def link htmlCssStyleComment Comment
1 0.000003 hi def link htmlCssDefinition Special
1 0.000002 let b:current_syntax = "html"
1 0.000002 if main_syntax == 'html'
unlet main_syntax
endif
1 0.000005 let &cpo = s:cpo_save
1 0.000001 unlet s:cpo_save
" vim: ts=8
SCRIPT /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/syntax/javascript.vim
Sourced 1 time
Total time: 0.000397
Self time: 0.000397
count total (s) self (s)
" Vim syntax file
" Language: JavaScript
" Maintainer: Claudio Fleiner <claudio@fleiner.com>
" Updaters: Scott Shattuck (ss) <ss@technicalpursuit.com>
" URL: http://www.fleiner.com/vim/syntax/javascript.vim
" Changes: (ss) added keywords, reserved words, and other identifiers
" (ss) repaired several quoting and grouping glitches
" (ss) fixed regex parsing issue with multiple qualifiers [gi]
" (ss) additional factoring of keywords, globals, and members
" Last Change: 2012 Oct 05
" 2013 Jun 12: adjusted javaScriptRegexpString (Kevin Locke)
" tuning parameters:
" unlet javaScript_fold
1 0.000006 if !exists("main_syntax")
" quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
let main_syntax = 'javascript'
elseif exists("b:current_syntax") && b:current_syntax == "javascript"
finish
endif
1 0.000007 let s:cpo_save = &cpo
1 0.000007 set cpo&vim
1 0.000011 syn keyword javaScriptCommentTodo TODO FIXME XXX TBD contained
1 0.000013 syn match javaScriptLineComment "\/\/.*" contains=@Spell,javaScriptCommentTodo
1 0.000021 syn match javaScriptCommentSkip "^[ \t]*\*\($\|[ \t]\+\)"
1 0.000018 syn region javaScriptComment start="/\*" end="\*/" contains=@Spell,javaScriptCommentTodo
1 0.000009 syn match javaScriptSpecial "\\\d\d\d\|\\."
1 0.000011 syn region javaScriptStringD start=+"+ skip=+\\\\\|\\"+ end=+"\|$+ contains=javaScriptSpecial,@htmlPreproc
1 0.000009 syn region javaScriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'\|$+ contains=javaScriptSpecial,@htmlPreproc
1 0.000004 syn match javaScriptSpecialCharacter "'\\.'"
1 0.000009 syn match javaScriptNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>"
1 0.000014 syn region javaScriptRegexpString start=+/[^/*]+me=e-1 skip=+\\\\\|\\/+ end=+/[gim]\{0,2\}\s*$+ end=+/[gim]\{0,2\}\s*[;.,)\]}]+me=e-1 contains=@htmlPreproc oneline
1 0.000005 syn keyword javaScriptConditional if else switch
1 0.000004 syn keyword javaScriptRepeat while for do in
1 0.000004 syn keyword javaScriptBranch break continue
1 0.000004 syn keyword javaScriptOperator new delete instanceof typeof
1 0.000006 syn keyword javaScriptType Array Boolean Date Function Number Object String RegExp
1 0.000004 syn keyword javaScriptStatement return with
1 0.000004 syn keyword javaScriptBoolean true false
1 0.000003 syn keyword javaScriptNull null undefined
1 0.000004 syn keyword javaScriptIdentifier arguments this var let
1 0.000004 syn keyword javaScriptLabel case default
1 0.000004 syn keyword javaScriptException try catch finally throw
1 0.000007 syn keyword javaScriptMessage alert confirm prompt status
1 0.000004 syn keyword javaScriptGlobal self window top parent
1 0.000004 syn keyword javaScriptMember document event location
1 0.000005 syn keyword javaScriptDeprecated escape unescape
1 0.000012 syn keyword javaScriptReserved abstract boolean byte char class const debugger double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile
1 0.000003 if exists("javaScript_fold")
syn match javaScriptFunction "\<function\>"
syn region javaScriptFunctionFold start="\<function\>.*[^};]$" end="^\z1}.*$" transparent fold keepend
syn sync match javaScriptSync grouphere javaScriptFunctionFold "\<function\>"
syn sync match javaScriptSync grouphere NONE "^}"
setlocal foldmethod=syntax
setlocal foldtext=getline(v:foldstart)
else
1 0.000003 syn keyword javaScriptFunction function
1 0.000004 syn match javaScriptBraces "[{}\[\]]"
1 0.000004 syn match javaScriptParens "[()]"
1 0.000001 endif
1 0.000001 syn sync fromstart
1 0.000001 syn sync maxlines=100
1 0.000002 if main_syntax == "javascript"
syn sync ccomment javaScriptComment
endif
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
1 0.000003 hi def link javaScriptComment Comment
1 0.000002 hi def link javaScriptLineComment Comment
1 0.000004 hi def link javaScriptCommentTodo Todo
1 0.000002 hi def link javaScriptSpecial Special
1 0.000002 hi def link javaScriptStringS String
1 0.000002 hi def link javaScriptStringD String
1 0.000003 hi def link javaScriptCharacter Character
1 0.000001 hi def link javaScriptSpecialCharacter javaScriptSpecial
1 0.000003 hi def link javaScriptNumber javaScriptValue
1 0.000002 hi def link javaScriptConditional Conditional
1 0.000002 hi def link javaScriptRepeat Repeat
1 0.000006 hi def link javaScriptBranch Conditional
1 0.000002 hi def link javaScriptOperator Operator
1 0.000002 hi def link javaScriptType Type
1 0.000002 hi def link javaScriptStatement Statement
1 0.000002 hi def link javaScriptFunction Function
1 0.000002 hi def link javaScriptBraces Function
1 0.000003 hi def link javaScriptError Error
1 0.000003 hi def link javaScrParenError javaScriptError
1 0.000002 hi def link javaScriptNull Keyword
1 0.000002 hi def link javaScriptBoolean Boolean
1 0.000002 hi def link javaScriptRegexpString String
1 0.000002 hi def link javaScriptIdentifier Identifier
1 0.000002 hi def link javaScriptLabel Label
1 0.000002 hi def link javaScriptException Exception
1 0.000002 hi def link javaScriptMessage Keyword
1 0.000002 hi def link javaScriptGlobal Keyword
1 0.000002 hi def link javaScriptMember Keyword
1 0.000002 hi def link javaScriptDeprecated Exception
1 0.000002 hi def link javaScriptReserved Keyword
1 0.000003 hi def link javaScriptDebug Debug
1 0.000003 hi def link javaScriptConstant Label
1 0.000002 let b:current_syntax = "javascript"
1 0.000002 if main_syntax == 'javascript'
unlet main_syntax
endif
1 0.000005 let &cpo = s:cpo_save
1 0.000001 unlet s:cpo_save
" vim: ts=8
SCRIPT /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/syntax/vb.vim
Sourced 1 time
Total time: 0.001806
Self time: 0.001806
count total (s) self (s)
" Vim syntax file
" Language: Visual Basic
" Maintainer: Tim Chase <vb.vim@tim.thechases.com>
" Former Maintainer: Robert M. Cortopassi <cortopar@mindspring.com>
" (tried multiple times to contact, but email bounced)
" Last Change:
" 2005 May 25 Synched with work by Thomas Barthel
" 2004 May 30 Added a few keywords
" This was thrown together after seeing numerous requests on the
" VIM and VIM-DEV mailing lists. It is by no means complete.
" Send comments, suggestions and requests to the maintainer.
" quit when a syntax file was already loaded
1 0.000005 if exists("b:current_syntax")
finish
endif
" VB is case insensitive
1 0.000001 syn case ignore
1 0.000006 syn keyword vbConditional If Then ElseIf Else Select Case
1 0.000005 syn keyword vbOperator AddressOf And ByRef ByVal Eqv Imp In
1 0.000003 syn keyword vbOperator Is Like Mod Not Or To Xor
1 0.000004 syn match vbOperator "[()+.,\-/*=&]"
1 0.000003 syn match vbOperator "[<>]=\="
1 0.000002 syn match vbOperator "<>"
1 0.000003 syn match vbOperator "\s\+_$"
1 0.000004 syn keyword vbBoolean True False
1 0.000004 syn keyword vbConst Null Nothing
1 0.000004 syn keyword vbRepeat Do For ForEach Loop Next
1 0.000003 syn keyword vbRepeat Step To Until Wend While
1 0.000004 syn keyword vbEvents AccessKeyPress Activate ActiveRowChanged
1 0.000003 syn keyword vbEvents AfterAddFile AfterChangeFileName AfterCloseFile
1 0.000002 syn keyword vbEvents AfterColEdit AfterColUpdate AfterDelete
1 0.000002 syn keyword vbEvents AfterInsert AfterLabelEdit AfterRemoveFile
1 0.000002 syn keyword vbEvents AfterUpdate AfterWriteFile AmbientChanged
1 0.000002 syn keyword vbEvents ApplyChanges Associate AsyncProgress
1 0.000002 syn keyword vbEvents AsyncReadComplete AsyncReadProgress AxisActivated
1 0.000002 syn keyword vbEvents AxisLabelActivated AxisLabelSelected
1 0.000002 syn keyword vbEvents AxisLabelUpdated AxisSelected AxisTitleActivated
1 0.000004 syn keyword vbEvents AxisTitleSelected AxisTitleUpdated AxisUpdated
1 0.000002 syn keyword vbEvents BeforeClick BeforeColEdit BeforeColUpdate
1 0.000002 syn keyword vbEvents BeforeConnect BeforeDelete BeforeInsert
1 0.000002 syn keyword vbEvents BeforeLabelEdit BeforeLoadFile BeforeUpdate
1 0.000002 syn keyword vbEvents BeginRequest BeginTrans ButtonClick
1 0.000002 syn keyword vbEvents ButtonCompleted ButtonDropDown ButtonGotFocus
1 0.000003 syn keyword vbEvents ButtonLostFocus CallbackKeyDown Change Changed
1 0.000003 syn keyword vbEvents ChartActivated ChartSelected ChartUpdated Click
1 0.000003 syn keyword vbEvents Close CloseQuery CloseUp ColEdit ColResize
1 0.000002 syn keyword vbEvents Collapse ColumnClick CommitTrans Compare
1 0.000002 syn keyword vbEvents ConfigChageCancelled ConfigChanged
1 0.000002 syn keyword vbEvents ConfigChangedCancelled Connect ConnectionRequest
1 0.000002 syn keyword vbEvents CurrentRecordChanged DECommandAdded
1 0.000002 syn keyword vbEvents DECommandPropertyChanged DECommandRemoved
1 0.000002 syn keyword vbEvents DEConnectionAdded DEConnectionPropertyChanged
1 0.000002 syn keyword vbEvents DEConnectionRemoved DataArrival DataChanged
1 0.000002 syn keyword vbEvents DataUpdated DateClicked DblClick Deactivate
1 0.000002 syn keyword vbEvents DevModeChange DeviceArrival DeviceOtherEvent
1 0.000002 syn keyword vbEvents DeviceQueryRemove DeviceQueryRemoveFailed
1 0.000002 syn keyword vbEvents DeviceRemoveComplete DeviceRemovePending
1 0.000002 syn keyword vbEvents Disconnect DisplayChanged Dissociate
1 0.000002 syn keyword vbEvents DoGetNewFileName Done DonePainting DownClick
1 0.000003 syn keyword vbEvents DragDrop DragOver DropDown EditProperty EditQuery
1 0.000003 syn keyword vbEvents EndRequest EnterCell EnterFocus ExitFocus Expand
1 0.000002 syn keyword vbEvents FontChanged FootnoteActivated FootnoteSelected
1 0.000003 syn keyword vbEvents FootnoteUpdated Format FormatSize GotFocus
1 0.000002 syn keyword vbEvents HeadClick HeightChanged Hide InfoMessage
1 0.000002 syn keyword vbEvents IniProperties InitProperties Initialize
1 0.000002 syn keyword vbEvents ItemActivated ItemAdded ItemCheck ItemClick
1 0.000002 syn keyword vbEvents ItemReloaded ItemRemoved ItemRenamed
1 0.000003 syn keyword vbEvents ItemSeletected KeyDown KeyPress KeyUp LeaveCell
1 0.000002 syn keyword vbEvents LegendActivated LegendSelected LegendUpdated
1 0.000004 syn keyword vbEvents LinkClose LinkError LinkExecute LinkNotify
1 0.000003 syn keyword vbEvents LinkOpen Load LostFocus MouseDown MouseMove
1 0.000003 syn keyword vbEvents MouseUp NodeCheck NodeClick OLECompleteDrag
1 0.000003 syn keyword vbEvents OLEDragDrop OLEDragOver OLEGiveFeedback OLESetData
1 0.000006 syn keyword vbEvents OLEStartDrag ObjectEvent ObjectMove OnAddNew
1 0.000003 syn keyword vbEvents OnComm Paint PanelClick PanelDblClick PathChange
1 0.000002 syn keyword vbEvents PatternChange PlotActivated PlotSelected
1 0.000002 syn keyword vbEvents PlotUpdated PointActivated PointLabelActivated
1 0.000002 syn keyword vbEvents PointLabelSelected PointLabelUpdated PointSelected
1 0.000002 syn keyword vbEvents PointUpdated PowerQuerySuspend PowerResume
1 0.000002 syn keyword vbEvents PowerStatusChanged PowerSuspend ProcessTag
1 0.000002 syn keyword vbEvents ProcessingTimeout QueryChangeConfig QueryClose
1 0.000002 syn keyword vbEvents QueryComplete QueryCompleted QueryTimeout
1 0.000002 syn keyword vbEvents QueryUnload ReadProperties RepeatedControlLoaded
1 0.000002 syn keyword vbEvents RepeatedControlUnloaded Reposition
1 0.000002 syn keyword vbEvents RequestChangeFileName RequestWriteFile Resize
1 0.000002 syn keyword vbEvents ResultsChanged RetainedProject RollbackTrans
1 0.000002 syn keyword vbEvents RowColChange RowCurrencyChange RowResize
1 0.000003 syn keyword vbEvents RowStatusChanged Scroll SelChange SelectionChanged
1 0.000002 syn keyword vbEvents SendComplete SendProgress SeriesActivated
1 0.000003 syn keyword vbEvents SeriesSelected SeriesUpdated SettingChanged Show
1 0.000002 syn keyword vbEvents SplitChange Start StateChanged StatusUpdate
1 0.000003 syn keyword vbEvents SysColorsChanged Terminate TimeChanged Timer
1 0.000002 syn keyword vbEvents TitleActivated TitleSelected TitleUpdated
1 0.000002 syn keyword vbEvents UnboundAddData UnboundDeleteRow
1 0.000002 syn keyword vbEvents UnboundGetRelativeBookmark UnboundReadData
1 0.000003 syn keyword vbEvents UnboundWriteData Unformat Unload UpClick Updated
1 0.000002 syn keyword vbEvents UserEvent Validate ValidationError
1 0.000002 syn keyword vbEvents VisibleRecordChanged WillAssociate WillChangeData
1 0.000002 syn keyword vbEvents WillDissociate WillExecute WillUpdateRows
1 0.000002 syn keyword vbEvents WriteProperties
1 0.000006 syn keyword vbFunction Abs Array Asc AscB AscW Atn Avg BOF CBool CByte
1 0.000004 syn keyword vbFunction CCur CDate CDbl CInt CLng CSng CStr CVDate CVErr
1 0.000003 syn keyword vbFunction CVar CallByName Cdec Choose Chr ChrB ChrW Command
1 0.000003 syn keyword vbFunction Cos Count CreateObject CurDir DDB Date DateAdd
1 0.000003 syn keyword vbFunction DateDiff DatePart DateSerial DateValue Day Dir
1 0.000003 syn keyword vbFunction DoEvents EOF Environ Error Exp FV FileAttr
1 0.000003 syn keyword vbFunction FileDateTime FileLen FilterFix Fix Format
1 0.000002 syn keyword vbFunction FormatCurrency FormatDateTime FormatNumber
1 0.000003 syn keyword vbFunction FormatPercent FreeFile GetAllStrings GetAttr
1 0.000003 syn keyword vbFunction GetAutoServerSettings GetObject GetSetting Hex
1 0.000003 syn keyword vbFunction Hour IIf IMEStatus IPmt InStr Input InputB
1 0.000003 syn keyword vbFunction InputBox InstrB Int IsArray IsDate IsEmpty IsError
1 0.000003 syn keyword vbFunction IsMissing IsNull IsNumeric IsObject Join LBound
1 0.000056 syn keyword vbFunction LCase LOF LTrim Left LeftB Len LenB LoadPicture
1 0.000039 syn keyword vbFunction LoadResData LoadResPicture LoadResString Loc Log
1 0.000039 syn keyword vbFunction MIRR Max Mid MidB Min Minute Month MonthName
1 0.000053 syn keyword vbFunction MsgBox NPV NPer Now Oct PPmt PV Partition Pmt
1 0.000047 syn keyword vbFunction QBColor RGB RTrim Rate Replace Right RightB Rnd
1 0.000060 syn keyword vbFunction Round SLN SYD Second Seek Sgn Shell Sin Space Spc
1 0.000042 syn keyword vbFunction Split Sqr StDev StDevP Str StrComp StrConv
1 0.000026 syn keyword vbFunction StrReverse String Sum Switch Tab Tan Time
1 0.000031 syn keyword vbFunction TimeSerial TimeValue Timer Trim TypeName UBound
1 0.000037 syn keyword vbFunction UCase Val Var VarP VarType Weekday WeekdayName
1 0.000007 syn keyword vbFunction Year
1 0.000028 syn keyword vbMethods AboutBox Accept Activate Add AddCustom AddFile
1 0.000020 syn keyword vbMethods AddFromFile AddFromGuid AddFromString
1 0.000026 syn keyword vbMethods AddFromTemplate AddItem AddNew AddToAddInToolbar
1 0.000020 syn keyword vbMethods AddToolboxProgID Append AppendAppendChunk
1 0.000032 syn keyword vbMethods AppendChunk Arrange Assert AsyncRead BatchUpdate
1 0.000020 syn keyword vbMethods BeginQueryEdit BeginTrans Bind BuildPath
1 0.000023 syn keyword vbMethods CanPropertyChange Cancel CancelAsyncRead
1 0.000027 syn keyword vbMethods CancelBatch CancelUpdate CaptureImage CellText
1 0.000027 syn keyword vbMethods CellValue Circle Clear ClearFields ClearSel
1 0.000027 syn keyword vbMethods ClearSelCols ClearStructure Clone Close Cls
1 0.000021 syn keyword vbMethods ColContaining CollapseAll ColumnSize CommitTrans
1 0.000031 syn keyword vbMethods CompactDatabase Compose Connect Copy CopyFile
1 0.000021 syn keyword vbMethods CopyFolder CopyQueryDef Count CreateDatabase
1 0.000021 syn keyword vbMethods CreateDragImage CreateEmbed CreateField
1 0.000027 syn keyword vbMethods CreateFolder CreateGroup CreateIndex CreateLink
1 0.000021 syn keyword vbMethods CreatePreparedStatement CreatePropery CreateQuery
1 0.000021 syn keyword vbMethods CreateQueryDef CreateRelation CreateTableDef
1 0.000021 syn keyword vbMethods CreateTextFile CreateToolWindow CreateUser
1 0.000021 syn keyword vbMethods CreateWorkspace Customize Cut Delete
1 0.000021 syn keyword vbMethods DeleteColumnLabels DeleteColumns DeleteFile
1 0.000021 syn keyword vbMethods DeleteFolder DeleteLines DeleteRowLabels
1 0.000015 syn keyword vbMethods DeleteRows DeselectAll DesignerWindow DoVerb Drag
1 0.000003 syn keyword vbMethods Draw DriveExists Edit EditCopy EditPaste EndDoc
1 0.000003 syn keyword vbMethods EnsureVisible EstablishConnection Execute Exists
1 0.000003 syn keyword vbMethods Expand Export ExportReport ExtractIcon Fetch
1 0.000003 syn keyword vbMethods FetchVerbs FileExists Files FillCache Find
1 0.000003 syn keyword vbMethods FindFirst FindItem FindLast FindNext FindPrevious
1 0.000002 syn keyword vbMethods FolderExists Forward GetAbsolutePathName
1 0.000003 syn keyword vbMethods GetBaseName GetBookmark GetChunk GetClipString
1 0.000003 syn keyword vbMethods GetData GetDrive GetDriveName GetFile GetFileName
1 0.000002 syn keyword vbMethods GetFirstVisible GetFolder GetFormat GetHeader
1 0.000002 syn keyword vbMethods GetLineFromChar GetNumTicks GetParentFolderName
1 0.000002 syn keyword vbMethods GetRows GetSelectedPart GetSelection
1 0.000006 syn keyword vbMethods GetSpecialFolder GetTempName GetText
1 0.000003 syn keyword vbMethods GetVisibleCount GoBack GoForward Hide HitTest
1 0.000003 syn keyword vbMethods HoldFields Idle Import InitializeLabels Insert
1 0.000002 syn keyword vbMethods InsertColumnLabels InsertColumns InsertFile
1 0.000002 syn keyword vbMethods InsertLines InsertObjDlg InsertRowLabels
1 0.000005 syn keyword vbMethods InsertRows Item Keys KillDoc Layout Line Lines
1 0.000003 syn keyword vbMethods LinkExecute LinkPoke LinkRequest LinkSend Listen
1 0.000003 syn keyword vbMethods LoadFile LoadResData LoadResPicture LoadResString
1 0.000002 syn keyword vbMethods LogEvent MakeCompileFile MakeCompiledFile
1 0.000002 syn keyword vbMethods MakeReplica MoreResults Move MoveData MoveFile
1 0.000002 syn keyword vbMethods MoveFirst MoveFolder MoveLast MoveNext
1 0.000003 syn keyword vbMethods MovePrevious NavigateTo NewPage NewPassword
1 0.000003 syn keyword vbMethods NextRecordset OLEDrag OnAddinsUpdate OnConnection
1 0.000002 syn keyword vbMethods OnDisconnection OnStartupComplete Open
1 0.000002 syn keyword vbMethods OpenAsTextStream OpenConnection OpenDatabase
1 0.000005 syn keyword vbMethods OpenQueryDef OpenRecordset OpenResultset OpenURL
1 0.000003 syn keyword vbMethods Overlay PSet PaintPicture PastSpecialDlg Paste
1 0.000003 syn keyword vbMethods PeekData Play Point PopulatePartial PopupMenu
1 0.000003 syn keyword vbMethods Print PrintForm PrintReport PropertyChanged Quit
1 0.000002 syn keyword vbMethods Raise RandomDataFill RandomFillColumns
1 0.000003 syn keyword vbMethods RandomFillRows ReFill Read ReadAll ReadFromFile
1 0.000003 syn keyword vbMethods ReadLine ReadProperty Rebind Refresh RefreshLink
1 0.000002 syn keyword vbMethods RegisterDatabase ReleaseInstance Reload Remove
1 0.000002 syn keyword vbMethods RemoveAddInFromToolbar RemoveAll RemoveItem Render
1 0.000003 syn keyword vbMethods RepairDatabase ReplaceLine Reply ReplyAll Requery
1 0.000002 syn keyword vbMethods ResetCustom ResetCustomLabel ResolveName
1 0.000002 syn keyword vbMethods RestoreToolbar Resync Rollback RollbackTrans
1 0.000003 syn keyword vbMethods RowBookmark RowContaining RowTop Save SaveAs
1 0.000003 syn keyword vbMethods SaveFile SaveToFile SaveToOle1File SaveToolbar
1 0.000003 syn keyword vbMethods Scale ScaleX ScaleY Scroll SelPrint SelectAll
1 0.000005 syn keyword vbMethods SelectPart Send SendData Set SetAutoServerSettings
1 0.000003 syn keyword vbMethods SetData SetFocus SetOption SetSelection SetSize
1 0.000003 syn keyword vbMethods SetText SetViewport Show ShowColor ShowFont
1 0.000002 syn keyword vbMethods ShowHelp ShowOpen ShowPrinter ShowSave
1 0.000003 syn keyword vbMethods ShowWhatsThis SignOff SignOn Size Skip SkipLine
1 0.000002 syn keyword vbMethods Span Split SplitContaining StartLabelEdit
1 0.000003 syn keyword vbMethods StartLogging Stop Synchronize Tag TextHeight
1 0.000004 syn keyword vbMethods TextWidth ToDefaults Trace TwipsToChartPart
1 0.000002 syn keyword vbMethods TypeByChartType URLFor Update UpdateControls
1 0.000006 syn keyword vbMethods UpdateRecord UpdateRow Upto ValidateControls Value
1 0.000002 syn keyword vbMethods WhatsThisMode Write WriteBlankLines WriteLine
1 0.000002 syn keyword vbMethods WriteProperty WriteTemplate ZOrder
1 0.000002 syn keyword vbMethods rdoCreateEnvironment rdoRegisterDataSource
1 0.000006 syn keyword vbStatement Alias AppActivate As Base Beep Begin Call ChDir
1 0.000006 syn keyword vbStatement ChDrive Close Const Date Declare DefBool DefByte
1 0.000003 syn keyword vbStatement DefCur DefDate DefDbl DefDec DefInt DefLng DefObj
1 0.000003 syn keyword vbStatement DefSng DefStr DefVar Deftype DeleteSetting Dim Do
1 0.000003 syn keyword vbStatement Each ElseIf End Enum Erase Error Event Exit
1 0.000003 syn keyword vbStatement Explicit FileCopy For ForEach Function Get GoSub
1 0.000003 syn keyword vbStatement GoTo Gosub Implements Kill LSet Let Lib LineInput
1 0.000004 syn keyword vbStatement Load Lock Loop Mid MkDir Name Next On OnError Open
1 0.000003 syn keyword vbStatement Option Preserve Private Property Public Put RSet
1 0.000005 syn keyword vbStatement RaiseEvent Randomize ReDim Redim Reset Resume
1 0.000003 syn keyword vbStatement Return RmDir SavePicture SaveSetting Seek SendKeys
1 0.000003 syn keyword vbStatement Sendkeys Set SetAttr Static Step Stop Sub Time
1 0.000003 syn keyword vbStatement Type Unload Unlock Until Wend While Width With
1 0.000002 syn keyword vbStatement Write
1 0.000005 syn keyword vbKeyword As Binary ByRef ByVal Date Empty Error Friend Get
1 0.000004 syn keyword vbKeyword Input Is Len Lock Me Mid New Nothing Null On
1 0.000003 syn keyword vbKeyword Option Optional ParamArray Print Private Property
1 0.000003 syn keyword vbKeyword Public PublicNotCreateable OnNewProcessSingleUse
1 0.000003 syn keyword vbKeyword InSameProcessMultiUse GlobalMultiUse Resume Seek
1 0.000005 syn keyword vbKeyword Set Static Step String Time WithEvents
1 0.000004 syn keyword vbTodo contained TODO
"Datatypes
1 0.000007 syn keyword vbTypes Boolean Byte Currency Date Decimal Double Empty
1 0.000003 syn keyword vbTypes Integer Long Object Single String Variant
"VB defined values
1 0.000005 syn keyword vbDefine dbBigInt dbBinary dbBoolean dbByte dbChar
1 0.000003 syn keyword vbDefine dbCurrency dbDate dbDecimal dbDouble dbFloat
1 0.000003 syn keyword vbDefine dbGUID dbInteger dbLong dbLongBinary dbMemo
1 0.000003 syn keyword vbDefine dbNumeric dbSingle dbText dbTime dbTimeStamp
1 0.000002 syn keyword vbDefine dbVarBinary
"VB defined values
1 0.000003 syn keyword vbDefine vb3DDKShadow vb3DFace vb3DHighlight vb3DLight
1 0.000002 syn keyword vbDefine vb3DShadow vbAbort vbAbortRetryIgnore
1 0.000002 syn keyword vbDefine vbActiveBorder vbActiveTitleBar vbAlias
1 0.000002 syn keyword vbDefine vbApplicationModal vbApplicationWorkspace
1 0.000002 syn keyword vbDefine vbAppTaskManager vbAppWindows vbArchive vbArray
1 0.000003 syn keyword vbDefine vbBack vbBinaryCompare vbBlack vbBlue vbBoolean
1 0.000002 syn keyword vbDefine vbButtonFace vbButtonShadow vbButtonText vbByte
1 0.000005 syn keyword vbDefine vbCalGreg vbCalHijri vbCancel vbCr vbCritical
1 0.000003 syn keyword vbDefine vbCrLf vbCurrency vbCyan vbDatabaseCompare
1 0.000002 syn keyword vbDefine vbDataObject vbDate vbDecimal vbDefaultButton1
1 0.000002 syn keyword vbDefine vbDefaultButton2 vbDefaultButton3 vbDefaultButton4
1 0.000003 syn keyword vbDefine vbDesktop vbDirectory vbDouble vbEmpty vbError
1 0.000002 syn keyword vbDefine vbExclamation vbFirstFourDays vbFirstFullWeek
1 0.000002 syn keyword vbDefine vbFirstJan1 vbFormCode vbFormControlMenu
1 0.000002 syn keyword vbDefine vbFormFeed vbFormMDIForm vbFriday vbFromUnicode
1 0.000003 syn keyword vbDefine vbGrayText vbGreen vbHidden vbHide vbHighlight
1 0.000002 syn keyword vbDefine vbHighlightText vbHiragana vbIgnore vbIMEAlphaDbl
1 0.000002 syn keyword vbDefine vbIMEAlphaSng vbIMEDisable vbIMEHiragana
1 0.000002 syn keyword vbDefine vbIMEKatakanaDbl vbIMEKatakanaSng vbIMEModeAlpha
1 0.000002 syn keyword vbDefine vbIMEModeAlphaFull vbIMEModeDisable
1 0.000002 syn keyword vbDefine vbIMEModeHangul vbIMEModeHangulFull
1 0.000004 syn keyword vbDefine vbIMEModeHiragana vbIMEModeKatakana
1 0.000002 syn keyword vbDefine vbIMEModeKatakanaHalf vbIMEModeNoControl
1 0.000002 syn keyword vbDefine vbIMEModeOff vbIMEModeOn vbIMENoOp vbIMEOff
1 0.000002 syn keyword vbDefine vbIMEOn vbInactiveBorder vbInactiveCaptionText
1 0.000004 syn keyword vbDefine vbInactiveTitleBar vbInfoBackground vbInformation
1 0.000003 syn keyword vbDefine vbInfoText vbInteger vbKatakana vbKey0 vbKey1
1 0.000003 syn keyword vbDefine vbKey2 vbKey3 vbKey4 vbKey5 vbKey6 vbKey7 vbKey8
1 0.000003 syn keyword vbDefine vbKey9 vbKeyA vbKeyAdd vbKeyB vbKeyBack vbKeyC
1 0.000006 syn keyword vbDefine vbKeyCancel vbKeyCapital vbKeyClear vbKeyControl
1 0.000002 syn keyword vbDefine vbKeyD vbKeyDecimal vbKeyDelete vbKeyDivide
1 0.000003 syn keyword vbDefine vbKeyDown vbKeyE vbKeyEnd vbKeyEscape vbKeyExecute
1 0.000003 syn keyword vbDefine vbKeyF vbKeyF1 vbKeyF10 vbKeyF11 vbKeyF12 vbKeyF13
1 0.000003 syn keyword vbDefine vbKeyF14 vbKeyF15 vbKeyF16 vbKeyF2 vbKeyF3 vbKeyF4
1 0.000003 syn keyword vbDefine vbKeyF5 vbKeyF6 vbKeyF7 vbKeyF8 vbKeyF9 vbKeyG
1 0.000002 syn keyword vbDefine vbKeyH vbKeyHelp vbKeyHome vbKeyI vbKeyInsert
1 0.000003 syn keyword vbDefine vbKeyJ vbKeyK vbKeyL vbKeyLButton vbKeyLeft vbKeyM
1 0.000005 syn keyword vbDefine vbKeyMButton vbKeyMenu vbKeyMultiply vbKeyN
1 0.000002 syn keyword vbDefine vbKeyNumlock vbKeyNumpad0 vbKeyNumpad1
1 0.000002 syn keyword vbDefine vbKeyNumpad2 vbKeyNumpad3 vbKeyNumpad4
1 0.000002 syn keyword vbDefine vbKeyNumpad5 vbKeyNumpad6 vbKeyNumpad7
1 0.000002 syn keyword vbDefine vbKeyNumpad8 vbKeyNumpad9 vbKeyO vbKeyP
1 0.000002 syn keyword vbDefine vbKeyPageDown vbKeyPageUp vbKeyPause vbKeyPrint
1 0.000002 syn keyword vbDefine vbKeyQ vbKeyR vbKeyRButton vbKeyReturn vbKeyRight
1 0.000002 syn keyword vbDefine vbKeyS vbKeySelect vbKeySeparator vbKeyShift
1 0.000002 syn keyword vbDefine vbKeySnapshot vbKeySpace vbKeySubtract vbKeyT
1 0.000003 syn keyword vbDefine vbKeyTab vbKeyU vbKeyUp vbKeyV vbKeyW vbKeyX
1 0.000003 syn keyword vbDefine vbKeyY vbKeyZ vbLf vbLong vbLowerCase vbMagenta
1 0.000002 syn keyword vbDefine vbMaximizedFocus vbMenuBar vbMenuText
1 0.000002 syn keyword vbDefine vbMinimizedFocus vbMinimizedNoFocus vbMonday
1 0.000002 syn keyword vbDefine vbMsgBox vbMsgBoxHelpButton vbMsgBoxRight
1 0.000002 syn keyword vbDefine vbMsgBoxRtlReading vbMsgBoxSetForeground
1 0.000003 syn keyword vbDefine vbMsgBoxText vbNarrow vbNewLine vbNo vbNormal
1 0.000006 syn keyword vbDefine vbNormalFocus vbNormalNoFocus vbNull vbNullChar
1 0.000003 syn keyword vbDefine vbNullString vbObject vbObjectError vbOK
1 0.000002 syn keyword vbDefine vbOKCancel vbOKOnly vbProperCase vbQuestion
1 0.000003 syn keyword vbDefine vbReadOnly vbRed vbRetry vbRetryCancel vbSaturday
1 0.000002 syn keyword vbDefine vbScrollBars vbSingle vbString vbSunday vbSystem
1 0.000002 syn keyword vbDefine vbSystemModal vbTab vbTextCompare vbThursday
1 0.000002 syn keyword vbDefine vbTitleBarText vbTuesday vbUnicode vbUpperCase
1 0.000002 syn keyword vbDefine vbUseSystem vbUseSystemDayOfWeek vbVariant
1 0.000003 syn keyword vbDefine vbVerticalTab vbVolume vbWednesday vbWhite vbWide
1 0.000002 syn keyword vbDefine vbWindowBackground vbWindowFrame vbWindowText
1 0.000002 syn keyword vbDefine vbYellow vbYes vbYesNo vbYesNoCancel
"Numbers
"integer number, or floating point number without a dot.
1 0.000006 syn match vbNumber "\<\d\+\>"
"floating point number, with dot
1 0.000003 syn match vbNumber "\<\d\+\.\d*\>"
"floating point number, starting with a dot
1 0.000005 syn match vbNumber "\.\d\+\>"
"syn match vbNumber "{[[:xdigit:]-]\+}\|&[hH][[:xdigit:]]\+&"
"syn match vbNumber ":[[:xdigit:]]\+"
"syn match vbNumber "[-+]\=\<\d\+\>"
1 0.000006 syn match vbFloat "[-+]\=\<\d\+[eE][\-+]\=\d\+"
1 0.000005 syn match vbFloat "[-+]\=\<\d\+\.\d*\([eE][\-+]\=\d\+\)\="
1 0.000004 syn match vbFloat "[-+]\=\<\.\d\+\([eE][\-+]\=\d\+\)\="
" String and Character contstants
1 0.000007 syn region vbString start=+"+ end=+"\|$+
1 0.000008 syn region vbComment start="\(^\|\s\)REM\s" end="$" contains=vbTodo
1 0.000008 syn region vbComment start="\(^\|\s\)\'" end="$" contains=vbTodo
1 0.000005 syn match vbLineNumber "^\d\+\(\s\|$\)"
1 0.000008 syn match vbTypeSpecifier "[a-zA-Z0-9][\$%&!#]"ms=s+1
1 0.000005 syn match vbTypeSpecifier "#[a-zA-Z0-9]"me=e-1
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
1 0.000003 hi def link vbBoolean Boolean
1 0.000002 hi def link vbLineNumber Comment
1 0.000002 hi def link vbComment Comment
1 0.000002 hi def link vbConditional Conditional
1 0.000002 hi def link vbConst Constant
1 0.000002 hi def link vbDefine Constant
1 0.000003 hi def link vbError Error
1 0.000002 hi def link vbFunction Identifier
1 0.000004 hi def link vbIdentifier Identifier
1 0.000002 hi def link vbNumber Number
1 0.000002 hi def link vbFloat Float
1 0.000002 hi def link vbMethods PreProc
1 0.000002 hi def link vbOperator Operator
1 0.000002 hi def link vbRepeat Repeat
1 0.000002 hi def link vbString String
1 0.000002 hi def link vbStatement Statement
1 0.000002 hi def link vbKeyword Statement
1 0.000002 hi def link vbEvents Special
1 0.000002 hi def link vbTodo Todo
1 0.000002 hi def link vbTypes Type
1 0.000002 hi def link vbTypeSpecifier Type
1 0.000003 let b:current_syntax = "vb"
" vim: ts=8
SCRIPT /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/syntax/css.vim
Sourced 1 time
Total time: 0.007169
Self time: 0.007169
count total (s) self (s)
" Vim syntax file
" Language: Cascading Style Sheets
" Previous Contributor List:
" Claudio Fleiner <claudio@fleiner.com> (Maintainer)
" Yeti (Add full CSS2, HTML4 support)
" Nikolai Weibull (Add CSS2 support)
" Maintainer: Jules Wang <w.jq0722@gmail.com>
" URL: https://github.com/JulesWang/css.vim
" Last Change: 2017 Jan 14
" cssClassName updated by Ryuichi Hayashida Jan 2016
" quit when a syntax file was already loaded
1 0.000004 if !exists("main_syntax")
if exists("b:current_syntax")
finish
endif
let main_syntax = 'css'
elseif exists("b:current_syntax") && b:current_syntax == "css"
finish
endif
1 0.000003 let s:cpo_save = &cpo
1 0.000004 set cpo&vim
1 0.000001 syn case ignore
" HTML4 tags
1 0.000006 syn keyword cssTagName abbr address area a b base
1 0.000003 syn keyword cssTagName bdo blockquote body br button
1 0.000003 syn keyword cssTagName caption cite code col colgroup dd del
1 0.000003 syn keyword cssTagName dfn div dl dt em fieldset form
1 0.000007 syn keyword cssTagName h1 h2 h3 h4 h5 h6 head hr html img i
1 0.000004 syn keyword cssTagName iframe input ins isindex kbd label legend li
1 0.000003 syn keyword cssTagName link map menu meta noscript ol optgroup
1 0.000003 syn keyword cssTagName option p param pre q s samp script small
1 0.000003 syn keyword cssTagName span strong sub sup tbody td
1 0.000003 syn keyword cssTagName textarea tfoot th thead title tr ul u var
1 0.000002 syn keyword cssTagName object svg
1 0.000009 syn match cssTagName /\<select\>\|\<style\>\|\<table\>/
" 34 HTML5 tags
1 0.000003 syn keyword cssTagName article aside audio bdi canvas command data
1 0.000006 syn keyword cssTagName datalist details dialog embed figcaption figure footer
1 0.000003 syn keyword cssTagName header hgroup keygen main mark menuitem meter nav
1 0.000003 syn keyword cssTagName output progress rt rp ruby section
1 0.000003 syn keyword cssTagName source summary time track video wbr
" Tags not supported in HTML5
" acronym applet basefont big center dir
" font frame frameset noframes strike tt
1 0.000003 syn match cssTagName "\*"
" selectors
1 0.000005 syn match cssSelectorOp "[,>+~]"
1 0.000005 syn match cssSelectorOp2 "[~|^$*]\?=" contained
1 0.000016 syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ
" .class and #id
1 0.000010 syn match cssClassName "\.-\=[A-Za-z_][A-Za-z0-9_-]*" contains=cssClassNameDot
1 0.000002 syn match cssClassNameDot contained '\.'
1 0.000001 try
1 0.000006 syn match cssIdentifier "#[A-Za-zÀ-ÿ_@][A-Za-zÀ-ÿ0-9_@-]*"
1 0.000001 catch /^.*/
syn match cssIdentifier "#[A-Za-z_@][A-Za-z0-9_@-]*"
endtry
" digits
1 0.000008 syn match cssValueInteger contained "[-+]\=\d\+" contains=cssUnitDecorators
1 0.000008 syn match cssValueNumber contained "[-+]\=\d\+\(\.\d*\)\=" contains=cssUnitDecorators
1 0.000007 syn match cssValueLength contained "[-+]\=\d\+\(\.\d*\)\=\(%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|rem\|dpi\|dppx\|dpcm\)\>" contains=cssUnitDecorators
1 0.000006 syn match cssValueAngle contained "[-+]\=\d\+\(\.\d*\)\=\(deg\|grad\|rad\)\>" contains=cssUnitDecorators
1 0.000009 syn match cssValueTime contained "+\=\d\+\(\.\d*\)\=\(ms\|s\)\>" contains=cssUnitDecorators
1 0.000006 syn match cssValueFrequency contained "+\=\d\+\(\.\d*\)\=\(Hz\|kHz\)\>" contains=cssUnitDecorators
1 0.000007 syn match cssIncludeKeyword /@\(-[a-z]\+-\)\=\(media\|keyframes\|import\|charset\|namespace\|page\)/ contained
" @media
1 0.000030 syn region cssInclude start=/@media\>/ end=/\ze{/ skipwhite skipnl contains=cssMediaProp,cssValueLength,cssMediaKeyword,cssValueInteger,cssMediaAttr,cssVendor,cssMediaType,cssIncludeKeyword,cssMediaComma,cssComment nextgroup=cssMediaBlock
1 0.000005 syn keyword cssMediaType contained screen print aural braille embossed handheld projection tty tv speech all contained skipwhite skipnl
1 0.000003 syn keyword cssMediaKeyword only not and contained
1 0.000893 syn region cssMediaBlock transparent matchgroup=cssBraces start='{' end='}' contains=css.*Attr,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssTagName,cssClassName,cssIdentifier,cssPseudoClass,cssSelectorOp,cssSelectorOp2,cssAttributeSelector fold
1 0.000003 syn match cssMediaComma "," skipwhite skipnl contained
" Reference: http://www.w3.org/TR/css3-mediaqueries/
1 0.000004 syn keyword cssMediaProp contained width height orientation scan grid
1 0.000005 syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(\(device\)-\)\=aspect-ratio/
1 0.000006 syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-pixel-ratio/
1 0.000006 syn match cssMediaProp contained /\(\(max\|min\)-\)\=device-\(height\|width\)/
1 0.000007 syn match cssMediaProp contained /\(\(max\|min\)-\)\=\(height\|width\|resolution\|monochrome\|color\(-index\)\=\)/
1 0.000003 syn keyword cssMediaAttr contained portrait landscape progressive interlace
" @page
" http://www.w3.org/TR/css3-page/
1 0.000013 syn match cssPage "@page\>[^{]*{\@=" contains=cssPagePseudo,cssIncludeKeyword nextgroup=cssPageWrap transparent skipwhite skipnl
1 0.000004 syn match cssPagePseudo /:\(left\|right\|first\|blank\)/ contained skipwhite skipnl
1 0.000564 syn region cssPageWrap contained transparent matchgroup=cssBraces start="{" end="}" contains=cssPageMargin,cssPageProp,cssAttrRegion,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssHacks
1 0.000007 syn match cssPageMargin /@\(\(top\|left\|right\|bottom\)-\(left\|center\|right\|middle\|bottom\)\)\(-corner\)\=/ contained nextgroup=cssDefinition skipwhite skipnl
1 0.000002 syn keyword cssPageProp contained content size
" http://www.w3.org/TR/CSS2/page.html#break-inside
1 0.000002 syn keyword cssPageProp contained orphans widows
" @keyframe
" http://www.w3.org/TR/css3-animations/#keyframes
1 0.000012 syn match cssKeyFrame "@\(-[a-z]\+-\)\=keyframes\>[^{]*{\@=" nextgroup=cssKeyFrameWrap contains=cssVendor,cssIncludeKeyword skipwhite skipnl transparent
1 0.000008 syn region cssKeyFrameWrap contained transparent matchgroup=cssBraces start="{" end="}" contains=cssKeyFrameSelector
1 0.000005 syn match cssKeyFrameSelector /\(\d*%\|from\|to\)\=/ contained skipwhite skipnl nextgroup=cssDefinition
" @import
1 0.000020 syn region cssInclude start=/@import\>/ end=/\ze;/ transparent contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssIncludeKeyword,cssURL,cssMediaProp,cssValueLength,cssMediaKeyword,cssValueInteger,cssMediaAttr,cssVendor,cssMediaType
1 0.000010 syn region cssInclude start=/@charset\>/ end=/\ze;/ transparent contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssIncludeKeyword
1 0.000013 syn region cssInclude start=/@namespace\>/ end=/\ze;/ transparent contains=cssStringQ,cssStringQQ,cssUnicodeEscape,cssComment,cssIncludeKeyword
" @font-face
" http://www.w3.org/TR/css3-fonts/#at-font-face-rule
1 0.000008 syn match cssFontDescriptor "@font-face\>" nextgroup=cssFontDescriptorBlock skipwhite skipnl
1 0.000269 syn region cssFontDescriptorBlock contained transparent matchgroup=cssBraces start="{" end="}" contains=cssComment,cssError,cssUnicodeEscape,cssCommonAttr,cssFontDescriptorProp,cssValue.*,cssFontDescriptorFunction,cssFontDescriptorAttr,cssNoise
1 0.000003 syn match cssFontDescriptorProp contained "\<font-family\>"
1 0.000004 syn keyword cssFontDescriptorProp contained src
1 0.000004 syn match cssFontDescriptorProp contained "\<font-\(style\|weight\|stretch\)\>"
1 0.000003 syn match cssFontDescriptorProp contained "\<unicode-range\>"
1 0.000006 syn match cssFontDescriptorProp contained "\<font-\(variant\|feature-settings\)\>"
" src functions
1 0.000010 syn region cssFontDescriptorFunction contained matchgroup=cssFunctionName start="\<\(uri\|url\|local\|format\)\s*(" end=")" contains=cssStringQ,cssStringQQ oneline keepend
" font-sytle and font-weight attributes
1 0.000003 syn keyword cssFontDescriptorAttr contained normal italic oblique bold
" font-stretch attributes
1 0.000004 syn match cssFontDescriptorAttr contained "\<\(\(ultra\|extra\|semi\)-\)\=\(condensed\|expanded\)\>"
" unicode-range attributes
1 0.000003 syn match cssFontDescriptorAttr contained "U+[0-9A-Fa-f?]\+"
1 0.000002 syn match cssFontDescriptorAttr contained "U+\x\+-\x\+"
" font-feature-settings attributes
1 0.000002 syn keyword cssFontDescriptorAttr contained on off
" The 16 basic color names
1 0.000006 syn keyword cssColor contained aqua black blue fuchsia gray green lime maroon navy olive purple red silver teal yellow
" 130 more color names
1 0.000003 syn keyword cssColor contained aliceblue antiquewhite aquamarine azure
1 0.000008 syn keyword cssColor contained beige bisque blanchedalmond blueviolet brown burlywood
1 0.000004 syn keyword cssColor contained cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan
1 0.000005 syn match cssColor contained /\<dark\(blue\|cyan\|goldenrod\|gray\|green\|grey\|khaki\)\>/
1 0.000023 syn match cssColor contained /\<dark\(magenta\|olivegreen\|orange\|orchid\|red\|salmon\|seagreen\)\>/
1 0.000005 syn match cssColor contained /\<darkslate\(blue\|gray\|grey\)\>/
1 0.000004 syn match cssColor contained /\<dark\(turquoise\|violet\)\>/
1 0.000004 syn keyword cssColor contained deeppink deepskyblue dimgray dimgrey dodgerblue firebrick
1 0.000004 syn keyword cssColor contained floralwhite forestgreen gainsboro ghostwhite gold
1 0.000008 syn keyword cssColor contained goldenrod greenyellow grey honeydew hotpink
1 0.000004 syn keyword cssColor contained indianred indigo ivory khaki lavender lavenderblush lawngreen
1 0.000003 syn keyword cssColor contained lemonchiffon limegreen linen magenta
1 0.000005 syn match cssColor contained /\<light\(blue\|coral\|cyan\|goldenrodyellow\|gray\|green\)\>/
1 0.000005 syn match cssColor contained /\<light\(grey\|pink\|salmon\|seagreen\|skyblue\|yellow\)\>/
1 0.000004 syn match cssColor contained /\<light\(slategray\|slategrey\|steelblue\)\>/
1 0.000005 syn match cssColor contained /\<medium\(aquamarine\|blue\|orchid\|purple\|seagreen\)\>/
1 0.000005 syn match cssColor contained /\<medium\(slateblue\|springgreen\|turquoise\|violetred\)\>/
1 0.000003 syn keyword cssColor contained midnightblue mintcream mistyrose moccasin navajowhite
1 0.000003 syn keyword cssColor contained oldlace olivedrab orange orangered orchid
1 0.000004 syn match cssColor contained /\<pale\(goldenrod\|green\|turquoise\|violetred\)\>/
1 0.000003 syn keyword cssColor contained papayawhip peachpuff peru pink plum powderblue
1 0.000003 syn keyword cssColor contained rosybrown royalblue saddlebrown salmon sandybrown
1 0.000003 syn keyword cssColor contained seagreen seashell sienna skyblue slateblue
1 0.000004 syn keyword cssColor contained slategray slategrey snow springgreen steelblue tan
1 0.000003 syn keyword cssColor contained thistle tomato turquoise violet wheat
1 0.000005 syn keyword cssColor contained whitesmoke yellowgreen
" FIXME: These are actually case-insensitive too, but (a) specs recommend using
" mixed-case (b) it's hard to highlight the word `Background' correctly in
" all situations
1 0.000002 syn case match
1 0.000007 syn keyword cssColor contained ActiveBorder ActiveCaption AppWorkspace ButtonFace ButtonHighlight ButtonShadow ButtonText CaptionText GrayText Highlight HighlightText InactiveBorder InactiveCaption InactiveCaptionText InfoBackground InfoText Menu MenuText Scrollbar ThreeDDarkShadow ThreeDFace ThreeDHighlight ThreeDLightShadow ThreeDShadow Window WindowFrame WindowText Background
1 0.000001 syn case ignore
1 0.000003 syn match cssImportant contained "!\s*important\>"
1 0.000006 syn match cssColor contained "\<transparent\>"
1 0.000006 syn match cssColor contained "\<currentColor\>"
1 0.000003 syn match cssColor contained "\<white\>"
1 0.000005 syn match cssColor contained "#[0-9A-Fa-f]\{3\}\>" contains=cssUnitDecorators
1 0.000005 syn match cssColor contained "#[0-9A-Fa-f]\{6\}\>" contains=cssUnitDecorators
1 0.000009 syn region cssURL contained matchgroup=cssFunctionName start="\<url\s*(" end=")" contains=cssStringQ,cssStringQQ oneline
1 0.000015 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgb\|clip\|attr\|counter\|rect\|cubic-bezier\|steps\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma
1 0.000018 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(rgba\|hsl\|hsla\|color-stop\|from\|to\)\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunctionComma,cssFunction
1 0.000018 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(linear-\|radial-\)\=\gradient\s*(" end=")" oneline contains=cssColor,cssValueInteger,cssValueNumber,cssValueLength,cssFunction,cssGradientAttr,cssFunctionComma
1 0.000016 syn region cssFunction contained matchgroup=cssFunctionName start="\<\(matrix\(3d\)\=\|scale\(3d\|X\|Y\|Z\)\=\|translate\(3d\|X\|Y\|Z\)\=\|skew\(X\|Y\)\=\|rotate\(3d\|X\|Y\|Z\)\=\|perspective\)\s*(" end=")" oneline contains=cssValueInteger,cssValueNumber,cssValueLength,cssValueAngle,cssFunctionComma
1 0.000004 syn keyword cssGradientAttr contained top bottom left right cover center middle ellipse at
1 0.000002 syn match cssFunctionComma contained ","
" Common Prop and Attr
1 0.000004 syn keyword cssCommonAttr contained auto none inherit all default normal
1 0.000003 syn keyword cssCommonAttr contained top bottom center stretch hidden visible
"------------------------------------------------
" CSS Animations
" http://www.w3.org/TR/css3-animations/
1 0.000012 syn match cssAnimationProp contained "\<animation\(-\(delay\|direction\|duration\|fill-mode\|name\|play-state\|timing-function\|iteration-count\)\)\=\>"
" animation-direction attributes
1 0.000004 syn keyword cssAnimationAttr contained alternate reverse
1 0.000003 syn match cssAnimationAttr contained "\<alternate-reverse\>"
" animation-fill-mode attributes
1 0.000002 syn keyword cssAnimationAttr contained forwards backwards both
" animation-play-state attributes
1 0.000002 syn keyword cssAnimationAttr contained running paused
" animation-iteration-count attributes
1 0.000001 syn keyword cssAnimationAttr contained infinite
"------------------------------------------------
" CSS Backgrounds and Borders Module Level 3
" http://www.w3.org/TR/css3-background/
1 0.000013 syn match cssBackgroundProp contained "\<background\(-\(attachment\|clip\|color\|image\|origin\|position\|repeat\|size\)\)\=\>"
" background-attachment attributes
1 0.000007 syn keyword cssBackgroundAttr contained scroll fixed local
" background-position attributes
1 0.000002 syn keyword cssBackgroundAttr contained left center right top bottom
" background-repeat attributes
1 0.000003 syn match cssBackgroundAttr contained "\<no-repeat\>"
1 0.000005 syn match cssBackgroundAttr contained "\<repeat\(-[xy]\)\=\>"
1 0.000002 syn keyword cssBackgroundAttr contained space round
" background-size attributes
1 0.000002 syn keyword cssBackgroundAttr contained cover contain
1 0.000007 syn match cssBorderProp contained "\<border\(-\(top\|right\|bottom\|left\)\)\=\(-\(width\|color\|style\)\)\=\>"
1 0.000004 syn match cssBorderProp contained "\<border\(-\(top\|bottom\)-\(left\|right\)\)\=-radius\>"
1 0.000008 syn match cssBorderProp contained "\<border-image\(-\(outset\|repeat\|slice\|source\|width\)\)\=\>"
1 0.000003 syn match cssBorderProp contained "\<box-decoration-break\>"
1 0.000002 syn match cssBorderProp contained "\<box-shadow\>"
" border-image attributes
1 0.000004 syn keyword cssBorderAttr contained stretch round space fill
" border-style attributes
1 0.000006 syn keyword cssBorderAttr contained dotted dashed solid double groove ridge inset outset
" border-width attributes
1 0.000002 syn keyword cssBorderAttr contained thin thick medium
" box-decoration-break attributes
1 0.000002 syn keyword cssBorderAttr contained clone slice
"------------------------------------------------
1 0.000008 syn match cssBoxProp contained "\<padding\(-\(top\|right\|bottom\|left\)\)\=\>"
1 0.000006 syn match cssBoxProp contained "\<margin\(-\(top\|right\|bottom\|left\)\)\=\>"
1 0.000003 syn match cssBoxProp contained "\<overflow\(-\(x\|y\|style\)\)\=\>"
1 0.000022 syn match cssBoxProp contained "\<rotation\(-point\)\=\>"
1 0.000005 syn keyword cssBoxAttr contained visible hidden scroll auto
1 0.000003 syn match cssBoxAttr contained "\<no-\(display\|content\)\>"
1 0.000003 syn keyword cssColorProp contained opacity
1 0.000003 syn match cssColorProp contained "\<color-profile\>"
1 0.000005 syn match cssColorProp contained "\<rendering-intent\>"
1 0.000005 syn match cssDimensionProp contained "\<\(min\|max\)-\(width\|height\)\>"
1 0.000002 syn keyword cssDimensionProp contained height
1 0.000001 syn keyword cssDimensionProp contained width
" shadow and sizing are in other property groups
1 0.000009 syn match cssFlexibleBoxProp contained "\<box-\(align\|direction\|flex\|ordinal-group\|orient\|pack\|shadow\|sizing\)\>"
1 0.000004 syn keyword cssFlexibleBoxAttr contained start end baseline
1 0.000012 syn keyword cssFlexibleBoxAttr contained reverse
1 0.000002 syn keyword cssFlexibleBoxAttr contained single multiple
1 0.000001 syn keyword cssFlexibleBoxAttr contained horizontal
1 0.000003 syn match cssFlexibleBoxAttr contained "\<vertical\(-align\)\@!\>" "escape vertical-align
1 0.000003 syn match cssFlexibleBoxAttr contained "\<\(inline\|block\)-axis\>"
" CSS Fonts Module Level 3
" http://www.w3.org/TR/css-fonts-3/
1 0.000012 syn match cssFontProp contained "\<font\(-\(family\|\|feature-settings\|kerning\|language-override\|size\(-adjust\)\=\|stretch\|style\|synthesis\|variant\(-\(alternates\|caps\|east-asian\|ligatures\|numeric\|position\)\)\=\|weight\)\)\=\>"
" font attributes
1 0.000006 syn keyword cssFontAttr contained icon menu caption
1 0.000016 syn match cssFontAttr contained "\<small-\(caps\|caption\)\>"
1 0.000007 syn match cssFontAttr contained "\<message-box\>"
1 0.000003 syn match cssFontAttr contained "\<status-bar\>"
1 0.000002 syn keyword cssFontAttr contained larger smaller
1 0.000003 syn match cssFontAttr contained "\<\(x\{1,2\}-\)\=\(large\|small\)\>"
" font-family attributes
1 0.000003 syn match cssFontAttr contained "\<\(sans-\)\=serif\>"
1 0.000012 syn keyword cssFontAttr contained Antiqua Arial Black Book Charcoal Comic Courier Dingbats Gadget Geneva Georgia Grande Helvetica Impact Linotype Lucida MS Monaco Neue New Palatino Roboto Roman Symbol Tahoma Times Trebuchet Verdana Webdings Wingdings York Zapf
1 0.000002 syn keyword cssFontAttr contained cursive fantasy monospace
" font-feature-settings attributes
1 0.000002 syn keyword cssFontAttr contained on off
" font-stretch attributes
1 0.000004 syn match cssFontAttr contained "\<\(\(ultra\|extra\|semi\)-\)\=\(condensed\|expanded\)\>"
" font-style attributes
1 0.000002 syn keyword cssFontAttr contained italic oblique
" font-synthesis attributes
1 0.000002 syn keyword cssFontAttr contained weight style
" font-weight attributes
1 0.000002 syn keyword cssFontAttr contained bold bolder lighter
" TODO: font-variant-* attributes
"------------------------------------------------
" Webkit specific property/attributes
1 0.000003 syn match cssFontProp contained "\<font-smooth\>"
1 0.000003 syn match cssFontAttr contained "\<\(subpixel-\)\=\antialiased\>"
" CSS Multi-column Layout Module
" http://www.w3.org/TR/css3-multicol/
1 0.000006 syn match cssMultiColumnProp contained "\<break-\(after\|before\|inside\)\>"
1 0.000005 syn match cssMultiColumnProp contained "\<column-\(count\|fill\|gap\|rule\(-\(color\|style\|width\)\)\=\|span\|width\)\>"
1 0.000004 syn keyword cssMultiColumnProp contained columns
1 0.000004 syn keyword cssMultiColumnAttr contained balance medium
1 0.000003 syn keyword cssMultiColumnAttr contained always avoid left right page column
1 0.000003 syn match cssMultiColumnAttr contained "\<avoid-\(page\|column\)\>"
" http://www.w3.org/TR/css3-break/#page-break
1 0.000004 syn match cssMultiColumnProp contained "\<page\(-break-\(before\|after\|inside\)\)\=\>"
" TODO find following items in w3c docs.
1 0.000004 syn keyword cssGeneratedContentProp contained quotes crop
1 0.000003 syn match cssGeneratedContentProp contained "\<counter-\(reset\|increment\)\>"
1 0.000002 syn match cssGeneratedContentProp contained "\<move-to\>"
1 0.000005 syn match cssGeneratedContentProp contained "\<page-policy\>"
1 0.000005 syn match cssGeneratedContentAttr contained "\<\(no-\)\=\(open\|close\)-quote\>"
1 0.000008 syn match cssGridProp contained "\<grid-\(columns\|rows\)\>"
1 0.000006 syn match cssHyerlinkProp contained "\<target\(-\(name\|new\|position\)\)\=\>"
1 0.000005 syn match cssListProp contained "\<list-style\(-\(type\|position\|image\)\)\=\>"
1 0.000005 syn match cssListAttr contained "\<\(lower\|upper\)-\(roman\|alpha\|greek\|latin\)\>"
1 0.000006 syn match cssListAttr contained "\<\(hiragana\|katakana\)\(-iroha\)\=\>"
1 0.000006 syn match cssListAttr contained "\<\(decimal\(-leading-zero\)\=\|cjk-ideographic\)\>"
1 0.000003 syn keyword cssListAttr contained disc circle square hebrew armenian georgian
1 0.000002 syn keyword cssListAttr contained inside outside
1 0.000005 syn keyword cssPositioningProp contained bottom clear clip display float left
1 0.000002 syn keyword cssPositioningProp contained position right top visibility
1 0.000002 syn match cssPositioningProp contained "\<z-index\>"
1 0.000004 syn keyword cssPositioningAttr contained block compact
1 0.000006 syn match cssPositioningAttr contained "\<table\(-\(row-group\|\(header\|footer\)-group\|row\|column\(-group\)\=\|cell\|caption\)\)\=\>"
1 0.000002 syn keyword cssPositioningAttr contained left right both
1 0.000006 syn match cssPositioningAttr contained "\<list-item\>"
1 0.000003 syn match cssPositioningAttr contained "\<inline\(-\(block\|box\|table\)\)\=\>"
1 0.000002 syn keyword cssPositioningAttr contained static relative absolute fixed
1 0.000005 syn keyword cssPrintAttr contained landscape portrait crop cross always avoid
1 0.000010 syn match cssTableProp contained "\<\(caption-side\|table-layout\|border-collapse\|border-spacing\|empty-cells\)\>"
1 0.000005 syn keyword cssTableAttr contained fixed collapse separate show hide once always
1 0.000004 syn keyword cssTextProp contained color direction
1 0.000015 syn match cssTextProp "\<\(\(word\|letter\)-spacing\|text\(-\(decoration\|transform\|align\|index\|shadow\)\)\=\|vertical-align\|unicode-bidi\|line-height\)\>"
1 0.000008 syn match cssTextProp contained "\<text-\(justify\|outline\|warp\|align-last\|size-adjust\|rendering\|stroke\|indent\)\>"
1 0.000003 syn match cssTextProp contained "\<word-\(break\|\wrap\)\>"
1 0.000002 syn match cssTextProp contained "\<white-space\>"
1 0.000005 syn match cssTextProp contained "\<hanging-punctuation\>"
1 0.000003 syn match cssTextProp contained "\<punctuation-trim\>"
1 0.000005 syn match cssTextAttr contained "\<line-through\>"
1 0.000003 syn match cssTextAttr contained "\<\(text-\)\=\(top\|bottom\)\>"
1 0.000002 syn keyword cssTextAttr contained ltr rtl embed nowrap
1 0.000003 syn keyword cssTextAttr contained underline overline blink sub super middle
1 0.000002 syn keyword cssTextAttr contained capitalize uppercase lowercase
1 0.000002 syn keyword cssTextAttr contained justify baseline sub super
1 0.000002 syn keyword cssTextAttr contained optimizeLegibility optimizeSpeed
1 0.000005 syn match cssTextAttr contained "\<pre\(-\(line\|wrap\)\)\=\>"
1 0.000003 syn match cssTextAttr contained "\<\(allow\|force\)-end\>"
1 0.000002 syn keyword cssTextAttr contained start end adjacent
1 0.000003 syn match cssTextAttr contained "\<inter-\(word\|ideographic\|cluster\)\>"
1 0.000002 syn keyword cssTextAttr contained distribute kashida first last
1 0.000002 syn keyword cssTextAttr contained clip ellipsis unrestricted suppress
1 0.000002 syn match cssTextAttr contained "\<break-all\>"
1 0.000002 syn match cssTextAttr contained "\<break-word\>"
1 0.000003 syn keyword cssTextAttr contained hyphenate
1 0.000005 syn match cssTextAttr contained "\<bidi-override\>"
1 0.000008 syn match cssTransformProp contained "\<transform\(-\(origin\|style\)\)\=\>"
1 0.000006 syn match cssTransformProp contained "\<perspective\(-origin\)\=\>"
1 0.000003 syn match cssTransformProp contained "\<backface-visibility\>"
" CSS Transitions
" http://www.w3.org/TR/css3-transitions/
1 0.000009 syn match cssTransitionProp contained "\<transition\(-\(delay\|duration\|property\|timing-function\)\)\=\>"
" transition-time-function attributes
1 0.000007 syn match cssTransitionAttr contained "\<linear\(-gradient\)\@!\>"
1 0.000003 syn match cssTransitionAttr contained "\<ease\(-\(in-out\|out\|in\)\)\=\>"
1 0.000003 syn match cssTransitionAttr contained "\<step\(-start\|-end\)\=\>"
"------------------------------------------------
" CSS Basic User Interface Module Level 3 (CSS3 UI)
" http://www.w3.org/TR/css3-ui/
1 0.000004 syn match cssUIProp contained "\<box-sizing\>"
1 0.000010 syn match cssUIAttr contained "\<\(content\|padding\|border\)\(-box\)\=\>"
1 0.000002 syn keyword cssUIProp contained cursor
1 0.000008 syn match cssUIAttr contained "\<\(\([ns]\=[ew]\=\)\|col\|row\|nesw\|nwse\)-resize\>"
1 0.000003 syn keyword cssUIAttr contained crosshair help move pointer alias copy
1 0.000003 syn keyword cssUIAttr contained progress wait text cell move
1 0.000027 syn match cssUIAttr contained "\<context-menu\>"
1 0.000003 syn match cssUIAttr contained "\<no-drop\>"
1 0.000002 syn match cssUIAttr contained "\<not-allowed\>"
1 0.000002 syn match cssUIAttr contained "\<all-scroll\>"
1 0.000003 syn match cssUIAttr contained "\<\(vertical-\)\=text\>"
1 0.000005 syn match cssUIAttr contained "\<zoom\(-in\|-out\)\=\>"
1 0.000004 syn match cssUIProp contained "\<ime-mode\>"
1 0.000002 syn keyword cssUIAttr contained active inactive disabled
1 0.000004 syn match cssUIProp contained "\<nav-\(down\|index\|left\|right\|up\)\=\>"
1 0.000006 syn match cssUIProp contained "\<outline\(-\(width\|style\|color\|offset\)\)\=\>"
1 0.000002 syn keyword cssUIAttr contained invert
1 0.000002 syn keyword cssUIProp contained icon resize
1 0.000002 syn keyword cssUIAttr contained both horizontal vertical
1 0.000003 syn match cssUIProp contained "\<text-overflow\>"
1 0.000002 syn keyword cssUIAttr contained clip ellipsis
" Already highlighted Props: font content
"------------------------------------------------
" Webkit/iOS specific attributes
1 0.000003 syn match cssUIAttr contained '\(preserve-3d\)'
" IE specific attributes
1 0.000007 syn match cssIEUIAttr contained '\(bicubic\)'
" Webkit/iOS specific properties
1 0.000004 syn match cssUIProp contained '\(tap-highlight-color\|user-select\|touch-callout\)'
" IE specific properties
1 0.000005 syn match cssIEUIProp contained '\(interpolation-mode\|zoom\|filter\)'
" Webkit/Firebox specific properties/attributes
1 0.000002 syn keyword cssUIProp contained appearance
1 0.000003 syn keyword cssUIAttr contained window button field icon document menu
1 0.000010 syn match cssAuralProp contained "\<\(pause\|cue\)\(-\(before\|after\)\)\=\>"
1 0.000006 syn match cssAuralProp contained "\<\(play-during\|speech-rate\|voice-family\|pitch\(-range\)\=\|speak\(-\(punctuation\|numeral\|header\)\)\=\)\>"
1 0.000005 syn keyword cssAuralProp contained volume during azimuth elevation stress richness
1 0.000005 syn match cssAuralAttr contained "\<\(x-\)\=\(soft\|loud\)\>"
1 0.000002 syn keyword cssAuralAttr contained silent
1 0.000002 syn match cssAuralAttr contained "\<spell-out\>"
1 0.000002 syn keyword cssAuralAttr contained non mix
1 0.000005 syn match cssAuralAttr contained "\<\(left\|right\)-side\>"
1 0.000004 syn match cssAuralAttr contained "\<\(far\|center\)-\(left\|center\|right\)\>"
1 0.000002 syn keyword cssAuralAttr contained leftwards rightwards behind
1 0.000002 syn keyword cssAuralAttr contained below level above lower higher
1 0.000005 syn match cssAuralAttr contained "\<\(x-\)\=\(slow\|fast\|low\|high\)\>"
1 0.000002 syn keyword cssAuralAttr contained faster slower
1 0.000003 syn keyword cssAuralAttr contained male female child code digits continuous
" mobile text
1 0.000005 syn match cssMobileTextProp contained "\<text-size-adjust\>"
1 0.000003 syn match cssBraces contained "[{}]"
1 0.000003 syn match cssError contained "{@<>"
1 0.000789 syn region cssDefinition transparent matchgroup=cssBraces start='{' end='}' contains=cssAttrRegion,css.*Prop,cssComment,cssValue.*,cssColor,cssURL,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssVendor,cssDefinition,cssHacks,cssNoise fold
1 0.000005 syn match cssBraceError "}"
1 0.000004 syn match cssAttrComma ","
" Pseudo class
" http://www.w3.org/TR/css3-selectors/
1 0.000014 syn match cssPseudoClass ":[A-Za-z0-9_-]*" contains=cssNoise,cssPseudoClassId,cssUnicodeEscape,cssVendor,cssPseudoClassFn
1 0.000004 syn keyword cssPseudoClassId contained link visited active hover before after left right
1 0.000004 syn keyword cssPseudoClassId contained root empty target enable disabled checked invalid
1 0.000004 syn match cssPseudoClassId contained "\<first-\(line\|letter\)\>"
1 0.000005 syn match cssPseudoClassId contained "\<\(first\|last\|only\)-\(of-type\|child\)\>"
1 0.000008 syn region cssPseudoClassFn contained matchgroup=cssFunctionName start="\<\(not\|lang\|\(nth\|nth-last\)-\(of-type\|child\)\)(" end=")"
" ------------------------------------
" Vendor specific properties
1 0.000006 syn match cssPseudoClassId contained "\<selection\>"
1 0.000004 syn match cssPseudoClassId contained "\<focus\(-inner\)\=\>"
1 0.000004 syn match cssPseudoClassId contained "\<\(input-\)\=placeholder\>"
" Misc highlight groups
1 0.000007 syntax match cssUnitDecorators /\(#\|-\|%\|mm\|cm\|in\|pt\|pc\|em\|ex\|px\|ch\|rem\|vh\|vw\|vmin\|vmax\|dpi\|dppx\|dpcm\|Hz\|kHz\|s\|ms\|deg\|grad\|rad\)/ contained
1 0.000003 syntax match cssNoise contained /\(:\|;\|\/\)/
" Comment
1 0.000006 syn region cssComment start="/\*" end="\*/" contains=@Spell fold
1 0.000004 syn match cssUnicodeEscape "\\\x\{1,6}\s\?"
1 0.000004 syn match cssSpecialCharQQ +\\\\\|\\"+ contained
1 0.000004 syn match cssSpecialCharQ +\\\\\|\\'+ contained
1 0.000011 syn region cssStringQQ start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=cssUnicodeEscape,cssSpecialCharQQ
1 0.000008 syn region cssStringQ start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=cssUnicodeEscape,cssSpecialCharQ
" Vendor Prefix
1 0.000004 syn match cssVendor contained "\(-\(webkit\|moz\|o\|ms\)-\)"
" Various CSS Hack characters
" In earlier versions of IE (6 and 7), one can prefix property names
" with a _ or * to isolate those definitions to particular versions of IE
" This is purely decorative and therefore we assign to the same highlight
" group to cssVendor, for more information:
" http://www.paulirish.com/2009/browser-specific-css-hacks/
1 0.000005 syn match cssHacks contained /\(_\|*\)/
" Attr Enhance
" Some keywords are both Prop and Attr, so we have to handle them
1 0.001116 syn region cssAttrRegion start=/:/ end=/\ze\(;\|)\|}\)/ contained contains=css.*Attr,cssColor,cssImportant,cssValue.*,cssFunction,cssString.*,cssURL,cssComment,cssUnicodeEscape,cssVendor,cssError,cssAttrComma,cssNoise
" Hack for transition
" 'transition' has Props after ':'.
1 0.001582 syn region cssAttrRegion start=/transition\s*:/ end=/\ze\(;\|)\|}\)/ contained contains=css.*Prop,css.*Attr,cssColor,cssImportant,cssValue.*,cssFunction,cssString.*,cssURL,cssComment,cssUnicodeEscape,cssVendor,cssError,cssAttrComma,cssNoise
1 0.000004 if main_syntax == "css"
syn sync minlines=10
endif
" Define the default highlighting.
" Only when an item doesn't have highlighting yet
1 0.000003 hi def link cssComment Comment
1 0.000002 hi def link cssVendor Comment
1 0.000006 hi def link cssHacks Comment
1 0.000002 hi def link cssTagName Statement
1 0.000004 hi def link cssDeprecated Error
1 0.000002 hi def link cssSelectorOp Special
1 0.000002 hi def link cssSelectorOp2 Special
1 0.000002 hi def link cssAttrComma Special
1 0.000003 hi def link cssAnimationProp cssProp
1 0.000001 hi def link cssBackgroundProp cssProp
1 0.000001 hi def link cssBorderProp cssProp
1 0.000001 hi def link cssBoxProp cssProp
1 0.000001 hi def link cssColorProp cssProp
1 0.000003 hi def link cssContentForPagedMediaProp cssProp
1 0.000001 hi def link cssDimensionProp cssProp
1 0.000001 hi def link cssFlexibleBoxProp cssProp
1 0.000001 hi def link cssFontProp cssProp
1 0.000001 hi def link cssGeneratedContentProp cssProp
1 0.000001 hi def link cssGridProp cssProp
1 0.000001 hi def link cssHyerlinkProp cssProp
1 0.000003 hi def link cssLineboxProp cssProp
1 0.000001 hi def link cssListProp cssProp
1 0.000003 hi def link cssMarqueeProp cssProp
1 0.000001 hi def link cssMultiColumnProp cssProp
1 0.000005 hi def link cssPagedMediaProp cssProp
1 0.000001 hi def link cssPositioningProp cssProp
1 0.000003 hi def link cssPrintProp cssProp
1 0.000003 hi def link cssRubyProp cssProp
1 0.000003 hi def link cssSpeechProp cssProp
1 0.000001 hi def link cssTableProp cssProp
1 0.000001 hi def link cssTextProp cssProp
1 0.000001 hi def link cssTransformProp cssProp
1 0.000001 hi def link cssTransitionProp cssProp
1 0.000001 hi def link cssUIProp cssProp
1 0.000001 hi def link cssIEUIProp cssProp
1 0.000001 hi def link cssAuralProp cssProp
1 0.000003 hi def link cssRenderProp cssProp
1 0.000001 hi def link cssMobileTextProp cssProp
1 0.000003 hi def link cssAnimationAttr cssAttr
1 0.000001 hi def link cssBackgroundAttr cssAttr
1 0.000001 hi def link cssBorderAttr cssAttr
1 0.000001 hi def link cssBoxAttr cssAttr
1 0.000003 hi def link cssContentForPagedMediaAttr cssAttr
1 0.000003 hi def link cssDimensionAttr cssAttr
1 0.000001 hi def link cssFlexibleBoxAttr cssAttr
1 0.000001 hi def link cssFontAttr cssAttr
1 0.000001 hi def link cssGeneratedContentAttr cssAttr
1 0.000003 hi def link cssGridAttr cssAttr
1 0.000006 hi def link cssHyerlinkAttr cssAttr
1 0.000003 hi def link cssLineboxAttr cssAttr
1 0.000001 hi def link cssListAttr cssAttr
1 0.000003 hi def link cssMarginAttr cssAttr
1 0.000003 hi def link cssMarqueeAttr cssAttr
1 0.000001 hi def link cssMultiColumnAttr cssAttr
1 0.000003 hi def link cssPaddingAttr cssAttr
1 0.000005 hi def link cssPagedMediaAttr cssAttr
1 0.000001 hi def link cssPositioningAttr cssAttr
1 0.000001 hi def link cssGradientAttr cssAttr
1 0.000001 hi def link cssPrintAttr cssAttr
1 0.000003 hi def link cssRubyAttr cssAttr
1 0.000003 hi def link cssSpeechAttr cssAttr
1 0.000001 hi def link cssTableAttr cssAttr
1 0.000001 hi def link cssTextAttr cssAttr
1 0.000003 hi def link cssTransformAttr cssAttr
1 0.000001 hi def link cssTransitionAttr cssAttr
1 0.000001 hi def link cssUIAttr cssAttr
1 0.000001 hi def link cssIEUIAttr cssAttr
1 0.000001 hi def link cssAuralAttr cssAttr
1 0.000003 hi def link cssRenderAttr cssAttr
1 0.000002 hi def link cssCommonAttr cssAttr
1 0.000003 hi def link cssPseudoClassId PreProc
1 0.000004 hi def link cssPseudoClassLang Constant
1 0.000003 hi def link cssValueLength Number
1 0.000003 hi def link cssValueInteger Number
1 0.000003 hi def link cssValueNumber Number
1 0.000003 hi def link cssValueAngle Number
1 0.000003 hi def link cssValueTime Number
1 0.000003 hi def link cssValueFrequency Number
1 0.000002 hi def link cssFunction Constant
1 0.000003 hi def link cssURL String
1 0.000003 hi def link cssFunctionName Function
1 0.000002 hi def link cssFunctionComma Function
1 0.000003 hi def link cssColor Constant
1 0.000002 hi def link cssIdentifier Function
1 0.000002 hi def link cssInclude Include
1 0.000003 hi def link cssIncludeKeyword atKeyword
1 0.000004 hi def link cssImportant Special
1 0.000003 hi def link cssBraces Function
1 0.000002 hi def link cssBraceError Error
1 0.000003 hi def link cssError Error
1 0.000003 hi def link cssUnicodeEscape Special
1 0.000003 hi def link cssStringQQ String
1 0.000003 hi def link cssStringQ String
1 0.000003 hi def link cssAttributeSelector String
1 0.000003 hi def link cssMedia atKeyword
1 0.000002 hi def link cssMediaType Special
1 0.000003 hi def link cssMediaComma Normal
1 0.000002 hi def link cssMediaKeyword Statement
1 0.000001 hi def link cssMediaProp cssProp
1 0.000001 hi def link cssMediaAttr cssAttr
1 0.000001 hi def link cssPage atKeyword
1 0.000002 hi def link cssPagePseudo PreProc
1 0.000001 hi def link cssPageMargin atKeyword
1 0.000001 hi def link cssPageProp cssProp
1 0.000001 hi def link cssKeyFrame atKeyword
1 0.000002 hi def link cssKeyFrameSelector Constant
1 0.000003 hi def link cssFontDescriptor Special
1 0.000005 hi def link cssFontDescriptorFunction Constant
1 0.000002 hi def link cssFontDescriptorProp cssProp
1 0.000001 hi def link cssFontDescriptorAttr cssAttr
1 0.000004 hi def link cssUnicodeRange Constant
1 0.000003 hi def link cssClassName Function
1 0.000002 hi def link cssClassNameDot Function
1 0.000002 hi def link cssProp StorageClass
1 0.000002 hi def link cssAttr Constant
1 0.000003 hi def link cssUnitDecorators Number
1 0.000003 hi def link cssNoise Noise
1 0.000002 hi def link atKeyword PreProc
1 0.000002 let b:current_syntax = "css"
1 0.000002 if main_syntax == 'css'
unlet main_syntax
endif
1 0.000005 let &cpo = s:cpo_save
1 0.000001 unlet s:cpo_save
" vim: ts=8
SCRIPT /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/syntax/sql.vim
Sourced 1 time
Total time: 0.000610
Self time: 0.000207
count total (s) self (s)
" Vim syntax file loader
" Language: SQL
" Maintainer: David Fishburn <fishburn at ianywhere dot com>
" Last Change: Thu Sep 15 2005 10:30:02 AM
" Version: 1.0
" Description: Checks for a:
" buffer local variable,
" global variable,
" If the above exist, it will source the type specified.
" If none exist, it will source the default sql.vim file.
"
" quit when a syntax file was already loaded
1 0.000004 if exists("b:current_syntax")
finish
endif
" Default to the standard Vim distribution file
1 0.000002 let filename = 'sqloracle'
" Check for overrides. Buffer variables have the highest priority.
1 0.000002 if exists("b:sql_type_override")
" Check the runtimepath to see if the file exists
if globpath(&runtimepath, 'syntax/'.b:sql_type_override.'.vim') != ''
let filename = b:sql_type_override
endif
elseif exists("g:sql_type_default")
if globpath(&runtimepath, 'syntax/'.g:sql_type_default.'.vim') != ''
let filename = g:sql_type_default
endif
endif
" Source the appropriate file
1 0.000574 0.000171 exec 'runtime syntax/'.filename.'.vim'
" vim:sw=4:
SCRIPT /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/syntax/sqloracle.vim
Sourced 1 time
Total time: 0.000390
Self time: 0.000390
count total (s) self (s)
" Vim syntax file
" Language: SQL, PL/SQL (Oracle 11g)
" Maintainer: Christian Brabandt
" Repository: https://github.com/chrisbra/vim-sqloracle-syntax
" License: Vim
" Previous Maintainer: Paul Moore
" Last Change: 2016 Jul 22
" Changes:
" 02.04.2016: Support for when keyword
" 03.04.2016: Support for join related keywords
" 22.07.2016: Support Oracle Q-Quote-Syntax
1 0.000003 if exists("b:current_syntax")
finish
endif
1 0.000001 syn case ignore
" The SQL reserved words, defined as keywords.
1 0.000008 syn keyword sqlSpecial false null true
1 0.000006 syn keyword sqlKeyword access add as asc begin by case check cluster column
1 0.000004 syn keyword sqlKeyword cache compress connect current cursor decimal default desc
1 0.000007 syn keyword sqlKeyword else elsif end exception exclusive file for from
1 0.000004 syn keyword sqlKeyword function group having identified if immediate increment
1 0.000003 syn keyword sqlKeyword index initial initrans into is level link logging loop
1 0.000003 syn keyword sqlKeyword maxextents maxtrans mode modify monitoring
1 0.000004 syn keyword sqlKeyword nocache nocompress nologging noparallel nowait of offline on online start
1 0.000004 syn keyword sqlKeyword parallel successful synonym table tablespace then to trigger uid
1 0.000003 syn keyword sqlKeyword unique user validate values view when whenever
1 0.000003 syn keyword sqlKeyword where with option order pctfree pctused privileges procedure
1 0.000005 syn keyword sqlKeyword public resource return row rowlabel rownum rows
1 0.000003 syn keyword sqlKeyword session share size smallint type using
1 0.000003 syn keyword sqlKeyword join cross inner outer left right
1 0.000005 syn keyword sqlOperator not and or
1 0.000003 syn keyword sqlOperator in any some all between exists
1 0.000002 syn keyword sqlOperator like escape
1 0.000002 syn keyword sqlOperator union intersect minus
1 0.000002 syn keyword sqlOperator prior distinct
1 0.000002 syn keyword sqlOperator sysdate out
1 0.000005 syn keyword sqlStatement analyze audit comment commit
1 0.000003 syn keyword sqlStatement delete drop execute explain grant lock noaudit
1 0.000003 syn keyword sqlStatement rename revoke rollback savepoint set
1 0.000002 syn keyword sqlStatement truncate
" next ones are contained, so folding works.
1 0.000003 syn keyword sqlStatement create update alter select insert contained
1 0.000005 syn keyword sqlType boolean char character date float integer long
1 0.000006 syn keyword sqlType mlslabel number raw rowid varchar varchar2 varray
" Strings:
1 0.000013 syn region sqlString matchgroup=Quote start=+"+ skip=+\\\\\|\\"+ end=+"+
1 0.000006 syn region sqlString matchgroup=Quote start=+'+ skip=+\\\\\|\\'+ end=+'+
1 0.000009 syn region sqlString matchgroup=Quote start=+n\?q'\z([^[(<{]\)+ end=+\z1'+
1 0.000005 syn region sqlString matchgroup=Quote start=+n\?q'<+ end=+>'+
1 0.000004 syn region sqlString matchgroup=Quote start=+n\?q'{+ end=+}'+
1 0.000004 syn region sqlString matchgroup=Quote start=+n\?q'(+ end=+)'+
1 0.000004 syn region sqlString matchgroup=Quote start=+n\?q'\[+ end=+]'+
" Numbers:
1 0.000006 syn match sqlNumber "-\=\<\d*\.\=[0-9_]\>"
" Comments:
1 0.000014 syn region sqlComment start="/\*" end="\*/" contains=sqlTodo,@Spell fold
1 0.000005 syn match sqlComment "--.*$" contains=sqlTodo,@Spell
" Setup Folding:
" this is a hack, to get certain statements folded.
" the keywords create/update/alter/select/insert need to
" have contained option.
1 0.000010 syn region sqlFold start='^\s*\zs\c\(Create\|Update\|Alter\|Select\|Insert\)' end=';$\|^$' transparent fold contains=ALL
1 0.000002 syn sync ccomment sqlComment
" Functions:
" (Oracle 11g)
" Aggregate Functions
1 0.000007 syn keyword sqlFunction avg collect corr corr_s corr_k count covar_pop covar_samp cume_dist dense_rank first
1 0.000005 syn keyword sqlFunction group_id grouping grouping_id last max median min percentile_cont percentile_disc percent_rank rank
1 0.000004 syn keyword sqlFunction regr_slope regr_intercept regr_count regr_r2 regr_avgx regr_avgy regr_sxx regr_syy regr_sxy
1 0.000004 syn keyword sqlFunction stats_binomial_test stats_crosstab stats_f_test stats_ks_test stats_mode stats_mw_test
1 0.000005 syn keyword sqlFunction stats_one_way_anova stats_t_test_one stats_t_test_paired stats_t_test_indep stats_t_test_indepu
1 0.000005 syn keyword sqlFunction stats_wsr_test stddev stddev_pop stddev_samp sum
1 0.000003 syn keyword sqlFunction sys_xmlagg var_pop var_samp variance xmlagg
" Char Functions
1 0.000004 syn keyword sqlFunction ascii chr concat initcap instr length lower lpad ltrim
1 0.000003 syn keyword sqlFunction nls_initcap nls_lower nlssort nls_upper regexp_instr regexp_replace
1 0.000004 syn keyword sqlFunction regexp_substr replace rpad rtrim soundex substr translate treat trim upper
" Comparison Functions
1 0.000002 syn keyword sqlFunction greatest least
" Conversion Functions
1 0.000003 syn keyword sqlFunction asciistr bin_to_num cast chartorowid compose convert
1 0.000003 syn keyword sqlFunction decompose hextoraw numtodsinterval numtoyminterval rawtohex rawtonhex rowidtochar
1 0.000003 syn keyword sqlFunction rowidtonchar scn_to_timestamp timestamp_to_scn to_binary_double to_binary_float
1 0.000003 syn keyword sqlFunction to_char to_char to_char to_clob to_date to_dsinterval to_lob to_multi_byte
1 0.000005 syn keyword sqlFunction to_nchar to_nchar to_nchar to_nclob to_number to_dsinterval to_single_byte
1 0.000003 syn keyword sqlFunction to_timestamp to_timestamp_tz to_yminterval to_yminterval translate unistr
" DataMining Functions
1 0.000003 syn keyword sqlFunction cluster_id cluster_probability cluster_set feature_id feature_set
1 0.000003 syn keyword sqlFunction feature_value prediction prediction_bounds prediction_cost
1 0.000002 syn keyword sqlFunction prediction_details prediction_probability prediction_set
" Datetime Functions
1 0.000003 syn keyword sqlFunction add_months current_date current_timestamp dbtimezone extract
1 0.000003 syn keyword sqlFunction from_tz last_day localtimestamp months_between new_time
1 0.000003 syn keyword sqlFunction next_day numtodsinterval numtoyminterval round sessiontimezone
1 0.000003 syn keyword sqlFunction sys_extract_utc sysdate systimestamp to_char to_timestamp
1 0.000003 syn keyword sqlFunction to_timestamp_tz to_dsinterval to_yminterval trunc tz_offset
" Numeric Functions
1 0.000004 syn keyword sqlFunction abs acos asin atan atan2 bitand ceil cos cosh exp
1 0.000006 syn keyword sqlFunction floor ln log mod nanvl power remainder round sign
1 0.000003 syn keyword sqlFunction sin sinh sqrt tan tanh trunc width_bucket
" NLS Functions
1 0.000002 syn keyword sqlFunction ls_charset_decl_len nls_charset_id nls_charset_name
" Various Functions
1 0.000004 syn keyword sqlFunction bfilename cardin coalesce collect decode dump empty_blob empty_clob
1 0.000003 syn keyword sqlFunction lnnvl nullif nvl nvl2 ora_hash powermultiset powermultiset_by_cardinality
1 0.000004 syn keyword sqlFunction sys_connect_by_path sys_context sys_guid sys_typeid uid user userenv vsizeality
" XML Functions
1 0.000003 syn keyword sqlFunction appendchildxml deletexml depth extract existsnode extractvalue insertchildxml
1 0.000004 syn keyword sqlFunction insertxmlbefore path sys_dburigen sys_xmlagg sys_xmlgen updatexml xmlagg xmlcast
1 0.000003 syn keyword sqlFunction xmlcdata xmlcolattval xmlcomment xmlconcat xmldiff xmlelement xmlexists xmlforest
1 0.000006 syn keyword sqlFunction xmlparse xmlpatch xmlpi xmlquery xmlroot xmlsequence xmlserialize xmltable xmltransform
" Todo:
1 0.000003 syn keyword sqlTodo TODO FIXME XXX DEBUG NOTE contained
" Define the default highlighting.
1 0.000003 hi def link Quote Special
1 0.000002 hi def link sqlComment Comment
1 0.000002 hi def link sqlFunction Function
1 0.000001 hi def link sqlKeyword sqlSpecial
1 0.000003 hi def link sqlNumber Number
1 0.000001 hi def link sqlOperator sqlStatement
1 0.000002 hi def link sqlSpecial Special
1 0.000002 hi def link sqlStatement Statement
1 0.000002 hi def link sqlString String
1 0.000002 hi def link sqlType Type
1 0.000002 hi def link sqlTodo Todo
1 0.000002 let b:current_syntax = "sql"
" vim: ts=8
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/autoload/ale/util.vim
Sourced 1 time
Total time: 0.000322
Self time: 0.000322
count total (s) self (s)
" Author: w0rp <devw0rp@gmail.com>
" Description: Contains miscellaneous functions
" A wrapper function for mode() so we can test calls for it.
1 0.000003 function! ale#util#Mode(...) abort
return call('mode', a:000)
endfunction
" A wrapper function for feedkeys so we can test calls for it.
1 0.000002 function! ale#util#FeedKeys(...) abort
return call('feedkeys', a:000)
endfunction
" Show a message in as small a window as possible.
"
" Vim 8 does not support echoing long messages from asynchronous callbacks,
" but NeoVim does. Small messages can be echoed in Vim 8, and larger messages
" have to be shown in preview windows.
1 0.000002 function! ale#util#ShowMessage(string) abort
if !has('nvim')
call ale#preview#CloseIfTypeMatches('ale-preview.message')
endif
" We have to assume the user is using a monospace font.
if has('nvim') || (a:string !~? "\n" && len(a:string) < &columns)
execute 'echo a:string'
else
call ale#preview#Show(split(a:string, "\n"), {
\ 'filetype': 'ale-preview.message',
\ 'stay_here': 1,
\})
endif
endfunction
" A wrapper function for execute, so we can test executing some commands.
1 0.000002 function! ale#util#Execute(expr) abort
execute a:expr
endfunction
1 0.000003 if !exists('g:ale#util#nul_file')
" A null file for sending output to nothing.
1 0.000002 let g:ale#util#nul_file = '/dev/null'
1 0.000003 if has('win32')
let g:ale#util#nul_file = 'nul'
endif
1 0.000001 endif
" Given a job, a buffered line of data, a list of parts of lines, a mode data
" is being read in, and a callback, join the lines of output for a NeoVim job
" or socket together, and call the callback with the joined output.
"
" Note that jobs and IDs are the same thing on NeoVim.
1 0.000002 function! ale#util#JoinNeovimOutput(job, last_line, data, mode, callback) abort
if a:mode is# 'raw'
call a:callback(a:job, join(a:data, "\n"))
return ''
endif
let l:lines = a:data[:-2]
if len(a:data) > 1
let l:lines[0] = a:last_line . l:lines[0]
let l:new_last_line = a:data[-1]
else
let l:new_last_line = a:last_line . get(a:data, 0, '')
endif
for l:line in l:lines
call a:callback(a:job, l:line)
endfor
return l:new_last_line
endfunction
" Return the number of lines for a given buffer.
1 0.000002 function! ale#util#GetLineCount(buffer) abort
return len(getbufline(a:buffer, 1, '$'))
endfunction
1 0.000001 function! ale#util#GetFunction(string_or_ref) abort
if type(a:string_or_ref) is v:t_string
return function(a:string_or_ref)
endif
return a:string_or_ref
endfunction
1 0.000002 function! ale#util#Open(filename, line, column, options) abort
if get(a:options, 'open_in_tab', 0)
call ale#util#Execute('tabedit +' . a:line . ' ' . fnameescape(a:filename))
elseif bufnr(a:filename) isnot bufnr('')
" Open another file only if we need to.
call ale#util#Execute('edit +' . a:line . ' ' . fnameescape(a:filename))
else
normal! m`
endif
call cursor(a:line, a:column)
endfunction
1 0.000003 let g:ale#util#error_priority = 5
1 0.000002 let g:ale#util#warning_priority = 4
1 0.000001 let g:ale#util#info_priority = 3
1 0.000001 let g:ale#util#style_error_priority = 2
1 0.000001 let g:ale#util#style_warning_priority = 1
1 0.000002 function! ale#util#GetItemPriority(item) abort
if a:item.type is# 'I'
return g:ale#util#info_priority
endif
if a:item.type is# 'W'
if get(a:item, 'sub_type', '') is# 'style'
return g:ale#util#style_warning_priority
endif
return g:ale#util#warning_priority
endif
if get(a:item, 'sub_type', '') is# 'style'
return g:ale#util#style_error_priority
endif
return g:ale#util#error_priority
endfunction
" Compare two loclist items for ALE, sorted by their buffers, filenames, and
" line numbers and column numbers.
1 0.000002 function! ale#util#LocItemCompare(left, right) abort
if a:left.bufnr < a:right.bufnr
return -1
endif
if a:left.bufnr > a:right.bufnr
return 1
endif
if a:left.bufnr == -1
if a:left.filename < a:right.filename
return -1
endif
if a:left.filename > a:right.filename
return 1
endif
endif
if a:left.lnum < a:right.lnum
return -1
endif
if a:left.lnum > a:right.lnum
return 1
endif
if a:left.col < a:right.col
return -1
endif
if a:left.col > a:right.col
return 1
endif
" When either of the items lacks a problem type, then the two items should
" be considered equal. This is important for loclist jumping.
if !has_key(a:left, 'type') || !has_key(a:right, 'type')
return 0
endif
let l:left_priority = ale#util#GetItemPriority(a:left)
let l:right_priority = ale#util#GetItemPriority(a:right)
if l:left_priority < l:right_priority
return -1
endif
if l:left_priority > l:right_priority
return 1
endif
return 0
endfunction
" Compare two loclist items, including the text for the items.
"
" This function can be used for de-duplicating lists.
1 0.000002 function! ale#util#LocItemCompareWithText(left, right) abort
let l:cmp_value = ale#util#LocItemCompare(a:left, a:right)
if l:cmp_value
return l:cmp_value
endif
if a:left.text < a:right.text
return -1
endif
if a:left.text > a:right.text
return 1
endif
return 0
endfunction
" This function will perform a binary search and a small sequential search
" on the list to find the last problem in the buffer and line which is
" on or before the column. The index of the problem will be returned.
"
" -1 will be returned if nothing can be found.
1 0.000002 function! ale#util#BinarySearch(loclist, buffer, line, column) abort
let l:min = 0
let l:max = len(a:loclist) - 1
while 1
if l:max < l:min
return -1
endif
let l:mid = (l:min + l:max) / 2
let l:item = a:loclist[l:mid]
" Binary search for equal buffers, equal lines, then near columns.
if l:item.bufnr < a:buffer
let l:min = l:mid + 1
elseif l:item.bufnr > a:buffer
let l:max = l:mid - 1
elseif l:item.lnum < a:line
let l:min = l:mid + 1
elseif l:item.lnum > a:line
let l:max = l:mid - 1
else
" This part is a small sequential search.
let l:index = l:mid
" Search backwards to find the first problem on the line.
while l:index > 0
\&& a:loclist[l:index - 1].bufnr == a:buffer
\&& a:loclist[l:index - 1].lnum == a:line
let l:index -= 1
endwhile
" Find the last problem on or before this column.
while l:index < l:max
\&& a:loclist[l:index + 1].bufnr == a:buffer
\&& a:loclist[l:index + 1].lnum == a:line
\&& a:loclist[l:index + 1].col <= a:column
let l:index += 1
endwhile
" Scan forwards to find the last item on the column for the item
" we found, which will have the most serious problem.
let l:item_column = a:loclist[l:index].col
while l:index < l:max
\&& a:loclist[l:index + 1].bufnr == a:buffer
\&& a:loclist[l:index + 1].lnum == a:line
\&& a:loclist[l:index + 1].col == l:item_column
let l:index += 1
endwhile
return l:index
endif
endwhile
endfunction
" A function for testing if a function is running inside a sandbox.
" See :help sandbox
1 0.000001 function! ale#util#InSandbox() abort
try
let &l:equalprg=&l:equalprg
catch /E48/
" E48 is the sandbox error.
return 1
endtry
return 0
endfunction
1 0.000001 function! ale#util#Tempname() abort
let l:clear_tempdir = 0
if exists('$TMPDIR') && empty($TMPDIR)
let l:clear_tempdir = 1
let $TMPDIR = '/tmp'
endif
try
let l:name = tempname() " no-custom-checks
finally
if l:clear_tempdir
let $TMPDIR = ''
endif
endtry
return l:name
endfunction
" Given a single line, or a List of lines, and a single pattern, or a List
" of patterns, return all of the matches for the lines(s) from the given
" patterns, using matchlist().
"
" Only the first pattern which matches a line will be returned.
1 0.000002 function! ale#util#GetMatches(lines, patterns) abort
let l:matches = []
let l:lines = type(a:lines) is v:t_list ? a:lines : [a:lines]
let l:patterns = type(a:patterns) is v:t_list ? a:patterns : [a:patterns]
for l:line in l:lines
for l:pattern in l:patterns
let l:match = matchlist(l:line, l:pattern)
if !empty(l:match)
call add(l:matches, l:match)
break
endif
endfor
endfor
return l:matches
endfunction
1 0.000002 function! s:LoadArgCount(function) abort
let l:Function = a:function
redir => l:output
silent! function Function
redir END
if !exists('l:output')
return 0
endif
let l:match = matchstr(split(l:output, "\n")[0], '\v\([^)]+\)')[1:-2]
let l:arg_list = filter(split(l:match, ', '), 'v:val isnot# ''...''')
return len(l:arg_list)
endfunction
" Given the name of a function, a Funcref, or a lambda, return the number
" of named arguments for a function.
1 0.000002 function! ale#util#FunctionArgCount(function) abort
let l:Function = ale#util#GetFunction(a:function)
let l:count = s:LoadArgCount(l:Function)
" If we failed to get the count, forcibly load the autoload file, if the
" function is an autoload function. autoload functions aren't normally
" defined until they are called.
if l:count == 0
let l:function_name = matchlist(string(l:Function), 'function([''"]\(.\+\)[''"])')[1]
if l:function_name =~# '#'
execute 'runtime autoload/' . join(split(l:function_name, '#')[:-2], '/') . '.vim'
let l:count = s:LoadArgCount(l:Function)
endif
endif
return l:count
endfunction
" Escape a string so the characters in it will be safe for use inside of PCRE
" or RE2 regular expressions without characters having special meanings.
1 0.000002 function! ale#util#EscapePCRE(unsafe_string) abort
return substitute(a:unsafe_string, '\([\-\[\]{}()*+?.^$|]\)', '\\\1', 'g')
endfunction
" Escape a string so that it can be used as a literal string inside an evaled
" vim command.
1 0.000001 function! ale#util#EscapeVim(unsafe_string) abort
return "'" . substitute(a:unsafe_string, "'", "''", 'g') . "'"
endfunction
" Given a String or a List of String values, try and decode the string(s)
" as a JSON value which can be decoded with json_decode. If the JSON string
" is invalid, the default argument value will be returned instead.
"
" This function is useful in code where the data can't be trusted to be valid
" JSON, and where throwing exceptions is mostly just irritating.
1 0.000002 function! ale#util#FuzzyJSONDecode(data, default) abort
if empty(a:data)
return a:default
endif
let l:str = type(a:data) is v:t_string ? a:data : join(a:data, '')
try
let l:result = json_decode(l:str)
" Vim 8 only uses the value v:none for decoding blank strings.
if !has('nvim') && l:result is v:none
return a:default
endif
return l:result
catch /E474/
return a:default
endtry
endfunction
" Write a file, including carriage return characters for DOS files.
"
" The buffer number is required for determining the fileformat setting for
" the buffer.
1 0.000002 function! ale#util#Writefile(buffer, lines, filename) abort
let l:corrected_lines = getbufvar(a:buffer, '&fileformat') is# 'dos'
\ ? map(copy(a:lines), 'substitute(v:val, ''\r*$'', ''\r'', '''')')
\ : a:lines
call writefile(l:corrected_lines, a:filename) " no-custom-checks
endfunction
1 0.000003 if !exists('s:patial_timers')
1 0.000002 let s:partial_timers = {}
1 0.000001 endif
1 0.000002 function! s:ApplyPartialTimer(timer_id) abort
if has_key(s:partial_timers, a:timer_id)
let [l:Callback, l:args] = remove(s:partial_timers, a:timer_id)
call call(l:Callback, [a:timer_id] + l:args)
endif
endfunction
" Given a delay, a callback, a List of arguments, start a timer with
" timer_start() and call the callback provided with [timer_id] + args.
"
" The timer must not be stopped with timer_stop().
" Use ale#util#StopPartialTimer() instead, which can stop any timer, and will
" clear any arguments saved for executing callbacks later.
1 0.000002 function! ale#util#StartPartialTimer(delay, callback, args) abort
let l:timer_id = timer_start(a:delay, function('s:ApplyPartialTimer'))
let s:partial_timers[l:timer_id] = [a:callback, a:args]
return l:timer_id
endfunction
1 0.000001 function! ale#util#StopPartialTimer(timer_id) abort
call timer_stop(a:timer_id)
if has_key(s:partial_timers, a:timer_id)
call remove(s:partial_timers, a:timer_id)
endif
endfunction
" Given a possibly multi-byte string and a 1-based character position on a
" line, return the 1-based byte position on that line.
1 0.000002 function! ale#util#Col(str, chr) abort
if a:chr < 2
return a:chr
endif
return strlen(join(split(a:str, '\zs')[0:a:chr - 2], '')) + 1
endfunction
1 0.000002 function! ale#util#FindItemAtCursor(buffer) abort
let l:info = get(g:ale_buffer_info, a:buffer, {})
let l:loclist = get(l:info, 'loclist', [])
let l:pos = getcurpos()
let l:index = ale#util#BinarySearch(l:loclist, a:buffer, l:pos[1], l:pos[2])
let l:loc = l:index >= 0 ? l:loclist[l:index] : {}
return [l:info, l:loc]
endfunction
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/autoload/ale/linter.vim
Sourced 1 time
Total time: 0.000311
Self time: 0.000311
count total (s) self (s)
" Author: w0rp <devw0rp@gmail.com>
" Description: Linter registration and lazy-loading
" Retrieves linters as requested by the engine, loading them if needed.
1 0.000003 let s:runtime_loaded_map = {}
1 0.000001 let s:linters = {}
" Default filetype aliases.
" The user defined aliases will be merged with this Dictionary.
"
" NOTE: Update the g:ale_linter_aliases documentation when modifying this.
1 0.000011 let s:default_ale_linter_aliases = {
\ 'Dockerfile': 'dockerfile',
\ 'csh': 'sh',
\ 'plaintex': 'tex',
\ 'systemverilog': 'verilog',
\ 'verilog_systemverilog': ['verilog_systemverilog', 'verilog'],
\ 'vimwiki': 'markdown',
\ 'vue': ['vue', 'javascript'],
\ 'zsh': 'sh',
\}
" Default linters to run for particular filetypes.
" The user defined linter selections will be merged with this Dictionary.
"
" No linters are used for plaintext files by default.
"
" Only cargo is enabled for Rust by default.
" rpmlint is disabled by default because it can result in code execution.
" hhast is disabled by default because it executes code in the project root.
"
" NOTE: Update the g:ale_linters documentation when modifying this.
1 0.000018 let s:default_ale_linters = {
\ 'csh': ['shell'],
\ 'elixir': ['credo', 'dialyxir', 'dogma', 'elixir-ls'],
\ 'go': ['gofmt', 'golint', 'go vet'],
\ 'hack': ['hack'],
\ 'help': [],
\ 'perl': ['perlcritic'],
\ 'perl6': [],
\ 'python': ['flake8', 'mypy', 'pylint'],
\ 'rust': ['cargo'],
\ 'spec': [],
\ 'text': [],
\ 'vue': ['eslint', 'vls'],
\ 'zsh': ['shell'],
\}
" Testing/debugging helper to unload all linters.
1 0.000002 function! ale#linter#Reset() abort
let s:runtime_loaded_map = {}
let s:linters = {}
endfunction
" Return a reference to the linters loaded.
" This is only for tests.
" Do not call this function.
1 0.000002 function! ale#linter#GetLintersLoaded() abort
" This command will throw from the sandbox.
let &l:equalprg=&l:equalprg
return s:linters
endfunction
1 0.000002 function! s:IsCallback(value) abort
return type(a:value) is v:t_string || type(a:value) is v:t_func
endfunction
1 0.000001 function! s:IsBoolean(value) abort
return type(a:value) is v:t_number && (a:value == 0 || a:value == 1)
endfunction
1 0.000001 function! s:LanguageGetter(buffer) dict abort
return l:self.language
endfunction
1 0.000002 function! ale#linter#PreProcess(filetype, linter) abort
if type(a:linter) isnot v:t_dict
throw 'The linter object must be a Dictionary'
endif
let l:obj = {
\ 'add_newline': get(a:linter, 'add_newline', 0),
\ 'name': get(a:linter, 'name'),
\ 'lsp': get(a:linter, 'lsp', ''),
\}
if type(l:obj.name) isnot v:t_string
throw '`name` must be defined to name the linter'
endif
let l:needs_address = l:obj.lsp is# 'socket'
let l:needs_executable = l:obj.lsp isnot# 'socket'
let l:needs_command = l:obj.lsp isnot# 'socket'
let l:needs_lsp_details = !empty(l:obj.lsp)
if empty(l:obj.lsp)
let l:obj.callback = get(a:linter, 'callback')
if !s:IsCallback(l:obj.callback)
throw '`callback` must be defined with a callback to accept output'
endif
endif
if index(['', 'socket', 'stdio', 'tsserver'], l:obj.lsp) < 0
throw '`lsp` must be either `''lsp''`, `''stdio''`, `''socket''` or `''tsserver''` if defined'
endif
if !l:needs_executable
if has_key(a:linter, 'executable')
\|| has_key(a:linter, 'executable_callback')
throw '`executable` and `executable_callback` cannot be used when lsp == ''socket'''
endif
elseif has_key(a:linter, 'executable_callback')
let l:obj.executable_callback = a:linter.executable_callback
if !s:IsCallback(l:obj.executable_callback)
throw '`executable_callback` must be a callback if defined'
endif
elseif has_key(a:linter, 'executable')
let l:obj.executable = a:linter.executable
if type(l:obj.executable) isnot v:t_string
throw '`executable` must be a string if defined'
endif
else
throw 'Either `executable` or `executable_callback` must be defined'
endif
if !l:needs_command
if has_key(a:linter, 'command')
\|| has_key(a:linter, 'command_callback')
\|| has_key(a:linter, 'command_chain')
throw '`command` and `command_callback` and `command_chain` cannot be used when lsp == ''socket'''
endif
elseif has_key(a:linter, 'command_chain')
let l:obj.command_chain = a:linter.command_chain
if type(l:obj.command_chain) isnot v:t_list
throw '`command_chain` must be a List'
endif
if empty(l:obj.command_chain)
throw '`command_chain` must contain at least one item'
endif
let l:link_index = 0
for l:link in l:obj.command_chain
let l:err_prefix = 'The `command_chain` item ' . l:link_index . ' '
if !s:IsCallback(get(l:link, 'callback'))
throw l:err_prefix . 'must define a `callback` function'
endif
if has_key(l:link, 'output_stream')
if type(l:link.output_stream) isnot v:t_string
\|| index(['stdout', 'stderr', 'both'], l:link.output_stream) < 0
throw l:err_prefix . '`output_stream` flag must be '
\ . "'stdout', 'stderr', or 'both'"
endif
endif
if has_key(l:link, 'read_buffer') && !s:IsBoolean(l:link.read_buffer)
throw l:err_prefix . 'value for `read_buffer` must be `0` or `1`'
endif
let l:link_index += 1
endfor
elseif has_key(a:linter, 'command_callback')
let l:obj.command_callback = a:linter.command_callback
if !s:IsCallback(l:obj.command_callback)
throw '`command_callback` must be a callback if defined'
endif
elseif has_key(a:linter, 'command')
let l:obj.command = a:linter.command
if type(l:obj.command) isnot v:t_string
throw '`command` must be a string if defined'
endif
else
throw 'Either `command`, `executable_callback`, `command_chain` '
\ . 'must be defined'
endif
if (
\ has_key(a:linter, 'command')
\ + has_key(a:linter, 'command_chain')
\ + has_key(a:linter, 'command_callback')
\) > 1
throw 'Only one of `command`, `command_callback`, or `command_chain` '
\ . 'should be set'
endif
if !l:needs_address
if has_key(a:linter, 'address_callback')
throw '`address_callback` cannot be used when lsp != ''socket'''
endif
elseif has_key(a:linter, 'address_callback')
let l:obj.address_callback = a:linter.address_callback
if !s:IsCallback(l:obj.address_callback)
throw '`address_callback` must be a callback if defined'
endif
else
throw '`address_callback` must be defined for getting the LSP address'
endif
if l:needs_lsp_details
if has_key(a:linter, 'language_callback')
if has_key(a:linter, 'language')
throw 'Only one of `language` or `language_callback` '
\ . 'should be set'
endif
let l:obj.language_callback = get(a:linter, 'language_callback')
if !s:IsCallback(l:obj.language_callback)
throw '`language_callback` must be a callback for LSP linters'
endif
else
" Default to using the filetype as the language.
let l:obj.language = get(a:linter, 'language', a:filetype)
if type(l:obj.language) isnot v:t_string
throw '`language` must be a string'
endif
" Make 'language_callback' return the 'language' value.
let l:obj.language_callback = function('s:LanguageGetter')
endif
let l:obj.project_root_callback = get(a:linter, 'project_root_callback')
if !s:IsCallback(l:obj.project_root_callback)
throw '`project_root_callback` must be a callback for LSP linters'
endif
if has_key(a:linter, 'completion_filter')
let l:obj.completion_filter = a:linter.completion_filter
if !s:IsCallback(l:obj.completion_filter)
throw '`completion_filter` must be a callback'
endif
endif
if has_key(a:linter, 'initialization_options_callback')
if has_key(a:linter, 'initialization_options')
throw 'Only one of `initialization_options` or '
\ . '`initialization_options_callback` should be set'
endif
let l:obj.initialization_options_callback = a:linter.initialization_options_callback
if !s:IsCallback(l:obj.initialization_options_callback)
throw '`initialization_options_callback` must be a callback if defined'
endif
elseif has_key(a:linter, 'initialization_options')
let l:obj.initialization_options = a:linter.initialization_options
endif
if has_key(a:linter, 'lsp_config_callback')
if has_key(a:linter, 'lsp_config')
throw 'Only one of `lsp_config` or `lsp_config_callback` should be set'
endif
let l:obj.lsp_config_callback = a:linter.lsp_config_callback
if !s:IsCallback(l:obj.lsp_config_callback)
throw '`lsp_config_callback` must be a callback if defined'
endif
elseif has_key(a:linter, 'lsp_config')
if type(a:linter.lsp_config) isnot v:t_dict
throw '`lsp_config` must be a Dictionary'
endif
let l:obj.lsp_config = a:linter.lsp_config
endif
endif
let l:obj.output_stream = get(a:linter, 'output_stream', 'stdout')
if type(l:obj.output_stream) isnot v:t_string
\|| index(['stdout', 'stderr', 'both'], l:obj.output_stream) < 0
throw "`output_stream` must be 'stdout', 'stderr', or 'both'"
endif
" An option indicating that this linter should only be run against the
" file on disk.
let l:obj.lint_file = get(a:linter, 'lint_file', 0)
if !s:IsBoolean(l:obj.lint_file)
throw '`lint_file` must be `0` or `1`'
endif
" An option indicating that the buffer should be read.
let l:obj.read_buffer = get(a:linter, 'read_buffer', !l:obj.lint_file)
if !s:IsBoolean(l:obj.read_buffer)
throw '`read_buffer` must be `0` or `1`'
endif
if l:obj.lint_file && l:obj.read_buffer
throw 'Only one of `lint_file` or `read_buffer` can be `1`'
endif
let l:obj.aliases = get(a:linter, 'aliases', [])
if type(l:obj.aliases) isnot v:t_list
\|| len(filter(copy(l:obj.aliases), 'type(v:val) isnot v:t_string')) > 0
throw '`aliases` must be a List of String values'
endif
return l:obj
endfunction
1 0.000002 function! ale#linter#Define(filetype, linter) abort
" This command will throw from the sandbox.
let &l:equalprg=&l:equalprg
if !has_key(s:linters, a:filetype)
let s:linters[a:filetype] = []
endif
let l:new_linter = ale#linter#PreProcess(a:filetype, a:linter)
call add(s:linters[a:filetype], l:new_linter)
endfunction
" Prevent any linters from being loaded for a given filetype.
1 0.000002 function! ale#linter#PreventLoading(filetype) abort
let s:runtime_loaded_map[a:filetype] = 1
endfunction
1 0.000001 function! ale#linter#GetAll(filetypes) abort
" Don't return linters in the sandbox.
" Otherwise a sandboxed script could modify them.
if ale#util#InSandbox()
return []
endif
let l:combined_linters = []
for l:filetype in a:filetypes
" Load linters from runtimepath if we haven't done that yet.
if !has_key(s:runtime_loaded_map, l:filetype)
execute 'silent! runtime! ale_linters/' . l:filetype . '/*.vim'
let s:runtime_loaded_map[l:filetype] = 1
endif
call extend(l:combined_linters, get(s:linters, l:filetype, []))
endfor
return l:combined_linters
endfunction
1 0.000001 function! s:GetAliasedFiletype(original_filetype) abort
let l:buffer_aliases = get(b:, 'ale_linter_aliases', {})
" b:ale_linter_aliases can be set to a List or String.
if type(l:buffer_aliases) is v:t_list
\|| type(l:buffer_aliases) is v:t_string
return l:buffer_aliases
endif
" Check for aliased filetypes first in a buffer variable,
" then the global variable,
" then in the default mapping,
" otherwise use the original filetype.
for l:dict in [
\ l:buffer_aliases,
\ g:ale_linter_aliases,
\ s:default_ale_linter_aliases,
\]
if has_key(l:dict, a:original_filetype)
return l:dict[a:original_filetype]
endif
endfor
return a:original_filetype
endfunction
1 0.000002 function! ale#linter#ResolveFiletype(original_filetype) abort
let l:filetype = s:GetAliasedFiletype(a:original_filetype)
if type(l:filetype) isnot v:t_list
return [l:filetype]
endif
return l:filetype
endfunction
1 0.000003 function! s:GetLinterNames(original_filetype) abort
let l:buffer_ale_linters = get(b:, 'ale_linters', {})
" b:ale_linters can be set to 'all'
if l:buffer_ale_linters is# 'all'
return 'all'
endif
" b:ale_linters can be set to a List.
if type(l:buffer_ale_linters) is v:t_list
return l:buffer_ale_linters
endif
" Try to get a buffer-local setting for the filetype
if has_key(l:buffer_ale_linters, a:original_filetype)
return l:buffer_ale_linters[a:original_filetype]
endif
" Try to get a global setting for the filetype
if has_key(g:ale_linters, a:original_filetype)
return g:ale_linters[a:original_filetype]
endif
" If the user has configured ALE to only enable linters explicitly, then
" don't enable any linters by default.
if g:ale_linters_explicit
return []
endif
" Try to get a default setting for the filetype
if has_key(s:default_ale_linters, a:original_filetype)
return s:default_ale_linters[a:original_filetype]
endif
return 'all'
endfunction
1 0.000001 function! ale#linter#Get(original_filetypes) abort
let l:possibly_duplicated_linters = []
" Handle dot-separated filetypes.
for l:original_filetype in split(a:original_filetypes, '\.')
let l:filetype = ale#linter#ResolveFiletype(l:original_filetype)
let l:linter_names = s:GetLinterNames(l:original_filetype)
let l:all_linters = ale#linter#GetAll(l:filetype)
let l:filetype_linters = []
if type(l:linter_names) is v:t_string && l:linter_names is# 'all'
let l:filetype_linters = l:all_linters
elseif type(l:linter_names) is v:t_list
" Select only the linters we or the user has specified.
for l:linter in l:all_linters
let l:name_list = [l:linter.name] + l:linter.aliases
for l:name in l:name_list
if index(l:linter_names, l:name) >= 0
call add(l:filetype_linters, l:linter)
break
endif
endfor
endfor
endif
call extend(l:possibly_duplicated_linters, l:filetype_linters)
endfor
let l:name_list = []
let l:combined_linters = []
" Make sure we override linters so we don't get two with the same name,
" like 'eslint' for both 'javascript' and 'typescript'
"
" Note that the reverse calls here modify the List variables.
for l:linter in reverse(l:possibly_duplicated_linters)
if index(l:name_list, l:linter.name) < 0
call add(l:name_list, l:linter.name)
call add(l:combined_linters, l:linter)
endif
endfor
return reverse(l:combined_linters)
endfunction
" Given a buffer and linter, get the executable String for the linter.
1 0.000002 function! ale#linter#GetExecutable(buffer, linter) abort
return has_key(a:linter, 'executable_callback')
\ ? ale#util#GetFunction(a:linter.executable_callback)(a:buffer)
\ : a:linter.executable
endfunction
" Given a buffer and linter, get the command String for the linter.
" The command_chain key is not supported.
1 0.000004 function! ale#linter#GetCommand(buffer, linter) abort
return has_key(a:linter, 'command_callback')
\ ? ale#util#GetFunction(a:linter.command_callback)(a:buffer)
\ : a:linter.command
endfunction
" Given a buffer and linter, get the address for connecting to the server.
1 0.000002 function! ale#linter#GetAddress(buffer, linter) abort
return has_key(a:linter, 'address_callback')
\ ? ale#util#GetFunction(a:linter.address_callback)(a:buffer)
\ : a:linter.address
endfunction
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/ale_linters/php/langserver.vim
Sourced 1 time
Total time: 0.000670
Self time: 0.000320
count total (s) self (s)
" Author: Eric Stern <eric@ericstern.com>
" Description: PHP Language server integration for ALE
1 0.000019 0.000010 call ale#Set('php_langserver_executable', 'php-language-server.php')
1 0.000011 0.000005 call ale#Set('php_langserver_use_global', get(g:, 'ale_use_global_executables', 0))
1 0.000144 function! ale_linters#php#langserver#GetProjectRoot(buffer) abort
let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git')
return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : ''
endfunction
1 0.000480 0.000144 call ale#linter#Define('php', {
\ 'name': 'langserver',
\ 'lsp': 'stdio',
\ 'executable_callback': ale#node#FindExecutableFunc('php_langserver', [
\ 'vendor/bin/php-language-server.php',
\ ]),
\ 'command': 'php %e',
\ 'project_root_callback': 'ale_linters#php#langserver#GetProjectRoot',
\})
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/autoload/ale/node.vim
Sourced 1 time
Total time: 0.000057
Self time: 0.000048
count total (s) self (s)
" Author: w0rp <devw0rp@gmail.com>
" Description: Functions for working with Node executables.
1 0.000015 0.000006 call ale#Set('windows_node_executable_path', 'node.exe')
" Given a buffer number, a base variable name, and a list of paths to search
" for in ancestor directories, detect the executable path for a Node program.
"
" The use_global and executable options for the relevant program will be used.
1 0.000003 function! ale#node#FindExecutable(buffer, base_var_name, path_list) abort
if ale#Var(a:buffer, a:base_var_name . '_use_global')
return ale#Var(a:buffer, a:base_var_name . '_executable')
endif
for l:path in a:path_list
let l:executable = ale#path#FindNearestFile(a:buffer, l:path)
if !empty(l:executable)
return l:executable
endif
endfor
return ale#Var(a:buffer, a:base_var_name . '_executable')
endfunction
" As above, but curry the arguments so only the buffer number is required.
1 0.000002 function! ale#node#FindExecutableFunc(base_var_name, path_list) abort
return {buf -> ale#node#FindExecutable(buf, a:base_var_name, a:path_list)}
endfunction
" Create a executable string which executes a Node.js script command with a
" Node.js executable if needed.
"
" The executable string should not be escaped before passing it to this
" function, the executable string will be escaped when returned by this
" function.
"
" The executable is only prefixed for Windows machines
1 0.000002 function! ale#node#Executable(buffer, executable) abort
if ale#Has('win32') && a:executable =~? '\.js$'
let l:node = ale#Var(a:buffer, 'windows_node_executable_path')
return ale#Escape(l:node) . ' ' . ale#Escape(a:executable)
endif
return ale#Escape(a:executable)
endfunction
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/ale_linters/php/phan.vim
Sourced 1 time
Total time: 0.000449
Self time: 0.000207
count total (s) self (s)
" Author: diegoholiveira <https://github.com/diegoholiveira>, haginaga <https://github.com/haginaga>
" Description: static analyzer for PHP
" Define the minimum severity
1 0.000005 let g:ale_php_phan_minimum_severity = get(g:, 'ale_php_phan_minimum_severity', 0)
1 0.000003 let g:ale_php_phan_executable = get(g:, 'ale_php_phan_executable', 'phan')
1 0.000002 let g:ale_php_phan_use_client = get(g:, 'ale_php_phan_use_client', 0)
1 0.000135 function! ale_linters#php#phan#GetExecutable(buffer) abort
let l:executable = ale#Var(a:buffer, 'php_phan_executable')
if ale#Var(a:buffer, 'php_phan_use_client') == 1 && l:executable is# 'phan'
let l:executable = 'phan_client'
endif
return l:executable
endfunction
1 0.000002 function! ale_linters#php#phan#GetCommand(buffer) abort
if ale#Var(a:buffer, 'php_phan_use_client') == 1
let l:args = '-l '
\ . ' %s'
else
let l:args = '-y '
\ . ale#Var(a:buffer, 'php_phan_minimum_severity')
\ . ' %s'
endif
let l:executable = ale_linters#php#phan#GetExecutable(a:buffer)
return ale#Escape(l:executable) . ' ' . l:args
endfunction
1 0.000002 function! ale_linters#php#phan#Handle(buffer, lines) abort
" Matches against lines like the following:
if ale#Var(a:buffer, 'php_phan_use_client') == 1
" Phan error: ERRORTYPE: message in /path/to/some-filename.php on line nnn
let l:pattern = '^Phan error: \(\w\+\): \(.\+\) in \(.\+\) on line \(\d\+\)$'
else
" /path/to/some-filename.php:18 ERRORTYPE message
let l:pattern = '^.*:\(\d\+\)\s\(\w\+\)\s\(.\+\)$'
endif
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
if ale#Var(a:buffer, 'php_phan_use_client') == 1
let l:dict = {
\ 'lnum': l:match[4] + 0,
\ 'text': l:match[2],
\ 'type': 'W',
\}
else
let l:dict = {
\ 'lnum': l:match[1] + 0,
\ 'text': l:match[3],
\ 'type': 'W',
\}
endif
call add(l:output, l:dict)
endfor
return l:output
endfunction
1 0.000255 0.000013 call ale#linter#Define('php', {
\ 'name': 'phan',
\ 'executable_callback': 'ale_linters#php#phan#GetExecutable',
\ 'command_callback': 'ale_linters#php#phan#GetCommand',
\ 'callback': 'ale_linters#php#phan#Handle',
\})
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/ale_linters/php/php.vim
Sourced 1 time
Total time: 0.000428
Self time: 0.000183
count total (s) self (s)
" Author: Spencer Wood <https://github.com/scwood>, Adriaan Zonnenberg <amz@adriaan.xyz>
" Description: This file adds support for checking PHP with php-cli
1 0.000015 0.000006 call ale#Set('php_php_executable', 'php')
1 0.000134 function! ale_linters#php#php#Handle(buffer, lines) abort
" Matches patterns like the following:
"
" PHP 7.1<= - Parse error: syntax error, unexpected ';', expecting ']' in - on line 15
" PHP 7.2>= - Parse error: syntax error, unexpected ';', expecting ']' in Standard input code on line 15
let l:pattern = '\v^%(Fatal|Parse) error:\s+(.+unexpected ''(.+)%(expecting.+)@<!''.*|.+) in %(-|Standard input code) on line (\d+)'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:col = empty(l:match[2]) ? 0 : stridx(getline(l:match[3]), l:match[2]) + 1
let l:obj = {
\ 'lnum': l:match[3] + 0,
\ 'col': l:col,
\ 'text': l:match[1],
\}
if l:col != 0
let l:obj.end_col = l:col + strlen(l:match[2]) - 1
endif
call add(l:output, l:obj)
endfor
return l:output
endfunction
1 0.000254 0.000018 call ale#linter#Define('php', {
\ 'name': 'php',
\ 'executable_callback': ale#VarFunc('php_php_executable'),
\ 'output_stream': 'stdout',
\ 'command': '%e -l -d error_reporting=E_ALL -d display_errors=1 -d log_errors=0 --',
\ 'callback': 'ale_linters#php#php#Handle',
\})
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/ale_linters/php/phpcs.vim
Sourced 1 time
Total time: 0.000466
Self time: 0.000204
count total (s) self (s)
" Author: jwilliams108 <https://github.com/jwilliams108>, Eric Stern <https://github.com/firehed>
" Description: phpcs for PHP files
1 0.000005 let g:ale_php_phpcs_standard = get(g:, 'ale_php_phpcs_standard', '')
1 0.000013 0.000005 call ale#Set('php_phpcs_options', '')
1 0.000010 0.000003 call ale#Set('php_phpcs_executable', 'phpcs')
1 0.000010 0.000004 call ale#Set('php_phpcs_use_global', get(g:, 'ale_use_global_executables', 0))
1 0.000136 function! ale_linters#php#phpcs#GetCommand(buffer) abort
let l:standard = ale#Var(a:buffer, 'php_phpcs_standard')
let l:standard_option = !empty(l:standard)
\ ? '--standard=' . l:standard
\ : ''
let l:options = ale#Var(a:buffer, 'php_phpcs_options')
return '%e -s --report=emacs --stdin-path=%s'
\ . ale#Pad(l:standard_option)
\ . ale#Pad(l:options)
endfunction
1 0.000002 function! ale_linters#php#phpcs#Handle(buffer, lines) abort
" Matches against lines like the following:
"
" /path/to/some-filename.php:18:3: error - Line indented incorrectly; expected 4 spaces, found 2 (Generic.WhiteSpace.ScopeIndent.IncorrectExact)
let l:pattern = '^.*:\(\d\+\):\(\d\+\): \(.\+\) - \(.\+\) (\(.\+\))$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
let l:code = l:match[5]
let l:text = l:match[4] . ' (' . l:code . ')'
let l:type = l:match[3]
call add(l:output, {
\ 'lnum': l:match[1] + 0,
\ 'col': l:match[2] + 0,
\ 'text': l:text,
\ 'type': l:type is# 'error' ? 'E' : 'W',
\})
endfor
return l:output
endfunction
1 0.000259 0.000017 call ale#linter#Define('php', {
\ 'name': 'phpcs',
\ 'executable_callback': ale#node#FindExecutableFunc('php_phpcs', [
\ 'vendor/bin/phpcs',
\ 'phpcs'
\ ]),
\ 'command_callback': 'ale_linters#php#phpcs#GetCommand',
\ 'callback': 'ale_linters#php#phpcs#Handle',
\})
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/ale_linters/php/phpmd.vim
Sourced 1 time
Total time: 0.000430
Self time: 0.000187
count total (s) self (s)
" Author: medains <https://github.com/medains>, David Sierra <https://github.com/davidsierradz>
" Description: phpmd for PHP files
1 0.000005 let g:ale_php_phpmd_executable = get(g:, 'ale_php_phpmd_executable', 'phpmd')
" Set to change the ruleset
1 0.000003 let g:ale_php_phpmd_ruleset = get(g:, 'ale_php_phpmd_ruleset', 'cleancode,codesize,controversial,design,naming,unusedcode')
1 0.000137 function! ale_linters#php#phpmd#GetCommand(buffer) abort
return '%e %s text'
\ . ale#Pad(ale#Var(a:buffer, 'php_phpmd_ruleset'))
\ . ' --ignore-violations-on-exit %t'
endfunction
1 0.000002 function! ale_linters#php#phpmd#Handle(buffer, lines) abort
" Matches against lines like the following:
"
" /path/to/some-filename.php:18 message
let l:pattern = '^.*:\(\d\+\)\s\+\(.\+\)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'lnum': l:match[1] + 0,
\ 'text': l:match[2],
\ 'type': 'W',
\})
endfor
return l:output
endfunction
1 0.000261 0.000018 call ale#linter#Define('php', {
\ 'name': 'phpmd',
\ 'executable_callback': ale#VarFunc('php_phpmd_executable'),
\ 'command_callback': 'ale_linters#php#phpmd#GetCommand',
\ 'callback': 'ale_linters#php#phpmd#Handle',
\})
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/ale_linters/php/phpstan.vim
Sourced 1 time
Total time: 0.000499
Self time: 0.000214
count total (s) self (s)
" Author: medains <https://github.com/medains>, ardis <https://github.com/ardisdreelath>
" Description: phpstan for PHP files
" Set to change the ruleset
1 0.000006 let g:ale_php_phpstan_executable = get(g:, 'ale_php_phpstan_executable', 'phpstan')
1 0.000003 let g:ale_php_phpstan_level = get(g:, 'ale_php_phpstan_level', '4')
1 0.000003 let g:ale_php_phpstan_configuration = get(g:, 'ale_php_phpstan_configuration', '')
1 0.000137 function! ale_linters#php#phpstan#GetExecutable(buffer) abort
return ale#Var(a:buffer, 'php_phpstan_executable')
endfunction
1 0.000002 function! ale_linters#php#phpstan#VersionCheck(buffer) abort
let l:executable = ale_linters#php#phpstan#GetExecutable(a:buffer)
" If we have previously stored the version number in a cache, then
" don't look it up again.
if ale#semver#HasVersion(l:executable)
" Returning an empty string skips this command.
return ''
endif
let l:executable = ale#Escape(l:executable)
return l:executable . ' --version'
endfunction
1 0.000002 function! ale_linters#php#phpstan#GetCommand(buffer, version_output) abort
let l:configuration = ale#Var(a:buffer, 'php_phpstan_configuration')
let l:configuration_option = !empty(l:configuration)
\ ? ' -c ' . l:configuration
\ : ''
let l:executable = ale_linters#php#phpstan#GetExecutable(a:buffer)
let l:version = ale#semver#GetVersion(l:executable, a:version_output)
let l:error_format = ale#semver#GTE(l:version, [0, 10, 3])
\ ? ' --error-format raw'
\ : ' --errorFormat raw'
return '%e analyze -l'
\ . ale#Var(a:buffer, 'php_phpstan_level')
\ . l:error_format
\ . l:configuration_option
\ . ' %s'
endfunction
1 0.000002 function! ale_linters#php#phpstan#Handle(buffer, lines) abort
" Matches against lines like the following:
"
" filename.php:15:message
" C:\folder\filename.php:15:message
let l:pattern = '^\([a-zA-Z]:\)\?[^:]\+:\(\d\+\):\(.*\)$'
let l:output = []
for l:match in ale#util#GetMatches(a:lines, l:pattern)
call add(l:output, {
\ 'lnum': l:match[2] + 0,
\ 'text': l:match[3],
\ 'type': 'W',
\})
endfor
return l:output
endfunction
1 0.000302 0.000017 call ale#linter#Define('php', {
\ 'name': 'phpstan',
\ 'executable_callback': 'ale_linters#php#phpstan#GetExecutable',
\ 'command_chain': [
\ {'callback': 'ale_linters#php#phpstan#VersionCheck'},
\ {'callback': 'ale_linters#php#phpstan#GetCommand'},
\ ],
\ 'callback': 'ale_linters#php#phpstan#Handle',
\})
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/ale_linters/php/psalm.vim
Sourced 1 time
Total time: 0.000439
Self time: 0.000176
count total (s) self (s)
" Author: Matt Brown <https://github.com/muglug>
" Description: plugin for Psalm, static analyzer for PHP
1 0.000015 0.000006 call ale#Set('psalm_langserver_executable', 'psalm-language-server')
1 0.000011 0.000005 call ale#Set('psalm_langserver_use_global', get(g:, 'ale_use_global_executables', 0))
1 0.000135 function! ale_linters#php#psalm#GetProjectRoot(buffer) abort
let l:git_path = ale#path#FindNearestDirectory(a:buffer, '.git')
return !empty(l:git_path) ? fnamemodify(l:git_path, ':h:h') : ''
endfunction
1 0.000265 0.000018 call ale#linter#Define('php', {
\ 'name': 'psalm',
\ 'lsp': 'stdio',
\ 'executable_callback': ale#node#FindExecutableFunc('psalm_langserver', [
\ 'vendor/bin/psalm-language-server',
\ ]),
\ 'command': '%e',
\ 'project_root_callback': 'ale_linters#php#psalm#GetProjectRoot',
\})
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/autoload/ale/lsp_linter.vim
Sourced 1 time
Total time: 0.000182
Self time: 0.000182
count total (s) self (s)
" Author: w0rp <devw0rp@gmail.com>
" Description: Integration between linters and LSP/tsserver.
" This code isn't loaded if a user never users LSP features or linters.
" Associates LSP connection IDs with linter names.
1 0.000004 if !has_key(s:, 'lsp_linter_map')
1 0.000002 let s:lsp_linter_map = {}
1 0.000001 endif
" Check if diagnostics for a particular linter should be ignored.
1 0.000003 function! s:ShouldIgnore(buffer, linter_name) abort
let l:config = ale#Var(a:buffer, 'linters_ignore')
" Don't load code for ignoring diagnostics if there's nothing to ignore.
if empty(l:config)
return 0
endif
let l:filetype = getbufvar(a:buffer, '&filetype')
let l:ignore_list = ale#engine#ignore#GetList(l:filetype, l:config)
return index(l:ignore_list, a:linter_name) >= 0
endfunction
1 0.000002 function! s:HandleLSPDiagnostics(conn_id, response) abort
let l:linter_name = s:lsp_linter_map[a:conn_id]
let l:filename = ale#path#FromURI(a:response.params.uri)
let l:buffer = bufnr(l:filename)
if s:ShouldIgnore(l:buffer, l:linter_name)
return
endif
if l:buffer <= 0
return
endif
let l:loclist = ale#lsp#response#ReadDiagnostics(a:response)
call ale#engine#HandleLoclist(l:linter_name, l:buffer, l:loclist, 0)
endfunction
1 0.000002 function! s:HandleTSServerDiagnostics(response, error_type) abort
let l:linter_name = 'tsserver'
let l:buffer = bufnr(a:response.body.file)
let l:info = get(g:ale_buffer_info, l:buffer, {})
if empty(l:info)
return
endif
if s:ShouldIgnore(l:buffer, l:linter_name)
return
endif
let l:thislist = ale#lsp#response#ReadTSServerDiagnostics(a:response)
let l:no_changes = 0
" tsserver sends syntax and semantic errors in separate messages, so we
" have to collect the messages separately for each buffer and join them
" back together again.
if a:error_type is# 'syntax'
if len(l:thislist) is 0 && len(get(l:info, 'syntax_loclist', [])) is 0
let l:no_changes = 1
endif
let l:info.syntax_loclist = l:thislist
else
if len(l:thislist) is 0 && len(get(l:info, 'semantic_loclist', [])) is 0
let l:no_changes = 1
endif
let l:info.semantic_loclist = l:thislist
endif
if l:no_changes
return
endif
let l:loclist = get(l:info, 'semantic_loclist', [])
\ + get(l:info, 'syntax_loclist', [])
call ale#engine#HandleLoclist(l:linter_name, l:buffer, l:loclist, 0)
endfunction
1 0.000002 function! s:HandleLSPErrorMessage(linter_name, response) abort
if !g:ale_history_enabled || !g:ale_history_log_output
return
endif
if empty(a:linter_name)
return
endif
let l:message = ale#lsp#response#GetErrorMessage(a:response)
if empty(l:message)
return
endif
" This global variable is set here so we don't load the debugging.vim file
" until someone uses :ALEInfo.
let g:ale_lsp_error_messages = get(g:, 'ale_lsp_error_messages', {})
if !has_key(g:ale_lsp_error_messages, a:linter_name)
let g:ale_lsp_error_messages[a:linter_name] = []
endif
call add(g:ale_lsp_error_messages[a:linter_name], l:message)
endfunction
1 0.000003 function! ale#lsp_linter#HandleLSPResponse(conn_id, response) abort
let l:method = get(a:response, 'method', '')
if get(a:response, 'jsonrpc', '') is# '2.0' && has_key(a:response, 'error')
let l:linter_name = get(s:lsp_linter_map, a:conn_id, '')
call s:HandleLSPErrorMessage(l:linter_name, a:response)
elseif l:method is# 'textDocument/publishDiagnostics'
call s:HandleLSPDiagnostics(a:conn_id, a:response)
elseif get(a:response, 'type', '') is# 'event'
\&& get(a:response, 'event', '') is# 'semanticDiag'
call s:HandleTSServerDiagnostics(a:response, 'semantic')
elseif get(a:response, 'type', '') is# 'event'
\&& get(a:response, 'event', '') is# 'syntaxDiag'
call s:HandleTSServerDiagnostics(a:response, 'syntax')
endif
endfunction
1 0.000005 function! ale#lsp_linter#GetOptions(buffer, linter) abort
let l:initialization_options = {}
if has_key(a:linter, 'initialization_options_callback')
let l:initialization_options = ale#util#GetFunction(a:linter.initialization_options_callback)(a:buffer)
elseif has_key(a:linter, 'initialization_options')
let l:initialization_options = a:linter.initialization_options
endif
return l:initialization_options
endfunction
1 0.000002 function! ale#lsp_linter#GetConfig(buffer, linter) abort
let l:config = {}
if has_key(a:linter, 'lsp_config_callback')
let l:config = ale#util#GetFunction(a:linter.lsp_config_callback)(a:buffer)
elseif has_key(a:linter, 'lsp_config')
let l:config = a:linter.lsp_config
endif
return l:config
endfunction
" Given a buffer, an LSP linter, start up an LSP linter and get ready to
" receive messages for the document.
1 0.000002 function! ale#lsp_linter#StartLSP(buffer, linter) abort
let l:command = ''
let l:address = ''
let l:root = ale#util#GetFunction(a:linter.project_root_callback)(a:buffer)
if empty(l:root) && a:linter.lsp isnot# 'tsserver'
" If there's no project root, then we can't check files with LSP,
" unless we are using tsserver, which doesn't use project roots.
return {}
endif
let l:init_options = ale#lsp_linter#GetOptions(a:buffer, a:linter)
if a:linter.lsp is# 'socket'
let l:address = ale#linter#GetAddress(a:buffer, a:linter)
let l:conn_id = ale#lsp#Register(l:address, l:root, l:init_options)
let l:ready = ale#lsp#ConnectToAddress(l:conn_id, l:address)
else
let l:executable = ale#linter#GetExecutable(a:buffer, a:linter)
if empty(l:executable) || !executable(l:executable)
return {}
endif
let l:conn_id = ale#lsp#Register(l:executable, l:root, l:init_options)
let l:command = ale#linter#GetCommand(a:buffer, a:linter)
" Format the command, so %e can be formatted into it.
let l:command = ale#command#FormatCommand(a:buffer, l:executable, l:command, 0)[1]
let l:command = ale#job#PrepareCommand(a:buffer, l:command)
let l:ready = ale#lsp#StartProgram(l:conn_id, l:executable, l:command)
endif
if !l:ready
if g:ale_history_enabled && !empty(l:command)
call ale#history#Add(a:buffer, 'failed', l:conn_id, l:command)
endif
return {}
endif
" tsserver behaves differently, so tell the LSP API that it is tsserver.
if a:linter.lsp is# 'tsserver'
call ale#lsp#MarkConnectionAsTsserver(l:conn_id)
endif
let l:config = ale#lsp_linter#GetConfig(a:buffer, a:linter)
let l:language_id = ale#util#GetFunction(a:linter.language_callback)(a:buffer)
let l:details = {
\ 'buffer': a:buffer,
\ 'connection_id': l:conn_id,
\ 'command': l:command,
\ 'project_root': l:root,
\ 'language_id': l:language_id,
\}
call ale#lsp#UpdateConfig(l:conn_id, a:buffer, l:config)
if ale#lsp#OpenDocument(l:conn_id, a:buffer, l:language_id)
if g:ale_history_enabled && !empty(l:command)
call ale#history#Add(a:buffer, 'started', l:conn_id, l:command)
endif
endif
" The change message needs to be sent for tsserver before doing anything.
if a:linter.lsp is# 'tsserver'
call ale#lsp#NotifyForChanges(l:conn_id, a:buffer)
endif
return l:details
endfunction
1 0.000002 function! ale#lsp_linter#CheckWithLSP(buffer, linter) abort
let l:info = g:ale_buffer_info[a:buffer]
let l:lsp_details = ale#lsp_linter#StartLSP(a:buffer, a:linter)
if empty(l:lsp_details)
return 0
endif
let l:id = l:lsp_details.connection_id
" Register a callback now for handling errors now.
let l:Callback = function('ale#lsp_linter#HandleLSPResponse')
call ale#lsp#RegisterCallback(l:id, l:Callback)
" Remember the linter this connection is for.
let s:lsp_linter_map[l:id] = a:linter.name
if a:linter.lsp is# 'tsserver'
let l:message = ale#lsp#tsserver_message#Geterr(a:buffer)
let l:notified = ale#lsp#Send(l:id, l:message) != 0
else
let l:notified = ale#lsp#NotifyForChanges(l:id, a:buffer)
endif
" If this was a file save event, also notify the server of that.
if a:linter.lsp isnot# 'tsserver'
\&& getbufvar(a:buffer, 'ale_save_event_fired', 0)
let l:save_message = ale#lsp#message#DidSave(a:buffer)
let l:notified = ale#lsp#Send(l:id, l:save_message) != 0
endif
if l:notified
if index(l:info.active_linter_list, a:linter.name) < 0
call add(l:info.active_linter_list, a:linter.name)
endif
endif
return l:notified
endfunction
" Clear LSP linter data for the linting engine.
1 0.000002 function! ale#lsp_linter#ClearLSPData() abort
let s:lsp_linter_map = {}
endfunction
" Just for tests.
1 0.000002 function! ale#lsp_linter#SetLSPLinterMap(replacement_map) abort
let s:lsp_linter_map = a:replacement_map
endfunction
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/autoload/ale/path.vim
Sourced 1 time
Total time: 0.000185
Self time: 0.000157
count total (s) self (s)
" Author: w0rp <devw0rp@gmail.com>
" Description: Functions for working with paths in the filesystem.
" simplify a path, and fix annoying issues with paths on Windows.
"
" Forward slashes are changed to back slashes so path equality works better.
"
" Paths starting with more than one forward slash are changed to only one
" forward slash, to prevent the paths being treated as special MSYS paths.
1 0.000003 function! ale#path#Simplify(path) abort
if has('unix')
return substitute(simplify(a:path), '^//\+', '/', 'g') " no-custom-checks
endif
let l:win_path = substitute(a:path, '/', '\\', 'g')
return substitute(simplify(l:win_path), '^\\\+', '\', 'g') " no-custom-checks
endfunction
" Given a buffer and a filename, find the nearest file by searching upwards
" through the paths relative to the given buffer.
1 0.000002 function! ale#path#FindNearestFile(buffer, filename) abort
let l:buffer_filename = fnamemodify(bufname(a:buffer), ':p')
let l:buffer_filename = fnameescape(l:buffer_filename)
let l:relative_path = findfile(a:filename, l:buffer_filename . ';')
if !empty(l:relative_path)
return fnamemodify(l:relative_path, ':p')
endif
return ''
endfunction
" Given a buffer and a directory name, find the nearest directory by searching upwards
" through the paths relative to the given buffer.
1 0.000002 function! ale#path#FindNearestDirectory(buffer, directory_name) abort
let l:buffer_filename = fnamemodify(bufname(a:buffer), ':p')
let l:buffer_filename = fnameescape(l:buffer_filename)
let l:relative_path = finddir(a:directory_name, l:buffer_filename . ';')
if !empty(l:relative_path)
return fnamemodify(l:relative_path, ':p')
endif
return ''
endfunction
" Given a buffer, a string to search for, an a global fallback for when
" the search fails, look for a file in parent paths, and if that fails,
" use the global fallback path instead.
1 0.000002 function! ale#path#ResolveLocalPath(buffer, search_string, global_fallback) abort
" Search for a locally installed file first.
let l:path = ale#path#FindNearestFile(a:buffer, a:search_string)
" If the serach fails, try the global executable instead.
if empty(l:path)
let l:path = a:global_fallback
endif
return l:path
endfunction
" Output 'cd <directory> && '
" This function can be used changing the directory for a linter command.
1 0.000002 function! ale#path#CdString(directory) abort
if has('win32')
return 'cd /d ' . ale#Escape(a:directory) . ' && '
else
return 'cd ' . ale#Escape(a:directory) . ' && '
endif
endfunction
" Output 'cd <buffer_filename_directory> && '
" This function can be used changing the directory for a linter command.
1 0.000001 function! ale#path#BufferCdString(buffer) abort
return ale#path#CdString(fnamemodify(bufname(a:buffer), ':p:h'))
endfunction
" Return 1 if a path is an absolute path.
1 0.000001 function! ale#path#IsAbsolute(filename) abort
if has('win32') && a:filename[:0] is# '\'
return 1
endif
" Check for /foo and C:\foo, etc.
return a:filename[:0] is# '/' || a:filename[1:2] is# ':\'
endfunction
1 0.000043 0.000015 let s:temp_dir = ale#path#Simplify(fnamemodify(ale#util#Tempname(), ':h'))
" Given a filename, return 1 if the file represents some temporary file
" created by Vim.
1 0.000002 function! ale#path#IsTempName(filename) abort
return ale#path#Simplify(a:filename)[:len(s:temp_dir) - 1] is# s:temp_dir
endfunction
" Given a base directory, which must not have a trailing slash, and a
" filename, which may have an absolute path a path relative to the base
" directory, return the absolute path to the file.
1 0.000002 function! ale#path#GetAbsPath(base_directory, filename) abort
if ale#path#IsAbsolute(a:filename)
return ale#path#Simplify(a:filename)
endif
let l:sep = has('win32') ? '\' : '/'
return ale#path#Simplify(a:base_directory . l:sep . a:filename)
endfunction
" Given a path, return the directory name for that path, with no trailing
" slashes. If the argument is empty(), return an empty string.
1 0.000002 function! ale#path#Dirname(path) abort
if empty(a:path)
return ''
endif
" For /foo/bar/ we need :h:h to get /foo
if a:path[-1:] is# '/'
return fnamemodify(a:path, ':h:h')
endif
return fnamemodify(a:path, ':h')
endfunction
" Given a buffer number and a relative or absolute path, return 1 if the
" two paths represent the same file on disk.
1 0.000002 function! ale#path#IsBufferPath(buffer, complex_filename) abort
" If the path is one of many different names for stdin, we have a match.
if a:complex_filename is# '-'
\|| a:complex_filename is# 'stdin'
\|| a:complex_filename[:0] is# '<'
return 1
endif
let l:test_filename = ale#path#Simplify(a:complex_filename)
if l:test_filename[:1] is# './'
let l:test_filename = l:test_filename[2:]
endif
if l:test_filename[:1] is# '..'
" Remove ../../ etc. from the front of the path.
let l:test_filename = substitute(l:test_filename, '\v^(\.\.[/\\])+', '/', '')
endif
" Use the basename for temporary files, as they are likely our files.
if ale#path#IsTempName(l:test_filename)
let l:test_filename = fnamemodify(l:test_filename, ':t')
endif
let l:buffer_filename = expand('#' . a:buffer . ':p')
return l:buffer_filename is# l:test_filename
\ || l:buffer_filename[-len(l:test_filename):] is# l:test_filename
endfunction
" Given a path, return every component of the path, moving upwards.
1 0.000001 function! ale#path#Upwards(path) abort
let l:pattern = has('win32') ? '\v/+|\\+' : '\v/+'
let l:sep = has('win32') ? '\' : '/'
let l:parts = split(ale#path#Simplify(a:path), l:pattern)
let l:path_list = []
while !empty(l:parts)
call add(l:path_list, join(l:parts, l:sep))
let l:parts = l:parts[:-2]
endwhile
if has('win32') && a:path =~# '^[a-zA-z]:\'
" Add \ to C: for C:\, etc.
let l:path_list[-1] .= '\'
elseif a:path[0] is# '/'
" If the path starts with /, even on Windows, add / and / to all paths.
call map(l:path_list, '''/'' . v:val')
call add(l:path_list, '/')
endif
return l:path_list
endfunction
" Convert a filesystem path to a file:// URI
" relatives paths will not be prefixed with the protocol.
" For Windows paths, the `:` in C:\ etc. will not be percent-encoded.
1 0.000002 function! ale#path#ToURI(path) abort
let l:has_drive_letter = a:path[1:2] is# ':\'
return substitute(
\ ((l:has_drive_letter || a:path[:0] is# '/') ? 'file://' : '')
\ . (l:has_drive_letter ? '/' . a:path[:2] : '')
\ . ale#uri#Encode(l:has_drive_letter ? a:path[3:] : a:path),
\ '\\',
\ '/',
\ 'g',
\)
endfunction
1 0.000002 function! ale#path#FromURI(uri) abort
let l:i = len('file://')
let l:encoded_path = a:uri[: l:i - 1] is# 'file://' ? a:uri[l:i :] : a:uri
let l:path = ale#uri#Decode(l:encoded_path)
" If the path is like /C:/foo/bar, it should be C:\foo\bar instead.
if l:path =~# '^/[a-zA-Z]:'
let l:path = substitute(l:path[1:], '/', '\\', 'g')
endif
return l:path
endfunction
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/autoload/ale/lsp.vim
Sourced 1 time
Total time: 0.000321
Self time: 0.000321
count total (s) self (s)
" Author: w0rp <devw0rp@gmail.com>
" Description: Language Server Protocol client code
" A Dictionary for tracking connections.
1 0.000005 let s:connections = get(s:, 'connections', {})
1 0.000002 let g:ale_lsp_next_message_id = 1
" Given an id, which can be an executable or address, and a project path,
" create a new connection if needed. Return a unique ID for the connection.
1 0.000005 function! ale#lsp#Register(executable_or_address, project, init_options) abort
let l:conn_id = a:executable_or_address . ':' . a:project
if !has_key(s:connections, l:conn_id)
" is_tsserver: 1 if the connection is for tsserver.
" data: The message data received so far.
" root: The project root.
" open_documents: A Dictionary mapping buffers to b:changedtick, keeping
" track of when documents were opened, and when we last changed them.
" initialized: 0 if the connection is ready, 1 otherwise.
" init_request_id: The ID for the init request.
" init_options: Options to send to the server.
" config: Configuration settings to send to the server.
" callback_list: A list of callbacks for handling LSP responses.
" message_queue: Messages queued for sending to callbacks.
" capabilities_queue: The list of callbacks to call with capabilities.
" capabilities: Features the server supports.
let s:connections[l:conn_id] = {
\ 'id': l:conn_id,
\ 'is_tsserver': 0,
\ 'data': '',
\ 'root': a:project,
\ 'open_documents': {},
\ 'initialized': 0,
\ 'init_request_id': 0,
\ 'init_options': a:init_options,
\ 'config': {},
\ 'callback_list': [],
\ 'message_queue': [],
\ 'capabilities_queue': [],
\ 'capabilities': {
\ 'hover': 0,
\ 'references': 0,
\ 'completion': 0,
\ 'completion_trigger_characters': [],
\ 'definition': 0,
\ 'symbol_search': 0,
\ },
\}
endif
return l:conn_id
endfunction
" Remove an LSP connection with a given ID. This is only for tests.
1 0.000002 function! ale#lsp#RemoveConnectionWithID(id) abort
if has_key(s:connections, a:id)
call remove(s:connections, a:id)
endif
endfunction
" This is only needed for tests
1 0.000002 function! ale#lsp#MarkDocumentAsOpen(id, buffer) abort
let l:conn = get(s:connections, a:id, {})
if !empty(l:conn)
let l:conn.open_documents[a:buffer] = -1
endif
endfunction
1 0.000001 function! ale#lsp#GetNextMessageID() abort
" Use the current ID
let l:id = g:ale_lsp_next_message_id
" Increment the ID variable.
let g:ale_lsp_next_message_id += 1
" When the ID overflows, reset it to 1. By the time we hit the initial ID
" again, the messages will be long gone.
if g:ale_lsp_next_message_id < 1
let g:ale_lsp_next_message_id = 1
endif
return l:id
endfunction
" TypeScript messages use a different format.
1 0.000002 function! s:CreateTSServerMessageData(message) abort
let l:is_notification = a:message[0]
let l:obj = {
\ 'seq': v:null,
\ 'type': 'request',
\ 'command': a:message[1][3:],
\}
if !l:is_notification
let l:obj.seq = ale#lsp#GetNextMessageID()
endif
if len(a:message) > 2
let l:obj.arguments = a:message[2]
endif
let l:data = json_encode(l:obj) . "\n"
return [l:is_notification ? 0 : l:obj.seq, l:data]
endfunction
" Given a List of one or two items, [method_name] or [method_name, params],
" return a List containing [message_id, message_data]
1 0.000002 function! ale#lsp#CreateMessageData(message) abort
if a:message[1][:2] is# 'ts@'
return s:CreateTSServerMessageData(a:message)
endif
let l:is_notification = a:message[0]
let l:obj = {
\ 'method': a:message[1],
\ 'jsonrpc': '2.0',
\}
if !l:is_notification
let l:obj.id = ale#lsp#GetNextMessageID()
endif
if len(a:message) > 2
let l:obj.params = a:message[2]
endif
let l:body = json_encode(l:obj)
let l:data = 'Content-Length: ' . strlen(l:body) . "\r\n\r\n" . l:body
return [l:is_notification ? 0 : l:obj.id, l:data]
endfunction
1 0.000002 function! ale#lsp#ReadMessageData(data) abort
let l:response_list = []
let l:remainder = a:data
while 1
" Look for the end of the HTTP headers
let l:body_start_index = matchend(l:remainder, "\r\n\r\n")
if l:body_start_index < 0
" No header end was found yet.
break
endif
" Parse the Content-Length header.
let l:header_data = l:remainder[:l:body_start_index - 4]
let l:length_match = matchlist(
\ l:header_data,
\ '\vContent-Length: *(\d+)'
\)
if empty(l:length_match)
throw "Invalid JSON-RPC header:\n" . l:header_data
endif
" Split the body and the remainder of the text.
let l:remainder_start_index = l:body_start_index + str2nr(l:length_match[1])
if len(l:remainder) < l:remainder_start_index
" We don't have enough data yet.
break
endif
let l:body = l:remainder[l:body_start_index : l:remainder_start_index - 1]
let l:remainder = l:remainder[l:remainder_start_index :]
" Parse the JSON object and add it to the list.
call add(l:response_list, json_decode(l:body))
endwhile
return [l:remainder, l:response_list]
endfunction
" Update capabilities from the server, so we know which features the server
" supports.
1 0.000002 function! s:UpdateCapabilities(conn, capabilities) abort
if type(a:capabilities) isnot v:t_dict
return
endif
if get(a:capabilities, 'hoverProvider') is v:true
let a:conn.capabilities.hover = 1
endif
if get(a:capabilities, 'referencesProvider') is v:true
let a:conn.capabilities.references = 1
endif
if !empty(get(a:capabilities, 'completionProvider'))
let a:conn.capabilities.completion = 1
endif
if type(get(a:capabilities, 'completionProvider')) is v:t_dict
let l:chars = get(a:capabilities.completionProvider, 'triggerCharacters')
if type(l:chars) is v:t_list
let a:conn.capabilities.completion_trigger_characters = l:chars
endif
endif
if get(a:capabilities, 'definitionProvider') is v:true
let a:conn.capabilities.definition = 1
endif
if get(a:capabilities, 'workspaceSymbolProvider') is v:true
let a:conn.capabilities.symbol_search = 1
endif
endfunction
" Update a connection's configuration dictionary and notify LSP servers
" of any changes since the last update. Returns 1 if a configuration
" update was sent; otherwise 0 will be returned.
1 0.000002 function! ale#lsp#UpdateConfig(conn_id, buffer, config) abort
let l:conn = get(s:connections, a:conn_id, {})
if empty(l:conn) || a:config ==# l:conn.config " no-custom-checks
return 0
endif
let l:conn.config = a:config
let l:message = ale#lsp#message#DidChangeConfiguration(a:buffer, a:config)
call ale#lsp#Send(a:conn_id, l:message)
return 1
endfunction
1 0.000003 function! ale#lsp#HandleInitResponse(conn, response) abort
if get(a:response, 'method', '') is# 'initialize'
let a:conn.initialized = 1
elseif type(get(a:response, 'result')) is v:t_dict
\&& has_key(a:response.result, 'capabilities')
call s:UpdateCapabilities(a:conn, a:response.result.capabilities)
let a:conn.initialized = 1
endif
if !a:conn.initialized
return
endif
" After the server starts, send messages we had queued previously.
for l:message_data in a:conn.message_queue
call s:SendMessageData(a:conn, l:message_data)
endfor
" Remove the messages now.
let a:conn.message_queue = []
" Call capabilities callbacks queued for the project.
for [l:capability, l:Callback] in a:conn.capabilities_queue
if a:conn.capabilities[l:capability]
call call(l:Callback, [a:conn.id])
endif
endfor
let a:conn.capabilities_queue = []
endfunction
1 0.000003 function! ale#lsp#HandleMessage(conn_id, message) abort
let l:conn = get(s:connections, a:conn_id, {})
if empty(l:conn)
return
endif
if type(a:message) isnot v:t_string
" Ignore messages that aren't strings.
return
endif
let l:conn.data .= a:message
" Parse the objects now if we can, and keep the remaining text.
let [l:conn.data, l:response_list] = ale#lsp#ReadMessageData(l:conn.data)
" Look for initialize responses first.
if !l:conn.initialized
for l:response in l:response_list
call ale#lsp#HandleInitResponse(l:conn, l:response)
endfor
endif
" If the connection is marked as initialized, call the callbacks with the
" responses.
if l:conn.initialized
for l:response in l:response_list
" Call all of the registered handlers with the response.
for l:Callback in l:conn.callback_list
call ale#util#GetFunction(l:Callback)(a:conn_id, l:response)
endfor
endfor
endif
endfunction
" Given a connection ID, mark it as a tsserver connection, so it will be
" handled that way.
1 0.000002 function! ale#lsp#MarkConnectionAsTsserver(conn_id) abort
let l:conn = s:connections[a:conn_id]
let l:conn.is_tsserver = 1
let l:conn.initialized = 1
" Set capabilities which are supported by tsserver.
let l:conn.capabilities.hover = 1
let l:conn.capabilities.references = 1
let l:conn.capabilities.completion = 1
let l:conn.capabilities.completion_trigger_characters = ['.']
let l:conn.capabilities.definition = 1
let l:conn.capabilities.symbol_search = 1
endfunction
" Start a program for LSP servers.
"
" 1 will be returned if the program is running, or 0 if the program could
" not be started.
1 0.000002 function! ale#lsp#StartProgram(conn_id, executable, command) abort
let l:conn = s:connections[a:conn_id]
if !has_key(l:conn, 'job_id') || !ale#job#IsRunning(l:conn.job_id)
let l:options = {
\ 'mode': 'raw',
\ 'out_cb': {_, message -> ale#lsp#HandleMessage(a:conn_id, message)},
\}
let l:job_id = ale#job#Start(a:command, l:options)
else
let l:job_id = l:conn.job_id
endif
if l:job_id > 0
let l:conn.job_id = l:job_id
endif
return l:job_id > 0
endfunction
" Connect to an LSP server via TCP.
"
" 1 will be returned if the connection is running, or 0 if the connection could
" not be opened.
1 0.000002 function! ale#lsp#ConnectToAddress(conn_id, address) abort
let l:conn = s:connections[a:conn_id]
if !has_key(l:conn, 'channel_id') || !ale#socket#IsOpen(l:conn.channel_id)
let l:channel_id = ale#socket#Open(a:address, {
\ 'callback': {_, mess -> ale#lsp#HandleMessage(a:conn_id, mess)},
\})
else
let l:channel_id = l:conn.channel_id
endif
if l:channel_id >= 0
let l:conn.channel_id = l:channel_id
endif
return l:channel_id >= 0
endfunction
" Given a connection ID and a callback, register that callback for handling
" messages if the connection exists.
1 0.000002 function! ale#lsp#RegisterCallback(conn_id, callback) abort
let l:conn = get(s:connections, a:conn_id, {})
if !empty(l:conn)
" Add the callback to the List if it's not there already.
call uniq(sort(add(l:conn.callback_list, a:callback)))
endif
endfunction
" Stop a single LSP connection.
1 0.000002 function! ale#lsp#Stop(conn_id) abort
if has_key(s:connections, a:conn_id)
let l:conn = remove(s:connections, a:conn_id)
if has_key(l:conn, 'channel_id')
call ale#socket#Close(l:conn.channel_id)
elseif has_key(l:conn, 'job_id')
call ale#job#Stop(l:conn.job_id)
endif
endif
endfunction
1 0.000001 function! ale#lsp#CloseDocument(conn_id) abort
endfunction
" Stop all LSP connections, closing all jobs and channels, and removing any
" queued messages.
1 0.000001 function! ale#lsp#StopAll() abort
for l:conn_id in keys(s:connections)
call ale#lsp#Stop(l:conn_id)
endfor
endfunction
1 0.000002 function! s:SendMessageData(conn, data) abort
if has_key(a:conn, 'job_id')
call ale#job#SendRaw(a:conn.job_id, a:data)
elseif has_key(a:conn, 'channel_id') && ale#socket#IsOpen(a:conn.channel_id)
" Send the message to the server
call ale#socket#Send(a:conn.channel_id, a:data)
else
return 0
endif
return 1
endfunction
" Send a message to an LSP server.
" Notifications do not need to be handled.
"
" Returns -1 when a message is sent, but no response is expected
" 0 when the message is not sent and
" >= 1 with the message ID when a response is expected.
1 0.000002 function! ale#lsp#Send(conn_id, message) abort
let l:conn = get(s:connections, a:conn_id, {})
if empty(l:conn)
return 0
endif
" If we haven't initialized the server yet, then send the message for it.
if !l:conn.initialized && !l:conn.init_request_id
let [l:init_id, l:init_data] = ale#lsp#CreateMessageData(
\ ale#lsp#message#Initialize(l:conn.root, l:conn.init_options),
\)
let l:conn.init_request_id = l:init_id
call s:SendMessageData(l:conn, l:init_data)
endif
let [l:id, l:data] = ale#lsp#CreateMessageData(a:message)
if l:conn.initialized
" Send the message now.
call s:SendMessageData(l:conn, l:data)
else
" Add the message we wanted to send to a List to send later.
call add(l:conn.message_queue, l:data)
endif
return l:id == 0 ? -1 : l:id
endfunction
" Notify LSP servers or tsserver if a document is opened, if needed.
" If a document is opened, 1 will be returned, otherwise 0 will be returned.
1 0.000002 function! ale#lsp#OpenDocument(conn_id, buffer, language_id) abort
let l:conn = get(s:connections, a:conn_id, {})
let l:opened = 0
if !empty(l:conn) && !has_key(l:conn.open_documents, a:buffer)
if l:conn.is_tsserver
let l:message = ale#lsp#tsserver_message#Open(a:buffer)
else
let l:message = ale#lsp#message#DidOpen(a:buffer, a:language_id)
endif
call ale#lsp#Send(a:conn_id, l:message)
let l:conn.open_documents[a:buffer] = getbufvar(a:buffer, 'changedtick')
let l:opened = 1
endif
return l:opened
endfunction
" Notify LSP servers or tsserver that a document has changed, if needed.
" If a notification is sent, 1 will be returned, otherwise 0 will be returned.
1 0.000002 function! ale#lsp#NotifyForChanges(conn_id, buffer) abort
let l:conn = get(s:connections, a:conn_id, {})
let l:notified = 0
if !empty(l:conn) && has_key(l:conn.open_documents, a:buffer)
let l:new_tick = getbufvar(a:buffer, 'changedtick')
if l:conn.open_documents[a:buffer] < l:new_tick
if l:conn.is_tsserver
let l:message = ale#lsp#tsserver_message#Change(a:buffer)
else
let l:message = ale#lsp#message#DidChange(a:buffer)
endif
call ale#lsp#Send(a:conn_id, l:message)
let l:conn.open_documents[a:buffer] = l:new_tick
let l:notified = 1
endif
endif
return l:notified
endfunction
" Given some LSP details that must contain at least `connection_id` and
" `project_root` keys,
1 0.000002 function! ale#lsp#WaitForCapability(conn_id, capability, callback) abort
let l:conn = get(s:connections, a:conn_id, {})
if empty(l:conn)
return
endif
if type(get(l:conn.capabilities, a:capability, v:null)) isnot v:t_number
throw 'Invalid capability ' . a:capability
endif
if l:conn.initialized
if l:conn.capabilities[a:capability]
" The project has been initialized, so call the callback now.
call call(a:callback, [a:conn_id])
endif
else
" Call the callback later, once we have the information we need.
call add(l:conn.capabilities_queue, [a:capability, a:callback])
endif
endfunction
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/autoload/ale/command.vim
Sourced 1 time
Total time: 0.000045
Self time: 0.000045
count total (s) self (s)
" Author: w0rp <devw0rp@gmail.com>
" Description: Special command formatting for creating temporary files and
" passing buffer filenames easily.
1 0.000003 function! s:TemporaryFilename(buffer) abort
let l:filename = fnamemodify(bufname(a:buffer), ':t')
if empty(l:filename)
" If the buffer's filename is empty, create a dummy filename.
let l:ft = getbufvar(a:buffer, '&filetype')
let l:filename = 'file' . ale#filetypes#GuessExtension(l:ft)
endif
" Create a temporary filename, <temp_dir>/<original_basename>
" The file itself will not be created by this function.
return ale#util#Tempname() . (has('win32') ? '\' : '/') . l:filename
endfunction
" Given a command string, replace every...
" %s -> with the current filename
" %t -> with the name of an unused file in a temporary directory
" %% -> with a literal %
1 0.000003 function! ale#command#FormatCommand(buffer, executable, command, pipe_file_if_needed) abort
let l:temporary_file = ''
let l:command = a:command
" First replace all uses of %%, used for literal percent characters,
" with an ugly string.
let l:command = substitute(l:command, '%%', '<<PERCENTS>>', 'g')
" Replace %e with the escaped executable, if available.
if !empty(a:executable) && l:command =~# '%e'
let l:command = substitute(l:command, '%e', '\=ale#Escape(a:executable)', 'g')
endif
" Replace all %s occurrences in the string with the name of the current
" file.
if l:command =~# '%s'
let l:filename = fnamemodify(bufname(a:buffer), ':p')
let l:command = substitute(l:command, '%s', '\=ale#Escape(l:filename)', 'g')
endif
if l:command =~# '%t'
" Create a temporary filename, <temp_dir>/<original_basename>
" The file itself will not be created by this function.
let l:temporary_file = s:TemporaryFilename(a:buffer)
let l:command = substitute(l:command, '%t', '\=ale#Escape(l:temporary_file)', 'g')
endif
" Finish formatting so %% becomes %.
let l:command = substitute(l:command, '<<PERCENTS>>', '%', 'g')
if a:pipe_file_if_needed && empty(l:temporary_file)
" If we are to send the Vim buffer to a command, we'll do it
" in the shell. We'll write out the file to a temporary file,
" and then read it back in, in the shell.
let l:temporary_file = s:TemporaryFilename(a:buffer)
let l:command = l:command . ' < ' . ale#Escape(l:temporary_file)
endif
return [l:temporary_file, l:command]
endfunction
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/autoload/ale/job.vim
Sourced 1 time
Total time: 0.000223
Self time: 0.000223
count total (s) self (s)
" Author: w0rp <devw0rp@gmail.com>
" Description: APIs for working with Asynchronous jobs, with an API normalised
" between Vim 8 and NeoVim.
"
" Important functions are described below. They are:
"
" ale#job#Start(command, options) -> job_id
" ale#job#IsRunning(job_id) -> 1 if running, 0 otherwise.
" ale#job#Stop(job_id)
" A setting for wrapping commands.
1 0.000005 let g:ale_command_wrapper = get(g:, 'ale_command_wrapper', '')
1 0.000002 if !has_key(s:, 'job_map')
1 0.000002 let s:job_map = {}
1 0.000001 endif
" A map from timer IDs to jobs, for tracking jobs that need to be killed
" with SIGKILL if they don't terminate right away.
1 0.000002 if !has_key(s:, 'job_kill_timers')
1 0.000001 let s:job_kill_timers = {}
1 0.000001 endif
1 0.000002 function! s:KillHandler(timer) abort
let l:job = remove(s:job_kill_timers, a:timer)
call job_stop(l:job, 'kill')
endfunction
1 0.000002 function! s:NeoVimCallback(job, data, event) abort
let l:info = s:job_map[a:job]
if a:event is# 'stdout'
let l:info.out_cb_line = ale#util#JoinNeovimOutput(
\ a:job,
\ l:info.out_cb_line,
\ a:data,
\ l:info.mode,
\ ale#util#GetFunction(l:info.out_cb),
\)
elseif a:event is# 'stderr'
let l:info.err_cb_line = ale#util#JoinNeovimOutput(
\ a:job,
\ l:info.err_cb_line,
\ a:data,
\ l:info.mode,
\ ale#util#GetFunction(l:info.err_cb),
\)
else
if has_key(l:info, 'out_cb') && !empty(l:info.out_cb_line)
call ale#util#GetFunction(l:info.out_cb)(a:job, l:info.out_cb_line)
endif
if has_key(l:info, 'err_cb') && !empty(l:info.err_cb_line)
call ale#util#GetFunction(l:info.err_cb)(a:job, l:info.err_cb_line)
endif
try
call ale#util#GetFunction(l:info.exit_cb)(a:job, a:data)
finally
" Automatically forget about the job after it's done.
if has_key(s:job_map, a:job)
call remove(s:job_map, a:job)
endif
endtry
endif
endfunction
1 0.000002 function! s:VimOutputCallback(channel, data) abort
let l:job = ch_getjob(a:channel)
let l:job_id = ale#job#ParseVim8ProcessID(string(l:job))
" Only call the callbacks for jobs which are valid.
if l:job_id > 0 && has_key(s:job_map, l:job_id)
call ale#util#GetFunction(s:job_map[l:job_id].out_cb)(l:job_id, a:data)
endif
endfunction
1 0.000001 function! s:VimErrorCallback(channel, data) abort
let l:job = ch_getjob(a:channel)
let l:job_id = ale#job#ParseVim8ProcessID(string(l:job))
" Only call the callbacks for jobs which are valid.
if l:job_id > 0 && has_key(s:job_map, l:job_id)
call ale#util#GetFunction(s:job_map[l:job_id].err_cb)(l:job_id, a:data)
endif
endfunction
1 0.000001 function! s:VimCloseCallback(channel) abort
let l:job = ch_getjob(a:channel)
let l:job_id = ale#job#ParseVim8ProcessID(string(l:job))
let l:info = get(s:job_map, l:job_id, {})
if empty(l:info)
return
endif
" job_status() can trigger the exit handler.
" The channel can close before the job has exited.
if job_status(l:job) is# 'dead'
try
if !empty(l:info) && has_key(l:info, 'exit_cb')
call ale#util#GetFunction(l:info.exit_cb)(l:job_id, get(l:info, 'exit_code', 1))
endif
finally
" Automatically forget about the job after it's done.
if has_key(s:job_map, l:job_id)
call remove(s:job_map, l:job_id)
endif
endtry
endif
endfunction
1 0.000001 function! s:VimExitCallback(job, exit_code) abort
let l:job_id = ale#job#ParseVim8ProcessID(string(a:job))
let l:info = get(s:job_map, l:job_id, {})
if empty(l:info)
return
endif
let l:info.exit_code = a:exit_code
" The program can exit before the data has finished being read.
if ch_status(job_getchannel(a:job)) is# 'closed'
try
if !empty(l:info) && has_key(l:info, 'exit_cb')
call ale#util#GetFunction(l:info.exit_cb)(l:job_id, a:exit_code)
endif
finally
" Automatically forget about the job after it's done.
if has_key(s:job_map, l:job_id)
call remove(s:job_map, l:job_id)
endif
endtry
endif
endfunction
1 0.000002 function! ale#job#ParseVim8ProcessID(job_string) abort
return matchstr(a:job_string, '\d\+') + 0
endfunction
1 0.000002 function! ale#job#ValidateArguments(command, options) abort
if a:options.mode isnot# 'nl' && a:options.mode isnot# 'raw'
throw 'Invalid mode: ' . a:options.mode
endif
endfunction
1 0.000001 function! s:PrepareWrappedCommand(original_wrapper, command) abort
let l:match = matchlist(a:command, '\v^(.*(\&\&|;)) *(.*)$')
let l:prefix = ''
let l:command = a:command
if !empty(l:match)
let l:prefix = l:match[1] . ' '
let l:command = l:match[3]
endif
let l:format = a:original_wrapper
if l:format =~# '%@'
let l:wrapped = substitute(l:format, '%@', ale#Escape(l:command), '')
else
if l:format !~# '%\*'
let l:format .= ' %*'
endif
let l:wrapped = substitute(l:format, '%\*', l:command, '')
endif
return l:prefix . l:wrapped
endfunction
1 0.000002 function! ale#job#PrepareCommand(buffer, command) abort
let l:wrapper = ale#Var(a:buffer, 'command_wrapper')
let l:command = !empty(l:wrapper)
\ ? s:PrepareWrappedCommand(l:wrapper, a:command)
\ : a:command
" The command will be executed in a subshell. This fixes a number of
" issues, including reading the PATH variables correctly, %PATHEXT%
" expansion on Windows, etc.
"
" NeoVim handles this issue automatically if the command is a String,
" but we'll do this explicitly, so we use the same exact command for both
" versions.
if has('win32')
return 'cmd /s/c "' . l:command . '"'
endif
if &shell =~? 'fish$\|pwsh$'
return ['/bin/sh', '-c', l:command]
endif
return split(&shell) + split(&shellcmdflag) + [l:command]
endfunction
" Start a job with options which are agnostic to Vim and NeoVim.
"
" The following options are accepted:
"
" out_cb - A callback for receiving stdin. Arguments: (job_id, data)
" err_cb - A callback for receiving stderr. Arguments: (job_id, data)
" exit_cb - A callback for program exit. Arguments: (job_id, status_code)
" mode - A mode for I/O. Can be 'nl' for split lines or 'raw'.
1 0.000002 function! ale#job#Start(command, options) abort
call ale#job#ValidateArguments(a:command, a:options)
let l:job_info = copy(a:options)
let l:job_options = {}
if has('nvim')
if has_key(a:options, 'out_cb')
let l:job_options.on_stdout = function('s:NeoVimCallback')
let l:job_info.out_cb_line = ''
endif
if has_key(a:options, 'err_cb')
let l:job_options.on_stderr = function('s:NeoVimCallback')
let l:job_info.err_cb_line = ''
endif
if has_key(a:options, 'exit_cb')
let l:job_options.on_exit = function('s:NeoVimCallback')
endif
let l:job_info.job = jobstart(a:command, l:job_options)
let l:job_id = l:job_info.job
else
let l:job_options = {
\ 'in_mode': l:job_info.mode,
\ 'out_mode': l:job_info.mode,
\ 'err_mode': l:job_info.mode,
\}
if has_key(a:options, 'out_cb')
let l:job_options.out_cb = function('s:VimOutputCallback')
endif
if has_key(a:options, 'err_cb')
let l:job_options.err_cb = function('s:VimErrorCallback')
endif
if has_key(a:options, 'exit_cb')
" Set a close callback to which simply calls job_status()
" when the channel is closed, which can trigger the exit callback
" earlier on.
let l:job_options.close_cb = function('s:VimCloseCallback')
let l:job_options.exit_cb = function('s:VimExitCallback')
endif
" Use non-blocking writes for Vim versions that support the option.
if has('patch-8.1.350')
let l:job_options.noblock = 1
endif
" Vim 8 will read the stdin from the file's buffer.
let l:job_info.job = job_start(a:command, l:job_options)
let l:job_id = ale#job#ParseVim8ProcessID(string(l:job_info.job))
endif
if l:job_id > 0
" Store the job in the map for later only if we can get the ID.
let s:job_map[l:job_id] = l:job_info
endif
return l:job_id
endfunction
" Send raw data to the job.
1 0.000002 function! ale#job#SendRaw(job_id, string) abort
if has('nvim')
call jobsend(a:job_id, a:string)
else
call ch_sendraw(job_getchannel(s:job_map[a:job_id].job), a:string)
endif
endfunction
" Given a job ID, return 1 if the job is currently running.
" Invalid job IDs will be ignored.
1 0.000001 function! ale#job#IsRunning(job_id) abort
if has('nvim')
try
" In NeoVim, if the job isn't running, jobpid() will throw.
call jobpid(a:job_id)
return 1
catch
endtry
elseif has_key(s:job_map, a:job_id)
let l:job = s:job_map[a:job_id].job
return job_status(l:job) is# 'run'
endif
return 0
endfunction
" Given a Job ID, stop that job.
" Invalid job IDs will be ignored.
1 0.000002 function! ale#job#Stop(job_id) abort
if !has_key(s:job_map, a:job_id)
return
endif
if has('nvim')
" FIXME: NeoVim kills jobs on a timer, but will not kill any processes
" which are child processes on Unix. Some work needs to be done to
" kill child processes to stop long-running processes like pylint.
silent! call jobstop(a:job_id)
else
let l:job = s:job_map[a:job_id].job
" We must close the channel for reading the buffer if it is open
" when stopping a job. Otherwise, we will get errors in the status line.
if ch_status(job_getchannel(l:job)) is# 'open'
call ch_close_in(job_getchannel(l:job))
endif
" Ask nicely for the job to stop.
call job_stop(l:job)
if ale#job#IsRunning(l:job)
" Set a 100ms delay for killing the job with SIGKILL.
let s:job_kill_timers[timer_start(100, function('s:KillHandler'))] = l:job
endif
endif
endfunction
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/autoload/ale/lsp/message.vim
Sourced 1 time
Total time: 0.000141
Self time: 0.000141
count total (s) self (s)
" Author: w0rp <devw0rp@gmail.com>
" Description: Language Server Protocol message implementations
"
" Messages in this movie will be returned in the format
" [is_notification, method_name, params?]
1 0.000005 let g:ale_lsp_next_version_id = 1
" The LSP protocols demands that we send every change to a document, including
" undo, with incrementing version numbers, so we'll just use one incrementing
" ID for everything.
1 0.000003 function! ale#lsp#message#GetNextVersionID() abort
" Use the current ID
let l:id = g:ale_lsp_next_version_id
" Increment the ID variable.
let g:ale_lsp_next_version_id += 1
" When the ID overflows, reset it to 1. By the time we hit the initial ID
" again, the messages will be long gone.
if g:ale_lsp_next_version_id < 1
let g:ale_lsp_next_version_id = 1
endif
return l:id
endfunction
1 0.000002 function! ale#lsp#message#Initialize(root_path, initialization_options) abort
" TODO: Define needed capabilities.
" NOTE: rootPath is deprecated in favour of rootUri
return [0, 'initialize', {
\ 'processId': getpid(),
\ 'rootPath': a:root_path,
\ 'capabilities': {},
\ 'initializationOptions': a:initialization_options,
\ 'rootUri': ale#path#ToURI(a:root_path),
\}]
endfunction
1 0.000002 function! ale#lsp#message#Initialized() abort
return [1, 'initialized']
endfunction
1 0.000002 function! ale#lsp#message#Shutdown() abort
return [0, 'shutdown']
endfunction
1 0.000001 function! ale#lsp#message#Exit() abort
return [1, 'exit']
endfunction
1 0.000002 function! ale#lsp#message#DidOpen(buffer, language_id) abort
let l:lines = getbufline(a:buffer, 1, '$')
return [1, 'textDocument/didOpen', {
\ 'textDocument': {
\ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
\ 'languageId': a:language_id,
\ 'version': ale#lsp#message#GetNextVersionID(),
\ 'text': join(l:lines, "\n") . "\n",
\ },
\}]
endfunction
1 0.000002 function! ale#lsp#message#DidChange(buffer) abort
let l:lines = getbufline(a:buffer, 1, '$')
" For changes, we simply send the full text of the document to the server.
return [1, 'textDocument/didChange', {
\ 'textDocument': {
\ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
\ 'version': ale#lsp#message#GetNextVersionID(),
\ },
\ 'contentChanges': [{'text': join(l:lines, "\n") . "\n"}]
\}]
endfunction
1 0.000002 function! ale#lsp#message#DidSave(buffer) abort
return [1, 'textDocument/didSave', {
\ 'textDocument': {
\ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
\ },
\}]
endfunction
1 0.000002 function! ale#lsp#message#DidClose(buffer) abort
return [1, 'textDocument/didClose', {
\ 'textDocument': {
\ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
\ },
\}]
endfunction
1 0.000002 let s:COMPLETION_TRIGGER_INVOKED = 1
1 0.000001 let s:COMPLETION_TRIGGER_CHARACTER = 2
1 0.000002 function! ale#lsp#message#Completion(buffer, line, column, trigger_character) abort
let l:message = [0, 'textDocument/completion', {
\ 'textDocument': {
\ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
\ },
\ 'position': {'line': a:line - 1, 'character': a:column},
\}]
if !empty(a:trigger_character)
let l:message[2].context = {
\ 'triggerKind': s:COMPLETION_TRIGGER_CHARACTER,
\ 'triggerCharacter': a:trigger_character,
\}
endif
return l:message
endfunction
1 0.000002 function! ale#lsp#message#Definition(buffer, line, column) abort
return [0, 'textDocument/definition', {
\ 'textDocument': {
\ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
\ },
\ 'position': {'line': a:line - 1, 'character': a:column},
\}]
endfunction
1 0.000002 function! ale#lsp#message#References(buffer, line, column) abort
return [0, 'textDocument/references', {
\ 'textDocument': {
\ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
\ },
\ 'position': {'line': a:line - 1, 'character': a:column},
\ 'context': {'includeDeclaration': v:false},
\}]
endfunction
1 0.000002 function! ale#lsp#message#Symbol(query) abort
return [0, 'workspace/symbol', {
\ 'query': a:query,
\}]
endfunction
1 0.000002 function! ale#lsp#message#Hover(buffer, line, column) abort
return [0, 'textDocument/hover', {
\ 'textDocument': {
\ 'uri': ale#path#ToURI(expand('#' . a:buffer . ':p')),
\ },
\ 'position': {'line': a:line - 1, 'character': a:column},
\}]
endfunction
1 0.000002 function! ale#lsp#message#DidChangeConfiguration(buffer, config) abort
return [0, 'workspace/didChangeConfiguration', {
\ 'settings': a:config,
\}]
endfunction
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/autoload/ale/uri.vim
Sourced 1 time
Total time: 0.000026
Self time: 0.000026
count total (s) self (s)
" This probably doesn't handle Unicode characters well.
1 0.000003 function! ale#uri#Encode(value) abort
return substitute(
\ a:value,
\ '\([^a-zA-Z0-9\\/$\-_.!*''(),]\)',
\ '\=printf(''%%%02x'', char2nr(submatch(1)))',
\ 'g'
\)
endfunction
1 0.000002 function! ale#uri#Decode(value) abort
return substitute(
\ a:value,
\ '%\(\x\x\)',
\ '\=nr2char(''0x'' . submatch(1))',
\ 'g'
\)
endfunction
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/autoload/ale/history.vim
Sourced 1 time
Total time: 0.000062
Self time: 0.000062
count total (s) self (s)
" Author: w0rp <devw0rp@gmail.com>
" Description: Tools for managing command history
" A flag for controlling the maximum size of the command history to store.
1 0.000005 let g:ale_max_buffer_history_size = get(g:, 'ale_max_buffer_history_size', 20)
" Return a shallow copy of the command history for a given buffer number.
1 0.000003 function! ale#history#Get(buffer) abort
return copy(getbufvar(a:buffer, 'ale_history', []))
endfunction
1 0.000003 function! ale#history#Add(buffer, status, job_id, command) abort
if g:ale_max_buffer_history_size <= 0
" Don't save anything if the history isn't a positive number.
call setbufvar(a:buffer, 'ale_history', [])
return
endif
let l:history = getbufvar(a:buffer, 'ale_history', [])
" Remove the first item if we hit the max history size.
if len(l:history) >= g:ale_max_buffer_history_size
let l:history = l:history[1:]
endif
call add(l:history, {
\ 'status': a:status,
\ 'job_id': a:job_id,
\ 'command': a:command,
\})
call setbufvar(a:buffer, 'ale_history', l:history)
endfunction
1 0.000002 function! s:FindHistoryItem(buffer, job_id) abort
" Search backwards to find a matching job ID. IDs might be recycled,
" so finding the last one should be good enough.
for l:obj in reverse(ale#history#Get(a:buffer))
if l:obj.job_id == a:job_id
return l:obj
endif
endfor
return {}
endfunction
" Set an exit code for a command which finished.
1 0.000002 function! ale#history#SetExitCode(buffer, job_id, exit_code) abort
let l:obj = s:FindHistoryItem(a:buffer, a:job_id)
" If we find a match, then set the code and status.
let l:obj.exit_code = a:exit_code
let l:obj.status = 'finished'
endfunction
" Set the output for a command which finished.
1 0.000002 function! ale#history#RememberOutput(buffer, job_id, output) abort
let l:obj = s:FindHistoryItem(a:buffer, a:job_id)
let l:obj.output = a:output
endfunction
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/autoload/ale/cursor.vim
Sourced 1 time
Total time: 0.000340
Self time: 0.000340
count total (s) self (s)
1 0.000013 scriptencoding utf-8
" Author: w0rp <devw0rp@gmail.com>
" Author: João Paulo S. de Souza <joao.paulo.silvasouza@hotmail.com>
" Description: Echoes lint message for the current line, if any
" Controls the milliseconds delay before echoing a message.
1 0.000010 let g:ale_echo_delay = get(g:, 'ale_echo_delay', 10)
" A string format for the echoed message.
1 0.000005 let g:ale_echo_msg_format = get(g:, 'ale_echo_msg_format', '%code: %%s')
1 0.000002 let s:cursor_timer = -1
1 0.000004 let s:last_pos = [0, 0, 0]
1 0.000018 function! ale#cursor#TruncatedEcho(original_message) abort
let l:message = a:original_message
" Change tabs to spaces.
let l:message = substitute(l:message, "\t", ' ', 'g')
" Remove any newlines in the message.
let l:message = substitute(l:message, "\n", '', 'g')
" We need to remember the setting for shortmess and reset it again.
let l:shortmess_options = &l:shortmess
try
let l:cursor_position = getcurpos()
" The message is truncated and saved to the history.
setlocal shortmess+=T
try
exec "norm! :echomsg l:message\n"
catch /^Vim\%((\a\+)\)\=:E523/
" Fallback into manual truncate (#1987)
let l:winwidth = winwidth(0)
if l:winwidth < strdisplaywidth(l:message)
" Truncate message longer than window width with trailing '...'
let l:message = l:message[:l:winwidth - 4] . '...'
endif
exec 'echomsg l:message'
endtry
" Reset the cursor position if we moved off the end of the line.
" Using :norm and :echomsg can move the cursor off the end of the
" line.
if l:cursor_position != getcurpos()
call setpos('.', l:cursor_position)
endif
finally
let &l:shortmess = l:shortmess_options
endtry
endfunction
1 0.000003 function! s:StopCursorTimer() abort
if s:cursor_timer != -1
call timer_stop(s:cursor_timer)
let s:cursor_timer = -1
endif
endfunction
1 0.000004 function! ale#cursor#EchoCursorWarning(...) abort
let l:buffer = bufnr('')
if !g:ale_echo_cursor && !g:ale_cursor_detail
return
endif
" Only echo the warnings in normal mode, otherwise we will get problems.
if mode(1) isnot# 'n'
return
endif
if ale#ShouldDoNothing(l:buffer)
return
endif
let [l:info, l:loc] = ale#util#FindItemAtCursor(l:buffer)
if g:ale_echo_cursor
if !empty(l:loc)
let l:format = ale#Var(l:buffer, 'echo_msg_format')
let l:msg = ale#GetLocItemMessage(l:loc, l:format)
call ale#cursor#TruncatedEcho(l:msg)
let l:info.echoed = 1
elseif get(l:info, 'echoed')
" We'll only clear the echoed message when moving off errors once,
" so we don't continually clear the echo line.
execute 'echo'
let l:info.echoed = 0
endif
endif
if g:ale_cursor_detail
if !empty(l:loc)
call s:ShowCursorDetailForItem(l:loc, {'stay_here': 1})
else
call ale#preview#CloseIfTypeMatches('ale-preview')
endif
endif
endfunction
1 0.000007 function! ale#cursor#EchoCursorWarningWithDelay() abort
let l:buffer = bufnr('')
if !g:ale_echo_cursor && !g:ale_cursor_detail
return
endif
" Only echo the warnings in normal mode, otherwise we will get problems.
if mode(1) isnot# 'n'
return
endif
call s:StopCursorTimer()
let l:pos = getcurpos()[0:2]
" Check the current buffer, line, and column number against the last
" recorded position. If the position has actually changed, *then*
" we should echo something. Otherwise we can end up doing processing
" the echo message far too frequently.
if l:pos != s:last_pos
let l:delay = ale#Var(l:buffer, 'echo_delay')
let s:last_pos = l:pos
let s:cursor_timer = timer_start(
\ l:delay,
\ function('ale#cursor#EchoCursorWarning')
\)
endif
endfunction
1 0.000010 function! s:ShowCursorDetailForItem(loc, options) abort
let l:stay_here = get(a:options, 'stay_here', 0)
let s:last_detailed_line = line('.')
let l:message = get(a:loc, 'detail', a:loc.text)
let l:lines = split(l:message, "\n")
call ale#preview#Show(l:lines, {'stay_here': l:stay_here})
" Clear the echo message if we manually displayed details.
if !l:stay_here
execute 'echo'
endif
endfunction
1 0.000004 function! ale#cursor#ShowCursorDetail() abort
let l:buffer = bufnr('')
" Only echo the warnings in normal mode, otherwise we will get problems.
if mode() isnot# 'n'
return
endif
if ale#ShouldDoNothing(l:buffer)
return
endif
call s:StopCursorTimer()
let [l:info, l:loc] = ale#util#FindItemAtCursor(l:buffer)
if !empty(l:loc)
call s:ShowCursorDetailForItem(l:loc, {'stay_here': 0})
endif
endfunction
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/autoload/ale/sign.vim
Sourced 1 time
Total time: 0.000608
Self time: 0.000533
count total (s) self (s)
1 0.000005 scriptencoding utf8
" Author: w0rp <devw0rp@gmail.com>
" Description: Draws error and warning signs into signcolumn
" This flag can be set to some integer to control the maximum number of signs
" that ALE will set.
1 0.000007 let g:ale_max_signs = get(g:, 'ale_max_signs', -1)
" This flag can be set to 1 to enable changing the sign column colors when
" there are errors.
1 0.000004 let g:ale_change_sign_column_color = get(g:, 'ale_change_sign_column_color', 0)
" These variables dictate what signs are used to indicate errors and warnings.
1 0.000003 let g:ale_sign_error = get(g:, 'ale_sign_error', '>>')
1 0.000003 let g:ale_sign_style_error = get(g:, 'ale_sign_style_error', g:ale_sign_error)
1 0.000014 let g:ale_sign_warning = get(g:, 'ale_sign_warning', '--')
1 0.000003 let g:ale_sign_style_warning = get(g:, 'ale_sign_style_warning', g:ale_sign_warning)
1 0.000003 let g:ale_sign_info = get(g:, 'ale_sign_info', g:ale_sign_warning)
" This variable sets an offset which can be set for sign IDs.
" This ID can be changed depending on what IDs are set for other plugins.
" The dummy sign will use the ID exactly equal to the offset.
1 0.000002 let g:ale_sign_offset = get(g:, 'ale_sign_offset', 1000000)
" This flag can be set to 1 to keep sign gutter always open
1 0.000002 let g:ale_sign_column_always = get(g:, 'ale_sign_column_always', 0)
1 0.000023 if !hlexists('ALEErrorSign')
1 0.000007 highlight link ALEErrorSign error
1 0.000001 endif
1 0.000004 if !hlexists('ALEStyleErrorSign')
1 0.000004 highlight link ALEStyleErrorSign ALEErrorSign
1 0.000003 endif
1 0.000014 if !hlexists('ALEWarningSign')
1 0.000005 highlight link ALEWarningSign todo
1 0.000001 endif
1 0.000004 if !hlexists('ALEStyleWarningSign')
1 0.000003 highlight link ALEStyleWarningSign ALEWarningSign
1 0.000001 endif
1 0.000003 if !hlexists('ALEInfoSign')
1 0.000003 highlight link ALEInfoSign ALEWarningSign
1 0.000000 endif
1 0.000004 if !hlexists('ALESignColumnWithErrors')
1 0.000005 highlight link ALESignColumnWithErrors error
1 0.000000 endif
1 0.000003 function! ale#sign#SetUpDefaultColumnWithoutErrorsHighlight() abort
redir => l:output
0verbose silent highlight SignColumn
redir end
let l:highlight_syntax = join(split(l:output)[2:])
let l:match = matchlist(l:highlight_syntax, '\vlinks to (.+)$')
if !empty(l:match)
execute 'highlight link ALESignColumnWithoutErrors ' . l:match[1]
elseif l:highlight_syntax isnot# 'cleared'
execute 'highlight ALESignColumnWithoutErrors ' . l:highlight_syntax
endif
endfunction
1 0.000005 if !hlexists('ALESignColumnWithoutErrors')
1 0.000086 0.000011 call ale#sign#SetUpDefaultColumnWithoutErrorsHighlight()
1 0.000001 endif
" Signs show up on the left for error markers.
1 0.000024 execute 'sign define ALEErrorSign text=' . g:ale_sign_error
\ . ' texthl=ALEErrorSign linehl=ALEErrorLine'
1 0.000006 execute 'sign define ALEStyleErrorSign text=' . g:ale_sign_style_error
\ . ' texthl=ALEStyleErrorSign linehl=ALEErrorLine'
1 0.000007 execute 'sign define ALEWarningSign text=' . g:ale_sign_warning
\ . ' texthl=ALEWarningSign linehl=ALEWarningLine'
1 0.000014 execute 'sign define ALEStyleWarningSign text=' . g:ale_sign_style_warning
\ . ' texthl=ALEStyleWarningSign linehl=ALEWarningLine'
1 0.000007 execute 'sign define ALEInfoSign text=' . g:ale_sign_info
\ . ' texthl=ALEInfoSign linehl=ALEInfoLine'
1 0.000010 sign define ALEDummySign
1 0.000003 function! ale#sign#GetSignName(sublist) abort
let l:priority = g:ale#util#style_warning_priority
" Determine the highest priority item for the line.
for l:item in a:sublist
let l:item_priority = ale#util#GetItemPriority(l:item)
if l:item_priority > l:priority
let l:priority = l:item_priority
endif
endfor
if l:priority is# g:ale#util#error_priority
return 'ALEErrorSign'
endif
if l:priority is# g:ale#util#warning_priority
return 'ALEWarningSign'
endif
if l:priority is# g:ale#util#style_error_priority
return 'ALEStyleErrorSign'
endif
if l:priority is# g:ale#util#style_warning_priority
return 'ALEStyleWarningSign'
endif
if l:priority is# g:ale#util#info_priority
return 'ALEInfoSign'
endif
" Use the error sign for invalid severities.
return 'ALEErrorSign'
endfunction
" Read sign data for a buffer to a list of lines.
1 0.000018 function! ale#sign#ReadSigns(buffer) abort
redir => l:output
silent execute 'sign place buffer=' . a:buffer
redir end
return split(l:output, "\n")
endfunction
" Given a list of lines for sign output, return a List of [line, id, group]
1 0.000002 function! ale#sign#ParseSigns(line_list) abort
" Matches output like :
" line=4 id=1 name=ALEErrorSign
" строка=1 id=1000001 имя=ALEErrorSign
" 行=1 識別子=1000001 名前=ALEWarningSign
" línea=12 id=1000001 nombre=ALEWarningSign
" riga=1 id=1000001, nome=ALEWarningSign
let l:pattern = '\v^.*\=(\d+).*\=(\d+).*\=(ALE[a-zA-Z]+Sign)'
let l:result = []
let l:is_dummy_sign_set = 0
for l:line in a:line_list
let l:match = matchlist(l:line, l:pattern)
if len(l:match) > 0
if l:match[3] is# 'ALEDummySign'
let l:is_dummy_sign_set = 1
else
call add(l:result, [
\ str2nr(l:match[1]),
\ str2nr(l:match[2]),
\ l:match[3],
\])
endif
endif
endfor
return [l:is_dummy_sign_set, l:result]
endfunction
1 0.000011 function! ale#sign#FindCurrentSigns(buffer) abort
let l:line_list = ale#sign#ReadSigns(a:buffer)
return ale#sign#ParseSigns(l:line_list)
endfunction
" Given a loclist, group the List into with one List per line.
1 0.000002 function! s:GroupLoclistItems(buffer, loclist) abort
let l:grouped_items = []
let l:last_lnum = -1
for l:obj in a:loclist
if l:obj.bufnr != a:buffer
continue
endif
" Create a new sub-List when we hit a new line.
if l:obj.lnum != l:last_lnum
call add(l:grouped_items, [])
endif
call add(l:grouped_items[-1], l:obj)
let l:last_lnum = l:obj.lnum
endfor
return l:grouped_items
endfunction
1 0.000002 function! s:UpdateLineNumbers(buffer, current_sign_list, loclist) abort
let l:line_map = {}
let l:line_numbers_changed = 0
for [l:line, l:sign_id, l:name] in a:current_sign_list
let l:line_map[l:sign_id] = l:line
endfor
for l:item in a:loclist
if l:item.bufnr == a:buffer
let l:lnum = get(l:line_map, get(l:item, 'sign_id', 0), 0)
if l:lnum && l:item.lnum != l:lnum
let l:item.lnum = l:lnum
let l:line_numbers_changed = 1
endif
endif
endfor
" When the line numbers change, sort the list again
if l:line_numbers_changed
call sort(a:loclist, 'ale#util#LocItemCompare')
endif
endfunction
1 0.000002 function! s:BuildSignMap(buffer, current_sign_list, grouped_items) abort
let l:max_signs = ale#Var(a:buffer, 'max_signs')
if l:max_signs is 0
let l:selected_grouped_items = []
elseif type(l:max_signs) is v:t_number && l:max_signs > 0
let l:selected_grouped_items = a:grouped_items[:l:max_signs - 1]
else
let l:selected_grouped_items = a:grouped_items
endif
let l:sign_map = {}
let l:sign_offset = g:ale_sign_offset
for [l:line, l:sign_id, l:name] in a:current_sign_list
let l:sign_info = get(l:sign_map, l:line, {
\ 'current_id_list': [],
\ 'current_name_list': [],
\ 'new_id': 0,
\ 'new_name': '',
\ 'items': [],
\})
" Increment the sign offset for new signs, by the maximum sign ID.
if l:sign_id > l:sign_offset
let l:sign_offset = l:sign_id
endif
" Remember the sign names and IDs in separate Lists, so they are easy
" to work with.
call add(l:sign_info.current_id_list, l:sign_id)
call add(l:sign_info.current_name_list, l:name)
let l:sign_map[l:line] = l:sign_info
endfor
for l:group in l:selected_grouped_items
let l:line = l:group[0].lnum
let l:sign_info = get(l:sign_map, l:line, {
\ 'current_id_list': [],
\ 'current_name_list': [],
\ 'new_id': 0,
\ 'new_name': '',
\ 'items': [],
\})
let l:sign_info.new_name = ale#sign#GetSignName(l:group)
let l:sign_info.items = l:group
let l:index = index(
\ l:sign_info.current_name_list,
\ l:sign_info.new_name
\)
if l:index >= 0
" We have a sign with this name already, so use the same ID.
let l:sign_info.new_id = l:sign_info.current_id_list[l:index]
else
" This sign name replaces the previous name, so use a new ID.
let l:sign_info.new_id = l:sign_offset + 1
let l:sign_offset += 1
endif
let l:sign_map[l:line] = l:sign_info
endfor
return l:sign_map
endfunction
1 0.000012 function! ale#sign#GetSignCommands(buffer, was_sign_set, sign_map) abort
let l:command_list = []
let l:is_dummy_sign_set = a:was_sign_set
" Set the dummy sign if we need to.
" The dummy sign is needed to keep the sign column open while we add
" and remove signs.
if !l:is_dummy_sign_set && (!empty(a:sign_map) || g:ale_sign_column_always)
call add(l:command_list, 'sign place '
\ . g:ale_sign_offset
\ . ' line=1 name=ALEDummySign buffer='
\ . a:buffer
\)
let l:is_dummy_sign_set = 1
endif
" Place new items first.
for [l:line_str, l:info] in items(a:sign_map)
if l:info.new_id
" Save the sign IDs we are setting back on our loclist objects.
" These IDs will be used to preserve items which are set many times.
for l:item in l:info.items
let l:item.sign_id = l:info.new_id
endfor
if index(l:info.current_id_list, l:info.new_id) < 0
call add(l:command_list, 'sign place '
\ . (l:info.new_id)
\ . ' line=' . l:line_str
\ . ' name=' . (l:info.new_name)
\ . ' buffer=' . a:buffer
\)
endif
endif
endfor
" Remove signs without new IDs.
for l:info in values(a:sign_map)
for l:current_id in l:info.current_id_list
if l:current_id isnot l:info.new_id
call add(l:command_list, 'sign unplace '
\ . l:current_id
\ . ' buffer=' . a:buffer
\)
endif
endfor
endfor
" Remove the dummy sign to close the sign column if we need to.
if l:is_dummy_sign_set && !g:ale_sign_column_always
call add(l:command_list, 'sign unplace '
\ . g:ale_sign_offset
\ . ' buffer=' . a:buffer
\)
endif
return l:command_list
endfunction
" This function will set the signs which show up on the left.
1 0.000002 function! ale#sign#SetSigns(buffer, loclist) abort
if !bufexists(str2nr(a:buffer))
" Stop immediately when attempting to set signs for a buffer which
" does not exist.
return
endif
" Find the current markers
let [l:is_dummy_sign_set, l:current_sign_list] =
\ ale#sign#FindCurrentSigns(a:buffer)
" Update the line numbers for items from before which may have moved.
call s:UpdateLineNumbers(a:buffer, l:current_sign_list, a:loclist)
" Group items after updating the line numbers.
let l:grouped_items = s:GroupLoclistItems(a:buffer, a:loclist)
" Build a map of current and new signs, with the lines as the keys.
let l:sign_map = s:BuildSignMap(
\ a:buffer,
\ l:current_sign_list,
\ l:grouped_items,
\)
let l:command_list = ale#sign#GetSignCommands(
\ a:buffer,
\ l:is_dummy_sign_set,
\ l:sign_map,
\)
" Change the sign column color if the option is on.
if g:ale_change_sign_column_color && !empty(a:loclist)
highlight clear SignColumn
highlight link SignColumn ALESignColumnWithErrors
endif
for l:command in l:command_list
silent! execute l:command
endfor
" Reset the sign column color when there are no more errors.
if g:ale_change_sign_column_color && empty(a:loclist)
highlight clear SignColumn
highlight link SignColumn ALESignColumnWithoutErrors
endif
endfunction
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/autoload/ale/list.vim
Sourced 1 time
Total time: 0.000155
Self time: 0.000155
count total (s) self (s)
" Author: Bjorn Neergaard <bjorn@neersighted.com>, modified by Yann fery <yann@fery.me>
" Description: Manages the loclist and quickfix lists
" This flag dictates if ale open the configured loclist
1 0.000007 let g:ale_open_list = get(g:, 'ale_open_list', 0)
" This flag dictates if ale keeps open loclist even if there is no error in loclist
1 0.000003 let g:ale_keep_list_window_open = get(g:, 'ale_keep_list_window_open', 0)
" This flag dictates that quickfix windows should be opened vertically
1 0.000002 let g:ale_list_vertical = get(g:, 'ale_list_vertical', 0)
" The window size to set for the quickfix and loclist windows
1 0.000002 let g:ale_list_window_size = get(g:, 'ale_list_window_size', 10)
" A string format for the loclist messages.
1 0.000005 let g:ale_loclist_msg_format = get(g:, 'ale_loclist_msg_format',
\ get(g:, 'ale_echo_msg_format', '%code: %%s')
\)
1 0.000002 if !exists('s:timer_args')
1 0.000002 let s:timer_args = {}
1 0.000001 endif
" Return 1 if there is a buffer with buftype == 'quickfix' in bufffer list
1 0.000003 function! ale#list#IsQuickfixOpen() abort
for l:buf in range(1, bufnr('$'))
if getbufvar(l:buf, '&buftype') is# 'quickfix'
return 1
endif
endfor
return 0
endfunction
" Check if we should open the list, based on the save event being fired, and
" that setting being on, or the setting just being set to `1`.
1 0.000002 function! s:ShouldOpen(buffer) abort
let l:val = ale#Var(a:buffer, 'open_list')
let l:saved = getbufvar(a:buffer, 'ale_save_event_fired', 0)
return l:val is 1 || (l:val is# 'on_save' && l:saved)
endfunction
1 0.000002 function! ale#list#GetCombinedList() abort
let l:list = []
for l:info in values(g:ale_buffer_info)
call extend(l:list, l:info.loclist)
endfor
call sort(l:list, function('ale#util#LocItemCompareWithText'))
call uniq(l:list, function('ale#util#LocItemCompareWithText'))
return l:list
endfunction
1 0.000002 function! s:FixList(buffer, list) abort
let l:format = ale#Var(a:buffer, 'loclist_msg_format')
let l:new_list = []
for l:item in a:list
let l:fixed_item = copy(l:item)
let l:fixed_item.text = ale#GetLocItemMessage(l:item, l:format)
if l:item.bufnr == -1
" If the buffer number is invalid, remove it.
call remove(l:fixed_item, 'bufnr')
endif
call add(l:new_list, l:fixed_item)
endfor
return l:new_list
endfunction
1 0.000001 function! s:BufWinId(buffer) abort
return exists('*bufwinid') ? bufwinid(str2nr(a:buffer)) : 0
endfunction
1 0.000002 function! s:SetListsImpl(timer_id, buffer, loclist) abort
let l:title = expand('#' . a:buffer . ':p')
if g:ale_set_quickfix
let l:quickfix_list = ale#list#GetCombinedList()
if has('nvim')
call setqflist(s:FixList(a:buffer, l:quickfix_list), ' ', l:title)
else
call setqflist(s:FixList(a:buffer, l:quickfix_list))
call setqflist([], 'r', {'title': l:title})
endif
elseif g:ale_set_loclist
" If windows support is off, bufwinid() may not exist.
" We'll set result in the current window, which might not be correct,
" but it's better than nothing.
let l:id = s:BufWinId(a:buffer)
if has('nvim')
call setloclist(l:id, s:FixList(a:buffer, a:loclist), ' ', l:title)
else
call setloclist(l:id, s:FixList(a:buffer, a:loclist))
call setloclist(l:id, [], 'r', {'title': l:title})
endif
endif
" Open a window to show the problems if we need to.
"
" We'll check if the current buffer's List is not empty here, so the
" window will only be opened if the current buffer has problems.
if s:ShouldOpen(a:buffer) && !empty(a:loclist)
let l:winnr = winnr()
let l:mode = mode()
let l:reset_visual_selection = l:mode is? 'v' || l:mode is# "\<c-v>"
let l:reset_character_selection = l:mode is? 's' || l:mode is# "\<c-s>"
" open windows vertically instead of default horizontally
let l:open_type = ''
if ale#Var(a:buffer, 'list_vertical') == 1
let l:open_type = 'vert '
endif
if g:ale_set_quickfix
if !ale#list#IsQuickfixOpen()
silent! execute l:open_type . 'copen ' . str2nr(ale#Var(a:buffer, 'list_window_size'))
endif
elseif g:ale_set_loclist
silent! execute l:open_type . 'lopen ' . str2nr(ale#Var(a:buffer, 'list_window_size'))
endif
" If focus changed, restore it (jump to the last window).
if l:winnr isnot# winnr()
wincmd p
endif
if l:reset_visual_selection || l:reset_character_selection
" If we were in a selection mode before, select the last selection.
normal! gv
if l:reset_character_selection
" Switch back to Select mode, if we were in that.
normal! "\<c-g>"
endif
endif
endif
" If ALE isn't currently checking for more problems, close the window if
" needed now. This check happens inside of this timer function, so
" the window can be closed reliably.
if !ale#engine#IsCheckingBuffer(a:buffer)
call s:CloseWindowIfNeeded(a:buffer)
endif
endfunction
1 0.000002 function! ale#list#SetLists(buffer, loclist) abort
if get(g:, 'ale_set_lists_synchronously') == 1
\|| getbufvar(a:buffer, 'ale_save_event_fired', 0)
" Update lists immediately if running a test synchronously, or if the
" buffer was saved.
"
" The lists need to be updated immediately when saving a buffer so
" that we can reliably close window automatically, if so configured.
call s:SetListsImpl(-1, a:buffer, a:loclist)
else
call ale#util#StartPartialTimer(
\ 0,
\ function('s:SetListsImpl'),
\ [a:buffer, a:loclist],
\)
endif
endfunction
1 0.000001 function! s:CloseWindowIfNeeded(buffer) abort
if ale#Var(a:buffer, 'keep_list_window_open') || !s:ShouldOpen(a:buffer)
return
endif
try
" Only close windows if the quickfix list or loclist is completely empty,
" including errors set through other means.
if g:ale_set_quickfix
if empty(getqflist())
cclose
endif
else
let l:win_id = s:BufWinId(a:buffer)
if g:ale_set_loclist && empty(getloclist(l:win_id))
lclose
endif
endif
" Ignore 'Cannot close last window' errors.
catch /E444/
endtry
endfunction
SCRIPT /Users/ethanknowlton/.vim/plugged/ale/autoload/ale/highlight.vim
Sourced 1 time
Total time: 0.000364
Self time: 0.000364
count total (s) self (s)
1 0.000003 scriptencoding utf8
" Author: w0rp <devw0rp@gmail.com>
" Description: This module implements error/warning highlighting.
1 0.000006 if !hlexists('ALEError')
1 0.000007 highlight link ALEError SpellBad
1 0.000001 endif
1 0.000004 if !hlexists('ALEStyleError')
1 0.000003 highlight link ALEStyleError ALEError
1 0.000001 endif
1 0.000004 if !hlexists('ALEWarning')
1 0.000005 highlight link ALEWarning SpellCap
1 0.000001 endif
1 0.000004 if !hlexists('ALEStyleWarning')
1 0.000003 highlight link ALEStyleWarning ALEWarning
1 0.000000 endif
1 0.000004 if !hlexists('ALEInfo')
1 0.000003 highlight link ALEInfo ALEWarning
1 0.000000 endif
" The maximum number of items for the second argument of matchaddpos()
1 0.000002 let s:MAX_POS_VALUES = 8
1 0.000003 let s:MAX_COL_SIZE = 1073741824 " pow(2, 30)
1 0.000004 function! ale#highlight#CreatePositions(line, col, end_line, end_col) abort
if a:line >= a:end_line
" For single lines, just return the one position.
return [[[a:line, a:col, a:end_col - a:col + 1]]]
endif
" Get positions from the first line at the first column, up to a large
" integer for highlighting up to the end of the line, followed by
" the lines in-between, for highlighting entire lines, and
" a highlight for the last line, up to the end column.
let l:all_positions =
\ [[a:line, a:col, s:MAX_COL_SIZE]]
\ + range(a:line + 1, a:end_line - 1)
\ + [[a:end_line, 1, a:end_col]]
return map(
\ range(0, len(l:all_positions) - 1, s:MAX_POS_VALUES),
\ 'l:all_positions[v:val : v:val + s:MAX_POS_VALUES - 1]',
\)
endfunction
" Given a loclist for current items to highlight, remove all highlights
" except these which have matching loclist item entries.
1 0.000002 function! ale#highlight#RemoveHighlights() abort
for l:match in getmatches()
if l:match.group =~# '^ALE'
call matchdelete(l:match.id)
endif
endfor
endfunction
1 0.000002 function! ale#highlight#UpdateHighlights() abort
let l:item_list = get(b:, 'ale_enabled', 1) && g:ale_enabled
\ ? get(b:, 'ale_highlight_items', [])
\ : []
call ale#highlight#RemoveHighlights()
for l:item in l:item_list
if l:item.type is# 'W'
if get(l:item, 'sub_type', '') is# 'style'
let l:group = 'ALEStyleWarning'
else
let l:group = 'ALEWarning'
endif
elseif l:item.type is# 'I'
let l:group = 'ALEInfo'
elseif get(l:item, 'sub_type', '') is# 'style'
let l:group = 'ALEStyleError'
else
let l:group = 'ALEError'
endif
let l:line = l:item.lnum
let l:col = l:item.col
let l:end_line = get(l:item, 'end_lnum', l:line)
let l:end_col = get(l:item, 'end_col', l:col)
" Set all of the positions, which are chunked into Lists which
" are as large as will be accepted by matchaddpos.
call map(
\ ale#highlight#CreatePositions(l:line, l:col, l:end_line, l:end_col),
\ 'matchaddpos(l:group, v:val)'
\)
endfor
" If highlights are enabled and signs are not enabled, we should still
" offer line highlights by adding a separate set of highlights.
if !g:ale_set_signs
let l:available_groups = {
\ 'ALEWarningLine': hlexists('ALEWarningLine'),
\ 'ALEInfoLine': hlexists('ALEInfoLine'),
\ 'ALEErrorLine': hlexists('ALEErrorLine'),
\}
for l:item in l:item_list
if l:item.type is# 'W'
let l:group = 'ALEWarningLine'
elseif l:item.type is# 'I'
let l:group = 'ALEInfoLine'
else
let l:group = 'ALEErrorLine'
endif
if l:available_groups[l:group]
call matchaddpos(l:group, [l:item.lnum])
endif
endfor
endif
endfunction
1 0.000002 function! ale#highlight#BufferHidden(buffer) abort
" Remove highlights right away when buffers are hidden.
" They will be restored later when buffers are entered.
call ale#highlight#RemoveHighlights()
endfunction
1 0.000008 augroup ALEHighlightBufferGroup
1 0.000203 autocmd!
1 0.000009 autocmd BufEnter * call ale#highlight#UpdateHighlights()
1 0.000003 autocmd BufHidden * call ale#highlight#BufferHidden(expand('<abuf>'))
1 0.000001 augroup END
1 0.000003 function! ale#highlight#SetHighlights(buffer, loclist) abort
let l:new_list = getbufvar(a:buffer, 'ale_enabled', 1) && g:ale_enabled
\ ? filter(copy(a:loclist), 'v:val.bufnr == a:buffer && v:val.col > 0')
\ : []
" Set the list in the buffer variable.
call setbufvar(str2nr(a:buffer), 'ale_highlight_items', l:new_list)
" Update highlights for the current buffer, which may or may not
" be the buffer we just set highlights for.
call ale#highlight#UpdateHighlights()
endfunction
SCRIPT /usr/local/Cellar/neovim/0.3.1/share/nvim/runtime/autoload/phpcomplete.vim
Sourced 1 time
Total time: 0.005030
Self time: 0.005030
count total (s) self (s)
" Vim completion script
" Language: PHP
" Maintainer: Dávid Szabó ( complex857 AT gmail DOT com )
" Previous Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" URL: https://github.com/shawncplus/phpcomplete.vim
" Last Change: 2016 Oct 10
"
" OPTIONS:
"
" let g:phpcomplete_relax_static_constraint = 1/0 [default 0]
" Enables completion for non-static methods when completing for static context (::).
" This generates E_STRICT level warning, but php calls these methods nontheless.
"
" let g:phpcomplete_complete_for_unknown_classes = 1/0 [default 0]
" Enables completion of variables and functions in "everything under the sun" fashion
" when completing for an instance or static class context but the code can't tell the class
" or locate the file that it lives in.
" The completion list generated this way is only filtered by the completion base
" and generally not much more accurate then simple keyword completion.
"
" let g:phpcomplete_search_tags_for_variables = 1/0 [default 0]
" Enables use of tags when the plugin tries to find variables.
" When enabled the plugin will search for the variables in the tag files with kind 'v',
" lines like $some_var = new Foo; but these usually yield highly inaccurate results and
" can be fairly slow.
"
" let g:phpcomplete_min_num_of_chars_for_namespace_completion = n [default 1]
" This option controls the number of characters the user needs to type before
" the tags will be searched for namespaces and classes in typed out namespaces in
" "use ..." context. Setting this to 0 is not recommended because that means the code
" have to scan every tag, and vim's taglist() function runs extremly slow with a
" "match everything" pattern.
"
" let g:phpcomplete_parse_docblock_comments = 1/0 [default 0]
" When enabled the preview window's content will include information
" extracted from docblock comments of the completions.
" Enabling this option will add return types to the completion menu for functions too.
"
" let g:phpcomplete_cache_taglists = 1/0 [default 1]
" When enabled the taglist() lookups will be cached and subsequent searches
" for the same pattern will not check the tagfiles any more, thus making the
" lookups faster. Cache expiration is based on the mtimes of the tag files.
"
" TODO:
" - Switching to HTML (XML?) completion (SQL) inside of phpStrings
" - allow also for XML completion <- better do html_flavor for HTML
" completion
" - outside of <?php?> getting parent tag may cause problems. Heh, even in
" perfect conditions GetLastOpenTag doesn't cooperate... Inside of
" phpStrings this can be even a bonus but outside of <?php?> it is not the
" best situation
1 0.000012 if !exists('g:phpcomplete_relax_static_constraint')
1 0.000008 let g:phpcomplete_relax_static_constraint = 0
1 0.000002 endif
1 0.000003 if !exists('g:phpcomplete_complete_for_unknown_classes')
1 0.000004 let g:phpcomplete_complete_for_unknown_classes = 0
1 0.000001 endif
1 0.000002 if !exists('g:phpcomplete_search_tags_for_variables')
1 0.000002 let g:phpcomplete_search_tags_for_variables = 0
1 0.000001 endif
1 0.000003 if !exists('g:phpcomplete_min_num_of_chars_for_namespace_completion')
1 0.000002 let g:phpcomplete_min_num_of_chars_for_namespace_completion = 1
1 0.000001 endif
1 0.000002 if !exists('g:phpcomplete_parse_docblock_comments')
1 0.000003 let g:phpcomplete_parse_docblock_comments = 0
1 0.000002 endif
1 0.000002 if !exists('g:phpcomplete_cache_taglists')
1 0.000002 let g:phpcomplete_cache_taglists = 1
1 0.000001 endif
1 0.000002 if !exists('s:cache_classstructures')
1 0.000002 let s:cache_classstructures = {}
1 0.000001 endif
1 0.000002 if !exists('s:cache_tags')
1 0.000001 let s:cache_tags = {}
1 0.000001 endif
1 0.000002 if !exists('s:cache_tags_checksum')
1 0.000001 let s:cache_tags_checksum = ''
1 0.000001 endif
1 0.000060 let s:script_path = fnamemodify(resolve(expand('<sfile>:p')), ':h')
1 0.000007 function! phpcomplete#CompletePHP(findstart, base) " {{{
if a:findstart
unlet! b:php_menu
" Check if we are inside of PHP markup
let pos = getpos('.')
let phpbegin = searchpairpos('<?', '', '?>', 'bWn',
\ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')
let phpend = searchpairpos('<?', '', '?>', 'Wn',
\ 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')
if phpbegin == [0,0] && phpend == [0,0]
" We are outside of any PHP markup. Complete HTML
let htmlbegin = htmlcomplete#CompleteTags(1, '')
let cursor_col = pos[2]
let base = getline('.')[htmlbegin : cursor_col]
let b:php_menu = htmlcomplete#CompleteTags(0, base)
return htmlbegin
else
" locate the start of the word
let line = getline('.')
let start = col('.') - 1
let compl_begin = col('.') - 2
while start >= 0 && line[start - 1] =~ '[\\a-zA-Z_0-9\x7f-\xff$]'
let start -= 1
endwhile
let b:phpbegin = phpbegin
let b:compl_context = phpcomplete#GetCurrentInstruction(line('.'), max([0, col('.') - 2]), phpbegin)
return start
" We can be also inside of phpString with HTML tags. Deal with
" it later (time, not lines).
endif
endif
" If exists b:php_menu it means completion was already constructed we
" don't need to do anything more
if exists("b:php_menu")
return b:php_menu
endif
if !exists('g:php_builtin_functions')
call phpcomplete#LoadData()
endif
" a:base is very short - we need context
if exists("b:compl_context")
let context = b:compl_context
unlet! b:compl_context
" chop of the "base" from the end of the current instruction
if a:base != ""
let context = substitute(context, '\s*[$a-zA-Z_0-9\x7f-\xff]*$', '', '')
end
else
let context = ''
end
try
let winheight = winheight(0)
let winnr = winnr()
let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(getline(0, line('.')))
if context =~? '^use\s' || context ==? 'use'
return phpcomplete#CompleteUse(a:base)
endif
if context =~ '\(->\|::\)$'
" {{{
" Get name of the class
let classname = phpcomplete#GetClassName(line('.'), context, current_namespace, imports)
" Get location of class definition, we have to iterate through all
if classname != ''
if classname =~ '\'
" split the last \ segment as a classname, everything else is the namespace
let classname_parts = split(classname, '\')
let namespace = join(classname_parts[0:-2], '\')
let classname = classname_parts[-1]
else
let namespace = '\'
endif
let classlocation = phpcomplete#GetClassLocation(classname, namespace)
else
let classlocation = ''
endif
if classlocation != ''
if classlocation == 'VIMPHP_BUILTINOBJECT' && has_key(g:php_builtin_classes, tolower(classname))
return phpcomplete#CompleteBuiltInClass(context, classname, a:base)
endif
if filereadable(classlocation)
let classfile = readfile(classlocation)
let classcontent = ''
let classcontent .= "\n".phpcomplete#GetClassContents(classlocation, classname)
let sccontent = split(classcontent, "\n")
let visibility = expand('%:p') == fnamemodify(classlocation, ':p') ? 'private' : 'public'
return phpcomplete#CompleteUserClass(context, a:base, sccontent, visibility)
endif
endif
return phpcomplete#CompleteUnknownClass(a:base, context)
" }}}
elseif context =~? 'implements'
return phpcomplete#CompleteClassName(a:base, ['i'], current_namespace, imports)
elseif context =~? 'instanceof'
return phpcomplete#CompleteClassName(a:base, ['c', 'n'], current_namespace, imports)
elseif context =~? 'extends\s\+.\+$' && a:base == ''
return ['implements']
elseif context =~? 'extends'
let kinds = context =~? 'class\s' ? ['c'] : ['i']
return phpcomplete#CompleteClassName(a:base, kinds, current_namespace, imports)
elseif context =~? 'class [a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
" special case when you've typed the class keyword and the name too, only extends and implements allowed there
return filter(['extends', 'implements'], 'stridx(v:val, a:base) == 0')
elseif context =~? 'new'
return phpcomplete#CompleteClassName(a:base, ['c'], current_namespace, imports)
endif
if a:base =~ '^\$'
return phpcomplete#CompleteVariable(a:base)
else
return phpcomplete#CompleteGeneral(a:base, current_namespace, imports)
endif
finally
silent! exec winnr.'resize '.winheight
endtry
endfunction
" }}}
1 0.000005 function! phpcomplete#CompleteUse(base) " {{{
" completes builtin class names regadless of g:phpcomplete_min_num_of_chars_for_namespace_completion
" completes namespaces from tags
" * requires patched ctags
" completes classnames from tags within the already typed out namespace using the "namespace" field of tags
" * requires patched ctags
let res = []
" class and namespace names are always considered absoltute in use ... expressions, leading slash is not recommended
" by the php manual, so we gonna get rid of that
if a:base =~? '^\'
let base = substitute(a:base, '^\', '', '')
else
let base = a:base
endif
let namespace_match_pattern = substitute(base, '\\', '\\\\', 'g')
let classname_match_pattern = matchstr(base, '[^\\]\+$')
let namespace_for_class = substitute(substitute(namespace_match_pattern, '\\\\', '\\', 'g'), '\\*'.classname_match_pattern.'$', '', '')
if len(namespace_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion
if len(classname_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion
let tags = phpcomplete#GetTaglist('^\('.namespace_match_pattern.'\|'.classname_match_pattern.'\)')
else
let tags = phpcomplete#GetTaglist('^'.namespace_match_pattern)
endif
let patched_ctags_detected = 0
let namespaced_matches = []
let no_namespace_matches = []
for tag in tags
if has_key(tag, 'namespace')
let patched_ctags_detected = 1
endif
if tag.kind ==? 'n' && tag.name =~? '^'.namespace_match_pattern
let patched_ctags_detected = 1
call add(namespaced_matches, {'word': tag.name, 'kind': 'n', 'menu': tag.filename, 'info': tag.filename })
elseif has_key(tag, 'namespace') && (tag.kind ==? 'c' || tag.kind ==? 'i' || tag.kind ==? 't') && tag.namespace ==? namespace_for_class
call add(namespaced_matches, {'word': namespace_for_class.'\'.tag.name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
elseif (tag.kind ==? 'c' || tag.kind ==? 'i' || tag.kind ==? 't')
call add(no_namespace_matches, {'word': namespace_for_class.'\'.tag.name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
endif
endfor
" if it seems that the tags file have namespace informations we can safely throw
" away namespaceless tag matches since we can be sure they are invalid
if patched_ctags_detected
no_namespace_matches = []
endif
let res += namespaced_matches + no_namespace_matches
endif
if base !~ '\'
let builtin_classnames = filter(keys(copy(g:php_builtin_classnames)), 'v:val =~? "^'.classname_match_pattern.'"')
for classname in builtin_classnames
call add(res, {'word': g:php_builtin_classes[tolower(classname)].name, 'kind': 'c'})
endfor
let builtin_interfacenames = filter(keys(copy(g:php_builtin_interfacenames)), 'v:val =~? "^'.classname_match_pattern.'"')
for interfacename in builtin_interfacenames
call add(res, {'word': g:php_builtin_interfaces[tolower(interfacename)].name, 'kind': 'i'})
endfor
endif
for comp in res
let comp.word = substitute(comp.word, '^\\', '', '')
endfor
return res
endfunction
" }}}
1 0.000004 function! phpcomplete#CompleteGeneral(base, current_namespace, imports) " {{{
" Complete everything
" + functions, DONE
" + keywords of language DONE
" + defines (constant definitions), DONE
" + extend keywords for predefined constants, DONE
" + classes (after new), DONE
" + limit choice after -> and :: to funcs and vars DONE
" Internal solution for finding functions in current file.
if a:base =~? '^\'
let leading_slash = '\'
else
let leading_slash = ''
endif
let file = getline(1, '$')
call filter(file,
\ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
let jfile = join(file, ' ')
let int_values = split(jfile, 'function\s\+')
let int_functions = {}
for i in int_values
let f_name = matchstr(i,
\ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
if f_name =~? '^'.substitute(a:base, '\\', '\\\\', 'g')
let f_args = matchstr(i,
\ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\(;\|{\|$\)')
let int_functions[f_name.'('] = f_args.')'
endif
endfor
" Internal solution for finding constants in current file
let file = getline(1, '$')
call filter(file, 'v:val =~ "define\\s*("')
let jfile = join(file, ' ')
let int_values = split(jfile, 'define\s*(\s*')
let int_constants = {}
for i in int_values
let c_name = matchstr(i, '\(["'']\)\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze\1')
if c_name != '' && c_name =~# '^'.substitute(a:base, '\\', '\\\\', 'g')
let int_constants[leading_slash.c_name] = ''
endif
endfor
" Prepare list of functions from tags file
let ext_functions = {}
let ext_constants = {}
let ext_classes = {}
let ext_traits = {}
let ext_interfaces = {}
let ext_namespaces = {}
let base = substitute(a:base, '^\\', '', '')
let [tag_match_pattern, namespace_for_tag] = phpcomplete#ExpandClassName(a:base, a:current_namespace, a:imports)
let namespace_match_pattern = substitute((namespace_for_tag == '' ? '' : namespace_for_tag.'\').tag_match_pattern, '\\', '\\\\', 'g')
let tags = []
if len(namespace_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion && len(tag_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion && tag_match_pattern != namespace_match_pattern
let tags = phpcomplete#GetTaglist('\c^\('.tag_match_pattern.'\|'.namespace_match_pattern.'\)')
elseif len(namespace_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion
let tags = phpcomplete#GetTaglist('\c^'.namespace_match_pattern)
elseif len(tag_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion
let tags = phpcomplete#GetTaglist('\c^'.tag_match_pattern)
endif
for tag in tags
if !has_key(tag, 'namespace') || tag.namespace ==? a:current_namespace || tag.namespace ==? namespace_for_tag
if has_key(tag, 'namespace')
let full_name = tag.namespace.'\'.tag.name " absolute namespaced name (without leading '\')
let base_parts = split(a:base, '\')
if len(base_parts) > 1
let namespace_part = join(base_parts[0:-2], '\')
else
let namespace_part = ''
endif
let relative_name = (namespace_part == '' ? '' : namespace_part.'\').tag.name
endif
if tag.kind ==? 'n' && tag.name =~? '^'.namespace_match_pattern
let info = tag.name.' - '.tag.filename
" patched ctag provides absolute namespace names as tag name, namespace tags dont have namespace fields
let full_name = tag.name
let base_parts = split(a:base, '\')
let full_name_parts = split(full_name, '\')
if len(base_parts) > 1
" the first segment could be a renamed import, take the first segment from the user provided input
" so if it's a sub namespace of a renamed namespace, just use the typed in segments in place of the absolute path
" for example:
" you have a namespace NS1\SUBNS as SUB
" you have a sub-sub-namespace NS1\SUBNS\SUBSUB
" typed in SUB\SU
" the tags will return NS1\SUBNS\SUBSUB
" the completion should be: SUB\SUBSUB by replacing the NS1\SUBSN to SUB as in the import
if has_key(a:imports, base_parts[0]) && a:imports[base_parts[0]].kind == 'n'
let import = a:imports[base_parts[0]]
let relative_name = substitute(full_name, '^'.substitute(import.name, '\\', '\\\\', 'g'), base_parts[0], '')
else
let relative_name = strpart(full_name, stridx(full_name, a:base))
endif
else
let relative_name = strpart(full_name, stridx(full_name, a:base))
endif
if leading_slash == ''
let ext_namespaces[relative_name.'\'] = info
else
let ext_namespaces['\'.full_name.'\'] = info
endif
elseif tag.kind ==? 'f' && !has_key(tag, 'class') " class related functions (methods) completed elsewhere, only works with patched ctags
if has_key(tag, 'signature')
let prototype = tag.signature[1:-2] " drop the ()s around the string
else
let prototype = matchstr(tag.cmd,
\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
endif
let info = prototype.') - '.tag.filename
if !has_key(tag, 'namespace')
let ext_functions[tag.name.'('] = info
else
if tag.namespace ==? namespace_for_tag
if leading_slash == ''
let ext_functions[relative_name.'('] = info
else
let ext_functions['\'.full_name.'('] = info
endif
endif
endif
elseif tag.kind ==? 'd'
let info = ' - '.tag.filename
if !has_key(tag, 'namespace')
let ext_constants[tag.name] = info
else
if tag.namespace ==? namespace_for_tag
if leading_slash == ''
let ext_constants[relative_name] = info
else
let ext_constants['\'.full_name] = info
endif
endif
endif
elseif tag.kind ==? 'c' || tag.kind ==? 'i' || tag.kind ==? 't'
let info = ' - '.tag.filename
let key = ''
if !has_key(tag, 'namespace')
let key = tag.name
else
if tag.namespace ==? namespace_for_tag
if leading_slash == ''
let key = relative_name
else
let key = '\'.full_name
endif
endif
endif
if key != ''
if tag.kind ==? 'c'
let ext_classes[key] = info
elseif tag.kind ==? 'i'
let ext_interfaces[key] = info
elseif tag.kind ==? 't'
let ext_traits[key] = info
endif
endif
endif
endif
endfor
let builtin_constants = {}
let builtin_classnames = {}
let builtin_interfaces = {}
let builtin_functions = {}
let builtin_keywords = {}
let base = substitute(a:base, '^\', '', '')
if a:current_namespace == '\' || (a:base =~ '^\\' && a:base =~ '^\\[^\\]*$')
" Add builtin class names
for [classname, info] in items(g:php_builtin_classnames)
if classname =~? '^'.base
let builtin_classnames[leading_slash.g:php_builtin_classes[tolower(classname)].name] = info
endif
endfor
for [interfacename, info] in items(g:php_builtin_interfacenames)
if interfacename =~? '^'.base
let builtin_interfaces[leading_slash.g:php_builtin_interfaces[tolower(interfacename)].name] = info
endif
endfor
endif
" Prepare list of constants from built-in constants
for [constant, info] in items(g:php_constants)
if constant =~# '^'.base
let builtin_constants[leading_slash.constant] = info
endif
endfor
if leading_slash == '' " keywords should not be completed when base starts with '\'
" Treat keywords as constants
for [constant, info] in items(g:php_keywords)
if constant =~? '^'.a:base
let builtin_keywords[constant] = info
endif
endfor
endif
for [function_name, info] in items(g:php_builtin_functions)
if function_name =~? '^'.base
let builtin_functions[leading_slash.function_name] = info
endif
endfor
" All constants
call extend(int_constants, ext_constants)
" All functions
call extend(int_functions, ext_functions)
call extend(int_functions, builtin_functions)
for [imported_name, import] in items(a:imports)
if imported_name =~? '^'.base
if import.kind ==? 'c'
if import.builtin
let builtin_classnames[imported_name] = ' '.import.name
else
let ext_classes[imported_name] = ' '.import.name.' - '.import.filename
endif
elseif import.kind ==? 'i'
if import.builtin
let builtin_interfaces[imported_name] = ' '.import.name
else
let ext_interfaces[imported_name] = ' '.import.name.' - '.import.filename
endif
elseif import.kind ==? 't'
let ext_traits[imported_name] = ' '.import.name.' - '.import.filename
endif
" no builtin interfaces
if import.kind == 'n'
let ext_namespaces[imported_name.'\'] = ' '.import.name.' - '.import.filename
endif
end
endfor
let all_values = {}
" Add functions found in this file
call extend(all_values, int_functions)
" Add namespaces from tags
call extend(all_values, ext_namespaces)
" Add constants from the current file
call extend(all_values, int_constants)
" Add built-in constants
call extend(all_values, builtin_constants)
" Add external classes
call extend(all_values, ext_classes)
" Add external interfaces
call extend(all_values, ext_interfaces)
" Add external traits
call extend(all_values, ext_traits)
" Add built-in classes
call extend(all_values, builtin_classnames)
" Add built-in interfaces
call extend(all_values, builtin_interfaces)
" Add php keywords
call extend(all_values, builtin_keywords)
let final_list = []
let int_list = sort(keys(all_values))
for i in int_list
if has_key(ext_namespaces, i)
let final_list += [{'word':i, 'kind':'n', 'menu': ext_namespaces[i], 'info': ext_namespaces[i]}]
elseif has_key(int_functions, i)
let final_list +=
\ [{'word':i,
\ 'info':i.int_functions[i],
\ 'menu':int_functions[i],
\ 'kind':'f'}]
elseif has_key(ext_classes, i) || has_key(builtin_classnames, i)
let info = has_key(ext_classes, i) ? ext_classes[i] : builtin_classnames[i].' - builtin'
let final_list += [{'word':i, 'kind': 'c', 'menu': info, 'info': i.info}]
elseif has_key(ext_interfaces, i) || has_key(builtin_interfaces, i)
let info = has_key(ext_interfaces, i) ? ext_interfaces[i] : builtin_interfaces[i].' - builtin'
let final_list += [{'word':i, 'kind': 'i', 'menu': info, 'info': i.info}]
elseif has_key(ext_traits, i)
let final_list += [{'word':i, 'kind': 't', 'menu': ext_traits[i], 'info': ext_traits[i]}]
elseif has_key(int_constants, i) || has_key(builtin_constants, i)
let info = has_key(int_constants, i) ? int_constants[i] : ' - builtin'
let final_list += [{'word':i, 'kind': 'd', 'menu': info, 'info': i.info}]
else
let final_list += [{'word':i}]
endif
endfor
return final_list
endfunction
" }}}
1 0.000007 function! phpcomplete#CompleteUnknownClass(base, context) " {{{
let res = []
if g:phpcomplete_complete_for_unknown_classes != 1
return []
endif
if a:base =~ '^\$'
let adddollar = '$'
else
let adddollar = ''
endif
let file = getline(1, '$')
" Internal solution for finding object properties in current file.
if a:context =~ '::'
let variables = filter(deepcopy(file),
\ 'v:val =~ "^\\s*\\(static\\|static\\s\\+\\(public\\|var\\)\\|\\(public\\|var\\)\\s\\+static\\)\\s\\+\\$"')
elseif a:context =~ '->'
let variables = filter(deepcopy(file),
\ 'v:val =~ "^\\s*\\(public\\|var\\)\\s\\+\\$"')
endif
let jvars = join(variables, ' ')
let svars = split(jvars, '\$')
let int_vars = {}
for i in svars
let c_var = matchstr(i,
\ '^\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
if c_var != ''
let int_vars[adddollar.c_var] = ''
endif
endfor
" Internal solution for finding functions in current file.
call filter(deepcopy(file),
\ 'v:val =~ "function\\s\\+&\\?[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*("')
let jfile = join(file, ' ')
let int_values = split(jfile, 'function\s\+')
let int_functions = {}
for i in int_values
let f_name = matchstr(i,
\ '^&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
let f_args = matchstr(i,
\ '^&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\(;\|{\|$\)')
let int_functions[f_name.'('] = f_args.')'
endfor
" collect external functions from tags
let ext_functions = {}
let tags = phpcomplete#GetTaglist('^'.substitute(a:base, '^\$', '', ''))
for tag in tags
if tag.kind ==? 'f'
let item = tag.name
if has_key(tag, 'signature')
let prototype = tag.signature[1:-2]
else
let prototype = matchstr(tag.cmd,
\ 'function\s\+&\?[^[:space:]]\+\s*(\s*\zs.\{-}\ze\s*)\s*{\?')
endif
let ext_functions[item.'('] = prototype.') - '.tag['filename']
endif
endfor
" All functions to one hash for later reference when deciding kind
call extend(int_functions, ext_functions)
let all_values = {}
call extend(all_values, int_functions)
call extend(all_values, int_vars) " external variables are already in
call extend(all_values, g:php_builtin_object_functions)
for m in sort(keys(all_values))
if m =~ '\(^\|::\)'.a:base
call add(res, m)
endif
endfor
let start_list = res
let final_list = []
for i in start_list
if has_key(int_vars, i)
let class = ' '
if all_values[i] != ''
let class = i.' class '
endif
let final_list += [{'word':i, 'info':class.all_values[i], 'kind':'v'}]
else
let final_list +=
\ [{'word':substitute(i, '.*::', '', ''),
\ 'info':i.all_values[i],
\ 'menu':all_values[i],
\ 'kind':'f'}]
endif
endfor
return final_list
endfunction
" }}}
1 0.000002 function! phpcomplete#CompleteVariable(base) " {{{
let res = []
" Internal solution for current file.
let file = getline(1, '$')
let jfile = join(file, ' ')
let int_vals = split(jfile, '\ze\$')
let int_vars = {}
for i in int_vals
if i =~? '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*=\s*new'
let val = matchstr(i,
\ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*')
else
let val = matchstr(i,
\ '^\$[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*')
endif
if val != ''
let int_vars[val] = ''
endif
endfor
call extend(int_vars, g:php_builtin_vars)
" ctags has support for PHP, use tags file for external variables
if g:phpcomplete_search_tags_for_variables
let ext_vars = {}
let tags = phpcomplete#GetTaglist('\C^'.substitute(a:base, '^\$', '', ''))
for tag in tags
if tag.kind ==? 'v'
let item = tag.name
let m_menu = ''
if tag.cmd =~? tag['name'].'\s*=\s*new\s\+'
let m_menu = matchstr(tag.cmd,
\ '\c=\s*new\s\+\zs[a-zA-Z_0-9\x7f-\xff]\+\ze')
endif
let ext_vars['$'.item] = m_menu
endif
endfor
call extend(int_vars, ext_vars)
endif
for m in sort(keys(int_vars))
if m =~# '^\'.a:base
call add(res, m)
endif
endfor
let int_list = res
let int_dict = []
for i in int_list
if int_vars[i] != ''
let class = ' '
if int_vars[i] != ''
let class = i.' class '
endif
let int_dict += [{'word':i, 'info':class.int_vars[i], 'menu':int_vars[i], 'kind':'v'}]
else
let int_dict += [{'word':i, 'kind':'v'}]
endif
endfor
return int_dict
endfunction
" }}}
1 0.000003 function! phpcomplete#CompleteClassName(base, kinds, current_namespace, imports) " {{{
let kinds = sort(a:kinds)
" Complete class name
let res = []
if a:base =~? '^\'
let leading_slash = '\'
let base = substitute(a:base, '^\', '', '')
else
let leading_slash = ''
let base = a:base
endif
" Internal solution for finding classes in current file.
let file = getline(1, '$')
let filterstr = ''
if kinds == ['c', 'i']
let filterstr = 'v:val =~? "\\(class\\|interface\\)\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*"'
elseif kinds == ['c', 'n']
let filterstr = 'v:val =~? "\\(class\\|namespace\\)\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*"'
elseif kinds == ['c']
let filterstr = 'v:val =~? "class\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*"'
elseif kinds == ['i']
let filterstr = 'v:val =~? "interface\\s\\+[a-zA-Z_\\x7f-\\xff][a-zA-Z_0-9\\x7f-\\xff]*\\s*"'
endif
call filter(file, filterstr)
for line in file
let c_name = matchstr(line, '\c\(class\|interface\)\s*\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*')
let kind = (line =~? '^\s*class' ? 'c' : 'i')
if c_name != '' && c_name =~? '^'.base
call add(res, {'word': c_name, 'kind': kind})
endif
endfor
" resolve the typed in part with namespaces (if theres a \ in it)
let [tag_match_pattern, namespace_for_class] = phpcomplete#ExpandClassName(a:base, a:current_namespace, a:imports)
let tags = []
if len(tag_match_pattern) >= g:phpcomplete_min_num_of_chars_for_namespace_completion
let tags = phpcomplete#GetTaglist('^\c'.tag_match_pattern)
endif
if len(tags)
let base_parts = split(a:base, '\')
if len(base_parts) > 1
let namespace_part = join(base_parts[0:-2], '\').'\'
else
let namespace_part = ''
endif
let no_namespace_matches = []
let namespaced_matches = []
let seen_namespaced_tag = 0
for tag in tags
if has_key(tag, 'namespace')
let seen_namespaced_tag = 1
endif
let relative_name = namespace_part.tag.name
" match base without the namespace part for namespaced base but not namespaced tags, for tagfiles with old ctags
if !has_key(tag, 'namespace') && index(kinds, tag.kind) != -1 && stridx(tolower(tag.name), tolower(base[len(namespace_part):])) == 0
call add(no_namespace_matches, {'word': leading_slash.relative_name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
endif
if has_key(tag, 'namespace') && index(kinds, tag.kind) != -1 && tag.namespace ==? namespace_for_class
let full_name = tag.namespace.'\'.tag.name " absolute namespaced name (without leading '\')
call add(namespaced_matches, {'word': leading_slash == '\' ? leading_slash.full_name : relative_name, 'kind': tag.kind, 'menu': tag.filename, 'info': tag.filename })
endif
endfor
" if there was a tag with namespace field, assume tag files with namespace support, so the matches
" without a namespace field are in the global namespace so if there were namespace in the base
" we should not add them to the matches
if seen_namespaced_tag && namespace_part != ''
let no_namespace_matches = []
endif
let res += no_namespace_matches + namespaced_matches
endif
" look for built in classnames and interfaces
let base_parts = split(base, '\')
if a:current_namespace == '\' || (leading_slash == '\' && len(base_parts) < 2)
if index(kinds, 'c') != -1
let builtin_classnames = filter(keys(copy(g:php_builtin_classnames)), 'v:val =~? "^'.substitute(a:base, '\\', '', 'g').'"')
for classname in builtin_classnames
let menu = ''
" if we have a constructor for this class, add parameters as to the info
if has_key(g:php_builtin_classes[tolower(classname)].methods, '__construct')
let menu = g:php_builtin_classes[tolower(classname)]['methods']['__construct']['signature']
endif
call add(res, {'word': leading_slash.g:php_builtin_classes[tolower(classname)].name, 'kind': 'c', 'menu': menu})
endfor
endif
if index(kinds, 'i') != -1
let builtin_interfaces = filter(keys(copy(g:php_builtin_interfaces)), 'v:val =~? "^'.substitute(a:base, '\\', '', 'g').'"')
for interfacename in builtin_interfaces
call add(res, {'word': leading_slash.g:php_builtin_interfaces[interfacename]['name'], 'kind': 'i', 'menu': ''})
endfor
endif
endif
" add matching imported things
for [imported_name, import] in items(a:imports)
if imported_name =~? '^'.base && index(kinds, import.kind) != -1
let menu = import.name.(import.builtin ? ' - builtin' : '')
call add(res, {'word': imported_name, 'kind': import.kind, 'menu': menu})
endif
endfor
let res = sort(res, 'phpcomplete#CompareCompletionRow')
return res
endfunction
" }}}
1 0.000003 function! phpcomplete#CompareCompletionRow(i1, i2) " {{{
return a:i1.word == a:i2.word ? 0 : a:i1.word > a:i2.word ? 1 : -1
endfunction
" }}}
1 0.000005 function! s:getNextCharWithPos(filelines, current_pos) " {{{
let line_no = a:current_pos[0]
let col_no = a:current_pos[1]
let last_line = a:filelines[len(a:filelines) - 1]
let end_pos = [len(a:filelines) - 1, strlen(last_line) - 1]
if line_no > end_pos[0] || line_no == end_pos[0] && col_no > end_pos[1]
return ['EOF', 'EOF']
endif
" we've not reached the end of the current line break
if col_no + 1 < strlen(a:filelines[line_no])
let col_no += 1
else
" we've reached the end of the current line, jump to the next
" non-blank line (blank lines have no position where we can read from,
" not even a whitespace. The newline char does not positionable by vim
let line_no += 1
while strlen(a:filelines[line_no]) == 0
let line_no += 1
endwhile
let col_no = 0
endif
" return 'EOF' string to signal end of file, normal results only one char
" in length
if line_no == end_pos[0] && col_no > end_pos[1]
return ['EOF', 'EOF']
endif
return [[line_no, col_no], a:filelines[line_no][col_no]]
endfunction " }}}
1 0.000002 function! phpcomplete#EvaluateModifiers(modifiers, required_modifiers, prohibited_modifiers) " {{{
" if theres no modifier, and no modifier is allowed and no modifier is required
if len(a:modifiers) == 0 && len(a:required_modifiers) == 0
return 1
else
" check if every requred modifier is present
for required_modifier in a:required_modifiers
if index(a:modifiers, required_modifier) == -1
return 0
endif
endfor
for modifier in a:modifiers
" if the modifier is prohibited it's a no match
if index(a:prohibited_modifiers, modifier) != -1
return 0
endif
endfor
" anything that is not explicitly required or prohibited is allowed
return 1
endif
endfunction
" }}}
1 0.000003 function! phpcomplete#CompleteUserClass(context, base, sccontent, visibility) " {{{
let final_list = []
let res = []
let required_modifiers = []
let prohibited_modifiers = []
if a:visibility == 'public'
let prohibited_modifiers += ['private', 'protected']
endif
" limit based on context to static or normal methods
let static_con = ''
if a:context =~ '::$' && a:context !~? 'parent::$'
if g:phpcomplete_relax_static_constraint != 1
let required_modifiers += ['static']
endif
elseif a:context =~ '->$'
let prohibited_modifiers += ['static']
endif
let all_function = filter(deepcopy(a:sccontent),
\ 'v:val =~ "^\\s*\\(public\\s\\+\\|protected\\s\\+\\|private\\s\\+\\|final\\s\\+\\|abstract\\s\\+\\|static\\s\\+\\)*function"')
let functions = []
for i in all_function
let modifiers = split(matchstr(tolower(i), '\zs.\+\zefunction'), '\s\+')
if phpcomplete#EvaluateModifiers(modifiers, required_modifiers, prohibited_modifiers) == 1
call add(functions, i)
endif
endfor
let c_functions = {}
let c_doc = {}
for i in functions
let f_name = matchstr(i,
\ 'function\s*&\?\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
let f_args = matchstr(i,
\ 'function\s*&\?[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\s*(\zs.\{-}\ze)\_s*\(;\|{\|\_$\)')
if f_name != '' && stridx(f_name, '__') != 0
let c_functions[f_name.'('] = f_args
if g:phpcomplete_parse_docblock_comments
let c_doc[f_name.'('] = phpcomplete#GetDocBlock(a:sccontent, 'function\s*&\?\<'.f_name.'\>')
endif
endif
endfor
" limit based on context to static or normal attributes
if a:context =~ '::$' && a:context !~? 'parent::$'
" variables must have static to be accessed as static unlike functions
let required_modifiers += ['static']
endif
let all_variable = filter(deepcopy(a:sccontent),
\ 'v:val =~ "\\(^\\s*\\(var\\s\\+\\|public\\s\\+\\|protected\\s\\+\\|private\\s\\+\\|final\\s\\+\\|abstract\\s\\+\\|static\\s\\+\\)\\+\\$\\|^\\s*\\(\\/\\|\\*\\)*\\s*@property\\s\\+\\S\\+\\s\\S\\{-}\\s*$\\)"')
let variables = []
for i in all_variable
let modifiers = split(matchstr(tolower(i), '\zs.\+\ze\$'), '\s\+')
if phpcomplete#EvaluateModifiers(modifiers, required_modifiers, prohibited_modifiers) == 1
call add(variables, i)
endif
endfor
let static_vars = split(join(variables, ' '), '\$')
let c_variables = {}
let var_index = 0
for i in static_vars
let c_var = matchstr(i,
\ '^\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
if c_var != ''
if a:context =~ '::$'
let c_var = '$'.c_var
endif
let c_variables[c_var] = ''
if g:phpcomplete_parse_docblock_comments && len(get(variables, var_index)) > 0
let c_doc[c_var] = phpcomplete#GetDocBlock(a:sccontent, variables[var_index])
endif
let var_index += 1
endif
endfor
let constants = filter(deepcopy(a:sccontent),
\ 'v:val =~ "^\\s*const\\s\\+"')
let jcons = join(constants, ' ')
let scons = split(jcons, 'const')
let c_constants = {}
let const_index = 0
for i in scons
let c_con = matchstr(i,
\ '^\s*\zs[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*\ze')
if c_con != ''
let c_constants[c_con] = ''
if g:phpcomplete_parse_docblock_comments && len(get(constants, const_index)) > 0
let c_doc[c_con] = phpcomplete#GetDocBlock(a:sccontent, constants[const_index])
endif
let const_index += 1
endif
endfor
let all_values = {}
call extend(all_values, c_functions)
call extend(all_values, c_variables)
call extend(all_values, c_constants)
for m in sort(keys(all_values))
if stridx(m, a:base) == 0
call add(res, m)
endif
endfor
let start_list = res
let final_list = []
for i in start_list
let docblock = phpcomplete#ParseDocBlock(get(c_doc, i, ''))
if has_key(c_variables, i)
let final_list +=
\ [{'word': i,
\ 'info':phpcomplete#FormatDocBlock(docblock),
\ 'menu':get(docblock.var, 'type', ''),
\ 'kind':'v'}]
elseif has_key(c_constants, i)
let info = phpcomplete#FormatDocBlock(docblock)
if info != ''
let info = "\n".info
endif
let final_list +=
\ [{'word':i,
\ 'info':i.info,
\ 'menu':all_values[i],
\ 'kind':'d'}]
else
let return_type = get(docblock.return, 'type', '')
if return_type != ''
let return_type = ' | '.return_type
endif
let info = phpcomplete#FormatDocBlock(docblock)
if info != ''
let info = "\n".info
endif
let final_list +=
\ [{'word':substitute(i, '.*::', '', ''),
\ 'info':i.all_values[i].')'.info,
\ 'menu':all_values[i].')'.return_type,
\ 'kind':'f'}]
endif
endfor
return final_list
endfunction
" }}}
1 0.000004 function! phpcomplete#CompleteBuiltInClass(context, classname, base) " {{{
let class_info = g:php_builtin_classes[tolower(a:classname)]
let res = []
if a:context =~ '->$' " complete for everything instance related
" methods
for [method_name, method_info] in items(class_info.methods)
if stridx(method_name, '__') != 0 && (a:base == '' || method_name =~? '^'.a:base)
call add(res, {'word':method_name.'(', 'kind': 'f', 'menu': method_info.signature, 'info': method_info.signature })
endif
endfor
" properties
for [property_name, property_info] in items(class_info.properties)
if a:base == '' || property_name =~? '^'.a:base
call add(res, {'word':property_name, 'kind': 'v', 'menu': property_info.type, 'info': property_info.type })
endif
endfor
elseif a:context =~ '::$' " complete for everything static
" methods
for [method_name, method_info] in items(class_info.static_methods)
if a:base == '' || method_name =~? '^'.a:base
call add(res, {'word':method_name.'(', 'kind': 'f', 'menu': method_info.signature, 'info': method_info.signature })
endif
endfor
" properties
for [property_name, property_info] in items(class_info.static_properties)
if a:base == '' || property_name =~? '^'.a:base
call add(res, {'word':property_name, 'kind': 'v', 'menu': property_info.type, 'info': property_info.type })
endif
endfor
" constants
for [constant_name, constant_info] in items(class_info.constants)
if a:base == '' || constant_name =~? '^'.a:base
call add(res, {'word':constant_name, 'kind': 'd', 'menu': constant_info, 'info': constant_info})
endif
endfor
endif
return res
endfunction
" }}}
1 0.000002 function! phpcomplete#GetTaglist(pattern) " {{{
let cache_checksum = ''
if g:phpcomplete_cache_taglists == 1
" build a string with format of "<tagfile>:<mtime>$<tagfile2>:<mtime2>..."
" to validate that the tags are not changed since the time we saved the results in cache
for tagfile in sort(tagfiles())
let cache_checksum .= fnamemodify(tagfile, ':p').':'.getftime(tagfile).'$'
endfor
if s:cache_tags_checksum != cache_checksum
" tag file(s) changed
" since we don't know where individual tags coming from when calling taglist() we zap the whole cache
" no way to clear only the entries originating from the changed tag file
let s:cache_tags = {}
endif
if has_key(s:cache_tags, a:pattern)
return s:cache_tags[a:pattern]
endif
endif
let tags = taglist(a:pattern)
for tag in tags
for prop in keys(tag)
if prop == 'cmd' || prop == 'static' || prop == 'kind' || prop == 'builtin'
continue
endif
let tag[prop] = substitute(tag[prop], '\\\\', '\\', 'g')
endfor
endfor
let s:cache_tags[a:pattern] = tags
let has_key = has_key(s:cache_tags, a:pattern)
let s:cache_tags_checksum = cache_checksum
return tags
endfunction
" }}}
1 0.000004 function! phpcomplete#GetCurrentInstruction(line_number, col_number, phpbegin) " {{{
" locate the current instruction (up until the previous non comment or string ";" or php region start (<?php or <?) without newlines
let col_number = a:col_number
let line_number = a:line_number
let line = getline(a:line_number)
let current_char = -1
let instruction = ''
let parent_depth = 0
let bracket_depth = 0
let stop_chars = [
\ '!', '@', '%', '^', '&',
\ '*', '/', '-', '+', '=',
\ ':', '>', '<', '.', '?',
\ ';', '(', '|', '['
\ ]
let phpbegin_length = len(matchstr(getline(a:phpbegin[0]), '\zs<?\(php\)\?\ze'))
let phpbegin_end = [a:phpbegin[0], a:phpbegin[1] - 1 + phpbegin_length]
" will hold the first place where a coma could have ended the match
let first_coma_break_pos = -1
let next_char = len(line) < col_number ? line[col_number + 1] : ''
while !(line_number == 1 && col_number == 1)
if current_char != -1
let next_char = current_char
endif
let current_char = line[col_number]
let synIDName = synIDattr(synID(line_number, col_number + 1, 0), 'name')
if col_number - 1 == -1
let prev_line_number = line_number - 1
let prev_line = getline(line_number - 1)
let prev_col_number = strlen(prev_line)
else
let prev_line_number = line_number
let prev_col_number = col_number - 1
let prev_line = line
endif
let prev_char = prev_line[prev_col_number]
" skip comments
if synIDName =~? 'comment\|phpDocTags'
let current_char = ''
endif
" break on the last char of the "and" and "or" operators
if synIDName == 'phpOperator' && (current_char == 'r' || current_char == 'd')
break
endif
" break on statements as "return" or "throws"
if synIDName == 'phpStatement' || synIDName == 'phpException'
break
endif
" if the current char should be considered
if current_char != '' && parent_depth >= 0 && bracket_depth >= 0 && synIDName !~? 'comment\|string'
" break if we are on a "naked" stop_char (operators, colon, openparent...)
if index(stop_chars, current_char) != -1
let do_break = 1
" dont break if it does look like a "->"
if (prev_char == '-' && current_char == '>') || (current_char == '-' && next_char == '>')
let do_break = 0
endif
" dont break if it does look like a "::"
if (prev_char == ':' && current_char == ':') || (current_char == ':' && next_char == ':')
let do_break = 0
endif
if do_break
break
endif
endif
" save the coma position for later use if theres a "naked" , possibly separating a parameter and it is not in a parented part
if first_coma_break_pos == -1 && current_char == ','
let first_coma_break_pos = len(instruction)
endif
endif
" count nested darenthesis and brackets so we can tell if we need to break on a ';' or not (think of for (;;) loops)
if synIDName =~? 'phpBraceFunc\|phpParent\|Delimiter'
if current_char == '('
let parent_depth += 1
elseif current_char == ')'
let parent_depth -= 1
elseif current_char == '['
let bracket_depth += 1
elseif current_char == ']'
let bracket_depth -= 1
endif
endif
" stop collecting chars if we see a function start { (think of first line in a function)
if (current_char == '{' || current_char == '}') && synIDName =~? 'phpBraceFunc\|phpParent\|Delimiter'
break
endif
" break if we are reached the php block start (<?php or <?)
if [line_number, col_number] == phpbegin_end
break
endif
let instruction = current_char.instruction
" step a char or a line back if we are on the first column of the line already
let col_number -= 1
if col_number == -1
let line_number -= 1
let line = getline(line_number)
let col_number = strlen(line)
endif
endwhile
" strip leading whitespace
let instruction = substitute(instruction, '^\s\+', '', '')
" there were a "naked" coma in the instruction
if first_coma_break_pos != -1
if instruction !~? '^use' && instruction !~? '^class' " use ... statements and class delcarations should not be broken up by comas
let pos = (-1 * first_coma_break_pos) + 1
let instruction = instruction[pos :]
endif
endif
" HACK to remove one line conditionals from code like "if ($foo) echo 'bar'"
" what the plugin really need is a proper php tokenizer
if instruction =~? '\c^\(if\|while\|foreach\|for\)\s*('
" clear everything up until the first (
let instruction = substitute(instruction, '^\(if\|while\|foreach\|for\)\s*(\s*', '', '')
" lets iterate trough the instruction until we can find the pair for the opening (
let i = 0
let depth = 1
while i < len(instruction)
if instruction[i] == '('
let depth += 1
endif
if instruction[i] == ')'
let depth -= 1
endif
if depth == 0
break
end
let i += 1
endwhile
let instruction = instruction[i + 1 : len(instruction)]
endif
" trim whitespace from the ends
let instruction = substitute(instruction, '\v^(^\s+)|(\s+)$', '', 'g')
return instruction
endfunction " }}}
1 0.000003 function! phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, imports, methodstack) " {{{
" Tries to get the classname and namespace for a chained method call like:
" $this->foo()->bar()->baz()->
let classname_candidate = a:classname_candidate
let class_candidate_namespace = a:class_candidate_namespace
let methodstack = a:methodstack
let unknown_result = ['', '']
let prev_method_is_array = (methodstack[0] =~ '\v^[^([]+\[' ? 1 : 0)
let classname_candidate_is_array = (classname_candidate =~ '\[\]$' ? 1 : 0)
if prev_method_is_array
if classname_candidate_is_array
let classname_candidate = substitute(classname_candidate, '\[\]$', '', '')
else
return unknown_result
endif
endif
if (len(methodstack) == 1)
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, class_candidate_namespace, a:imports)
return [classname_candidate, class_candidate_namespace]
else
call remove(methodstack, 0)
let method_is_array = (methodstack[0] =~ '\v^[^[]+\[' ? 1 : 0)
let method = matchstr(methodstack[0], '\v^\$*\zs[^[(]+\ze')
let classlocation = phpcomplete#GetClassLocation(classname_candidate, class_candidate_namespace)
if classlocation == 'VIMPHP_BUILTINOBJECT' && has_key(g:php_builtin_classes, tolower(classname_candidate))
let class_info = g:php_builtin_classes[tolower(classname_candidate)]
if has_key(class_info['methods'], method)
return phpcomplete#GetCallChainReturnType(class_info['methods'][method].return_type, '\', a:imports, methodstack)
endif
if has_key(class_info['properties'], method)
return phpcomplete#GetCallChainReturnType(class_info['properties'][method].type, '\', a:imports, methodstack)
endif
if has_key(class_info['static_methods'], method)
return phpcomplete#GetCallChainReturnType(class_info['static_methods'][method].return_type, '\', a:imports, methodstack)
endif
if has_key(class_info['static_properties'], method)
return phpcomplete#GetCallChainReturnType(class_info['static_properties'][method].type, '\', a:imports, methodstack)
endif
return unknown_result
elseif classlocation != '' && filereadable(classlocation)
" Read the next method from the stack and extract only the name
let classcontents = phpcomplete#GetCachedClassContents(classlocation, classname_candidate)
" Get Structured information of all classes and subclasses including namespace and includes
" try to find the method's return type in docblock comment
for classstructure in classcontents
let docblock_target_pattern = 'function\s\+&\?'.method.'\>\|\(public\|private\|protected\|var\).\+\$'.method.'\>\|@property.\+\$'.method.'\>'
let doc_str = phpcomplete#GetDocBlock(split(classstructure.content, '\n'), docblock_target_pattern)
if doc_str != ''
break
endif
endfor
if doc_str != ''
let docblock = phpcomplete#ParseDocBlock(doc_str)
if has_key(docblock.return, 'type') || has_key(docblock.var, 'type') || len(docblock.properties) > 0
let type = has_key(docblock.return, 'type') ? docblock.return.type : has_key(docblock.var, 'type') ? docblock.var.type : ''
if type == ''
for property in docblock.properties
if property.description =~? method
let type = property.type
break
endif
endfor
endif
" there's a namespace in the type, threat the type as FQCN
if type =~ '\\'
let parts = split(substitute(type, '^\\', '', ''), '\')
let class_candidate_namespace = join(parts[0:-2], '\')
let classname_candidate = parts[-1]
" check for renamed namepsace in imports
if has_key(classstructure.imports, class_candidate_namespace)
let class_candidate_namespace = classstructure.imports[class_candidate_namespace].name
endif
else
" no namespace in the type, threat it as a relative classname
let returnclass = type
if has_key(classstructure.imports, returnclass)
if has_key(classstructure.imports[returnclass], 'namespace')
let fullnamespace = classstructure.imports[returnclass].namespace
else
let fullnamespace = class_candidate_namespace
endif
else
let fullnamespace = class_candidate_namespace
endif
" make @return self, static, $this the same way
" (not exactly what php means by these)
if returnclass == 'self' || returnclass == 'static' || returnclass == '$this' || returnclass == 'self[]' || returnclass == 'static[]' || returnclass == '$this[]'
if returnclass =~ '\[\]$'
let classname_candidate = a:classname_candidate.'[]'
else
let classname_candidate = a:classname_candidate
endif
let class_candidate_namespace = a:class_candidate_namespace
else
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(returnclass, fullnamespace, a:imports)
endif
endif
return phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, a:imports, methodstack)
endif
endif
return unknown_result
else
return unknown_result
endif
endif
endfunction " }}}
1 0.000002 function! phpcomplete#GetMethodStack(line) " {{{
let methodstack = []
let i = 0
let end = len(a:line)
let current_part = ''
let parent_depth = 0
let in_string = 0
let string_start = ''
let next_char = ''
while i < end
let current_char = a:line[i]
let next_char = i + 1 < end ? a:line[i + 1] : ''
let prev_char = i >= 1 ? a:line[i - 1] : ''
let prev_prev_char = i >= 2 ? a:line[i - 2] : ''
if in_string == 0 && parent_depth == 0 && ((current_char == '-' && next_char == '>') || (current_char == ':' && next_char == ':'))
call add(methodstack, current_part)
let current_part = ''
let i += 2
continue
endif
" if it's looks like a string
if current_char == "'" || current_char == '"'
" and it is not escaped
if prev_char != '\' || (prev_char == '\' && prev_prev_char == '\')
" and we are in a string already
if in_string
" and that string started with this char too
if current_char == string_start
" clear the string mark
let in_string = 0
endif
else " ... and we are not in a string
" set the string mark
let in_string = 1
let string_start = current_char
endif
endif
endif
if !in_string && a:line[i] == '('
let parent_depth += 1
endif
if !in_string && a:line[i] == ')'
let parent_depth -= 1
endif
let current_part .= current_char
let i += 1
endwhile
" add the last remaining part, this can be an empty string and this is expected
" the empty string represents the completion base (which happen to be an empty string)
if current_part != ''
call add(methodstack, current_part)
endif
return methodstack
endfunction
" }}}
1 0.000003 function! phpcomplete#GetClassName(start_line, context, current_namespace, imports) " {{{
" Get class name
" Class name can be detected in few ways:
" @var $myVar class
" @var class $myVar
" in the same line (php 5.4 (new Class)-> syntax)
" line above
" or line in tags file
let class_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
let function_name_pattern = '[a-zA-Z_\x7f-\xff][a-zA-Z_0-9\x7f-\xff]*'
let function_invocation_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*('
let variable_name_pattern = '\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
let classname_candidate = ''
let class_candidate_namespace = a:current_namespace
let class_candidate_imports = a:imports
let methodstack = phpcomplete#GetMethodStack(a:context)
if a:context =~? '\$this->' || a:context =~? '\(self\|static\)::' || a:context =~? 'parent::'
let i = 1
while i < a:start_line
let line = getline(a:start_line - i)
" Don't complete self:: or $this if outside of a class
" (assumes correct indenting)
if line =~ '^}'
return ''
endif
if line =~? '\v^\s*(abstract\s+|final\s+)*\s*class\s'
let class_name = matchstr(line, '\cclass\s\+\zs'.class_name_pattern.'\ze')
let extended_class = matchstr(line, '\cclass\s\+'.class_name_pattern.'\s\+extends\s\+\zs'.class_name_pattern.'\ze')
let classname_candidate = a:context =~? 'parent::' ? extended_class : class_name
if classname_candidate != ''
let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack)
" return absolute classname, without leading \
return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate
endif
endif
let i += 1
endwhile
elseif a:context =~? '(\s*new\s\+'.class_name_pattern.'\s*)->'
let classname_candidate = matchstr(a:context, '\cnew\s\+\zs'.class_name_pattern.'\ze')
let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack)
" return absolute classname, without leading \
return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate
elseif get(methodstack, 0) =~# function_invocation_pattern
let function_name = matchstr(methodstack[0], '^\s*\zs'.function_name_pattern)
let function_file = phpcomplete#GetFunctionLocation(function_name, a:current_namespace)
if function_file == ''
let function_file = phpcomplete#GetFunctionLocation(function_name, '\')
endif
if function_file == 'VIMPHP_BUILTINFUNCTION'
" built in function, grab the return type from the info string
let return_type = matchstr(g:php_builtin_functions[function_name.'('], '\v\|\s+\zs.+$')
let classname_candidate = return_type
let class_candidate_namespace = '\'
elseif function_file != '' && filereadable(function_file)
let file_lines = readfile(function_file)
let docblock_str = phpcomplete#GetDocBlock(file_lines, 'function\s*&\?\<'.function_name.'\>')
let docblock = phpcomplete#ParseDocBlock(docblock_str)
if has_key(docblock.return, 'type')
let classname_candidate = docblock.return.type
let [class_candidate_namespace, function_imports] = phpcomplete#GetCurrentNameSpace(file_lines)
" try to expand the classname of the returned type with the context got from the function's source file
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, class_candidate_namespace, function_imports)
endif
endif
if classname_candidate != ''
let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack)
" return absolute classname, without leading \
return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate
endif
else
" extract the variable name from the context
let object = methodstack[0]
let object_is_array = (object =~ '\v^[^[]+\[' ? 1 : 0)
let object = matchstr(object, variable_name_pattern)
let function_boundary = phpcomplete#GetCurrentFunctionBoundaries()
let search_end_line = max([1, function_boundary[0][0]])
" -1 makes us ignore the current line (where the completion was invoked
let lines = reverse(getline(search_end_line, a:start_line - 1))
" check Constant lookup
let constant_object = matchstr(a:context, '\zs'.class_name_pattern.'\ze::')
if constant_object != ''
let classname_candidate = constant_object
endif
if classname_candidate == ''
" scan the file backwards from current line for explicit type declaration (@var $variable Classname)
for line in lines
" in file lookup for /* @var $foo Class */
if line =~# '@var\s\+'.object.'\s\+'.class_name_pattern
let classname_candidate = matchstr(line, '@var\s\+'.object.'\s\+\zs'.class_name_pattern.'\(\[\]\)\?')
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
break
endif
" in file lookup for /* @var Class $foo */
if line =~# '@var\s\+'.class_name_pattern.'\s\+'.object
let classname_candidate = matchstr(line, '@var\s\+\zs'.class_name_pattern.'\(\[\]\)\?\ze'.'\s\+'.object)
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
break
endif
endfor
endif
if classname_candidate != ''
let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack)
" return absolute classname, without leading \
return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate
endif
" scan the file backwards from the current line
let i = 1
for line in lines " {{{
" do in-file lookup of $var = new Class
if line =~# '^\s*'.object.'\s*=\s*new\s\+'.class_name_pattern && !object_is_array
let classname_candidate = matchstr(line, object.'\c\s*=\s*new\s*\zs'.class_name_pattern.'\ze')
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
break
endif
" in-file lookup for Class::getInstance()
if line =~# '^\s*'.object.'\s*=&\?\s*'.class_name_pattern.'\s*::\s*getInstance' && !object_is_array
let classname_candidate = matchstr(line, object.'\s*=&\?\s*\zs'.class_name_pattern.'\ze\s*::\s*getInstance')
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
break
endif
" do in-file lookup for static method invocation of a built-in class, like: $d = DateTime::createFromFormat()
if line =~# '^\s*'.object.'\s*=&\?\s*'.class_name_pattern.'\s*::\s*$\?[a-zA-Z_0-9\x7f-\xff]\+'
let classname = matchstr(line, '^\s*'.object.'\s*=&\?\s*\zs'.class_name_pattern.'\ze\s*::')
if has_key(a:imports, classname) && a:imports[classname].kind == 'c'
let classname = a:imports[classname].name
endif
if has_key(g:php_builtin_classes, tolower(classname))
let sub_methodstack = phpcomplete#GetMethodStack(matchstr(line, '^\s*'.object.'\s*=&\?\s*\s\+\zs.*'))
let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname, '\', {}, sub_methodstack)
return classname_candidate
else
" try to get the class name from the static method's docblock
let [classname, namespace_for_class] = phpcomplete#ExpandClassName(classname, a:current_namespace, a:imports)
let sub_methodstack = phpcomplete#GetMethodStack(matchstr(line, '^\s*'.object.'\s*=&\?\s*\s\+\zs.*'))
let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(
\ classname,
\ namespace_for_class,
\ a:imports,
\ sub_methodstack)
return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate
endif
endif
" function declaration line
if line =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*('
let function_lines = join(reverse(copy(lines)), " ")
" search for type hinted arguments
if function_lines =~? 'function\(\s\+'.function_name_pattern.'\)\?\s*(.\{-}'.class_name_pattern.'\s\+'.object && !object_is_array
let f_args = matchstr(function_lines, '\cfunction\(\s\+'.function_name_pattern.'\)\?\s*(\zs.\{-}\ze)')
let args = split(f_args, '\s*\zs,\ze\s*')
for arg in args
if arg =~# object.'\(,\|$\)'
let classname_candidate = matchstr(arg, '\s*\zs'.class_name_pattern.'\ze\s\+'.object)
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
break
endif
endfor
if classname_candidate != ''
break
endif
endif
" search for docblock for the function
let match_line = substitute(line, '\\', '\\\\', 'g')
let sccontent = getline(0, a:start_line - i)
let doc_str = phpcomplete#GetDocBlock(sccontent, match_line)
if doc_str != ''
let docblock = phpcomplete#ParseDocBlock(doc_str)
for param in docblock.params
if param.name =~? object
let classname_candidate = matchstr(param.type, class_name_pattern.'\(\[\]\)\?')
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, a:current_namespace, a:imports)
break
endif
endfor
if classname_candidate != ''
break
endif
endif
endif
" assignment for the variable in question with a variable on the right hand side
if line =~# '^\s*'.object.'\s*=&\?\s\+\(clone\)\?\s*'.variable_name_pattern
" try to find the next non-comment or string ";" char
let start_col = match(line, '^\s*'.object.'\C\s*=\zs&\?\s\+\(clone\)\?\s*'.variable_name_pattern)
let filelines = reverse(copy(lines))
let [pos, char] = s:getNextCharWithPos(filelines, [len(filelines) - i, start_col])
let chars_read = 1
let last_pos = pos
" function_boundary == 0 if we are not in a function
let real_lines_offset = len(function_boundary) == 1 ? 1 : function_boundary[0][0]
" read while end of the file
while char != 'EOF' && chars_read < 1000
let last_pos = pos
let [pos, char] = s:getNextCharWithPos(filelines, pos)
let chars_read += 1
" we got a candidate
if char == ';'
" pos values is relative to the function's lines,
" line 0 need to be offsetted with the line number
" where te function was started to get the line number
" in real buffer terms
let synIDName = synIDattr(synID(real_lines_offset + pos[0], pos[1] + 1, 0), 'name')
" it's not a comment or string, end search
if synIDName !~? 'comment\|string'
break
endif
endif
endwhile
let prev_context = phpcomplete#GetCurrentInstruction(real_lines_offset + last_pos[0], last_pos[1], b:phpbegin)
if prev_context == ''
" cannot get previous context give up
return
endif
let prev_class = phpcomplete#GetClassName(a:start_line - i, prev_context, a:current_namespace, a:imports)
if stridx(prev_class, '\') != -1
let classname_parts = split(prev_class, '\\\+')
let classname_candidate = classname_parts[-1]
let class_candidate_namespace = join(classname_parts[0:-2], '\')
else
let classname_candidate = prev_class
let class_candidate_namespace = '\'
endif
break
endif
" assignment for the variable in question with a function on the right hand side
if line =~# '^\s*'.object.'\s*=&\?\s*'.function_invocation_pattern
" try to find the next non-comment or string ";" char
let start_col = match(line, '\C^\s*'.object.'\s*=\zs&\?\s*'.function_invocation_pattern)
let filelines = reverse(copy(lines))
let [pos, char] = s:getNextCharWithPos(filelines, [len(filelines) - i, start_col])
let chars_read = 1
let last_pos = pos
" function_boundary == 0 if we are not in a function
let real_lines_offset = len(function_boundary) == 1 ? 1 : function_boundary[0][0]
" read while end of the file
while char != 'EOF' && chars_read < 1000
let last_pos = pos
let [pos, char] = s:getNextCharWithPos(filelines, pos)
let chars_read += 1
" we got a candidate
if char == ';'
" pos values is relative to the function's lines,
" line 0 need to be offsetted with the line number
" where te function was started to get the line number
" in real buffer terms
let synIDName = synIDattr(synID(real_lines_offset + pos[0], pos[1] + 1, 0), 'name')
" it's not a comment or string, end search
if synIDName !~? 'comment\|string'
break
endif
endif
endwhile
let prev_context = phpcomplete#GetCurrentInstruction(real_lines_offset + last_pos[0], last_pos[1], b:phpbegin)
if prev_context == ''
" cannot get previous context give up
return
endif
let function_name = matchstr(prev_context, '^'.function_invocation_pattern.'\ze')
let function_name = matchstr(function_name, '^\zs.\+\ze\s*($') " strip the trailing (
let [function_name, function_namespace] = phpcomplete#ExpandClassName(function_name, a:current_namespace, a:imports)
let function_file = phpcomplete#GetFunctionLocation(function_name, function_namespace)
if function_file == ''
let function_file = phpcomplete#GetFunctionLocation(function_name, '\')
endif
if function_file == 'VIMPHP_BUILTINFUNCTION'
" built in function, grab the return type from the info string
let return_type = matchstr(g:php_builtin_functions[function_name.'('], '\v\|\s+\zs.+$')
let classname_candidate = return_type
let class_candidate_namespace = '\'
break
elseif function_file != '' && filereadable(function_file)
let file_lines = readfile(function_file)
let docblock_str = phpcomplete#GetDocBlock(file_lines, 'function\s*&\?\<'.function_name.'\>')
let docblock = phpcomplete#ParseDocBlock(docblock_str)
if has_key(docblock.return, 'type')
let classname_candidate = docblock.return.type
let [class_candidate_namespace, function_imports] = phpcomplete#GetCurrentNameSpace(file_lines)
" try to expand the classname of the returned type with the context got from the function's source file
let [classname_candidate, class_candidate_namespace] = phpcomplete#ExpandClassName(classname_candidate, class_candidate_namespace, function_imports)
break
endif
endif
endif
" foreach with the variable in question
if line =~? 'foreach\s*(.\{-}\s\+'.object.'\s*)'
let sub_context = matchstr(line, 'foreach\s*(\s*\zs.\{-}\ze\s\+as')
let prev_class = phpcomplete#GetClassName(a:start_line - i, sub_context, a:current_namespace, a:imports)
" the iterated expression should return an array type
if prev_class =~ '\[\]$'
let prev_class = matchstr(prev_class, '\v^[^[]+')
else
return
endif
if stridx(prev_class, '\') != -1
let classname_parts = split(prev_class, '\\\+')
let classname_candidate = classname_parts[-1]
let class_candidate_namespace = join(classname_parts[0:-2], '\')
else
let classname_candidate = prev_class
let class_candidate_namespace = '\'
endif
break
endif
" catch clause with the variable in question
if line =~? 'catch\s*(\zs'.class_name_pattern.'\ze\s\+'.object
let classname = matchstr(line, 'catch\s*(\zs'.class_name_pattern.'\ze\s\+'.object)
if stridx(classname, '\') != -1
let classname_parts = split(classname, '\\\+')
let classname_candidate = classname_parts[-1]
let class_candidate_namespace = join(classname_parts[0:-2], '\')
else
let classname_candidate = classname
let class_candidate_namespace = '\'
endif
break
endif
let i += 1
endfor " }}}
if classname_candidate != ''
let [classname_candidate, class_candidate_namespace] = phpcomplete#GetCallChainReturnType(classname_candidate, class_candidate_namespace, class_candidate_imports, methodstack)
" return absolute classname, without leading \
return (class_candidate_namespace == '\' || class_candidate_namespace == '') ? classname_candidate : class_candidate_namespace.'\'.classname_candidate
endif
" OK, first way failed, now check tags file(s)
" This method is useless when local variables are not indexed by ctags and
" pretty inaccurate even if it is
if g:phpcomplete_search_tags_for_variables
let tags = phpcomplete#GetTaglist('^'.substitute(object, '^\$', '', ''))
if len(tags) == 0
return
else
for tag in tags
if tag.kind ==? 'v' && tag.cmd =~? '=\s*new\s\+\zs'.class_name_pattern.'\ze'
let classname = matchstr(tag.cmd, '=\s*new\s\+\zs'.class_name_pattern.'\ze')
" unescape the classname, it would have "\" doubled since it is an ex command
let classname = substitute(classname, '\\\(\_.\)', '\1', 'g')
return classname
endif
endfor
endif
endif
endif
endfunction
" }}}
1 0.000009 function! phpcomplete#GetClassLocation(classname, namespace) " {{{
" Check classname may be name of built in object
if has_key(g:php_builtin_classes, tolower(a:classname)) && (a:namespace == '' || a:namespace == '\')
return 'VIMPHP_BUILTINOBJECT'
endif
if has_key(g:php_builtin_interfaces, tolower(a:classname)) && (a:namespace == '' || a:namespace == '\')
return 'VIMPHP_BUILTINOBJECT'
endif
if a:namespace == '' || a:namespace == '\'
let search_namespace = '\'
else
let search_namespace = tolower(a:namespace)
endif
let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(getline(0, line('.')))
" do in-file lookup for class definition
let i = 1
while i < line('.')
let line = getline(line('.')-i)
if line =~? '^\s*\(abstract\s\+\|final\s\+\)*\s*\(class\|interface\|trait\)\s*'.a:classname.'\(\s\+\|$\|{\)' && tolower(current_namespace) == search_namespace
return expand('%:p')
else
let i += 1
continue
endif
endwhile
" Get class location from tags
let no_namespace_candidate = ''
let tags = phpcomplete#GetTaglist('^'.a:classname.'$')
for tag in tags
" We'll allow interfaces and traits to be handled classes since you
" can't have colliding names with different kinds anyway
if tag.kind == 'c' || tag.kind == 'i' || tag.kind == 't'
if !has_key(tag, 'namespace')
let no_namespace_candidate = tag.filename
else
if search_namespace == tolower(tag.namespace)
return tag.filename
endif
endif
endif
endfor
if no_namespace_candidate != ''
return no_namespace_candidate
endif
return ''
endfunction
" }}}
1 0.000003 function! phpcomplete#GetFunctionLocation(function_name, namespace) " {{{
" builtin functions doesn't need explicit \ in front of them even in namespaces,
" aliased built-in function names are not handled
if has_key(g:php_builtin_functions, a:function_name.'(')
return 'VIMPHP_BUILTINFUNCTION'
endif
" do in-file lookup for function definition
let i = 1
let buffer_lines = getline(1, line('$'))
for line in buffer_lines
if line =~? '^\s*function\s\+&\?'.a:function_name.'\s*('
return expand('%:p')
endif
endfor
if a:namespace == '' || a:namespace == '\'
let search_namespace = '\'
else
let search_namespace = tolower(a:namespace)
endif
let no_namespace_candidate = ''
let tags = phpcomplete#GetTaglist('\c^'.a:function_name.'$')
for tag in tags
if tag.kind == 'f'
if !has_key(tag, 'namespace')
let no_namespace_candidate = tag.filename
else
if search_namespace == tolower(tag.namespace)
return tag.filename
endif
endif
endif
endfor
if no_namespace_candidate != ''
return no_namespace_candidate
endif
return ''
endfunction
" }}}
1 0.000002 function! phpcomplete#GetCachedClassContents(classlocation, class_name) " {{{
let full_file_path = fnamemodify(a:classlocation, ':p')
let cache_key = full_file_path.'#'.a:class_name.'#'.getftime(full_file_path)
" try to read from the cache first
if has_key(s:cache_classstructures, cache_key)
let classcontents = s:cache_classstructures[cache_key]
" cached class contents can contain content from multiple files (superclasses) so we have to
" validate cached result's validness by the filemtimes used to create the cached value
let valid = 1
for classstructure in classcontents
if getftime(classstructure.file) != classstructure.mtime
let valid = 0
" we could break here, but the time required for checking probably worth
" the the memory we can free by checking every file in the cached hirearchy
call phpcomplete#ClearCachedClassContents(classstructure.file)
endif
endfor
if valid
" cache hit, we found an entry for this file + class pair and every
" file in the response is also valid
return classcontents
else
" clear the outdated cached value from the cache store
call remove(s:cache_classstructures, cache_key)
call phpcomplete#ClearCachedClassContents(full_file_path)
" fall trough for the read from files path
endif
else
call phpcomplete#ClearCachedClassContents(full_file_path)
endif
" cache miss, fetch the content from the files itself
let classfile = readfile(a:classlocation)
let classcontents = phpcomplete#GetClassContentsStructure(full_file_path, classfile, a:class_name)
let s:cache_classstructures[cache_key] = classcontents
return classcontents
endfunction " }}}
1 0.000002 function! phpcomplete#ClearCachedClassContents(full_file_path) " {{{
for [cache_key, cached_value] in items(s:cache_classstructures)
if stridx(cache_key, a:full_file_path.'#') == 0
call remove(s:cache_classstructures, cache_key)
endif
endfor
endfunction " }}}
1 0.000002 function! phpcomplete#GetClassContentsStructure(file_path, file_lines, class_name) " {{{
" returns dictionary containing content, namespace and imports for the class and all parent classes.
" Example:
" [
" {
" class: 'foo',
" content: '... class foo extends bar ... ',
" namespace: 'NS\Foo',
" imports : { ... },
" file: '/foo.php',
" mtime: 42,
" },
" {
" class: 'bar',
" content: '... class bar extends baz ... ',
" namespace: 'NS\Bar',
" imports : { ... }
" file: '/bar.php',
" mtime: 42,
" },
" ...
" ]
"
let full_file_path = fnamemodify(a:file_path, ':p')
let class_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
let cfile = join(a:file_lines, "\n")
let result = []
" We use new buffer and (later) normal! because
" this is the most efficient way. The other way
" is to go through the looong string looking for
" matching {}
" remember the window we started at
let phpcomplete_original_window = winnr()
silent! below 1new
silent! 0put =cfile
call search('\c\(class\|interface\|trait\)\_s\+'.a:class_name.'\(\>\|$\)')
let cfline = line('.')
call search('{')
let endline = line('.')
let content = join(getline(cfline, endline), "\n")
" Catch extends
if content =~? 'extends'
let extends_string = matchstr(content, '\(class\|interface\)\_s\+'.a:class_name.'\_.\+extends\_s\+\zs\('.class_name_pattern.'\(,\|\_s\)*\)\+\ze\(extends\|{\)')
let extended_classes = map(split(extends_string, '\(,\|\_s\)\+'), 'substitute(v:val, "\\_s\\+", "", "g")')
else
let extended_classes = ''
endif
" Catch implements
if content =~? 'implements'
let implements_string = matchstr(content, 'class\_s\+'.a:class_name.'\_.\+implements\_s\+\zs\('.class_name_pattern.'\(,\|\_s\)*\)\+\ze')
let implemented_interfaces = map(split(implements_string, '\(,\|\_s\)\+'), 'substitute(v:val, "\\_s\\+", "", "g")')
else
let implemented_interfaces = []
endif
call searchpair('{', '', '}', 'W')
let class_closing_bracket_line = line('.')
" Include class docblock
let doc_line = cfline - 1
if getline(doc_line) =~? '^\s*\*/'
while doc_line != 0
if getline(doc_line) =~? '^\s*/\*\*'
let cfline = doc_line
break
endif
let doc_line -= 1
endwhile
endif
let classcontent = join(getline(cfline, class_closing_bracket_line), "\n")
let used_traits = []
" move back to the line next to the class's definition
call cursor(endline + 1, 1)
let keep_searching = 1
while keep_searching != 0
" try to grab "use..." keywords
let [lnum, col] = searchpos('\c^\s\+use\s\+'.class_name_pattern, 'cW', class_closing_bracket_line)
let syn_name = synIDattr(synID(lnum, col, 0), "name")
if syn_name =~? 'string\|comment'
call cursor(lnum + 1, 1)
continue
endif
let trait_line = getline(lnum)
if trait_line !~? ';'
" try to find the next line containing ';'
let l = lnum
let search_line = trait_line
" add lines from the file until theres no ';' in them
while search_line !~? ';' && l > 0
" file lines are reversed so we need to go backwards
let l += 1
let search_line = getline(l)
let trait_line .= ' '.substitute(search_line, '\(^\s\+\|\s\+$\)', '', 'g')
endwhile
endif
let use_expression = matchstr(trait_line, '^\s*use\s\+\zs.\{-}\ze;')
let use_parts = map(split(use_expression, '\s*,\s*'), 'substitute(v:val, "\\s+", " ", "g")')
let used_traits += map(use_parts, 'substitute(v:val, "\\s", "", "g")')
call cursor(lnum + 1, 1)
if [lnum, col] == [0, 0]
let keep_searching = 0
endif
endwhile
silent! bw! %
let [current_namespace, imports] = phpcomplete#GetCurrentNameSpace(a:file_lines[0:cfline])
" go back to original window
exe phpcomplete_original_window.'wincmd w'
call add(result, {
\ 'class': a:class_name,
\ 'content': classcontent,
\ 'namespace': current_namespace,
\ 'imports': imports,
\ 'file': full_file_path,
\ 'mtime': getftime(full_file_path),
\ })
let all_extends = used_traits
if len(extended_classes) > 0
call extend(all_extends, extended_classes)
endif
if len(implemented_interfaces) > 0
call extend(all_extends, implemented_interfaces)
endif
if len(all_extends) > 0
for class in all_extends
let [class, namespace] = phpcomplete#ExpandClassName(class, current_namespace, imports)
if namespace == ''
let namespace = '\'
endif
let classlocation = phpcomplete#GetClassLocation(class, namespace)
if classlocation == "VIMPHP_BUILTINOBJECT"
if has_key(g:php_builtin_classes, tolower(class))
let result += [phpcomplete#GenerateBuiltinClassStub('class', g:php_builtin_classes[tolower(class)])]
endif
if has_key(g:php_builtin_interfaces, tolower(class))
let result += [phpcomplete#GenerateBuiltinClassStub('interface', g:php_builtin_interfaces[tolower(class)])]
endif
elseif classlocation != '' && filereadable(classlocation)
let full_file_path = fnamemodify(classlocation, ':p')
let result += phpcomplete#GetClassContentsStructure(full_file_path, readfile(full_file_path), class)
elseif tolower(current_namespace) == tolower(namespace) && match(join(a:file_lines, "\n"), '\c\(class\|interface\|trait\)\_s\+'.class.'\(\>\|$\)') != -1
" try to find the declaration in the same file.
let result += phpcomplete#GetClassContentsStructure(full_file_path, a:file_lines, class)
endif
endfor
endif
return result
endfunction
" }}}
1 0.000002 function! phpcomplete#GetClassContents(classlocation, class_name) " {{{
let classcontents = phpcomplete#GetCachedClassContents(a:classlocation, a:class_name)
let result = []
for classstructure in classcontents
call add(result, classstructure.content)
endfor
return join(result, "\n")
endfunction
" }}}
1 0.000002 function! phpcomplete#GenerateBuiltinClassStub(type, class_info) " {{{
let re = a:type.' '.a:class_info['name']." {"
if has_key(a:class_info, 'constants')
for [name, initializer] in items(a:class_info.constants)
let re .= "\n\tconst ".name." = ".initializer.";"
endfor
endif
if has_key(a:class_info, 'properties')
for [name, info] in items(a:class_info.properties)
let re .= "\n\t// @var $".name." ".info.type
let re .= "\n\tpublic $".name.";"
endfor
endif
if has_key(a:class_info, 'static_properties')
for [name, info] in items(a:class_info.static_properties)
let re .= "\n\t// @var ".name." ".info.type
let re .= "\n\tpublic static ".name." = ".info.initializer.";"
endfor
endif
if has_key(a:class_info, 'methods')
for [name, info] in items(a:class_info.methods)
if name =~ '^__'
continue
endif
let re .= "\n\t/**"
let re .= "\n\t * ".name
let re .= "\n\t *"
let re .= "\n\t * @return ".info.return_type
let re .= "\n\t */"
let re .= "\n\tpublic function ".name."(".info.signature."){"
let re .= "\n\t}"
endfor
endif
if has_key(a:class_info, 'static_methods')
for [name, info] in items(a:class_info.static_methods)
let re .= "\n\t/**"
let re .= "\n\t * ".name
let re .= "\n\t *"
let re .= "\n\t * @return ".info.return_type
let re .= "\n\t */"
let re .= "\n\tpublic static function ".name."(".info.signature."){"
let re .= "\n\t}"
endfor
endif
let re .= "\n}"
return { a:type : a:class_info['name'],
\ 'content': re,
\ 'namespace': '',
\ 'imports': {},
\ 'file': 'VIMPHP_BUILTINOBJECT',
\ 'mtime': 0,
\ }
endfunction " }}}
1 0.000002 function! phpcomplete#GetDocBlock(sccontent, search) " {{{
let i = 0
let l = 0
let comment_start = -1
let comment_end = -1
let sccontent_len = len(a:sccontent)
while (i < sccontent_len)
let line = a:sccontent[i]
" search for a function declaration
if line =~? a:search
if line =~? '@property'
let doc_line = i
while doc_line != sccontent_len - 1
if a:sccontent[doc_line] =~? '^\s*\*/'
let l = doc_line
break
endif
let doc_line += 1
endwhile
else
let l = i - 1
endif
" start backward search for the comment block
while l != 0
let line = a:sccontent[l]
" if it's a one line docblock like comment and we can just return it right away
if line =~? '^\s*\/\*\*.\+\*\/\s*$'
return substitute(line, '\v^\s*(\/\*\*\s*)|(\s*\*\/)\s*$', '', 'g')
"... or if comment end found save line position and end search
elseif line =~? '^\s*\*/'
let comment_end = l
break
" ... or the line doesn't blank (only whitespace or nothing) end search
elseif line !~? '^\s*$'
break
endif
let l -= 1
endwhile
" no comment found
if comment_end == -1
return ''
end
while l >= 0
let line = a:sccontent[l]
if line =~? '^\s*/\*\*'
let comment_start = l
break
endif
let l -= 1
endwhile
" no docblock comment start found
if comment_start == -1
return ''
end
let comment_start += 1 " we dont need the /**
let comment_end -= 1 " we dont need the */
" remove leading whitespace and '*'s
let docblock = join(map(copy(a:sccontent[comment_start :comment_end]), 'substitute(v:val, "^\\s*\\*\\s*", "", "")'), "\n")
return docblock
endif
let i += 1
endwhile
return ''
endfunction
" }}}
1 0.000002 function! phpcomplete#ParseDocBlock(docblock) " {{{
let res = {
\ 'description': '',
\ 'params': [],
\ 'return': {},
\ 'throws': [],
\ 'var': {},
\ 'properties': [],
\ }
let res.description = substitute(matchstr(a:docblock, '\zs\_.\{-}\ze\(@type\|@var\|@param\|@return\|$\)'), '\(^\_s*\|\_s*$\)', '', 'g')
let docblock_lines = split(a:docblock, "\n")
let param_lines = filter(copy(docblock_lines), 'v:val =~? "^@param"')
for param_line in param_lines
let parts = matchlist(param_line, '@param\s\+\(\S\+\)\s\+\(\S\+\)\s*\(.*\)')
if len(parts) > 0
call add(res.params, {
\ 'line': parts[0],
\ 'type': phpcomplete#GetTypeFromDocBlockParam(get(parts, 1, '')),
\ 'name': get(parts, 2, ''),
\ 'description': get(parts, 3, '')})
endif
endfor
let return_line = filter(copy(docblock_lines), 'v:val =~? "^@return"')
if len(return_line) > 0
let return_parts = matchlist(return_line[0], '@return\s\+\(\S\+\)\s*\(.*\)')
let res['return'] = {
\ 'line': return_parts[0],
\ 'type': phpcomplete#GetTypeFromDocBlockParam(get(return_parts, 1, '')),
\ 'description': get(return_parts, 2, '')}
endif
let exception_lines = filter(copy(docblock_lines), 'v:val =~? "^\\(@throws\\|@exception\\)"')
for exception_line in exception_lines
let parts = matchlist(exception_line, '^\(@throws\|@exception\)\s\+\(\S\+\)\s*\(.*\)')
if len(parts) > 0
call add(res.throws, {
\ 'line': parts[0],
\ 'type': phpcomplete#GetTypeFromDocBlockParam(get(parts, 2, '')),
\ 'description': get(parts, 3, '')})
endif
endfor
let var_line = filter(copy(docblock_lines), 'v:val =~? "^\\(@var\\|@type\\)"')
if len(var_line) > 0
let var_parts = matchlist(var_line[0], '\(@var\|@type\)\s\+\(\S\+\)\s*\(.*\)')
let res['var'] = {
\ 'line': var_parts[0],
\ 'type': phpcomplete#GetTypeFromDocBlockParam(get(var_parts, 2, '')),
\ 'description': get(var_parts, 3, '')}
endif
let property_lines = filter(copy(docblock_lines), 'v:val =~? "^@property"')
for property_line in property_lines
let parts = matchlist(property_line, '\(@property\)\s\+\(\S\+\)\s*\(.*\)')
if len(parts) > 0
call add(res.properties, {
\ 'line': parts[0],
\ 'type': phpcomplete#GetTypeFromDocBlockParam(get(parts, 2, '')),
\ 'description': get(parts, 3, '')})
endif
endfor
return res
endfunction
" }}}
1 0.000002 function! phpcomplete#GetTypeFromDocBlockParam(docblock_type) " {{{
if a:docblock_type !~ '|'
return a:docblock_type
endif
let primitive_types = [
\ 'string', 'float', 'double', 'int',
\ 'scalar', 'array', 'bool', 'void', 'mixed',
\ 'null', 'callable', 'resource', 'object']
" add array of primitives to the list too, like string[]
let primitive_types += map(copy(primitive_types), 'v:val."[]"')
let types = split(a:docblock_type, '|')
for type in types
if index(primitive_types, type) == -1
return type
endif
endfor
" only primitive types found, return the first one
return types[0]
endfunction
" }}}
1 0.000002 function! phpcomplete#FormatDocBlock(info) " {{{
let res = ''
if len(a:info.description)
let res .= "Description:\n".join(map(split(a:info['description'], "\n"), '"\t".v:val'), "\n")."\n"
endif
if len(a:info.params)
let res .= "\nArguments:\n"
for arginfo in a:info.params
let res .= "\t".arginfo['name'].' '.arginfo['type']
if len(arginfo.description) > 0
let res .= ': '.arginfo['description']
endif
let res .= "\n"
endfor
endif
if has_key(a:info.return, 'type')
let res .= "\nReturn:\n\t".a:info['return']['type']
if len(a:info.return.description) > 0
let res .= ": ".a:info['return']['description']
endif
let res .= "\n"
endif
if len(a:info.throws)
let res .= "\nThrows:\n"
for excinfo in a:info.throws
let res .= "\t".excinfo['type']
if len(excinfo['description']) > 0
let res .= ": ".excinfo['description']
endif
let res .= "\n"
endfor
endif
if has_key(a:info.var, 'type')
let res .= "Type:\n\t".a:info['var']['type']."\n"
if len(a:info['var']['description']) > 0
let res .= ': '.a:info['var']['description']
endif
endif
return res
endfunction!
" }}}
1 0.000002 function! phpcomplete#GetCurrentNameSpace(file_lines) " {{{
let original_window = winnr()
silent! below 1new
silent! 0put =a:file_lines
normal! G
" clear out classes, functions and other blocks
while 1
let block_start_pos = searchpos('\c\(class\|trait\|function\|interface\)\s\+\_.\{-}\zs{', 'Web')
if block_start_pos == [0, 0]
break
endif
let block_end_pos = searchpairpos('{', '', '}\|\%$', 'W', 'synIDattr(synID(line("."), col("."), 0), "name") =~? "string\\|comment"')
if block_end_pos != [0, 0]
" end of the block found, just delete it
silent! exec block_start_pos[0].','.block_end_pos[0].'d _'
else
" block pair not found, use block start as beginning and the end
" of the buffer instead
silent! exec block_start_pos[0].',$d _'
endif
endwhile
normal! G
" grab the remains
let file_lines = reverse(getline(1, line('.') - 1))
silent! bw! %
exe original_window.'wincmd w'
let namespace_name_pattern = '[a-zA-Z_\x7f-\xff\\][a-zA-Z_0-9\x7f-\xff\\]*'
let i = 0
let file_length = len(file_lines)
let imports = {}
let current_namespace = '\'
while i < file_length
let line = file_lines[i]
if line =~? '^\(<?php\)\?\s*namespace\s*'.namespace_name_pattern
let current_namespace = matchstr(line, '\c^\(<?php\)\?\s*namespace\s*\zs'.namespace_name_pattern.'\ze')
break
endif
if line =~? '^\s*use\>'
if line =~? ';'
let use_line = line
else
" try to find the next line containing ';'
let l = i
let search_line = line
let use_line = line
" add lines from the file until theres no ';' in them
while search_line !~? ';' && l > 0
" file lines are reversed so we need to go backwards
let l -= 1
let search_line = file_lines[l]
let use_line .= ' '.substitute(search_line, '\(^\s\+\|\s\+$\)', '', 'g')
endwhile
endif
let use_expression = matchstr(use_line, '^\c\s*use\s\+\zs.\{-}\ze;')
let use_parts = map(split(use_expression, '\s*,\s*'), 'substitute(v:val, "\\s+", " ", "g")')
for part in use_parts
if part =~? '\s\+as\s\+'
let [object, name] = split(part, '\s\+as\s\+\c')
let object = substitute(object, '^\\', '', '')
let name = substitute(name, '^\\', '', '')
else
let object = part
let name = part
let object = substitute(object, '^\\', '', '')
let name = substitute(name, '^\\', '', '')
if name =~? '\\'
let name = matchstr(name, '\\\zs[^\\]\+\ze$')
endif
endif
" leading slash is not required use imports are always absolute
let imports[name] = {'name': object, 'kind': ''}
endfor
" find kind flags from tags or built in methods for the objects we extracted
" they can be either classes, interfaces or namespaces, no other thing is importable in php
for [key, import] in items(imports)
" if theres a \ in the name we have it's definetly not a built in thing, look for tags
if import.name =~ '\\'
let patched_ctags_detected = 0
let [classname, namespace_for_classes] = phpcomplete#ExpandClassName(import.name, '\', {})
let namespace_name_candidate = substitute(import.name, '\\', '\\\\', 'g')
" can be a namespace name as is, or can be a tagname at the end with a namespace
let tags = phpcomplete#GetTaglist('^\('.namespace_name_candidate.'\|'.classname.'\)$')
if len(tags) > 0
for tag in tags
" if there's a namespace with the name of the import
if tag.kind == 'n' && tag.name == import.name
call extend(import, tag)
let import['builtin'] = 0
let patched_ctags_detected = 1
break
endif
" if the name matches with the extracted classname and namespace
if (tag.kind == 'c' || tag.kind == 'i' || tag.kind == 't') && tag.name == classname
if has_key(tag, 'namespace')
let patched_ctags_detected = 1
if tag.namespace == namespace_for_classes
call extend(import, tag)
let import['builtin'] = 0
break
endif
elseif !exists('no_namespace_candidate')
" save the first namespacless match to be used if no better
" candidate found later on
let tag.namespace = namespace_for_classes
let no_namespace_candidate = tag
endif
endif
endfor
" there were a namespacless class name match, if we think that the
" tags are not generated with patched ctags we will take it as a match
if exists('no_namespace_candidate') && !patched_ctags_detected
call extend(import, no_namespace_candidate)
let import['builtin'] = 0
endif
else
" if no tags are found, extract the namespace from the name
let ns = matchstr(import.name, '\c\zs[a-zA-Z0-9\\]\+\ze\\' . name)
if len(ns) > 0
let import['name'] = name
let import['namespace'] = ns
let import['builtin'] = 0
endif
endif
else
" if no \ in the name, it can be a built in class
if has_key(g:php_builtin_classnames, tolower(import.name))
let import['kind'] = 'c'
let import['builtin'] = 1
elseif has_key(g:php_builtin_interfacenames, tolower(import.name))
let import['kind'] = 'i'
let import['builtin'] = 1
else
" or can be a tag with exactly matchign name
let tags = phpcomplete#GetTaglist('^'.import['name'].'$')
for tag in tags
" search for the first matchin namespace, class, interface with no namespace
if !has_key(tag, 'namespace') && (tag.kind == 'n' || tag.kind == 'c' || tag.kind == 'i' || tag.kind == 't')
call extend(import, tag)
let import['builtin'] = 0
break
endif
endfor
endif
endif
if exists('no_namespace_candidate')
unlet no_namespace_candidate
endif
endfor
endif
let i += 1
endwhile
let sorted_imports = {}
for name in sort(keys(imports))
let sorted_imports[name] = imports[name]
endfor
return [current_namespace, sorted_imports]
endfunction
" }}}
1 0.000002 function! phpcomplete#GetCurrentFunctionBoundaries() " {{{
let old_cursor_pos = [line('.'), col('.')]
let current_line_no = old_cursor_pos[0]
let function_pattern = '\c\(.*\%#\)\@!\_^\s*\zs\(abstract\s\+\|final\s\+\|private\s\+\|protected\s\+\|public\s\+\|static\s\+\)*function\_.\{-}(\_.\{-})\_.\{-}{'
let func_start_pos = searchpos(function_pattern, 'Wbc')
if func_start_pos == [0, 0]
call cursor(old_cursor_pos[0], old_cursor_pos[1])
return 0
endif
" get the line where the function declaration actually started
call search('\cfunction\_.\{-}(\_.\{-})\_.\{-}{', 'Wce')
" get the position of the function block's closing "}"
let func_end_pos = searchpairpos('{', '', '}', 'W')
if func_end_pos == [0, 0]
" there is a function start but no end found, assume that we are in a
" function but the user did not typed the closing "}" yet and the
" function runs to the end of the file
let func_end_pos = [line('$'), len(getline(line('$')))]
endif
" Decho func_start_pos[0].' <= '.current_line_no.' && '.current_line_no.' <= '.func_end_pos[0]
if func_start_pos[0] <= current_line_no && current_line_no <= func_end_pos[0]
call cursor(old_cursor_pos[0], old_cursor_pos[1])
return [func_start_pos, func_end_pos]
endif
call cursor(old_cursor_pos[0], old_cursor_pos[1])
return 0
endfunction
" }}}
1 0.000002 function! phpcomplete#ExpandClassName(classname, current_namespace, imports) " {{{
" if there's an imported class, just use that class's information
if has_key(a:imports, a:classname) && (a:imports[a:classname].kind == 'c' || a:imports[a:classname].kind == 'i' || a:imports[a:classname].kind == 't')
let namespace = has_key(a:imports[a:classname], 'namespace') ? a:imports[a:classname].namespace : ''
return [a:imports[a:classname].name, namespace]
endif
" try to find relative namespace in imports, imported names takes precedence over
" current namespace when resolving relative namespaced class names
if a:classname !~ '^\' && a:classname =~ '\\'
let classname_parts = split(a:classname, '\\\+')
if has_key(a:imports, classname_parts[0]) && a:imports[classname_parts[0]].kind == 'n'
let classname_parts[0] = a:imports[classname_parts[0]].name
let namespace = join(classname_parts[0:-2], '\')
let classname = classname_parts[-1]
return [classname, namespace]
endif
endif
" no imported class or namespace matched, expand with the current namespace
let namespace = ''
let classname = a:classname
" if the classname have namespaces in in or we are in a namespace
if a:classname =~ '\\' || (a:current_namespace != '\' && a:current_namespace != '')
" add current namespace to the a:classname
if a:classname !~ '^\'
let classname = a:current_namespace.'\'.substitute(a:classname, '^\\', '', '')
else
" remove leading \, tag files doesn't have those
let classname = substitute(a:classname, '^\\', '', '')
endif
" split classname to classname and namespace
let classname_parts = split(classname, '\\\+')
if len(classname_parts) > 1
let namespace = join(classname_parts[0:-2], '\')
let classname = classname_parts[-1]
endif
endif
return [classname, namespace]
endfunction
" }}}
1 0.000002 function! phpcomplete#LoadData() " {{{
" Keywords/reserved words, all other special things
" Later it is possible to add some help to values, or type of defined variable
let g:php_keywords={'PHP_SELF':'','argv':'','argc':'','GATEWAY_INTERFACE':'','SERVER_ADDR':'','SERVER_NAME':'','SERVER_SOFTWARE':'','SERVER_PROTOCOL':'','REQUEST_METHOD':'','REQUEST_TIME':'','QUERY_STRING':'','DOCUMENT_ROOT':'','HTTP_ACCEPT':'','HTTP_ACCEPT_CHARSET':'','HTTP_ACCEPT_ENCODING':'','HTTP_ACCEPT_LANGUAGE':'','HTTP_CONNECTION':'','HTTP_POST':'','HTTP_REFERER':'','HTTP_USER_AGENT':'','HTTPS':'','REMOTE_ADDR':'','REMOTE_HOST':'','REMOTE_PORT':'','SCRIPT_FILENAME':'','SERVER_ADMIN':'','SERVER_PORT':'','SERVER_SIGNATURE':'','PATH_TRANSLATED':'','SCRIPT_NAME':'','REQUEST_URI':'','PHP_AUTH_DIGEST':'','PHP_AUTH_USER':'','PHP_AUTH_PW':'','AUTH_TYPE':'','and':'','or':'','xor':'','__FILE__':'','exception':'','__LINE__':'','as':'','break':'','case':'','class':'','const':'','continue':'','declare':'','default':'','do':'','echo':'','else':'','elseif':'','enddeclare':'','endfor':'','endforeach':'','endif':'','endswitch':'','endwhile':'','extends':'','for':'','foreach':'','function':'','global':'','if':'','new':' " One giant hash of all built-in function, class, interface and constant grouped by extension
let php_builtin = {'functions':{},'classes':{},'interfaces':{},'constants':{},}
let php_builtin['functions']['math']={'abs(':'mixed $number | number','acos(':'float $arg | float','acosh(':'float $arg | float','asin(':'float $arg | float','asinh(':'float $arg | float','atan(':'float $arg | float','atan2(':'float $y, float $x | float','atanh(':'float $arg | float','base_convert(':'string $number, int $frombase, int $tobase | string','bindec(':'string $binary_string | number','ceil(':'float $value | float','cos(':'float $arg | float','cosh(':'float $arg | float','decbin(':'int $number | string','dechex(':'int $number | string','decoct(':'int $number | string','deg2rad(':'float $number | float','exp(':'float $arg | float','expm1(':'float $arg | float','floor(':'float $value | float','fmod(':'float $x, float $y | float','getrandmax(':'void | int','hexdec(':'string $hex_string | number','hypot(':'float $x, float $y | float','is_finite(':'float $val | bool','is_infinite(':'float $val | bool','is_nan(':'float $val | bool','lcg_value(':'void | float','log(':'float $arg [, float $base = M_E] | flo let php_builtin['functions']['strings']={'addcslashes(':'string $str, string $charlist | string','addslashes(':'string $str | string','bin2hex(':'string $str | string','chop(':'chop — Alias of rtrim()','chr(':'int $ascii | string','chunk_split(':'string $body [, int $chunklen = 76 [, string $end = "\r\n"]] | string','convert_cyr_string(':'string $str, string $from, string $to | string','convert_uudecode(':'string $data | string','convert_uuencode(':'string $data | string','count_chars(':'string $string [, int $mode = 0] | mixed','crc32(':'string $str | int','crypt(':'string $str [, string $salt] | string','echo(':'string $arg1 [, string $...] | void','explode(':'string $delimiter, string $string [, int $limit] | array','fprintf(':'resource $handle, string $format [, mixed $args [, mixed $...]] | int','get_html_translation_table(':'[ int $table = HTML_SPECIALCHARS [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ''UTF-8'']]] | array','hebrev(':'string $hebrew_text [, int $max_chars_per_line = 0 let php_builtin['functions']['apache']={'apache_child_terminate(':'void | bool','apache_get_modules(':'void | array','apache_get_version(':'void | string','apache_getenv(':'string $variable [, bool $walk_to_top = false] | string','apache_lookup_uri(':'string $filename | object','apache_note(':'string $note_name [, string $note_value = ""] | string','apache_request_headers(':'void | array','apache_reset_timeout(':'void | bool','apache_response_headers(':'void | array','apache_setenv(':'string $variable, string $value [, bool $walk_to_top = false] | bool','getallheaders(':'void | array','virtual(':'string $filename | bool',}
let php_builtin['functions']['arrays']={'array_change_key_case(':'array $array [, int $case = CASE_LOWER] | array','array_chunk(':'array $array, int $size [, bool $preserve_keys = false] | array','array_column(':'array $array, mixed $column_key [, mixed $index_key = null] | array','array_combine(':'array $keys, array $values | array','array_count_values(':'array $array | array','array_diff_assoc(':'array $array1, array $array2 [, array $...] | array','array_diff_key(':'array $array1, array $array2 [, array $...] | array','array_diff_uassoc(':'array $array1, array $array2 [, array $... [, callable $key_compare_func]] | array','array_diff_ukey(':'array $array1, array $array2 [, array $... [, callable $key_compare_func]] | array','array_diff(':'array $array1, array $array2 [, array $...] | array','array_fill_keys(':'array $keys, mixed $value | array','array_fill(':'int $start_index, int $num, mixed $value | array','array_filter(':'array $array [, callable $callback] | array','array_flip(':'array $array | array', let php_builtin['functions']['php_options_info']={'assert_options(':'int $what [, mixed $value] | mixed','assert(':'mixed $assertion [, string $description] | bool','cli_get_process_title(':'void | string','cli_set_process_title(':'string $title | bool','dl(':'string $library | bool','extension_loaded(':'string $name | bool','gc_collect_cycles(':'void | int','gc_disable(':'void | void','gc_enable(':'void | void','gc_enabled(':'void | bool','get_cfg_var(':'string $option | string','get_current_user(':'void | string','get_defined_constants(':'[ bool $categorize = false] | array','get_extension_funcs(':'string $module_name | array','get_include_path(':'void | string','get_included_files(':'void | array','get_loaded_extensions(':'[ bool $zend_extensions = false] | array','get_magic_quotes_gpc(':'void | bool','get_magic_quotes_runtime(':'void | bool','get_required_files(':'get_required_files — Alias of get_included_files()','getenv(':'string $varname | string','getlastmod(':'void | int','getmygid(':'void | int', let php_builtin['functions']['classes_objects']={'__autoload(':'string $class | void','call_user_method_array(':'string $method_name, object &$obj, array $params | mixed','call_user_method(':'string $method_name, object &$obj [, mixed $parameter [, mixed $...]] | mixed','class_alias(':'string $original, string $alias [, bool $autoload = TRUE] | bool','class_exists(':'string $class_name [, bool $autoload = true] | bool','get_called_class(':'void | string','get_class_methods(':'mixed $class_name | array','get_class_vars(':'string $class_name | array','get_class(':'[ object $object = NULL] | string','get_declared_classes(':'void | array','get_declared_interfaces(':'void | array','get_declared_traits(':'void | array','get_object_vars(':'object $object | array','get_parent_class(':'[ mixed $object] | string','interface_exists(':'string $interface_name [, bool $autoload = true] | bool','is_a(':'object $object, string $class_name [, bool $allow_string = FALSE] | bool','is_subclass_of(':'mixed $object, string $class_ let php_builtin['functions']['urls']={'base64_decode(':'string $data [, bool $strict = false] | string','base64_encode(':'string $data | string','get_headers(':'string $url [, int $format = 0] | array','get_meta_tags(':'string $filename [, bool $use_include_path = false] | array','http_build_query(':'mixed $query_data [, string $numeric_prefix [, string $arg_separator [, int $enc_type = PHP_QUERY_RFC1738]]] | string','parse_url(':'string $url [, int $component = -1] | mixed','rawurldecode(':'string $str | string','rawurlencode(':'string $str | string','urldecode(':'string $str | string','urlencode(':'string $str | string',}
let php_builtin['functions']['filesystem']={'basename(':'string $path [, string $suffix] | string','chgrp(':'string $filename, mixed $group | bool','chmod(':'string $filename, int $mode | bool','chown(':'string $filename, mixed $user | bool','clearstatcache(':'[ bool $clear_realpath_cache = false [, string $filename]] | void','copy(':'string $source, string $dest [, resource $context] | bool','dirname(':'string $path | string','disk_free_space(':'string $directory | float','disk_total_space(':'string $directory | float','diskfreespace(':'diskfreespace — Alias of disk_free_space()','fclose(':'resource $handle | bool','feof(':'resource $handle | bool','fflush(':'resource $handle | bool','fgetc(':'resource $handle | string','fgetcsv(':'resource $handle [, int $length = 0 [, string $delimiter = '','' [, string $enclosure = ''"'' [, string $escape = ''\\'']]]] | array','fgets(':'resource $handle [, int $length] | string','fgetss(':'resource $handle [, int $length [, string $allowable_tags]] | string','file_exist let php_builtin['functions']['variable_handling']={'boolval(':'mixed $var | boolean','debug_zval_dump(':'mixed $variable [, mixed $...] | void','doubleval(':'doubleval — Alias of floatval()','empty(':'mixed $var | bool','floatval(':'mixed $var | float','get_defined_vars(':'void | array','get_resource_type(':'resource $handle | string','gettype(':'mixed $var | string','import_request_variables(':'string $types [, string $prefix] | bool','intval(':'mixed $var [, int $base = 10] | int','is_array(':'mixed $var | bool','is_bool(':'mixed $var | bool','is_callable(':'callable $name [, bool $syntax_only = false [, string &$callable_name]] | bool','is_double(':'is_double — Alias of is_float()','is_float(':'mixed $var | bool','is_int(':'mixed $var | bool','is_integer(':'is_integer — Alias of is_int()','is_long(':'is_long — Alias of is_int()','is_null(':'mixed $var | bool','is_numeric(':'mixed $var | bool','is_object(':'mixed $var | bool','is_real(':'is_real — Alias of is_float()','is_resource(':'mixed $var | let php_builtin['functions']['calendar']={'cal_days_in_month(':'int $calendar, int $month, int $year | int','cal_from_jd(':'int $jd, int $calendar | array','cal_info(':'[ int $calendar = -1] | array','cal_to_jd(':'int $calendar, int $month, int $day, int $year | int','easter_date(':'[ int $year] | int','easter_days(':'[ int $year [, int $method = CAL_EASTER_DEFAULT]] | int','frenchtojd(':'int $month, int $day, int $year | int','gregoriantojd(':'int $month, int $day, int $year | int','jddayofweek(':'int $julianday [, int $mode = CAL_DOW_DAYNO] | mixed','jdmonthname(':'int $julianday, int $mode | string','jdtofrench(':'int $juliandaycount | string','jdtogregorian(':'int $julianday | string','jdtojewish(':'int $juliandaycount [, bool $hebrew = false [, int $fl = 0]] | string','jdtojulian(':'int $julianday | string','jdtounix(':'int $jday | int','jewishtojd(':'int $month, int $day, int $year | int','juliantojd(':'int $month, int $day, int $year | int','unixtojd(':'[ int $timestamp = time()] | int',}
let php_builtin['functions']['function_handling']={'call_user_func_array(':'callable $callback, array $param_arr | mixed','call_user_func(':'callable $callback [, mixed $parameter [, mixed $...]] | mixed','create_function(':'string $args, string $code | string','forward_static_call_array(':'callable $function, array $parameters | mixed','forward_static_call(':'callable $function [, mixed $parameter [, mixed $...]] | mixed','func_get_arg(':'int $arg_num | mixed','func_get_args(':'void | array','func_num_args(':'void | int','function_exists(':'string $function_name | bool','get_defined_functions(':'void | array','register_shutdown_function(':'callable $callback [, mixed $parameter [, mixed $...]] | void','register_tick_function(':'callable $function [, mixed $arg [, mixed $...]] | bool','unregister_tick_function(':'string $function_name | void',}
let php_builtin['functions']['directories']={'chdir(':'string $directory | bool','chroot(':'string $directory | bool','closedir(':'[ resource $dir_handle] | void','dir(':'string $directory [, resource $context] | Directory','getcwd(':'void | string','opendir(':'string $path [, resource $context] | resource','readdir(':'[ resource $dir_handle] | string','rewinddir(':'[ resource $dir_handle] | void','scandir(':'string $directory [, int $sorting_order = SCANDIR_SORT_ASCENDING [, resource $context]] | array',}
let php_builtin['functions']['date_time']={'checkdate(':'int $month, int $day, int $year | bool','date_default_timezone_get(':'void | string','date_default_timezone_set(':'string $timezone_identifier | bool','date_parse_from_format(':'string $format, string $date | array','date_parse(':'string $date | array','date_sun_info(':'int $time, float $latitude, float $longitude | array','date_sunrise(':'int $timestamp [, int $format = SUNFUNCS_RET_STRING [, float $latitude = ini_get("date.default_latitude") [, float $longitude = ini_get("date.default_longitude") [, float $zenith = ini_get("date.sunrise_zenith") [, float $gmt_offset = 0]]]]] | mixed','date_sunset(':'int $timestamp [, int $format = SUNFUNCS_RET_STRING [, float $latitude = ini_get("date.default_latitude") [, float $longitude = ini_get("date.default_longitude") [, float $zenith = ini_get("date.sunset_zenith") [, float $gmt_offset = 0]]]]] | mixed','date(':'string $format [, int $timestamp = time()] | string','getdate(':'[ int $timestamp = time()] | array let php_builtin['functions']['network']={'checkdnsrr(':'string $host [, string $type = "MX"] | bool','closelog(':'void | bool','define_syslog_variables(':'void | void','dns_get_record(':'string $hostname [, int $type = DNS_ANY [, array &$authns [, array &$addtl [, bool &$raw = false]]]] | array','fsockopen(':'string $hostname [, int $port = -1 [, int &$errno [, string &$errstr [, float $timeout = ini_get("default_socket_timeout")]]]] | resource','gethostbyaddr(':'string $ip_address | string','gethostbyname(':'string $hostname | string','gethostbynamel(':'string $hostname | array','gethostname(':'void | string','getmxrr(':'string $hostname, array &$mxhosts [, array &$weight] | bool','getprotobyname(':'string $name | int','getprotobynumber(':'int $number | string','getservbyname(':'string $service, string $protocol | int','getservbyport(':'int $port, string $protocol | string','header_register_callback(':'callable $callback | bool','header_remove(':'[ string $name] | void','header(':'string $string [, bool $rep let php_builtin['functions']['spl']={'class_implements(':'mixed $class [, bool $autoload = true] | array','class_parents(':'mixed $class [, bool $autoload = true] | array','class_uses(':'mixed $class [, bool $autoload = true] | array','iterator_apply(':'Traversable $iterator, callable $function [, array $args] | int','iterator_count(':'Traversable $iterator | int','iterator_to_array(':'Traversable $iterator [, bool $use_keys = true] | array','spl_autoload_call(':'string $class_name | void','spl_autoload_extensions(':'[ string $file_extensions] | string','spl_autoload_functions(':'void | array','spl_autoload_register(':'[ callable $autoload_function [, bool $throw = true [, bool $prepend = false]]] | bool','spl_autoload_unregister(':'mixed $autoload_function | bool','spl_autoload(':'string $class_name [, string $file_extensions = spl_autoload_extensions()] | void','spl_classes(':'void | array','spl_object_hash(':'object $obj | string',}
let php_builtin['functions']['misc']={'connection_aborted(':'void | int','connection_status(':'void | int','connection_timeout(':'void | int','constant(':'string $name | mixed','define(':'string $name, mixed $value [, bool $case_insensitive = false] | bool','defined(':'string $name | bool','eval(':'string $code | mixed','exit(':'[ string $status] | void','get_browser(':'[ string $user_agent [, bool $return_array = false]] | mixed','__halt_compiler(':'void | void','highlight_file(':'string $filename [, bool $return = false] | mixed','highlight_string(':'string $str [, bool $return = false] | mixed','ignore_user_abort(':'[ string $value] | int','pack(':'string $format [, mixed $args [, mixed $...]] | string','php_check_syntax(':'string $filename [, string &$error_message] | bool','php_strip_whitespace(':'string $filename | string','show_source(':'show_source — Alias of highlight_file()','sleep(':'int $seconds | int','sys_getloadavg(':'void | array','time_nanosleep(':'int $seconds, int $nanoseconds | mixed','t let php_builtin['functions']['curl']={'curl_close(':'resource $ch | void','curl_copy_handle(':'resource $ch | resource','curl_errno(':'resource $ch | int','curl_error(':'resource $ch | string','curl_escape(':'resource $ch, string $str | string','curl_exec(':'resource $ch | mixed','curl_getinfo(':'resource $ch [, int $opt = 0] | mixed','curl_init(':'[ string $url = NULL] | resource','curl_multi_add_handle(':'resource $mh, resource $ch | int','curl_multi_close(':'resource $mh | void','curl_multi_exec(':'resource $mh, int &$still_running | int','curl_multi_getcontent(':'resource $ch | string','curl_multi_info_read(':'resource $mh [, int &$msgs_in_queue = NULL] | array','curl_multi_init(':'void | resource','curl_multi_remove_handle(':'resource $mh, resource $ch | int','curl_multi_select(':'resource $mh [, float $timeout = 1.0] | int','curl_multi_setopt(':'resource $mh, int $option, mixed $value | bool','curl_multi_strerror(':'int $errornum | string','curl_pause(':'resource $ch, int $bitmask | int','curl_reset(':' let php_builtin['functions']['error_handling']={'debug_backtrace(':'[ int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT [, int $limit = 0]] | array','debug_print_backtrace(':'[ int $options = 0 [, int $limit = 0]] | void','error_get_last(':'void | array','error_log(':'string $message [, int $message_type = 0 [, string $destination [, string $extra_headers]]] | bool','error_reporting(':'[ int $level] | int','restore_error_handler(':'void | bool','restore_exception_handler(':'void | bool','set_error_handler(':'callable $error_handler [, int $error_types = E_ALL | E_STRICT] | mixed','set_exception_handler(':'callable $exception_handler | callable','trigger_error(':'string $error_msg [, int $error_type = E_USER_NOTICE] | bool',}
let php_builtin['functions']['dom']={'dom_import_simplexml(':'SimpleXMLElement $node | DOMElement',}
let php_builtin['functions']['program_execution']={'escapeshellarg(':'string $arg | string','escapeshellcmd(':'string $command | string','exec(':'string $command [, array &$output [, int &$return_var]] | string','passthru(':'string $command [, int &$return_var] | void','proc_close(':'resource $process | int','proc_get_status(':'resource $process | array','proc_nice(':'int $increment | bool','proc_open(':'string $cmd, array $descriptorspec, array &$pipes [, string $cwd [, array $env [, array $other_options]]] | resource','proc_terminate(':'resource $process [, int $signal = 15] | bool','shell_exec(':'string $cmd | string','system(':'string $command [, int &$return_var] | string',}
let php_builtin['functions']['mail']={'ezmlm_hash(':'string $addr | int','mail(':'string $to, string $subject, string $message [, string $additional_headers [, string $additional_parameters]] | bool',}
let php_builtin['functions']['fastcgi_process_manager']={'fastcgi_finish_request(':'void | boolean',}
let php_builtin['functions']['filter']={'filter_has_var(':'int $type, string $variable_name | bool','filter_id(':'string $filtername | int','filter_input_array(':'int $type [, mixed $definition [, bool $add_empty = true]] | mixed','filter_input(':'int $type, string $variable_name [, int $filter = FILTER_DEFAULT [, mixed $options]] | mixed','filter_list(':'void | array','filter_var_array(':'array $data [, mixed $definition [, bool $add_empty = true]] | mixed','filter_var(':'mixed $variable [, int $filter = FILTER_DEFAULT [, mixed $options]] | mixed',}
let php_builtin['functions']['fileinfo']={'finfo_buffer(':'resource $finfo [, string $string = NULL [, int $options = FILEINFO_NONE [, resource $context = NULL]]] | string','finfo_close(':'resource $finfo | bool','finfo_file(':'resource $finfo [, string $file_name = NULL [, int $options = FILEINFO_NONE [, resource $context = NULL]]] | string','finfo_open(':'[ int $options = FILEINFO_NONE [, string $magic_file = NULL]] | resource','finfo_set_flags(':'resource $finfo, int $options | bool','mime_content_type(':'string $filename | string',}
let php_builtin['functions']['output_control']={'flush(':'void | void','ob_clean(':'void | void','ob_end_clean(':'void | bool','ob_end_flush(':'void | bool','ob_flush(':'void | void','ob_get_clean(':'void | string','ob_get_contents(':'void | string','ob_get_flush(':'void | string','ob_get_length(':'void | int','ob_get_level(':'void | int','ob_get_status(':'[ bool $full_status = FALSE] | array','ob_gzhandler(':'string $buffer, int $mode | string','ob_implicit_flush(':'[ int $flag = true] | void','ob_list_handlers(':'void | array','ob_start(':'[ callable $output_callback = NULL [, int $chunk_size = 0 [, int $flags = PHP_OUTPUT_HANDLER_STDFLAGS]]] | bool','output_add_rewrite_var(':'string $name, string $value | bool','output_reset_rewrite_vars(':'void | bool',}
let php_builtin['functions']['gd']={'gd_info(':'void | array','getimagesize(':'string $filename [, array &$imageinfo] | array','getimagesizefromstring(':'string $imagedata [, array &$imageinfo] | array','image_type_to_extension(':'int $imagetype [, bool $include_dot = TRUE] | string','image_type_to_mime_type(':'int $imagetype | string','image2wbmp(':'resource $image [, string $filename [, int $threshold]] | bool','imageaffine(':'resource $image, array $affine [, array $clip] | resource','imageaffinematrixconcat(':'array $m1, array $m2 | array','imageaffinematrixget(':'int $type [, mixed $options] | array','imagealphablending(':'resource $image, bool $blendmode | bool','imageantialias(':'resource $image, bool $enabled | bool','imagearc(':'resource $image, int $cx, int $cy, int $width, int $height, int $start, int $end, int $color | bool','imagechar(':'resource $image, int $font, int $x, int $y, string $c, int $color | bool','imagecharup(':'resource $image, int $font, int $x, int $y, string $c, int $color | boo let php_builtin['functions']['iconv']={'iconv_get_encoding(':'[ string $type = "all"] | mixed','iconv_mime_decode_headers(':'string $encoded_headers [, int $mode = 0 [, string $charset = ini_get("iconv.internal_encoding")]] | array','iconv_mime_decode(':'string $encoded_header [, int $mode = 0 [, string $charset = ini_get("iconv.internal_encoding")]] | string','iconv_mime_encode(':'string $field_name, string $field_value [, array $preferences = NULL] | string','iconv_set_encoding(':'string $type, string $charset | bool','iconv_strlen(':'string $str [, string $charset = ini_get("iconv.internal_encoding")] | int','iconv_strpos(':'string $haystack, string $needle [, int $offset = 0 [, string $charset = ini_get("iconv.internal_encoding")]] | int','iconv_strrpos(':'string $haystack, string $needle [, string $charset = ini_get("iconv.internal_encoding")] | int','iconv_substr(':'string $str, int $offset [, int $length = iconv_strlen($str, $charset) [, string $charset = ini_get("iconv.internal_encoding")]] | string', let php_builtin['functions']['json']={'json_decode(':'string $json [, bool $assoc = false [, int $depth = 512 [, int $options = 0]]] | mixed','json_encode(':'mixed $value [, int $options = 0 [, int $depth = 512]] | string','json_last_error_msg(':'void | string','json_last_error(':'void | int',}
let php_builtin['functions']['libxml']={'libxml_clear_errors(':'void | void','libxml_disable_entity_loader(':'[ bool $disable = true] | bool','libxml_get_errors(':'void | array','libxml_get_last_error(':'void | LibXMLError','libxml_set_external_entity_loader(':'callable $resolver_function | void','libxml_set_streams_context(':'resource $streams_context | void','libxml_use_internal_errors(':'[ bool $use_errors = false] | bool',}
let php_builtin['functions']['multibyte_string']={'mb_check_encoding(':'[ string $var = NULL [, string $encoding = mb_internal_encoding()]] | bool','mb_convert_case(':'string $str, int $mode [, string $encoding = mb_internal_encoding()] | string','mb_convert_encoding(':'string $str, string $to_encoding [, mixed $from_encoding = mb_internal_encoding()] | string','mb_convert_kana(':'string $str [, string $option = "KV" [, string $encoding = mb_internal_encoding()]] | string','mb_convert_variables(':'string $to_encoding, mixed $from_encoding, mixed &$vars [, mixed &$...] | string','mb_decode_mimeheader(':'string $str | string','mb_decode_numericentity(':'string $str, array $convmap [, string $encoding = mb_internal_encoding()] | string','mb_detect_encoding(':'string $str [, mixed $encoding_list = mb_detect_order() [, bool $strict = false]] | string','mb_detect_order(':'[ mixed $encoding_list = mb_detect_order()] | mixed','mb_encode_mimeheader(':'string $str [, string $charset = mb_internal_encoding() [, string $ let php_builtin['functions']['mssql']={'mssql_bind(':'resource $stmt, string $param_name, mixed &$var, int $type [, bool $is_output = false [, bool $is_null = false [, int $maxlen = -1]]] | bool','mssql_close(':'[ resource $link_identifier] | bool','mssql_connect(':'[ string $servername [, string $username [, string $password [, bool $new_link = false]]]] | resource','mssql_data_seek(':'resource $result_identifier, int $row_number | bool','mssql_execute(':'resource $stmt [, bool $skip_results = false] | mixed','mssql_fetch_array(':'resource $result [, int $result_type = MSSQL_BOTH] | array','mssql_fetch_assoc(':'resource $result_id | array','mssql_fetch_batch(':'resource $result | int','mssql_fetch_field(':'resource $result [, int $field_offset = -1] | object','mssql_fetch_object(':'resource $result | object','mssql_fetch_row(':'resource $result | array','mssql_field_length(':'resource $result [, int $offset = -1] | int','mssql_field_name(':'resource $result [, int $offset = -1] | string','mssql_field_seek(': let php_builtin['functions']['mysql']={'mysql_affected_rows(':'[ resource $link_identifier = NULL] | int','mysql_client_encoding(':'[ resource $link_identifier = NULL] | string','mysql_close(':'[ resource $link_identifier = NULL] | bool','mysql_connect(':'[ string $server = ini_get("mysql.default_host") [, string $username = ini_get("mysql.default_user") [, string $password = ini_get("mysql.default_password") [, bool $new_link = false [, int $client_flags = 0]]]]] | resource','mysql_create_db(':'string $database_name [, resource $link_identifier = NULL] | bool','mysql_data_seek(':'resource $result, int $row_number | bool','mysql_db_name(':'resource $result, int $row [, mixed $field = NULL] | string','mysql_db_query(':'string $database, string $query [, resource $link_identifier = NULL] | resource','mysql_drop_db(':'string $database_name [, resource $link_identifier = NULL] | bool','mysql_errno(':'[ resource $link_identifier = NULL] | int','mysql_error(':'[ resource $link_identifier = NULL] | string','mysql_es let php_builtin['functions']['mysqli']={'mysqli_disable_reads_from_master(':'mysqli $link | bool','mysqli_disable_rpl_parse(':'mysqli $link | bool','mysqli_enable_reads_from_master(':'mysqli $link | bool','mysqli_enable_rpl_parse(':'mysqli $link | bool','mysqli_get_cache_stats(':'void | array','mysqli_master_query(':'mysqli $link, string $query | bool','mysqli_rpl_parse_enabled(':'mysqli $link | int','mysqli_rpl_probe(':'mysqli $link | bool','mysqli_slave_query(':'mysqli $link, string $query | bool',}
let php_builtin['functions']['password_hashing']={'password_get_info(':'string $hash | array','password_hash(':'string $password, integer $algo [, array $options] | string','password_needs_rehash(':'string $hash, string $algo [, string $options] | boolean','password_verify(':'string $password, string $hash | boolean',}
let php_builtin['functions']['postgresql']={'pg_affected_rows(':'resource $result | int','pg_cancel_query(':'resource $connection | bool','pg_client_encoding(':'[ resource $connection] | string','pg_close(':'[ resource $connection] | bool','pg_connect(':'string $connection_string [, int $connect_type] | resource','pg_connection_busy(':'resource $connection | bool','pg_connection_reset(':'resource $connection | bool','pg_connection_status(':'resource $connection | int','pg_convert(':'resource $connection, string $table_name, array $assoc_array [, int $options = 0] | array','pg_copy_from(':'resource $connection, string $table_name, array $rows [, string $delimiter [, string $null_as]] | bool','pg_copy_to(':'resource $connection, string $table_name [, string $delimiter [, string $null_as]] | array','pg_dbname(':'[ resource $connection] | string','pg_delete(':'resource $connection, string $table_name, array $assoc_array [, int $options = PGSQL_DML_EXEC] | mixed','pg_end_copy(':'[ resource $connection] | bool','pg let php_builtin['functions']['pcre']={'preg_filter(':'mixed $pattern, mixed $replacement, mixed $subject [, int $limit = -1 [, int &$count]] | mixed','preg_grep(':'string $pattern, array $input [, int $flags = 0] | array','preg_last_error(':'void | int','preg_match_all(':'string $pattern, string $subject [, array &$matches [, int $flags = PREG_PATTERN_ORDER [, int $offset = 0]]] | int','preg_match(':'string $pattern, string $subject [, array &$matches [, int $flags = 0 [, int $offset = 0]]] | int','preg_quote(':'string $str [, string $delimiter = NULL] | string','preg_replace_callback(':'mixed $pattern, callable $callback, mixed $subject [, int $limit = -1 [, int &$count]] | mixed','preg_replace(':'mixed $pattern, mixed $replacement, mixed $subject [, int $limit = -1 [, int &$count]] | mixed','preg_split(':'string $pattern, string $subject [, int $limit = -1 [, int $flags = 0]] | array',}
let php_builtin['functions']['sessions']={'session_cache_expire(':'[ string $new_cache_expire] | int','session_cache_limiter(':'[ string $cache_limiter] | string','session_commit(':'session_commit — Alias of session_write_close()','session_decode(':'string $data | bool','session_destroy(':'void | bool','session_encode(':'void | string','session_get_cookie_params(':'void | array','session_id(':'[ string $id] | string','session_is_registered(':'string $name | bool','session_module_name(':'[ string $module] | string','session_name(':'[ string $name] | string','session_regenerate_id(':'[ bool $delete_old_session = false] | bool','session_register_shutdown(':'void | void','session_register(':'mixed $name [, mixed $...] | bool','session_save_path(':'[ string $path] | string','session_set_cookie_params(':'int $lifetime [, string $path [, string $domain [, bool $secure = false [, bool $httponly = false]]]] | void','session_set_save_handler(':'callable $open, callable $close, callable $read, callable $write, callabl let php_builtin['functions']['streams']={'set_socket_blocking(':'set_socket_blocking — Alias of stream_set_blocking()','stream_bucket_append(':'resource $brigade, resource $bucket | void','stream_bucket_make_writeable(':'resource $brigade | object','stream_bucket_new(':'resource $stream, string $buffer | object','stream_bucket_prepend(':'resource $brigade, resource $bucket | void','stream_context_create(':'[ array $options [, array $params]] | resource','stream_context_get_default(':'[ array $options] | resource','stream_context_get_options(':'resource $stream_or_context | array','stream_context_get_params(':'resource $stream_or_context | array','stream_context_set_default(':'array $options | resource','stream_context_set_option(':'resource $stream_or_context, string $wrapper, string $option, mixed $value | bool','stream_context_set_params(':'resource $stream_or_context, array $params | bool','stream_copy_to_stream(':'resource $source, resource $dest [, int $maxlength = -1 [, int $offset = 0]] | int','strea let php_builtin['functions']['simplexml']={'simplexml_import_dom(':'DOMNode $node [, string $class_name = "SimpleXMLElement"] | SimpleXMLElement','simplexml_load_file(':'string $filename [, string $class_name = "SimpleXMLElement" [, int $options = 0 [, string $ns = "" [, bool $is_prefix = false]]]] | SimpleXMLElement','simplexml_load_string(':'string $data [, string $class_name = "SimpleXMLElement" [, int $options = 0 [, string $ns = "" [, bool $is_prefix = false]]]] | SimpleXMLElement',}
let php_builtin['functions']['xmlwriter']={'xmlwriter_end_attribute(':'resource $xmlwriter | bool','xmlwriter_end_cdata(':'resource $xmlwriter | bool','xmlwriter_end_comment(':'resource $xmlwriter | bool','xmlwriter_end_document(':'resource $xmlwriter | bool','xmlwriter_end_dtd_attlist(':'resource $xmlwriter | bool','xmlwriter_end_dtd_element(':'resource $xmlwriter | bool','xmlwriter_end_dtd_entity(':'resource $xmlwriter | bool','xmlwriter_end_dtd(':'resource $xmlwriter | bool','xmlwriter_end_element(':'resource $xmlwriter | bool','xmlwriter_end_pi(':'resource $xmlwriter | bool','xmlwriter_flush(':'resource $xmlwriter [, bool $empty = true] | mixed','xmlwriter_full_end_element(':'resource $xmlwriter | bool','xmlwriter_open_memory(':'void | resource','xmlwriter_open_uri(':'string $uri | resource','xmlwriter_output_memory(':'resource $xmlwriter [, bool $flush = true] | string','xmlwriter_set_indent_string(':'resource $xmlwriter, string $indentString | bool','xmlwriter_set_indent(':'resource $xmlwriter, bool $in let php_builtin['functions']['zip']={'zip_close(':'resource $zip | void','zip_entry_close(':'resource $zip_entry | bool','zip_entry_compressedsize(':'resource $zip_entry | int','zip_entry_compressionmethod(':'resource $zip_entry | string','zip_entry_filesize(':'resource $zip_entry | int','zip_entry_name(':'resource $zip_entry | string','zip_entry_open(':'resource $zip, resource $zip_entry [, string $mode] | bool','zip_entry_read(':'resource $zip_entry [, int $length = 1024] | string','zip_open(':'string $filename | resource','zip_read(':'resource $zip | resource',}
let php_builtin['classes']['spl']={'appenditerator':{'name':'AppendIterator','methods':{'__construct':{'signature':'Traversable $iterator','return_type':''},'append':{'signature':'Iterator $iterator | void','return_type':'void'},'current':{'signature':'void | mixed','return_type':'mixed'},'getArrayIterator':{'signature':'void | void','return_type':'void'},'getInnerIterator':{'signature':'void | Traversable','return_type':'Traversable'},'getIteratorIndex':{'signature':'void | int','return_type':'int'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | bool','return_type':'bool'},},},'arrayiterator':{'name':'ArrayIterator','methods':{'append':{'signature':'mixed $value | void','return_type':'void'},'asort':{'signature':'void | void','return_type':'void'},'__construct':{'signature':'[ mixed $array = array() [, int $flags = 0]]','return_type':''},'count':{'signatur let php_builtin['classes']['predefined_interfaces_and_classes']={'closure':{'name':'Closure','methods':{'__construct':{'signature':'void','return_type':''},'bindTo':{'signature':'object $newthis [, mixed $newscope = ''static''] | Closure','return_type':'Closure'},},'static_methods':{'bind':{'signature':'Closure $closure, object $newthis [, mixed $newscope = ''static''] | Closure','return_type':'Closure'},},},'generator':{'name':'Generator','methods':{'current':{'signature':'void | mixed','return_type':'mixed'},'key':{'signature':'void | mixed','return_type':'mixed'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'send':{'signature':'mixed $value | mixed','return_type':'mixed'},'throw':{'signature':'Exception $exception | mixed','return_type':'mixed'},'valid':{'signature':'void | bool','return_type':'bool'},'__wakeup':{'signature':'void | void','return_type':'void'},},},}
let php_builtin['classes']['curl']={'curlfile':{'name':'CURLFile','properties': {'name':{'initializer':'','type':''},'mime':{'initializer':'','type':''},'postname':{'initializer':'','type':''},},'methods':{'__construct':{'signature':'string $filename [, string $mimetype [, string $postname]]','return_type':''},'getFilename':{'signature':'void | string','return_type':'string'},'getMimeType':{'signature':'void | string','return_type':'string'},'getPostFilename':{'signature':'void | string','return_type':'string'},'setMimeType':{'signature':'string $mime | void','return_type':'void'},'setPostFilename':{'signature':'string $postname | void','return_type':'void'},'__wakeup':{'signature':'void | void','return_type':'void'},},},}
let php_builtin['classes']['date_time']={'dateinterval':{'name':'DateInterval','properties': {'y':{'initializer':'','type':'integer'},'m':{'initializer':'','type':'integer'},'d':{'initializer':'','type':'integer'},'h':{'initializer':'','type':'integer'},'i':{'initializer':'','type':'integer'},'s':{'initializer':'','type':'integer'},'invert':{'initializer':'','type':'integer'},'days':{'initializer':'','type':'mixed'},},'methods':{'__construct':{'signature':'string $interval_spec','return_type':''},'format':{'signature':'string $format | string','return_type':'string'},},'static_methods':{'createFromDateString':{'signature':'string $time | DateInterval','return_type':'DateInterval'},},},'dateperiod':{'name':'DatePeriod','constants':{'EXCLUDE_START_DATE':'1',},'methods':{'__construct':{'signature':'string $isostr [, int $options]','return_type':''},},},'datetime':{'name':'DateTime','constants':{'ATOM':'"Y-m-d\TH:i:sP"','COOKIE':'"l, d-M-y H:i:s T"','ISO8601':'"Y-m-d\TH:i:sO"','RFC822':'"D, d M y H:i:s O"','RFC85 let php_builtin['classes']['directories']={'directory':{'name':'Directory','properties': {'path':{'initializer':'','type':'string'},'handle':{'initializer':'','type':'resource'},},'methods':{'close':{'signature':'[ resource $dir_handle] | void','return_type':'void'},'read':{'signature':'[ resource $dir_handle] | string','return_type':'string'},'rewind':{'signature':'[ resource $dir_handle] | void','return_type':'void'},},},}
let php_builtin['classes']['dom']={'domattr':{'name':'DOMAttr','properties': {'name':{'initializer':'','type':'string'},'ownerElement':{'initializer':'','type':'DOMElement'},'schemaTypeInfo':{'initializer':'','type':'bool'},'specified':{'initializer':'','type':'bool'},'value':{'initializer':'','type':'string'},},'methods':{'__construct':{'signature':'string $name [, string $value]','return_type':''},'isId':{'signature':'void | bool','return_type':'bool'},'appendChild':{'signature':'DOMNode $newnode | DOMNode','return_type':'DOMNode'},'C14N':{'signature':'[ bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | string','return_type':'string'},'C14NFile':{'signature':'string $uri [, bool $exclusive [, bool $with_comments [, array $xpath [, array $ns_prefixes]]]] | int','return_type':'int'},'cloneNode':{'signature':'[ bool $deep] | DOMNode','return_type':'DOMNode'},'getLineNo':{'signature':'void | int','return_type':'int'},'getNodePath':{'signature':'void | string','return_type':'stri let php_builtin['classes']['predefined_exceptions']={'errorexception':{'name':'ErrorException','properties': {'severity':{'initializer':'','type':'int'},'message':{'initializer':'','type':'string'},'code':{'initializer':'','type':'int'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},'methods':{'__construct':{'signature':'[ string $message = "" [, int $code = 0 [, int $severity = 1 [, string $filename = __FILE__ [, int $lineno = __LINE__ [, Exception $previous = NULL]]]]]]','return_type':''},'getSeverity':{'signature':'void | int','return_type':'int'},'getMessage':{'signature':'void | string','return_type':'string'},'getPrevious':{'signature':'void | Exception','return_type':'Exception'},'getCode':{'signature':'void | mixed','return_type':'mixed'},'getFile':{'signature':'void | string','return_type':'string'},'getLine':{'signature':'void | int','return_type':'int'},'getTrace':{'signature':'void | array','return_type':'array'},'getTraceAsString':{'signature':'void | string',' let php_builtin['classes']['libxml']={'libxmlerror':{'name':'libXMLError','properties': {'level':{'initializer':'','type':'int'},'code':{'initializer':'','type':'int'},'column':{'initializer':'','type':'int'},'message':{'initializer':'','type':'string'},'file':{'initializer':'','type':'string'},'line':{'initializer':'','type':'int'},},},}
let php_builtin['classes']['mysqli']={'mysqli_driver':{'name':'mysqli_driver','properties': {'client_info':{'initializer':'','type':'string'},'client_version':{'initializer':'','type':'string'},'driver_version':{'initializer':'','type':'string'},'embedded':{'initializer':'','type':'string'},'reconnect':{'initializer':'','type':'bool'},'report_mode':{'initializer':'','type':'int'},},'methods':{'embedded_server_end':{'signature':'void | void','return_type':'void'},'embedded_server_start':{'signature':'bool $start, array $arguments, array $groups | bool','return_type':'bool'},},},'mysqli_result':{'name':'mysqli_result','properties': {'current_field':{'initializer':'','type':'int'},'field_count':{'initializer':'','type':'int'},'lengths':{'initializer':'','type':'array'},'num_rows':{'initializer':'','type':'int'},},'methods':{'data_seek':{'signature':'int $offset | bool','return_type':'bool'},'fetch_all':{'signature':'[ int $resulttype = MYSQLI_NUM] | mixed','return_type':'mixed'},'fetch_array':{'signature':'[ int let php_builtin['classes']['pdo']={'pdo':{'name':'PDO','constants':{'FETCH_ORI_ABS':'','ATTR_PERSISTENT':'','CLASS_CONSTANT':'','ATTR_DEFAULT_FETCH_MODE':'','FETCH_PROPS_LATE':'','FETCH_KEY_PAIR':'','FB_ATTR_DATE_FORMAT':'','FB_ATTR_TIME_FORMAT':'','FB_ATTR_TIMESTAMP_FORMAT':'','MYSQL_ATTR_READ_DEFAULT_FILE':'','MYSQL_ATTR_READ_DEFAULT_GROUP':'','ATTR_AUTOCOMMIT':'','FOURD_ATTR_CHARSET':'','FOURD_ATTR_PREFERRED_IMAGE_TYPES':'','PARAM_LOB':'','PARAM_BOOL':'','PARAM_NULL':'','PARAM_INT':'','PARAM_STR':'','PARAM_STMT':'','PARAM_INPUT_OUTPUT':'','FETCH_LAZY':'','FETCH_ASSOC':'','FETCH_NAMED':'','FETCH_NUM':'','FETCH_BOTH':'','FETCH_OBJ':'','FETCH_BOUND':'','FETCH_COLUMN':'','FETCH_CLASS':'','FETCH_INTO':'','FETCH_FUNC':'','FETCH_GROUP':'','FETCH_UNIQUE':'','FETCH_CLASSTYPE':'','FETCH_SERIALIZE':'','ATTR_PREFETCH':'','ATTR_TIMEOUT':'','ATTR_ERRMODE':'','ATTR_SERVER_VERSION':'','ATTR_CLIENT_VERSION':'','ATTR_SERVER_INFO':'','ATTR_CONNECTION_STATUS':'','ATTR_CASE':'','ATTR_CURSOR_NAME':'','ATTR_CURSOR':'','CURSOR_FW let php_builtin['classes']['phar']={'phar':{'name':'Phar','methods':{'addEmptyDir':{'signature':'string $dirname | void','return_type':'void'},'addFile':{'signature':'string $file [, string $localname] | void','return_type':'void'},'addFromString':{'signature':'string $localname, string $contents | void','return_type':'void'},'buildFromDirectory':{'signature':'string $base_dir [, string $regex] | array','return_type':'array'},'buildFromIterator':{'signature':'Iterator $iter [, string $base_directory] | array','return_type':'array'},'compress':{'signature':'int $compression [, string $extension] | object','return_type':'object'},'compressAllFilesBZIP2':{'signature':'void | bool','return_type':'bool'},'compressAllFilesGZ':{'signature':'void | bool','return_type':'bool'},'compressFiles':{'signature':'int $compression | void','return_type':'void'},'__construct':{'signature':'string $fname [, int $flags [, string $alias]]','return_type':''},'convertToData':{'signature':'[ int $format = 9021976 [, int $compression let php_builtin['classes']['streams']={'php_user_filter':{'name':'php_user_filter','properties': {'filtername':{'initializer':'','type':''},'params':{'initializer':'','type':''},},'methods':{'filter':{'signature':'resource $in, resource $out, int &$consumed, bool $closing | int','return_type':'int'},'onClose':{'signature':'void | void','return_type':'void'},'onCreate':{'signature':'void | bool','return_type':'bool'},},},}
let php_builtin['classes']['sessions']={'sessionhandler':{'name':'SessionHandler','methods':{'close':{'signature':'void | bool','return_type':'bool'},'destroy':{'signature':'string $session_id | bool','return_type':'bool'},'gc':{'signature':'int $maxlifetime | bool','return_type':'bool'},'open':{'signature':'string $save_path, string $session_id | bool','return_type':'bool'},'read':{'signature':'string $session_id | string','return_type':'string'},'write':{'signature':'string $session_id, string $session_data | bool','return_type':'bool'},},},'sessionhandlerinterface':{'name':'SessionHandlerInterface','methods':{'close':{'signature':'void | bool','return_type':'bool'},'destroy':{'signature':'string $session_id | bool','return_type':'bool'},'gc':{'signature':'string $maxlifetime | bool','return_type':'bool'},'open':{'signature':'string $save_path, string $name | bool','return_type':'bool'},'read':{'signature':'string $session_id | string','return_type':'string'},'write':{'signature':'string $session_id, string let php_builtin['classes']['simplexml']={'simplexmlelement':{'name':'SimpleXMLElement','methods':{'__construct':{'signature':'string $data [, int $options = 0 [, bool $data_is_url = false [, string $ns = "" [, bool $is_prefix = false]]]]','return_type':''},'addAttribute':{'signature':'string $name [, string $value [, string $namespace]] | void','return_type':'void'},'addChild':{'signature':'string $name [, string $value [, string $namespace]] | SimpleXMLElement','return_type':'SimpleXMLElement'},'asXML':{'signature':'[ string $filename] | mixed','return_type':'mixed'},'attributes':{'signature':'[ string $ns = NULL [, bool $is_prefix = false]] | SimpleXMLElement','return_type':'SimpleXMLElement'},'children':{'signature':'[ string $ns [, bool $is_prefix = false]] | SimpleXMLElement','return_type':'SimpleXMLElement'},'count':{'signature':'void | int','return_type':'int'},'getDocNamespaces':{'signature':'[ bool $recursive = false [, bool $from_root = true]] | array','return_type':'array'},'getName':{'signature':' let php_builtin['classes']['spl_types']={'splbool':{'name':'SplBool','constants':{'__default':'false','false':'false','true':'true',},'methods':{'getConstList':{'signature':'[ bool $include_default = false] | array','return_type':'array'},},},'splenum':{'name':'SplEnum','constants':{'__default':'null',},'methods':{'getConstList':{'signature':'[ bool $include_default = false] | array','return_type':'array'},'__construct':{'signature':'[ mixed $initial_value [, bool $strict]]','return_type':''},},},'splfloat':{'name':'SplFloat','constants':{'__default':'0',},'methods':{'__construct':{'signature':'[ mixed $initial_value [, bool $strict]]','return_type':''},},},'splint':{'name':'SplInt','constants':{'__default':'0',},'methods':{'__construct':{'signature':'[ mixed $initial_value [, bool $strict]]','return_type':''},},},'splstring':{'name':'SplString','constants':{'__default':'0',},'methods':{'__construct':{'signature':'[ mixed $initial_value [, bool $strict]]','return_type':''},},},'spltype':{'name':'SplType','con let php_builtin['classes']['xmlreader']={'xmlreader':{'name':'XMLReader','constants':{'NONE':'0','ELEMENT':'1','ATTRIBUTE':'2','TEXT':'3','CDATA':'4','ENTITY_REF':'5','ENTITY':'6','PI':'7','COMMENT':'8','DOC':'9','DOC_TYPE':'10','DOC_FRAGMENT':'11','NOTATION':'12','WHITESPACE':'13','SIGNIFICANT_WHITESPACE':'14','END_ELEMENT':'15','END_ENTITY':'16','XML_DECLARATION':'17','LOADDTD':'1','DEFAULTATTRS':'2','VALIDATE':'3','SUBST_ENTITIES':'4',},'properties': {'attributeCount':{'initializer':'','type':'int'},'baseURI':{'initializer':'','type':'string'},'depth':{'initializer':'','type':'int'},'hasAttributes':{'initializer':'','type':'bool'},'hasValue':{'initializer':'','type':'bool'},'isDefault':{'initializer':'','type':'bool'},'isEmptyElement':{'initializer':'','type':'bool'},'localName':{'initializer':'','type':'string'},'name':{'initializer':'','type':'string'},'namespaceURI':{'initializer':'','type':'string'},'nodeType':{'initializer':'','type':'int'},'prefix':{'initializer':'','type':'string'},'value':{'initial let php_builtin['classes']['xmlwriter'] = {'xmlwriter':{'name':'XMLWriter','methods':{'endAttribute':{'signature':'void | bool','return_type':'bool'},'endCData':{'signature':'void | bool','return_type':'bool'},'endComment':{'signature':'void | bool','return_type':'bool'},'endDocument':{'signature':'void | bool','return_type':'bool'},'endDTDAttlist':{'signature':'void | bool','return_type':'bool'},'endDTDElement':{'signature':'void | bool','return_type':'bool'},'endDTDEntity':{'signature':'void | bool','return_type':'bool'},'endDTD':{'signature':'void | bool','return_type':'bool'},'endElement':{'signature':'void | bool','return_type':'bool'},'endPI':{'signature':'void | bool','return_type':'bool'},'flush':{'signature':'[bool $empty = true] | bool','return_type':'bool'},'fullEndElement':{'signature':'void | bool','return_type':'bool'},'openMemory':{'signature':'void | bool','return_type':'bool'},'openURI':{'signature':'string $uri | bool','return_type':'bool'},'outputMemory':{'signature':'[bool $flush = true] | let php_builtin['classes']['zip']={'ziparchive':{'name':'ZipArchive','properties': {'status':{'initializer':'','type':'int'},'statusSys':{'initializer':'','type':'int'},'numFiles':{'initializer':'','type':'int'},'filename':{'initializer':'','type':'string'},'comment':{'initializer':'','type':'string'},},'methods':{'addEmptyDir':{'signature':'string $dirname | bool','return_type':'bool'},'addFile':{'signature':'string $filename [, string $localname = NULL [, int $start = 0 [, int $length = 0]]] | bool','return_type':'bool'},'addFromString':{'signature':'string $localname, string $contents | bool','return_type':'bool'},'addGlob':{'signature':'string $pattern [, int $flags = 0 [, array $options = array()]] | bool','return_type':'bool'},'addPattern':{'signature':'string $pattern [, string $path = ''.'' [, array $options = array()]] | bool','return_type':'bool'},'close':{'signature':'void | bool','return_type':'bool'},'deleteIndex':{'signature':'int $index | bool','return_type':'bool'},'deleteName':{'signature':'s let php_builtin['interfaces']['predefined_interfaces_and_classes']={'arrayaccess':{'name':'ArrayAccess','methods':{'offsetExists':{'signature':'mixed $offset | boolean','return_type':'boolean'},'offsetGet':{'signature':'mixed $offset | mixed','return_type':'mixed'},'offsetSet':{'signature':'mixed $offset, mixed $value | void','return_type':'void'},'offsetUnset':{'signature':'mixed $offset | void','return_type':'void'},},},'iterator':{'name':'Iterator','methods':{'current':{'signature':'void | mixed','return_type':'mixed'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | boolean','return_type':'boolean'},},},'iteratoraggregate':{'name':'IteratorAggregate','methods':{'getIterator':{'signature':'void | Traversable','return_type':'Traversable'},},},'serializable':{'name':'Serializable','methods':{'serialize':{'signature':'void | string','return_type':'string'},'u let php_builtin['interfaces']['spl']={'countable':{'name':'Countable','methods':{'count':{'signature':'void | int','return_type':'int'},},},'outeriterator':{'name':'OuterIterator','methods':{'getInnerIterator':{'signature':'void | Iterator','return_type':'Iterator'},'current':{'signature':'void | mixed','return_type':'mixed'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'signature':'void | boolean','return_type':'boolean'},},},'recursiveiterator':{'name':'RecursiveIterator','methods':{'getChildren':{'signature':'void | RecursiveIterator','return_type':'RecursiveIterator'},'hasChildren':{'signature':'void | bool','return_type':'bool'},'current':{'signature':'void | mixed','return_type':'mixed'},'key':{'signature':'void | scalar','return_type':'scalar'},'next':{'signature':'void | void','return_type':'void'},'rewind':{'signature':'void | void','return_type':'void'},'valid':{'s let php_builtin['interfaces']['date_time']={'datetimeinterface':{'name':'DateTimeInterface','methods':{'diff':{'signature':'DateTimeInterface $datetime2 [, bool $absolute = false] | DateInterval','return_type':'DateInterval'},'format':{'signature':'string $format | string','return_type':'string'},'getOffset':{'signature':'void | int','return_type':'int'},'getTimestamp':{'signature':'void | int','return_type':'int'},'getTimezone':{'signature':'void | DateTimeZone','return_type':'DateTimeZone'},'__wakeup':{'signature':'void','return_type':''},},},}
let php_builtin['interfaces']['json']={'jsonserializable':{'name':'JsonSerializable','methods':{'jsonSerialize':{'signature':'void | mixed','return_type':'mixed'},},},}
let php_builtin['constants']['common']={'TRUE':'','FALSE':'','NULL':'','E_NOTICE':'','E_DEPRECATED':'','E_RECOVERABLE_ERROR':'','E_ALL':'','E_STRICT':'','E_WARNING':'','E_ERROR':'','E_PARSE':'','E_CORE_ERROR':'','E_CORE_WARNING':'','E_COMPILE_ERROR':'','E_COMPILE_WARNING':'','E_USER_ERROR':'','E_USER_WARNING':'','E_USER_NOTICE':'','E_USER_DEPRECATED':'','__COMPILER_HALT_OFFSET__':'','__FILE__':'','__LINE__':'','__DIR__':'','__FUNCTION__':'','__CLASS__':'','__TRAIT__':'','__METHOD__':'','__NAMESPACE__':'',}
let php_builtin['constants']['arrays']={'CASE_LOWER':'','CASE_UPPER':'','SORT_ASC':'','SORT_DESC':'','SORT_REGULAR':'','SORT_NUMERIC':'','SORT_STRING':'','SORT_LOCALE_STRING':'','SORT_NATURAL':'','SORT_FLAG_CASE':'','COUNT_NORMAL':'','COUNT_RECURSIVE':'','EXTR_OVERWRITE':'','EXTR_SKIP':'','EXTR_PREFIX_SAME':'','EXTR_PREFIX_ALL':'','EXTR_PREFIX_INVALID':'','EXTR_PREFIX_IF_EXISTS':'','EXTR_IF_EXISTS':'','EXTR_REFS':'',}
let php_builtin['constants']['calendar']={'CAL_GREGORIAN':'','CAL_JULIAN':'','CAL_JEWISH':'','CAL_FRENCH':'','CAL_NUM_CALS':'','CAL_DOW_DAYNO':'','CAL_DOW_SHORT':'','CAL_DOW_LONG':'','CAL_MONTH_GREGORIAN_SHORT':'','CAL_MONTH_GREGORIAN_LONG':'','CAL_MONTH_JULIAN_SHORT':'','CAL_MONTH_JULIAN_LONG':'','CAL_MONTH_JEWISH':'','CAL_MONTH_FRENCH':'','CAL_EASTER_DEFAULT':'','CAL_EASTER_ROMAN':'','CAL_EASTER_ALWAYS_GREGORIAN':'','CAL_EASTER_ALWAYS_JULIAN':'','CAL_JEWISH_ADD_ALAFIM_GERESH':'','CAL_JEWISH_ADD_ALAFIM':'','CAL_JEWISH_ADD_GERESHAYIM':'',}
let php_builtin['constants']['curl']={'CURLOPT_POSTFIELDS':'','CURLOPT_CAINFO':'','CURLOPT_AUTOREFERER':'','CURLOPT_COOKIESESSION':'','CURLOPT_DNS_USE_GLOBAL_CACHE':'','CURLOPT_DNS_CACHE_TIMEOUT':'','CURLOPT_FTP_SSL':'','CURLFTPSSL_TRY':'','CURLFTPSSL_ALL':'','CURLFTPSSL_CONTROL':'','CURLFTPSSL_NONE':'','CURLOPT_PRIVATE':'','CURLOPT_FTPSSLAUTH':'','CURLOPT_PORT':'','CURLOPT_FILE':'','CURLOPT_INFILE':'','CURLOPT_INFILESIZE':'','CURLOPT_URL':'','CURLOPT_PROXY':'','CURLOPT_VERBOSE':'','CURLOPT_HEADER':'','CURLOPT_HTTPHEADER':'','CURLOPT_NOPROGRESS':'','CURLOPT_NOBODY':'','CURLOPT_FAILONERROR':'','CURLOPT_UPLOAD':'','CURLOPT_POST':'','CURLOPT_FTPLISTONLY':'','CURLOPT_FTPAPPEND':'','CURLOPT_FTP_CREATE_MISSING_DIRS':'','CURLOPT_NETRC':'','CURLOPT_FOLLOWLOCATION':'','CURLOPT_FTPASCII':'','CURLOPT_PUT':'','CURLOPT_MUTE':'','CURLOPT_USERPWD':'','CURLOPT_PROXYUSERPWD':'','CURLOPT_RANGE':'','CURLOPT_TIMEOUT':'','CURLOPT_TIMEOUT_MS':'','CURLOPT_TCP_NODELAY':'','CURLOPT_PROGRESSFUNCTION':'','CURLOPT_REFERER':'','CURLOPT_U let php_builtin['constants']['date_time']={'DATE_ATOM':'','DATE_COOKIE':'','DATE_ISO8601':'','DATE_RFC822':'','DATE_RFC850':'','DATE_RFC1036':'','DATE_RFC1123':'','DATE_RFC2822':'','DATE_RFC3339':'','DATE_RSS':'','DATE_W3C':'','SUNFUNCS_RET_TIMESTAMP':'','SUNFUNCS_RET_STRING':'','SUNFUNCS_RET_DOUBLE':'','LC_TIME':'',}
let php_builtin['constants']['libxml']={'LIBXML_ERR_WARNING':'','LIBXML_ERR_ERROR':'','LIBXML_ERR_FATAL':'','LIBXML_NONET':'','LIBXML_COMPACT':'','LIBXML_DTDATTR':'','LIBXML_DTDLOAD':'','LIBXML_DTDVALID':'','LIBXML_HTML_NOIMPLIED':'','LIBXML_HTML_NODEFDTD':'','LIBXML_NOBLANKS':'','LIBXML_NOCDATA':'','LIBXML_NOEMPTYTAG':'','LIBXML_NOENT':'','LIBXML_NOERROR':'','LIBXML_NOWARNING':'','LIBXML_NOXMLDECL':'','LIBXML_NSCLEAN':'','LIBXML_PARSEHUGE':'','LIBXML_PEDANTIC':'','LIBXML_XINCLUDE':'','LIBXML_ERR_NONE':'','LIBXML_VERSION':'','LIBXML_DOTTED_VERSION':'','LIBXML_SCHEMA_CREATE':'',}
let php_builtin['constants']['mysqli']={'MYSQLI_REPORT_OFF':'','MYSQLI_REPORT_ALL':'','MYSQLI_REPORT_STRICT':'','MYSQLI_REPORT_ERROR':'','MYSQLI_REPORT_INDEX':'','MYSQLI_ASSOC':'','MYSQLI_NUM':'','MYSQLI_BOTH':'','PHP_INT_MAX':'','MYSQLI_READ_DEFAULT_GROUP':'','MYSQLI_READ_DEFAULT_FILE':'','MYSQLI_OPT_CONNECT_TIMEOUT':'','MYSQLI_OPT_LOCAL_INFILE':'','MYSQLI_INIT_COMMAND':'','MYSQLI_CLIENT_SSL':'','MYSQLI_CLIENT_COMPRESS':'','MYSQLI_CLIENT_INTERACTIVE':'','MYSQLI_CLIENT_IGNORE_SPACE':'','MYSQLI_CLIENT_NO_SCHEMA':'','MYSQLI_CLIENT_MULTI_QUERIES':'','MYSQLI_STORE_RESULT':'','MYSQLI_USE_RESULT':'','MYSQLI_NOT_NULL_FLAG':'','MYSQLI_PRI_KEY_FLAG':'','MYSQLI_UNIQUE_KEY_FLAG':'','MYSQLI_MULTIPLE_KEY_FLAG':'','MYSQLI_BLOB_FLAG':'','MYSQLI_UNSIGNED_FLAG':'','MYSQLI_ZEROFILL_FLAG':'','MYSQLI_AUTO_INCREMENT_FLAG':'','MYSQLI_TIMESTAMP_FLAG':'','MYSQLI_SET_FLAG':'','MYSQLI_NUM_FLAG':'','MYSQLI_PART_KEY_FLAG':'','MYSQLI_GROUP_FLAG':'','MYSQLI_TYPE_DECIMAL':'','MYSQLI_TYPE_NEWDECIMAL':'','MYSQLI_TYPE_BIT':'','MYSQLI_TYPE_TIN let php_builtin['constants']['spl']={'READ_AHEAD':'','MIT_NEED_ALL':'','MIT_KEYS_ASSOC':'','CALL_TOSTRING':'','CATCH_GET_CHILD':'','RIT_LEAVES_ONLY':'','LOCK_SH':'','LOCK_EX':'','LOCK_UN':'','LOCK_NB':'','SEEK_SET':'','SEEK_CUR':'','SEEK_END':'','PHP_INT_MAX':'',}
let php_builtin['constants']['unknow']={'PHP_INI_ALL':'','PHP_INI_PERDIR':'','PHP_INI_SYSTEM':'','PHP_INI_USER':'','COUNTER_FLAG_PERSIST':'','COUNTER_FLAG_SAVE':'','COUNTER_FLAG_NO_OVERWRITE':'','COUNTER_META_NAME':'','COUNTER_META_IS_PERISTENT':'','COUNTER_RESET_NEVER':'','COUNTER_RESET_PER_LOAD':'','COUNTER_RESET_PER_REQUEST':'','PDO_PLACEHOLDER_NAMED':'','PDO_PLACEHOLDER_POSITIONAL':'','PDO_PLACEHOLDER_NONE':'','PDO_CASE_NATURAL':'','PDO_CASE_UPPER':'','PDO_CASE_LOWER':'','PDO_ATTR_CASE':'','PHP_COUNTER_API':'','PHPAPI':'','COMPILE_DL_COUNTER':'','ZEND_GET_MODULE':'','HAVE_COUNTER':'','COUNTER_G':'','TSRMLS_DC':'','TSRMLS_FETCH':'','STANDARD_MODULE_HEADER':'','STANDARD_MODULE_HEADER_EX':'','STANDARD_MODULE_PROPERTIES':'','STANDARD_MODULE_PROPERTIES_EX':'','ZEND_MODULE_API_NO':'','ZEND_DEBUG':'','USING_ZTS':'','NO_VERSION_YET':'','NO_MODULE_GLOBALS':'','PHP_MODULE_GLOBALS':'','IGNORE_PATH':'','USE_PATH':'','IGNORE_URL':'','IGNORE_URL_WIN':'','ENFORCE_SAFE_MODE':'','REPORT_ERRORS':'','STREAM_MUST_SEEK':'','S let php_builtin['constants']['directories']={'DIRECTORY_SEPARATOR':'','PATH_SEPARATOR':'','SCANDIR_SORT_ASCENDING':'','SCANDIR_SORT_DESCENDING':'','SCANDIR_SORT_NONE':'',}
let php_builtin['constants']['dom']={'XML_ELEMENT_NODE':'','XML_ATTRIBUTE_NODE':'','XML_TEXT_NODE':'','XML_CDATA_SECTION_NODE':'','XML_ENTITY_REF_NODE':'','XML_ENTITY_NODE':'','XML_PI_NODE':'','XML_COMMENT_NODE':'','XML_DOCUMENT_NODE':'','XML_DOCUMENT_TYPE_NODE':'','XML_DOCUMENT_FRAG_NODE':'','XML_NOTATION_NODE':'','XML_HTML_DOCUMENT_NODE':'','XML_DTD_NODE':'','XML_ELEMENT_DECL_NODE':'','XML_ATTRIBUTE_DECL_NODE':'','XML_ENTITY_DECL_NODE':'','XML_NAMESPACE_DECL_NODE':'','XML_ATTRIBUTE_CDATA':'','XML_ATTRIBUTE_ID':'','XML_ATTRIBUTE_IDREF':'','XML_ATTRIBUTE_IDREFS':'','XML_ATTRIBUTE_ENTITY':'','XML_ATTRIBUTE_NMTOKEN':'','XML_ATTRIBUTE_NMTOKENS':'','XML_ATTRIBUTE_ENUMERATION':'','XML_ATTRIBUTE_NOTATION':'','DOM_PHP_ERR':'','DOM_INDEX_SIZE_ERR':'','DOMSTRING_SIZE_ERR':'','DOM_HIERARCHY_REQUEST_ERR':'','DOM_WRONG_DOCUMENT_ERR':'','DOM_INVALID_CHARACTER_ERR':'','DOM_NO_DATA_ALLOWED_ERR':'','DOM_NO_MODIFICATION_ALLOWED_ERR':'','DOM_NOT_FOUND_ERR':'','DOM_NOT_SUPPORTED_ERR':'','DOM_INUSE_ATTRIBUTE_ERR':'','DOM_INVALID let php_builtin['constants']['command_line_usage']={'PHP_SAPI':'','STDIN':'','STDOUT':'','STDERR':'',}
let php_builtin['constants']['handling_file_uploads']={'UPLOAD_ERR_OK':'','UPLOAD_ERR_INI_SIZE':'','UPLOAD_ERR_FORM_SIZE':'','UPLOAD_ERR_PARTIAL':'','UPLOAD_ERR_NO_FILE':'','UPLOAD_ERR_NO_TMP_DIR':'','UPLOAD_ERR_CANT_WRITE':'','UPLOAD_ERR_EXTENSION':'',}
let php_builtin['constants']['fileinfo']={'FILEINFO_NONE':'','FILEINFO_SYMLINK':'','FILEINFO_MIME_TYPE':'','FILEINFO_MIME_ENCODING':'','FILEINFO_MIME':'','FILEINFO_COMPRESS':'','FILEINFO_DEVICES':'','FILEINFO_CONTINUE':'','FILEINFO_PRESERVE_ATIME':'','FILEINFO_RAW':'',}
let php_builtin['constants']['filesystem']={'SEEK_SET':'','SEEK_CUR':'','SEEK_END':'','LOCK_SH':'','LOCK_EX':'','LOCK_UN':'','LOCK_NB':'','GLOB_BRACE':'','GLOB_ONLYDIR':'','GLOB_MARK':'','GLOB_NOSORT':'','GLOB_NOCHECK':'','GLOB_NOESCAPE':'','GLOB_AVAILABLE_FLAGS':'','PATHINFO_DIRNAME':'','PATHINFO_BASENAME':'','PATHINFO_EXTENSION':'','PATHINFO_FILENAME':'','FILE_USE_INCLUDE_PATH':'','FILE_NO_DEFAULT_CONTEXT':'','FILE_APPEND':'','FILE_IGNORE_NEW_LINES':'','FILE_SKIP_EMPTY_LINES':'','FILE_BINARY':'','FILE_TEXT':'','INI_SCANNER_NORMAL':'','INI_SCANNER_RAW':'','FNM_NOESCAPE':'','FNM_PATHNAME':'','FNM_PERIOD':'','FNM_CASEFOLD':'','GLOB_ERR':'',}
let php_builtin['constants']['filter']={'FILTER_FLAG_NO_ENCODE_QUOTES':'','INPUT_POST':'','INPUT_GET':'','INPUT_COOKIE':'','INPUT_ENV':'','INPUT_SERVER':'','INPUT_SESSION':'','INPUT_REQUEST':'','FILTER_FLAG_NONE':'','FILTER_REQUIRE_SCALAR':'','FILTER_REQUIRE_ARRAY':'','FILTER_FORCE_ARRAY':'','FILTER_NULL_ON_FAILURE':'','FILTER_VALIDATE_INT':'','FILTER_VALIDATE_BOOLEAN':'','FILTER_VALIDATE_FLOAT':'','FILTER_VALIDATE_REGEXP':'','FILTER_VALIDATE_URL':'','FILTER_VALIDATE_EMAIL':'','FILTER_VALIDATE_IP':'','FILTER_DEFAULT':'','FILTER_UNSAFE_RAW':'','FILTER_SANITIZE_STRING':'','FILTER_SANITIZE_STRIPPED':'','FILTER_SANITIZE_ENCODED':'','FILTER_SANITIZE_SPECIAL_CHARS':'','FILTER_SANITIZE_EMAIL':'','FILTER_SANITIZE_URL':'','FILTER_SANITIZE_NUMBER_INT':'','FILTER_SANITIZE_NUMBER_FLOAT':'','FILTER_SANITIZE_MAGIC_QUOTES':'','FILTER_CALLBACK':'','FILTER_FLAG_ALLOW_OCTAL':'','FILTER_FLAG_ALLOW_HEX':'','FILTER_FLAG_STRIP_LOW':'','FILTER_FLAG_STRIP_HIGH':'','FILTER_FLAG_ENCODE_LOW':'','FILTER_FLAG_ENCODE_HIGH':'','FILTER_FLAG let php_builtin['constants']['php_options_info']={'ASSERT_CALLBACK':'','RUSAGE_CHILDREN':'','PHP_SAPI':'','PHP_OS':'','CREDITS_DOCS':'','CREDITS_GENERAL':'','CREDITS_GROUP':'','CREDITS_MODULES':'','CREDITS_FULLPAGE':'','PHP_VERSION_ID':'','PHP_VERSION':'','PATH_SEPARATOR':'','CREDITS_SAPI':'','CREDITS_QA':'','CREDITS_ALL':'','INFO_GENERAL':'','INFO_CREDITS':'','INFO_CONFIGURATION':'','INFO_MODULES':'','INFO_ENVIRONMENT':'','INFO_VARIABLES':'','INFO_LICENSE':'','INFO_ALL':'','ASSERT_ACTIVE':'','ASSERT_BAIL':'','ASSERT_WARNING':'','ASSERT_QUIET_EVAL':'','PHP_WINDOWS_VERSION_MAJOR':'','PHP_WINDOWS_VERSION_MINOR':'','PHP_WINDOWS_VERSION_BUILD':'','PHP_WINDOWS_VERSION_PLATFORM':'','PHP_WINDOWS_VERSION_SP_MAJOR':'','PHP_WINDOWS_VERSION_SP_MINOR':'','PHP_WINDOWS_VERSION_SUITEMASK':'','PHP_WINDOWS_VERSION_PRODUCTTYPE':'','PHP_WINDOWS_NT_DOMAIN_CONTROLLER':'','PHP_WINDOWS_NT_SERVER':'','PHP_WINDOWS_NT_WORKSTATION':'',}
let php_builtin['constants']['strings']={'CRYPT_SALT_LENGTH':'','CRYPT_STD_DES':'','CRYPT_EXT_DES':'','CRYPT_MD5':'','CRYPT_BLOWFISH':'','CRYPT_SHA256':'','CRYPT_SHA512':'','HTML_ENTITIES':'','HTML_SPECIALCHARS':'','ENT_COMPAT':'','ENT_QUOTES':'','ENT_NOQUOTES':'','ENT_HTML401':'','ENT_XML1':'','ENT_XHTML':'','ENT_HTML5':'','ENT_IGNORE':'','ENT_SUBSTITUTE':'','ENT_DISALLOWED':'','CHAR_MAX':'','LC_MONETARY':'','AM_STR':'','PM_STR':'','D_T_FMT':'','D_FMT':'','T_FMT':'','T_FMT_AMPM':'','ERA':'','ERA_YEAR':'','ERA_D_T_FMT':'','ERA_D_FMT':'','ERA_T_FMT':'','INT_CURR_SYMBOL':'','CURRENCY_SYMBOL':'','CRNCYSTR':'','MON_DECIMAL_POINT':'','MON_THOUSANDS_SEP':'','MON_GROUPING':'','POSITIVE_SIGN':'','NEGATIVE_SIGN':'','INT_FRAC_DIGITS':'','FRAC_DIGITS':'','P_CS_PRECEDES':'','P_SEP_BY_SPACE':'','N_CS_PRECEDES':'','N_SEP_BY_SPACE':'','P_SIGN_POSN':'','N_SIGN_POSN':'','DECIMAL_POINT':'','RADIXCHAR':'','THOUSANDS_SEP':'','THOUSEP':'','GROUPING':'','YESEXPR':'','NOEXPR':'','YESSTR':'','NOSTR':'','CODESET':'','LC_ALL':'','LC_C let php_builtin['constants']['error_handling']={'DEBUG_BACKTRACE_PROVIDE_OBJECT':'','DEBUG_BACKTRACE_IGNORE_ARGS':'',}
let php_builtin['constants']['math']={'PHP_INT_MAX':'','M_PI':'','PHP_ROUND_HALF_UP':'','PHP_ROUND_HALF_DOWN':'','PHP_ROUND_HALF_EVEN':'','PHP_ROUND_HALF_ODD':'','M_E':'','M_LOG2E':'','M_LOG10E':'','M_LN2':'','M_LN10':'','M_PI_2':'','M_PI_4':'','M_1_PI':'','M_2_PI':'','M_SQRTPI':'','M_2_SQRTPI':'','M_SQRT2':'','M_SQRT3':'','M_SQRT1_2':'','M_LNPI':'','M_EULER':'','NAN':'','INF':'',}
let php_builtin['constants']['network']={'LOG_EMERG':'','LOG_ALERT':'','LOG_CRIT':'','LOG_ERR':'','LOG_WARNING':'','LOG_NOTICE':'','LOG_INFO':'','LOG_DEBUG':'','LOG_KERN':'','LOG_USER':'','LOG_MAIL':'','LOG_DAEMON':'','LOG_AUTH':'','LOG_SYSLOG':'','LOG_LPR':'','LOG_NEWS':'','LOG_CRON':'','LOG_AUTHPRIV':'','LOG_LOCAL0':'','LOG_LOCAL1':'','LOG_LOCAL2':'','LOG_LOCAL3':'','LOG_LOCAL4':'','LOG_LOCAL5':'','LOG_LOCAL6':'','LOG_LOCAL7':'','LOG_PID':'','LOG_CONS':'','LOG_ODELAY':'','LOG_NDELAY':'','LOG_NOWAIT':'','LOG_PERROR':'','DNS_A':'','DNS_CNAME':'','DNS_HINFO':'','DNS_MX':'','DNS_NS':'','DNS_PTR':'','DNS_SOA':'','DNS_TXT':'','DNS_AAAA':'','DNS_SRV':'','DNS_NAPTR':'','DNS_A6':'','DNS_ALL':'','DNS_ANY':'','SID':'','LOG_UUCP':'',}
let php_builtin['constants']['urls']={'PHP_QUERY_RFC1738':'','PHP_QUERY_RFC3986':'','PHP_URL_SCHEME':'','PHP_URL_HOST':'','PHP_URL_PORT':'','PHP_URL_USER':'','PHP_URL_PASS':'','PHP_URL_PATH':'','PHP_URL_QUERY':'','PHP_URL_FRAGMENT':'',}
let php_builtin['constants']['gd']={'IMAGETYPE_GIF':'','IMAGETYPE_JPEG':'','IMAGETYPE_PNG':'','IMAGETYPE_SWF':'','IMAGETYPE_PSD':'','IMAGETYPE_BMP':'','IMAGETYPE_TIFF_II':'','IMAGETYPE_TIFF_MM':'','IMAGETYPE_JPC':'','IMAGETYPE_JP2':'','IMAGETYPE_JPX':'','IMAGETYPE_JB2':'','IMAGETYPE_SWC':'','IMAGETYPE_IFF':'','IMAGETYPE_WBMP':'','IMAGETYPE_XBM':'','IMAGETYPE_ICO':'','IMG_CROP_THRESHOLD':'','IMG_ARC_PIE':'','IMG_ARC_CHORD':'','IMG_ARC_NOFILL':'','IMG_ARC_EDGED':'','IMG_FILTER_NEGATE':'','IMG_FILTER_GRAYSCALE':'','IMG_FILTER_BRIGHTNESS':'','IMG_FILTER_CONTRAST':'','IMG_FILTER_COLORIZE':'','IMG_FILTER_EDGEDETECT':'','IMG_FILTER_EMBOSS':'','IMG_FILTER_GAUSSIAN_BLUR':'','IMG_FILTER_SELECTIVE_BLUR':'','IMG_FILTER_MEAN_REMOVAL':'','IMG_FILTER_SMOOTH':'','IMG_FILTER_PIXELATE':'','IMG_FLIP_HORIZONTAL':'','IMG_FLIP_VERTICAL':'','IMG_FLIP_BOTH':'','IMG_GD2_RAW':'','IMG_GD2_COMPRESSED':'','IMG_EFFECT_REPLACE':'','IMG_EFFECT_ALPHABLEND':'','IMG_EFFECT_NORMAL':'','IMG_EFFECT_OVERLAY':'','PNG_NO_FILTER':'','PNG_ALL_FILTERS' let php_builtin['constants']['json']={'JSON_BIGINT_AS_STRING':'','JSON_HEX_QUOT':'','JSON_HEX_TAG':'','JSON_HEX_AMP':'','JSON_HEX_APOS':'','JSON_NUMERIC_CHECK':'','JSON_PRETTY_PRINT':'','JSON_UNESCAPED_SLASHES':'','JSON_FORCE_OBJECT':'','JSON_UNESCAPED_UNICODE':'','JSON_ERROR_NONE':'','JSON_ERROR_DEPTH':'','JSON_ERROR_STATE_MISMATCH':'','JSON_ERROR_CTRL_CHAR':'','JSON_ERROR_SYNTAX':'','JSON_ERROR_UTF8':'','JSON_ERROR_RECURSION':'','JSON_ERROR_INF_OR_NAN':'','NAN':'','INF':'','JSON_ERROR_UNSUPPORTED_TYPE':'','JSON_PARTIAL_OUTPUT_ON_ERROR':'',}
let php_builtin['constants']['multibyte_string']={'MB_CASE_UPPER':'','MB_CASE_LOWER':'','MB_CASE_TITLE':'','MB_OVERLOAD_MAIL':'','MB_OVERLOAD_STRING':'','MB_OVERLOAD_REGEX':'',}
let php_builtin['constants']['mssql']={'SQLTEXT':'','SQLVARCHAR':'','SQLCHAR':'','SQLINT1':'','SQLINT2':'','SQLINT4':'','SQLBIT':'','SQLFLT4':'','SQLFLT8':'','SQLFLTN':'','MSSQL_ASSOC':'','MSSQL_NUM':'','MSSQL_BOTH':'',}
let php_builtin['constants']['mysql']={'MYSQL_CLIENT_SSL':'','MYSQL_CLIENT_COMPRESS':'','MYSQL_CLIENT_IGNORE_SPACE':'','MYSQL_CLIENT_INTERACTIVE':'','MYSQL_ASSOC':'','MYSQL_NUM':'','MYSQL_BOTH':'','MYSQL_PORT':'',}
let php_builtin['constants']['output_control']={'PHP_OUTPUT_HANDLER_STDFLAGS':'','PHP_OUTPUT_HANDLER_CLEANABLE':'','PHP_OUTPUT_HANDLER_FLUSHABLE':'','PHP_OUTPUT_HANDLER_REMOVABLE':'','PHP_OUTPUT_HANDLER_START':'','PHP_OUTPUT_HANDLER_WRITE':'','PHP_OUTPUT_HANDLER_FLUSH':'','PHP_OUTPUT_HANDLER_CLEAN':'','PHP_OUTPUT_HANDLER_FINAL':'','PHP_OUTPUT_HANDLER_CONT':'','PHP_OUTPUT_HANDLER_END':'',}
let php_builtin['constants']['password_hashing']={'PASSWORD_DEFAULT':'','PASSWORD_BCRYPT':'','CRYPT_BLOWFISH':'',}
let php_builtin['constants']['postgresql']={'PGSQL_CONNECT_FORCE_NEW':'','PGSQL_CONNECTION_OK':'','PGSQL_CONNECTION_BAD':'','PGSQL_CONV_IGNORE_DEFAULT':'','PGSQL_CONV_FORCE_NULL':'','PGSQL_CONV_IGNORE_NOT_NULL':'','PGSQL_DML_NO_CONV':'','PGSQL_DML_ESCAPE':'','PGSQL_DML_EXEC':'','PGSQL_DML_ASYNC':'','PGSQL_DML_STRING':'','PGSQL_ASSOC':'','PGSQL_NUM':'','PGSQL_BOTH':'','PGSQL_CONV_OPTS':'','INV_READ':'','INV_WRITE':'','INV_ARCHIVE':'','PGSQL_SEEK_SET':'','PGSQL_SEEK_CUR':'','PGSQL_SEEK_END':'','PGSQL_DIAG_SEVERITY':'','PGSQL_DIAG_SQLSTATE':'','PGSQL_DIAG_MESSAGE_PRIMARY':'','PGSQL_DIAG_MESSAGE_DETAIL':'','PGSQL_DIAG_MESSAGE_HINT':'','PGSQL_DIAG_STATEMENT_POSITION':'','PGSQL_DIAG_INTERNAL_POSITION':'','PGSQL_DIAG_INTERNAL_QUERY':'','PGSQL_DIAG_CONTEXT':'','PGSQL_DIAG_SOURCE_FILE':'','PGSQL_DIAG_SOURCE_LINE':'','PGSQL_DIAG_SOURCE_FUNCTION':'','PGSQL_STATUS_LONG':'','PGSQL_STATUS_STRING':'','PGSQL_EMPTY_QUERY':'','PGSQL_COMMAND_OK':'','PGSQL_TUPLES_OK':'','PGSQL_COPY_OUT':'','PGSQL_COPY_IN':'','PGSQL_BAD_RESPONSE' let php_builtin['constants']['pcre']={'PREG_GREP_INVERT':'','PREG_NO_ERROR':'','PREG_INTERNAL_ERROR':'','PREG_BACKTRACK_LIMIT_ERROR':'','PREG_RECURSION_LIMIT_ERROR':'','PREG_BAD_UTF8_ERROR':'','PREG_BAD_UTF8_OFFSET_ERROR':'','PREG_PATTERN_ORDER':'','PREG_SET_ORDER':'','PREG_OFFSET_CAPTURE':'','PREG_SPLIT_NO_EMPTY':'','PREG_SPLIT_DELIM_CAPTURE':'','PREG_SPLIT_OFFSET_CAPTURE':'','PCRE_VERSION':'',}
let php_builtin['constants']['program_execution']={'STDIN':'',}
let php_builtin['constants']['sessions']={'SID':'','PHP_SESSION_DISABLED':'','PHP_SESSION_NONE':'','PHP_SESSION_ACTIVE':'','UPLOAD_ERR_EXTENSION':'',}
let php_builtin['constants']['variable_handling']={'PHP_INT_MAX':'',}
let php_builtin['constants']['misc']={'WAIT_IO_COMPLETION':'','CONNECTION_ABORTED':'','CONNECTION_NORMAL':'','CONNECTION_TIMEOUT':'',}
let php_builtin['constants']['streams']={'STREAM_FILTER_READ':'','STREAM_FILTER_WRITE':'','STREAM_FILTER_ALL':'','PHP_INT_MAX':'','STREAM_CLIENT_CONNECT':'','STREAM_CLIENT_ASYNC_CONNECT':'','STREAM_CLIENT_PERSISTENT':'','STREAM_CRYPTO_METHOD_TLS_CLIENT':'','STREAM_CRYPTO_METHOD_TLS_SERVER':'','STREAM_PF_INET':'','STREAM_PF_INET6':'','STREAM_PF_UNIX':'','STREAM_SOCK_DGRAM':'','STREAM_SOCK_RAW':'','STREAM_SOCK_RDM':'','STREAM_SOCK_SEQPACKET':'','STREAM_SOCK_STREAM':'','STREAM_IPPROTO_ICMP':'','STREAM_IPPROTO_IP':'','STREAM_IPPROTO_RAW':'','STREAM_IPPROTO_TCP':'','STREAM_IPPROTO_UDP':'','STREAM_OOB':'','STREAM_PEEK':'','AF_INET':'','STREAM_SERVER_BIND':'','STREAM_SHUT_RD':'','STREAM_SHUT_WR':'','STREAM_SHUT_RDWR':'','STREAM_IS_URL':'','PSFS_PASS_ON':'','PSFS_FEED_ME':'','PSFS_ERR_FATAL':'','PSFS_FLAG_NORMAL':'','PSFS_FLAG_FLUSH_INC':'','PSFS_FLAG_FLUSH_CLOSE':'','STREAM_USE_PATH':'','STREAM_REPORT_ERRORS':'','STREAM_SERVER_LISTEN':'','STREAM_NOTIFY_RESOLVE':'','STREAM_NOTIFY_CONNECT':'','STREAM_NOTIFY_AUTH_REQUI let php_builtin['constants']['iconv']={'ICONV_IMPL':'','ICONV_VERSION':'','ICONV_MIME_DECODE_STRICT':'','ICONV_MIME_DECODE_CONTINUE_ON_ERROR':'',}
let php_builtin['constants']['phpini_directives']={'PATH_SEPARATOR':'','PHP_INI_SYSTEM':'',}
let php_builtin['constants']['types']={'NAN':'','PHP_INT_SIZE':'','PHP_INT_MAX':'',}
let php_builtin['constants']['pdo']={'PDO_PARAM_BOOL':'',}
let php_builtin['constants']['list_of_reserved_words']={'PHP_VERSION':'','PHP_MAJOR_VERSION':'','PHP_MINOR_VERSION':'','PHP_RELEASE_VERSION':'','PHP_VERSION_ID':'','PHP_EXTRA_VERSION':'','PHP_ZTS':'','PHP_DEBUG':'','PHP_MAXPATHLEN':'','PHP_OS':'','PHP_SAPI':'','PHP_EOL':'','PHP_INT_MAX':'','PHP_INT_SIZE':'','DEFAULT_INCLUDE_PATH':'','PEAR_INSTALL_DIR':'','PEAR_EXTENSION_DIR':'','PHP_EXTENSION_DIR':'','PHP_PREFIX':'','PHP_BINDIR':'','PHP_BINARY':'','PHP_MANDIR':'','PHP_LIBDIR':'','PHP_DATADIR':'','PHP_SYSCONFDIR':'','PHP_LOCALSTATEDIR':'','PHP_CONFIG_FILE_PATH':'','PHP_CONFIG_FILE_SCAN_DIR':'','PHP_SHLIB_SUFFIX':'',}
let php_builtin['constants']['php_type_comparison_tables']={'NAN':'',}
" Built in functions
let g:php_builtin_functions = {}
for [ext, data] in items(php_builtin['functions'])
call extend(g:php_builtin_functions, data)
endfor
" Built in classs
let g:php_builtin_classes = {}
for [ext, data] in items(php_builtin['classes'])
call extend(g:php_builtin_classes, data)
endfor
" Built in interfaces
let g:php_builtin_interfaces = {}
for [ext, data] in items(php_builtin['interfaces'])
call extend(g:php_builtin_interfaces, data)
endfor
" Built in constants
let g:php_constants = {}
for [ext, data] in items(php_builtin['constants'])
call extend(g:php_constants, data)
endfor
" When the classname not found or found but the tags dosen't contain that
" class we will try to complate any method of any builtin class. To speed up
" that lookup we compile a 'ClassName::MethodName':'info' dictionary from the
" builtin class informations
let g:php_builtin_object_functions = {}
" When completing for 'everyting imaginable' (no class context, not a
" variable) we need a list of built-in classes in a format of {'classname':''}
" for performance reasons we precompile this too
let g:php_builtin_classnames = {}
" In order to reduce file size, empty keys are omitted from class structures.
" To make the structure of in-memory hashes normalized we will add them in runtime
let required_class_hash_keys = ['constants', 'properties', 'static_properties', 'methods', 'static_methods']
for [classname, class_info] in items(g:php_builtin_classes)
for property_name in required_class_hash_keys
if !has_key(class_info, property_name)
let class_info[property_name] = {}
endif
endfor
let g:php_builtin_classnames[classname] = ''
for [method_name, method_info] in items(class_info.methods)
let g:php_builtin_object_functions[classname.'::'.method_name.'('] = method_info.signature
endfor
for [method_name, method_info] in items(class_info.static_methods)
let g:php_builtin_object_functions[classname.'::'.method_name.'('] = method_info.signature
endfor
endfor
let g:php_builtin_interfacenames = {}
for [interfacename, info] in items(g:php_builtin_interfaces)
for property_name in required_class_hash_keys
if !has_key(class_info, property_name)
let class_info[property_name] = {}
endif
endfor
let g:php_builtin_interfacenames[interfacename] = ''
for [method_name, method_info] in items(class_info.methods)
let g:php_builtin_object_functions[interfacename.'::'.method_name.'('] = method_info.signature
endfor
for [method_name, method_info] in items(class_info.static_methods)
let g:php_builtin_object_functions[interfacename.'::'.method_name.'('] = method_info.signature
endfor
endfor
" Add control structures (they are outside regular pattern of PHP functions)
let php_control = {
\ 'include(': 'string filename | resource',
\ 'include_once(': 'string filename | resource',
\ 'require(': 'string filename | resource',
\ 'require_once(': 'string filename | resource',
\ }
call extend(g:php_builtin_functions, php_control)
" Built-in variables " {{{
let g:php_builtin_vars ={
\ '$GLOBALS':'',
\ '$_SERVER':'',
\ '$_GET':'',
\ '$_POST':'',
\ '$_COOKIE':'',
\ '$_FILES':'',
\ '$_ENV':'',
\ '$_REQUEST':'',
\ '$_SESSION':'',
\ '$HTTP_SERVER_VARS':'',
\ '$HTTP_ENV_VARS':'',
\ '$HTTP_COOKIE_VARS':'',
\ '$HTTP_GET_VARS':'',
\ '$HTTP_POST_VARS':'',
\ '$HTTP_POST_FILES':'',
\ '$HTTP_SESSION_VARS':'',
\ '$php_errormsg':'',
\ '$this':'',
\ }
" }}}
endfunction
" }}}
" vim: foldmethod=marker:noexpandtab:ts=8:sts=4
FUNCTION FugitiveExtractGitDir()
Called 1 time
Total time: 0.000648
Self time: 0.000454
count total (s) self (s)
1 0.000011 0.000006 let path = s:Slash(a:path)
1 0.000004 if path =~# '^fugitive:'
return matchstr(path, '\C^fugitive:\%(//\)\=\zs.\{-\}\ze\%(//\|::\|$\)')
elseif isdirectory(path)
let path = fnamemodify(path, ':p:s?/$??')
else
1 0.000013 let path = fnamemodify(path, ':p:h:s?/$??')
1 0.000001 endif
1 0.000008 let pre = substitute(matchstr(path, '^\a\a\+\ze:'), '^.', '\u&', '')
1 0.000002 if len(pre) && exists('*' . pre . 'Real')
let path = s:Slash({pre}Real(path))
endif
1 0.000021 let root = resolve(path)
1 0.000001 if root !=# path
silent! exe haslocaldir() ? 'lcd .' : 'cd .'
endif
1 0.000001 let previous = ""
6 0.000008 while root !=# previous
6 0.000023 if root =~# '\v^//%([^/]+/?)?$'
break
endif
6 0.000027 if index(split($GIT_CEILING_DIRECTORIES, ':'), root) >= 0
break
endif
6 0.000012 if root ==# $GIT_WORK_TREE && FugitiveIsGitDir($GIT_DIR)
return simplify(fnamemodify($GIT_DIR, ':p:s?[\/]$??'))
endif
6 0.000098 0.000031 if FugitiveIsGitDir($GIT_DIR)
call FugitiveWorkTree(simplify(fnamemodify($GIT_DIR, ':p:s?[\/]$??')))
if has_key(s:dir_for_worktree, root)
return s:dir_for_worktree[root]
endif
endif
6 0.000067 let dir = substitute(root, '[\/]$', '', '') . '/.git'
6 0.000033 let type = getftype(dir)
6 0.000044 0.000013 if type ==# 'dir' && FugitiveIsGitDir(dir)
1 0.000001 return dir
elseif type ==# 'link' && FugitiveIsGitDir(dir)
return resolve(dir)
elseif type !=# '' && filereadable(dir)
let line = get(readfile(dir, '', 1), 0, '')
if line =~# '^gitdir: \.' && FugitiveIsGitDir(root.'/'.line[8:-1])
return simplify(root.'/'.line[8:-1])
elseif line =~# '^gitdir: ' && FugitiveIsGitDir(line[8:-1])
return line[8:-1]
endif
elseif FugitiveIsGitDir(root)
return root
endif
5 0.000006 let previous = root
5 0.000012 let root = fnamemodify(root, ':h')
5 0.000003 endwhile
return ''
FUNCTION airline#extensions#quickfix#inactive_qf_window()
Called 12 times
Total time: 0.000103
Self time: 0.000103
count total (s) self (s)
12 0.000063 if getbufvar(a:2.bufnr, '&filetype') is# 'qf' && !empty(airline#util#getwinvar(a:2.winnr, 'quickfix_title', ''))
call setwinvar(a:2.winnr, 'airline_section_c', '[%{get(w:, "quickfix_title", "")}] %f %m')
endif
FUNCTION <SNR>29_GetLSPCompletions()
Called 9 times
Total time: 0.006886
Self time: 0.000251
count total (s) self (s)
9 0.000022 let l:buffer = bufnr('')
9 0.006526 0.000071 let l:lsp_details = ale#lsp_linter#StartLSP(l:buffer, a:linter)
9 0.000010 if empty(l:lsp_details)
return 0
endif
9 0.000012 let l:id = l:lsp_details.connection_id
9 0.000048 let l:OnReady = function('s:OnReady', [a:linter, l:lsp_details])
9 0.000223 0.000043 call ale#lsp#WaitForCapability(l:id, 'completion', l:OnReady)
FUNCTION phpcomplete#GetTaglist()
Called 18 times
Total time: 0.468668
Self time: 0.468668
count total (s) self (s)
18 0.000023 let cache_checksum = ''
18 0.000021 if g:phpcomplete_cache_taglists == 1
" build a string with format of "<tagfile>:<mtime>$<tagfile2>:<mtime2>..."
" to validate that the tags are not changed since the time we saved the results in cache
36 0.004583 for tagfile in sort(tagfiles())
18 0.000523 let cache_checksum .= fnamemodify(tagfile, ':p').':'.getftime(tagfile).'$'
18 0.000017 endfor
18 0.000036 if s:cache_tags_checksum != cache_checksum
" tag file(s) changed
" since we don't know where individual tags coming from when calling taglist() we zap the whole cache
" no way to clear only the entries originating from the changed tag file
1 0.000002 let s:cache_tags = {}
1 0.000000 endif
18 0.000039 if has_key(s:cache_tags, a:pattern)
13 0.000021 return s:cache_tags[a:pattern]
endif
5 0.000002 endif
5 0.462690 let tags = taglist(a:pattern)
15 0.000032 for tag in tags
60 0.000073 for prop in keys(tag)
50 0.000106 if prop == 'cmd' || prop == 'static' || prop == 'kind' || prop == 'builtin'
30 0.000025 continue
endif
20 0.000111 let tag[prop] = substitute(tag[prop], '\\\\', '\\', 'g')
20 0.000013 endfor
10 0.000004 endfor
5 0.000016 let s:cache_tags[a:pattern] = tags
5 0.000013 let has_key = has_key(s:cache_tags, a:pattern)
5 0.000008 let s:cache_tags_checksum = cache_checksum
5 0.000005 return tags
FUNCTION <SNR>72_check_mixed_indent()
Called 1 time
Total time: 0.000241
Self time: 0.000241
count total (s) self (s)
1 0.000004 let indent_algo = get(g:, 'airline#extensions#whitespace#mixed_indent_algo', 0)
1 0.000001 if indent_algo == 1
" [<tab>]<space><tab>
" spaces before or between tabs are not allowed
let t_s_t = '(^\t* +\t\s*\S)'
" <tab>(<space> x count)
" count of spaces at the end of tabs should be less than tabstop value
let t_l_s = '(^\t+ {' . &ts . ',}' . '\S)'
return search('\v' . t_s_t . '|' . t_l_s, 'nw')
elseif indent_algo == 2
return search('\v(^\t* +\t\s*\S)', 'nw')
else
1 0.000226 return search('\v(^\t+ +)|(^ +\t+)', 'nw')
endif
FUNCTION ale#events#LintOnEnter()
Called 7 times
Total time: 0.014486
Self time: 0.000108
count total (s) self (s)
" Unmark a file as being changed outside of Vim after we try to check it.
7 0.000020 call setbufvar(a:buffer, 'ale_file_changed', 0)
7 0.000105 0.000039 if ale#Var(a:buffer, 'enabled') && g:ale_lint_on_enter
7 0.014343 0.000031 call ale#Queue(0, 'lint_file', a:buffer)
7 0.000004 endif
FUNCTION ale#job#IsRunning()
Called 22 times
Total time: 0.000218
Self time: 0.000218
count total (s) self (s)
22 0.000047 if has('nvim')
22 0.000016 try
" In NeoVim, if the job isn't running, jobpid() will throw.
22 0.000060 call jobpid(a:job_id)
22 0.000017 return 1
catch
endtry
elseif has_key(s:job_map, a:job_id)
let l:job = s:job_map[a:job_id].job
return job_status(l:job) is# 'run'
endif
return 0
FUNCTION airline#util#exec_funcrefs()
Called 31 times
Total time: 0.020487
Self time: 0.001554
count total (s) self (s)
200 0.000198 for Fn in a:list
200 0.019804 0.000871 let code = call(Fn, a:000)
200 0.000152 if code != 0
31 0.000022 return code
endif
169 0.000073 endfor
return 0
FUNCTION airline#extensions#netrw#apply()
Called 19 times
Total time: 0.000251
Self time: 0.000251
count total (s) self (s)
19 0.000036 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 ale#lsp#RegisterCallback()
Called 14 times
Total time: 0.000176
Self time: 0.000176
count total (s) self (s)
14 0.000035 let l:conn = get(s:connections, a:conn_id, {})
14 0.000016 if !empty(l:conn)
" Add the callback to the List if it's not there already.
14 0.000096 call uniq(sort(add(l:conn.callback_list, a:callback)))
14 0.000006 endif
FUNCTION <SNR>12_SynSet()
Called 3 times
Total time: 0.018334
Self time: 0.001312
count total (s) self (s)
" clear syntax for :set syntax=OFF and any syntax name that doesn't exist
3 0.000011 syn clear
3 0.000007 if exists("b:current_syntax")
unlet b:current_syntax
endif
3 0.000007 let s = expand("<amatch>")
3 0.000004 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
3 0.000003 if s != ""
" Load the syntax file(s). When there are several, separated by dots,
" load each in sequence.
6 0.000019 for name in split(s, '\.')
3 0.018234 0.001211 exe "runtime! syntax/" . name . ".vim syntax/" . name . "/*.vim"
3 0.000003 endfor
3 0.000002 endif
FUNCTION <SNR>69_format_name()
Called 1 time
Total time: 0.000002
Self time: 0.000002
count total (s) self (s)
1 0.000001 return a:name
FUNCTION <SNR>69_update_branch()
Called 223 times
Total time: 0.045806
Self time: 0.008702
count total (s) self (s)
669 0.001349 for vcs in keys(s:vcs_config)
446 0.039925 0.002821 call {s:vcs_config[vcs].update_branch}()
446 0.001295 if b:buffer_vcs_config[vcs].branch != s:vcs_config[vcs].branch
1 0.000002 let b:buffer_vcs_config[vcs].branch = s:vcs_config[vcs].branch
1 0.000001 unlet! b:airline_head
1 0.000001 endif
446 0.000281 endfor
FUNCTION OpenRangerIn()
Called 1 time
Total time: 0.010217
Self time: 0.003210
count total (s) self (s)
1 0.000007 let currentPath = expand(a:path)
1 0.000014 let rangerCallback = { 'name': 'ranger', 'edit_cmd': a:edit_cmd }
1 0.000003 function! rangerCallback.on_exit(job_id, code, event)
if a:code == 0
silent! Bclose!
endif
try
if filereadable(s:choice_file_path)
for f in readfile(s:choice_file_path)
exec self.edit_cmd . f
endfor
call delete(s:choice_file_path)
endif
endtry
endfunction
1 0.007304 0.000310 enew
1 0.000004 if isdirectory(currentPath)
call termopen(s:ranger_command . ' --choosefiles=' . s:choice_file_path . ' "' . currentPath . '"', rangerCallback)
else
1 0.002869 0.002854 call termopen(s:ranger_command . ' --choosefiles=' . s:choice_file_path . ' --selectfile="' . currentPath . '"', rangerCallback)
1 0.000003 endif
1 0.000001 startinsert
FUNCTION airline#extensions#ale#get_error()
Called 223 times
Total time: 0.012076
Self time: 0.001023
count total (s) self (s)
223 0.011994 0.000941 return airline#extensions#ale#get('error')
FUNCTION ale#linter#Get()
Called 23 times
Total time: 0.012102
Self time: 0.004823
count total (s) self (s)
23 0.000070 let l:possibly_duplicated_linters = []
" Handle dot-separated filetypes.
46 0.000235 for l:original_filetype in split(a:original_filetypes, '\.')
23 0.001409 0.000134 let l:filetype = ale#linter#ResolveFiletype(l:original_filetype)
23 0.000610 0.000120 let l:linter_names = s:GetLinterNames(l:original_filetype)
23 0.005650 0.000136 let l:all_linters = ale#linter#GetAll(l:filetype)
23 0.000031 let l:filetype_linters = []
23 0.000055 if type(l:linter_names) is v:t_string && l:linter_names is# 'all'
let l:filetype_linters = l:all_linters
elseif type(l:linter_names) is v:t_list
" Select only the linters we or the user has specified.
184 0.000161 for l:linter in l:all_linters
161 0.000502 let l:name_list = [l:linter.name] + l:linter.aliases
276 0.000255 for l:name in l:name_list
161 0.000311 if index(l:linter_names, l:name) >= 0
46 0.000090 call add(l:filetype_linters, l:linter)
46 0.000037 break
endif
115 0.000060 endfor
161 0.000093 endfor
23 0.000022 endif
23 0.000050 call extend(l:possibly_duplicated_linters, l:filetype_linters)
23 0.000011 endfor
23 0.000033 let l:name_list = []
23 0.000033 let l:combined_linters = []
" Make sure we override linters so we don't get two with the same name,
" like 'eslint' for both 'javascript' and 'typescript'
"
" Note that the reverse calls here modify the List variables.
69 0.000094 for l:linter in reverse(l:possibly_duplicated_linters)
46 0.000090 if index(l:name_list, l:linter.name) < 0
46 0.000086 call add(l:name_list, l:linter.name)
46 0.000072 call add(l:combined_linters, l:linter)
46 0.000022 endif
46 0.000020 endfor
23 0.000035 return reverse(l:combined_linters)
FUNCTION <SNR>40_crend()
Called 1 time
Total time: 0.000008
Self time: 0.000008
count total (s) self (s)
1 0.000002 let n = ""
1 0.000004 if !exists("b:endwise_addition") || !exists("b:endwise_words") || !exists("b:endwise_syngroups")
1 0.000001 return n
endif
let synids = join(map(split(b:endwise_syngroups, ','), 'hlID(v:val)'), ',')
let wordchoice = '\%('.substitute(b:endwise_words,',','\\|','g').'\)'
if exists("b:endwise_pattern")
let beginpat = substitute(b:endwise_pattern,'&',substitute(wordchoice,'\\','\\&','g'),'g')
else
let beginpat = '\<'.wordchoice.'\>'
endif
let lnum = line('.') - 1
let space = matchstr(getline(lnum),'^\s*')
let col = match(getline(lnum),beginpat) + 1
let word = matchstr(getline(lnum),beginpat)
let endword = substitute(word,'.*',b:endwise_addition,'')
let y = n.endword."\<C-O>O"
if exists("b:endwise_end_pattern")
let endpat = '\w\@<!'.substitute(word, '.*', substitute(b:endwise_end_pattern, '\\', '\\\\', 'g'), '').'\w\@!'
elseif b:endwise_addition[0:1] ==# '\='
let endpat = '\w\@<!'.endword.'\w\@!'
else
let endpat = '\w\@<!'.substitute('\w\+', '.*', b:endwise_addition, '').'\w\@!'
endif
let synidpat = '\%('.substitute(synids,',','\\|','g').'\)'
if a:always
return y
elseif col <= 0 || synID(lnum,col,1) !~ '^'.synidpat.'$'
return n
elseif getline('.') !~ '^\s*#\=$'
return n
endif
let line = s:mysearchpair(beginpat,endpat,synidpat)
" even is false if no end was found, or if the end found was less
" indented than the current line
let even = strlen(matchstr(getline(line),'^\s*')) >= strlen(space)
if line == 0
let even = 0
endif
if !even && line == line('.') + 1
return y
endif
if even
return n
endif
return y
FUNCTION <SNR>82_DirCommitFile()
Called 1 time
Total time: 0.000029
Self time: 0.000022
count total (s) self (s)
1 0.000025 0.000018 let vals = matchlist(s:Slash(a:path), '\c^fugitive:\%(//\)\=\(.\{-\}\)\%(//\|::\)\(\x\{40\}\|[0-3]\)\(/.*\)\=$')
1 0.000001 if empty(vals)
1 0.000001 return ['', '', '']
endif
return vals[1:3]
FUNCTION airline#check_mode()
Called 225 times
Total time: 0.139826
Self time: 0.020846
count total (s) self (s)
225 0.000497 if !has_key(s:contexts, a:winnr)
return ''
endif
225 0.000473 let context = s:contexts[a:winnr]
225 0.000548 if get(w:, 'airline_active', 1)
223 0.000549 let l:m = mode(1)
223 0.000332 if l:m ==# "i"
94 0.000162 let l:mode = ['insert']
94 0.000094 elseif l:m[0] ==# "i"
8 0.000022 let l:mode = ['insert']
8 0.000005 elseif l:m ==# "Rv"
let l:mode =['replace']
elseif l:m[0] ==# "R"
let l:mode = ['replace']
elseif l:m[0] =~# '\v(v|V||s|S|)'
let l:mode = ['visual']
elseif l:m ==# "t"
1 0.000002 let l:mode = ['terminal']
1 0.000001 elseif l:m[0] ==# "c"
2 0.000004 let l:mode = ['commandline']
2 0.000002 elseif l:m ==# "no" " does not work, most likely, Vim does not refresh the statusline in OP mode
let l:mode = ['normal']
elseif l:m[0:1] ==# 'ni'
let l:mode = ['normal']
let l:m = 'ni'
else
118 0.000204 let l:mode = ['normal']
118 0.000059 endif
223 0.001044 if index(['Rv', 'no', 'ni', 'ix', 'ic'], l:m) == -1
215 0.000342 let l:m = l:m[0]
215 0.000100 endif
223 0.000838 let w:airline_current_mode = get(g:airline_mode_map, l:m, l:m)
223 0.000124 else
2 0.000003 let l:mode = ['inactive']
2 0.000006 let w:airline_current_mode = get(g:airline_mode_map, '__')
2 0.000001 endif
225 0.000486 if g:airline_detect_modified && &modified
124 0.000291 call add(l:mode, 'modified')
124 0.000062 endif
225 0.000309 if g:airline_detect_paste && &paste
call add(l:mode, 'paste')
endif
225 0.001179 if g:airline_detect_crypt && exists("+key") && !empty(&key)
call add(l:mode, 'crypt')
endif
225 0.000296 if g:airline_detect_spell && &spell
call add(l:mode, 'spell')
endif
225 0.000267 if &readonly || ! &modifiable
1 0.000003 call add(l:mode, 'readonly')
1 0.000000 endif
225 0.000886 let mode_string = join(l:mode)
225 0.000710 if get(w:, 'airline_lastmode', '') != mode_string
11 0.002704 0.000084 call airline#highlighter#highlight_modified_inactive(context.bufnr)
11 0.115615 0.000172 call airline#highlighter#highlight(l:mode, context.bufnr)
11 0.000986 0.000070 call airline#util#doautocmd('AirlineModeChanged')
11 0.000023 let w:airline_lastmode = mode_string
11 0.000006 endif
225 0.000147 return ''
FUNCTION airline#util#append()
Called 1561 times
Total time: 0.011145
Self time: 0.011145
count total (s) self (s)
1561 0.002285 if a:minwidth > 0 && winwidth(0) < a:minwidth
return ''
endif
1561 0.003465 let prefix = s:spc == "\ua0" ? s:spc : s:spc.s:spc
1561 0.003208 return empty(a:text) ? '' : prefix.g:airline_left_alt_sep.s:spc.a:text
FUNCTION <SNR>79_get_accented_line()
Called 200 times
Total time: 0.008176
Self time: 0.008176
count total (s) self (s)
200 0.000178 if a:self._context.active
" active window
152 0.000172 let contents = []
152 0.000821 let content_parts = split(a:contents, '__accent')
380 0.000410 for cpart in content_parts
228 0.001533 let accent = matchstr(cpart, '_\zs[^#]*\ze')
228 0.000463 call add(contents, cpart)
228 0.000137 endfor
152 0.000483 let line = join(contents, a:group)
152 0.000811 let line = substitute(line, '__restore__', a:group, 'g')
152 0.000071 else
" inactive window
48 0.000624 let line = substitute(a:contents, '%#__accent[^#]*#', '', 'g')
48 0.000252 let line = substitute(line, '%#__restore__#', '', 'g')
48 0.000022 endif
200 0.000152 return line
FUNCTION 8()
Called 31 times
Total time: 0.000090
Self time: 0.000090
count total (s) self (s)
31 0.000080 call add(self._sections, ['|', a:0 ? a:1 : '%='])
FUNCTION <SNR>18_leaderGuide_display()
Called 3 times
Total time: 0.000022
Self time: 0.000022
count total (s) self (s)
3 0.000021 let g:leaderGuide#displayname = substitute(g:leaderGuide#displayname, '\c<cr>$', '', '')
FUNCTION ale#lsp#UpdateConfig()
Called 23 times
Total time: 0.000162
Self time: 0.000162
count total (s) self (s)
23 0.000073 let l:conn = get(s:connections, a:conn_id, {})
23 0.000049 if empty(l:conn) || a:config ==# l:conn.config " no-custom-checks
23 0.000014 return 0
endif
let l:conn.config = a:config
let l:message = ale#lsp#message#DidChangeConfiguration(a:buffer, a:config)
call ale#lsp#Send(a:conn_id, l:message)
return 1
FUNCTION airline#extensions#branch#update_untracked_config()
Called 213 times
Total time: 0.002221
Self time: 0.002221
count total (s) self (s)
213 0.000629 if !has_key(s:vcs_config[a:vcs].untracked, a:file)
return
elseif s:vcs_config[a:vcs].untracked[a:file] != b:buffer_vcs_config[a:vcs].untracked
let b:buffer_vcs_config[a:vcs].untracked = s:vcs_config[a:vcs].untracked[a:file]
unlet! b:airline_head
endif
FUNCTION <SNR>80_get_section()
Called 269 times
Total time: 0.007223
Self time: 0.006550
count total (s) self (s)
269 0.000500 if has_key(s:section_truncate_width, a:key)
188 0.000392 if winwidth(a:winnr) < s:section_truncate_width[a:key]
return ''
endif
188 0.000070 endif
269 0.000316 let spc = g:airline_symbols.space
269 0.000801 if !exists('g:airline_section_{a:key}')
return ''
endif
269 0.002089 0.001415 let text = airline#util#getwinvar(a:winnr, 'airline_section_'.a:key, g:airline_section_{a:key})
269 0.001368 let [prefix, suffix] = [get(a:000, 0, '%('.spc), get(a:000, 1, spc.'%)')]
269 0.000756 return empty(text) ? '' : prefix.text.suffix
FUNCTION ctrlp#utils#writecache()
Called 1 time
Total time: 0.000480
Self time: 0.000467
count total (s) self (s)
1 0.000023 0.000010 if isdirectory(ctrlp#utils#mkdir(a:0 ? a:1 : s:cache_dir))
1 0.000454 sil! cal writefile(a:lines, a:0 >= 2 ? a:2 : ctrlp#utils#cachefile())
1 0.000002 en
FUNCTION <SNR>84_RunJob()
Called 14 times
Total time: 0.150669
Self time: 0.003433
count total (s) self (s)
14 0.000021 let l:command = a:options.command
14 0.000021 if empty(l:command)
return 0
endif
14 0.000019 let l:executable = a:options.executable
14 0.000015 let l:buffer = a:options.buffer
14 0.000014 let l:linter = a:options.linter
14 0.000018 let l:output_stream = a:options.output_stream
14 0.000018 let l:next_chain_index = a:options.next_chain_index
14 0.000016 let l:read_buffer = a:options.read_buffer
14 0.000025 let l:info = g:ale_buffer_info[l:buffer]
14 0.001638 0.000094 let [l:temporary_file, l:command] = ale#command#FormatCommand( l:buffer, l:executable, l:command, l:read_buffer,)
14 0.117685 0.000280 if s:CreateTemporaryFileForJob(l:buffer, l:temporary_file)
" If a temporary filename has been formatted in to the command, then
" we do not need to send the Vim buffer to the command.
14 0.000054 let l:read_buffer = 0
14 0.000046 endif
" Add a newline to commands which need it.
" This is only used for Flow for now, and is not documented.
14 0.000063 if l:linter.add_newline
if has('win32')
let l:command = l:command . '; echo.'
else
let l:command = l:command . '; echo'
endif
endif
14 0.001390 0.000212 let l:command = ale#job#PrepareCommand(l:buffer, l:command)
14 0.000097 let l:job_options = { 'mode': 'nl', 'exit_cb': function('s:HandleExit'),}
14 0.000023 if l:output_stream is# 'stderr'
let l:job_options.err_cb = function('s:GatherOutput')
elseif l:output_stream is# 'both'
let l:job_options.out_cb = function('s:GatherOutput')
let l:job_options.err_cb = function('s:GatherOutput')
else
14 0.000058 let l:job_options.out_cb = function('s:GatherOutput')
14 0.000007 endif
14 0.000041 if get(g:, 'ale_run_synchronously') == 1
" Find a unique Job value to use, which will be the same as the ID for
" running commands synchronously. This is only for test code.
let l:job_id = len(s:job_info_map) + 1
while has_key(s:job_info_map, l:job_id)
let l:job_id += 1
endwhile
else
14 0.025963 0.000230 let l:job_id = ale#job#Start(l:command, l:job_options)
14 0.000010 endif
14 0.000019 let l:status = 'failed'
" Only proceed if the job is being run.
14 0.000010 if l:job_id
" Add the job to the list of jobs, so we can track them.
14 0.000085 call add(l:info.job_list, l:job_id)
14 0.000086 if index(l:info.active_linter_list, l:linter.name) < 0
14 0.000044 call add(l:info.active_linter_list, l:linter.name)
14 0.000007 endif
14 0.000017 let l:status = 'started'
" Store the ID for the job in the map to read back again.
14 0.000141 let s:job_info_map[l:job_id] = { 'linter': l:linter, 'buffer': l:buffer, 'executable': l:executable, 'output': [], 'next_chain_index': l:next_chain_index,}
14 0.001633 0.000617 silent doautocmd <nomodeline> User ALEJobStarted
14 0.000008 endif
14 0.000015 if g:ale_history_enabled
14 0.000472 0.000113 call ale#history#Add(l:buffer, l:status, l:job_id, l:command)
14 0.000006 endif
14 0.000027 if get(g:, 'ale_run_synchronously') == 1
" Run a command synchronously if this test option is set.
let s:job_info_map[l:job_id].output = systemlist( type(l:command) is v:t_list ? join(l:command[0:1]) . ' ' . ale#Escape(l:command[2]) : l:command)
call l:job_options.exit_cb(l:job_id, v:shell_error)
endif
14 0.000037 return l:job_id != 0
FUNCTION airline#themes#get_highlight()
Called 546 times
Total time: 0.055347
Self time: 0.003136
count total (s) self (s)
546 0.055190 0.002979 return call('airline#highlighter#get_highlight', [a:group] + a:000)
FUNCTION ale#highlight#RemoveHighlights()
Called 26 times
Total time: 0.000331
Self time: 0.000331
count total (s) self (s)
38 0.000095 for l:match in getmatches()
12 0.000064 if l:match.group =~# '^ALE'
11 0.000037 call matchdelete(l:match.id)
11 0.000006 endif
12 0.000006 endfor
FUNCTION <SNR>79_get_transitioned_seperator()
Called 169 times
Total time: 0.072853
Self time: 0.004058
count total (s) self (s)
169 0.000155 let line = ''
169 0.000528 if get(a:self._context, 'tabline', 0) && get(g:, 'airline#extensions#tabline#alt_sep', 0) && a:group ==# 'airline_tabsel' && a:side
call airline#highlighter#add_separator(a:prev_group, a:group, 0)
let line .= '%#'.a:prev_group.'_to_'.a:group.'#'
let line .= a:self._context.right_sep.'%#'.a:group.'#'
else
169 0.069497 0.000702 call airline#highlighter#add_separator(a:prev_group, a:group, a:side)
169 0.000608 let line .= '%#'.a:prev_group.'_to_'.a:group.'#'
169 0.000477 let line .= a:side ? a:self._context.left_sep : a:self._context.right_sep
169 0.000354 let line .= '%#'.a:group.'#'
169 0.000072 endif
169 0.000126 return line
FUNCTION phpcomplete#LoadData()
Called 1 time
Total time: 0.026774
Self time: 0.026774
count total (s) self (s)
" Keywords/reserved words, all other special things
" Later it is possible to add some help to values, or type of defined variable
1 0.000075 let g:php_keywords={'PHP_SELF':'','argv':'','argc':'','GATEWAY_INTERFACE':'','SERVER_ADDR':'','SERVER_NAME':'','SERVER_SOFTWARE':'','SERVER_PROTOCOL':'','REQUEST_METHOD':'','REQUEST_TIME':'','QUERY_STRING':'','DOCUMENT_ROOT':'','HTTP_ACCEPT':'','HTTP_ACCEPT_CHARSET':'','HTTP_ACCEPT_ENCODING':'','HTTP_ACCEPT_LANGUAGE':'','HTTP_CONNECTION':'','HTTP_POST':'','HTTP_REFERER':'','HTTP_USER_AGENT':'','HTTPS':'','REMOTE_ADDR':'','REMOTE_HOST':'','REMOTE_PORT':'','SCRIPT_FILENAME':'','SERVER_ADMIN':'','SERVER_PORT':'','SERVER_SIGNATURE':'','PATH_TRANSLATED':'','SCRIPT_NAME':'','REQUEST_URI':'','PHP_AUTH_DIGEST':'','PHP_AUTH_USER':'','PHP_AUTH_PW':'','AUTH_TYPE':'','and':'','or':'','xor':'','__FILE__':'','exception':'','__LINE__':'','as':'','break':'','case':'','class':'','const':'','continue':'','declare':'','default':'','do':'','echo':'','else':'','elseif':'','enddeclare':'','endfor':'','endforeach':'','endif':'','endswitch':'','endwhile':'','extends':'','for':'','foreach':'','function':'','global':'','if':'','new':'','static':'','switch':'','use':'','var':'','while':'','final':'','php_user_filter':'','interface':'','implements':'','public':'','private':'','protected':'','abstract':'','clone':'','try':'','catch':'','throw':'','cfunction':'','old_function':'','this':'','INI_USER': '','INI_PERDIR': '','INI_SYSTEM': '','INI_ALL': '','ABDAY_1': '','ABDAY_2': '','ABDAY_3': '','ABDAY_4': '','ABDAY_5': '','ABDAY_6': '','ABDAY_7': '','DAY_1': '','DAY_2': '','DAY_3': '','DAY_4': '','DAY_5': '','DAY_6': '','DAY_7': '','ABMON_1': '','ABMON_2': '','ABMON_3': '','ABMON_4': '','ABMON_5': '','ABMON_6': '','ABMON_7': '','ABMON_8': '','ABMON_9': '','ABMON_10': '','ABMON_11': '','ABMON_12': '','MON_1': '','MON_2': '','MON_3': '','MON_4': '','MON_5': '','MON_6': '','MON_7': '','MON_8': '','MON_9': '','MON_10': '','MON_11': '','MON_12': '','AM_STR': '','D_T_FMT': '','ALT_DIGITS': '',}
" One giant hash of all built-in function, class, interface and constant grouped by extension
1 0.000003 let php_builtin = {'functions':{},'classes':{},'interfaces':{},'constants':{},}
1 0.000074 let php_builtin['functions']['math']={'abs(':'mixed $number | number','acos(':'float $arg | float','acosh(':'float $arg | float','asin(':'float $arg | float','asinh(':'float $arg | float','atan(':'float $arg | float','atan2(':'float $y, float $x | float','atanh(':'float $arg | float','base_convert(':'string $number, int $frombase, int $tobase | string','bindec(':'string $binary_string | number','ceil(':'float $value | float','cos(':'float $arg | float','cosh(':'float $arg | float','decbin(':'int $number | string','dechex(':'int $number | string','decoct(':'int $number | string','deg2rad(':'float $number | float','exp(':'float $arg | float','expm1(':'float $arg | float','floor(':'float $value | float','fmod(':'float $x, float $y | float','getrandmax(':'void | int','hexdec(':'string $hex_string | number','hypot(':'float $x, float $y | float','is_finite(':'float $val | bool','is_infinite(':'float $val | bool','is_nan(':'float $val | bool','lcg_value(':'void | float','log(':'float $arg [, float $base = M_E] | float','log10(':'float $arg | float','log1p(':'float $number | float','max(':'array $values | mixed','min(':'array $values | mixed','mt_getrandmax(':'void | int','mt_rand(':'void | int','mt_srand(':'[ int $seed] | void','octdec(':'string $octal_string | number','pi(':'void | float','pow(':'number $base, number $exp | number','rad2deg(':'float $number | float','rand(':'void | int','round(':'float $val [, int $precision = 0 [, int $mode = PHP_ROUND_HALF_UP]] | float','sin(':'float $arg | float','sinh(':'float $arg | float','sqrt(':'float $arg | float','srand(':'[ int $seed] | void','tan(':'float $arg | float','tanh(':'float $arg | float',}
1 0.000118 let php_builtin['functions']['strings']={'addcslashes(':'string $str, string $charlist | string','addslashes(':'string $str | string','bin2hex(':'string $str | string','chop(':'chop — Alias of rtrim()','chr(':'int $ascii | string','chunk_split(':'string $body [, int $chunklen = 76 [, string $end = "\r\n"]] | string','convert_cyr_string(':'string $str, string $from, string $to | string','convert_uudecode(':'string $data | string','convert_uuencode(':'string $data | string','count_chars(':'string $string [, int $mode = 0] | mixed','crc32(':'string $str | int','crypt(':'string $str [, string $salt] | string','echo(':'string $arg1 [, string $...] | void','explode(':'string $delimiter, string $string [, int $limit] | array','fprintf(':'resource $handle, string $format [, mixed $args [, mixed $...]] | int','get_html_translation_table(':'[ int $table = HTML_SPECIALCHARS [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ''UTF-8'']]] | array','hebrev(':'string $hebrew_text [, int $max_chars_per_line = 0] | string','hebrevc(':'string $hebrew_text [, int $max_chars_per_line = 0] | string','hex2bin(':'string $data | string','html_entity_decode(':'string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ''UTF-8'']] | string','htmlentities(':'string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ''UTF-8'' [, bool $double_encode = true]]] | string','htmlspecialchars_decode(':'string $string [, int $flags = ENT_COMPAT | ENT_HTML401] | string','htmlspecialchars(':'string $string [, int $flags = ENT_COMPAT | ENT_HTML401 [, string $encoding = ''UTF-8'' [, bool $double_encode = true]]] | string','implode(':'string $glue, array $pieces | string','join(':'join — Alias of implode()','lcfirst(':'string $str | string','levenshtein(':'string $str1, string $str2 | int','localeconv(':'void | array','ltrim(':'string $str [, string $character_mask] | string','md5_file(':'string $filename [, bool $raw_output = false] | string','md5(':'string $str [, bool $raw_output = false] | string','metaphone(':'string $str [, int $phonemes = 0] | string','money_format(':'string $format, float $number | string','nl_langinfo(':'int $item | string','nl2br(':'string $string [, bool $is_xhtml = true] | string','number_format(':'float $number [, int $decimals = 0] | string','ord(':'string $string | int','parse_str(':'string $str [, array &$arr] | void','print(':'string $arg | int','printf(':'string $format [, mixed $args [, mixed $...]] | int','quoted_printable_decode(':'string $str | string','quoted_printable_encode(':'string $str | string','quotemeta(':'string $str | string','rtrim(':'string $str [, string $character_mask] | string','setlocale(':'int $category, string $locale [, string $...] | string','sha1_file(':'string $filename [, bool $raw_output = false] | string','sha1(':'string $str [, bool $raw_output = false] | string','similar_text(':'string $first, string $second [, float &$percent] | int','soundex(':'string $str | string','sprintf(':'string $format [, mixed $args [, mixed $...]] | string','sscanf(':'string $str, string $format [, mixed &$...] | mixed','str_getcsv(':'string $input [, string $delimiter = '','' [, string $enclosure = ''"'' [, string $escape = ''\\'']]] | array','str_ireplace(':'mixed $search, mixed $replace, mixed $subject [, int &$count] | mixed','str_pad(':'string $input, int $pad_length [, string $pad_string = " " [, int $pad_type = STR_PAD_RIGHT]] | string','str_repeat(':'string $input, int $multiplier | string','str_replace(':'mixed $search, mixed $replace, mixed $subject [, int &$count] | mixed','str_rot13(':'string $str | string','str_shuffle(':'string $str | string','str_split(':'string $string [, int $split_length = 1] | array','str_word_count(':'string $string [, int $format = 0 [, string $charlist]] | mixed','strcasecmp(':'string $str1, string $str2 | int','strchr(':'strchr — Alias of strstr()','strcmp(':'string $str1, string $str2 | int','strcoll(':'string $str1, string $str2 | int','strcspn(':'string $str1, string $str2 [, int $start [, int $length]] | int','strip_tags(':'string $str [, string $allowable_tags] | string','stripcslashes(':'string $str | string','stripos(':'string $haystack, string $needle [, int $offset = 0] | int','stripslashes(':'string $str | string','stristr(':'string $haystack, mixed $needle [, bool $before_needle = false] | string','strlen(':'string $string | int','strnatcasecmp(':'string $str1, string $str2 | int','strnatcmp(':'string $str1, string $str2 | int','strncasecmp(':'string $str1, string $str2, int $len | int','strncmp(':'string $str1, string $str2, int $len | int','strpbrk(':'string $haystack, string $char_list | string','strpos(':'string $haystack, mixed $needle [, int $offset = 0] | mixed','strrchr(':'string $haystack, mixed $needle | string','strrev(':'string $string | string','strripos(':'string $haystack, string $needle [, int $offset = 0] | int','strrpos(':'string $haystack, string $needle [, int $offset = 0] | int','strspn(':'string $subject, string $mask [, int $start [, int $length]] | int','strstr(':'string $haystack, mixed $needle [, bool $before_needle = false] | string','strtok(':'string $str, string $token | string','strtolower(':'string $str | string','strtoupper(':'string $string | string','strtr(':'string $str, string $from, string $to | string','substr_compare(':'string $main_str, string $str, int $offset [, int $length [, bool $case_insensitivity = false]] | int','substr_count(':'string $haystack, string $needle [, int $offset = 0 [, int $length]] | int','substr_replace(':'mixed $string, mixed $replacement, mixed $start [, mixed $length] | mixed','substr(':'string $string, int $start [, int $length] | string','trim(':'string $str [, string $character_mask = " \t\n\r\0\x0B"] | string','ucfirst(':'string $str | string','ucwords(':'string $str | string','vfprintf(':'resource $handle, string $format, array $args | int','vprintf(':'string $format, array $args | int','vsprintf(':'string $format, array $args | string','wordwrap(':'string $str [, int $width = 75 [, string $break = "\n" [, bool $cut = false]]] | string',}
1 0.000014 let php_builtin['functions']['apache']={'apache_child_terminate(':'void | bool','apache_get_modules(':'void | array','apache_get_version(':'void | string','apache_getenv(':'string $variable [, bool $walk_to_top = false] | string','apache_lookup_uri(':'string $filename | object','apache_note(':'string $note_name [, string $note_value = ""] | string','apache_request_headers(':'void | array','apache_reset_timeout(':'void | bool','apache_response_headers(':'void | array','apache_setenv(':'string $variable, string $value [, bool $walk_to_top = false] | bool','getallheaders(':'void | array','virtual(':'string $filename | bool',}
1 0.000084 let php_builtin['functions']['arrays']={'array_change_key_case(':'array $array [, int $case = CASE_LOWER] | array','array_chunk(':'array $array, int $size [, bool $preserve_keys = false] | array','array_column(':'array $array, mixed $column_key [, mixed $index_key = null] | array','array_combine(':'array $keys, array $values | array','array_count_values(':'array $array | array','array_diff_assoc(':'array $array1, array $array2 [, array $...] | array','array_diff_key(':'array $array1, array $array2 [, array $...] | array','array_diff_uassoc(':'array $array1, array $array2 [, array $... [, callable $key_compare_func]] | array','array_diff_ukey(':'array $array1, array $array2 [, array $... [, callable $key_compare_func]] | array','array_diff(':'array $array1, array $array2 [, array $...] | array','array_fill_keys(':'array $keys, mixed $value | array','array_fill(':'int $start_index, int $num, mixed $value | array','array_filter(':'array $array [, callable $callback] | array','array_flip(':'array $array | array','array_intersect_assoc(':'array $array1, array $array2 [, array $...] | array','array_intersect_key(':'array $array1, array $array2 [, array $...] | array','array_intersect_uassoc(':'array $array1, array $array2 [, array $... [, callable $key_compare_func]] | array','array_intersect_ukey(':'array $array1, array $array2 [, array $... [, callable $key_compare_func]] | array','array_intersect(':'array $array1, array $array2 [, array $...] | array','array_key_exists(':'mixed $key, array $array | bool','array_keys(':'array $array [, mixed $search_value [, bool $strict = false]] | array','array_map(':'callable $callback, array $array1 [, array $...] | array','array_merge_recursive(':'array $array1 [, array $...] | array','array_merge(':'array $array1 [, array $...] | array','array_multisort(':'array &$array1 [, mixed $array1_sort_order = SORT_ASC [, mixed $array1_sort_flags = SORT_REGULAR [, mixed $...]]] | bool','array_pad(':'array $array, int $size, mixed $value | array','array_pop(':'array &$array | mixed','array_product(':'array $array | number','array_push(':'array &$array, mixed $value1 [, mixed $...] | int','array_rand(':'array $array [, int $num = 1] | mixed','array_reduce(':'array $array, callable $callback [, mixed $initial = NULL] | mixed','array_replace_recursive(':'array $array1, array $array2 [, array $...] | array','array_replace(':'array $array1, array $array2 [, array $...] | array','array_reverse(':'array $array [, bool $preserve_keys = false] | array','array_search(':'mixed $needle, array $haystack [, bool $strict = false] | mixed','array_shift(':'array &$array | mixed','array_slice(':'array $array, int $offset [, int $length = NULL [, bool $preserve_keys = false]] | array','array_splice(':'array &$input, int $offset [, int $length [, mixed $replacement = array()]] | array','array_sum(':'array $array | number','array_udiff_assoc(':'array $array1, array $array2 [, array $... [, callable $value_compare_func]] | array','array_udiff_uassoc(':'array $array1, array $array2 [, array $... [, callable $value_compare_func [, callable $key_compare_func]]] | array','array_udiff(':'array $array1, array $array2 [, array $... [, callable $value_compare_func]] | array','array_uintersect_assoc(':'array $array1, array $array2 [, array $... [, callable $value_compare_func]] | array','array_uintersect_uassoc(':'array $array1, array $array2 [, array $... [, callable $value_compare_func [, callable $key_compare_func]]] | array','array_uintersect(':'array $array1, array $array2 [, array $... [, callable $value_compare_func]] | array','array_unique(':'array $array [, int $sort_flags = SORT_STRING] | array','array_unshift(':'array &$array, mixed $value1 [, mixed $...] | int','array_values(':'array $array | array','array_walk_recursive(':'array &$array, callable $callback [, mixed $userdata = NULL] | bool','array_walk(':'array &$array, callable $callback [, mixed $userdata = NULL] | bool','array(':'[ mixed $...] | array','arsort(':'array &$array [, int $sort_flags = SORT_REGULAR] | bool','asort(':'array &$array [, int $sort_flags = SORT_REGULAR] | bool','compact(':'mixed $varname1 [, mixed $...] | array','count(':'mixed $array_or_countable [, int $mode = COUNT_NORMAL] | int','current(':'array &$array | mixed','each(':'array &$array | array','end(':'array &$array | mixed','extract(':'array &$array [, int $flags = EXTR_OVERWRITE [, string $prefix = NULL]] | int','in_array(':'mixed $needle, array $haystack [, bool $strict = FALSE] | bool','key_exists(':'key_exists — Alias of array_key_exists()','key(':'array &$array | mixed','krsort(':'array &$array [, int $sort_flags = SORT_REGULAR] | bool','ksort(':'array &$array [, int $sort_flags = SORT_REGULAR] | bool','list(':'mixed $var1 [, mixed $...] | array','natcasesort(':'array &$array | bool','natsort(':'array &$array | bool','next(':'array &$array | mixed','pos(':'pos — Alias of current()','prev(':'array &$array | mixed','range(':'mixed $start, mixed $end [, number $step = 1] | array','reset(':'array &$array | mixed','rsort(':'array &$array [, int $sort_flags = SORT_REGULAR] | bool','shuffle(':'array &$array | bool','sizeof(':'sizeof — Alias of count()','sort(':'array &$array [, int $sort_flags = SORT_REGULAR] | bool','uasort(':'array &$array, callable $value_compare_func | bool','uksort(':'array &$array, callable $key_compare_func | bool','usort(':'array &$array, callable $value_compare_func | bool',}
1 0.000049 let php_builtin['functions']['php_options_info']={'assert_options(':'int $what [, mixed $value] | mixed','assert(':'mixed $assertion [, string $description] | bool','cli_get_process_title(':'void | string','cli_set_process_title(':'string $title | bool','dl(':'string $library | bool','extension_loaded(':'string $name | bool','gc_collect_cycles(':'void | int','gc_disable(':'void | void','gc_enable(':'void | void','gc_enabled(':'void | bool','get_cfg_var(':'string $option | string','get_current_user(':'void | string','get_defined_constants(':'[ bool $categorize = false] | array','get_extension_funcs(':'string $module_name | array','get_include_path(':'void | string','get_included_files(':'void | array','get_loaded_extensions(':'[ bool $zend_extensions = false] | array','get_magic_quotes_gpc(':'void | bool','get_magic_quotes_runtime(':'void | bool','get_required_files(':'get_required_files — Alias of get_included_files()','getenv(':'string $varname | string','getlastmod(':'void | int','getmygid(':'void | int','getmyinode(':'void | int','getmypid(':'void | int','getmyuid(':'void | int','getopt(':'string $options [, array $longopts] | array','getrusage(':'[ int $who = 0] | array','ini_alter(':'ini_alter — Alias of ini_set()','ini_get_all(':'[ string $extension [, bool $details = true]] | array','ini_get(':'string $varname | string','ini_restore(':'string $varname | void','ini_set(':'string $varname, string $newvalue | string','magic_quotes_runtime(':'magic_quotes_runtime — Alias of set_magic_quotes_runtime()','memory_get_peak_usage(':'[ bool $real_usage = false] | int','memory_get_usage(':'[ bool $real_usage = false] | int','php_ini_loaded_file(':'void | string','php_ini_scanned_files(':'void | string','php_logo_guid(':'void | string','php_sapi_name(':'void | string','php_uname(':'[ string $mode = "a"] | string','phpcredits(':'[ int $flag = CREDITS_ALL] | bool','phpinfo(':'[ int $what = INFO_ALL] | bool','phpversion(':'[ string $extension] | string','putenv(':'string $setting | bool','restore_include_path(':'void | void','set_include_path(':'string $new_include_path | string','set_magic_quotes_runtime(':'bool $new_setting | bool','set_time_limit(':'int $seconds | void','sys_get_temp_dir(':'void | string','version_compare(':'string $version1, string $version2 [, string $operator] | mixed','zend_logo_guid(':'void | string','zend_thread_id(':'void | int','zend_version(':'void | string',}
1 0.000020 let php_builtin['functions']['classes_objects']={'__autoload(':'string $class | void','call_user_method_array(':'string $method_name, object &$obj, array $params | mixed','call_user_method(':'string $method_name, object &$obj [, mixed $parameter [, mixed $...]] | mixed','class_alias(':'string $original, string $alias [, bool $autoload = TRUE] | bool','class_exists(':'string $class_name [, bool $autoload = true] | bool','get_called_class(':'void | string','get_class_methods(':'mixed $class_name | array','get_class_vars(':'string $class_name | array','get_class(':'[ object $object = NULL] | string','get_declared_classes(':'void | array','get_declared_interfaces(':'void | array','get_declared_traits(':'void | array','get_object_vars(':'object $object | array','get_parent_class(':'[ mixed $object] | string','interface_exists(':'string $interface_name [, bool $autoload = true] | bool','is_a(':'object $object, string $class_name [, bool $allow_string = FALSE] | bool','is_subclass_of(':'mixed $object, string $class_name [, bool $allow_string = TRUE] | bool','method_exists(':'mixed $object, string $method_name | bool','property_exists(':'mixed $class, string $property | bool','trait_exists(':'string $traitname [, bool $autoload] | bool',}
1 0.000011 let php_builtin['functions']['urls']={'base64_decode(':'string $data [, bool $strict = false] | string','base64_encode(':'string $data | string','get_headers(':'string $url [, int $format = 0] | array','get_meta_tags(':'string $filename [, bool $use_include_path = false] | array','http_build_query(':'mixed $query_data [, string $numeric_prefix [, string $arg_separator [, int $enc_type = PHP_QUERY_RFC1738]]] | string','parse_url(':'string $url [, int $component = -1] | mixed','rawurldecode(':'string $str | string','rawurlencode(':'string $str | string','urldecode(':'string $str | string','urlencode(':'string $str | string',}
1 0.000075 let php_builtin['functions']['filesystem']={'basename(':'string $path [, string $suffix] | string','chgrp(':'string $filename, mixed $group | bool','chmod(':'string $filename, int $mode | bool','chown(':'string $filename, mixed $user | bool','clearstatcache(':'[ bool $clear_realpath_cache = false [, string $filename]] | void','copy(':'string $source, string $dest [, resource $context] | bool','dirname(':'string $path | string','disk_free_space(':'string $directory | float','disk_total_space(':'string $directory | float','diskfreespace(':'diskfreespace — Alias of disk_free_space()','fclose(':'resource $handle | bool','feof(':'resource $handle | bool','fflush(':'resource $handle | bool','fgetc(':'resource $handle | string','fgetcsv(':'resource $handle [, int $length = 0 [, string $delimiter = '','' [, string $enclosure = ''"'' [, string $escape = ''\\'']]]] | array','fgets(':'resource $handle [, int $length] | string','fgetss(':'resource $handle [, int $length [, string $allowable_tags]] | string','file_exists(':'string $filename | bool','file_get_contents(':'string $filename [, bool $use_include_path = false [, resource $context [, int $offset = -1 [, int $maxlen]]]] | string','file_put_contents(':'string $filename, mixed $data [, int $flags = 0 [, resource $context]] | int','file(':'string $filename [, int $flags = 0 [, resource $context]] | array','fileatime(':'string $filename | int','filectime(':'string $filename | int','filegroup(':'string $filename | int','fileinode(':'string $filename | int','filemtime(':'string $filename | int','fileowner(':'string $filename | int','fileperms(':'string $filename | int','filesize(':'string $filename | int','filetype(':'string $filename | string','flock(':'resource $handle, int $operation [, int &$wouldblock] | bool','fnmatch(':'string $pattern, string $string [, int $flags = 0] | bool','fopen(':'string $filename, string $mode [, bool $use_include_path = false [, resource $context]] | resource','fpassthru(':'resource $handle | int','fputcsv(':'resource $handle, array $fields [, string $delimiter = '','' [, string $enclosure = ''"'']] | int','fputs(':'fputs — Alias of fwrite()','fread(':'resource $handle, int $length | string','fscanf(':'resource $handle, string $format [, mixed &$...] | mixed','fseek(':'resource $handle, int $offset [, int $whence = SEEK_SET] | int','fstat(':'resource $handle | array','ftell(':'resource $handle | int','ftruncate(':'resource $handle, int $size | bool','fwrite(':'resource $handle, string $string [, int $length] | int','glob(':'string $pattern [, int $flags = 0] | array','is_dir(':'string $filename | bool','is_executable(':'string $filename | bool','is_file(':'string $filename | bool','is_link(':'string $filename | bool','is_readable(':'string $filename | bool','is_uploaded_file(':'string $filename | bool','is_writable(':'string $filename | bool','is_writeable(':'is_writeable — Alias of is_writable()','lchgrp(':'string $filename, mixed $group | bool','lchown(':'string $filename, mixed $user | bool','link(':'string $target, string $link | bool','linkinfo(':'string $path | int','lstat(':'string $filename | array','mkdir(':'string $pathname [, int $mode = 0777 [, bool $recursive = false [, resource $context]]] | bool','move_uploaded_file(':'string $filename, string $destination | bool','parse_ini_file(':'string $filename [, bool $process_sections = false [, int $scanner_mode = INI_SCANNER_NORMAL]] | array','parse_ini_string(':'string $ini [, bool $process_sections = false [, int $scanner_mode = INI_SCANNER_NORMAL]] | array','pathinfo(':'string $path [, int $options = PATHINFO_DIRNAME | PATHINFO_BASENAME | PATHINFO_EXTENSION | PATHINFO_FILENAME] | mixed','pclose(':'resource $handle | int','popen(':'string $command, string $mode | resource','readfile(':'string $filename [, bool $use_include_path = false [, resource $context]] | int','readlink(':'string $path | string','realpath_cache_get(':'void | array','realpath_cache_size(':'void | int','realpath(':'string $path | string','rename(':'string $oldname, string $newname [, resource $context] | bool','rewind(':'resource $handle | bool','rmdir(':'string $dirname [, resource $context] | bool','set_file_buffer(':'set_file_buffer — Alias of stream_set_write_buffer()','stat(':'string $filename | array','symlink(':'string $target, string $link | bool','tempnam(':'string $dir, string $prefix | string','tmpfile(':'void | resource','touch(':'string $filename [, int $time = time() [, int $atime]] | bool','umask(':'[ int $mask] | int','unlink(':'string $filename [, resource $context] | bool',}
1 0.000029 let php_builtin['functions']['variable_handling']={'boolval(':'mixed $var | boolean','debug_zval_dump(':'mixed $variable [, mixed $...] | void','doubleval(':'doubleval — Alias of floatval()','empty(':'mixed $var | bool','floatval(':'mixed $var | float','get_defined_vars(':'void | array','get_resource_type(':'resource $handle | string','gettype(':'mixed $var | string','import_request_variables(':'string $types [, string $prefix] | bool','intval(':'mixed $var [, int $base = 10] | int','is_array(':'mixed $var | bool','is_bool(':'mixed $var | bool','is_callable(':'callable $name [, bool $syntax_only = false [, string &$callable_name]] | bool','is_double(':'is_double — Alias of is_float()','is_float(':'mixed $var | bool','is_int(':'mixed $var | bool','is_integer(':'is_integer — Alias of is_int()','is_long(':'is_long — Alias of is_int()','is_null(':'mixed $var | bool','is_numeric(':'mixed $var | bool','is_object(':'mixed $var | bool','is_real(':'is_real — Alias of is_float()','is_resource(':'mixed $var | bool','is_scalar(':'mixed $var | bool','is_string(':'mixed $var | bool','isset(':'mixed $var [, mixed $...] | bool','print_r(':'mixed $expression [, bool $return = false] | mixed','serialize(':'mixed $value | string','settype(':'mixed &$var, string $type | bool','strval(':'mixed $var | string','unserialize(':'string $str | mixed','unset(':'mixed $var [, mixed $...] | void','var_dump(':'mixed $expression [, mixed $...] | void','var_export(':'mixed $expression [, bool $return = false] | mixed',}
1 0.000019 let php_builtin['functions']['calendar']={'cal_days_in_month(':'int $calendar, int $month, int $year | int','cal_from_jd(':'int $jd, int $calendar | array','cal_info(':'[ int $calendar = -1] | array','cal_to_jd(':'int $calendar, int $month, int $day, int $year | int','easter_date(':'[ int $year] | int','easter_days(':'[ int $year [, int $method = CAL_EASTER_DEFAULT]] | int','frenchtojd(':'int $month, int $day, int $year | int','gregoriantojd(':'int $month, int $day, int $year | int','jddayofweek(':'int $julianday [, int $mode = CAL_DOW_DAYNO] | mixed','jdmonthname(':'int $julianday, int $mode | string','jdtofrench(':'int $juliandaycount | string','jdtogregorian(':'int $julianday | string','jdtojewish(':'int $juliandaycount [, bool $hebrew = false [, int $fl = 0]] | string','jdtojulian(':'int $julianday | string','jdtounix(':'int $jday | int','jewishtojd(':'int $month, int $day, int $year | int','juliantojd(':'int $month, int $day, int $year | int','unixtojd(':'[ int $timestamp = time()] | int',}
1 0.000014 let php_builtin['functions']['function_handling']={'call_user_func_array(':'callable $callback, array $param_arr | mixed','call_user_func(':'callable $callback [, mixed $parameter [, mixed $...]] | mixed','create_function(':'string $args, string $code | string','forward_static_call_array(':'callable $function, array $parameters | mixed','forward_static_call(':'callable $function [, mixed $parameter [, mixed $...]] | mixed','func_get_arg(':'int $arg_num | mixed','func_get_args(':'void | array','func_num_args(':'void | int','function_exists(':'string $function_name | bool','get_defined_functions(':'void | array','register_shutdown_function(':'callable $callback [, mixed $parameter [, mixed $...]] | void','register_tick_function(':'callable $function [, mixed $arg [, mixed $...]] | bool','unregister_tick_function(':'string $function_name | void',}
1 0.000009 let php_builtin['functions']['directories']={'chdir(':'string $directory | bool','chroot(':'string $directory | bool','closedir(':'[ resource $dir_handle] | void','dir(':'string $directory [, resource $context] | Directory','getcwd(':'void | string','opendir(':'string $path [, resource $context] | resource','readdir(':'[ resource $dir_handle] | string','rewinddir(':'[ resource $dir_handle] | void','scandir(':'string $directory [, int $sorting_order = SCANDIR_SORT_ASCENDING [, resource $context]] | array',}
1 0.000030 let php_builtin['functions']['date_time']={'checkdate(':'int $month, int $day, int $year | bool','date_default_timezone_get(':'void | string','date_default_timezone_set(':'string $timezone_identifier | bool','date_parse_from_format(':'string $format, string $date | array','date_parse(':'string $date | array','date_sun_info(':'int $time, float $latitude, float $longitude | array','date_sunrise(':'int $timestamp [, int $format = SUNFUNCS_RET_STRING [, float $latitude = ini_get("date.default_latitude") [, float $longitude = ini_get("date.default_longitude") [, float $zenith = ini_get("date.sunrise_zenith") [, float $gmt_offset = 0]]]]] | mixed','date_sunset(':'int $timestamp [, int $format = SUNFUNCS_RET_STRING [, float $latitude = ini_get("date.default_latitude") [, float $longitude = ini_get("date.default_longitude") [, float $zenith = ini_get("date.sunset_zenith") [, float $gmt_offset = 0]]]]] | mixed','date(':'string $format [, int $timestamp = time()] | string','getdate(':'[ int $timestamp = time()] | array','gettimeofday(':'[ bool $return_float = false] | mixed','gmdate(':'string $format [, int $timestamp = time()] | string','gmmktime(':'[ int $hour = gmdate("H") [, int $minute = gmdate("i") [, int $second = gmdate("s") [, int $month = gmdate("n") [, int $day = gmdate("j") [, int $year = gmdate("Y") [, int $is_dst = -1]]]]]]] | int','gmstrftime(':'string $format [, int $timestamp = time()] | string','idate(':'string $format [, int $timestamp = time()] | int','localtime(':'[ int $timestamp = time() [, bool $is_associative = false]] | array','microtime(':'[ bool $get_as_float = false] | mixed','mktime(':'[ int $hour = date("H") [, int $minute = date("i") [, int $second = date("s") [, int $month = date("n") [, int $day = date("j") [, int $year = date("Y") [, int $is_dst = -1]]]]]]] | int','strftime(':'string $format [, int $timestamp = time()] | string','strptime(':'string $date, string $format | array','strtotime(':'string $time [, int $now = time()] | int','time(':'void | int','timezone_name_from_abbr(':'string $abbr [, int $gmtOffset = -1 [, int $isdst = -1]] | string','timezone_version_get(':'void | string',}
1 0.000034 let php_builtin['functions']['network']={'checkdnsrr(':'string $host [, string $type = "MX"] | bool','closelog(':'void | bool','define_syslog_variables(':'void | void','dns_get_record(':'string $hostname [, int $type = DNS_ANY [, array &$authns [, array &$addtl [, bool &$raw = false]]]] | array','fsockopen(':'string $hostname [, int $port = -1 [, int &$errno [, string &$errstr [, float $timeout = ini_get("default_socket_timeout")]]]] | resource','gethostbyaddr(':'string $ip_address | string','gethostbyname(':'string $hostname | string','gethostbynamel(':'string $hostname | array','gethostname(':'void | string','getmxrr(':'string $hostname, array &$mxhosts [, array &$weight] | bool','getprotobyname(':'string $name | int','getprotobynumber(':'int $number | string','getservbyname(':'string $service, string $protocol | int','getservbyport(':'int $port, string $protocol | string','header_register_callback(':'callable $callback | bool','header_remove(':'[ string $name] | void','header(':'string $string [, bool $replace = true [, int $http_response_code]] | void','headers_list(':'void | array','headers_sent(':'[ string &$file [, int &$line]] | bool','http_response_code(':'[ int $response_code] | int','inet_ntop(':'string $in_addr | string','inet_pton(':'string $address | string','ip2long(':'string $ip_address | int','long2ip(':'string $proper_address | string','openlog(':'string $ident, int $option, int $facility | bool','pfsockopen(':'string $hostname [, int $port = -1 [, int &$errno [, string &$errstr [, float $timeout = ini_get("default_socket_timeout")]]]] | resource','setcookie(':'string $name [, string $value [, int $expire = 0 [, string $path [, string $domain [, bool $secure = false [, bool $httponly = false]]]]]] | bool','setrawcookie(':'string $name [, string $value [, int $expire = 0 [, string $path [, string $domain [, bool $secure = false [, bool $httponly = false]]]]]] | bool','socket_get_status(':'socket_get_status — Alias of stream_get_meta_data()','socket_set_blocking(':'socket_set_blocking — Alias of stream_set_blocking()','socket_set_timeout(':'socket_set_timeout — Alias of stream_set_timeout()','syslog(':'int $priority, string $message | bool',}
1 0.000015 let php_builtin['functions']['spl']={'class_implements(':'mixed $class [, bool $autoload = true] | array','class_parents(':'mixed $class [, bool $autoload = true] | array','class_uses(':'mixed $class [, bool $autoload = true] | array','iterator_apply(':'Traversable $iterator, callable $function [, array $args] | int','iterator_count(':'Traversable $iterator | int','iterator_to_array(':'Traversable $iterator [, bool $use_keys = true] | array','spl_autoload_call(':'string $class_name | void','spl_autoload_extensions(':'[ string $file_extensions] | string','spl_autoload_functions(':'void | array','spl_autoload_register(':'[ callable $autoload_function [, bool $throw = true [, bool $prepend = false]]] | bool','spl_autoload_unregister(':'mixed $autoload_function | bool','spl_autoload(':'string $class_name [, string $file_extensions = spl_autoload_extensions()] | void','spl_classes(':'void | array','spl_object_hash(':'object $obj | string',}
1 0.000023 let php_builtin['functions']['misc']={'connection_aborted(':'void | int','connection_status(':'void | int','connection_timeout(':'void | int','constant(':'string $name | mixed','define(':'string $name, mixed $value [, bool $case_insensitive = false] | bool','defined(':'string $name | bool','eval(':'string $code | mixed','exit(':'[ string $status] | void','get_browser(':'[ string $user_agent [, bool $return_array = false]] | mixed','__halt_compiler(':'void | void','highlight_file(':'string $filename [, bool $return = false] | mixed','highlight_string(':'string $str [, bool $return = false] | mixed','ignore_user_abort(':'[ string $value] | int','pack(':'string $format [, mixed $args [, mixed $...]] | string','php_check_syntax(':'string $filename [, string &$error_message] | bool','php_strip_whitespace(':'string $filename | string','show_source(':'show_source — Alias of highlight_file()','sleep(':'int $seconds | int','sys_getloadavg(':'void | array','time_nanosleep(':'int $seconds, int $nanoseconds | mixed','time_sleep_until(':'float $timestamp | bool','uniqid(':'[ string $prefix = "" [, bool $more_entropy = false]] | string','unpack(':'string $format, string $data | array','usleep(':'int $micro_seconds | void',}
1 0.000024 let php_builtin['functions']['curl']={'curl_close(':'resource $ch | void','curl_copy_handle(':'resource $ch | resource','curl_errno(':'resource $ch | int','curl_error(':'resource $ch | string','curl_escape(':'resource $ch, string $str | string','curl_exec(':'resource $ch | mixed','curl_getinfo(':'resource $ch [, int $opt = 0] | mixed','curl_init(':'[ string $url = NULL] | resource','curl_multi_add_handle(':'resource $mh, resource $ch | int','curl_multi_close(':'resource $mh | void','curl_multi_exec(':'resource $mh, int &$still_running | int','curl_multi_getcontent(':'resource $ch | string','curl_multi_info_read(':'resource $mh [, int &$msgs_in_queue = NULL] | array','curl_multi_init(':'void | resource','curl_multi_remove_handle(':'resource $mh, resource $ch | int','curl_multi_select(':'resource $mh [, float $timeout = 1.0] | int','curl_multi_setopt(':'resource $mh, int $option, mixed $value | bool','curl_multi_strerror(':'int $errornum | string','curl_pause(':'resource $ch, int $bitmask | int','curl_reset(':'resource $ch | void','curl_setopt_array(':'resource $ch, array $options | bool','curl_setopt(':'resource $ch, int $option, mixed $value | bool','curl_share_close(':'resource $sh | void','curl_share_init(':'void | resource','curl_share_setopt(':'resource $sh, int $option, string $value | bool','curl_strerror(':'int $errornum | string','curl_unescape(':'resource $ch, string $str | string','curl_version(':'[ int $age = CURLVERSION_NOW] | array',}
1 0.000012 let php_builtin['functions']['error_handling']={'debug_backtrace(':'[ int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT [, int $limit = 0]] | array','debug_print_backtrace(':'[ int $options = 0 [, int $limit = 0]] | void','error_get_last(':'void | array','error_log(':'string $message [, int $message_type = 0 [, string $destination [, string $extra_headers]]] | bool','error_reporting(':'[ int $level] | int','restore_error_handler(':'void | bool','restore_exception_handler(':'void | bool','set_error_handler(':'callable $error_handler [, int $error_types = E_ALL | E_STRICT] | mixed','set_exception_handler(':'callable $exception_handler | callable','trigger_error(':'string $error_msg [, int $error_type = E_USER_NOTICE] | bool',}
1 0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment