systemverilog.vim

" Vim syntax file
" Language:    SystemVerilog
" Maintainer:    Stephen Hobbs <[email protected]>
" 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 < 600
   syntax clear
elseif exists("b:current_syntax")
   finish
endif

" Set the local value of the ‘iskeyword‘ option
if version >= 600
   setlocal iskeyword[email protected],48-57,_,192-255
else
   set [email protected],48-57,_,192-255
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.1 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=80

" 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 >= 508 || !exists("did_systemverilog_syn_inits")
   if version < 508
      let did_systemverilog_syn_inits = 1
      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
时间: 2024-11-06 15:21:21

systemverilog.vim的相关文章

systemverilog的高亮显示

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

Debian下VIM的安装和配置

1.安装 apt-get install vim 2.配置 这是我的vim 配饰文件,基本的功能都能实现,在这里做一个备份,省的以后重装系统还要到处找这个配置文件(/etc/vim/vimrc) : " All system-wide defaults are set in $VIMRUNTIME/debian.vim (usually just " /usr/share/vim/vimcurrent/debian.vim) and sourced by the call to :ru

vim选中字符复制/剪切/粘贴

问题描述: vim 中选中指定字符,进行复制/剪切/粘贴 问题解决: 进入vim中visual模式,visual模式进入,可以有三种方式: (1)在普通模式(normal)下,直接按键 v  就可以进入默认visual模式,可以使用v+j/k/h/l 进行文本选择 注: 使用normal模式下的  v命令,进入visual模式,v+ j/k/h/l   进行文本选中 对于选中的文本进行如下按键: (1.1)d   ------ 剪切操作 (1.2)y   -------复制操作 (1.3)p  

vim复制,粘贴,剪切文本

vim编辑器 引用文本: ------------------------------------------------------------------------------------------------------------------ 时常自我反省,敏感的思想家 你对于自己及四周的环境能够比一般人控制得更好更彻底. 你讨厌表面化及肤浅的东西:你宁愿独自一人也不愿跟别人闲谈,但你跟朋友的关系却非常 深入,这令你的心境保持和谐安逸. 你不介意长时间独自一人,而且绝少会觉得沉闷.

5.5 进入编辑模式 5.6 vim命令模式 5.7 vim实践

5.5 进入编辑模式 5.6 vim命令模式 5.7 vim实践 扩展 vim的特殊用法 http://www.apelearn.com/bbs/thread-9334-1-1.html vim常用快捷键总结 http://www.apelearn.com/bbs/thread-407-1-1.html vim快速删除一段字符 http://www.apelearn.com/bbs/thread-842-1-1.html vim乱码 http://www.apelearn.com/bbs/thr

Vim快捷键

Vim快捷键 普通模式 [行间跳转] gg 游标移动到到第一行 G 游标移动到最后一行 nG 游标移动到第 n 行 Ctrl + o 快速回到上一次(跳转前)光标所在位置 Shift+zz 普通模式下输入即可保存退出vim [行内跳转] w 到下一个单词的开头 e 到下一个单词的结尾 b 到前一个单词的开头 ge 到前一个单词的结尾 0 或 ^ 光标跳转到行头 $ 光标跳转到行尾 f 字母 向后搜索<字母>并跳转到第一个匹配的位置 F字母 向前搜索<字母>并跳转到第一个匹配的位置

linux基本命令整理(三):进程和vim

linux基本命令整理(三) -----------进程和vim 一.进程 1.查看进程 ps:将某个时间点的程序运行的状况截取下来 a:所有的进程 x:后台进程 u:有效的使用者相关的进程(常用组合aux) -IA:也能观察系统所有的数据 axjf:连同部分的程序树状态 -I:今查看和自己bash相关的程序 top:动态的观察进程的变化 -d:后面接描述,就是整个页面刷新的时间:默认是5秒 -b:以批次的方式执行top -n:与-b搭配使用,意义是需要进行几次top的输出结果 如:top -b

secure CRT设置vim显示颜色

第一步:确定是否安装vim-enhanced.基本上都是会安装好的. 第二步:将Emulation下的Terminal设置为Xterm,然后选中后面的两个复选框. 第三步:将外观下的主题设置为Traditional,字体设置为如下. 第四步:如下进行断开连接. 第五步:如下进行再次连接,登陆即可. 接下来,用vim随便打开一个文件. 如上所示,至此.设置成功.

8. vim编辑器高级应用

1. vim主要模式介绍 命令模式.命令行模式.编辑模式 字符操作:i 当前插入, I行首插入, a当前字符之后插入,A行首插入, ESC退出当前模式 2. vim命令模式 3. vim插入模式 4. vim可视化模式 5. vim开发环境 6. gedit a.exe &