New snippets, no ale
This commit is contained in:
25
UltiSnips/verilog.snippets
Normal file
25
UltiSnips/verilog.snippets
Normal file
@@ -0,0 +1,25 @@
|
||||
snippet "reg []" "Register of size." A
|
||||
reg [${1:7}:${2:0}] ${3:register};$0
|
||||
endsnippet
|
||||
|
||||
global !p
|
||||
def complete(t, opts):
|
||||
if t:
|
||||
opts = [ m[len(t):] for m in opts if m.startswith(t) ]
|
||||
if len(opts) == 1:
|
||||
return opts[0]
|
||||
return "(" + "|".join(opts) + ")"
|
||||
endglobal
|
||||
|
||||
snippet always "Do something always @" b
|
||||
always @($1`!p snip.rv=complete(t[1], ['*', 'posedge clk', 'negedge clk', 'posedge rst_n', 'negedge rst_n'])`) begin
|
||||
$2
|
||||
end $0
|
||||
endsnippet
|
||||
|
||||
snippet al "Do something always @" b
|
||||
always @($1) begin
|
||||
$2
|
||||
end $0
|
||||
endsnippet
|
||||
|
||||
Reference in New Issue
Block a user