comparison runtime/syntax/sed.vim @ 10048:43efa4f5a8ea

commit https://github.com/vim/vim/commit/89bcfda6834aba724d12554a34b9ed49f5789fd5 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 30 23:26:57 2016 +0200 Updated runtime files. Remove version checks for Vim older than 6.0.
author Christian Brabandt <cb@256bit.org>
date Tue, 30 Aug 2016 23:30:09 +0200
parents aa6412cab544
children 46763b01cd9a
comparison
equal deleted inserted replaced
10047:a62862410ca1 10048:43efa4f5a8ea
2 " Language: sed 2 " Language: sed
3 " Maintainer: Haakon Riiser <hakonrk@fys.uio.no> 3 " Maintainer: Haakon Riiser <hakonrk@fys.uio.no>
4 " URL: http://folk.uio.no/hakonrk/vim/syntax/sed.vim 4 " URL: http://folk.uio.no/hakonrk/vim/syntax/sed.vim
5 " Last Change: 2010 May 29 5 " Last Change: 2010 May 29
6 6
7 " For version 5.x: Clear all syntax items 7 " quit when a syntax file was already loaded
8 " For version 6.x: Quit when a syntax file was already loaded 8 if exists("b:current_syntax")
9 if version < 600
10 syn clear
11 elseif exists("b:current_syntax")
12 finish 9 finish
13 endif 10 endif
14 11
15 syn match sedError "\S" 12 syn match sedError "\S"
16 13
73 " syntax for the transform command, I use the same pattern matching 70 " syntax for the transform command, I use the same pattern matching
74 " for both commands. There is one problem -- the transform command 71 " for both commands. There is one problem -- the transform command
75 " (y) does not allow any flags. To save memory, I ignore this problem. 72 " (y) does not allow any flags. To save memory, I ignore this problem.
76 syn match sedST "[sy]" nextgroup=sedRegexp\d\+ 73 syn match sedST "[sy]" nextgroup=sedRegexp\d\+
77 74
78 if version >= 508 || !exists("did_sed_syntax_inits") 75 command -nargs=+ HiLink hi def link <args>
79 if version < 508
80 let did_sed_syntax_inits = 1
81 command -nargs=+ HiLink hi link <args>
82 else
83 command -nargs=+ HiLink hi def link <args>
84 endif
85 76
86 HiLink sedAddress Macro 77 HiLink sedAddress Macro
87 HiLink sedACI NONE 78 HiLink sedACI NONE
88 HiLink sedBranch Label 79 HiLink sedBranch Label
89 HiLink sedComment Comment 80 HiLink sedComment Comment
90 HiLink sedDelete Function 81 HiLink sedDelete Function
91 HiLink sedError Error 82 HiLink sedError Error
92 HiLink sedFlag Type 83 HiLink sedFlag Type
93 HiLink sedFlagwrite Constant 84 HiLink sedFlagwrite Constant
94 HiLink sedFunction Function 85 HiLink sedFunction Function
95 HiLink sedLabel Label 86 HiLink sedLabel Label
96 HiLink sedLineCont Special 87 HiLink sedLineCont Special
97 HiLink sedPutHoldspc Function 88 HiLink sedPutHoldspc Function
98 HiLink sedReplaceMeta Special 89 HiLink sedReplaceMeta Special
99 HiLink sedRegexpMeta Special 90 HiLink sedRegexpMeta Special
100 HiLink sedRW Constant 91 HiLink sedRW Constant
101 HiLink sedSemicolon Special 92 HiLink sedSemicolon Special
102 HiLink sedST Function 93 HiLink sedST Function
103 HiLink sedSpecial Special 94 HiLink sedSpecial Special
104 HiLink sedWhitespace NONE 95 HiLink sedWhitespace NONE
105 if exists("highlight_sedtabs") 96 if exists("highlight_sedtabs")
106 HiLink sedTab Todo 97 HiLink sedTab Todo
107 endif 98 endif
108 let __sed_i = char2nr(" ") " ASCII: 32, EBCDIC: 64 99 let __sed_i = char2nr(" ") " ASCII: 32, EBCDIC: 64
109 while __sed_i <= __sed_last 100 while __sed_i <= __sed_last
110 exe "HiLink sedRegexp".__sed_i "Macro" 101 exe "HiLink sedRegexp".__sed_i "Macro"
111 exe "HiLink sedReplacement".__sed_i "NONE" 102 exe "HiLink sedReplacement".__sed_i "NONE"
112 let __sed_i = __sed_i + 1 103 let __sed_i = __sed_i + 1
113 endwhile 104 endwhile
114 105
115 delcommand HiLink 106 delcommand HiLink
116 endif
117 107
118 unlet __sed_i __sed_last __sed_delimiter __sed_metacharacters 108 unlet __sed_i __sed_last __sed_delimiter __sed_metacharacters
119 109
120 let b:current_syntax = "sed" 110 let b:current_syntax = "sed"
121 111