Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix indentation in Systemverilog source

I am using systemverilog very often.
I am using UltraEdit as text editor. I use also VIM.
Sometimes I have to copy code from some other places and paste it into my code.
It may not be indented properly. It is a difficult task to indent it properly again.

Can anybody suggest any method or tool to do it easily?

like image 933
Vineeth Avatar asked Jan 09 '23 22:01

Vineeth


1 Answers

Method

  1. Visit EDA Playground
  2. Paste your code into one of the editor windows
  3. Select all text with CTRL-A
  4. Reindent all text with SHIFT-TAB

Some backgroud

There is a Verilog mode for Code Mirror which supports SystemVerilog. CodeMirror is an in-browser text editor written in JavaScript which is used on a number of websites, including EDA Playground.

You could also paste and reindent in the example window here, or you could download it yourself and run it locally.

like image 155
dwikle Avatar answered Feb 27 '23 02:02

dwikle