1.

在_vimrc文件末尾添加:

syntax   on           "确定vim打开语法高亮
filetype on "打开文件类型检测
filetype plugin on "为特定的文件类型允许插件文件的载入
filetype indent on "为特定的文件类型载入缩进文件

2.

修改Vim\vim73下的filetype.vim文件,在末尾加入:

au BufRead,BufNewFile *.sv,*.sva                set filetype=systemverilog

3.

将systemverilog.vim文件放入以下文件夹:

:Vim\vimfiles\syntax

systemverilog.vim文件内容

" Vim syntax file
" Language: SystemVerilog
" Maintainer: Stephen Hobbs <stephenh@cadence.com>
" Last Update: Wed Jun 14 15:56:00 BST 2006
" Built on verilog.vim from vim63 " For version 5.x: Clear all syntax items
" For version 6.x: Quit when a syntax file was already loaded
if version <
syntax clear
elseif exists("b:current_syntax")
finish
endif " Set the local value of the 'iskeyword' option
if version >=
setlocal iskeyword=@,-,_,-
else
set iskeyword=@,-,_,-
endif " Taken from the SystemVerilog 3.1a Annex B:
syn keyword systemverilogStatement alias always always_comb always_ff always_latch
syn keyword systemverilogStatement and assert assign assume automatic before begin
syn keyword systemverilogStatement bind bins binsof bit break buf bufif0 bufif1
syn keyword systemverilogStatement byte case casex casez cell chandle class clocking
syn keyword systemverilogStatement cmos config const constraint context continue cover
syn keyword systemverilogStatement covergroup coverpoint cross deassign default
syn keyword systemverilogStatement defparam design disable dist do edge else end
syn keyword systemverilogStatement endcase endclass endclocking endconfig endfunction
syn keyword systemverilogStatement endgenerate endgroup endinterface endmodule
syn keyword systemverilogStatement endpackage endprimitive endprogram endproperty
syn keyword systemverilogStatement endspecify endsequence endtable endtask enum event
syn keyword systemverilogStatement expect export extends extern final first_match for
syn keyword systemverilogStatement force foreach forever fork forkjoin function generate
syn keyword systemverilogStatement genvar highz0 highz1 if iff ifnone ignore_bins
syn keyword systemverilogStatement illegal_bins import incdir include initial inout
syn keyword systemverilogStatement input inside instance int integer interface intersect
syn keyword systemverilogStatement join join_any join_none large liblist library local
syn keyword systemverilogStatement localparam logic longint macromodule matches medium
syn keyword systemverilogStatement modport module nand negedge new nmos nor
syn keyword systemverilogStatement noshowcancelled not notif0 notif1 null or output
syn keyword systemverilogStatement package packed parameter pmos posedge primitive
syn keyword systemverilogStatement priority program property protected pull0 pull1
syn keyword systemverilogStatement pulldown pullup pulsestyle_onevent pulsestyle_ondetect
syn keyword systemverilogStatement pure rand randc randcase randsequence rcmos
syn keyword systemverilogStatement real realtime ref reg release repeat return
syn keyword systemverilogStatement rnmos rpmos rtran rtranif0 rtranif1 scalared sequence
syn keyword systemverilogStatement shortint shortreal showcancelled signed small solve
syn keyword systemverilogStatement specify specparam static string strong0 strong1 struct
syn keyword systemverilogStatement super supply0 supply1 table tagged task this
syn keyword systemverilogStatement throughout time timeprecision timeunit tran
syn keyword systemverilogStatement tranif0 tranif1 tri tri0 tri1 triand trior trireg type
syn keyword systemverilogStatement typedef union unique unsigned use var vectored virtual
syn keyword systemverilogStatement void wait wait_order wand weak0 weak1
syn keyword systemverilogStatement while wildcard wire with within wor xnor xor " LRM 3.7 String methods:
syn keyword systemverilogStatement len getc putc toupper tolower compare
syn keyword systemverilogStatement icompare substr
syn keyword systemverilogStatement itoa hextoa octtoa bintoa realtoa
syn keyword systemverilogStatement atoi atohex atooct atobin atoreal
" LRM 3.8 events:
syn keyword systemverilogStatement triggered
" LRM 3.10 methods for enumerated types:
syn keyword systemverilogStatement first last next prev num name
" LRM 4.6 Dynamic Arrays:
syn keyword systemverilogStatement delete
" LRM 4.10 Associative Array methods:
syn keyword systemverilogStatement num exists
" LRM 4.15.1 Array locator methods:
syn keyword systemverilogStatement find find_index find_first find_first_index
syn keyword systemverilogStatement find_last find_last_index min max unique unique_index
" LRM 4.15.2 Array ordering methods:
syn keyword systemverilogStatement reverse sort rsort shuffle
" LRM 4.15.3 Array reduction methods:
syn keyword systemverilogStatement sum product
" LRM 4.15.4 Array iterator query:
syn keyword systemverilogStatement index
"" LRM 7.10. Builtin package:
syn keyword systemverilogStatement std
" LRM Annex C standard library
syn keyword systemverilogStatement get put try_get try_put peek try_peek
syn keyword systemverilogStatement status kill self await suspend resume
" LRM Annex D List methods
syn keyword systemverilogStatement next prev eq neq data
syn keyword systemverilogStatement size empty push_front push_back
syn keyword systemverilogStatement front back pop_front pop_back
syn keyword systemverilogStatement start finish insert insert_range
syn keyword systemverilogStatement erase erase_range set swap clear purge " New time specification:
" #1step or #1ps
syn match systemverilogNumber "\<[0-9_]\+\([munpf]\|\)s\>"
syn match systemverilogNumber "\<[0-9_]\+step\>" " Original systemverilog syntax below here syn keyword systemverilogTodo contained TODO syn match systemverilogOperator "[&|~><!)(*#%@+/=?:;}{,.\^\-\[\]]" syn region systemverilogComment start="/\*" end="\*/" contains=systemverilogTodo
syn match systemverilogComment "//.*" contains=systemverilogTodo "syn match systemverilogGlobal "`[a-zA-Z0-9_]\+\>"
syn match systemverilogGlobal "`celldefine"
syn match systemverilogGlobal "`default_nettype"
syn match systemverilogGlobal "`define"
syn match systemverilogGlobal "`else"
syn match systemverilogGlobal "`elsif"
syn match systemverilogGlobal "`endcelldefine"
syn match systemverilogGlobal "`endif"
syn match systemverilogGlobal "`ifdef"
syn match systemverilogGlobal "`ifndef"
syn match systemverilogGlobal "`include"
syn match systemverilogGlobal "`line"
syn match systemverilogGlobal "`nounconnected_drive"
syn match systemverilogGlobal "`resetall"
syn match systemverilogGlobal "`timescale"
syn match systemverilogGlobal "`unconnected_drive"
syn match systemverilogGlobal "`undef"
syn match systemverilogGlobal "$[a-zA-Z0-9_]\+\>" syn match systemverilogConstant "\<[A-Z][A-Z0-9_]\+\>" syn match systemverilogNumber "\(\<\d\+\|\)'[bB]\s*[0-1_xXzZ?]\+\>"
syn match systemverilogNumber "\(\<\d\+\|\)'[oO]\s*[0-7_xXzZ?]\+\>"
syn match systemverilogNumber "\(\<\d\+\|\)'[dD]\s*[0-9_xXzZ?]\+\>"
syn match systemverilogNumber "\(\<\d\+\|\)'[hH]\s*[0-9a-fA-F_xXzZ?]\+\>"
syn match systemverilogNumber "\<[+-]\=[0-9_]\+\(\.[0-9_]*\|\)\(e[0-9_]*\|\)\>" syn region systemverilogString start=+"+ skip=+\\"+ end=+"+ contains=systemverilogEscape
syn match systemverilogEscape +\\[nt"\\]+ contained
syn match systemverilogEscape "\\\o\o\=\o\=" contained " Directives
syn match systemverilogDirective "//\s*synopsys\>.*$"
syn region systemverilogDirective start="/\*\s*synopsys\>" end="\*/"
syn region systemverilogDirective start="//\s*synopsys dc_script_begin\>" end="//\s*synopsys dc_script_end\>" syn match systemverilogDirective "//\s*\$s\>.*$"
syn region systemverilogDirective start="/\*\s*\$s\>" end="\*/"
syn region systemverilogDirective start="//\s*\$s dc_script_begin\>" end="//\s*\$s dc_script_end\>" "Modify the following as needed. The trade-off is performance versus
"functionality.
syn sync lines= " Define the default highlighting.
" For version 5.7 and earlier: only when not done already
" For version 5.8 and later: only when an item doesn't have highlighting yet
if version >= || !exists("did_systemverilog_syn_inits")
if version <
let did_systemverilog_syn_inits =
command -nargs=+ HiLink hi link <args>
else
command -nargs=+ HiLink hi def link <args>
endif " The default highlighting.
HiLink systemverilogCharacter Character
HiLink systemverilogConditional Conditional
HiLink systemverilogRepeat Repeat
HiLink systemverilogString String
HiLink systemverilogTodo Todo
HiLink systemverilogComment Comment
HiLink systemverilogConstant Constant
HiLink systemverilogLabel Label
HiLink systemverilogNumber Number
HiLink systemverilogOperator Special
HiLink systemverilogStatement Statement
HiLink systemverilogGlobal Define
HiLink systemverilogDirective SpecialComment
HiLink systemverilogEscape Special delcommand HiLink
endif let b:current_syntax = "systemverilog" " vim: ts=2

systemverilog的高亮显示的更多相关文章

  1. vim中systemverilog的高亮显示

    vim中systemverilog的高亮显示 Linux中的vim显示systemverilog语法高亮 windows中的gvim显示systemverilog语法高亮 Linux系统 查看打开vi ...

  2. JS实战 · 表格行颜色间隔显示,并在鼠标指定行上高亮显示

    思路: 1.获取所有行对象,将需要间隔颜色显示的行对象进行动态的className属性指定:      前提是:先定义好类选择器,就是说给行对象赋予name. 2.高亮用到两个事件:onmouseov ...

  3. ecliplse高亮显示选中的相同变量

    选择:windows-> preferences->java->Editor->Mark Occurences 选择最上的复选框,下面的就有很多了. 其中的Local vari ...

  4. sublime 配置jade高亮显示

    1.下载 Package Control.sublime-package 文件放入Packages文件目录下 2.control + shift + p   输入install package 3. ...

  5. Eclipse设置选中高亮显示

    高亮显示选中的变量对于程序员编程很有帮助,正常情况下Eclipse选中变量时都会高亮显示,可能软件冲突导致高亮显示失效,通过如下方法可以进行恢复. 单击IDE顶部Window菜单下的Prefences ...

  6. clistctrl失去焦点高亮显示选中行

    clistctrl失去焦点高亮显示选中行 响应两个消息 NM_SETFOCUS,NM_KILLFOCUS void CDatabaseParseDlg::OnNMKillfocusListGroup( ...

  7. js实现当前导航菜单高亮显示

    为了增加用户体验度,增加网页的易用性和美观度,往往需要把当前导航菜单以特殊方式显示,通常是高亮显示或有不同于其它菜单的背景,有两种方法可以实现,第一种是用纯css来实现,二是用js辅助css来实现,两 ...

  8. 关于Lucene.net 中高亮显示关键词的深究

    这几天一直在学习lucene,也写了3篇自己总结的知识点,本以为很容易上手的东西,但是却遇到了一个很棘手的问题,借此,希望可以跟大家探讨一下 问题:使用盘古高亮显示组件后,如搜索“mp3 player ...

  9. Lucene.net 高亮显示搜索词

    网站搜索关键词,往往搜索的结果中,要把用户搜索的词突出显示出来,这就是高亮搜索词的含义.而lucene也恰恰支持这样的操作.在此,我用的是盘古的组件,代码如下: PanGu.HighLight.Sim ...

随机推荐

  1. mfs windows客户端

    之前用moosefs,苦于没有Windows客户端, 本来想在Linux上mfsmount一个目录然后用samba做共享目录,但是这样太不简洁了. 当然豆瓣上有的小伙伴也说自己开发了moosefs的W ...

  2. 实现首字母或拼音检索-sql语句方式

    create function [dbo].[fn_GetPY](@str nvarchar(max),@type int) returns nvarchar(max) as begin ) begi ...

  3. 跟随我在oracle学习php(6)

    CSS,主要用于控制Web页面的外观.通过使用CSS样式设置页面的风格,可将页面的内容 与表现形式分离.css  层叠样式表美化页面配合html布局. 在当前可以浏览的网站当中,都存在着CSS样式代码 ...

  4. 诡异的bug!!

    在我些项目的时候,命名从来没有用过 font 元素,但是打开 Chrome 浏览器查看元素时,总是 font 元素???而且写的 <span class= "xxx"> ...

  5. golang 缺少逗号报错问题

    一个逗号引发的语法报错问题:syntax error: unexpected newline, expecting comma or }或者missing ',' before newline in ...

  6. C# MVC 微信支付教程系列之公众号支付

    微信支付教程系列之公众号支付           今天,我们接着讲微信支付的系列教程,前面,我们讲了这个微信红包和扫码支付.现在,我们讲讲这个公众号支付.公众号支付的应用环境常见的用户通过公众号,然后 ...

  7. 关于iOSlaunchScreen的尺寸

    备注:这里只是个人的观点,有的地方也是copy,多多指教,个人笔记,有侵犯你们版权的地方还望海涵!!! 关于launchImage 的尺寸链接 摘自:http://www.cnblogs.com/Ri ...

  8. WINDOWS SERVER 2016 设置使用照片查看器查看图片

    1.使用win+R快捷键快速打开运行,输入regedit打开注册表 2.在注册表中找到HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows Photo Viewe ...

  9. Python中异常处理

    高级语言通常都配置了一套try...except...finally的错误处理机制. 1.我们先看一个try的机制 try: res=1/0except ZeroDivisionError as e: ...

  10. java面向对象编程(六)--四大特征之继承

    本文将介绍继承.方法重载和方法覆盖.其中方法重载和方法覆盖是在讲多态时必须要清楚的一个知识点. 一.继承 1.继承的概念 继承可以解决代码复用,让我们的编程更加靠近人类思维.当多个类存在相同的属性(变 ...