How to use SPICE syntax highlighter in Sublime Text 3

This topic has nothing to do with STM32 devices, but it seems nice feature for all SPICE users who uses notepad to edit circuit, which may be very transparent to look.

In this post, I will walk you through steps to enable SPICE syntax highlighter for Sublime Text 3. If you don’t have this great text editor, I really suggest you start using it. I’ve used Notepad++ first, but when I first saw this editor, I immediatelly switched to it. It supports many things and is very lightweight.

So, let’s start with steps how to install syntax highlighter.

Step by step guide

Syntax highlighter supports regular spice syntax, HSPICE, Spectre and SPICE OPUS.

  1. After you have installed Sublime Text 3 editor, open it up, go to View -> Show Console, copy/paste code below and hit enter. After few seconds it will tell you that is done. Code (There are 2 codes for Sublime Text version 2 or 3. Make sure you use code for your version.):

  2. You have to restart Sublime.
  3. Open Sublime back up and hit CTRL + SHIFT + P. Another command window will pop-up. Type inside “Package control: Install package” and hit enter. Popup window will open again for you.
  4. Last step is to find our package. Search for “Spice Syntax Highlight” plugin and hit enter. It will install your plugin and you are ready to use.
  5. Supported extensions are:  sp, cdl, mdl, cir, mod, scs, spi.
  6. If you open file of this type and there is no syntax highlighted, then you have to manually enable it. Go to View -> Syntax -> Spice and it will enable SPICE syntax highlight.
  7. Have a nice use.

Source: Package Control for Sublime

Spice syntax highlighter result

Spice syntax highlighter result


Owner of this site. Application engineer, currently employed by STMicroelectronics. Exploring latest technologies and owner of different libraries posted on Github.

You may also like...

Read before commenting!

Before you make a new comment, make sure you agree with things listed below:

  • - Read post to make sure if it is already posted what you are asking for,
  • - Make sure you have the latest version of libraries used in your project,
  • - Make a clean and grammatically correct written message,
  • - Report as many details as possible, including what have you done so far,
  • - Do NOT post any code here. Use Pastebin,
  • - Do NOT post any error codes here. Use Pastebin,
  • - Specify STM32Fxxx family and used Discovery/EVAL/Nucleo or custom made board,
  • - Make sure your clock is set correct for PLL,
  • - If you are using my HAL drivers, please check this post how to start.
Comment will be deleted on breaking these rules without notification!