jmulieri / front-end-alignment

A simple IntelliJ plugin that provides an action for aligning lines of code according to a given regular expression.
MIT License
31 stars 7 forks source link

Aligning in multiple columns #2

Open beloglazov opened 9 years ago

beloglazov commented 9 years ago

Hi Jon,

Thanks for the nice plugin! As I understand, at the moment it only aligns by the first match in the line. Would it be possible to make it align by multiple matches? As an example, let's say I have these sbt dependencies:

  "org.typelevel" %% "scalaz-specs2" % "0.3.0" % "test",
  "org.scalacheck" %% "scalacheck" % "1.12.1" % "test",
  "org.scalaz" %% "scalaz-scalacheck-binding" % "7.1.0" % "test"

Would be cool, if it could align them by % as follows:

  "org.typelevel"   %% "scalaz-specs2"             % "0.3.0"  % "test",
  "org.scalacheck"  %% "scalacheck"                % "1.12.1" % "test",
  "org.scalaz"      %% "scalaz-scalacheck-binding" % "7.1.0"  % "test"

Cheers, Anton

bcalmac commented 9 years ago

+1

ownwell commented 9 years ago

how can I set it like this:

int a         =  10;
String b      = 200;

the "=" is aligning.

ralph-tice commented 8 years ago

i'd like a regex like %?%.*% to work. I'll fork and PR soon if I get some free time.

zhenglaizhang commented 7 years ago

+1, this will be awesome.