0.12.0 • Published 10 years ago
@jigsaw/atom-alignment v0.12.0
atom-alignment package
Inspired by sublime text plugin (sublime_alignment)
Usage
A simple key-binding for aligning multi-line, multi-cursor and multiple selections in Atom.
Use ctrl+cmd+a on Mac or ctrl+alt+a to align multiple matches. If you want to align the first match only, call Atom Alignment:Align from the command palette. The following examples all use the mentioned key binding to call Atom Alignment:AlignMultiple.
var a = b;
var ab = c;
var abcd = d;
var ddddd =d;var a = b;
var ab = c;
var abcd = d;
var ddddd = d;With more than one selection
var a = b; /* selection 1 */
var ab = c; /* selection 1 */
var notMePlease='NOOOO';
var abcd = d; /* selection 2 */
var ddddd =d; /* selection 2 */var a = b;
var ab = c;
var notMePlease='NOOOO';
var abcd = d;
var ddddd = d;On a single line started with ctrl+cmd+a
var a = b var cde = dvar a = b
var cde = dWhen working with multiple cursors, the different lines are aligned at the best matching cursor position. In the following example the | shows the cursor position.
var a =b var c|= d
var e c|= f var g = h
var i c=j var k |= lvar a =b var c = d
var e c = f var g = h
var i c=j var k = lYou can even align multiple matches
lets = see = what := happens
a = a = b = c : d := elets = see = what := happens
a = a = b = c : d := eLicense
MIT © Andre Lerche
MIT © Simon Paitrault
0.12.0
10 years ago