Email: bknpk@hotmail.com Phone: +972-54-7649119
V

 

ASIC/FPGA Design and Verification Out Source Services

VIM enabling systemverilog syntax

Automatic detect a system verilog file and start its syntax coloring in VIM.

  1. Although there are many explanations in the web, it took me time to find one, that works on my system. Once it did work for me, I decided to document what I did.

  2. First I created a directory in my home user. ~/.vim. It contains a file named: filetype.vim:

  3.     if did_filetype() " filetype already set..
            finish " ..don't do these checks
        endif
        if getline(1) =~ '^#!.*\'
            setfiletype mine
        elseif getline(1) =~? '\'
            setfiletype drawing
        endif

  4. Under the directory ~/.vim create another directory namely, syntax, and put there the syntax file.

  5. Last thing to do is to put a line in your ~/.gvimrc:
  6. au BufRead,BufNewFile *.sv set filetype=sv

  7. This is the file I use for systemverilog syntax: systemverilog syntax

  8. Another vim alias, which is handy, is manual specmansyntax enable: manual specman syntax enable

  ...


Home

Download Area

wireless re-scan






Search This Site


Feedback This Site




new pages on this site