sponsor Vim development Vim logo Vim Book Ad

systemverilog.vim : Indent & syntax script for Verilog and SystemVerilog

 script karma  Rating 44/19, Downloaded by 962    Comments, bugs, improvements  Vim wiki

created by
Nachum Kanovsky
 
script type
indent
 
description
This script is maintained on github at:
https://github.com/nachumk/systemverilog.vim

Installation instructions for Pathogen can be found here: https://github.com/nachumk/systemverilog.vim#pathogen-install.

These scripts indent and highlight SystemVerilog. It is set to load for Verilog and SystemVerilog files.

Comments are not touched! No indent is done on comments at all. Don't attempt to comment in the middle of a block comment, it won't know that it is a comment and therefore it will attempt to indent.
Two single line statements that have no begin are indented the same:

if(a)
  if(b)
    c = 1;

will actually indent as:

if(a)
if(b)
  c = 1;

This is because it is not easy to detect infinitely long indents of this sort. By using this convention this type of code can be indented properly.
 
install details
Copy ftdetect/systemverilog.vim to <home>/.vim/ftdetect/systemverilog.vim
Copy indent/systemverilog.vim to <home>/.vim/indent/systemverilog.vim
Copy syntax/systemverilog.vim to <home>/.vim/syntax/systemverilog.vim
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
systemverilog.1.3.tar.gz 1.3 2014-01-29 7.0 Nachum Kanovsky Ignores keywords in single line strings. Eg: If a string contained the word 'end' it would mis-indent.
systemverilog.1.2.tar.gz 1.2 2014-01-29 7.0 Nachum Kanovsky Added in 'z' and 'x' for number highlighting.
Added in missing operators for highlighting - Thanks to Eugene Mikhantiev.
systemverilog.1.1.tar.gz 1.1 2014-01-17 7.0 Nachum Kanovsky Improved case statement highlighting.
eg: label1, label2, label3: ...
will now highlight properly.
systemverilog.1.0.tar.gz 1.0 2013-11-13 7.0 Nachum Kanovsky Fixed incorrect highlighting of numbers and times.
systemverilog.0.9.tar.gz 0.9 2013-11-12 7.0 Nachum Kanovsky Fixed syntax highlighting for case and possibly other keywords messed up by the existence of svIdentifier.
systemverilog.0.8.tar.gz 0.8 2013-10-25 7.0 Nachum Kanovsky Fixed assume property indent.
systemverilog.0.7.tar.gz 0.7 2013-10-25 7.0 Nachum Kanovsky Fixed issue with assert and cover property statements causing indent.
systemverilog.0.6.tar.gz 0.6 2013-10-25 7.0 Nachum Kanovsky Added a bunch of additional keywords to syntax script. Supports property, sequence, covergroup, etc...
systemverilog.0.5.tar.gz 0.5 2013-10-24 7.0 Nachum Kanovsky Added in syntax highlighting
Indent with ( as well
Added in headers
systemverilog.0.4.tar.gz 0.4 2013-10-07 7.0 Nachum Kanovsky oops, forgot to uncomment finish lines in load checks
systemverilog.0.3.tar.gz 0.3 2013-10-07 7.0 Nachum Kanovsky Added in { and }.
systemverilog.0.2.tar.gz 0.2 2013-10-07 7.3 Nachum Kanovsky Added support for pure functions.
systemverilog.tar.gz 0.1 2013-10-07 7.0 Nachum Kanovsky Initial upload
ip used for rating: 23.20.50.20

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
SourceForge.net Logo