diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-05-07 21:54:03 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-07 21:54:03 +0100 |
commit | d899e51120798d3fb5420abb1f19dddf3f014d05 (patch) | |
tree | 41d58bb81c3bf42183296ef515fc2f849700b4fb /runtime/syntax | |
parent | a7583c42cd6b64fd276a5d7bb0db5ce7bfafa730 (diff) |
Update runtime files
Diffstat (limited to 'runtime/syntax')
-rw-r--r-- | runtime/syntax/help.vim | 8 | ||||
-rw-r--r-- | runtime/syntax/i3config.vim | 7 | ||||
-rw-r--r-- | runtime/syntax/plsql.vim | 340 | ||||
-rw-r--r-- | runtime/syntax/vim.vim | 16 | ||||
-rw-r--r-- | runtime/syntax/wget.vim | 340 | ||||
-rw-r--r-- | runtime/syntax/wget2.vim | 250 |
6 files changed, 607 insertions, 354 deletions
diff --git a/runtime/syntax/help.vim b/runtime/syntax/help.vim index 2516967807..f5a50bfacd 100644 --- a/runtime/syntax/help.vim +++ b/runtime/syntax/help.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Vim help file " Maintainer: Bram Moolenaar (Bram@vim.org) -" Last Change: 2021 Jun 13 +" Last Change: 2022 May 01 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") @@ -215,6 +215,12 @@ hi def link helpError Error hi def link helpTodo Todo hi def link helpURL String +if expand('%:p') == $VIMRUNTIME .. '/doc/syntax.txt' + " highlight groups with their respective color + import 'dist/vimhelp.vim' + call vimhelp.HighlightGroups() +endif + let b:current_syntax = "help" let &cpo = s:cpo_save diff --git a/runtime/syntax/i3config.vim b/runtime/syntax/i3config.vim index a2f50e50b8..6163da29eb 100644 --- a/runtime/syntax/i3config.vim +++ b/runtime/syntax/i3config.vim @@ -3,7 +3,7 @@ " Original Author: Mohamed Boughaba <mohamed dot bgb at gmail dot com> " Maintainer: Quentin Hibon (github user hiqua) " Version: 0.4 -" Last Change: 2022 Jan 15 +" Last Change: 2022 May 05 " References: " http://i3wm.org/docs/userguide.html#configuring @@ -50,6 +50,10 @@ syn match i3ConfigVariable /\$\w\+\(\(-\w\+\)\+\)\?\(\s\|+\)\?/ contains=i3Confi syn keyword i3ConfigInitializeKeyword set contained syn match i3ConfigInitialize /^\s*set\s\+.*$/ contains=i3ConfigVariable,i3ConfigInitializeKeyword,i3ConfigColor,i3ConfigString +" Include +syn keyword i3ConfigIncludeKeyword include contained +syn match i3ConfigInclude /^\s*include\s\+.*$/ contains=i3ConfigIncludeKeyword,i3ConfigString,i3ConfigVariable + " Gaps syn keyword i3ConfigGapStyleKeyword inner outer horizontal vertical top right bottom left current all set plus minus toggle up down contained syn match i3ConfigGapStyle /^\s*\(gaps\)\s\+\(inner\|outer\|horizontal\|vertical\|left\|top\|right\|bottom\)\(\s\+\(current\|all\)\)\?\(\s\+\(set\|plus\|minus\|toggle\)\)\?\(\s\+\(-\?\d\+\|\$.*\)\)$/ contains=i3ConfigGapStyleKeyword,i3ConfigNumber,i3ConfigVariable @@ -221,6 +225,7 @@ hi def link i3ConfigAssignSpecial Special hi def link i3ConfigFontNamespace PreProc hi def link i3ConfigBindArgument PreProc hi def link i3ConfigNoStartupId PreProc +hi def link i3ConfigIncludeKeyword Identifier hi def link i3ConfigFontKeyword Identifier hi def link i3ConfigBindKeyword Identifier hi def link i3ConfigOrientation Identifier diff --git a/runtime/syntax/plsql.vim b/runtime/syntax/plsql.vim index 0ac53d03f9..7b36c0a180 100644 --- a/runtime/syntax/plsql.vim +++ b/runtime/syntax/plsql.vim @@ -4,7 +4,7 @@ " Previous Maintainer: Jeff Lanzarotta (jefflanzarotta at yahoo dot com) " Previous Maintainer: C. Laurence Gonsalves (clgonsal@kami.com) " URL: https://github.com/lee-lindley/vim_plsql_syntax -" Last Change: April 25, 2022 +" Last Change: April 28, 2022 " History Lee Lindley (lee dot lindley at gmail dot com) " updated to 19c keywords. refined quoting. " separated reserved, non-reserved keywords and functions @@ -23,9 +23,6 @@ " To enable folding (It does setlocal foldmethod=syntax) " let plsql_fold = 1 " -" If you want to try procedure folding, it has issues -" let plsql_procedure_fold = 1 -" " From my vimrc file -- turn syntax and syntax folding on, " associate file suffixes as plsql, open all the folds on file open " let plsql_fold = 1 @@ -67,23 +64,23 @@ syn match plsqlSymbol "[;,.()]" " Operators. and words that would be something else if not in operator mode syn match plsqlOperator "[-+*/=<>@"]" -syn match plsqlOperator "\%\(\^=\|<=\|>=\|:=\|=>\|\.\.\|||\|<<\|>>\|\*\*\|!=\|\~=\)" -syn match plsqlOperator "\<\%\(NOT\|AND\|OR\|LIKE\|BETWEEN\|IN\)\>" +syn match plsqlOperator "\(\^=\|<=\|>=\|:=\|=>\|\.\.\|||\|<<\|>>\|\*\*\|!=\|\~=\)" +syn match plsqlOperator "\<\(NOT\|AND\|OR\|LIKE\|BETWEEN\|IN\)\>" syn match plsqlBooleanLiteral "\<NULL\>" -syn match plsqlOperator "\<IS\\_s\+\%\(NOT\_s\+\)\?NULL\>" +syn match plsqlOperator "\<IS\\_s\+\(NOT\_s\+\)\?NULL\>" " " conditional compilation Preprocessor directives and sqlplus define sigil syn match plsqlPseudo "$[$a-z][a-z0-9$_#]*" syn match plsqlPseudo "&" -syn match plsqlReserved "\<\%\(CREATE\|THEN\|UPDATE\|INSERT\|SET\)\>" -syn match plsqlKeyword "\<\%\(REPLACE\|PACKAGE\|FUNCTION\|PROCEDURE\|TYPE|BODY\|WHEN\|MATCHED\)\>" +syn match plsqlReserved "\<\(CREATE\|THEN\|UPDATE\|INSERT\|SET\)\>" +syn match plsqlKeyword "\<\(REPLACE\|PACKAGE\|FUNCTION\|PROCEDURE\|TYPE|BODY\|WHEN\|MATCHED\)\>" syn region plsqlUpdate \ matchgroup=plsqlReserved \ start="\<UPDATE\>" \ end="\<SET\>" \ contains=@plsqlIdentifiers -syn match plsqlReserved "\<WHEN\_s\+\%\(NOT\_s\+\)\?MATCHED\_s\+THEN\_s\+\%\(UPDATE\|INSERT\)\%\(\_s\+SET\)\?" +syn match plsqlReserved "\<WHEN\_s\+\(NOT\_s\+\)\?MATCHED\_s\+THEN\_s\+\(UPDATE\|INSERT\)\(\_s\+SET\)\?" " " Oracle's non-reserved keywords @@ -463,7 +460,9 @@ syn keyword plsqlReserved OCIDURATION OCIINTERVAL OCILOBLOCATOR OCINUMBER OCIRAW syn keyword plsqlReserved OCIROWID OCISTRING OCITYPE OF ON OPTION ORACLE ORADATA ORDER ORLANY ORLVARY syn keyword plsqlReserved OUT OVERRIDING PARALLEL_ENABLE PARAMETER PASCAL PCTFREE PIPE PIPELINED POLYMORPHIC syn keyword plsqlReserved PRAGMA PRIOR PUBLIC RAISE RECORD RELIES_ON REM RENAME RESOURCE RESULT REVOKE ROWID -syn keyword plsqlReserved SB1 SB2 SELECT SEPARATE SHARE SHORT SIZE SIZE_T SPARSE SQLCODE SQLDATA +syn keyword plsqlReserved SB1 SB2 +syn match plsqlReserved "\<SELECT\>" +syn keyword plsqlReserved SEPARATE SHARE SHORT SIZE SIZE_T SPARSE SQLCODE SQLDATA syn keyword plsqlReserved SQLNAME SQLSTATE STANDARD START STORED STRUCT STYLE SYNONYM TABLE TDO syn keyword plsqlReserved TRANSACTIONAL TRIGGER UB1 UB4 UNION UNIQUE UNSIGNED UNTRUSTED VALIST syn keyword plsqlReserved VALUES VARIABLE VIEW VOID WHERE WITH @@ -517,28 +516,30 @@ syn match plsqlFunction "\.PREV\>"hs=s+1 syn match plsqlFunction "\.NEXT\>"hs=s+1 if exists("plsql_legacy_sql_keywords") -" Some of Oracle's SQL keywords. -syn keyword plsqlSQLKeyword ABORT ACCESS ACCESSED ADD AFTER ALL ALTER AND ANY -syn keyword plsqlSQLKeyword ASC ATTRIBUTE AUDIT AUTHORIZATION AVG BASE_TABLE -syn keyword plsqlSQLKeyword BEFORE BETWEEN BY CASCADE CAST CHECK CLUSTER -syn keyword plsqlSQLKeyword CLUSTERS COLAUTH COLUMN COMMENT COMPRESS CONNECT -syn keyword plsqlSQLKeyword CONSTRAINT CRASH CURRENT DATA DATABASE -syn keyword plsqlSQLKeyword DATA_BASE DBA DEFAULT DELAY DELETE DESC DISTINCT -syn keyword plsqlSQLKeyword DROP DUAL EXCLUSIVE EXISTS EXTENDS EXTRACT -syn keyword plsqlSQLKeyword FILE FORCE FOREIGN FROM GRANT GROUP HAVING HEAP -syn keyword plsqlSQLKeyword IDENTIFIED IDENTIFIER IMMEDIATE IN INCLUDING -syn keyword plsqlSQLKeyword INCREMENT INDEX INDEXES INITIAL INSERT INSTEAD -syn keyword plsqlSQLKeyword INTERSECT INTO INVALIDATE ISOLATION KEY LIBRARY -syn keyword plsqlSQLKeyword LIKE LOCK MAXEXTENTS MINUS MODE MODIFY MULTISET -syn keyword plsqlSQLKeyword NESTED NOAUDIT NOCOMPRESS NOT NOWAIT OF OFF OFFLINE -syn keyword plsqlSQLKeyword ON ONLINE OPERATOR OPTION ORDER ORGANIZATION -syn keyword plsqlSQLKeyword PCTFREE PRIMARY PRIOR PRIVATE PRIVILEGES PUBLIC -syn keyword plsqlSQLKeyword QUOTA RELEASE RENAME REPLACE RESOURCE REVOKE ROLLBACK -syn keyword plsqlSQLKeyword ROW ROWLABEL ROWS SCHEMA SELECT SEPARATE SESSION SET -syn keyword plsqlSQLKeyword SHARE SIZE SPACE START STORE SUCCESSFUL SYNONYM -syn keyword plsqlSQLKeyword SYSDATE TABLE TABLES TABLESPACE TEMPORARY TO TREAT -syn keyword plsqlSQLKeyword TRIGGER TRUNCATE UID UNION UNIQUE UNLIMITED UPDATE -syn keyword plsqlSQLKeyword USE USER VALIDATE VALUES VIEW WHENEVER WHERE WITH + " Some of Oracle's SQL keywords. + syn keyword plsqlSQLKeyword ABORT ACCESS ACCESSED ADD AFTER ALL ALTER AND ANY + syn keyword plsqlSQLKeyword ASC ATTRIBUTE AUDIT AUTHORIZATION AVG BASE_TABLE + syn keyword plsqlSQLKeyword BEFORE BETWEEN BY CASCADE CAST CHECK CLUSTER + syn keyword plsqlSQLKeyword CLUSTERS COLAUTH COLUMN COMMENT COMPRESS CONNECT + syn keyword plsqlSQLKeyword CONSTRAINT CRASH CURRENT DATA DATABASE + syn keyword plsqlSQLKeyword DATA_BASE DBA DEFAULT DELAY DELETE DESC DISTINCT + syn keyword plsqlSQLKeyword DROP DUAL EXCLUSIVE EXISTS EXTENDS EXTRACT + syn keyword plsqlSQLKeyword FILE FORCE FOREIGN FROM GRANT GROUP HAVING HEAP + syn keyword plsqlSQLKeyword IDENTIFIED IDENTIFIER IMMEDIATE IN INCLUDING + syn keyword plsqlSQLKeyword INCREMENT INDEX INDEXES INITIAL INSERT INSTEAD + syn keyword plsqlSQLKeyword INTERSECT INTO INVALIDATE ISOLATION KEY LIBRARY + syn keyword plsqlSQLKeyword LIKE LOCK MAXEXTENTS MINUS MODE MODIFY MULTISET + syn keyword plsqlSQLKeyword NESTED NOAUDIT NOCOMPRESS NOT NOWAIT OF OFF OFFLINE + syn keyword plsqlSQLKeyword ON ONLINE OPERATOR OPTION ORDER ORGANIZATION + syn keyword plsqlSQLKeyword PCTFREE PRIMARY PRIOR PRIVATE PRIVILEGES PUBLIC + syn keyword plsqlSQLKeyword QUOTA RELEASE RENAME REPLACE RESOURCE REVOKE ROLLBACK + syn keyword plsqlSQLKeyword ROW ROWLABEL ROWS SCHEMA + syn match plsqlSQLKeyword "\<SELECT\>" + syn keyword plsqlSQLKeyword SEPARATE SESSION SET + syn keyword plsqlSQLKeyword SHARE SIZE SPACE START STORE SUCCESSFUL SYNONYM + syn keyword plsqlSQLKeyword SYSDATE TABLE TABLES TABLESPACE TEMPORARY TO TREAT + syn keyword plsqlSQLKeyword TRIGGER TRUNCATE UID UNION UNIQUE UNLIMITED UPDATE + syn keyword plsqlSQLKeyword USE USER VALIDATE VALUES VIEW WHENEVER WHERE WITH endif @@ -565,17 +566,16 @@ syn keyword plsqlException TIMEOUT_ON_RESOURCE TOO_MANY_ROWS VALUE_ERROR syn keyword plsqlException ZERO_DIVIDE if exists("plsql_highlight_triggers") - syn keyword plsqlTrigger INSERTING UPDATING DELETING + syn keyword plsqlTrigger INSERTING UPDATING DELETING endif -" so can not contain it for folding +" so can not contain it for folding. May no longer be necessary and can change them to plsqlKeyword syn match plsqlBEGIN "\<BEGIN\>" syn match plsqlEND "\<END\>" -syn match plsqlISAS "\<\%\(IS\|AS\)\>" - +syn match plsqlISAS "\<\(IS\|AS\)\>" " Various types of comments. - syntax region plsqlCommentL start="--" skip="\\$" end="$" keepend extend contains=@plsqlCommentGroup,plsqlSpaceError +syntax region plsqlCommentL start="--" skip="\\$" end="$" keepend extend contains=@plsqlCommentGroup,plsqlSpaceError if exists("plsql_fold") syntax region plsqlComment \ start="/\*" end="\*/" @@ -599,11 +599,12 @@ syn match plsqlStringError "'.*$" " Various types of literals. " the + and - get sucked up as operators. Not sure how to take precedence here. Something to do with word boundaries. " most other syntax files do not try to includ +/- in the number token, so leave them as unary operators +" even though the oracle documentation counts the sign as part of the numeric literal syn match plsqlNumbers transparent "\<\d\|\.\d" contains=plsqlIntLiteral,plsqlFloatLiteral syn match plsqlNumbersCom contained transparent "\<\d\|\.\d" contains=plsqlIntLiteral,plsqlFloatLiteral syn match plsqlIntLiteral contained "\d\+" -syn match plsqlFloatLiteral contained "\d\+\.\%\(\d\+\%\([eE][+-]\?\d\+\)\?\)\?" -syn match plsqlFloatLiteral contained "\.\%\(\d\+\%\([eE][+-]\?\d\+\)\?\)" +syn match plsqlFloatLiteral contained "\d\+\.\(\d\+\([eE][+-]\?\d\+\)\?\)\?[fd]\?" +syn match plsqlFloatLiteral contained "\.\(\d\+\([eE][+-]\?\d\+\)\?\)[fd]\?" " double quoted strings in SQL are database object names. Should be a subgroup of Normal. " We will use Character group as a proxy for that so color can be chosen close to Normal @@ -639,146 +640,82 @@ syn match plsqlAttribute "%\(BULK_EXCEPTIONS\|BULK_ROWCOUNT\|ISOPEN\|FOUND\|NOTF syn cluster plsqlParenGroup contains=plsqlParenError,@plsqlCommentGroup,plsqlCommentSkip,plsqlIntLiteral,plsqlFloatLiteral,plsqlNumbersCom if exists("plsql_bracket_error") - if exists("plsql_fold") - syn region plsqlParen start='(' end=')' contains=ALLBUT,@plsqlParenGroup,plsqlErrInBracket fold keepend extend transparent - else - syn region plsqlParen transparent start='(' end=')' contains=ALLBUT,@plsqlParenGroup,plsqlErrInBracket - endif - syn match plsqlParenError "[\])]" - syn match plsqlErrInParen contained "[{}]" - syn region plsqlBracket transparent start='\[' end=']' contains=ALLBUT,@plsqlParenGroup,plsqlErrInParen - syn match plsqlErrInBracket contained "[);{}]" + " I suspect this code was copied from c.vim and never properly considered. Do + " we even use braces or brackets in sql or pl/sql? + if exists("plsql_fold") + syn region plsqlParen start='(' end=')' contains=ALLBUT,@plsqlParenGroup,plsqlErrInBracket fold keepend extend transparent + else + syn region plsqlParen transparent start='(' end=')' contains=ALLBUT,@plsqlParenGroup,plsqlErrInBracket + endif + syn match plsqlParenError "[\])]" + syn match plsqlErrInParen contained "[{}]" + syn region plsqlBracket transparent start='\[' end=']' contains=ALLBUT,@plsqlParenGroup,plsqlErrInParen + syn match plsqlErrInBracket contained "[);{}]" else - if exists("plsql_fold") - syn region plsqlParen start='(' end=')' contains=ALLBUT,@plsqlParenGroup,@plsqlFoldingGroupIgnore,plsqlErrInParen fold keepend extend transparent - else - syn region plsqlParen transparent start='(' end=')' contains=ALLBUT,@plsqlParenGroup,@plsqlFoldingGroupIgnore,plsqlErrInParen - endif - "syn region plsqlParen transparent start='(' end=')' contains=ALLBUT,@plsqlParenGroup,@plsqlProcedureGroup,plsqlBlock,plsqlBlockCont,plsqlPackage,plsqlProcedureJava - syn match plsqlParenError ")" - syn match plsqlErrInParen contained "[{}]" + if exists("plsql_fold") + syn region plsqlParen start='(' end=')' contains=ALLBUT,@plsqlParenGroup,plsqlErrInParen fold keepend extend transparent + else + syn region plsqlParen transparent start='(' end=')' contains=ALLBUT,@plsqlParenGroup,plsqlErrInParen + endif + syn match plsqlParenError ")" + " should this not be parens isntead of brackets? I never quite followed what this was doing + syn match plsqlErrInParen contained "[{}]" endif syn match plsqlReserved "\<BODY\>" -syn match plsqlReserved "\<CREATE\_s\+\%\(OR\_s\+REPLACE\_s\+\)\?" -" Loops. -syn match plsqlRepeat "\<\%\(FOR\|WHILE\|LOOP\|FORALL\)\>" -syn match plsqlRepeat "\<END\_s\+LOOP\>" -syn match plsqlConditional "\<\%\(ELSIF\|IF\|ELSE\)\>" -"syn match plsqlConditional "\<END\>\_s\+\<IF\>" +syn match plsqlReserved "\<CREATE\_s\+\(OR\_s\+REPLACE\_s\+\)\?" +" Loops +syn match plsqlRepeat "\<\(FOR\|WHILE\|LOOP\|FORALL\)\>" +syn match plsqlRepeat "\<END\_s\+LOOP\>" +" conditionals +syn match plsqlConditional "\<\(ELSIF\|IF\|ELSE\)\>" +syn match plsqlConditional "\<END\>\_s\+\<IF\>" +syn match plsqlCase "\<END\>\_s\+\<CASE\>" syn match plsqlCase "\<CASE\>" -"syn match plsqlCase "\<END\>\s_\+\<CASE\>" if exists("plsql_fold") setlocal foldmethod=syntax syn sync fromstart - syn cluster plsqlFoldingGroupIgnore contains=plsqlProcedureDeclaration - - "syntax match plsqlWhiteSpaceGroup "\_s\+" contained transparent - - - if exists("plsql_procedure_fold") - " this fails when a begin/end block is in a procedure. Unable to figure out why. - Lee + syn cluster plsqlProcedureGroup contains=plsqlProcedure + syn cluster plsqlOnlyGroup contains=@plsqlProcedure,plsqlConditionalBlock,plsqlLoopBlock,plsqlBlock - syntax region plsqlProcedure - "\ start="\(create\(\_s\+or\_s\+replace\)\?\_s\+\)\?\<\(procedure\|function\)\>\_s\+\z([a-z][a-z0-9$_#]*\)" - \ start="\(create\(\_s\+or\_s\+replace\)\?\_s\+\)\?\<\(procedure\|function\)\>\_s\+\z([a-z][a-z0-9$_#]*\)\([^;]\|\n\)\{-}\(\_s\+\<\(is\|as\)\>\)\@=" - \ end="\(\<end\>\(\_s\+\z1\)\?\_s*;\)" + syntax region plsqlUpdateSet + \ start="\(\<update\>\_s\+\(\<set\>\)\@![a-z][a-z0-9$_#]*\_s\+\(\(\<set\>\)\@![a-z][a-z0-9$_#]*\_s\+\)\?\)\|\(\<when\>\_s\+\<matched\>\_s\+\<then\>\_s\+\<update\>\_s\+\)\<set\>" + \ end="\(\_s*\(;\|\<from\>\|\<where\>\|\<when\>\)\)\@=" \ fold - \ extend - \ transparent \ keepend - \ contains=plsqlProcedureDeclaration,plsqlProcedureBlock,@plsqlCommentAll,plsqlKeyword,plsqlReserved,plsqlTypeAttribute,plsqlStorage - - syntax region plsqlProcedureDeclaration + \ extend \ transparent + \ contains=ALLBUT,@plsqlOnlyGroup,plsqlSelect + + syntax region plsqlSelect + \ start="\<select\>" + \ end="\(\_s*\<from\>\)\@=" \ fold - "\ start="\<\(is\|as\)\>\(\(\_.\)\{-}\<begin\>\)\@=" - \ start="\<\(is\|as\)\>" - \ end="\(\_s\+\<begin\>\)\@=" - \ nextgroup=plsqlProcedureBlock - \ contained - \ contains=ALLBUT,plsqlBlockCont,plsqlBlock,plsqlErrInBracket,plsqlPackage,plsqlProcedureDeclaration - ",plsqlProcedureBlock \ keepend - "\ extend -" must have keepend which is weird because it is 0 lenght - " ,plsqlEnd,plsqlISAS - - syntax region plsqlProcedureBlock - \ start="\<begin\>" - "\ skip="\_s\+\<begin\>\_.\{-}\<end\>\_s*;" - \ matchgroup=NONE - \ end="\(\<end\>\(\_s\+\(if\|loop\|case\)\@![a-z][a-z0-9$_#]*\)\?\_s*;\)" - "\ end="\(\<end\>\)\@=" - \ fold - \ contained - \ transparent - \ keepend - "\ extend - \ contains=ALLBUT,plsqlPackage,plsqlProcedure,plsqlProcedureBlock,plsqlProcedureDeclaration,plsqlProcedureJava,plsqlBlock - - "syn cluster plsqlProcedureGroup contains=plsqlProcedure,plsqlProcedureDeclaration,plsqlProcedureBlock - syn cluster plsqlProcedureGroup contains=plsqlProcedure,plsqlProcedureDeclaration,plsqlProcedureBlock - - " for inside packages - syn region plsqlProcedureSpec - \ start="\(procedure\|function\)\(\([^;]\|\n\)\{-}\<\(is\|as\)\>\)\@!" - "\ start="\(procedure\|function\)\(\([^;]\|\n\)\{-}\<\(is\|as\)\>\)\@!\(\_.*;\)\@=" - \ end=";" - \ keepend extend - \ contains=@plsqlIdentifiers,plsqlKeyword,plsqlReserved,@plsqlCommentAll,plsqlParen - \ transparent - - syntax region plsqlBlockCont + \ extend \ transparent - \ start="\<begin\>" - \ end="\<end\>\_s*;" + \ contains=ALLBUT,@plsqlOnlyGroup,plsqlUpdateSet + + " this is brute force and requires you have the procedure/function name in the END + " statement. ALthough Oracle makes it optional, we cannot. If you do not + " have it, then you can fold the BEGIN/END block of the procedure but not + " the specification of it (other than a paren group). You also cannot fold + " BEGIN/END blocks in the procedure body. Local procedures will fold as + " long as the END statement includes the procedure/function name. + " As for why we cannot make it work any other way, I don't know. It is + " something to do with both plsqlBlock and plsqlProcedure both consuming BEGIN and END, + " even if we use a lookahead for one of them. + syntax region plsqlProcedure + "\ start="\(create\(\_s\+or\_s\+replace\)\?\_s\+\)\?\<\(procedure\|function\)\>\_s\+\z([a-z][a-z0-9$_#]*\)" + \ start="\<\(procedure\|function\)\>\_s\+\(\z([a-z][a-z0-9$_#]*\)\)\([^;]\|\n\)\{-}\<\(is\|as\)\>\_.\{-}\(\<end\>\_s\+\2\_s*;\)\@=" + \ end="\<end\>\_s\+\z1\_s*;" \ fold + \ keepend \ extend - \ contained - \ contains=ALLBUT,@plsqlProcedureGroup,plsqlPackage,plsqlErrInBracket,PlsqlProcedureJava,plsqlBlock - \ keepend - "\ end="\<end\>\_s*\;" - - syntax region plsqlProcedureJava - \ matchgroup=NONE - \ start="\(\/\*\(\(\*\/\)\@!\_.\)*\*\/\_s*\)\?\(\(\(overriding\_s*\)\?member\|constructor\|static\)\_s*\)\?\<\(procedure\|function\)\>\_s*\(\k*\)\_[^;]\{-}\<\(is\|as\)\>\_s*language\_s*java\_s*name" - \ matchgroup=plsqlStringLiteral - \ end="'\_[^']*'\_s*;" - \ keepend extend - \ fold - \ contains=ALLBUT,plsqlProcedure,plsqlProcedureDeclaration,plsqlProcedureBlock,plsqlBlockCont,plsqlBlock,plsqlProcedureJava,plsqlErrInBracket,plsqlStringLiteral - - -" syntax region plsqlPackage -" \ start="\<create\>\_s\+\(or\_s\+replace\_s\+\)\?package\_s\+\(body\_s\+\)\?\z([a-z][a-z0-9$_#]*\)\>" -" \ matchgroup=plsqlEnd -" \ end="\<end\>\(\%\(\_s\+\z1\)\?\_s*;\)\@=" -" \ fold -" \ transparent -" \ keepend extend -" \ contains=plsqlProcedure,plsqlBlockCont,@plsqlCommentAll,plsqlKeyword,plsqlReserved,@plsqlIdentifiers -" "\ contains=ALLBUT,plsqlPackage,plsqlProcedureDeclaration,plsqlBlock,plsqlConditionalBlock,plsqlLoopBlock,plsqlCaseBlock - - if exists("plsql_syntax_test_flag") - hi plsqlProcedureDeclaration guifg='blue' - hi plsqlProcedureBlock guifg='red' - hi plsqlProcedure guifg='green' - hi plsqlCaseBlock guifg='pink' - hi plsqlBlock NONE - else - hi plsqlPackage NONE - hi plsqlProcedureDeclaration NONE - hi plsqlProcedureBlock NONE - hi plsqlProcedure NONE - hi plsqlBlock NONE - hi plsqlCaseBlock NONE - endif - - " end plsql_procedure_fold - endif + \ transparent + \ contains=ALLBUT,plsqlBlock syntax region plsqlBlock \ start="\<begin\>" @@ -809,7 +746,6 @@ if exists("plsql_fold") \ contained \ contains=ALLBUT,@plsqlProcedureGroup,plsqlPackage,plsqlErrInBracket,PlsqlProcedureJava - " Conditionals. syn region plsqlConditionalBlock \ transparent \ start="\<if\>\(\_s*;\)\@!" @@ -827,45 +763,45 @@ endif " Define the default highlighting. " Only when an item doesn't have highlighting yet. - hi def link plsqlAttribute Macro - hi def link plsqlBlockError Error - hi def link plsqlBooleanLiteral Boolean - hi def link plsqlQuotedIdentifier Character - hi def link plsqlComment Comment - hi def link plsqlCommentL Comment - hi def link plsqlConditional Keyword - hi def link plsqlCase Conditional - hi def link plsqlError Error - hi def link plsqlErrInBracket Error - hi def link plsqlErrInBlock Error - hi def link plsqlErrInParen Error - hi def link plsqlException Function - hi def link plsqlFloatLiteral Float - hi def link plsqlFunction Function - hi def link plsqlGarbage Error - hi def link plsqlHostIdentifier Label - hi def link plsqlIdentifier Normal - hi def link plsqlIntLiteral Number - hi def link plsqlOperator Operator - hi def link plsqlParenError Error - hi def link plsqlSpaceError Error - hi def link plsqlPseudo PreProc - hi def link plsqlKeyword Keyword - hi def link plsqlEND Keyword - hi def link plsqlBEGIN Keyword - hi def link plsqlISAS Statement - hi def link plsqlReserved Statement - hi def link plsqlRepeat Repeat - hi def link plsqlStorage StorageClass - hi def link plsqlFunction Function - hi def link plsqlStringError Error - hi def link plsqlStringLiteral String - hi def link plsqlCommentString String - hi def link plsqlComment2String String - hi def link plsqlTrigger Function - hi def link plsqlTypeAttribute StorageClass - hi def link plsqlTodo Todo -" to be able to change them, need override whether defined or not +hi def link plsqlAttribute Macro +hi def link plsqlBlockError Error +hi def link plsqlBooleanLiteral Boolean +hi def link plsqlQuotedIdentifier Character +hi def link plsqlComment Comment +hi def link plsqlCommentL Comment +hi def link plsqlConditional Conditional +hi def link plsqlCase Conditional +hi def link plsqlError Error +hi def link plsqlErrInBracket Error +hi def link plsqlErrInBlock Error +hi def link plsqlErrInParen Error +hi def link plsqlException Function +hi def link plsqlFloatLiteral Float +hi def link plsqlFunction Function +hi def link plsqlGarbage Error +hi def link plsqlHostIdentifier Label +hi def link plsqlIdentifier Normal +hi def link plsqlIntLiteral Number +hi def link plsqlOperator Operator +hi def link plsqlParenError Error +hi def link plsqlSpaceError Error +hi def link plsqlPseudo PreProc +hi def link plsqlKeyword Keyword +hi def link plsqlEND Keyword +hi def link plsqlBEGIN Keyword +hi def link plsqlISAS Statement +hi def link plsqlReserved Statement +hi def link plsqlRepeat Repeat +hi def link plsqlStorage StorageClass +hi def link plsqlFunction Function +hi def link plsqlStringError Error +hi def link plsqlStringLiteral String +hi def link plsqlCommentString String +hi def link plsqlComment2String String +hi def link plsqlTrigger Function +hi def link plsqlTypeAttribute StorageClass +hi def link plsqlTodo Todo +" to be able to change them after loading, need override whether defined or not if exists("plsql_legacy_sql_keywords") hi link plsqlSQLKeyword Function hi link plsqlSymbol Normal @@ -876,6 +812,8 @@ else endif let b:current_syntax = "plsql" + +" restore setting from when we entered this file let &cpo = s:cpo_sav unlet! s:cpo_sav diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 65b9776033..67329ba458 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -1,8 +1,8 @@ " Vim syntax file " Language: Vim 8.2 script " Maintainer: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM> -" Last Change: April 26, 2022 -" Version: 8.2-36 +" Last Change: May 07, 2022 +" Version: 8.2-38 " URL: http://www.drchip.org/astronaut/vim/index.html#SYNTAX_VIM " Automatically generated keyword lists: {{{1 @@ -79,12 +79,12 @@ syn match vimHLGroup contained "Conceal" syn case match " Function Names {{{2 -syn keyword vimFuncName contained abs argc assert_equal assert_match atan browse bufloaded byteidx charclass chdir ch_log ch_sendexpr col copy debugbreak diff_hlID empty execute expandcmd filter floor foldlevel function getchangelist getcmdline getcursorcharpos getftime getmarklist getreg gettagstack getwinposy has histdel hlID index inputsave isdirectory job_getchannel job_stop json_encode line listener_add log10 maplist matchaddpos matchfuzzypos menu_info nextnonblank popup_atcursor popup_dialog popup_getoptions popup_menu popup_show prompt_setcallback prop_clear prop_type_change pumvisible range reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setcursorcharpos setmatches settabwinvar shiftwidth sign_place simplify sound_clear spellbadword state strcharpart stridx strridx swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_null_blob test_null_list test_refcount test_void timer_stopall trunc uniq winbufnr win_getid win_id2win winnr win_splitmove -syn keyword vimFuncName contained acos argidx assert_equalfile assert_nobeep atan2 browsedir bufname byteidxcomp charcol ch_evalexpr ch_logfile ch_sendraw complete cos deepcopy digraph_get environ exepath extend finddir fmod foldtext garbagecollect getchar getcmdpos getcwd getftype getmatches getreginfo gettext getwinvar has_key histget hlset input inputsecret isinf job_info join keys line2byte listener_flush luaeval mapnew matcharg matchlist min nr2char popup_beval popup_filter_menu popup_getpos popup_move pow prompt_setinterrupt prop_find prop_type_delete py3eval readblob reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcellwidths setenv setpos settagstack sign_define sign_placelist sin soundfold spellsuggest str2float strchars string strtrans swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_channel test_null_partial test_setmouse timer_info tolower type values wincol win_gettype winlayout winrestcmd winwidth -syn keyword vimFuncName contained add arglistid assert_exception assert_notequal balloon_gettext bufadd bufnr call charidx ch_evalraw ch_open ch_setoptions complete_add cosh delete digraph_getlist escape exists extendnew findfile fnameescape foldtextresult get getcharmod getcmdtype getenv getimstatus getmousepos getregtype getwininfo glob haslocaldir histnr hostname inputdialog insert islocked job_setoptions js_decode len lispindent listener_remove map mapset matchdelete matchstr mkdir or popup_clear popup_filter_yesno popup_hide popup_notification prevnonblank prompt_setprompt prop_list prop_type_get pyeval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcharpos setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playevent split str2list strdisplaywidth strlen strwidth synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_dict test_null_string test_settime timer_pause toupper typename virtcol windowsversion win_gotoid winline winrestview wordcount -syn keyword vimFuncName contained and argv assert_fails assert_notmatch balloon_show bufexists bufwinid ceil ch_canread ch_getbufnr ch_read ch_status complete_check count deletebufline digraph_set eval exists_compiled feedkeys flatten fnamemodify foreground getbufinfo getcharpos getcmdwintype getfontname getjumplist getpid gettabinfo getwinpos glob2regpat hasmapto hlexists iconv inputlist interrupt isnan job_start js_encode libcall list2blob localtime maparg match matchend matchstrpos mode pathshorten popup_close popup_findinfo popup_list popup_setoptions printf prop_add prop_remove prop_type_list pyxeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setcharsearch setline setreg sha256 sign_getplaced sign_unplace slice sound_playfile sqrt str2nr strftime strpart submatch synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_gui_event test_null_function test_option_not_set test_srand_seed timer_start tr undofile visualmode win_execute winheight win_move_separator winsaveview writefile -syn keyword vimFuncName contained append asin assert_false assert_report balloon_split buflisted bufwinnr changenr ch_close ch_getjob ch_readblob cindent complete_info cscope_connection did_filetype digraph_setlist eventhandler exp filereadable flattennew foldclosed fullcommand getbufline getcharsearch getcompletion getfperm getline getpos gettabvar getwinposx globpath histadd hlget indent inputrestore invert items job_status json_decode libcallnr list2str log mapcheck matchadd matchfuzzy max mzeval perleval popup_create popup_findpreview popup_locate popup_settext prompt_getprompt prop_add_list prop_type_add pum_getpos rand readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setcmdpos setloclist settabvar shellescape sign_jump sign_unplacelist sort sound_stop srand strcharlen strgetchar strptime substitute synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_ignore_error test_null_job test_override test_unknown timer_stop trim undotree wildmenumode win_findbuf win_id2tabwin win_move_statusline win_screenpos xor -syn keyword vimFuncName contained appendbufline assert_beeps assert_inrange assert_true blob2list bufload byte2line char2nr ch_close_in ch_info ch_readraw clearmatches confirm cursor diff_filler echoraw executable expand filewritable float2nr foldclosedend funcref getbufvar getcharstr getcurpos getfsize getloclist getqflist gettabwinvar +syn keyword vimFuncName contained abs argc assert_equal assert_match atan browse bufloaded byteidx charclass chdir ch_log ch_sendexpr col copy debugbreak diff_hlID empty execute expandcmd filter floor foldlevel function getchangelist getcmdcompltype getcompletion getfperm getline getpos gettabvar getwinposx has histget hlset input inputsecret isdirectory job_getchannel job_stop json_encode line listener_add log10 maplist matchaddpos matchfuzzypos menu_info nextnonblank popup_atcursor popup_dialog popup_getoptions popup_menu popup_show prompt_setcallback prop_clear prop_type_change pumvisible range reduce reltimestr remote_send resolve screenchar screenstring searchpairpos setbufvar setcursorcharpos setmatches settabwinvar shiftwidth sign_place simplify sound_clear spellbadword state strcharpart stridx strridx swapinfo synIDtrans tabpagenr tanh term_getaltscreen term_getline term_gettty term_setansicolors term_start test_garbagecollect_now test_null_blob test_null_list test_refcount test_void timer_stopall trunc uniq winbufnr win_getid win_id2win winnr win_splitmove +syn keyword vimFuncName contained acos argidx assert_equalfile assert_nobeep atan2 browsedir bufname byteidxcomp charcol ch_evalexpr ch_logfile ch_sendraw complete cos deepcopy digraph_get environ exepath extend finddir fmod foldtext garbagecollect getchar getcmdline getcurpos getfsize getloclist getqflist gettabwinvar getwinposy has_key histnr hostname inputdialog insert isinf job_info join keys line2byte listener_flush luaeval mapnew matcharg matchlist min nr2char popup_beval popup_filter_menu popup_getpos popup_move pow prompt_setinterrupt prop_find prop_type_delete py3eval readblob reg_executing remote_expr remote_startserver reverse screenchars search searchpos setcellwidths setenv setpos settagstack sign_define sign_placelist sin soundfold spellsuggest str2float strchars string strtrans swapname synstack tabpagewinnr tempname term_getansicolors term_getscrolled terminalprops term_setapi term_wait test_garbagecollect_soon test_null_channel test_null_partial test_setmouse timer_info tolower type values wincol win_gettype winlayout winrestcmd winwidth +syn keyword vimFuncName contained add arglistid assert_exception assert_notequal balloon_gettext bufadd bufnr call charidx ch_evalraw ch_open ch_setoptions complete_add cosh delete digraph_getlist escape exists extendnew findfile fnameescape foldtextresult get getcharmod getcmdpos getcursorcharpos getftime getmarklist getreg gettagstack getwinvar haslocaldir hlexists iconv inputlist interrupt islocked job_setoptions js_decode len lispindent listener_remove map mapset matchdelete matchstr mkdir or popup_clear popup_filter_yesno popup_hide popup_notification prevnonblank prompt_setprompt prop_list prop_type_get pyeval readdir reg_recording remote_foreground remove round screencol searchcount server2client setcharpos setfperm setqflist setwinvar sign_getdefined sign_undefine sinh sound_playevent split str2list strdisplaywidth strlen strwidth synconcealed system tagfiles term_dumpdiff term_getattr term_getsize term_list term_setkill test_alloc_fail test_getvalue test_null_dict test_null_string test_settime timer_pause toupper typename virtcol windowsversion win_gotoid winline winrestview wordcount +syn keyword vimFuncName contained and argv assert_fails assert_notmatch balloon_show bufexists bufwinid ceil ch_canread ch_getbufnr ch_read ch_status complete_check count deletebufline digraph_set eval exists_compiled feedkeys flatten fnamemodify foreground getbufinfo getcharpos getcmdscreenpos getcwd getftype getmatches getreginfo gettext glob hasmapto hlget indent inputrestore invert isnan job_start js_encode libcall list2blob localtime maparg match matchend matchstrpos mode pathshorten popup_close popup_findinfo popup_list popup_setoptions printf prop_add prop_remove prop_type_list pyxeval readdirex reltime remote_peek rename rubyeval screenpos searchdecl serverlist setcharsearch setline setreg sha256 sign_getplaced sign_unplace slice sound_playfile sqrt str2nr strftime strpart submatch synID systemlist taglist term_dumpload term_getcursor term_getstatus term_scrape term_setrestore test_autochdir test_gui_event test_null_function test_option_not_set test_srand_seed timer_start tr undofile visualmode win_execute winheight win_move_separator winsaveview writefile +syn keyword vimFuncName contained append asin assert_false assert_report balloon_split buflisted bufwinnr changenr ch_close ch_getjob ch_readblob cindent complete_info cscope_connection did_filetype digraph_setlist eventhandler exp filereadable flattennew foldclosed fullcommand getbufline getcharsearch getcmdtype getenv getimstatus getmousepos getregtype getwininfo glob2regpat histadd hlID index inputsave isabsolutepath items job_status json_decode libcallnr list2str log mapcheck matchadd matchfuzzy max mzeval perleval popup_create popup_findpreview popup_locate popup_settext prompt_getprompt prop_add_list prop_type_add pum_getpos rand readfile reltimefloat remote_read repeat screenattr screenrow searchpair setbufline setcmdpos setloclist settabvar shellescape sign_jump sign_unplacelist sort sound_stop srand strcharlen strgetchar strptime substitute synIDattr tabpagebuflist tan term_dumpwrite term_getjob term_gettitle term_sendkeys term_setsize test_feedinput test_ignore_error test_null_job test_override test_unknown timer_stop trim undotree wildmenumode win_findbuf win_id2tabwin win_move_statusline win_screenpos xor +syn keyword vimFuncName contained appendbufline assert_beeps assert_inrange assert_true blob2list bufload byte2line char2nr ch_close_in ch_info ch_readraw clearmatches confirm cursor diff_filler echoraw executable expand filewritable float2nr foldclosedend funcref getbufvar getcharstr getcmdwintype getfontname getjumplist getpid gettabinfo getwinpos globpath histdel "--- syntax here and above generated by mkvimvim --- " Special Vim Highlighting (not automatic) {{{1 diff --git a/runtime/syntax/wget.vim b/runtime/syntax/wget.vim index 2587022f2e..8178d02bad 100644 --- a/runtime/syntax/wget.vim +++ b/runtime/syntax/wget.vim @@ -1,7 +1,9 @@ " Vim syntax file " Language: Wget configuration file (/etc/wgetrc ~/.wgetrc) " Maintainer: Doug Kearns <dougkearns@gmail.com> -" Last Change: 2013 Jun 1 +" Last Change: 2022 Apr 28 + +" GNU Wget 1.21 built on linux-gnu. if exists("b:current_syntax") finish @@ -18,155 +20,206 @@ syn region wgetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline syn region wgetString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline syn case ignore -syn keyword wgetBoolean on off contained -syn keyword wgetNumber inf contained -syn case match -syn match wgetNumber "\<\%(\d\+\|inf\)\>" contained -syn match wgetQuota "\<\d\+[kKmM]\>" contained -syn match wgetTime "\<\d\+[smhdw]\>" contained +syn keyword wgetBoolean on off yes no contained +syn keyword wgetNumber inf contained + +syn match wgetNumber "\<\d\+>" contained +syn match wgetQuota "\<\d\+[kmgt]\>" contained +syn match wgetTime "\<\d\+[smhdw]\>" contained "{{{ Commands -let s:commands = map([ - \ "accept", - \ "add_hostdir", - \ "adjust_extension", - \ "always_rest", - \ "ask_password", - \ "auth_no_challenge", - \ "background", - \ "backup_converted", - \ "backups", - \ "base", - \ "bind_address", - \ "ca_certificate", - \ "ca_directory", - \ "cache", - \ "certificate", - \ "certificate_type", - \ "check_certificate", - \ "connect_timeout", - \ "content_disposition", - \ "continue", - \ "convert_links", - \ "cookies", - \ "cut_dirs", - \ "debug", - \ "default_page", - \ "delete_after", - \ "dns_cache", - \ "dns_timeout", - \ "dir_prefix", - \ "dir_struct", - \ "domains", - \ "dot_bytes", - \ "dots_in_line", - \ "dot_spacing", - \ "dot_style", - \ "egd_file", - \ "exclude_directories", - \ "exclude_domains", - \ "follow_ftp", - \ "follow_tags", - \ "force_html", - \ "ftp_passwd", - \ "ftp_password", - \ "ftp_user", - \ "ftp_proxy", - \ "glob", - \ "header", - \ "html_extension", - \ "htmlify", - \ "http_keep_alive", - \ "http_passwd", - \ "http_password", - \ "http_proxy", - \ "https_proxy", - \ "http_user", - \ "ignore_case", - \ "ignore_length", - \ "ignore_tags", - \ "include_directories", - \ "inet4_only", - \ "inet6_only", - \ "input", - \ "iri", - \ "keep_session_cookies", - \ "kill_longer", - \ "limit_rate", - \ "load_cookies", - \ "locale", - \ "local_encoding", - \ "logfile", - \ "login", - \ "max_redirect", - \ "mirror", - \ "netrc", - \ "no_clobber", - \ "no_parent", - \ "no_proxy", - \ "numtries", - \ "output_document", - \ "page_requisites", - \ "passive_ftp", - \ "passwd |