annotate runtime/ftplugin/verilog.vim @ 529:0d6092bb72e6

updated for version 7.0148
author vimboss
date Fri, 16 Sep 2005 21:47:57 +0000
parents 35cde31bdcbd
children b933657f7c9d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
1 " Vim filetype plugin file
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
2 " Language: Verilog HDL
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
3 " Maintainer: Chih-Tsun Huang <cthuang@larc.ee.nthu.edu.tw>
504
35cde31bdcbd updated for version 7.0141
vimboss
parents: 7
diff changeset
4 " Last Change: Mon Sep 5 11:05:54 CST 2005
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
5 " URL: http://larc.ee.nthu.edu.tw/~cthuang/vim/ftplugin/verilog.vim
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
6
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
7 " Only do this when not done yet for this buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
8 if exists("b:did_ftplugin")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
9 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 " Don't load another plugin for this buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 let b:did_ftplugin = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14
504
35cde31bdcbd updated for version 7.0141
vimboss
parents: 7
diff changeset
15 " Undo the plugin effect
35cde31bdcbd updated for version 7.0141
vimboss
parents: 7
diff changeset
16 let b:undo_ftplugin = "setlocal fo< com< tw<"
35cde31bdcbd updated for version 7.0141
vimboss
parents: 7
diff changeset
17 \ . "| unlet b:browsefilter b:match_ignorecase b:match_words"
35cde31bdcbd updated for version 7.0141
vimboss
parents: 7
diff changeset
18
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
19 " Set 'formatoptions' to break comment lines but not other lines,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
20 " and insert the comment leader when hitting <CR> or using "o".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
21 setlocal fo-=t fo+=croqlm1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
22
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
23 " Set 'comments' to format dashed lists in comments.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
24 setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
25
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
26 " Format comments to be up to 78 characters long
504
35cde31bdcbd updated for version 7.0141
vimboss
parents: 7
diff changeset
27 if &textwidth == 0
35cde31bdcbd updated for version 7.0141
vimboss
parents: 7
diff changeset
28 setlocal tw=78
35cde31bdcbd updated for version 7.0141
vimboss
parents: 7
diff changeset
29 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 set cpo-=C
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33 " Win32 can filter files in the browse dialog
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 if has("gui_win32") && !exists("b:browsefilter")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
35 let b:browsefilter = "Verilog Source Files (*.v)\t*.v\n" .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
36 \ "All Files (*.*)\t*.*\n"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
37 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " Let the matchit plugin know what items can be matched.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 if exists("loaded_matchit")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 let b:match_ignorecase=0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 let b:match_words=
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 \ '\<begin\>:\<end\>,' .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44 \ '\<case\>\|\<casex\>\|\<casez\>:\<endcase\>,' .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 \ '\<module\>:\<endmodule\>,' .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 \ '\<if\>:\<else\>,' .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 \ '\<function\>:\<endfunction\>,' .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 \ '`ifdef\>:`else\>:`endif\>,' .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 \ '\<task\>:\<endtask\>,' .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 \ '\<specify\>:\<endspecify\>'
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 endif