Skip to content

Commit adec2b0

Browse files
committed
Update doc and README.md
1 parent 437daa4 commit adec2b0

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

README.md

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ Options
3333
-------
3434
- let g:verilog_instance_skip_last_coma = {0/1}
3535
- When the variable is 1, last printed line will skip the coma. Default value is 0.
36+
- let g:verilog_instance_keep_comments = {0/1}
37+
- When the variable is 1, comments will be kept (block comments /* */ not support!). Default value is 0.
38+
- let g:verilog_instance_keep_empty_lines = {0/1}
39+
- When the variable is 1, empty lines in your code will be printed. Default value is 0.
3640

3741
Other vim plugins for Verilog/SystemVerilog
3842
---------------------------------------

doc/verilog_instance.txt

+10
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,16 @@ OPTIONS *verilog-instance-options*
3535
*g:verilog_instance_skip_last_coma*
3636
let g:verilog_instance_skip_last_coma = {0/1}
3737
When the variable is 1, last printed line will skip the coma.
38+
The default value is 0.
39+
40+
*g:verilog_instance_keep_comments*
41+
let g:verilog_instance_keep_comments = {0/1}
42+
When the variable is 1, comments will be kept (block comments /* */ not support!).
43+
The default value is 0.
44+
45+
*g:verilog_instance_keep_empty_lines*
46+
let g:verilog_instance_keep_empty_lines = {0/1}
47+
When the variable is 1, empty lines in your code will be printed.
3848
The default value is 0.
3949

4050
------------------------------------------------------------------------------

plugin/verilog_instance.py

+3
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@
5050
# get indentation length from 1st non empty line
5151
if indent_len == -1 and not(pattern_empty_line.match(line)):
5252
indent_len = len(re.match(r'^\s*', line).group(0))
53+
# handle empty line
54+
if pattern_empty_line.match(line) is not None:
55+
contents.append('')
5356
# handle comments
5457
if wait_to_close_comment:
5558
if pattern_close_comment.search(line):

0 commit comments

Comments
 (0)