Giter Club home page Giter Club logo

realign's Introduction

ReAlign README

Align code by regex!

Based roughly on the amazing Sublime extension AlignTab that I miss dearly.
Find it here: https://github.com/randy3k/AlignTab

Features

  • Align by user defined regex that doesn't block your code!

  • Auto expand to applicable lines!

  • Select the exact lines and limit the number of columns to align!

  • Wildcard matches

Extension Commands

Command Description
realign.activate Start Aligning
Enter Confirm input
Esc Cancel input

Basic Usage

To start aligning move your cursor to a block of code you wish to align. Then activate the extension (I use Alt+A) and type the pattern to align on.

Confirm your alignment with Enter and cancel it with Escape.

To limit the lines that get aligned simply highlight the lines you wish to include.

Advanced usage

In addition to your regex you can enter advanced options by entering input in the form of [regex]/[options].

Add padding using options l, r, or c

  • /lN adds N spaces to left of the regex matches
  • /rN adds N spaces to right of the regex matches
  • /cN adds N spaces to left and right of the regex matches
  • /lNrM adds N left and M right

Limit the number of times per line you match using f

  • /fN limits each line to N matches

Examples

  • : would match every colon
  • :/f2 would match the first 2 colons
  • :/l3f2 would match the first 2 colons and add 3 spaces to their left

Known Issues

We shall find out.

Release Notes

Initial release

1.0.0

Initial release of ReAlign


realign's People

Contributors

maxhillis avatar dependabot[bot] avatar jourdein 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.