Sublime Forum

The most flexible alignment tool: AlignTab

#8

Its working! Thanks a lot!

0 Likes

#9

I have updated the plugin to make it more friendly to new users.
Check it out~
github.com/randy3k/AlignTab

0 Likes

#10

Thank you very much for such a great plugin!

0 Likes

#11

I love this plug in! But one small hiccup with any == found. They become = = when aligning to first =
so this:

$fieldAutoPopulate == ("true") ? $autoPop = "checked" : $autoPop = "";

becomes

$fieldAutoPopulate = = ("true") ? $autoPop = "checked" : $autoPop = "";

and it doesn’t work anymore.

0 Likes

#12

try

(?<!=)=(?!=)/f

however, if you use this, it will align the equal sign in $autoPop = "checked"

Auto line detection will become not reliable in this situation.
In this case, you may want to highlight the piece of code before applying the alignment.

0 Likes

#13

FWIW – I outlined a useful (?) use case for tabular data in Markdown here: viewtopic.php?f=2&t=12606&start=10#p49982

0 Likes

#14

[quote=“bizoo”]\(|\)/l1c0l0c0
Not sure it works.
This plugin give me headaches every time I use it :wink:[/quote]

That’s why you can save the regexp as a predefined pattern, so your head only will ache once. :smile:

0 Likes

#15

I am now opening a wiki page for examples.
So, it would be nice if you can provide your examples to the wiki~

github.com/randy3k/AlignTab/wiki/Examples

0 Likes

#16

Awesome plugin, thank you! But how do you turn off Table Mode? :confused:

0 Likes

#17

while you are in table mode, you can press to escape table mode

0 Likes

#18

Would you mind removing the context menuitems and place these in commands instead? These take the place of Cut, Copy and Paste
Currently maintain the ontology of the menus, is complicated, because we lack some sort of organization… and mutations(features)… but everyone can help… :slight_smile:

0 Likes

#19

not works. Text is still aligned and statusbar still shows “[Table Mode]”

P.S: Using Regex is very slow when aligning large table (painful when in Table Mode). This makes SublimeTableEditor superior in speed.
Maybe an option to disable Regex possible?

0 Likes

#20

should exit the table mode. could you tell me what version of st and platform you are using?

SublimeTableEditor is definitely superior in a lot of aspects in table editing as aligntab aims for general purpose.
However, i am working in a way to improve the speed.

0 Likes

#21

I’m using ST3 buld 3056 - Windows 7 x32

0 Likes

#22

do you still have problem with exiting the table mode?

0 Likes

#23

I tested in ST3 on Windows 8 64bit and it doesn’t seem do have any problems.

0 Likes

#24

using it in CSS, is there a way to add “{” as an align mode, in the right click interface?
adding it to the settings file does not seem to affect it.

(except regexp)

0 Likes

#25

[quote=“sneila”]using it in CSS, is there a way to add “{” as an align mode, in the right click interface?
adding it to the settings file does not seem to affect it.

(except regexp)[/quote]

you can create your own Context.sublime-menu and put it under User.

0 Likes

#26

So f*****g sexy. Imagine the possibilities!

0 Likes

#27

Hey all. I don’t know much about regex, but this tool looks like it would be perfect for aligning verilog port lists. Could anyone help me figure out how to configure it to turn code like this:

input [17:0] SW, // write enable, write address, input data input [0:0] KEY, // reset input CLOCK_50, // 50 MHz clock output [0:0] LEDG, // write enable output [0:6] HEX7, // write address output [0:6] HEX6, // write address output [0:6] HEX5, // data in output [0:6] HEX4, // data in output [0:6] HEX3, // read address output [0:6] HEX2, // read address output [0:6] HEX1, // data output output [0:6] HEX0, // data output output [17:0] LEDR // switches
into code like this:

input [17:0] SW , // write enable, write address, input data input [0 :0] KEY , // reset input CLOCK_50, // 50 MHz clock output [0 :0] LEDG , // write enable output [0 :6] HEX7 , // write address output [0 :6] HEX6 , // write address output [0 :6] HEX5 , // data in output [0 :6] HEX4 , // data in output [0 :6] HEX3 , // read address output [0 :6] HEX2 , // read address output [0 :6] HEX1 , // data output output [0 :6] HEX0 , // data output output [17:0] LEDR // switches
Thanks.

0 Likes