! SPICE syntax highlighting, Version: 0.01 written for NEdit 5.1.1 ! ! INSTALLATION ! ! Load these macros and/or background menu commands by starting nedit with: ! ! nedit -import ! ! Then, check that the macros and/or background menu commands were loaded ! correctly, and choose Save Defaults from the Preferences menu. The new ! macros and/or background menu commands will now be incorporated into your ! own .nedit file, so the next time you start NEdit, you will no longer need ! to use -import. ! ! These comments will not appear in your ~/.nedit ! ! Created and Maintained by: Joe Glenn jeglennn@lycos.com (2000.11.09) ! Notes: ! * I just whipped this up quick. It catches lots of simple cases ! for things that *I* use often. (Some of which aren't totally standard ! spice syntax. Like the use of <> in preprocessing of spice files. ! * This is incomplete and it is not very robust. At some point I would ! like to make it a little smarter so that it will catch and highlight ! details of, say a ".measure" statement. I abandoned that twice because ! I was having trouble dealing with the '+' (continuation of line). ! ! One last thing: I use this often, and it is helpful for me. Thanks ! NEdit community for creating such a great tool. ! nedit.fileVersion: 5.1 nedit.macroCommands: \ SPICE Comments>+ * Comment@SPICE:Alt+8::: {\n\ replace-in-selection("^.*$", "* &", "regex")\n\ }\n\ SPICE Comments>- * Comment@SPICE:::: {\n\ replace_in_selection("(^\\\\* )(.*)$", "\\\\2", "regex")\n\ }\n ! nedit.highlightPatterns: SPICE:10:0{\n\ commnet:"((^[*])|\\$).*$":::Comment::\n\ componenet:"^(?i(a|c|e|f|g|h|m|r|u|v|x))[a-zA-Z0-9_]*>":::Subroutine1::D\n\ keywords:"<(?i(tran|pwl|trig|targ|when|probe|accurate))":::Keyword::D\n\ string:"'":"'"::String::D\n\ dot-meas:"^\\.(?i(meas|measure))":::Identifier::D\n\ dot_options_eqs:"<(?i(ingold|k2lim|pivot|post|dcon|converge|from|to|at|trig|method)(\\s*)=)":::Keyword::D\n\ dot-ends:"^[.](end|ends|endl|enddata)>":::Identifier::D\n\ dot-line:"^[.](?i(op|load|net|dcvolt|disto|eom|four|graph|macro|noise|nodeset|protect|sample|save|sens|subckt|tf|title|unprotect|pz|fft|del|alter|data|protect|unprotect|print|plot|#meas|#measure|param|probe|ac|dc|tran|lib|ic|options|include|temp|width))>":::Identifier::D\n\ dot-line_eqs:"<(?i(out|param)(\\s*)=)":::Keyword::D\n\ mosfet_eqs:"<(?i(l|w|as|ad|ps|pd)(\\s*)=)":::Keyword::D\n\ subckt_eqs:"<(?i(m(\\s*)=))":::Keyword::D\n\ paren-v-i-min-max:"(?i(v|i|min|max))\\(":"\\)":".end":String2::D\n\ paren-in-string:"(?i(v|i|min|max))\\(":"\\)":".end":String2:string:D\n\ skel-replace:"\\<":"\\>":".end":Preprocessor::D\n\ other_eqs:"<([a-zA-Z0-9_]*(\\s*)=)":::Label::D\n\ } nedit.languageModes: SPICE:.sp .spice .skel .measure .meas .out:".lib .tran .temp .options .ic .ic.gold"::::: ! generated with nxlang 1.00