Syntax Highlight For System Verilog Files

Enable syntax highlight for sytemm verilog, verilog preprocessor files with extensions v, sv, vpp, svh, svhpp

Create a file named “.vimrc” in your home directory [*nix]

Put the following lines in that file

“File Begins here

“Note: Comments in vim script begin with double quote

“Filename : .vimrc

“Author    :  A.G.Raja

“Website  : https://agraja.wordpress.com

“Show line numbers

set nu

“Source the syntax file

so $VIMRUNTIME/syntax/verilog.vim

“Add file extensions to be highlighted

au Syntax sv runtime! syntax/verilog.vim

au Syntax svh runtime! syntax/verilog.vim

au Syntax vpp runtime! syntax/verilog.vim

au Syntax svpp runtime! syntax/verilog.vim

au Syntax svhpp runtime! syntax/verilog.vim

“End of file

Advertisements

7 thoughts on “Syntax Highlight For System Verilog Files

  1. ravisguptaji,
    Probably u tried to execute the “.vimrc” script
    from the command line. You don’t have to do that.
    Just save this file at $HOME. Open your SystemVerilog
    file in vim/GVIM. That’s it.

  2. Hi,
    what is teh env $VIMRUNTIME you mentioned?

    I added those lines into the verilog.vim under $HOME/.vim/syntax/verilog.vim but it doesnt work.

    what is your comment?

    Thanks
    Legang

  3. Hi
    This worked though I didn’t source the env file. U must be knowing our environment I guess! 🙂 How did that work?
    BTW thanks for the post, it was helpful…

    Sujitha Dhandapani

  4. Hi AG.RAJA
    This worked though I didn’t source the env file. U must be knowing our environment I guess! 🙂 How did that work?
    BTW thanks for the post, it was helpful…

    Sujitha Dhandapani

  5. Hi, AG.RAJA,
    So thanks for your sharing, it’s really helpful in my working space:)

    Have a nice day!!

    B.R.
    –Angel

  6. Namaste Shree Raja jee,

    This info was indeed helpful. I’m delighted.
    Keep helping ….

    GOd bless you!!!

    Best Regards,
    Rajesh

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s