Skip to content

Commit 8907ae4

Browse files
committed
VerilogInstance command is now working. TODO: try to use Plug
1 parent 26381c2 commit 8907ae4

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

plugin/verilog_instance.vim

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
1-
function! VerilogInstance() range
2-
let cmd=a:firstline . "," . a:lastline . "!" . "verilog_instance.py"
1+
if exists("g:loaded_verilog_instance") || &cp || v:version < 700
2+
finish
3+
endif
4+
let g:loaded_verilog_instance = 1
5+
6+
let s:plugin_dir_path = fnamemodify(resolve(expand('<sfile>:p')), ':h')
7+
8+
function! s:VerilogInstance() range
9+
let cmd=a:firstline . "," . a:lastline . "!" . " " . s:plugin_dir_path. "/verilog_instance.py"
310
execute cmd
4-
let cmd=a:firstline . "," . a:lastline . "norm =="
11+
let cmd=a:firstline . "," . a:lastline . "norm! =="
512
execute cmd
613
endfunction
14+
15+
command! -range VerilogInstance call s:VerilogInstance()

0 commit comments

Comments
 (0)