mirror of
https://github.com/php/presentations.git
synced 2026-03-24 15:42:33 +01:00
70 lines
1.6 KiB
XML
70 lines
1.6 KiB
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
|
|
<slide fontsize="6em">
|
|
<title>Vim Syntax</title>
|
|
|
|
<blurb>~/.vim/filetype.vim</blurb>
|
|
<example class="bit_larger" fontsize="1.7em">augroup filetypedetect
|
|
au BufNewFile,BufRead *.xt setf xt
|
|
augroup END</example>
|
|
|
|
<break lines="2"/>
|
|
<blurb>~/.vim/syntax/xt.vim (http://xdebug.org/files/xt.vim)</blurb>
|
|
<example class="bit_larger" fontsize="1em">if version < 600
|
|
syntax clear
|
|
elseif exists("b:current_syntax")
|
|
finish
|
|
endif
|
|
|
|
syn match begin "^TRACE START"
|
|
syn match end "^TRACE END"
|
|
syn match date "\[.*\]"
|
|
|
|
syn match min_memory "+\d\+"
|
|
syn match pls_memory "-\d\+"
|
|
syn match nll_memory "+0"
|
|
|
|
syn match level "->"
|
|
syn match lineno ":\d\+$"
|
|
|
|
syn match methodcall "\k\+->"
|
|
syn match staticcall "\k\+::"
|
|
syn match functionb "\k\+("
|
|
syn match functione ") "
|
|
|
|
syn match main "{main}()"
|
|
syn match include "include\(_once\)\=('.\+')"
|
|
|
|
if version >= 508 || !exists("did_diff_syntax_inits")
|
|
if version < 508
|
|
let did_diff_syntax_inits = 1
|
|
command -nargs=+ HiLink hi link <args>
|
|
else
|
|
command -nargs=+ HiLink hi def link <args>
|
|
endif
|
|
|
|
HiLink begin Label
|
|
HiLink end Label
|
|
HiLink date Label
|
|
HiLink level SpecialChar
|
|
|
|
HiLink min_memory Constant
|
|
HiLink pls_memory Structure
|
|
HiLink nll_memory Comment
|
|
|
|
HiLink main Structure
|
|
HiLink include Structure
|
|
|
|
HiLink lineno Delimiter
|
|
HiLink methodcall Function
|
|
HiLink staticcall Function
|
|
HiLink functionb Function
|
|
HiLink functione Function
|
|
|
|
delcommand HiLink
|
|
endif
|
|
|
|
let b:current_syntax = "xt"
|
|
|
|
" vim: ts=8 sw=2</example>
|
|
</slide>
|