xref: /vim-8.2.3635/runtime/ftplugin/verilog.vim (revision 5b8d8fdb)
1" Vim filetype plugin file
2" Language:	Verilog HDL
3" Maintainer:	Chih-Tsun Huang <[email protected]>
4" Last Change:	Wed Oct 31 16:16:19 CST 2001
5" URL:		http://larc.ee.nthu.edu.tw/~cthuang/vim/ftplugin/verilog.vim
6
7" Only do this when not done yet for this buffer
8if exists("b:did_ftplugin")
9  finish
10endif
11
12" Don't load another plugin for this buffer
13let b:did_ftplugin = 1
14
15" Set 'formatoptions' to break comment lines but not other lines,
16" and insert the comment leader when hitting <CR> or using "o".
17setlocal fo-=t fo+=croqlm1
18
19" Set 'comments' to format dashed lists in comments.
20setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
21
22" Format comments to be up to 78 characters long
23setlocal tw=75
24
25set cpo-=C
26
27" Win32 can filter files in the browse dialog
28if has("gui_win32") && !exists("b:browsefilter")
29  let b:browsefilter = "Verilog Source Files (*.v)\t*.v\n" .
30	\ "All Files (*.*)\t*.*\n"
31endif
32
33" Let the matchit plugin know what items can be matched.
34if exists("loaded_matchit")
35  let b:match_ignorecase=0
36  let b:match_words=
37    \ '\<begin\>:\<end\>,' .
38    \ '\<case\>\|\<casex\>\|\<casez\>:\<endcase\>,' .
39    \ '\<module\>:\<endmodule\>,' .
40    \ '\<if\>:\<else\>,' .
41    \ '\<function\>:\<endfunction\>,' .
42    \ '`ifdef\>:`else\>:`endif\>,' .
43    \ '\<task\>:\<endtask\>,' .
44    \ '\<specify\>:\<endspecify\>'
45endif
46