Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
spice.vim76 linesDownload Raw Back to syntax
1" Vim syntax file2" Language:	Spice circuit simulator input netlist3" Maintainer:	Noam Halevy <Noam.Halevy.motorola.com>4" Last Change:	2012 Jun 015" 		(Dominique Pelle added @Spell)6"7" This is based on sh.vim by Lennart Schultz8" but greatly simplified9 10" quit when a syntax file was already loaded11if exists("b:current_syntax")12  finish13endif14 15" spice syntax is case INsensitive16syn case ignore17 18syn keyword	spiceTodo	contained TODO19 20syn match spiceComment  "^ \=\*.*$" contains=@Spell21syn match spiceComment  "\$.*$" contains=@Spell22 23" Numbers, all with engineering suffixes and optional units24"==========================================================25"floating point number, with dot, optional exponent26syn match spiceNumber  "\<[0-9]\+\.[0-9]*\(e[-+]\=[0-9]\+\)\=\(meg\=\|[afpnumkg]\)\="27"floating point number, starting with a dot, optional exponent28syn match spiceNumber  "\.[0-9]\+\(e[-+]\=[0-9]\+\)\=\(meg\=\|[afpnumkg]\)\="29"integer number with optional exponent30syn match spiceNumber  "\<[0-9]\+\(e[-+]\=[0-9]\+\)\=\(meg\=\|[afpnumkg]\)\="31 32" Misc33"=====34syn match   spiceWrapLineOperator       "\\$"35syn match   spiceWrapLineOperator       "^+"36 37syn match   spiceStatement      "^ \=\.\I\+"38 39" Matching pairs of parentheses40"==========================================41syn region  spiceParen transparent matchgroup=spiceOperator start="(" end=")" contains=ALLBUT,spiceParenError42syn region  spiceSinglequote matchgroup=spiceOperator start=+'+ end=+'+43 44" Errors45"=======46syn match spiceParenError ")"47 48" Syncs49" =====50syn sync minlines=5051 52" Define the default highlighting.53" Only when an item doesn't have highlighting yet54 55hi def link spiceTodo		Todo56hi def link spiceWrapLineOperator	spiceOperator57hi def link spiceSinglequote	spiceExpr58hi def link spiceExpr		Function59hi def link spiceParenError	Error60hi def link spiceStatement		Statement61hi def link spiceNumber		Number62hi def link spiceComment		Comment63hi def link spiceOperator		Operator64 65 66let b:current_syntax = "spice"67 68" insert the following to $VIM/syntax/scripts.vim69" to autodetect HSpice netlists and text listing output:70"71" " Spice netlists and text listings72" elseif getline(1) =~ 'spice\>' || getline("$") =~ '^\.end'73"   so <sfile>:p:h/spice.vim74 75" vim: ts=876 
codekingpro/portable-devtools · Team Ai