SystemVerilog Snippets for VIM users

Just in case you are an Emacs user, you can download and use the equivalent snippets for Emacs from this link. As far as possible, I am using a common codebase for VIM and Emacs SV snippets. So if you use VIM, your snippets would seem much familiar to a colleague at work who loves Emacs.

Just like Emacs, multiple packages are available for VIM that enable use of code snippets within VIM. Of these I used a package named SnipMate for the purpose of exploring VMM snippets in VIM. If you have not used SnipMate before, the following YouTube video provides a wonderful introduction to the package and its use.

Prerequisites

  1. The snipMate package requires VIM 7 or higher.
  2. SystemVerilog mode for VIM from this link.

Download and Install

  1. Download the snippets from here.
  2. Install the package by unzipping it inside the ~/.vim directory.

To test the installation, open a systemverilog file in GVIM and and press the key sequence . This should pop-up a list of available snippets. You can also try ovm snippets by keying in ovm and following it with a TAB press. VMM snippets can be accessed similarly by keying in vmm followed by a TAB press. Most SystemVerilog constructs like while, for, if, class etc too invoke a snippet. Another interesting snippet to try out is once.

2 Responses to “SystemVerilog Snippets for VIM users”

  1. This is very useful . I used to search for this kind of help when I was in my early days with System Verilog.

    Looking forward to more such releases in future.

    Thanks.

  2. JK says:

    This is too good, thanks for sharing.

Leave a Reply

Comment moderation is enabled. Your comment may take some time to appear.