This extention adds a shortcut key (by default,
What Problem Does This Solve?
In languages like SQL, it is sometimes desirable to align related lines of code with tabs or spaces for readability. Keeping up with this manually can be a chore.
Multi-line selection alignment
If you select a range of rows and run this, it will tab-align all selected lines to the nearest tabstop of where your selection started:
Note in the above example that it indents further than needed for readability. After aligning the text, your selection is updated to a multi-cursor at the right of the inserted tabs/spaces, so you can easily adjust the column spacing to taste.
Multi-cursor selection alignment
If you select more than range using Visual Studio Code's multi-cursor feature, it will align each row to the nearest tab stop of the greated cursor column.
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
For example if there is an image subfolder under your extension project workspace:
Tabs or Spaces
I use tabs in every language where it is legal (basically, everything but YAML). Many developers prefer spaces. This extension uses your preferred tab vs. spaces setting and tab width.
It does not right-trim the rows after aligning them, but this was done purposefully, to allow easier follow-up editing. I recommend using
Bug Reports and Contributions
This is my first VS Code extension. I'm sure there are edge cases I haven't considered. Please report bugs through GitHub Issues, with minimal reproducible instructions. An animated recording would also be helpful.
Pull requests are welcome! Please follow the code formatting and linter/prettier settings I'm already using.
None. You can adjust the keyboard binding in the general VS Code keyboard bindings, if desired.