From c4942880be0521673548c48bf61c1eac6bd37036 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 1 Jan 2023 15:00:39 +0100 Subject: [PATCH] vim-patch:partial:f1dcd14fc5d4 (#21602) Update runtime files https://github.com/vim/vim/commit/f1dcd14fc5d4370476cd82895a4479ca2d252e54 missing autocmd blocks and getscriptinfo() Co-authored-by: Bram Moolenaar --- runtime/doc/diff.txt | 4 + runtime/doc/options.txt | 19 +- runtime/doc/quickref.txt | 3 +- runtime/doc/sign.txt | 6 +- runtime/doc/syntax.txt | 2 +- runtime/indent/nginx.vim | 77 ++++- runtime/indent/testdir/vb.in | 134 +++++++++ runtime/indent/testdir/vb.ok | 134 +++++++++ runtime/indent/vb.vim | 105 ++++++- runtime/indent/vue.vim | 4 +- runtime/optwin.vim | 6 +- runtime/syntax/2html.vim | 4 +- runtime/syntax/fstab.vim | 12 +- runtime/syntax/hgcommit.vim | 21 +- runtime/syntax/shared/hgcommitDiff.vim | 390 +++++++++++++++++++++++++ runtime/syntax/vim.vim | 2 +- 16 files changed, 867 insertions(+), 56 deletions(-) create mode 100644 runtime/indent/testdir/vb.in create mode 100644 runtime/indent/testdir/vb.ok create mode 100644 runtime/syntax/shared/hgcommitDiff.vim diff --git a/runtime/doc/diff.txt b/runtime/doc/diff.txt index f38f123393..382d025d3c 100644 --- a/runtime/doc/diff.txt +++ b/runtime/doc/diff.txt @@ -137,6 +137,10 @@ Otherwise they are set to their default value: 'foldmethod' "manual" 'foldcolumn' 0 +'foldenable' will most-likely be reset to off. That is when 'foldmethod' is +restored to "manual". The folds themselves are not cleared but they should +not show up, resetting 'foldenable' is the best way to do that. + ============================================================================== 2. Viewing diffs *view-diffs* diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index b0c4193927..657d4bc06e 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -5573,30 +5573,30 @@ A jump table for the options with a short description can be found at |Q_op|. and "[a]" instead of "appended" for ':w >> file' command x use "[dos]" instead of "[dos format]", "[unix]" *shm-x* instead of "[unix format]" and "[mac]" instead of "[mac - format]". + format]" a all of the above abbreviations *shm-a* o overwrite message for writing a file with subsequent *shm-o* message for reading a file (useful for ":wn" or when 'autowrite' on) - O message for reading a file overwrites any previous *smh-O* - message. Also for quickfix message (e.g., ":cn"). + O message for reading a file overwrites any previous *shm-O* + message; also for quickfix message (e.g., ":cn") s don't give "search hit BOTTOM, continuing at TOP" or *shm-s* "search hit TOP, continuing at BOTTOM" messages; when using the search count do not show "W" after the count message (see S below) t truncate file message at the start if it is too long *shm-t* to fit on the command-line, "<" will appear in the left most - column. Ignored in Ex mode. + column; ignored in Ex mode T truncate other messages in the middle if they are too *shm-T* - long to fit on the command line. "..." will appear in the - middle. Ignored in Ex mode. + long to fit on the command line; "..." will appear in the + middle; ignored in Ex mode W don't give "written" or "[w]" when writing a file *shm-W* A don't give the "ATTENTION" message when an existing *shm-A* - swap file is found. + swap file is found I don't give the intro message when starting Vim, *shm-I* - see |:intro|. - c don't give |ins-completion-menu| messages. For *shm-c* + see |:intro| + c don't give |ins-completion-menu| messages; for *shm-c* example, "-- XXX completion (YYY)", "match 1 of 2", "The only match", "Pattern not found", "Back at original", etc. C don't give messages while scanning for ins-completion *shm-C* @@ -5653,6 +5653,7 @@ A jump table for the options with a short description can be found at |Q_op|. *'showcmdloc'* *'sloc'* 'showcmdloc' 'sloc' string (default "last") + global This option can be used to display the (partially) entered command in another location. Possible values are: last Last line of the screen (default). diff --git a/runtime/doc/quickref.txt b/runtime/doc/quickref.txt index 5f5ca2af2c..da136ade16 100644 --- a/runtime/doc/quickref.txt +++ b/runtime/doc/quickref.txt @@ -868,7 +868,8 @@ Short explanation of each option: *option-list* 'shiftwidth' 'sw' number of spaces to use for (auto)indent step 'shortmess' 'shm' list of flags, reduce length of messages 'showbreak' 'sbr' string to use at the start of wrapped lines -'showcmd' 'sc' show (partial) command in status line +'showcmd' 'sc' show (partial) command somewhere +'showcmdloc' 'sloc' where to show (partial) command 'showfulltag' 'sft' show full tag pattern when completing tag 'showmatch' 'sm' briefly jump to matching bracket if insert one 'showmode' 'smd' message on status line to show current mode diff --git a/runtime/doc/sign.txt b/runtime/doc/sign.txt index efe0c3390d..d09d0f226f 100644 --- a/runtime/doc/sign.txt +++ b/runtime/doc/sign.txt @@ -606,9 +606,9 @@ sign_placelist({list}) then a new unique identifier is allocated. Otherwise the specified number is used. See |sign-identifier| for more information. - lnum line number in the buffer {buf} where the - sign is to be placed. For the accepted values, - see |line()|. + lnum line number in the buffer where the sign is to + be placed. For the accepted values, see + |line()|. name name of the sign to place. See |sign_define()| for more information. priority priority of the sign. When multiple signs are diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt index e8f0924cb4..49ca7e38f6 100644 --- a/runtime/doc/syntax.txt +++ b/runtime/doc/syntax.txt @@ -4902,7 +4902,7 @@ in their own color. *highlight-clear* *:hi-clear* :hi[ghlight] clear Reset all highlighting to the defaults. Removes all - highlighting for groups added by the user! + highlighting for groups added by the user. Uses the current value of 'background' to decide which default colors to use. If there was a default link, restore it. |:hi-link| diff --git a/runtime/indent/nginx.vim b/runtime/indent/nginx.vim index 8cef7662e0..65506099f4 100644 --- a/runtime/indent/nginx.vim +++ b/runtime/indent/nginx.vim @@ -1,19 +1,78 @@ " Vim indent file " Language: nginx.conf " Maintainer: Chris Aumann -" Last Change: 2022 Apr 06 +" Last Change: 2022 Dec 01 -if exists("b:did_indent") - finish +" Only load this indent file when no other was loaded. +if exists('b:did_indent') + finish endif let b:did_indent = 1 -setlocal indentexpr= +setlocal indentexpr=GetNginxIndent() -" cindent actually works for nginx' simple file structure -setlocal cindent +setlocal indentkeys=0{,0},0#,!^F,o,O -" Just make sure that the comments are not reset as defs would be. -setlocal cinkeys-=0# +let b:undo_indent = 'setl inde< indk<' -let b:undo_indent = "setl inde< cin< cink<" +" Only define the function once. +if exists('*GetNginxIndent') + finish +endif + +function GetNginxIndent() abort + let plnum = s:PrevNotAsBlank(v:lnum - 1) + + " Hit the start of the file, use zero indent. + if plnum == 0 + return 0 + endif + + let ind = indent(plnum) + + " Add a 'shiftwidth' after '{' + if s:AsEndWith(getline(plnum), '{') + let ind = ind + shiftwidth() + end + + " Subtract a 'shiftwidth' on '}' + " This is the part that requires 'indentkeys'. + if getline(v:lnum) =~ '^\s*}' + let ind = ind - shiftwidth() + endif + + let pplnum = s:PrevNotAsBlank(plnum - 1) + + if s:IsLineContinuation(plnum) + if !s:IsLineContinuation(pplnum) + let ind = ind + shiftwidth() + end + else + if s:IsLineContinuation(pplnum) + let ind = ind - shiftwidth() + end + endif + + return ind +endfunction + +" Find the first line at or above {lnum} that is non-blank and not a comment. +function s:PrevNotAsBlank(lnum) abort + let lnum = prevnonblank(a:lnum) + while lnum > 0 + if getline(lnum) !~ '^\s*#' + break + endif + let lnum = prevnonblank(lnum - 1) + endwhile + return lnum +endfunction + +" Check whether {line} ends with {pat}, ignoring trailing comments. +function s:AsEndWith(line, pat) abort + return a:line =~ a:pat . '\m\s*\%(#.*\)\?$' +endfunction + +function s:IsLineContinuation(lnum) abort + return a:lnum > 0 && !s:AsEndWith(getline(a:lnum), '[;{}]') +endfunction diff --git a/runtime/indent/testdir/vb.in b/runtime/indent/testdir/vb.in new file mode 100644 index 0000000000..1653ae6f80 --- /dev/null +++ b/runtime/indent/testdir/vb.in @@ -0,0 +1,134 @@ +' vim: filetype=vb shiftwidth=4 expandtab +' +' START_INDENT +Public Type GEmployeeRecord ' Create user-defined type. +ID As Integer ' Define elements of data type. +Name As String * 20 +Address As String * 30 +Phone As Long +HireDate As Date +End Type + +Public Enum InterfaceColors +icMistyRose = &HE1E4FF& +icSlateGray = &H908070& +icDodgerBlue = &HFF901E& +icDeepSkyBlue = &HFFBF00& +icSpringGreen = &H7FFF00& +icForestGreen = &H228B22& +icGoldenrod = &H20A5DA& +icFirebrick = &H2222B2& +End Enum + +Enum SecurityLevel +IllegalEntry = -1 +SecurityLevel1 = 0 +SecurityLevel2 = 1 +End Enum + +Public Function TestConditional (number As Integer, ext As String) As Boolean +Dim inRange As Boolean + +Select Case number +Case <= 0 +inRange = False +Case > 10 +inRange = False +Case Else +inRange = True +End Select + +' This is a special case identified in the indent script. +Select Case number +End Select + +If ext = ".xlm" Then +If inRange Then +TestConditional = True +Else +TestConditional = False +End If +ElseIf ext = ".xlsx" Then +If inRange Then +TestConditional = False +Else +TestConditional = True +End If +Else +TestConditional = False +End If +End Function + +Private Sub TestIterators (lLimit As Integer, uLimit As Integer) +Dim a() As Variant +Dim elmt As Variant +Dim found As Boolean +Dim indx As Integer +Const specialValue As Integer = 5 + +If uLimit < lLimit Then +Exit Sub +End If + +ReDim a(lLimit To uLimit) +For indx=lLimit To Ulimit +a(indx) = 2 * indx +Next indx + +found = False +For Each elmt in a +If elmt = specialValue Then +found = True +End If +Next elmt + +If found then +indx = uLimit +Do While indx >= lLimit +indx = indx - 1 +Loop +End If + +End Sub + +Public Sub TestMultiline (cellAddr As String, rowNbr As Long) +Dim rng As Range + +Set rng = Range(cellAddr) +With rng +.Cells(1,1).Value = _ +"Line 1 of multiline string; " & _ +"Line 2 of multiline string; " & _ +"Line 3 of multiline string" +End With + +' The following lines have whitespace after the underscore character +' and therefore do not form a valid multiline statement. The indent +' script correctly treats them as four single line statements contrary +' to the author's obvious indent. +rng..Cells(1,1).Value = _ +"Line 1 of multiline string; " & _ +"Line 2 of multiline string; " & _ +"Line 3 of multiline string" + +End Sub + +Private Sub TestStmtLabel() +GoTo stmtLabel + +' Statement labels are never indented +stmtLabel: + +End Sub + +Sub TestTypeKeyword() +Type EmployeeRecord ' Create user-defined type. +ID As Integer ' Define elements of data type. +Name As String * 20 +Address As String * 30 +Phone As Long +HireDate As Date +End Type +Dim varType As EmployeeRecord +End Sub +' END_INDENT diff --git a/runtime/indent/testdir/vb.ok b/runtime/indent/testdir/vb.ok new file mode 100644 index 0000000000..143c688708 --- /dev/null +++ b/runtime/indent/testdir/vb.ok @@ -0,0 +1,134 @@ +' vim: filetype=vb shiftwidth=4 expandtab +' +' START_INDENT +Public Type GEmployeeRecord ' Create user-defined type. + ID As Integer ' Define elements of data type. + Name As String * 20 + Address As String * 30 + Phone As Long + HireDate As Date +End Type + +Public Enum InterfaceColors + icMistyRose = &HE1E4FF& + icSlateGray = &H908070& + icDodgerBlue = &HFF901E& + icDeepSkyBlue = &HFFBF00& + icSpringGreen = &H7FFF00& + icForestGreen = &H228B22& + icGoldenrod = &H20A5DA& + icFirebrick = &H2222B2& +End Enum + +Enum SecurityLevel + IllegalEntry = -1 + SecurityLevel1 = 0 + SecurityLevel2 = 1 +End Enum + +Public Function TestConditional (number As Integer, ext As String) As Boolean + Dim inRange As Boolean + + Select Case number + Case <= 0 + inRange = False + Case > 10 + inRange = False + Case Else + inRange = True + End Select + + ' This is a special case identified in the indent script. + Select Case number + End Select + + If ext = ".xlm" Then + If inRange Then + TestConditional = True + Else + TestConditional = False + End If + ElseIf ext = ".xlsx" Then + If inRange Then + TestConditional = False + Else + TestConditional = True + End If + Else + TestConditional = False + End If +End Function + +Private Sub TestIterators (lLimit As Integer, uLimit As Integer) + Dim a() As Variant + Dim elmt As Variant + Dim found As Boolean + Dim indx As Integer + Const specialValue As Integer = 5 + + If uLimit < lLimit Then + Exit Sub + End If + + ReDim a(lLimit To uLimit) + For indx=lLimit To Ulimit + a(indx) = 2 * indx + Next indx + + found = False + For Each elmt in a + If elmt = specialValue Then + found = True + End If + Next elmt + + If found then + indx = uLimit + Do While indx >= lLimit + indx = indx - 1 + Loop + End If + +End Sub + +Public Sub TestMultiline (cellAddr As String, rowNbr As Long) + Dim rng As Range + + Set rng = Range(cellAddr) + With rng + .Cells(1,1).Value = _ + "Line 1 of multiline string; " & _ + "Line 2 of multiline string; " & _ + "Line 3 of multiline string" + End With + + ' The following lines have whitespace after the underscore character + ' and therefore do not form a valid multiline statement. The indent + ' script correctly treats them as four single line statements contrary + ' to the author's obvious indent. + rng..Cells(1,1).Value = _ + "Line 1 of multiline string; " & _ + "Line 2 of multiline string; " & _ + "Line 3 of multiline string" + +End Sub + +Private Sub TestStmtLabel() + GoTo stmtLabel + + ' Statement labels are never indented +stmtLabel: + +End Sub + +Sub TestTypeKeyword() + Type EmployeeRecord ' Create user-defined type. + ID As Integer ' Define elements of data type. + Name As String * 20 + Address As String * 30 + Phone As Long + HireDate As Date + End Type + Dim varType As EmployeeRecord +End Sub +' END_INDENT diff --git a/runtime/indent/vb.vim b/runtime/indent/vb.vim index 4d05345565..bc7142f428 100644 --- a/runtime/indent/vb.vim +++ b/runtime/indent/vb.vim @@ -1,8 +1,12 @@ " Vim indent file " Language: VisualBasic (ft=vb) / Basic (ft=basic) / SaxBasic (ft=vb) " Author: Johannes Zellner +" Maintainer: Michael Soyka (mssr953@gmail.com) " Last Change: Fri, 18 Jun 2004 07:22:42 CEST " Small update 2010 Jul 28 by Maxim Kim +" 2022/12/15: add support for multiline statements. +" 2022/12/21: move VbGetIndent from global to script-local scope +" 2022/12/26: recognize "Type" keyword if exists("b:did_indent") finish @@ -10,28 +14,33 @@ endif let b:did_indent = 1 setlocal autoindent -setlocal indentexpr=VbGetIndent(v:lnum) +setlocal indentexpr=s:VbGetIndent(v:lnum) setlocal indentkeys& -setlocal indentkeys+==~else,=~elseif,=~end,=~wend,=~case,=~next,=~select,=~loop,<:> +setlocal indentkeys+==~else,=~elseif,=~end,=~wend,=~case,=~next,=~select,=~loop let b:undo_indent = "set ai< indentexpr< indentkeys<" " Only define the function once. -if exists("*VbGetIndent") +if exists("*s:VbGetIndent") finish endif -fun! VbGetIndent(lnum) +function s:VbGetIndent(lnum) + let this_lnum = a:lnum + let this_line = getline(this_lnum) + " labels and preprocessor get zero indent immediately - let this_line = getline(a:lnum) let LABELS_OR_PREPROC = '^\s*\(\<\k\+\>:\s*$\|#.*\)' if this_line =~? LABELS_OR_PREPROC return 0 endif + + " Get the current value of "shiftwidth" + let bShiftwidth = shiftwidth() " Find a non-blank line above the current line. " Skip over labels and preprocessor directives. - let lnum = a:lnum + let lnum = this_lnum while lnum > 0 let lnum = prevnonblank(lnum - 1) let previous_line = getline(lnum) @@ -45,34 +54,102 @@ fun! VbGetIndent(lnum) return 0 endif - let ind = indent(lnum) + " Variable "previous_line" now contains the text in buffer line "lnum". + + " Multi-line statements have the underscore character at end-of-line: + " + " object.method(arguments, _ + " arguments, _ + " arguments) + " + " and require extra logic to determine the correct indentation. + " + " Case 1: Line "lnum" is the first line of a multiline statement. + " Line "lnum" will have a trailing underscore character + " but the preceding non-blank line does not. + " Line "this_lnum" will be indented relative to "lnum". + " + " Case 2: Line "lnum" is the last line of a multiline statement. + " Line "lnum" will not have a trailing underscore character + " but the preceding non-blank line will. + " Line "this_lnum" will have the same indentation as the starting + " line of the multiline statement. + " + " Case 3: Line "lnum" is neither the first nor last line. + " Lines "lnum" and "lnum-1" will have a trailing underscore + " character. + " Line "this_lnum" will have the same indentation as the preceding + " line. + " + " No matter which case it is, the starting line of the statement must be + " found. It will be assumed that multiline statements cannot have + " intermingled comments, statement labels, preprocessor directives or + " blank lines. + " + let lnum_is_continued = (previous_line =~ '_$') + if lnum > 1 + let before_lnum = prevnonblank(lnum-1) + let before_previous_line = getline(before_lnum) + else + let before_lnum = 0 + let before_previous_line = "" + endif + + if before_previous_line !~ '_$' + " Variable "previous_line" contains the start of a statement. + " + let ind = indent(lnum) + if lnum_is_continued + let ind += bShiftwidth + endif + elseif ! lnum_is_continued + " Line "lnum" contains the last line of a multiline statement. + " Need to find where this multiline statement begins + " + while before_lnum > 0 + let before_lnum -= 1 + if getline(before_lnum) !~ '_$' + let before_lnum += 1 + break + endif + endwhile + if before_lnum == 0 + let before_lnum = 1 + endif + let previous_line = getline(before_lnum) + let ind = indent(before_lnum) + else + " Line "lnum" is not the first or last line of a multiline statement. + " + let ind = indent(lnum) + endif " Add - if previous_line =~? '^\s*\<\(begin\|\%(\%(private\|public\|friend\)\s\+\)\=\%(function\|sub\|property\)\|select\|case\|default\|if\|else\|elseif\|do\|for\|while\|enum\|with\)\>' - let ind = ind + shiftwidth() + if previous_line =~? '^\s*\<\(begin\|\%(\%(private\|public\|friend\)\s\+\)\=\%(function\|sub\|property\|enum\|type\)\|select\|case\|default\|if\|else\|elseif\|do\|for\|while\|with\)\>' + let ind = ind + bShiftwidth endif " Subtract if this_line =~? '^\s*\\s\+\' if previous_line !~? '^\s*\' - let ind = ind - 2 * shiftwidth() + let ind = ind - 2 * bShiftwidth else " this case is for an empty 'select' -- 'end select' " (w/o any case statements) like: " " select case readwrite " end select - let ind = ind - shiftwidth() + let ind = ind - bShiftwidth endif elseif this_line =~? '^\s*\<\(end\|else\|elseif\|until\|loop\|next\|wend\)\>' - let ind = ind - shiftwidth() + let ind = ind - bShiftwidth elseif this_line =~? '^\s*\<\(case\|default\)\>' if previous_line !~? '^\s*\' - let ind = ind - shiftwidth() + let ind = ind - bShiftwidth endif endif return ind -endfun +endfunction " vim:sw=4 diff --git a/runtime/indent/vue.vim b/runtime/indent/vue.vim index 7ff623b3d1..f6fe350a8f 100644 --- a/runtime/indent/vue.vim +++ b/runtime/indent/vue.vim @@ -1,12 +1,14 @@ " Vim indent file placeholder " Language: Vue " Maintainer: None, please volunteer if you have a real Vue indent script +" Last Change: 2022 Dec 24 " Only load this indent file when no other was loaded. if exists("b:did_indent") finish endif -let b:did_indent = 1 +" don't set b:did_indent, otherwise html indenting won't be activated +" let b:did_indent = 1 " Html comes closest runtime! indent/html.vim diff --git a/runtime/optwin.vim b/runtime/optwin.vim index 23562c6830..c6f2a3252f 100644 --- a/runtime/optwin.vim +++ b/runtime/optwin.vim @@ -1,7 +1,7 @@ " These commands create the option window. " " Maintainer: Bram Moolenaar -" Last Change: 2022 Nov 23 +" Last Change: 2022 Dec 16 " If there already is an option window, jump to that one. let buf = bufnr('option-window') @@ -656,10 +656,12 @@ call AddOption("terse", gettext("add 's' flag in 'shortmess' (don't show se call BinOptionG("terse", &terse) call AddOption("shortmess", gettext("list of flags to make messages shorter")) call OptionG("shm", &shm) -call AddOption("showcmd", gettext("show (partial) command keys in the status line")) +call AddOption("showcmd", gettext("show (partial) command keys in location given by 'showcmdloc'")) let &sc = s:old_sc call BinOptionG("sc", &sc) set nosc +call AddOption("showcmdloc", gettext("location where to show the (partial) command keys for 'showcmd'")) + call OptionG("sloc", &sloc) call AddOption("showmode", gettext("display the current mode in the status line")) call BinOptionG("smd", &smd) call AddOption("ruler", gettext("show cursor position below each window")) diff --git a/runtime/syntax/2html.vim b/runtime/syntax/2html.vim index 76f3ef7589..ce6797deaa 100644 --- a/runtime/syntax/2html.vim +++ b/runtime/syntax/2html.vim @@ -1,6 +1,6 @@ " Vim syntax support file " Maintainer: Ben Fritz -" Last Change: 2020 Jan 05 +" Last Change: 2022 Dec 26 " " Additional contributors: " @@ -1881,7 +1881,7 @@ if s:settings.use_css && !s:settings.no_doc endif endif -if !s:settings.use_css && !s:settings_no_doc +if !s:settings.use_css && !s:settings.no_doc " For Netscape 4, set attributes too, though, strictly speaking, it's " incorrect. execute '%s:]*\):\r " URL: https://raw.github.com/rid9/vim-fstab/master/syntax/fstab.vim -" Last Change: 2022 Dec 10 -" Version: 1.5 +" Last Change: 2022 Dec 11 +" Version: 1.6.2 " " Credits: " David Necas (Yeti) @@ -56,7 +56,7 @@ syn keyword fsMountPointKeyword contained none swap " Type syn cluster fsTypeCluster contains=fsTypeKeyword,fsTypeUnknown syn match fsTypeUnknown /\s\+\zs\w\+/ contained -syn keyword fsTypeKeyword contained adfs ados affs anon_inodefs atfs audiofs auto autofs bdev befs bfs btrfs binfmt_misc cd9660 ceph cfs cgroup cifs coda coherent configfs cpuset cramfs debugfs devfs devpts devtmpfs dlmfs e2compr ecryptfs efivarfs efs erofs exfat ext2 ext2fs ext3 ext4 f2fs fdesc ffs filecore fuse fuseblk fusectl gfs2 hfs hfsplus hpfs hugetlbfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix mqueue msdos ncpfs nfs nfs4 nfsd nilfs2 none ntfs ntfs3 null nwfs ocfs2 omfs overlay ovlfs pipefs portal proc procfs pstore ptyfs pvfs2 qnx4 qnx6 reiserfs ramfs romfs securityfs shm smbfs spufs squashfs sockfs sshfs std subfs swap sysfs sysv tcfs tmpfs ubifs udf ufs umap umsdos union usbfs userfs v9fs vfat virtiofs vs3fs vxfs wrapfs wvfs xenfs xenix xfs zisofs zonefs +syn keyword fsTypeKeyword contained adfs ados affs anon_inodefs atfs audiofs auto autofs bdev befs bfs btrfs binfmt_misc cd9660 ceph cfs cgroup cifs coda coherent configfs cpuset cramfs debugfs devfs devpts devtmpfs dlmfs e2compr ecryptfs efivarfs efs erofs exfat ext2 ext2fs ext3 ext4 f2fs fdesc ffs filecore fuse fuseblk fusectl gfs2 hfs hfsplus hpfs hugetlbfs iso9660 jffs jffs2 jfs kernfs lfs linprocfs mfs minix mqueue msdos ncpfs nfs nfs4 nfsd nilfs2 none ntfs ntfs3 null nwfs ocfs2 omfs overlay ovlfs pipefs portal proc procfs pstore ptyfs pvfs2 qnx4 qnx6 reiserfs ramfs romfs rpc_pipefs securityfs shm smbfs spufs squashfs sockfs sshfs std subfs swap sysfs sysv tcfs tmpfs ubifs udf ufs umap umsdos union usbfs userfs v9fs vfat virtiofs vs3fs vxfs wrapfs wvfs xenfs xenix xfs zisofs zonefs " Options " ------- @@ -72,9 +72,13 @@ syn keyword fsOptionsYN y n syn keyword fsOptions01 0 1 syn cluster fsOptionsCheckCluster contains=fsOptionsExt2Check,fsOptionsFatCheck syn keyword fsOptionsSize 512 1024 2048 -syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx nofail failok +syn keyword fsOptionsGeneral async atime auto bind current defaults dev devgid devmode devmtime devuid dirsync exec force fstab kudzu loop managed mand move noatime noauto noclusterr noclusterw nodev nodevmtime nodiratime noexec nomand norelatime nosuid nosymfollow nouser owner pamconsole rbind rdonly relatime remount ro rq rw suid suiddir supermount sw sync union update user users wxallowed xx nofail failok lazytime syn match fsOptionsGeneral /_netdev/ +syn match fsOptionsKeywords contained /\ -" Last Change: 2012 Aug 23 -" Filenames: hg-editor-*.txt +" Max Coplan +" Last Change: 2022-12-08 " License: VIM License " URL: https://github.com/k-takata/hg-vim @@ -10,12 +10,15 @@ if exists("b:current_syntax") finish endif -syn match hgcommitComment "^HG:.*$" contains=@NoSpell -syn match hgcommitUser "^HG: user: \zs.*$" contains=@NoSpell contained containedin=hgcommitComment -syn match hgcommitBranch "^HG: branch \zs.*$" contains=@NoSpell contained containedin=hgcommitComment -syn match hgcommitAdded "^HG: \zsadded .*$" contains=@NoSpell contained containedin=hgcommitComment -syn match hgcommitChanged "^HG: \zschanged .*$" contains=@NoSpell contained containedin=hgcommitComment -syn match hgcommitRemoved "^HG: \zsremoved .*$" contains=@NoSpell contained containedin=hgcommitComment +syn match hgcommitComment "^\%(SL\|HG\): .*$" contains=@NoSpell +syn match hgcommitUser "^\%(SL\|HG\): user: \zs.*$" contains=@NoSpell contained containedin=hgcommitComment +syn match hgcommitBranch "^\%(SL\|HG\): branch \zs.*$" contains=@NoSpell contained containedin=hgcommitComment +syn match hgcommitAdded "^\%(SL\|HG\): \zsadded .*$" contains=@NoSpell contained containedin=hgcommitComment +syn match hgcommitChanged "^\%(SL\|HG\): \zschanged .*$" contains=@NoSpell contained containedin=hgcommitComment +syn match hgcommitRemoved "^\%(SL\|HG\): \zsremoved .*$" contains=@NoSpell contained containedin=hgcommitComment + +syn region hgcommitDiff start=/\%(^\(SL\|HG\): diff --\%(git\|cc\|combined\) \)\@=/ end=/^\%(diff --\|$\|@@\@!\|[^[:alnum:]\ +-]\S\@!\)\@=/ fold contains=@hgcommitDiff +syn include @hgcommitDiff syntax/shared/hgcommitDiff.vim hi def link hgcommitComment Comment hi def link hgcommitUser String diff --git a/runtime/syntax/shared/hgcommitDiff.vim b/runtime/syntax/shared/hgcommitDiff.vim new file mode 100644 index 0000000000..949cdf0b1c --- /dev/null +++ b/runtime/syntax/shared/hgcommitDiff.vim @@ -0,0 +1,390 @@ +" Vim syntax file +" Language: Sapling / Mecurial Diff (context or unified) +" Maintainer: Max Coplan +" Translations by Jakson Alves de Aquino. +" Last Change: 2022-12-08 +" Copied from: runtime/syntax/diff.vim + +" Quit when a (custom) syntax file was already loaded +if exists("b:current_syntax") + finish +endif +scriptencoding utf-8 + +syn match hgDiffOnly "^\%(SL\|HG\): Only in .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Files .* and .* are identical$" +syn match hgDiffDiffer "^\%(SL\|HG\): Files .* and .* differ$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Binary files .* and .* differ$" +syn match hgDiffIsA "^\%(SL\|HG\): File .* is a .* while file .* is a .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ No newline at end of file .*" +syn match hgDiffCommon "^\%(SL\|HG\): Common subdirectories: .*" + +" Disable the translations by setting diff_translations to zero. +if !exists("diff_translations") || diff_translations + +" ca +syn match hgDiffOnly "^\%(SL\|HG\): Només a .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Els fitxers .* i .* són idèntics$" +syn match hgDiffDiffer "^\%(SL\|HG\): Els fitxers .* i .* difereixen$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Els fitxers .* i .* difereixen$" +syn match hgDiffIsA "^\%(SL\|HG\): El fitxer .* és un .* mentre que el fitxer .* és un .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ No hi ha cap caràcter de salt de línia al final del fitxer" +syn match hgDiffCommon "^\%(SL\|HG\): Subdirectoris comuns: .* i .*" + +" cs +syn match hgDiffOnly "^\%(SL\|HG\): Pouze v .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Soubory .* a .* jsou identické$" +syn match hgDiffDiffer "^\%(SL\|HG\): Soubory .* a .* jsou různé$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Binární soubory .* a .* jsou rozdílné$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Soubory .* a .* jsou různé$" +syn match hgDiffIsA "^\%(SL\|HG\): Soubor .* je .* pokud soubor .* je .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Chybí znak konce řádku na konci souboru" +syn match hgDiffCommon "^\%(SL\|HG\): Společné podadresáře: .* a .*" + +" da +syn match hgDiffOnly "^\%(SL\|HG\): Kun i .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Filerne .* og .* er identiske$" +syn match hgDiffDiffer "^\%(SL\|HG\): Filerne .* og .* er forskellige$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Binære filer .* og .* er forskellige$" +syn match hgDiffIsA "^\%(SL\|HG\): Filen .* er en .* mens filen .* er en .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Intet linjeskift ved filafslutning" +syn match hgDiffCommon "^\%(SL\|HG\): Identiske underkataloger: .* og .*" + +" de +syn match hgDiffOnly "^\%(SL\|HG\): Nur in .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Dateien .* und .* sind identisch.$" +syn match hgDiffDiffer "^\%(SL\|HG\): Dateien .* und .* sind verschieden.$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Binärdateien .* and .* sind verschieden.$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Binärdateien .* und .* sind verschieden.$" +syn match hgDiffIsA "^\%(SL\|HG\): Datei .* ist ein .* während Datei .* ein .* ist.$" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Kein Zeilenumbruch am Dateiende." +syn match hgDiffCommon "^\%(SL\|HG\): Gemeinsame Unterverzeichnisse: .* und .*.$" + +" el +syn match hgDiffOnly "^\%(SL\|HG\): Μόνο στο .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Τα αρχεία .* καί .* είναι πανομοιότυπα$" +syn match hgDiffDiffer "^\%(SL\|HG\): Τα αρχεία .* και .* διαφέρουν$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Τα αρχεία .* και .* διαφέρουν$" +syn match hgDiffIsA "^\%(SL\|HG\): Το αρχείο .* είναι .* ενώ το αρχείο .* είναι .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Δεν υπάρχει χαρακτήρας νέας γραμμής στο τέλος του αρχείου" +syn match hgDiffCommon "^\%(SL\|HG\): Οι υποκατάλογοι .* και .* είναι ταυτόσημοι$" + +" eo +syn match hgDiffOnly "^\%(SL\|HG\): Nur en .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Dosieroj .* kaj .* estas samaj$" +syn match hgDiffDiffer "^\%(SL\|HG\): Dosieroj .* kaj .* estas malsamaj$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Dosieroj .* kaj .* estas malsamaj$" +syn match hgDiffIsA "^\%(SL\|HG\): Dosiero .* estas .*, dum dosiero .* estas .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Mankas linifino ĉe fino de dosiero" +syn match hgDiffCommon "^\%(SL\|HG\): Komunaj subdosierujoj: .* kaj .*" + +" es +syn match hgDiffOnly "^\%(SL\|HG\): Sólo en .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Los ficheros .* y .* son idénticos$" +syn match hgDiffDiffer "^\%(SL\|HG\): Los ficheros .* y .* son distintos$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Los ficheros binarios .* y .* son distintos$" +syn match hgDiffIsA "^\%(SL\|HG\): El fichero .* es un .* mientras que el .* es un .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ No hay ningún carácter de nueva línea al final del fichero" +syn match hgDiffCommon "^\%(SL\|HG\): Subdirectorios comunes: .* y .*" + +" fi +syn match hgDiffOnly "^\%(SL\|HG\): Vain hakemistossa .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Tiedostot .* ja .* ovat identtiset$" +syn match hgDiffDiffer "^\%(SL\|HG\): Tiedostot .* ja .* eroavat$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Binääritiedostot .* ja .* eroavat$" +syn match hgDiffIsA "^\%(SL\|HG\): Tiedosto .* on .*, kun taas tiedosto .* on .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Ei rivinvaihtoa tiedoston lopussa" +syn match hgDiffCommon "^\%(SL\|HG\): Yhteiset alihakemistot: .* ja .*" + +" fr +syn match hgDiffOnly "^\%(SL\|HG\): Seulement dans .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Les fichiers .* et .* sont identiques.*" +syn match hgDiffDiffer "^\%(SL\|HG\): Les fichiers .* et .* sont différents.*" +syn match hgDiffBDiffer "^\%(SL\|HG\): Les fichiers binaires .* et .* sont différents.*" +syn match hgDiffIsA "^\%(SL\|HG\): Le fichier .* est un .* alors que le fichier .* est un .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Pas de fin de ligne à la fin du fichier.*" +syn match hgDiffCommon "^\%(SL\|HG\): Les sous-répertoires .* et .* sont identiques.*" + +" ga +syn match hgDiffOnly "^\%(SL\|HG\): I .* amháin: .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Is comhionann iad na comhaid .* agus .*" +syn match hgDiffDiffer "^\%(SL\|HG\): Tá difríocht idir na comhaid .* agus .*" +syn match hgDiffBDiffer "^\%(SL\|HG\): Tá difríocht idir na comhaid .* agus .*" +syn match hgDiffIsA "^\%(SL\|HG\): Tá comhad .* ina .* ach tá comhad .* ina .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Gan líne nua ag an chomhadchríoch" +syn match hgDiffCommon "^\%(SL\|HG\): Fochomhadlanna i gcoitianta: .* agus .*" + +" gl +syn match hgDiffOnly "^\%(SL\|HG\): Só en .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Os ficheiros .* e .* son idénticos$" +syn match hgDiffDiffer "^\%(SL\|HG\): Os ficheiros .* e .* son diferentes$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Os ficheiros binarios .* e .* son diferentes$" +syn match hgDiffIsA "^\%(SL\|HG\): O ficheiro .* é un .* mentres que o ficheiro .* é un .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Non hai un salto de liña na fin da liña" +syn match hgDiffCommon "^\%(SL\|HG\): Subdirectorios comúns: .* e .*" + +" he +" ^\%(SL\|HG\): .* are expansive patterns for long lines, so disabled unless we can match +" some specific hebrew chars +if search('\%u05d5\|\%u05d1', 'nw', '', 100) + syn match hgDiffOnly "^\%(SL\|HG\): .*-ב קר אצמנ .*" + syn match hgDiffIdentical "^\%(SL\|HG\): םיהז םניה .*-ו .* םיצבקה$" + syn match hgDiffDiffer "^\%(SL\|HG\): הזמ הז םינוש `.*'-ו `.*' םיצבקה$" + syn match hgDiffBDiffer "^\%(SL\|HG\): הזמ הז םינוש `.*'-ו `.*' םיירניב םיצבק$" + syn match hgDiffIsA "^\%(SL\|HG\): .* .*-ל .* .* תוושהל ןתינ אל$" + syn match hgDiffNoEOL "^\%(SL\|HG\): \\ ץבוקה ףוסב השד.-הרוש ות רס." + syn match hgDiffCommon "^\%(SL\|HG\): .*-ו .* :תוהז תויקית-תת$" +endif + +" hr +syn match hgDiffOnly "^\%(SL\|HG\): Samo u .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Datoteke .* i .* su identične$" +syn match hgDiffDiffer "^\%(SL\|HG\): Datoteke .* i .* se razlikuju$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Binarne datoteke .* i .* se razlikuju$" +syn match hgDiffIsA "^\%(SL\|HG\): Datoteka .* je .*, a datoteka .* je .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Nema novog retka na kraju datoteke" +syn match hgDiffCommon "^\%(SL\|HG\): Uobičajeni poddirektoriji: .* i .*" + +" hu +syn match hgDiffOnly "^\%(SL\|HG\): Csak .* -ben: .*" +syn match hgDiffIdentical "^\%(SL\|HG\): .* és .* fájlok azonosak$" +syn match hgDiffDiffer "^\%(SL\|HG\): A(z) .* és a(z) .* fájlok különböznek$" +syn match hgDiffBDiffer "^\%(SL\|HG\): A(z) .* és a(z) .* fájlok különböznek$" +syn match hgDiffIsA "^\%(SL\|HG\): A(z) .* fájl egy .*, viszont a(z) .* fájl egy .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Nincs újsor a fájl végén" +syn match hgDiffCommon "^\%(SL\|HG\): Közös alkönyvtárak: .* és .*" + +" id +syn match hgDiffOnly "^\%(SL\|HG\): Hanya dalam .*" +syn match hgDiffIdentical "^\%(SL\|HG\): File .* dan .* identik$" +syn match hgDiffDiffer "^\%(SL\|HG\): Berkas .* dan .* berbeda$" +syn match hgDiffBDiffer "^\%(SL\|HG\): File biner .* dan .* berbeda$" +syn match hgDiffIsA "^\%(SL\|HG\): File .* adalah .* sementara file .* adalah .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Tidak ada baris-baru di akhir dari berkas" +syn match hgDiffCommon "^\%(SL\|HG\): Subdirektori sama: .* dan .*" + +" it +syn match hgDiffOnly "^\%(SL\|HG\): Solo in .*" +syn match hgDiffIdentical "^\%(SL\|HG\): I file .* e .* sono identici$" +syn match hgDiffDiffer "^\%(SL\|HG\): I file .* e .* sono diversi$" +syn match hgDiffBDiffer "^\%(SL\|HG\): I file .* e .* sono diversi$" +syn match hgDiffBDiffer "^\%(SL\|HG\): I file binari .* e .* sono diversi$" +syn match hgDiffIsA "^\%(SL\|HG\): File .* è un .* mentre file .* è un .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Manca newline alla fine del file" +syn match hgDiffCommon "^\%(SL\|HG\): Sottodirectory in comune: .* e .*" + +" ja +syn match hgDiffOnly "^\%(SL\|HG\): .*だけに発見: .*" +syn match hgDiffIdentical "^\%(SL\|HG\): ファイル.*と.*は同一$" +syn match hgDiffDiffer "^\%(SL\|HG\): ファイル.*と.*は違います$" +syn match hgDiffBDiffer "^\%(SL\|HG\): バイナリー・ファイル.*と.*は違います$" +syn match hgDiffIsA "^\%(SL\|HG\): ファイル.*は.*、ファイル.*は.*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ ファイル末尾に改行がありません" +syn match hgDiffCommon "^\%(SL\|HG\): 共通の下位ディレクトリー: .*と.*" + +" ja DiffUtils 3.3 +syn match hgDiffOnly "^\%(SL\|HG\): .* のみに存在: .*" +syn match hgDiffIdentical "^\%(SL\|HG\): ファイル .* と .* は同一です$" +syn match hgDiffDiffer "^\%(SL\|HG\): ファイル .* と .* は異なります$" +syn match hgDiffBDiffer "^\%(SL\|HG\): バイナリーファイル .* と.* は異なります$" +syn match hgDiffIsA "^\%(SL\|HG\): ファイル .* は .* です。一方、ファイル .* は .* です$" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ ファイル末尾に改行がありません" +syn match hgDiffCommon "^\%(SL\|HG\): 共通のサブディレクトリー: .* と .*" + +" lv +syn match hgDiffOnly "^\%(SL\|HG\): Tikai iekš .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Fails .* un .* ir identiski$" +syn match hgDiffDiffer "^\%(SL\|HG\): Faili .* un .* atšķiras$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Faili .* un .* atšķiras$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Binārie faili .* un .* atšķiras$" +syn match hgDiffIsA "^\%(SL\|HG\): Fails .* ir .* kamēr fails .* ir .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Nav jaunu rindu faila beigās" +syn match hgDiffCommon "^\%(SL\|HG\): Kopējās apakšdirektorijas: .* un .*" + +" ms +syn match hgDiffOnly "^\%(SL\|HG\): Hanya dalam .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Fail .* dan .* adalah serupa$" +syn match hgDiffDiffer "^\%(SL\|HG\): Fail .* dan .* berbeza$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Fail .* dan .* berbeza$" +syn match hgDiffIsA "^\%(SL\|HG\): Fail .* adalah .* manakala fail .* adalah .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Tiada baris baru pada penghujung fail" +syn match hgDiffCommon "^\%(SL\|HG\): Subdirektori umum: .* dan .*" + +" nl +syn match hgDiffOnly "^\%(SL\|HG\): Alleen in .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Bestanden .* en .* zijn identiek$" +syn match hgDiffDiffer "^\%(SL\|HG\): Bestanden .* en .* zijn verschillend$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Bestanden .* en .* zijn verschillend$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Binaire bestanden .* en .* zijn verschillend$" +syn match hgDiffIsA "^\%(SL\|HG\): Bestand .* is een .* terwijl bestand .* een .* is$" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Geen regeleindeteken (LF) aan einde van bestand" +syn match hgDiffCommon "^\%(SL\|HG\): Gemeenschappelijke submappen: .* en .*" + +" pl +syn match hgDiffOnly "^\%(SL\|HG\): Tylko w .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Pliki .* i .* są identyczne$" +syn match hgDiffDiffer "^\%(SL\|HG\): Pliki .* i .* różnią się$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Pliki .* i .* różnią się$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Binarne pliki .* i .* różnią się$" +syn match hgDiffIsA "^\%(SL\|HG\): Plik .* jest .*, podczas gdy plik .* jest .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Brak znaku nowej linii na końcu pliku" +syn match hgDiffCommon "^\%(SL\|HG\): Wspólne podkatalogi: .* i .*" + +" pt_BR +syn match hgDiffOnly "^\%(SL\|HG\): Somente em .*" +syn match hgDiffOnly "^\%(SL\|HG\): Apenas em .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Os aquivos .* e .* são idênticos$" +syn match hgDiffDiffer "^\%(SL\|HG\): Os arquivos .* e .* são diferentes$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Os arquivos binários .* e .* são diferentes$" +syn match hgDiffIsA "^\%(SL\|HG\): O arquivo .* é .* enquanto o arquivo .* é .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Falta o caracter nova linha no final do arquivo" +syn match hgDiffCommon "^\%(SL\|HG\): Subdiretórios idênticos: .* e .*" + +" ro +syn match hgDiffOnly "^\%(SL\|HG\): Doar în .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Fişierele .* şi .* sunt identice$" +syn match hgDiffDiffer "^\%(SL\|HG\): Fişierele .* şi .* diferă$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Fişierele binare .* şi .* diferă$" +syn match hgDiffIsA "^\%(SL\|HG\): Fişierul .* este un .* pe când fişierul .* este un .*.$" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Nici un element de linie nouă la sfârşitul fişierului" +syn match hgDiffCommon "^\%(SL\|HG\): Subdirectoare comune: .* şi .*.$" + +" ru +syn match hgDiffOnly "^\%(SL\|HG\): Только в .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Файлы .* и .* идентичны$" +syn match hgDiffDiffer "^\%(SL\|HG\): Файлы .* и .* различаются$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Файлы .* и .* различаются$" +syn match hgDiffIsA "^\%(SL\|HG\): Файл .* это .*, тогда как файл .* -- .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ В конце файла нет новой строки" +syn match hgDiffCommon "^\%(SL\|HG\): Общие подкаталоги: .* и .*" + +" sr +syn match hgDiffOnly "^\%(SL\|HG\): Само у .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Датотеке „.*“ и „.*“ се подударају$" +syn match hgDiffDiffer "^\%(SL\|HG\): Датотеке .* и .* различите$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Бинарне датотеке .* и .* различите$" +syn match hgDiffIsA "^\%(SL\|HG\): Датотека „.*“ је „.*“ док је датотека „.*“ „.*“$" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Без новог реда на крају датотеке" +syn match hgDiffCommon "^\%(SL\|HG\): Заједнички поддиректоријуми: .* и .*" + +" sv +syn match hgDiffOnly "^\%(SL\|HG\): Endast i .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Filerna .* och .* är lika$" +syn match hgDiffDiffer "^\%(SL\|HG\): Filerna .* och .* skiljer$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Filerna .* och .* skiljer$" +syn match hgDiffIsA "^\%(SL\|HG\): Fil .* är en .* medan fil .* är en .*" +syn match hgDiffBDiffer "^\%(SL\|HG\): De binära filerna .* och .* skiljer$" +syn match hgDiffIsA "^\%(SL\|HG\): Filen .* är .* medan filen .* är .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Ingen nyrad vid filslut" +syn match hgDiffCommon "^\%(SL\|HG\): Lika underkataloger: .* och .*" + +" tr +syn match hgDiffOnly "^\%(SL\|HG\): Yalnızca .*'da: .*" +syn match hgDiffIdentical "^\%(SL\|HG\): .* ve .* dosyaları birbirinin aynı$" +syn match hgDiffDiffer "^\%(SL\|HG\): .* ve .* dosyaları birbirinden farklı$" +syn match hgDiffBDiffer "^\%(SL\|HG\): .* ve .* dosyaları birbirinden farklı$" +syn match hgDiffBDiffer "^\%(SL\|HG\): İkili .* ve .* birbirinden farklı$" +syn match hgDiffIsA "^\%(SL\|HG\): .* dosyası, bir .*, halbuki .* dosyası bir .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Dosya sonunda yenisatır yok." +syn match hgDiffCommon "^\%(SL\|HG\): Ortak alt dizinler: .* ve .*" + +" uk +syn match hgDiffOnly "^\%(SL\|HG\): Лише у .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Файли .* та .* ідентичні$" +syn match hgDiffDiffer "^\%(SL\|HG\): Файли .* та .* відрізняються$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Файли .* та .* відрізняються$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Двійкові файли .* та .* відрізняються$" +syn match hgDiffIsA "^\%(SL\|HG\): Файл .* це .*, тоді як файл .* -- .*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Наприкінці файлу немає нового рядка" +syn match hgDiffCommon "^\%(SL\|HG\): Спільні підкаталоги: .* та .*" + +" vi +syn match hgDiffOnly "^\%(SL\|HG\): Chỉ trong .*" +syn match hgDiffIdentical "^\%(SL\|HG\): Hai tập tin .* và .* là bằng nhau.$" +syn match hgDiffIdentical "^\%(SL\|HG\): Cả .* và .* là cùng một tập tin$" +syn match hgDiffDiffer "^\%(SL\|HG\): Hai tập tin .* và .* là khác nhau.$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Hai tập tin nhị phân .* và .* khác nhau$" +syn match hgDiffIsA "^\%(SL\|HG\): Tập tin .* là một .* trong khi tập tin .* là một .*.$" +syn match hgDiffBDiffer "^\%(SL\|HG\): Hai tập tin .* và .* là khác nhau.$" +syn match hgDiffIsA "^\%(SL\|HG\): Tập tin .* là một .* còn tập tin .* là một .*.$" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ Không có ký tự dòng mới tại kêt thức tập tin." +syn match hgDiffCommon "^\%(SL\|HG\): Thư mục con chung: .* và .*" + +" zh_CN +syn match hgDiffOnly "^\%(SL\|HG\): 只在 .* 存在:.*" +syn match hgDiffIdentical "^\%(SL\|HG\): 檔案 .* 和 .* 相同$" +syn match hgDiffDiffer "^\%(SL\|HG\): 文件 .* 和 .* 不同$" +syn match hgDiffBDiffer "^\%(SL\|HG\): 文件 .* 和 .* 不同$" +syn match hgDiffIsA "^\%(SL\|HG\): 文件 .* 是.*而文件 .* 是.*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ 文件尾没有 newline 字符" +syn match hgDiffCommon "^\%(SL\|HG\): .* 和 .* 有共同的子目录$" + +" zh_TW +syn match hgDiffOnly "^\%(SL\|HG\): 只在 .* 存在:.*" +syn match hgDiffIdentical "^\%(SL\|HG\): 檔案 .* 和 .* 相同$" +syn match hgDiffDiffer "^\%(SL\|HG\): 檔案 .* 與 .* 不同$" +syn match hgDiffBDiffer "^\%(SL\|HG\): 二元碼檔 .* 與 .* 不同$" +syn match hgDiffIsA "^\%(SL\|HG\): 檔案 .* 是.*而檔案 .* 是.*" +syn match hgDiffNoEOL "^\%(SL\|HG\): \\ 檔案末沒有 newline 字元" +syn match hgDiffCommon "^\%(SL\|HG\): .* 和 .* 有共同的副目錄$" + +endif + + +syn match hgDiffRemoved "^\%(SL\|HG\): -.*" +syn match hgDiffRemoved "^\%(SL\|HG\): <.*" +syn match hgDiffAdded "^\%(SL\|HG\): +.*" +syn match hgDiffAdded "^\%(SL\|HG\): >.*" +syn match hgDiffChanged "^\%(SL\|HG\): ! .*" + +syn match hgDiffSubname " @@..*"ms=s+3 contained +syn match hgDiffLine "^\%(SL\|HG\): @.*" contains=hgDiffSubname +syn match hgDiffLine "^\%(SL\|HG\): \<\d\+\>.*" +syn match hgDiffLine "^\%(SL\|HG\): \*\*\*\*.*" +syn match hgDiffLine "^\%(SL\|HG\): ---$" + +" Some versions of diff have lines like "#c#" and "#d#" (where # is a number) +syn match hgDiffLine "^\%(SL\|HG\): \d\+\(,\d\+\)\=[cda]\d\+\>.*" + +syn match hgDiffFile "^\%(SL\|HG\): diff\>.*" +syn match hgDiffFile "^\%(SL\|HG\): Index: .*" +syn match hgDiffFile "^\%(SL\|HG\): ==== .*" + +if search('^\%(SL\|HG\): @@ -\S\+ +\S\+ @@', 'nw', '', 100) + " unified + syn match hgDiffOldFile "^\%(SL\|HG\): --- .*" + syn match hgDiffNewFile "^\%(SL\|HG\): +++ .*" +else + " context / old style + syn match hgDiffOldFile "^\%(SL\|HG\): \*\*\* .*" + syn match hgDiffNewFile "^\%(SL\|HG\): --- .*" +endif + +" Used by git +syn match hgDiffIndexLine "^\%(SL\|HG\): index \x\x\x\x.*" + +syn match hgDiffComment "^\%(SL\|HG\): #.*" + +" Define the default highlighting. +" Only used when an item doesn't have highlighting yet +hi def link hgDiffOldFile hgDiffFile +hi def link hgDiffNewFile hgDiffFile +hi def link hgDiffIndexLine PreProc +hi def link hgDiffFile Type +hi def link hgDiffOnly Constant +hi def link hgDiffIdentical Constant +hi def link hgDiffDiffer Constant +hi def link hgDiffBDiffer Constant +hi def link hgDiffIsA Constant +hi def link hgDiffNoEOL Constant +hi def link hgDiffCommon Constant +hi def link hgDiffRemoved Special +hi def link hgDiffChanged PreProc +hi def link hgDiffAdded Identifier +hi def link hgDiffLine Statement +hi def link hgDiffSubname PreProc +hi def link hgDiffComment Comment + +let b:current_syntax = "hgcommitDiff" + +" vim: ts=8 sw=2 diff --git a/runtime/syntax/vim.vim b/runtime/syntax/vim.vim index 26c0e9343c..a1c39e4dcf 100644 --- a/runtime/syntax/vim.vim +++ b/runtime/syntax/vim.vim @@ -451,7 +451,7 @@ if !exists("g:vimsyn_noerror") && !exists("g:vimsyn_novimfunctionerror") syn match vimBufnrWarn /\\|\\|\\|\" skipwhite nextgroup=vimOper,vimOperParen,vimVar,vimFunc,vimNotation +syn match vimNotFunc "\\|\\|\\|\" skipwhite nextgroup=vimOper,vimOperParen,vimVar,vimFunc,vimNotation " Norm: {{{2 " ====