junegunn / vim-easy-align

:sunflower: A Vim alignment plugin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Regex not working for end of line comment characters

SethGower opened this issue · comments

Hello, I apologize if this is because I am using the wrong regex for this, I am not great with regex. I am trying to align the -- or --! characters in a chunk of lines like this

s_1 <= '1'; -- some comment
s_long_sig_name <= "100000"; -- I want this aligned

to this

s_1 <= '1';      -- some comment
s_2 <= "100000"; -- I want this aligned

And this

    i_a : in std_logic; --! Signal A
    i_b : in std_logic_vector; --! Signal B

to this

    i_a : in std_logic;        --! Signal A
    i_b : in std_logic_vector; --! Signal B

I have tried selecting the lines, and then running easy align (with ga in Visual Mode) and then for regex with the patter -- and --! and those don't work. I have done .*-- which yields

           i_a : in std_logic; -- ! Signal A
    i_b : in std_logic_vector; -- ! Signal B

Am I missing something?