annotate runtime/ftplugin/verilog.vim @ 31904:a4358b58d3fb v9.0.1284

patch 9.0.1284: compiler warnings for uninitialized variables Commit: https://github.com/vim/vim/commit/40b4872966d3886e7ff86184ae4ffb58704bf075 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Feb 5 17:04:50 2023 +0000 patch 9.0.1284: compiler warnings for uninitialized variables Problem: Compiler warnings for uninitialized variables. (Tony Mechelynck) Solution: Add variable initializations.
author Bram Moolenaar <Bram@vim.org>
date Sun, 05 Feb 2023 18:15:03 +0100
parents 8d76a56861ec
children 8ae680be2a51
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
12254
8d76a56861ec Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
3 " Maintainer: Chih-Tsun Huang <cthuang@cs.nthu.edu.tw>
8d76a56861ec Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
4 " Last Change: 2017 Aug 25 by Chih-Tsun Huang
8d76a56861ec Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
5 " URL: http://www.cs.nthu.edu.tw/~cthuang/vim/ftplugin/verilog.vim
8d76a56861ec Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
6 "
8d76a56861ec Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
7 " Credits:
8d76a56861ec Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
8 " Suggestions for improvement, bug reports by
8d76a56861ec Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
9 " Shao <shaominghai2005@163.com>
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
10
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
11 " Only do this when not done yet for this buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
12 if exists("b:did_ftplugin")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
13 finish
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
14 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
15
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
16 " Don't load another plugin for this buffer
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
17 let b:did_ftplugin = 1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
18
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 857
diff changeset
19 " Set 'cpoptions' to allow line continuations
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 857
diff changeset
20 let s:cpo_save = &cpo
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 857
diff changeset
21 set cpo&vim
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 857
diff changeset
22
504
35cde31bdcbd updated for version 7.0141
vimboss
parents: 7
diff changeset
23 " Undo the plugin effect
35cde31bdcbd updated for version 7.0141
vimboss
parents: 7
diff changeset
24 let b:undo_ftplugin = "setlocal fo< com< tw<"
857
b933657f7c9d updated for version 7.0g01
vimboss
parents: 504
diff changeset
25 \ . "| unlet! b:browsefilter b:match_ignorecase b:match_words"
504
35cde31bdcbd updated for version 7.0141
vimboss
parents: 7
diff changeset
26
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
27 " Set 'formatoptions' to break comment lines but not other lines,
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
28 " and insert the comment leader when hitting <CR> or using "o".
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
29 setlocal fo-=t fo+=croqlm1
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
30
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
31 " Set 'comments' to format dashed lists in comments.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
32 setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,://
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
33
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
34 " Format comments to be up to 78 characters long
504
35cde31bdcbd updated for version 7.0141
vimboss
parents: 7
diff changeset
35 if &textwidth == 0
35cde31bdcbd updated for version 7.0141
vimboss
parents: 7
diff changeset
36 setlocal tw=78
35cde31bdcbd updated for version 7.0141
vimboss
parents: 7
diff changeset
37 endif
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
38
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
39 " Win32 can filter files in the browse dialog
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
40 if has("gui_win32") && !exists("b:browsefilter")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
41 let b:browsefilter = "Verilog Source Files (*.v)\t*.v\n" .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
42 \ "All Files (*.*)\t*.*\n"
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
43 endif
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
44
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
45 " Let the matchit plugin know what items can be matched.
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
46 if exists("loaded_matchit")
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
47 let b:match_ignorecase=0
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
48 let b:match_words=
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
49 \ '\<begin\>:\<end\>,' .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
50 \ '\<case\>\|\<casex\>\|\<casez\>:\<endcase\>,' .
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
51 \ '\<module\>:\<endmodule\>,' .
12254
8d76a56861ec Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
52 \ '\<if\>:`\@<!\<else\>,' .
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
53 \ '\<function\>:\<endfunction\>,' .
12254
8d76a56861ec Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
54 \ '`ifn\?def\>:`elsif\>:`else\>:`endif\>,' .
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
55 \ '\<task\>:\<endtask\>,' .
12254
8d76a56861ec Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
56 \ '\<specify\>:\<endspecify\>,' .
8d76a56861ec Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
57 \ '\<config\>:\<endconfig\>,' .
8d76a56861ec Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
58 \ '\<generate\>:\<endgenerate\>,' .
8d76a56861ec Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
59 \ '\<fork\>:\<join\>,' .
8d76a56861ec Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
60 \ '\<primitive\>:\<endprimitive\>,' .
8d76a56861ec Update runtime files
Christian Brabandt <cb@256bit.org>
parents: 2034
diff changeset
61 \ '\<table\>:\<endtable\>'
7
3fc0f57ecb91 updated for version 7.0001
vimboss
parents:
diff changeset
62 endif
2034
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 857
diff changeset
63
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 857
diff changeset
64 " Reset 'cpoptions' back to the user's setting
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 857
diff changeset
65 let &cpo = s:cpo_save
7bc41231fbc7 Update runtime files.
Bram Moolenaar <bram@zimbu.org>
parents: 857
diff changeset
66 unlet s:cpo_save