valign

Can has aligns your code.

chemoish

4,885

16

1.1.3

MIT

GitHub

Atom.io – Valign Package

Easily align your code.

// from
var easily = 'align';
var your = 'code';

// to
var easily = 'align';
var your   = 'code';

Hotkey

Command Mac PC and Linux
Align code Ctrl + \ Alt + Ctrl + \

Features

Settings

Few Examples (html, css, less, scss, etc. also work)

JavaScript

Assignment

// from
var one  =  "uno",
two="dos",
three  ="thres",
four=  "quatro";

one  =  "uno";
two+="dos";
three  -="thres";
// to
var one   = "uno",
    two   = "dos",
    three = "thres",
    four  = "quatro";

one    = "uno";
two   += "dos";
three -= "thres";

Object

// from
var numero = {
  one  :  "uno",
  two:"dos",
  three  :"thres",
  four:  "quatro"
};
// to
var numero = {
  one:   "uno",
  two:   "dos",
  three: "thres",
  four:  "quatro"
};

CoffeeScript

Assignment

# from
one  =  "uno"
two+="dos"
three  -="thres"
four?=  "quatro"
# to
one    = "uno"
two   += "dos"
three -= "thres"
four  ?= "quatro"

Object

# from
numero =
  one  :  "uno"
  two:"dos"
  three  :"thres"
  four:  "quatro"
# to
numero =
  one:   "uno"
  two:   "dos"
  three: "thres"
  four:  "quatro"

PHP

Assignment

// from
var one  =  "uno";
two+="dos";
three  -="thres";
four*=  "four";
// to
var one  = "uno";
two     += "dos";
three   -= "thres";
four    *= "four";

Array

// from
var numero = array(
  "one"  =>  "uno"
  "two"=>"dos"
  "three"  =>"thres"
  "four"=>  "quatro"
);
// to
var numero = array(
  "one"   => "uno"
  "two"   => "dos"
  "three" => "thres"
  "four"  => "quatro"
);

Notice

This package has been fully rewritten and has stripped out array, object, and space alignment.

If you would like to see these come back please submit a issue.