Giter VIP home page Giter VIP logo

aligntab's Introduction

AlignTab

test codecov

The most flexible alignment plugin for Sublime Text 3. This plugin is inspired by the excellent VIM plugin, tabular.

ST2 support is deprecated but however, it is still possible to install AlignTab on ST2 via Package Control.

Features

  • Align using regular expression
  • Custom spacing, padding and justification.
  • Smart detection for alignment if no lines are selected
  • Multiple cursors support
  • Table mode and Live preview mode

Getting started

  • If you only want simple and quick alignment, the predefined alignment will help.

More complicated usage

  • Open AlignTab in Command Palette C+Shift+p and enter the input in the form of <regex>/<option>.
  • To learn more about regular expression, visit here and here.
  • The option controls column justification, padding and maximum number of splits. A general syntax of options is ([rlc][0-9]*)*(f[0-9]*)?.
  • The numbers after r, c or l determine how many spaces will be added after columns and the number after f controls how many matches will be made based <regex>.
  • For example, c2r3f1 means
    • first column is centered followed by 2 spaces
    • second column is right-flushed followed by 3 spaces
    • only the first match is used
  • If the number after [rlc] is omitted, 1 space will be added after each column.
  • If the number after f is omitted, only the first match will be used.
  • The entire option could be omitted (i.e., input only the regular expression). In that case, default option, l1f0 will be used. It means:
    • All columns are left-justified.
    • A space is added after each column.
    • All matched delimiters are aligned.

More about regex and options

  • Use non-capturing parenthese (?:regex) instread of capturing parenthese.
  • Delimiter is also treated as a column.
    • For example, =/rcl means the the column before = will be right-justifed and the column after = will be left-justified. And = will be centered (however, it doesn't matter as = is of length 1).
  • The option for alignment cycles through the columns.
    • For example, regex/rl means all odd columns will be right-justified and all even columns will be left-justified.
  • The symbol * repeats the preceeding justification flags.
    • For example r*3 equals rrr, and (cr3)*2 equals cr3cr3.
  • (Experimental) Besides r, c and l, there is a new u flag which stands for "unjustified".

Live Preview Mode

Table Mode

Hit ESC or use the command AlignTab: Exit Table Mode to exit table mode.

Installation

Package Control

Examples

Some simple examples. You can also contribute your examples there.

Keybinds

If you are interested in getting a keybind for live preview mode, add the following in your user keybinds file.

 {
   "keys": ["super+shift+a"], "command": "align_tab",
   "args" : {"live_preview" : true}
 }

For frequent patterns, you can consider the following in your user keybinds file. Change the keybind and the user_input for your purpose.

 //align =
  {
    "keys": ["super+shift+a"], "command": "align_tab",
    "args" : {"user_input" : "=/f"}
  }

or syntex specific keybind.

  // latex align keybind, to align & and \\, but not \&
    {
    	"keys": ["super+shift+a"], "command": "align_tab",
        "args" : {"user_input" : "(?<!\\\\)&|\\\\\\\\"},
        "context":[
            { "key": "selector", "operator": "equal", "operand": "text.tex.latex" }
        ]
    }

Named patterns

To make it easier to remember complex patterns, you can save them in a dictionary in the settings file. To edit the patterns, launch Preferences: AlignTab Settings. Use the name as key and the regex as value. For examples,

"named_patterns": {
    "eq" : "=/f",
    // right hand side could also be an array of inputs
    "ifthen" : ["=/f", "\\?/f", ":/f"]
}

You then just use the name instead of the pattern in the input field.

Custom Context Menu

To define new item in the context menu, launch Preferences: AlignTab Context Menu and add, for example

[
   {"caption" : "-"},
    {
      "id": "aligntab",
      "caption": "AlignTab",
      "children": [
          {
          "caption" : "{",
          "command" : "align_tab",
          "args"    : {"user_input" : "\\{"}
          }
      ]
  }
]

CJK Support

AlignTab supoorts CJK characters, but you have to choose a correct font face and font size. To my knowledge, MinCho works on all Chinese, Japanese and Korean.

License

AlignTab is licensed under the MIT License.

aligntab's People

Contributors

alfunx avatar deathaxe avatar dvoraq avatar evandrocoan avatar kronik907 avatar okdana avatar randy3k avatar randybot avatar tarwich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aligntab's Issues

[RESEARCH] Regex rule for Stylus stylesheets

Could you be so kind to come up with regex rule that turns

color #222
font-family Georgia, serif
background url(background.png) 97.5% 10px no-repeat

into

color       #222
font-family Georgia, serif
background  url(background.png) 97.5% 10px no-repeat

?

Ignoring commas inside double quotes in CSV file

Hi there,

I'd like to be able to align based on commas in a CSV file but to ignore the commas that are within double quotes such that:

"test","comma, inside","space after double quote" , "space before double-quote"
"a", "b", "c", "d"

would be aligned as such:

"test","comma, inside","space after double quote","space before double-quote"
"a"   ,"b"            ,"c"                       ,"d"

I guess this is something that many users would benefit from. Could you help with the regexp?

Cheers,

Jun
PS: the management of spaces is not really important.

Different options for different columns?

Sorry, I cant understand from docs if its possible:

So I have ruby method call with hash parameter:

Bleh::Application.initializer :environment_common,
                                      after:  :load_rails_config_settings,
                                      before: :load_environment_config,
                                      group:  :all do

I want it to look like this:

Bleh::Application.initializer :environment_common,
                                       after: :load_rails_config_settings,
                                      before: :load_environment_config,
                                       group: :all do

But it seems that AlignTab applies options to whatever it regexes.
I tried this regex:

\w+:|:\w+/(r)(l)

But what I get is:

Bleh::Application.initializer :environment_common,
                                       after:   :load_rails_config_settings  ,
                                       before:  :load_environment_config     ,
                                       group:   :all                        do

So only left-alignment option applied

Multiple alignments with single keybinding

Hi @randy3k. Thanks so much for this plugin.

What I'd really like is to align whichever code block my cursor is in, using the same keybinding each time. So in a JS var statement:

var a = 'a',
long = 'long';

...would be transformed to:

var a    = 'a',
    long = 'long';

... but when in a JSON object context, the same keybinding would transform:

var a = {
    b: 'b',
    long: 'long'
}

to:

var a = {
    b:    'b',
    long: 'long'
}

I've seen example patterns for both, but is there a way I can run them using the same keybinding, dependent on the context?

Thanks!


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Indentation error

Trying to align this piece of code using the included "Align By -> First :"

myrecord = record(
  a boolean : true
, b int : 10
, c string : "toto"
)

result to:

myrecord = record(
a boolean  : true
, b int    : 10
, c string : "toto"
)

The first line is deindented, is this a bug or is it the expected behavior ?
Is there an option to not touch the indentation of the lines ?

Tip: keybinding for either = or :

I found something maybe worth mentioning in the readme or wiki examples?

You can run many align_tab commands after each other and as long as the paragraph does not contain both characters specified in the regex it seems to work fine.

e.g.

  {
    "keys": ["super+shift+e"],
    "command": "run_multiple_commands",
      "args": {
        "commands": [
          {
                "command": "align_tab",
                "args" : {"user_input" : "=/f"}
                },
          {
                "command": "align_tab",
                "args" : {"user_input" : ":/f"}
                },
        ]
      }
  }

works on both:

    apple =   1==0
banana =100
 car = 2

and

  foo: "hello",
  someLongProp: "some other value",
  x: { x: 12, y: 13 }

...so no need for 2 different key-bindings :)

I'm using a plugin by Nilium:
https://www.sublimetext.com/forum/viewtopic.php?f=5&t=8677

Control space around delimiter

Hello,

first thanks you for this plugin !
I am doing some ruby on rails at the moment, and I can't find a way to align code in cases like the one below, where I want to align on the ":" delimiter, while having no space after it

  validates :sequential_id,     :presence => true
  validates :date,              :presence => true

Is it possible ?

Thanks you,
Nathan

Ignore :aftter and other pseudo-elements

When I was aligning my CSS, I realized that in styles applied to the :after, :before and other pseudo-elements the plugin also aligned the colon of these elements. This affects the style.

When will I align some of the code I did not select him, I just put the pointer inside the CSS block and use my key bindings:

[
  {
    "keys": ["ctrl+shift+a"], "command": "align_tab",
    "args" : {"user_input" : ":/f"}
   }
]

I'm using Windows 7 and with the context menu is the same.
Below is an example of the problem:
align-tab

table mode not working with `tab` as separator

I tried to use table model with a tab character as column separator. The plugin is able to align the columns the first time, but then the alignment is lost when editing the content of a column.
It would be nice to be able to use tab, so no extra characters would be visible in the file.

Sublime 3054, on OS X 10.8.5

[Feature Request] Allow a user to provide multiple regex to run sequentially

I will often have some lines which I would like to run two or three AlignTab commands on.

one example would be a set of ternary operators like this:

$variable = empty($var) ? $var2 : $var1;
$var3 = empty($var) ? $var5 : $var4;

In this case I need to run AlignTab 3 times. Once to align on the =, once to align the ? and once to align the :

Sadly this means either I have to have 3 key binds set up, or 3 custom context menus, or run each regex manually. It would be nice if I could run the align_tab command once with a list of regex that get executed sequentially.

I'd create a pull request but i'm pretty busy at the moment. Thanks!

Allignment of table with both negative and positive numbers

This is a snippet of a LaTeX table I aligned with AlignTab.

  &  -1.5    \\
  &  -1.0    \\
  &  -0.5    \\
  &  0.0    \\
  &  0.5    \\

While it's beautiful, I'd like to be able to align it like this instead (aligning to the first number, not it's sign).

  &  -1.5    \\
  &  -1.0    \\
  &  -0.5    \\
  &   0.0    \\
  &   0.5    \\

Is this possible? I can't seem to figure out an appropriate combination of regex and alignment specification.

Align on space failed with multi-space between words

I find if there's only a space between words, then AlignTab can align them properly, like this

align sublime tab 
sublime tab align

you press space and it will become

align   sublime tab
sublime tab     align

BUT if you have

align sublime  tab    // Two spaces between 'sublime' and 'tab'
sublime tab align

you press space and it will become something like that:

align   sublime       tab
sublime tab     align

Is it by design or a bug?

Aligning items adds lots of white space at end of lines

So here's my original text I'm wanting to align:

  get  '/sitemap(.:format)' => 'pages#sitemap', as: 'sitemap'
  get  '/energybuzz(/:campaign_name)' => 'pages#energybuzz', as: 'energybuzz', constraints: { campaign_name: /feb|february|mar|march|buzz/i }
  get  '/careers/:page_name' => 'pages#show', constraints: { page_name: /devops_engineer|frontend_developer|ui_designer|product_designer|rails_engineer|data_engineer|account_manager|create_position/ }
  post '/utilities_notification' => 'pages#utilities_notification'
  get  '/:page_name' => 'pages#show', as: 'static', constraints: { page_name: /about|careers|contact|team|terms|design|pledge|nicortakethepledge|energybuzz|sign-up-for-myenergy|sign-up-for-myenergy-average-bill|sign-up-for-energybuzz|sign-up-for-myenergy-from-nicor|utilities|utilities_thankyou|press/ }

=>|constraints:|as: is the regex I'm using to align the lines.

And the result is pretty close:

  get  '/sitemap(.:format)'           => 'pages#sitemap',               as:          'sitemap'                                                                                                                                    
  get  '/energybuzz(/:campaign_name)' => 'pages#energybuzz',            as:          'energybuzz',                                                                                                                                 constraints: { campaign_name: /feb|february|mar|march|buzz/i }                                                                                                                                                                                             
  get  '/careers/:page_name'          => 'pages#show',                  constraints: { page_name: /devops_engineer|frontend_developer|ui_designer|product_designer|rails_engineer|data_engineer|account_manager|create_position/ }
  post '/utilities_notification'      => 'pages#utilities_notification'
  get  '/:page_name'                  => 'pages#show',                  as:          'static',                                                                                                                                     constraints: { page_name: /about|careers|contact|team|terms|design|pledge|nicortakethepledge|energybuzz|sign-up-for-myenergy|sign-up-for-myenergy-average-bill|sign-up-for-energybuzz|sign-up-for-myenergy-from-nicor|utilities|utilities_thankyou|press/ }

You may have to highlight to see the large amount of white space at the end of some of the lines or copy it into your editor. But it's adding unnecessary white space basically.

Thoughts?

Add option to ignore comments when aligning

Currently when selecting blocks of texts and hitting my AlignTab keybind, if there are any comments, they get aligned along with the actual code.

It'd be great to add an option to "ignore comments" intelligently (e.g. // or # etc. depending on the language) when aligning.

Thanks

Aligning nested Arrays

Hey,

I have an idea that I think would be cool,
I am not really sure if this can be solved or not? but if you can give it a shoot and tell me what you think.

# What I want to align
{
  "A" => "a",
  "B" => "b",
  "C" => "c",
  "D" => "d",
  "EFG" => {
    "E" => "e",
    "F" => "F",
    "G" => "G",
    "????????" => \_(ツ)_/¯",
  }
}


# What is does
{
  "A"        => "a",
  "B"        => "b",
  "C"        => "c",
  "D"        => "d",
  "EFG"      => {
  "E"        => "e",
  "F"        => "F",
  "G"        => "G",
  "????????" => \_(ツ)_/¯",
  }
}

# What I would like to
{
  "A"   => "a",
  "B"   => "b",
  "C"   => "c",
  "D"   => "d",
  "EFG" => {
    "E"        => "e",
    "F"        => "F",
    "G"        => "G",
    "????????" => \_(ツ)_/¯",
  }
}

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/29599189-aligning-nested-arrays?utm_campaign=plugin&utm_content=tracker%2F334171&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F334171&utm_medium=issues&utm_source=github).

New version does not work w/ Windows 7 and Sublime 2

Hello,

first of all: Thank you for this very helpful Sublime 2 Plugin.

Since the most recent (2 hours ago) update the Plugin is not working anymore. If i try to use it i get this error message in my console:

Traceback (most recent call last):
File ".\aligntab.py", line 85, in align_tab
AttributeError: 'AlignTabCommand' object has no attribute 'get_named_pattern'

I am using Windows 7 as host system and the latest Sublime 2 Editor

Not sure how to align array properly

When trying to align something like

protected $countries = [
      "Western Sahara"                               => "eh",
      "Yemen"                                        => "ye",
      "Serbia"                                       => "yu",
      "Zambia"                                       => "zm",
      "Zimbabwe"                                     => "zw"
];

I"m trying to get it to line up based on the "=>" with both right and left columns left justified and right justified and the "=>" lining up like this

protected $countries = [
      "Western Sahara"    =>    "eh",
      "Yemen"                   =>     "ye",
      "Serbia"                    =>     "yu",
      "Zambia"                  =>     "zm",
      "Zimbabwe"             =>     "zw"
];

But it seems I can only justify either left or right column and not line up the "=>"


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Workaround for ST bug in show_input_panel

Sorry don't have time to make a pull request.

There's a bug (?) in ST3 (2?) that remove the is_widget settings of the view when you use set_syntax_file() on it.
So my keybindings for up/down with a negative context to is_widget is triggered instead yours.
Could you please add this code:

 v.settings().set('is_widget', True)

in

class AlignTabCommand(sublime_plugin.TextCommand):

    def run(self, edit, user_input=None, mode=False):
        if not user_input:
            v = self.view.window().show_input_panel('Align with regex:', '',
                    lambda x: self.view.run_command("align_tab",{"user_input":x, "mode":mode}), None, None)
            v.set_syntax_file('Packages/AlignTab/AlignTab.hidden-tmLanguage')
            v.settings().set('is_widget', True)
            v.settings().set('gutter', False)
            v.settings().set('rulers', [])
        else:
            self.align_tab(edit, user_input, mode)

Adding new named pattern to users settings file doesn't work

Hi,

Attempting to add a new pattern to align by (in this case a left open curly bracket) - after modifying the users settings file (as you cannot modify the default settings file) results in nothing happening.

{
"named_patterns": {
"first_equal": "=/f",
"first_comma": ",/f",
"first_colon": ":/f",
"first_period": "./f",
"first_bracket": "{/f"
},
// disable auto_match in the input panel
"auto_match_enabled": false
}

Add my custom pattern to context drop-down

Thank you for nice plugin!

I want to add my custom pattern to the default context menu.
Context menu

Is it possible to do (simple way)?

I did it on my old Sublime Text 2 installation, but I can't remeber how it was done.

Thanks!

Parenthesizing user input pattern creates extra operators when aligning

Hi :)

I may be retarded here, but I'm adding a keyboard shortcut to do some basic alignment. Right now, just for the first = or :. That is,

{
    "keys" : ["super+<"], "command": "align_tab",
    "args" : {"user_input" : "(:|=)/f"},
    "context":[
        { "key": "selector", "operator": "equal", "operand": "source.js" }
    ]
}

This will align by these operators, but it'll also add a space and a copy of the operator being aligned, e.g.:

var os       = = require('os');
var hostname = = '__NO_SUCH_CUSTOM__';

Without the parentheses (and the /f) there's no adding of operators (but I can't use /f without the parentheses)... Am I just being retarded here or is that a bug?

ability to handle columns as one?

Hi,
I want to align this javascript code:

var People = {
    firstName:   "John",
    lastName    : "Doe",
    age: undefined,
    siblings : []
};

the final output would be this:

var People = {
    firstName: "John",
    lastName:  "Doe",
    age:       undefined,
    siblings:  []
};

The colons stick next to the variable name rather then aligned to one column. I tried something like :/l0l1lf3 but it doesn't work, and I'm a bit stucked. Can somebody help to resolve this problem?

Wrong comma in Main.sublime-menu

Error message popup box:

Error trying to parse file: Trailing comma before closing bracket in ~/Dropbox/Crap/ST2/Packages/AlignTab/Main.sublime-menu:48:9

Seems to be two commas too much. Works if the commas at line 47 and 87 are removed.

Align by menu greyed out

When I select a block of text to align by I'm not getting options in the submenu to align by spaces

Questions and suggestion regarding table mode

So, recently I've discovered the table mode and been using it for my latex tables. There are, however, two things I don't quite understand yet.

  1. When does table mode get disabled? It appears that it happens whenever I edit a line that does not contain a matching regex delimiter but some docs would be nice.
  2. In latex it sometimes happens that there are special lines inbetween table contents but the table itself continoues over these. Table Mode would only align (to) adjacent lines and if a longer line happens to be split by such a special line, I get many different alignments in the same table. I found out that table mode considers all lines with selections to be part of the table, but I can't always re-select and change every affected line after I made a change to a separate block.

Example:

  \letter{S} \\ \hline
    Some text                      & the second column & short \\ \hline
    Some more text that is aligned & the second column & longer than short \\ \hline
  \letter{T} \\ \hline
    Totally related text & that is aligned differently, unfortunately & blah \\ \hline

Maybe there is a way to apply table mode only to certain regions/the current selection when you start it and then keep track of that using the add_regions API, which would also allow to visually highlight the area where it is enabled. Just an idea though.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/5784458-questions-and-suggestion-regarding-table-mode?utm_campaign=plugin&utm_content=tracker%2F334171&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F334171&utm_medium=issues&utm_source=github).

Allow for multiple delimiters.

If I have a table like this:

Ctrl  + M              Jump to matching bracket
Ctrl  + Shift + M       Select everything within the current brackets

then there's no way to align based on the + and the first letter of the comment, which this regex \+|(?<=\s\s)\w will match.
image

If this does get implemented, there should be a way to types of delimiters - for example say all the + matches should be together and if there's any missing just fille that space, and any [a-zA-Z] matches should then be put after all the + matches.

syntax error in latest commit

There's a syntax error in the last commit to master, it has "elif:" with no condition.

Sadly package control by default seems to run everything hot so that a minor mistake like that nicely breaks my editor out of the blue. Sigh, let's demand better. I freaking love this plugin though, thanks.

Alignement when there are colons in string

For example if i've :

        'click h2 > span:not(.selected)' : 'displayOptions',
        'change .property' : 'updateModelAttribute'

When i apply an alignement i've :

        'click h2 > span   : not(.selected)'   : 'displayOptions',
        'change .property' : 'updateModelAttribute'

Thanks for your help.!

Can it do something like this

zIt'd be sweet if your plugin would change this:

-webkit-border-radius: 50%;
-moz-border-radius: 50%;
-ms-border-radius: 50%;
-o-border-radius: 50%;
border-radius: 50%;

into this:

-webkit-border-radius: 50%;
   -moz-border-radius: 50%;
    -ms-border-radius: 50%;
     -o-border-radius: 50%;
        border-radius: 50%;

...And change this:

background: -webkit-linear-gradient(top, #fff, #eee);
background: -moz-linear-gradient(top, #fff, #eee);
background: -ms-linear-gradient(top, #fff, #eee);
background: -o-linear-gradient(top, #fff, #eee);
background: linear-gradient(top, #fff, #eee);

into this:

background: -webkit-linear-gradient(top, #fff, #eee);
background:    -moz-linear-gradient(top, #fff, #eee);
background:     -ms-linear-gradient(top, #fff, #eee);
background:      -o-linear-gradient(top, #fff, #eee);
background:         linear-gradient(top, #fff, #eee);

Doubling of separator

Hi! When I try to align something looking like this:

1 a 2 b 3
11 a 22 b 33

with expression (a|b) I get as result:

1  a a 2  b b 3
11 a a 22 b b 33

Is this a bug? I need this for alignment some sql expressions.

Ability to skip a column in the options

I have code that looks like this:

var fs = require('fs')
  , async = require('async')
  ;

I want to leave the left side column of the = alone, but align the =. So:

var fs    = require('fs')
  , async = require('async')
  ;

I don't want to left-align the 1st column, because that pushes , async all the way to the left. Nor do I want to center or right align the first column. I want it to remain untouched, except for the = being aligned with the rest.

Is this currently possible?

Align indented lines

Hi!
How do I align indented lines like these:

def new_product
    Product.new(title: 'My Book Title',
                description: 'yyy',
                price:      1,
                image_url: 'zzz.jpg')
end

Thanks!

When Aligning Tab Indented Lines, The Indentation Level Increases

This happens on both ST2 and ST3.

When I am trying to align the = sign of multiple lines that are already tab indented, the align process increases the indentation level of each line with an = sign.

Things work fine on lines that are not already indented (lines without a leading tab).

Before alignment

    sdfasdfasdf = sdfasdfadf
    sadfasd = sadf ssasadf

After alignment

        sdfasdfasdf = sdfasdfadf
        sadfasd     = sadf ssasadf

Support => alignment

Ruby, Puppet, and a few other languages use => for some parts of their syntax. Being able to align these would be nice.

You can try to align by = but then AlignTab turns them all into = >'s.

Doesn't align tabbed whitespace

When I try to align selections which contain tabbed white space it doesn't align properly. Only workaround I could find was to convert all tabs to spaces first. Is there a better way?

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/21570954-doesn-t-align-tabbed-whitespace?utm_campaign=plugin&utm_content=tracker%2F334171&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F334171&utm_medium=issues&utm_source=github).

Live setting

A lot of times I can't get the alignment right until after several invocations. It would be nice if there were a setting so make it dynamically show the changes as I type in the box.

Readme usage instructions are not straight forward (to me)

I've had a rather hard time understanding how exactly this plugin works. Things I struggeld most with are:

  • is <regex>/<option> the only accepted syntax or would a simple <regex> with a default option suffice?
  • How do I escape literal / if I wanted to include them in the regex?
  • What are the options available and what is the syntax?

Answers to these questions can mostly be found in the readme, but there is no "quick reference" kind of thing where you'd look up things you are searching for. It took me a while to understand what the f option does for example because I was expecting a list or similar.

Of course, you may disagree with me, but these are my initial thoughts after deciding to finally install this plugin and maybe you can put some use into it.

Edit: A command reference for self-binding would've been appreciated. (example)


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Adds extra spaces when aligning

When i try to align to || for a markdown file i end up with lot of extra white space

|| bla          || bla  || bla                               ||
|| **bla**        || bla      || bla bla bla                         ||

I use the regex \||and here is the result

 |  | bla     |  | bla |  | bla         |  | 
 |  | **bla** |  | bla |  | bla bla bla |  | 

Persist table mode when starting a new line

Table mode is great! Until you go to insert a new line and table mode disables itself. It would be great if table mode persisted until you explicitly pressed esc.

I suspect that the complication here is that new lines don't contain anything that matches the regex (as they're empty).

None of them seems to be working

I am window/ST3. and I tried all the examples you. nothing seems to working..not sure what is the problem
I used \s*/f

from 
color #222
font-family Georgia, serif
background url(background.png) 97.5% 10px no-repeat

to
color        #222
font-family  Georgia, serif
background   url(background.png) 97.5% 10px no-repeat
![screenhunter_01 apr 20 19 13](https://cloud.githubusercontent.com/assets/1131747/2751676/7a002526-c8e1-11e3-8b2f-3321e2a01854.jpg)

Align JS variables

Hello,

Is it possible to use AlignTab to align multiple var declarations in like these ?

var express = require('express'),
    http = require('http'),
    path = require('path'),
    jadebrowser = require('jade-browser');

to

var express     = require('express'),
    http        = require('http'),
    path        = require('path'),
    jadebrowser = require('jade-browser');

I can't get AlignTab to ignore the first spaces of the line...

Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.