diff options
Diffstat (limited to 'runtime/syntax')
| -rw-r--r-- | runtime/syntax/autohotkey.vim | 188 | ||||
| -rw-r--r-- | runtime/syntax/c.vim | 4 | ||||
| -rw-r--r-- | runtime/syntax/css.vim | 5 | ||||
| -rw-r--r-- | runtime/syntax/debchangelog.vim | 4 | ||||
| -rw-r--r-- | runtime/syntax/debcontrol.vim | 2 | ||||
| -rw-r--r-- | runtime/syntax/debsources.vim | 4 | ||||
| -rw-r--r-- | runtime/syntax/fortran.vim | 10 | ||||
| -rw-r--r-- | runtime/syntax/html.vim | 32 | ||||
| -rw-r--r-- | runtime/syntax/matlab.vim | 10 | ||||
| -rw-r--r-- | runtime/syntax/nasm.vim | 25 | ||||
| -rw-r--r-- | runtime/syntax/php.vim | 40 | ||||
| -rw-r--r-- | runtime/syntax/sh.vim | 20 | ||||
| -rw-r--r-- | runtime/syntax/sshconfig.vim | 5 | ||||
| -rw-r--r-- | runtime/syntax/sshdconfig.vim | 5 | ||||
| -rw-r--r-- | runtime/syntax/tex.vim | 38 | ||||
| -rw-r--r-- | runtime/syntax/vim.vim | 3 | ||||
| -rw-r--r-- | runtime/syntax/xpm.vim | 7 | ||||
| -rw-r--r-- | runtime/syntax/xpm2.vim | 7 |
18 files changed, 257 insertions, 152 deletions
diff --git a/runtime/syntax/autohotkey.vim b/runtime/syntax/autohotkey.vim index 764f94b11a..3b826af6f5 100644 --- a/runtime/syntax/autohotkey.vim +++ b/runtime/syntax/autohotkey.vim @@ -1,8 +1,10 @@ " Vim syntax file " Language: AutoHotkey script file -" Maintainer: SungHyun Nam <goweol@gmail.com> -" Previous Maintainer: Nikolai Weibull <now@bitwi.se> -" Latest Revision: 2015-10-29 +" Maintainer: Michael Wong +" https://github.com/mmikeww/autohotkey.vim +" Latest Revision: 2017-01-23 +" Previous Maintainers: SungHyun Nam <goweol@gmail.com> +" Nikolai Weibull <now@bitwi.se> if exists("b:current_syntax") finish @@ -17,68 +19,11 @@ syn keyword autohotkeyTodo \ contained \ TODO FIXME XXX NOTE -syn cluster autohotkeyCommentGroup - \ contains= - \ autohotkeyTodo, - \ @Spell - -syn match autohotkeyComment - \ display - \ contains=@autohotkeyCommentGroup - \ '`\@<!;.*$' - -syn region autohotkeyComment - \ contains=@autohotkeyCommentGroup - \ matchgroup=autohotkeyCommentStart - \ start='/\*' - \ end='\*/' - +" only these chars are valid as escape sequences: ,%`;nrbtvaf +" https://autohotkey.com/docs/commands/_EscapeChar.htm syn match autohotkeyEscape \ display - \ '`.' - -syn match autohotkeyHotkey - \ contains=autohotkeyKey, - \ autohotkeyHotkeyDelimiter - \ display - \ '^.\{-}::' - -syn match autohotkeyKey - \ contained - \ display - \ '^.\{-}' - -syn match autohotkeyDelimiter - \ contained - \ display - \ '::' - -syn match autohotkeyHotstringDefinition - \ contains=autohotkeyHotstring, - \ autohotkeyHotstringDelimiter - \ display - \ '^:\%(B0\|C1\|K\d\+\|P\d\+\|S[IPE]\|Z\d\=\|[*?COR]\)*:.\{-}::' - -syn match autohotkeyHotstring - \ contained - \ display - \ '.\{-}' - -syn match autohotkeyHotstringDelimiter - \ contained - \ display - \ '::' - -syn match autohotkeyHotstringDelimiter - \ contains=autohotkeyHotstringOptions - \ contained - \ display - \ ':\%(B0\|C1\|K\d\+\|P\d\+\|S[IPE]\|Z\d\=\|[*?COR]\):' - -syn match autohotkeyHotstringOptions - \ contained - \ display - \ '\%(B0\|C1\|K\d\+\|P\d\+\|S[IPE]\|Z\d\=\|[*?COR]\)' + \ '`[,%`;nrbtvaf]' syn region autohotkeyString \ display @@ -88,39 +33,46 @@ syn region autohotkeyString \ end=+"+ \ contains=autohotkeyEscape -syn region autohotkeyVariable +syn match autohotkeyVariable \ display \ oneline \ contains=autohotkeyBuiltinVariable - \ matchgroup=autohotkeyVariableDelimiter - \ start="%" - \ end="%" \ keepend + \ '%\S\{-}%' syn keyword autohotkeyBuiltinVariable \ A_Space A_Tab - \ A_WorkingDir A_ScriptDir A_ScriptName A_ScriptFullPath A_LineNumber - \ A_LineFile A_AhkVersion A_AhkPAth A_IsCompiled A_ExitReason - \ A_YYYY A_MM A_DD A_MMMM A_MMM A_DDDD A_DDD A_WDay A_YWeek A_Hour A_Min + \ A_WorkingDir A_ScriptDir A_ScriptName A_ScriptFullPath A_ScriptHwnd A_LineNumber + \ A_LineFile A_ThisFunc A_ThisLabel A_AhkVersion A_AhkPath A_IsUnicode A_IsCompiled A_ExitReason + \ A_YYYY A_MM A_DD A_MMMM A_MMM A_DDDD A_DDD A_WDay A_YDay A_YWeek A_Hour A_Min + \ A_Mon A_Year A_MDay A_NumBatchLines \ A_Sec A_MSec A_Now A_NowUTC A_TickCount - \ A_IsSuspended A_BatchLines A_TitleMatchMode A_TitleMatchModeSpeed - \ A_DetectHiddenWindows A_DetectHiddenText A_AutoTrim A_STringCaseSense - \ A_FormatInteger A_FormatFloat A_KeyDelay A_WinDelay A_ControlDelay - \ A_MouseDelay A_DefaultMouseSpeed A_IconHidden A_IconTip A_IconFile + \ A_IsSuspended A_IsPaused A_IsCritical A_BatchLines A_TitleMatchMode A_TitleMatchModeSpeed + \ A_DetectHiddenWindows A_DetectHiddenText A_AutoTrim A_StringCaseSense + \ A_FileEncoding A_FormatInteger A_FormatFloat A_KeyDelay A_WinDelay A_ControlDelay + \ A_SendMode A_SendLevel A_StoreCapsLockMode A_KeyDelay A_KeyDelayDuration + \ A_KeyDelayPlay A_KeyDelayPlayDuration A_MouseDelayPlay + \ A_MouseDelay A_DefaultMouseSpeed A_RegView A_IconHidden A_IconTip A_IconFile + \ A_CoordModeToolTip A_CoordModePixel A_CoordModeMouse A_CoordModeCaret A_CoordModeMenu \ A_IconNumber - \ A_TimeIdle A_TimeIdlePhysical + \ A_TimeIdle A_TimeIdlePhysical A_DefaultGui A_DefaultListView A_DefaultTreeView \ A_Gui A_GuiControl A_GuiWidth A_GuiHeight A_GuiX A_GuiY A_GuiEvent \ A_GuiControlEvent A_EventInfo \ A_ThisMenuItem A_ThisMenu A_ThisMenuItemPos A_ThisHotkey A_PriorHotkey - \ A_TimeSinceThisHotkey A_TimeSincePriorHotkey A_EndChar + \ A_PriorKey A_TimeSinceThisHotkey A_TimeSincePriorHotkey A_EndChar \ ComSpec A_Temp A_OSType A_OSVersion A_Language A_ComputerName A_UserName + \ A_Is64BitOS A_PtrSize \ A_WinDir A_ProgramFiles ProgramFiles A_AppData A_AppDataCommon A_Desktop \ A_DesktopCommon A_StartMenu A_StartMenuCommon A_Programs \ A_ProgramsCommon A_Startup A_StartupCommon A_MyDocuments A_IsAdmin - \ A_ScreenWidth A_ScreenHeight A_IPAddress1 A_IPAddress2 A_IPAddress3 + \ A_ScreenWidth A_ScreenHeight A_ScreenDPI A_IPAddress1 A_IPAddress2 A_IPAddress3 \ A_IPAddress4 \ A_Cursor A_CaretX A_CaretY Clipboard ClipboardAll ErrorLevel A_LastError \ A_Index A_LoopFileName A_LoopRegName A_LoopReadLine A_LoopField + \ A_LoopFileExt A_LoopFileFullPath A_LoopFileLongPath A_LoopFileShortPath + \ A_LoopFileShortName A_LoopFileDir A_LoopFileTimeModified A_LoopFileTimeCreated + \ A_LoopFileTimeAccessed A_LoopFileAttrib A_LoopFileSize A_LoopFileSizeKB A_LoopFileSizeMB + \ A_LoopRegType A_LoopRegKey A_LoopRegSubKey A_LoopRegTimeModified syn match autohotkeyBuiltinVariable \ contained @@ -130,7 +82,7 @@ syn match autohotkeyBuiltinVariable syn keyword autohotkeyCommand \ ClipWait EnvGet EnvSet EnvUpdate \ Drive DriveGet DriveSpaceFree FileAppend FileCopy FileCopyDir - \ FileCreateDir FileCreateShortcut FileDelete FileGetAttrib + \ FileCreateDir FileCreateShortcut FileDelete FileGetAttrib FileEncoding \ FileGetShortcut FileGetSize FileGetTime FileGetVersion FileInstall \ FileMove FileMoveDir FileReadLine FileRead FileRecycle FileRecycleEmpty \ FileRemoveDir FileSelectFolder FileSelectFile FileSetAttrib FileSetTime @@ -153,7 +105,7 @@ syn keyword autohotkeyCommand \ SoundSetWaveVolume \ FormatTime IfInString IfNotInString Sort StringCaseSense StringGetPos \ StringLeft StringRight StringLower StringUpper StringMid StringReplace - \ StringSplit StringTrimLeft StringTrimRight + \ StringSplit StringTrimLeft StringTrimRight StringLen \ Control ControlClick ControlFocus ControlGet ControlGetFocus \ ControlGetPos ControlGetText ControlMove ControlSend ControlSendRaw \ ControlSetText Menu PostMessage SendMessage SetControlDelay @@ -164,12 +116,16 @@ syn keyword autohotkeyCommand \ WinGetText WinGetTitle WinHide WinKill WinMaximize WinMinimize \ WinMinimizeAll WinMinimizeAllUndo WinMove WinRestore WinSet \ WinSetTitle WinShow WinWait WinWaitActive WinWaitNotActive WinWaitClose + \ SetCapsLockState SetNumLockState SetScrollLockState syn keyword autohotkeyFunction \ InStr RegExMatch RegExReplace StrLen SubStr Asc Chr \ DllCall VarSetCapacity WinActive WinExist IsLabel OnMessage \ Abs Ceil Exp Floor Log Ln Mod Round Sqrt Sin Cos Tan ASin ACos ATan - \ FileExist GetKeyState + \ FileExist GetKeyState NumGet NumPut StrGet StrPut RegisterCallback + \ IsFunc Trim LTrim RTrim IsObject Object Array FileOpen + \ ComObjActive ComObjArray ComObjConnect ComObjCreate ComObjGet + \ ComObjError ComObjFlags ComObjQuery ComObjType ComObjValue ComObject syn keyword autohotkeyStatement \ Break Continue Exit ExitApp Gosub Goto OnExit Pause Return @@ -180,7 +136,9 @@ syn keyword autohotkeyRepeat syn keyword autohotkeyConditional \ IfExist IfNotExist If IfEqual IfLess IfGreater Else - \ IfWinExist IfWinNotExist + \ IfWinExist IfWinNotExist IfWinActive IfWinNotActive + \ IfNotEqual IfLessOrEqual IfGreaterOrEqual + \ while until for in syn match autohotkeyPreProcStart \ nextgroup= @@ -200,6 +158,7 @@ syn keyword autohotkeyPreProc \ HotkeyInterval HotKeyModifierTimeout \ Hotstring \ IfWinActive IfWinNotActive IfWinExist IfWinNotExist + \ If IfTimeout \ MaxHotkeysPerInterval MaxThreads MaxThreadsBuffer MaxThreadsPerHotkey \ UseHook InstallKeybdHook InstallMouseHook \ KeyHistory @@ -213,6 +172,10 @@ syn keyword autohotkeyPreProc \ MaxMem \ NoEnv \ Persistent + \ LTrim + \ InputLevel + \ MenuMaskKey + \ Warn syn keyword autohotkeyMatchClass \ ahk_group ahk_class ahk_id ahk_pid @@ -243,11 +206,74 @@ syn match autohotkeyFloat syn keyword autohotkeyType \ local \ global + \ static + \ byref syn keyword autohotkeyBoolean \ true \ false +syn match autohotkeyHotkey + \ contains=autohotkeyKey, + \ autohotkeyHotkeyDelimiter + \ display + \ '^.\{-}::' + +syn match autohotkeyKey + \ contained + \ display + \ '^.\{-}' + +syn match autohotkeyDelimiter + \ contained + \ display + \ '::' + +" allowable hotstring options: +" https://autohotkey.com/docs/Hotstrings.htm +syn match autohotkeyHotstringDefinition + \ contains=autohotkeyHotstring, + \ autohotkeyHotstringDelimiter + \ display + \ '^\s*:\%([*?]\|[BORZ]0\?\|C[01]\?\|K\d\+\|P\d\+\|S[IPE]\)*:.\{-}::' + +syn match autohotkeyHotstring + \ contained + \ display + \ '.\{-}' + +syn match autohotkeyHotstringDelimiter + \ contained + \ display + \ '::' + +syn match autohotkeyHotstringDelimiter + \ contains=autohotkeyHotstringOptions + \ contained + \ display + \ ':\%([*?]\|[BORZ]0\?\|C[01]\?\|K\d\+\|P\d\+\|S[IPE]\)*:' + +syn match autohotkeyHotstringOptions + \ contained + \ display + \ '\%([*?]\|[BORZ]0\?\|C[01]\?\|K\d\+\|P\d\+\|S[IPE]\)*' + +syn cluster autohotkeyCommentGroup + \ contains= + \ autohotkeyTodo, + \ @Spell + +syn match autohotkeyComment + \ display + \ contains=@autohotkeyCommentGroup + \ '\%(^;\|\s\+;\).*$' + +syn region autohotkeyComment + \ contains=@autohotkeyCommentGroup + \ matchgroup=autohotkeyCommentStart + \ start='^\s*/\*' + \ end='^\s*\*/' + " TODO: Shouldn't we look for g:, b:, variables before defaulting to " something? if exists("g:autohotkey_syntax_sync_minlines") diff --git a/runtime/syntax/c.vim b/runtime/syntax/c.vim index 2b946dd73d..cc99f674a1 100644 --- a/runtime/syntax/c.vim +++ b/runtime/syntax/c.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: C " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2016 Oct 27 +" Last Change: 2016 Nov 17 " Quit when a (custom) syntax file was already loaded if exists("b:current_syntax") @@ -365,7 +365,7 @@ if !exists("c_no_if0") syn region cCppOutWrapper start="^\s*\zs\(%:\|#\)\s*if\s\+0\+\s*\($\|//\|/\*\|&\)" end=".\@=\|$" contains=cCppOutIf,cCppOutElse,@NoSpell fold syn region cCppOutIf contained start="0\+" matchgroup=cCppOutWrapper end="^\s*\zs\(%:\|#\)\s*endif\>" contains=cCppOutIf2,cCppOutElse if !exists("c_no_if0_fold") - syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\zs\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold + syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell fold else syn region cCppOutIf2 contained matchgroup=cCppOutWrapper start="0\+" end="^\s*\(%:\|#\)\s*\(else\>\|elif\s\+\(0\+\s*\($\|//\|/\*\|&\)\)\@!\|endif\>\)"me=s-1 contains=cSpaceError,cCppOutSkip,@Spell endif diff --git a/runtime/syntax/css.vim b/runtime/syntax/css.vim index 3dc3f5c2d6..23db7b10e8 100644 --- a/runtime/syntax/css.vim +++ b/runtime/syntax/css.vim @@ -6,7 +6,8 @@ " Nikolai Weibull (Add CSS2 support) " Maintainer: Jules Wang <w.jq0722@gmail.com> " URL: https://github.com/JulesWang/css.vim -" Last Change: 2015 Apr.17 +" Last Change: 2017 Jan 14 +" cssClassName updated by Ryuichi Hayashida Jan 2016 " quit when a syntax file was already loaded if !exists("main_syntax") @@ -56,7 +57,7 @@ syn match cssSelectorOp2 "[~|^$*]\?=" contained syn region cssAttributeSelector matchgroup=cssSelectorOp start="\[" end="]" contains=cssUnicodeEscape,cssSelectorOp2,cssStringQ,cssStringQQ " .class and #id -syn match cssClassName "\.[A-Za-z][A-Za-z0-9_-]\+" contains=cssClassNameDot +syn match cssClassName "\.-\=[A-Za-z_][A-Za-z0-9_-]*" contains=cssClassNameDot syn match cssClassNameDot contained '\.' try diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim index a10e4ad342..eb02aaf4af 100644 --- a/runtime/syntax/debchangelog.vim +++ b/runtime/syntax/debchangelog.vim @@ -3,7 +3,7 @@ " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> " Former Maintainers: Gerfried Fuchs <alfie@ist.org> " Wichert Akkerman <wakkerma@debian.org> -" Last Change: 2016 Aug 30 +" Last Change: 2016 Nov 12 " URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debchangelog.vim " Standard syntax initialization @@ -21,7 +21,7 @@ let binNMU='binary-only=yes' syn match debchangelogName contained "^[[:alnum:]][[:alnum:].+-]\+ " exe 'syn match debchangelogFirstKV contained "; \('.urgency.'\|'.binNMU.'\)"' exe 'syn match debchangelogOtherKV contained ", \('.urgency.'\|'.binNMU.'\)"' -syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|wheezy-%(backports%(-sloppy)=|security)|jessie%(-backports|-security)=|stretch|%(devel|precise|trusty|vivid|wily|xenial|yakkety)%(-%(security|proposed|updates|backports|commercial|partner))=)+" +syn match debchangelogTarget contained "\v %(frozen|unstable|sid|%(testing|%(old)=stable)%(-proposed-updates|-security)=|experimental|squeeze-%(backports%(-sloppy)=|volatile|lts|security)|wheezy-%(backports%(-sloppy)=|security)|jessie%(-backports|-security)=|stretch|%(devel|precise|trusty|vivid|wily|xenial|yakkety|zesty)%(-%(security|proposed|updates|backports|commercial|partner))=)+" syn match debchangelogVersion contained "(.\{-})" syn match debchangelogCloses contained "closes:\_s*\(bug\)\=#\=\_s\=\d\+\(,\_s*\(bug\)\=#\=\_s\=\d\+\)*" syn match debchangelogLP contained "\clp:\s\+#\d\+\(,\s*#\d\+\)*" diff --git a/runtime/syntax/debcontrol.vim b/runtime/syntax/debcontrol.vim index b52c496c95..b1bc9f8bfe 100644 --- a/runtime/syntax/debcontrol.vim +++ b/runtime/syntax/debcontrol.vim @@ -38,7 +38,7 @@ unlet s:kernels s:archs s:pairs syn match debcontrolMultiArch contained "\%(no\|foreign\|allowed\|same\)" syn match debcontrolName contained "[a-z0-9][a-z0-9+.-]\+" syn match debcontrolPriority contained "\(extra\|important\|optional\|required\|standard\)" -syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|education|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|introspection|java|kde|kernel|libs|libdevel|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)" +syn match debcontrolSection contained "\v((contrib|non-free|non-US/main|non-US/contrib|non-US/non-free|restricted|universe|multiverse)/)?(admin|cli-mono|comm|database|debian-installer|debug|devel|doc|editors|education|electronics|embedded|fonts|games|gnome|gnustep|gnu-r|graphics|hamradio|haskell|httpd|interpreters|introspection|java|javascript|kde|kernel|libs|libdevel|lisp|localization|mail|math|metapackages|misc|net|news|ocaml|oldlibs|otherosfs|perl|php|python|ruby|rust|science|shells|sound|text|tex|utils|vcs|video|web|x11|xfce|zope)" syn match debcontrolPackageType contained "u\?deb" syn match debcontrolVariable contained "\${.\{-}}" syn match debcontrolDmUpload contained "\cyes" diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim index 2777944971..390c43035e 100644 --- a/runtime/syntax/debsources.vim +++ b/runtime/syntax/debsources.vim @@ -2,7 +2,7 @@ " Language: Debian sources.list " Maintainer: Debian Vim Maintainers <pkg-vim-maintainers@lists.alioth.debian.org> " Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl> -" Last Change: 2016 Sep 27 +" Last Change: 2016 Nov 12 " URL: https://anonscm.debian.org/cgit/pkg-vim/vim.git/plain/runtime/syntax/debsources.vim " Standard syntax initialization @@ -25,7 +25,7 @@ let s:supported = [ \ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', \ 'squeeze', 'wheezy', 'jessie', 'stretch', 'sid', 'rc-buggy', \ - \ 'precise', 'trusty', 'xenial', 'yakkety', 'devel' + \ 'precise', 'trusty', 'xenial', 'yakkety', 'zesty', 'devel' \ ] let s:unsupported = [ \ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato', diff --git a/runtime/syntax/fortran.vim b/runtime/syntax/fortran.vim index 9d9ab69a3a..4c26e78f16 100644 --- a/runtime/syntax/fortran.vim +++ b/runtime/syntax/fortran.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, and 77) -" Version: 0.99 -" Last Change: 2016 Sep. 23 +" Version: 100 +" Last Change: 2016 Oct. 29 " Maintainer: Ajit J. Thakkar <ajit@unb.ca>; <http://www2.unb.ca/~ajit/> " Usage: For instructions, do :help fortran-syntax from Vim " Credits: @@ -397,6 +397,7 @@ if exists("fortran_fold") syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule syn region fortranBlockData transparent fold keepend start="\<block\s*data\(\s\+\z(\a\w*\)\)\=" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*\($\|block\s*data\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock + syn region fortranAssociate transparent fold keepend start="^\s*\<associate\s\+" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*associate" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction syn region fortranInterface transparent fold keepend extend start="^\s*\(abstract \)\=\s*interface\>" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\(,\s*\(public\|private\|abstract\)\)\=\s*::" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock,fortranInterface else @@ -406,6 +407,7 @@ if exists("fortran_fold") syn region fortranFunction transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*\(\(\(real \|integer \|logical \|complex \|double \s*precision \)\s*\((\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\|type\s\+(\s*\w\+\s*) \|character \((\(\s*len\s*=\)\=\s*\d\+\s*)\|(\(\s*kind\s*=\)\=\s*\w\+\s*)\)\=\)\=\s*function\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|function\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule syn region fortranSubroutine transparent fold keepend extend start="^\s*\(elemental \|pure \|impure \|module \|recursive \)\=\s*subroutine\s\+\z(\a\w*\)" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|subroutine\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule syn region fortranBlockData transparent fold keepend start="\<block\s*data\(\s\+\z(\a\w*\)\)\=" skip="^\s*[!#].*$" excludenl end="\<end\s*\($\|block\s*data\(\s\+\z1\>\)\=\)" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock + syn region fortranAssociate transparent fold keepend start="^\s*\<associate\s\+" skip="^\s*[!#].*$" excludenl end="\<end\s*associate" contains=ALLBUT,fortranProgram,fortranModule,fortranSubroutine,fortranFunction syn region fortranInterface transparent fold keepend extend start="^\s*\(abstract \)\=\s*interface\>" skip="^\s*[!#].*$" excludenl end="\<end\s*interface\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock syn region fortranTypeDef transparent fold keepend extend start="^\s*type\s*\(,\s*\(public\|private\|abstract\)\)\=\s*::" skip="^\s*[!#].*$" excludenl end="\<end\s*type\>" contains=ALLBUT,fortranProgram,fortranModule,fortran77Loop,fortranCase,fortran90Loop,fortranIfBlock,fortranInterface endif @@ -415,12 +417,12 @@ if exists("fortran_fold") syn region fortran77Loop transparent fold keepend start="\<do\s\+\z(\d\+\)" end="^\s*\z1\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData syn region fortran90Loop transparent fold keepend extend start="\(\<end\s\+\)\@<!\<do\(\s\+\a\|\s*$\)" skip="^\([!c*]\|\s*#\).*$" excludenl end="\<end\s*do\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData syn region fortranIfBlock transparent fold keepend extend start="\(\<e\(nd\|lse\)\s\+\)\@<!\<if\s*(.\+)\s*then\>" skip="^\([!c*]\|\s*#\).*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData - syn region fortranCase transparent fold keepend extend start="\<select\s*case\>" skip="^\([!c*]\|\s*#\).*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData + syn region fortranCase transparent fold keepend extend start="\<select\s*\(case\|type\)\>" skip="^\([!c*]\|\s*#\).*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData else syn region fortran77Loop transparent fold keepend start="\<do\s\+\z(\d\+\)" end="^\s*\z1\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData syn region fortran90Loop transparent fold keepend extend start="\(\<end\s\+\)\@<!\<do\(\s\+\a\|\s*$\)" skip="^\s*[!#].*$" excludenl end="\<end\s*do\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData syn region fortranIfBlock transparent fold keepend extend start="\(\<e\(nd\|lse\)\s\+\)\@<!\<if\s*(\(.\|&\s*\n\)\+)\(\s\|&\s*\n\)*then\>" skip="^\s*[!#].*$" end="\<end\s*if\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData - syn region fortranCase transparent fold keepend extend start="\<select\s*case\>" skip="^\s*[!#].*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData + syn region fortranCase transparent fold keepend extend start="\<select\s*\(case\|type\)\>" skip="^\s*[!#].*$" end="\<end\s*select\>" contains=ALLBUT,fortranUnitHeader,fortranStructure,fortranStorageClass,fortranType,fortranProgram,fortranModule,fortranSubroutine,fortranFunction,fortranBlockData endif endif diff --git a/runtime/syntax/html.vim b/runtime/syntax/html.vim index 336d8c9f44..49d3ab4adb 100644 --- a/runtime/syntax/html.vim +++ b/runtime/syntax/html.vim @@ -1,9 +1,10 @@ " Vim syntax file -" Language: HTML -" Maintainer: Claudio Fleiner <claudio@fleiner.com> -" URL: http://www.fleiner.com/vim/syntax/html.vim -" Last Change: 2015 Jan 07 -" included patch from David Felix +" 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 Jan 21 +" included patch from Jorge Maldonado Ventura " Please check :help html.vim for some comments and a description of the options @@ -53,6 +54,14 @@ syn keyword htmlTagName contained abbr acronym bdo button col label syn keyword htmlTagName contained colgroup del fieldset iframe ins legend syn keyword htmlTagName contained object optgroup q s tbody tfoot thead +" new html 5 tags +syn keyword htmlTagName contained article aside audio bdi canvas data +syn keyword htmlTagName contained datalist details embed figcaption figure +syn keyword htmlTagName contained footer header hgroup keygen main mark +syn keyword htmlTagName contained menuitem meter nav output picture +syn keyword htmlTagName contained progress rb rp rt rtc ruby section +syn keyword htmlTagName contained slot source template time track video wbr + " legal arg names syn keyword htmlArg contained action syn keyword htmlArg contained align alink alt archive background bgcolor @@ -87,6 +96,19 @@ syn keyword htmlArg contained multiple nohref nowrap object profile readonly syn keyword htmlArg contained rules scheme scope span standby style syn keyword htmlArg contained summary tabindex valuetype version +" html 5 arg names +syn keyword htmlArg contained allowfullscreen async autocomplete autofocus +syn keyword htmlArg contained autoplay challenge contenteditable contextmenu +syn keyword htmlArg contained controls crossorigin default dirname download +syn keyword htmlArg contained draggable dropzone form formaction formenctype +syn keyword htmlArg contained formmethod formnovalidate formtarget hidden +syn keyword htmlArg contained high icon inputmode keytype kind list loop low +syn keyword htmlArg contained max min minlength muted nonce novalidate open +syn keyword htmlArg contained optimum pattern placeholder poster preload +syn keyword htmlArg contained radiogroup required reversed sandbox spellcheck +syn keyword htmlArg contained sizes srcset srcdoc srclang step title translate +syn keyword htmlArg contained typemustmatch + " special characters syn match htmlSpecialChar "&#\=[0-9A-Za-z]\{1,8};" diff --git a/runtime/syntax/matlab.vim b/runtime/syntax/matlab.vim index 92ffbbc1ed..5228bb5c43 100644 --- a/runtime/syntax/matlab.vim +++ b/runtime/syntax/matlab.vim @@ -1,11 +1,13 @@ " Vim syntax file " Language: Matlab -" Maintainer: Maurizio Tranchero - maurizio(.)tranchero(@)gmail(.)com +" Maintainer: Alex Burka <vim@alexburka.com> " Credits: Preben 'Peppe' Guldberg <peppe-vim@wielders.org> +" Maurizio Tranchero - maurizio(.)tranchero(@)gmail(.)com " Original author: Mario Eusebio -" Last Change: Wed Jan 13 11:12:34 CET 2010 -" sinh added to matlab implicit commands +" Last Change: Mon Jan 23 2017 +" added support for cell mode " Change History: +" - now highlights cell-mode separator comments " - 'global' and 'persistent' keyword are now recognized " quit when a syntax file was already loaded @@ -60,6 +62,7 @@ syn match matlabComment "%.*$" contains=matlabTodo,matlabTab " MT_ADDON - correctly highlights words after '...' as comments syn match matlabComment "\.\.\..*$" contains=matlabTodo,matlabTab syn region matlabMultilineComment start=+%{+ end=+%}+ contains=matlabTodo,matlabTab +syn match matlabCellComment "^%%.*$" syn keyword matlabOperator break zeros default margin round ones rand syn keyword matlabOperator ceil floor size clear zeros eye mean std cov @@ -96,6 +99,7 @@ hi def link matlabOO Statement hi def link matlabSemicolon SpecialChar hi def link matlabComment Comment hi def link matlabMultilineComment Comment +hi def link matlabCellComment Todo hi def link matlabScope Type hi def link matlabArithmeticOperator matlabOperator diff --git a/runtime/syntax/nasm.vim b/runtime/syntax/nasm.vim index d6485080ee..4f70a0f334 100644 --- a/runtime/syntax/nasm.vim +++ b/runtime/syntax/nasm.vim @@ -1,9 +1,10 @@ " Vim syntax file " Language: NASM - The Netwide Assembler (v0.98) -" Maintainer: Andriy Sokolov <andriy145@gmail.com> +" Maintainer: Andrii Sokolov <andriy145@gmail.com> " Original Author: Manuel M.H. Stol <Manuel.Stol@allieddata.nl> " Former Maintainer: Manuel M.H. Stol <Manuel.Stol@allieddata.nl> -" Last Change: 2012 Feb 7 +" Contributors: Leonard König <leonard.r.koenig@gmail.com> (C string highlighting) +" Last Change: 2017 Jan 23 " NASM Home: http://www.nasm.us/ @@ -67,8 +68,23 @@ syn match nasmLabelError "\<\~\s*\(\k*\s*:\|\$\=\.\k*\)" " Constants: -syn match nasmStringError +["']+ +syn match nasmStringError +["'`]+ +" NASM is case sensitive here: eg. u-prefix allows for 4-digit, U-prefix for +" 8-digit Unicode characters +syn case match +" one-char escape-sequences +syn match nasmCStringEscape display contained "\\[’"‘\\\?abtnvfre]" +" hex and octal numbers +syn match nasmCStringEscape display contained "\\\(x\x\{2}\|\o\{1,3}\)" +" Unicode characters +syn match nasmCStringEscape display contained "\\\(u\x\{4}\|U\x\{8}\)" +" ISO C99 format strings (copied from cFormat in runtime/syntax/c.vim) +syn match nasmCStringFormat display "%\(\d\+\$\)\=[-+' #0*]*\(\d*\|\*\|\*\d\+\$\)\(\.\(\d*\|\*\|\*\d\+\$\)\)\=\([hlLjzt]\|ll\|hh\)\=\([aAbdiuoxXDOUfFeEgGcCsSpn]\|\[\^\=.[^]]*\]\)" contained +syn match nasmCStringFormat display "%%" contained syn match nasmString +\("[^"]\{-}"\|'[^']\{-}'\)+ +" Highlight C escape- and format-sequences within ``-strings +syn match nasmCString +\(`[^`]\{-}`\)+ contains=nasmCStringEscape,nasmCStringFormat extend +syn case ignore syn match nasmBinNumber "\<[0-1]\+b\>" syn match nasmBinNumber "\<\~[0-1]\+b\>"lc=1 syn match nasmOctNumber "\<\o\+q\>" @@ -443,7 +459,10 @@ hi def link nasmInCommentTodo Todo " Constant Group: hi def link nasmString String +hi def link nasmCString String hi def link nasmStringError Error +hi def link nasmCStringEscape SpecialChar +hi def link nasmCStringFormat SpecialChar hi def link nasmBinNumber Number hi def link nasmOctNumber Number hi def link nasmDecNumber Number diff --git a/runtime/syntax/php.vim b/runtime/syntax/php.vim index efb355ec83..278fc1358c 100644 --- a/runtime/syntax/php.vim +++ b/runtime/syntax/php.vim @@ -1,7 +1,7 @@ " Vim syntax file " Language: php PHP 3/4/5/7 " Maintainer: Jason Woofenden <jason@jasonwoof.com> -" Last Change: Jul 27, 2016 +" Last Change: Dec 11, 2016 " 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> @@ -495,7 +495,7 @@ syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble, " Highlighting for __autoload slightly different from line above syntax keyword phpSpecialFunction containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar \ __autoload -highlight link phpSpecialFunction phpOperator +hi def link phpSpecialFunction phpOperator " Highlighting for PHP5's built-in classes " - built-in classes harvested from get_declared_classes() in 5.1.4 @@ -518,14 +518,14 @@ syntax keyword phpClasses containedin=ALLBUT,phpComment,phpStringDouble,phpStrin \ DOMCharacterData DOMAttr DOMElement DOMText DOMComment DOMTypeinfo DOMUserDataHandler \ DOMLocator DOMConfiguration DOMCdataSection DOMDocumentType DOMNotation DOMEntity \ DOMEntityReference DOMProcessingInstruction DOMStringExtend DOMXPath -highlight link phpClasses phpFunctions +hi def link phpClasses phpFunctions " Highlighting for PHP5's built-in interfaces " - built-in classes harvested from get_declared_interfaces() in 5.1.4 syntax keyword phpInterfaces containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle,phpIdentifier,phpMethodsVar \ Iterator IteratorAggregate RecursiveIterator OuterIterator SeekableIterator \ Traversable ArrayAccess Serializable Countable SplObserver SplSubject Reflector -highlight link phpInterfaces phpConstant +hi def link phpInterfaces phpConstant " option defaults: if ! exists('php_special_functions') @@ -553,7 +553,7 @@ endif if php_alt_assignByReference " special highlighting for '=&' operator syntax match phpAssignByRef /=\s*&/ containedin=ALLBUT,phpComment,phpStringDouble,phpStringSingle - highlight link phpAssignByRef Type + hi def link phpAssignByRef Type endif if php_alt_comparisons @@ -565,7 +565,7 @@ if php_alt_comparisons syntax case ignore syntax keyword phpComparison instanceof contained containedin=phpRegion - hi link phpComparison Statement + hi def link phpComparison Statement endif " ================================================================ @@ -645,21 +645,21 @@ hi def link phpTodo Todo hi def link phpDocTodo Todo hi def link phpMemberSelector Structure if exists("php_oldStyle") -hi phpIntVar guifg=Red ctermfg=DarkRed -hi phpEnvVar guifg=Red ctermfg=DarkRed -hi phpOperator guifg=SeaGreen ctermfg=DarkGreen -hi phpVarSelector guifg=SeaGreen ctermfg=DarkGreen -hi phpRelation guifg=SeaGreen ctermfg=DarkGreen -hi phpIdentifier guifg=DarkGray ctermfg=Brown -hi phpIdentifierSimply guifg=DarkGray ctermfg=Brown + 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 -hi def link phpIntVar Identifier -hi def link phpEnvVar Identifier -hi def link phpOperator Operator -hi def link phpVarSelector Operator -hi def link phpRelation Operator -hi def link phpIdentifier Identifier -hi def link phpIdentifierSimply Identifier |