7
|
1 " Vim filetype plugin file
|
|
2 " Language: Verilog HDL
|
|
3 " Maintainer: Chih-Tsun Huang <cthuang@larc.ee.nthu.edu.tw>
|
|
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
|
|
8 if exists("b:did_ftplugin")
|
|
9 finish
|
|
10 endif
|
|
11
|
|
12 " Don't load another plugin for this buffer
|
|
13 let 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".
|
|
17 setlocal fo-=t fo+=croqlm1
|
|
18
|
|
19 " Set 'comments' to format dashed lists in comments.
|
|
20 setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
|
|
21
|
|
22 " Format comments to be up to 78 characters long
|
|
23 setlocal tw=75
|
|
24
|
|
25 set cpo-=C
|
|
26
|
|
27 " Win32 can filter files in the browse dialog
|
|
28 if has("gui_win32") && !exists("b:browsefilter")
|
|
29 let b:browsefilter = "Verilog Source Files (*.v)\t*.v\n" .
|
|
30 \ "All Files (*.*)\t*.*\n"
|
|
31 endif
|
|
32
|
|
33 " Let the matchit plugin know what items can be matched.
|
|
34 if 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\>'
|
|
45 endif
|