In Emacs how would I align a group of text:
signal slv4 : std_logic_vector(3 downto 0);
signal slv16 : std_logic_vector(15 downto 0);
signal slv8 : std_logic_vector(7 downto 0);
signal slv32 : std_logic_vector(32 downto 0);
so it looks like this
signal slv4 : std_logic_vector( 3 downto 0);
signal slv16 : std_logic_vector(15 downto 0);
signal slv8 : std_logic_vector( 7 downto 0);
signal slv32 : std_logic_vector(32 downto 0);
Basically I want to right justify the numbers before "downto"; another side effect is that the text is right justified (the semi-colons line up).
How would I achieve this? I have played around with M-x align
and M-x align-regexp
however I can't seem to get what I'm looking for.
Also I'm using vhdl-mode so maybe it has something built in?