How to align texts in Sublime Text 3?

You can do this with AlignTab, no need for a different plugin. You just need to use the more advanced regex functionality as described on the GitHub page.

Bring up the Command Palette (Ctrl+Shift+P on Windows or cmd+shift+P on Mac), type in “AlignTab”, press enter, and type this in and hit enter:

:/r0clf1

Props to @Hank for including 0 spaces option, didn’t even realize he didn’t want the space.

Explanation:

  • the : finds the colon
  • the / says okay now here come some arguments about what I want you to do with the colon
  • the r means right-justify the first column
  • the 0 means 0 spaces after the right column
  • the c means center the middle column (which is just the colon, so it doesn’t do anything)
  • the l means left-justify the right column
  • the f1 means only do this for the first match on the line

Leave a Comment

techhipbettruvabetnorabahisbahis forumu