vscode-better-align icon indicating copy to clipboard operation
vscode-better-align copied to clipboard

Align code by any characters

Open kevin-wamae opened this issue 2 years ago • 13 comments

Hi? I've only managed to align comments starting with //.

How can I allow for other characters, such as # ?

kevin-wamae avatar Feb 20 '23 05:02 kevin-wamae

Could you please show somes examples? Maybe it's not supported yet.

chouzz avatar Feb 21 '23 09:02 chouzz

Here's an example with R, where I'd want to align by # library(readtext) # handling plain and formatted text files library(magrittr) # command-chaining

kevin-wamae avatar Feb 21 '23 11:02 kevin-wamae

The default comment is //, but seems now it can be changed in different languages. I think it can be supported.

chouzz avatar Feb 23 '23 02:02 chouzz

Ok, thanks.

Is that something I need to tweak on my end, or should I wait on you to add the feature?

kevin-wamae avatar Feb 24 '23 10:02 kevin-wamae

Just wait. I will add this.

chouzz avatar Feb 27 '23 10:02 chouzz

+1 to this. In VHDL assignment operators have two forms: := and <= and it's pretty standard to have code aligned like this:

a_name <= '1';
b_sig  <= '0';
c_s    <= "001";

Also, comments start with --.

abyszuk avatar Apr 21 '23 15:04 abyszuk

Thanks for the feedback, I found it's harder than I thought, but I will investigate this.

chouzz avatar Apr 25 '23 14:04 chouzz

+1 here. In SQL, you might want to align using AS:

SELECT
       XXX        AS      YY
       AAAAAA     AS      BB
FROM
       TTT

GaryLiuTelus avatar Jul 27 '23 13:07 GaryLiuTelus

I also need this performance, especially in python and shell code.

loverchun avatar Sep 12 '23 01:09 loverchun

+1 to this. In VHDL assignment operators have two forms: := and <= and it's pretty standard to have code aligned like this:

a_name <= '1';
b_sig  <= '0';
c_s    <= "001";

Also, comments start with --.

have anyone figure out how to fix this?

Ahmad-Zaklouta avatar Sep 19 '23 08:09 Ahmad-Zaklouta

您好,您的邮件我已收到,我会尽快给您回复,谢谢!

loverchun avatar Sep 19 '23 08:09 loverchun