vim: update release.sh to vim 7.3
[msysgit/mtrensch.git] / share / vim / vim72 / syntax / spice.vim
blobee1433eadc8bb2638238b532bf4ff45a78961304
1 " Vim syntax file
2 " Language:     Spice circuit simulator input netlist
3 " Maintainer:   Noam Halevy <Noam.Halevy.motorola.com>
4 " Last Change:  12/08/99
6 " This is based on sh.vim by Lennart Schultz
7 " but greatly simplified
9 " For version 5.x: Clear all syntax items
10 " For version 6.x: Quit when a syntax file was already loaded
11 if version < 600
12   syntax clear
13 elseif exists("b:current_syntax")
14   finish
15 endif
17 " spice syntax is case INsensitive
18 syn case ignore
20 syn keyword     spiceTodo       contained TODO
22 syn match spiceComment  "^ \=\*.*$"
23 syn match spiceComment  "\$.*$"
25 " Numbers, all with engineering suffixes and optional units
26 "==========================================================
27 "floating point number, with dot, optional exponent
28 syn match spiceNumber  "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=\(meg\=\|[afpnumkg]\)\="
29 "floating point number, starting with a dot, optional exponent
30 syn match spiceNumber  "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\(meg\=\|[afpnumkg]\)\="
31 "integer number with optional exponent
32 syn match spiceNumber  "\<[0-9]\+\(e[-+]\=[0-9]\+\)\=\(meg\=\|[afpnumkg]\)\="
34 " Misc
35 "=====
36 syn match   spiceWrapLineOperator       "\\$"
37 syn match   spiceWrapLineOperator       "^+"
39 syn match   spiceStatement      "^ \=\.\I\+"
41 " Matching pairs of parentheses
42 "==========================================
43 syn region  spiceParen transparent matchgroup=spiceOperator start="(" end=")" contains=ALLBUT,spiceParenError
44 syn region  spiceSinglequote matchgroup=spiceOperator start=+'+ end=+'+
46 " Errors
47 "=======
48 syn match spiceParenError ")"
50 " Syncs
51 " =====
52 syn sync minlines=50
54 " Define the default highlighting.
55 " For version 5.7 and earlier: only when not done already
56 " For version 5.8 and later: only when an item doesn't have highlighting yet
57 if version >= 508 || !exists("did_spice_syntax_inits")
58   if version < 508
59     let did_spice_syntax_inits = 1
60     command -nargs=+ HiLink hi link <args>
61   else
62     command -nargs=+ HiLink hi def link <args>
63   endif
65   HiLink spiceTodo              Todo
66   HiLink spiceWrapLineOperator  spiceOperator
67   HiLink spiceSinglequote       spiceExpr
68   HiLink spiceExpr              Function
69   HiLink spiceParenError        Error
70   HiLink spiceStatement         Statement
71   HiLink spiceNumber            Number
72   HiLink spiceComment           Comment
73   HiLink spiceOperator          Operator
75   delcommand HiLink
76 endif
78 let b:current_syntax = "spice"
80 " insert the following to $VIM/syntax/scripts.vim
81 " to autodetect HSpice netlists and text listing output:
83 " " Spice netlists and text listings
84 " elseif getline(1) =~ 'spice\>' || getline("$") =~ '^\.end'
85 "   so <sfile>:p:h/spice.vim
87 " vim: ts=8