You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I has been using your vim plug for a while, and it the best so far.
However, when I have a class with extern functions/tasks, the folding will not work expecting from the extern methods with argument which has default value.
As in the picture.
Could you help to fix this.
Thanks a lot
My test class:
class test_syn extends uvm_component;
`uvm_component_utils(test_syn)
function new(string name = "test_syn", uvm_component parent);
super.new(name, parent);
endfunction : new
extern virtual task test_syn_task0();
extern virtual task test_syn_task1();
extern virtual task test_syn_task2();
extern virtual task test_syn_task3();
extern virtual task test_syn_task4(int b);
extern virtual task test_syn_task5(int a = 0); //folding from here
endclass: test_syn
my vim cfg:
augroup filetype_verilog_systemverilog
autocmd!
autocmd FileType verilog_systemverilog setlocal foldmethod=syntax
autocmd FileType verilog_systemverilog let g:verilog_indent_width = 3
autocmd FileType verilog_systemverilog let g:verilog_efm_uvm_lst = "all"
autocmd FileType verilog_systemverilog setlocal foldcolumn=2 "defines 2 col at window left, to indicate folding
autocmd FileType verilog_systemverilog setlocal foldopen=block,insert,hor,search
autocmd FileType verilog_systemverilog setlocal foldclose=all
autocmd FileType verilog_systemverilog let g:verilog_efm_uvm_lst = "fatal,error,warning"
autocmd FileType verilog_systemverilog let g:verilog_syntax_fold_lst = "class,function,task,interface,covergroup,sequence,property,block,instance,specify"
autocmd FileType verilog_systemverilog setlocal foldlevelstart=1
autocmd FileType verilog_systemverilog setlocal foldlevel=1
augroup END
The text was updated successfully, but these errors were encountered:
Hi @dvtalk,
Sorry for the long time to reply.
Vim does not allow folding of a single line.
If you had an empty line, I could try to fold the extern and the consecutive empty line, but not sure if this would even make sense.
Hi,
I has been using your vim plug for a while, and it the best so far.
However, when I have a class with extern functions/tasks, the folding will not work expecting from the extern methods with argument which has default value.
As in the picture.
Could you help to fix this.
Thanks a lot

My test class:
my vim cfg:
The text was updated successfully, but these errors were encountered: