Well I’m having trouble replicating exactly what you’re talking about here. If I put in the text you display above, and then beautify, I get the following:
entity test
port(
myport1 : in std_logic; -- this port associated with : test 1
myport2 : out std_logic; -- this port is associated with : test 2
myport3 : out std_logic -- this port was associated with : test 3, but is now unused, leave open in port map
);
end entity test;
I see no additional space around the :
in the inline comment. I tried another case where I altered your example to really remove all space around :
:
entity test
port(
myport1 : in std_logic; -- this port associated with:test 1
myport2: out std_logic; -- this port is associated with:test 2
myport3 : out std_logic -- this port was associated with:test 3, but is now unused, leave open in port map
);
end entity test;
Running beautify against this produces:
entity test
port(
myport1 : in std_logic; -- this port associated with:test 1
myport2 : out std_logic; -- this port is associated with:test 2
myport3 : out std_logic -- this port was associated with:test 3, but is now unused, leave open in port map
);
end entity test;
Note that the spacing around :
is preserved.
However all that being said, this was tested with version 1.8.0. This is actually relatively newly released and due to the Package Control incident last week and weekend, it’s possible that you are not running this version and I think the prior version of the package was less careful about comments. So if you could check what version you’re running it’d be helpful.
You can always find out what version you’re running by using the Command Palette and selecting VHDL Mode - Version (Console)
or by using the keybind for it Alt-k V
. Be sure to have the console open with `Ctrl-`` . If you’re not running 1.8.0 you can make the Package Control package update this by going to the Command Palette and going to Package Control: Upgrade Package and it ought to refresh its knowledge of latest versions and see if there’s not an update for VHDL Mode available.
So, give that a shot and let me know what happens. One of the big tasks for 1.8.0 was to refactor the beautification routine so that I had the opportunity to do smarter things with comments, both full line and in-line comments like you see here. If that doesn’t solve your problem, let’s see if we can come up with a test case that demonstrates exactly what you’re looking for.