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. java基础---->Serializable的使用

    本次讲解中我们建立一个Java的项目去体会一下序列化Serializable的使用,序列化的原理以及序列化的自定义请参见我的另外一篇博客(java高级---->Serializable序列化的源 ...

  2. quartz的job怎么获取Spring上下文

    第一步.在org.springframework.scheduling.quartz.SchedulerFactoryBean对象中注入applicationContextSchedulerConte ...

  3. 十年京东Java程序员的工作总结,写给迷茫中的你!

    很多年前,刚刚从大学毕业的时候,很多公司来校招.其中最烂俗的一个面试问题是:“你希望你之后三到五年的发展是什么?”.我当时的标准回答是(原话):“成为在某一方面能够独当一面的技术专家“.后来经历了几家 ...

  4. mysql 安装到最后一步时,start service 为失败状态

    容易出现的问题:mysql 安装到最后一步时,start service 为失败状态.   解决方法: 方式1  MySQL安装是出现could not start the service mysql ...

  5. PPT设计灵感功能

    最近老师让我们做PPT,我用的是power point是office365加强版.我发现如果想平常那样直接做的话排版太死板了,不好看.我当时想:管他呢,先做出来再说.刚输完标题,放了几张图片进去右边就 ...

  6. Let me introduce myself

    介绍自己,从开学到这上半学期结束,不知道说了多少个版本.开学军训,要自我介绍:军训结束,在班里要自我介绍:参加社团,面试要自我介绍.....不能说对每个人,至少对于我来说,在众人面前开口介绍自己,总还 ...

  7. vue项目目录结构

    VUE项目目录结构 如上图所示,我们的目录结构就是这样的了. 目录/文件 说明 build 这个是我们最终发布的时候会把代码发布在这里,在开发阶段,我们基本不用管. config 配置目录,默认配置没 ...

  8. Pycharm中flask框架应用

    flask框架应用实例 get方法 服务器端 server.py 如下 import flask app=flask.Flask(_name_) //启动一个应用程序 @app.rout(" ...

  9. 学习animejs

    1.安装方式 (1)npm install animejs 2.引入 import anime from 'animejs' 3.使用 (anime({ targets: 'div', transla ...

  10. pass,break,continue的使用场景

    # ### 关键字的使用 pass / break / continue # pass 过 起到占位的作用 if 5 == 5: pass print(123) # break 只能应用在循环当中 用 ...