"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/langDefs/vimscript.lang" (12 May 2020, 1071 Bytes) of package /windows/www/highlight-3.57-x64.zip:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "vimscript.lang": 3.53_vs_3.54.

    1 Description="vimscript"
    2 
    3 -- Syntax file created by Max Christian Pohle
    4 
    5 
    6 Categories = {"script", "config"}
    7 
    8 Digits = [[ (?:[0-9])(?:0x|0X|0b)[0-9a-fA-F']+|#?\d*[\.]?\d+(?:[eE][\-\+]\d+)?[lLuU]* ]]
    9 
   10 Keywords={
   11   {  Id=1,
   12     List={ "call", "set", "let",  "au", "if", "endif", "else", "has",
   13     "autocmd", "augroup", "end", "function", "while", "endwhile", "endfunction"},
   14   },
   15   { Id=2,
   16     List= { "filetype", "ft", "syntax", "colorscheme" }
   17   },
   18   { Id=3,
   19     Regex=[[[nvxsoilc]n?o?remap|\&\w+]]
   20   },
   21   { Id=4,
   22     Regex=[[(\w+)\s*\(]]
   23   }
   24 }
   25 
   26 Strings = {
   27   Delimiter=[[']],
   28 
   29   DelimiterPairs= {
   30     { Open=[["(?=.*")]], Close=[["]] }
   31   }
   32 }
   33 
   34 Comments = {
   35   {
   36     Block=false,
   37     Nested=false,
   38     Delimiter = { [[ ^"|"(?!.*")]] }
   39   }
   40 }
   41 
   42 IgnoreCase=true
   43 
   44 Operators=[[\(|\)|\[|\]|\{|\}|\,|\;|\.|\:|\&|<|>|\!|=|\/|\*|\%|\+|\-|\~|\||\^]]
   45 
   46 function OnStateChange(oldState, newState, token)
   47 
   48   if newState==HL_STRING  then
   49     openDelim=token
   50   end
   51 
   52   if oldState==HL_STRING and token==openDelim then
   53     openDelim = nil
   54     return HL_STRING_END
   55   end
   56 
   57   return newState
   58 end