I use Sublime Text 3 Plug-in called AlignTab to align my code like this:
Version : 1.4.1 Author : Ken Wheeler Website : http://kenwheeler.github.io Docs : http://kenwheeler.github.io/slick Repo : http://github.com/kenwheeler/slick Issues : http://github.com/kenwheeler/slick/issues
Now, I want to my texts to stay next to the colon like this:
Version: 1.4.1 Author: Ken Wheeler Website: http://kenwheeler.github.io Docs: http://kenwheeler.github.io/slick Repo: http://github.com/kenwheeler/slick Issues: http://github.com/kenwheeler/slick/issues
How do I accomplish that ?
Using Sublime Alignment ↩ Simple: Select the lines you wish to align. Press Ctrl+Alt+A (Windows & Linux) or Command+Ctrl+A (Mac OS X)
Beautify on Save sublime-settings : Ctrl+Shift+P or Cmd+Shift+P in Linux/Windows/OS X.
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:
:
finds the colon/
says okay now here come some arguments about what I want you to do with the colonr
means right-justify the first column0
means 0 spaces after the right columnc
means center the middle column (which is just the colon, so it doesn't do anything)l
means left-justify the right columnf1
means only do this for the first match on the lineIf you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With