Home Download Buy Blog Forum Support

Alignment for ST3

Re: Alignment for ST3

Postby Saxi on Wed Jun 05, 2013 3:56 pm

randy3k wrote:did you try aligntab?
https://github.com/randy3k/AlignTab


Not yet, but was on my list.
I've been looking at other options first as I hear that one is a real pain setting up all the Regex.
Saxi
 
Posts: 102
Joined: Mon Nov 19, 2012 1:37 pm

Re: Alignment for ST3

Postby quodlibet on Wed Jun 05, 2013 7:24 pm

@Saxi If you're tesing out alternatives and you find a plugin that you prefer to VAlign, do be a gentleman and post about it here.

Edit: the regex stuff looks annoying to set up, but on the other hand, if you only have to do it once per syntax... that's not too bad.
quodlibet
 
Posts: 542
Joined: Sat Jun 18, 2011 5:53 pm

Re: Alignment for ST3

Postby Saxi on Fri Jun 07, 2013 1:33 am

quodlibet wrote:@Saxi If you're tesing out alternatives and you find a plugin that you prefer to VAlign, do be a gentleman and post about it here.

Edit: the regex stuff looks annoying to set up, but on the other hand, if you only have to do it once per syntax... that's not too bad.


I will but I really think the regex one is the only other option.
You maybe right, but I believe one syntax is likely to involve a ton of regex's, and would want multiple syntaxes.
Saxi
 
Posts: 102
Joined: Mon Nov 19, 2012 1:37 pm

Re: Alignment for ST3

Postby randy3k on Thu Jun 13, 2013 9:04 am

Saxi wrote:
quodlibet wrote:@Saxi If you're tesing out alternatives and you find a plugin that you prefer to VAlign, do be a gentleman and post about it here.

Edit: the regex stuff looks annoying to set up, but on the other hand, if you only have to do it once per syntax... that's not too bad.


I will but I really think the regex one is the only other option.
You maybe right, but I believe one syntax is likely to involve a ton of regex's, and would want multiple syntaxes.

But more true is that different syntaxes should have different alignment patterns. There is no such thing as universal alignment patterns. Thus, It makes sense to setup regex per syntax.
randy3k
 
Posts: 47
Joined: Sun Nov 18, 2012 5:16 am

Re: Alignment for ST3

Postby quodlibet on Wed Jun 19, 2013 10:13 am

I'm warming up to @randy3k's AlignTab.

One of the things I've had desperate need for is rudimentary tabular data in Markdown -- so rudimentary, in fact, that the various table plugins don't support it. Here's what I've wanted:

Code: Select all
- lorem ipsum dolor sit amet  | consectetur adipisicing elit | sed do eiusmod
- tempor incididunt ut labore | ut enim ad minim veniam      | reprehenderit in voluptate
- quis nostrud exercitation   | ullamco laboris nisi ut      | aliquip ex ea commodo


I can align this quickly with the following beast:

Code: Select all
    {
        "keys": ["ctrl+\\"],
        "command": "align_tab",
        "args": { "user_input" : "\\|" },
        "context": [ { "key": "selector", "operator": "equal", "operand": "text.plain, text.html.markdown", "match_all": true } ]
    },


I'm using the same binding that VAlign uses but it only kicks in for plain text and markdown (where I don't need to align things, in general, and where VAlign stumbles).

/me is very happy :)
quodlibet
 
Posts: 542
Joined: Sat Jun 18, 2011 5:53 pm

Previous

Return to General Discussion

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 24 guests