To: vim-dev@vim.org Subject: Patch 6.2.387 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.387 Problem: There is no highlighting of translated items in help files. Solution: Search for a "help_ab.vim" syntax file when the help file is called "*.abx". Also improve the help highlighting a bit. Files: runtime/syntax/help.vim *** ../vim-6.2.386/runtime/syntax/help.vim Mon Jan 20 21:43:52 2003 --- runtime/syntax/help.vim Fri Mar 19 13:18:11 2004 *************** *** 1,7 **** " Vim syntax file " Language: Vim help file " Maintainer: Bram Moolenaar (Bram@vim.org) ! " Last Change: 2003 Jan 20 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded --- 1,7 ---- " Vim syntax file " Language: Vim help file " Maintainer: Bram Moolenaar (Bram@vim.org) ! " Last Change: 2004 Mar 19 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded *************** *** 25,38 **** syn match helpHyperTextEntry "\*[#-)!+-~]\+\*$" endif syn match helpNormal "|.*====*|" syn match helpVim "Vim version [0-9.a-z]\+" syn match helpVim "VIM REFERENCE.*" syn match helpOption "'[a-z]\{2,\}'" syn match helpOption "'t_..'" syn match helpHeader ".*\~$"me=e-1 nextgroup=helpIgnore syn match helpIgnore "." contained ! syn keyword helpNote note Note NOTE note: Note: NOTE: syn match helpSpecial "\" syn match helpSpecial "(N\>"ms=s+1 syn match helpSpecial "\[N]" " avoid highlighting N N in help.txt --- 25,41 ---- syn match helpHyperTextEntry "\*[#-)!+-~]\+\*$" endif syn match helpNormal "|.*====*|" + syn match helpNormal ":|vim:|" " for :help modeline syn match helpVim "Vim version [0-9.a-z]\+" syn match helpVim "VIM REFERENCE.*" syn match helpOption "'[a-z]\{2,\}'" syn match helpOption "'t_..'" syn match helpHeader ".*\~$"me=e-1 nextgroup=helpIgnore syn match helpIgnore "." contained ! syn keyword helpNote note Note NOTE note: Note: NOTE: Notes Notes: syn match helpSpecial "\" + syn match helpSpecial "\"ms=s+1 syn match helpSpecial "\[N]" " avoid highlighting N N in help.txt *************** *** 40,45 **** --- 43,49 ---- syn match helpSpecial "Nth"me=e-2 syn match helpSpecial "N-1"me=e-2 syn match helpSpecial "{[-a-zA-Z0-9'":%#=[\]<>.,]\+}" + syn match helpSpecial "{[-a-zA-Z0-9'"*+/:%#=[\]<>.,]\+}" syn match helpSpecial "\s\[[-a-z^A-Z0-9_]\{2,}]"ms=s+1 syn match helpSpecial "<[-a-zA-Z0-9_]\+>" syn match helpSpecial "<[SCM]-.>" *************** *** 52,57 **** --- 56,68 ---- syn match helpSpecial "\[num]" syn match helpSpecial "\[+num]" syn match helpSpecial "\[-num]" + syn match helpSpecial "\[+cmd]" + syn match helpSpecial "\[++opt]" + syn match helpSpecial "\[arg]" + syn match helpSpecial "\[arguments]" + syn match helpSpecial "\[ident]" + syn match helpSpecial "\[addr]" + syn match helpSpecial "\[group]" syn match helpSpecial "CTRL-." syn match helpSpecial "CTRL-Break" syn match helpSpecial "CTRL-PageUp" *************** *** 62,67 **** --- 73,121 ---- syn region helpNotVi start="{Vi[: ]" start="{not" start="{only" end="}" contains=helpLeadBlank,helpHyperTextJump syn match helpLeadBlank "^\s\+" contained + " Highlight group items in their own color. + syn match helpComment "\t[* ]Comment\t\+[a-z].*" + syn match helpConstant "\t[* ]Constant\t\+[a-z].*" + syn match helpString "\t[* ]String\t\+[a-z].*" + syn match helpCharacter "\t[* ]Character\t\+[a-z].*" + syn match helpNumber "\t[* ]Number\t\+[a-z].*" + syn match helpBoolean "\t[* ]Boolean\t\+[a-z].*" + syn match helpFloat "\t[* ]Float\t\+[a-z].*" + syn match helpIdentifier "\t[* ]Identifier\t\+[a-z].*" + syn match helpFunction "\t[* ]Function\t\+[a-z].*" + syn match helpStatement "\t[* ]Statement\t\+[a-z].*" + syn match helpConditional "\t[* ]Conditional\t\+[a-z].*" + syn match helpRepeat "\t[* ]Repeat\t\+[a-z].*" + syn match helpLabel "\t[* ]Label\t\+[a-z].*" + syn match helpOperator "\t[* ]Operator\t\+["a-z].*" + syn match helpKeyword "\t[* ]Keyword\t\+[a-z].*" + syn match helpException "\t[* ]Exception\t\+[a-z].*" + syn match helpPreProc "\t[* ]PreProc\t\+[a-z].*" + syn match helpInclude "\t[* ]Include\t\+[a-z].*" + syn match helpDefine "\t[* ]Define\t\+[a-z].*" + syn match helpMacro "\t[* ]Macro\t\+[a-z].*" + syn match helpPreCondit "\t[* ]PreCondit\t\+[a-z].*" + syn match helpType "\t[* ]Type\t\+[a-z].*" + syn match helpStorageClass "\t[* ]StorageClass\t\+[a-z].*" + syn match helpStructure "\t[* ]Structure\t\+[a-z].*" + syn match helpTypedef "\t[* ]Typedef\t\+[Aa-z].*" + syn match helpSpecial "\t[* ]Special\t\+[a-z].*" + syn match helpSpecialChar "\t[* ]SpecialChar\t\+[a-z].*" + syn match helpTag "\t[* ]Tag\t\+[a-z].*" + syn match helpDelimiter "\t[* ]Delimiter\t\+[a-z].*" + syn match helpSpecialComment "\t[* ]SpecialComment\t\+[a-z].*" + syn match helpDebug "\t[* ]Debug\t\+[a-z].*" + syn match helpUnderlined "\t[* ]Underlined\t\+[a-z].*" + syn match helpError "\t[* ]Error\t\+[a-z].*" + syn match helpTodo "\t[* ]Todo\t\+[a-z].*" + + + " Additionally load a language-specific syntax file "help_ab.vim". + let i = match(expand("%"), '\.\a\ax$') + if i > 0 + exe "runtime syntax/help_" . strpart(expand("%"), i + 1, 2) . ".vim" + endif + syn sync minlines=40 *************** *** 90,95 **** --- 144,183 ---- HiLink helpSpecial Special HiLink helpNote Todo HiLink Subtitle Identifier + + HiLink helpComment Comment + HiLink helpConstant Constant + HiLink helpString String + HiLink helpCharacter Character + HiLink helpNumber Number + HiLink helpBoolean Boolean + HiLink helpFloat Float + HiLink helpIdentifier Identifier + HiLink helpFunction Function + HiLink helpStatement Statement + HiLink helpConditional Conditional + HiLink helpRepeat Repeat + HiLink helpLabel Label + HiLink helpOperator Operator + HiLink helpKeyword Keyword + HiLink helpException Exception + HiLink helpPreProc PreProc + HiLink helpInclude Include + HiLink helpDefine Define + HiLink helpMacro Macro + HiLink helpPreCondit PreCondit + HiLink helpType Type + HiLink helpStorageClass StorageClass + HiLink helpStructure Structure + HiLink helpTypedef Typedef + HiLink helpSpecialChar SpecialChar + HiLink helpTag Tag + HiLink helpDelimiter Delimiter + HiLink helpSpecialComment SpecialComment + HiLink helpDebug Debug + HiLink helpUnderlined Underlined + HiLink helpError Error + HiLink helpTodo Todo delcommand HiLink endif *** ../vim-6.2.386/src/version.c Sat Mar 20 21:21:41 2004 --- src/version.c Mon Mar 22 14:31:10 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 387, /**/ -- From "know your smileys": <|-) Chinese <|-( Chinese and doesn't like these kind of jokes /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///