annotate runtime/indent/systemverilog.vim @ 34559:ef55fe2ac8be v9.1.0180

patch 9.1.0180: Cursor pos wrong when double-width chars are concealed Commit: https://github.com/vim/vim/commit/010e1539d67442cc69a97bef6453efaf849d0db3 Author: zeertzjq <zeertzjq@outlook.com> Date: Thu Mar 14 18:22:17 2024 +0100 patch 9.1.0180: Cursor pos wrong when double-width chars are concealed Problem: Cursor pos wrong when double-width chars are concealed. Solution: Advance one more virtual column for a double-width char. Run some tests with both 'wrap' and 'nowrap' (zeertzjq). closes: #14197 Signed-off-by: zeertzjq <zeertzjq@outlook.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 14 Mar 2024 18:30:05 +0100
parents d6dde6229b36
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 " Vim indent file
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2 " Language: SystemVerilog
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 " Maintainer: kocha <kocha.lsifrontend@gmail.com>
18186
03b854983b14 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11518
diff changeset
4 " Last Change: 05-Feb-2017 by Bilal Wasim
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
5 " 03-Aug-2022 Improved indent
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 " Only load this indent file when no other was loaded.
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 if exists("b:did_indent")
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 finish
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 endif
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 let b:did_indent = 1
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
12
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 setlocal indentexpr=SystemVerilogIndent()
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
14 setlocal indentkeys=!^F,o,O,0),0},=begin,=end,=join,=endcase,=join_any,=join_none
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 setlocal indentkeys+==endmodule,=endfunction,=endtask,=endspecify
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 setlocal indentkeys+==endclass,=endpackage,=endsequence,=endclocking
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 setlocal indentkeys+==endinterface,=endgroup,=endprogram,=endproperty,=endchecker
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
18 setlocal indentkeys+==`else,=`elsif,=`endif
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19
28379
6dd88e45d47d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
20 let b:undo_indent = "setl inde< indk<"
6dd88e45d47d Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 25773
diff changeset
21
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 " Only define the function once.
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 if exists("*SystemVerilogIndent")
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 finish
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 endif
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 let s:cpo_save = &cpo
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 set cpo&vim
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
30 let s:multiple_comment = 0
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
31 let s:open_statement = 0
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
32
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
33 function SystemVerilogIndent()
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 if exists('b:systemverilog_indent_width')
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 let offset = b:systemverilog_indent_width
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
37 else
11518
63b0b7b79b25 Update runtime files.
Christian Brabandt <cb@256bit.org>
parents: 5663
diff changeset
38 let offset = shiftwidth()
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
39 endif
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
40 if exists('b:systemverilog_indent_modules')
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
41 let indent_modules = offset
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
42 else
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
43 let indent_modules = 0
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
44 endif
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
45
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
46 if exists('b:systemverilog_indent_ifdef_off')
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
47 let indent_ifdef = 0
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
48 else
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
49 let indent_ifdef = 1
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
50 endif
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
51
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
52 " Find a non-blank line above the current line.
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
53 let lnum = prevnonblank(v:lnum - 1)
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
54
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
55 " At the start of the file use zero indent.
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
56 if lnum == 0
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
57 return 0
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
58 endif
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
59
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
60 let lnum2 = prevnonblank(lnum - 1)
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
61 let curr_line = getline(v:lnum)
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
62 let last_line = getline(lnum)
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
63 let last_line2 = getline(lnum2)
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
64 let ind = indent(lnum)
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
65 let ind2 = indent(lnum - 1)
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
66 " Define the condition of an open statement
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
67 " Exclude the match of //, /* or */
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
68 let sv_openstat = '\(\<or\>\|\([*/]\)\@<![*(,{><+-/%^&|!=?:]\([*/]\)\@!\)'
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
69 " Define the condition when the statement ends with a one-line comment
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
70 let sv_comment = '\(//.*\|/\*.*\*/\s*\)'
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
71 if exists('b:systemverilog_indent_verbose')
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
72 let vverb_str = 'INDENT VERBOSE: '. v:lnum .":"
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
73 let vverb = 1
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
74 else
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
75 let vverb = 0
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
76 endif
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
77
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
78 " Multiple-line comment count
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
79 if curr_line =~ '^\s*/\*' && curr_line !~ '/\*.\{-}\*/'
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
80 let s:multiple_comment += 1
33577
d6dde6229b36 runtime: Fix more typos (#13354)
Christian Brabandt <cb@256bit.org>
parents: 29659
diff changeset
81 if vverb | echom vverb_str "Start of multiple-line comment" | endif
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
82 elseif curr_line =~ '\*/\s*$' && curr_line !~ '/\*.\{-}\*/'
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
83 let s:multiple_comment -= 1
33577
d6dde6229b36 runtime: Fix more typos (#13354)
Christian Brabandt <cb@256bit.org>
parents: 29659
diff changeset
84 if vverb | echom vverb_str "End of multiple-line comment" | endif
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
85 return ind
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
86 endif
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
87 " Maintain indentation during commenting.
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
88 if s:multiple_comment > 0
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
89 return ind
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
90 endif
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
91
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
92 " Indent after if/else/for/case/always/initial/specify/fork blocks
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
93 if last_line =~ '^\s*\(end\)\=\s*`\@<!\<\(if\|else\)\>' ||
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
94 \ last_line =~ '^\s*\<\(for\|while\|repeat\|case\%[[zx]]\|do\|foreach\|forever\|randcase\)\>' ||
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
95 \ last_line =~ '^\s*\<\(always\|always_comb\|always_ff\|always_latch\)\>' ||
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
96 \ last_line =~ '^\s*\<\(initial\|specify\|fork\|final\)\>'
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
97 if last_line !~ '\(;\|\<end\>\|\*/\)\s*' . sv_comment . '*$' ||
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
98 \ last_line =~ '\(//\|/\*\).*\(;\|\<end\>\)\s*' . sv_comment . '*$'
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
99 let ind = ind + offset
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
100 if vverb | echom vverb_str "Indent after a block statement." | endif
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
101 endif
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
102 " Indent after function/task/class/package/sequence/clocking/
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
103 " interface/covergroup/property/checkerprogram blocks
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
104 elseif last_line =~ '^\s*\<\(function\|task\|class\|package\)\>' ||
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
105 \ last_line =~ '^\s*\<\(sequence\|clocking\|interface\)\>' ||
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
106 \ last_line =~ '^\s*\(\w\+\s*:\)\=\s*\<covergroup\>' ||
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
107 \ last_line =~ '^\s*\<\(property\|checker\|program\)\>' ||
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
108 \ ( last_line =~ '^\s*\<virtual\>' && last_line =~ '\<\(function\|task\|class\|interface\)\>' ) ||
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
109 \ ( last_line =~ '^\s*\<pure\>' && last_line =~ '\<virtual\>' && last_line =~ '\<\(function\|task\)\>' )
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
110 if last_line !~ '\<end\>\s*' . sv_comment . '*$' ||
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
111 \ last_line =~ '\(//\|/\*\).*\(;\|\<end\>\)\s*' . sv_comment . '*$'
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
112 let ind = ind + offset
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
113 if vverb
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
114 echom vverb_str "Indent after function/task/class block statement."
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
115 endif
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
116 endif
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
117
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
118 " Indent after module/function/task/specify/fork blocks
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
119 elseif last_line =~ '^\s*\(\<extern\>\s*\)\=\<module\>'
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
120 let ind = ind + indent_modules
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
121 if vverb && indent_modules
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
122 echom vverb_str "Indent after module statement."
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
123 endif
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
124 if last_line =~ '[(,]\s*' . sv_comment . '*$' &&
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
125 \ last_line !~ '\(//\|/\*\).*[(,]\s*' . sv_comment . '*$'
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
126 let ind = ind + offset
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
127 if vverb
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
128 echom vverb_str "Indent after a multiple-line module statement."
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
129 endif
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
130 endif
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
131
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
132 " Indent after a 'begin' statement
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
133 elseif last_line =~ '\(\<begin\>\)\(\s*:\s*\w\+\)*' . sv_comment . '*$' &&
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
134 \ last_line !~ '\(//\|/\*\).*\(\<begin\>\)' &&
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
135 \ ( last_line2 !~ sv_openstat . '\s*' . sv_comment . '*$' ||
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
136 \ last_line2 =~ '^\s*[^=!]\+\s*:\s*' . sv_comment . '*$' )
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
137 let ind = ind + offset
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
138 if vverb | echom vverb_str "Indent after begin statement." | endif
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
139
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
140 " Indent after a '{' or a '('
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
141 elseif last_line =~ '[{(]' . sv_comment . '*$' &&
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
142 \ last_line !~ '\(//\|/\*\).*[{(]' &&
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
143 \ ( last_line2 !~ sv_openstat . '\s*' . sv_comment . '*$' ||
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
144 \ last_line2 =~ '^\s*[^=!]\+\s*:\s*' . sv_comment . '*$' )
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
145 let ind = ind + offset
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
146 if vverb | echom vverb_str "Indent after begin statement." | endif
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
147
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
148 " Ignore de-indent for the end of one-line block
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
149 elseif ( last_line !~ '\<begin\>' ||
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
150 \ last_line =~ '\(//\|/\*\).*\<begin\>' ) &&
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
151 \ last_line2 =~ '\<\(`\@<!if\|`\@<!else\|for\|always\|initial\|do\|foreach\|forever\|final\)\>.*' .
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
152 \ sv_comment . '*$' &&
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
153 \ last_line2 !~ '\(//\|/\*\).*\<\(`\@<!if\|`\@<!else\|for\|always\|initial\|do\|foreach\|forever\|final\)\>' &&
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
154 \ last_line2 !~ sv_openstat . '\s*' . sv_comment . '*$' &&
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
155 \ ( last_line2 !~ '\<begin\>' ||
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
156 \ last_line2 =~ '\(//\|/\*\).*\<begin\>' ) &&
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
157 \ last_line2 =~ ')*\s*;\s*' . sv_comment . '*$'
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
158 if vverb
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
159 echom vverb_str "Ignore de-indent after the end of one-line statement."
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
160 endif
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
161
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
162 " De-indent for the end of one-line block
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
163 elseif ( last_line !~ '\<begin\>' ||
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
164 \ last_line =~ '\(//\|/\*\).*\<begin\>' ) &&
18186
03b854983b14 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11518
diff changeset
165 \ last_line2 =~ '\<\(`\@<!if\|`\@<!else\|for\|always\|initial\|do\|foreach\|forever\|final\)\>.*' .
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
166 \ sv_comment . '*$' &&
18186
03b854983b14 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11518
diff changeset
167 \ last_line2 !~ '\(//\|/\*\).*\<\(`\@<!if\|`\@<!else\|for\|always\|initial\|do\|foreach\|forever\|final\)\>' &&
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
168 \ last_line2 !~ sv_openstat . '\s*' . sv_comment . '*$' &&
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
169 \ last_line2 !~ '\(;\|\<end\>\|\*/\)\s*' . sv_comment . '*$' &&
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
170 \ ( last_line2 !~ '\<begin\>' ||
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
171 \ last_line2 =~ '\(//\|/\*\).*\<begin\>' )
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
172 let ind = ind - offset
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
173 if vverb
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
174 echom vverb_str "De-indent after the end of one-line statement."
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
175 endif
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
176
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
177 " Multiple-line statement (including case statement)
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
178 " Open statement
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
179 " Ident the first open line
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
180 elseif last_line =~ sv_openstat . '\s*' . sv_comment . '*$' &&
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
181 \ last_line !~ '\(//\|/\*\).*' . sv_openstat . '\s*$' &&
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
182 \ last_line2 !~ sv_openstat . '\s*' . sv_comment . '*$'
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
183 let ind = ind + offset
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
184 let s:open_statement = 1
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
185 if vverb | echom vverb_str "Indent after an open statement." | endif
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
186
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
187 " `ifdef or `ifndef or `elsif or `else
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
188 elseif last_line =~ '^\s*`\<\(ifn\?def\|elsif\|else\)\>' && indent_ifdef
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
189 let ind = ind + offset
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
190 if vverb
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
191 echom vverb_str "Indent after a `ifdef or `ifndef or `elsif or `else statement."
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
192 endif
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
193
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
194 endif
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
195
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
196 " Re-indent current line
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
197
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
198 " De-indent on the end of the block
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
199 " join/end/endcase/endfunction/endtask/endspecify
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
200 if curr_line =~ '^\s*\<\(join\|join_any\|join_none\|\|end\|endcase\)\>' ||
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
201 \ curr_line =~ '^\s*\<\(endfunction\|endtask\|endspecify\|endclass\)\>' ||
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
202 \ curr_line =~ '^\s*\<\(endpackage\|endsequence\|endclocking\|endinterface\)\>' ||
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
203 \ curr_line =~ '^\s*\<\(endgroup\|endproperty\|endchecker\|endprogram\)\>'
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
204 let ind = ind - offset
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
205 if vverb | echom vverb_str "De-indent the end of a block." | endif
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
206 if s:open_statement == 1
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
207 let ind = ind - offset
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
208 let s:open_statement = 0
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
209 if vverb | echom vverb_str "De-indent the close statement." | endif
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
210 endif
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
211 elseif curr_line =~ '^\s*\<endmodule\>'
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
212 let ind = ind - indent_modules
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
213 if vverb && indent_modules
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
214 echom vverb_str "De-indent the end of a module."
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
215 endif
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
216
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
217 " De-indent on a stand-alone 'begin'
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
218 elseif curr_line =~ '^\s*\<begin\>'
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
219 if last_line !~ '^\s*\<\(function\|task\|specify\|module\|class\|package\)\>' ||
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
220 \ last_line !~ '^\s*\<\(sequence\|clocking\|interface\|covergroup\)\>' ||
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
221 \ last_line !~ '^\s*\<\(property\|checker\|program\)\>' &&
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
222 \ last_line !~ '^\s*\()*\s*;\|)\+\)\s*' . sv_comment . '*$' &&
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
223 \ ( last_line =~
18186
03b854983b14 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 11518
diff changeset
224 \ '\<\(`\@<!if\|`\@<!else\|for\|case\%[[zx]]\|always\|initial\|do\|foreach\|forever\|randcase\|final\)\>' ||
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
225 \ last_line =~ ')\s*' . sv_comment . '*$' ||
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
226 \ last_line =~ sv_openstat . '\s*' . sv_comment . '*$' )
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
227 let ind = ind - offset
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
228 if vverb
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
229 echom vverb_str "De-indent a stand alone begin statement."
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
230 endif
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
231 if s:open_statement == 1
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
232 let ind = ind - offset
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
233 let s:open_statement = 0
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
234 if vverb | echom vverb_str "De-indent the close statement." | endif
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
235 endif
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
236 endif
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
237
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
238 " " Close statement
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
239 " " De-indent for an optional close parenthesis and a semicolon, and only
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
240 " " if there exists precedent non-whitespace char
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
241 " elseif last_line =~ ')*\s*;\s*' . sv_comment . '*$' &&
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
242 " \ last_line !~ '^\s*)*\s*;\s*' . sv_comment . '*$' &&
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
243 " \ last_line !~ '\(//\|/\*\).*\S)*\s*;\s*' . sv_comment . '*$' &&
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
244 " \ ( last_line2 =~ sv_openstat . '\s*' . sv_comment . '*$' &&
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
245 " \ last_line2 !~ ';\s*//.*$') &&
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
246 " \ last_line2 !~ '^\s*' . sv_comment . '$'
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
247 " let ind = ind - offset
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
248 " if vverb | echom vverb_str "De-indent after a close statement." | endif
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
249
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
250 " " De-indent after the end of multiple-line statement
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
251 " elseif curr_line =~ '^\s*)' &&
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
252 " \ ( last_line =~ sv_openstat . '\s*' . sv_comment . '*$' ||
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
253 " \ last_line !~ sv_openstat . '\s*' . sv_comment . '*$' &&
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
254 " \ last_line2 =~ sv_openstat . '\s*' . sv_comment . '*$' )
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
255 " let ind = ind - offset
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
256 " if vverb
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
257 " echom vverb_str "De-indent the end of a multiple statement."
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
258 " endif
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
259
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
260 " De-indent `elsif or `else or `endif
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
261 elseif curr_line =~ '^\s*`\<\(elsif\|else\|endif\)\>' && indent_ifdef
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
262 let ind = ind - offset
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
263 if vverb | echom vverb_str "De-indent `elsif or `else or `endif statement." | endif
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
264 if b:systemverilog_open_statement == 1
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
265 let ind = ind - offset
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
266 let b:systemverilog_open_statement = 0
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
267 if vverb | echom vverb_str "De-indent the open statement." | endif
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
268 endif
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
269 endif
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
270
25773
11b656e74444 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 23573
diff changeset
271 " Return the indentation
5663
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
272 return ind
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
273 endfunction
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
274
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
275 let &cpo = s:cpo_save
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
276 unlet s:cpo_save
1dea14d4c738 Update runtime files. Add support for systemverilog.
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
277
23573
e2e2cc5d0856 Update runtime files.
Bram Moolenaar <Bram@vim.org>
parents: 18186
diff changeset
278 " vim:sw=2
29659
2198955f9e27 Update runtime files
Bram Moolenaar <Bram@vim.org>
parents: 28379
diff changeset
279