📄 phtml.vim
字号:
" Vim syntax file" Language: phtml PHP 2.0" Maintainer: Lutz Eymers <ixtab@polzin.com>" URL: http://www.isp.de/data/phtml.vim" Email: Subject: send syntax_vim.tgz" Last change: 2001 May 10"" Options phtml_sql_query = 1 for SQL syntax highligthing inside strings" phtml_minlines = x to sync at least x lines backwards" For version 5.x: Clear all syntax items" For version 6.x: Quit when a syntax file was already loadedif version < 600 syntax clearelseif exists("b:current_syntax") finishendifif !exists("main_syntax") let main_syntax = 'phtml'endifif version < 600 so <sfile>:p:h/html.vimelse runtime! syntax/html.vim unlet b:current_syntaxendifsyn cluster htmlPreproc add=phtmlRegionInsideHtmlTagsif exists( "phtml_sql_query") if phtml_sql_query == 1 syn include @phtmlSql <sfile>:p:h/sql.vim unlet b:current_syntax endifendifsyn cluster phtmlSql remove=sqlString,sqlCommentsyn case match" Env Variablessyn keyword phtmlEnvVar SERVER_SOFTWARE SERVER_NAME SERVER_URL GATEWAY_INTERFACE containedsyn keyword phtmlEnvVar SERVER_PROTOCOL SERVER_PORT REQUEST_METHOD PATH_INFO containedsyn keyword phtmlEnvVar PATH_TRANSLATED SCRIPT_NAME QUERY_STRING REMOTE_HOST containedsyn keyword phtmlEnvVar REMOTE_ADDR AUTH_TYPE REMOTE_USER CONTEN_TYPE containedsyn keyword phtmlEnvVar CONTENT_LENGTH HTTPS HTTPS_KEYSIZE HTTPS_SECRETKEYSIZE containedsyn keyword phtmlEnvVar HTTP_ACCECT HTTP_USER_AGENT HTTP_IF_MODIFIED_SINCE containedsyn keyword phtmlEnvVar HTTP_FROM HTTP_REFERER containedsyn keyword phtmlEnvVar PHP_SELF containedsyn case ignore" Internal Variablessyn keyword phtmlIntVar phperrmsg php_self contained" Commentsyn region phtmlComment start="/\*" end="\*/" contained contains=phtmlTodo" Function namessyn keyword phtmlFunctions Abs Ada_Close Ada_Connect Ada_Exec Ada_FetchRow containedsyn keyword phtmlFunctions Ada_FieldName Ada_FieldNum Ada_FieldType containedsyn keyword phtmlFunctions Ada_FreeResult Ada_NumFields Ada_NumRows Ada_Result containedsyn keyword phtmlFunctions Ada_ResultAll AddSlashes ASort BinDec Ceil ChDir containedsyn keyword phtmlFunctions AdaGrp ChMod ChOwn Chop Chr ClearStack ClearStatCache containedsyn keyword phtmlFunctions closeDir CloseLog Cos Count Crypt Date dbList containedsyn keyword phtmlFunctions dbmClose dbmDelete dbmExists dbmFetch dbmFirstKey containedsyn keyword phtmlFunctions dbmInsert dbmNextKey dbmOpen dbmReplace DecBin DecHex containedsyn keyword phtmlFunctions DecOct doubleval Echo End ereg eregi ereg_replace containedsyn keyword phtmlFunctions eregi_replace EscapeShellCmd Eval Exec Exit Exp containedsyn keyword phtmlFunctions fclose feof fgets fgetss File fileAtime fileCtime containedsyn keyword phtmlFunctions fileGroup fileInode fileMtime fileOwner filePerms containedsyn keyword phtmlFunctions fileSize fileType Floor Flush fopen fputs FPassThru containedsyn keyword phtmlFunctions fseek fsockopen ftell getAccDir GetEnv getHostByName containedsyn keyword phtmlFunctions getHostByAddr GetImageSize getLastAcess containedsyn keyword phtmlFunctions getLastbrowser getLastEmail getLastHost getLastMod containedsyn keyword phtmlFunctions getLastref getLogDir getMyInode getMyPid getMyUid containedsyn keyword phtmlFunctions getRandMax getStartLogging getToday getTotal GetType containedsyn keyword phtmlFunctions gmDate Header HexDec HtmlSpecialChars ImageArc containedsyn keyword phtmlFunctions ImageChar ImageCharUp IamgeColorAllocate containedsyn keyword phtmlFunctions ImageColorTransparent ImageCopyResized ImageCreate containedsyn keyword phtmlFunctions ImageCreateFromGif ImageDestroy ImageFill containedsyn keyword phtmlFunctions ImageFilledPolygon ImageFilledRectangle containedsyn keyword phtmlFunctions ImageFillToBorder ImageGif ImageInterlace ImageLine containedsyn keyword phtmlFunctions ImagePolygon ImageRectangle ImageSetPixel containedsyn keyword phtmlFunctions ImageString ImageStringUp ImageSX ImageSY Include containedsyn keyword phtmlFunctions InitSyslog intval IsSet Key Link LinkInfo Log Log10 containedsyn keyword phtmlFunctions LosAs Mail Max Md5 mi_Close mi_Connect mi_DBname containedsyn keyword phtmlFunctions mi_Exec mi_FieldName mi_FieldNum mi_NumFields containedsyn keyword phtmlFunctions mi_NumRows mi_Result Microtime Min MkDir MkTime msql containedsyn keyword phtmlFunctions msql_connect msql_CreateDB msql_dbName msql_DropDB containedsyn keyword phtmlFunctions msqlFieldFlags msql_FieldLen msql_FieldName containedsyn keyword phtmlFunctions msql_FieldType msql_FreeResult msql_ListDBs containedsyn keyword phtmlFunctions msql_Listfields msql_ListTables msql_NumFields containedsyn keyword phtmlFunctions msql_NumRows msql_RegCase msql_Result msql_TableName containedsyn keyword phtmlFunctions mysql mysql_affected_rows mysql_close mysql_connect containedsyn keyword phtmlFunctions mysql_CreateDB mysql_dbName mysqlDropDB containedsyn keyword phtmlFunctions mysql_FieldFlags mysql_FieldLen mysql_FieldName containedsyn keyword phtmlFunctions mysql_FieldType mysql_FreeResult mysql_insert_id containedsyn keyword phtmlFunctions mysql_listDBs mysql_Listfields mysql_ListTables containedsyn keyword phtmlFunctions mysql_NumFields mysql_NumRows mysql_Result containedsyn keyword phtmlFunctions mysql_TableName Next OctDec openDir OpenLog containedsyn keyword phtmlFunctions Ora_Bind Ora_Close Ora_Commit Ora_CommitOff containedsyn keyword phtmlFunctions Ora_CommitOn Ora_Exec Ora_Fetch Ora_GetColumn containedsyn keyword phtmlFunctions Ora_Logoff Ora_Logon Ora_Parse Ora_Rollback Ord containedsyn keyword phtmlFunctions Parse_str PassThru pclose pg_Close pg_Connect containedsyn keyword phtmlFunctions pg_DBname pg_ErrorMessage pg_Exec pg_FieldName containedsyn keyword phtmlFunctions pg_FieldPrtLen pg_FieldNum pg_FieldSize containedsyn keyword phtmlFunctions pg_FieldType pg_FreeResult pg_GetLastOid pg_Host containedsyn keyword phtmlFunctions pg_NumFields pg_NumRows pg_Options pg_Port containedsyn keyword phtmlFunctions pg_Result pg_tty phpInfo phpVersion popen pos pow containedsyn keyword phtmlFunctions Prev PutEnv QuoteMeta Rand readDir ReadFile ReadLink containedsyn keyword phtmlFunctions reg_Match reg_replace reg_Search Rename Reset return containedsyn keyword phtmlFunctions rewind rewindDir RmDir rSort SetCookie SetErrorReporting containedsyn keyword phtmlFunctions SetLogging SetShowInfo SetType shl shr Sin Sleep containedsyn keyword phtmlFunctions Solid_Close Solid_Connect Solid_Exec Solid_FetchRow containedsyn keyword phtmlFunctions Solid_FieldName Solid_FieldNum Solid_FreeResult containedsyn keyword phtmlFunctions Solid_NumFields Solid_NumRows Solid_Result Sort containedsyn keyword phtmlFunctions Spundtex Sprintf Sqrt Srand strchr strtr containedsyn keyword phtmlFunctions StripSlashes strlen strchr strstr strtok strtolower containedsyn keyword phtmlFunctions strtoupper strval substr sybSQL_CheckConnect containedsyn keyword phtmlFunctions sybSQL_DBUSE sybSQL_Connect sybSQL_Exit containedsyn keyword phtmlFunctions sybSQL_Fieldname sybSQL_GetField sybSQL_IsRow containedsyn keyword phtmlFunctions sybSQL_NextRow sybSQL_NumFields sybSQL_NumRows containedsyn keyword phtmlFunctions sybSQL_Query sybSQL_Result sybSQL_Result sybSQL_Seek containedsyn keyword phtmlFunctions Symlink syslog System Tan TempNam Time Umask UniqId containedsyn keyword phtmlFunctions Unlink Unset UrlDecode UrlEncode USleep Virtual containedsyn keyword phtmlFunctions SecureVar contained" Conditionalsyn keyword phtmlConditional if else elseif endif switch endswitch contained" Repeatsyn keyword phtmlRepeat while endwhile contained" Repeatsyn keyword phtmlLabel case default contained" Statementsyn keyword phtmlStatement break return continue exit contained" Operatorsyn match phtmlOperator "[-=+%^&|*!]" containedsyn match phtmlOperator "[-+*/%^&|]=" containedsyn match phtmlOperator "/[^*]"me=e-1 containedsyn match phtmlOperator "\$" containedsyn match phtmlRelation "&&" containedsyn match phtmlRelation "||" containedsyn match phtmlRelation "[!=<>]=" containedsyn match phtmlRelation "[<>]" contained" Identifiersyn match phtmlIdentifier "$\h\w*" contained contains=phtmlEnvVar,phtmlIntVar,phtmlOperator" Includesyn keyword phtmlInclude include contained" Definesagsyn keyword phtmlDefine Function contained" Stringsyn region phtmlString keepend matchgroup=None start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=phtmlIdentifier,phtmlSpecialChar,@phtmlSql contained" Numbersyn match phtmlNumber "-\=\<\d\+\>" contained" Floatsyn match phtmlFloat "\(-\=\<\d+\|-\=\)\.\d\+\>" contained" SpecialCharsyn match phtmlSpecialChar "\\[abcfnrtyv\\]" containedsyn match phtmlSpecialChar "\\\d\{3}" contained contains=phtmlOctalErrorsyn match phtmlSpecialChar "\\x[0-9a-fA-F]\{2}" containedsyn match phtmlOctalError "[89]" containedsyn match phtmlParentError "[)}\]]" contained" Todosyn keyword phtmlTodo TODO Todo todo contained" Parentssyn cluster phtmlInside contains=phtmlComment,phtmlFunctions,phtmlIdentifier,phtmlConditional,phtmlRepeat,phtmlLabel,phtmlStatement,phtmlOperator,phtmlRelation,phtmlString,phtmlNumber,phtmlFloat,phtmlSpecialChar,phtmlParent,phtmlParentError,phtmlIncludesyn cluster phtmlTop contains=@phtmlInside,phtmlInclude,phtmlDefine,phtmlParentError,phtmlTodosyn region phtmlParent matchgroup=Delimiter start="(" end=")" contained contains=@phtmlInsidesyn region phtmlParent matchgroup=Delimiter start="{" end="}" contained contains=@phtmlInsidesyn region phtmlParent matchgroup=Delimiter start="\[" end="\]" contained contains=@phtmlInsidesyn region phtmlRegion keepend matchgroup=Delimiter start="<?" skip=+(.*>.*)\|".\{-}>.\{-}"\|/\*.\{-}>.\{-}\*/+ end=">" contains=@phtmlTopsyn region phtmlRegionInsideHtmlTags keepend matchgroup=Delimiter start="<?" skip=+(.*>.*)\|/\*.\{-}>.\{-}\*/+ end=">" contains=@phtmlTop contained" syncif exists("phtml_minlines") exec "syn sync minlines=" . phtml_minlineselse syn sync minlines=100endif" Define the default highlighting." For version 5.7 and earlier: only when not done already" For version 5.8 and later: only when an item doesn't have highlighting yetif version >= 508 || !exists("did_phtml_syn_inits") if version < 508 let did_phtml_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink phtmlComment Comment HiLink phtmlString String HiLink phtmlNumber Number HiLink phtmlFloat Float HiLink phtmlIdentifier Identifier HiLink phtmlIntVar Identifier HiLink phtmlEnvVar Identifier HiLink phtmlFunctions Function HiLink phtmlRepeat Repeat HiLink phtmlConditional Conditional HiLink phtmlLabel Label HiLink phtmlStatement Statement HiLink phtmlType Type HiLink phtmlInclude Include HiLink phtmlDefine Define HiLink phtmlSpecialChar SpecialChar HiLink phtmlParentError Error HiLink phtmlOctalError Error HiLink phtmlTodo Todo HiLink phtmlOperator Operator HiLink phtmlRelation Operator delcommand HiLinkendiflet b:current_syntax = "phtml"if main_syntax == 'phtml' unlet main_syntaxendif" vim: ts=8
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -