I'm trying to make a search and replace to format the following type of strings.
INPUT
someName0 : in std_logic;
someName1 : in integer;
someName2 : out unsigned;
someName3 : out std_logic_vector(3 downto 0);
OUTPUT
someName0 : in std_logic;
someName1 : in integer;
someName2 : out unsigned;
someName3 : out std_logic_vector(3 downto 0);
So I'm going to have two search and replaces. First one works on the in signals. However "in" also matches "integer", so I need a way to specify to ignore those matches. I've tried using the following but it is saying the pattern wasn't found.
:%s/\<: in \>/: in /g
The basic problem then seems to be how to do a search and replace on some specific string based on what the following character is. Or maybe I'm just taking a horrible approach.
Thanks.