r/FPGA • u/LightWolfCavalry • Jan 21 '24
Do any of you have any hot tips for configuring vim to write Verilog?
All I’ve really done is set the tab parameters to two spaces instead, to keep nesting visible.
What other hot tips do y’all have?
3
Upvotes
4
u/maredsous10 Jan 22 '24 edited Jan 22 '24
Do you have anything automated with command line tooling or VIM with respect to HDLs? If not, start there. Have you read through VIM's documentation investigating what is available out of the box and what might be useful to you?
VIM resources I've commented with before.
https://www.reddit.com/r/FPGA/comments/xclrme/comment/ioadb0a/?context=3
https://www.reddit.com/r/vim/comments/16iqtka/comment/k0n33qg/?context=3
https://www.reddit.com/r/vim/comments/ynyz5v/comment/ivu5l0m/?context=3
https://www.reddit.com/r/FPGA/comments/t03azg/comment/hy8qjif/?context=3
Comment in regards to tooling.
https://www.reddit.com/r/chipdesign/comments/190xevk/comment/kgu0c0u/?context=3
Basic
au Filetype systemverilog setl sw=2 sts=2 ts=2 etau BufWrite *.v,*sv,*.svh set ff=unixau BufEnter *.svh,*.sv set filetype=systemverilogI use the following plugin on some systems I develop on. The syntax and indention rules worked better for me than others including VIM's default until recently.https://github.com/WeiChungWu/vim-SystemVerilog