Missing some features

Hi,

I'm an Xemacs user going to switch to hdt. At first a nice tool, good work. (X)emacs has a very good VHDL-Mode and I'm missing some features in hdt. At first the code beautifier. It aligns the code. In hdt is a similiar feature, but I couldn't see any change in my code.

Second, Xemacs' vhdl mode offers inserting a header template including the date of the last modification. Each time the file is saved this date is updated. Is there a similiar feature in hdt? Or how can I link an external script to the file save function?

Thanks Tom

Beautify and header templates

Hi Tom,

Sigasi HDT currently offers multiple features that can help you beautify your code:

  • Indent: cleans up the indentation of the current selection and removes trailing whitespace (Ctrl+I)
  • Align: Align the selection on :,<=, :=, => or , (Shift+Ctrl+A)
  • Remove trailing whitespace : just remove trailing whitespace
  • Change positional to name association: use a more readable style for instantiations.

Note that you some of the above actions, you have to select some code first (Ctrl+A to select all).

Concerning header templates. You can easily create extra templates to Sigasi HDT, and use autocomplete to add them to your files. You can use the variables such as ${user}, ${date} or ${time} that are automatically filled in when autocompleting.

These dates are however not updated when you change the file. I personally think you should use a version control system to keep track of different versions of your file. If you use Subversion, you can achieve what you describe with keyword substitution:

E.g.:

 -- Created on $Date$
 -- by $Author$
 -- Revision $Rev$

When you commit this will become:
 -- Created on $Date: 2009-11-17 10:07:37 +0100 (Wed, 17 Nov 2009) $
 -- by $Author: heeckhau $
 -- Revision $Rev: 1024 $

Beautify

Hi,

the align feauture does not work on this entity declaration, if I select it or the file content entirely

entity tlv2556_cntrl is
 
    port (
        i_rst_n        : in  std_logic;
        i_clk          : in  std_logic;
        i_tick         : in  std_logic;
        i_conf_en      : in  std_logic;
        i_conf_we      : in  std_logic;
        i_conf_be      : in  std_logic_vector;
        i_conf_addr    : in  std_logic_vector;
        i_pi_addr     : in  unsigned;
        i_conf_data     : in  std_logic_vector;
        i_tlv2556_dout : in  std_logic;
        i_tlv2556_eoc   : in  std_logic;
        o_zero         : out std_logic;  -- zero crossing of sample periode counter
        o_pi_data      : out std_logic_vector;
        o_tlv2556_din  : out std_logic;
        o_tlv2556_sclk : out std_logic;
        o_tlv2556_cs   : out std_logic
        );
 
end entity tlv2556_cntrl;

Just now it looks different, because HTML can not formated by spaces.

Beautify

You should select only those lines that you want to align (See also this post on the align action).

Post new comment

The content of this field is kept private and will not be shown publicly.
By submitting this form, you accept the Mollom privacy policy.