Giter VIP home page Giter VIP logo

atom-alignment's Introduction

atom-alignment package

Atom 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 =   d
var a = b
var cde = d

When 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 |= l
var a    =b var c = d
var e c           = f var g = h
var i c=j var k   = l

You can even align multiple matches

lets = see = what := happens
a  = a  = b = c : d := e
lets = see = what      := happens
a    = a   = b = c : d := e

License

MIT © Andre Lerche

MIT © Simon Paitrault

atom-alignment's People

Contributors

ericf avatar ricardodovalle avatar richrace avatar simongiraud avatar

Watchers

 avatar  avatar  avatar

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.