I have been using Emacs to create and modify Verilog codes for some time now.
However, in Verilog mode, I am facing a small issue when I try to insert an “if” statement using the emacs command:
C-c C-t ?
The following is an example of how the statement is created in the above scenario:
if (a<b) begin
// the rest of the code
However I need emacs to insert the “begin” in the next line as shown below:
if (a<b)
begin
//rest of the code
After digging through the Verilog customization options available, I found one option named Verilog Indent Begin After If which I think is supposed to produce the above effect. However toggling this option did not give my any visible changes.
Any help would be greatly appreciated.
Looking at the code you will see that the function:
actually defines a skeleton. Just copy paste and add another line-break:
now we just need to hook our function over the old one in verilog-mode: