Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>custom-group-import-sorterNew to Visual Studio Code? Get it now.
custom-group-import-sorter

custom-group-import-sorter

Francisco Moreno

|
20 installs
| (0) | Free
Sort your imports as custom groups
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Custom Group Import Sorter

Sort your imports as custom groups

In Typescript you can select multiple lines of imports and sort them in groups.

Install

Click the extension tab and in there search Custom Group Import Sorter and install it. Or just go to Custom Group Import Sorter.

How to Use - Configuration

Go to Settings Custom Group Import Sorter open settings.json and add 3 custom arrays in there put the origin that you want to group.

"custom-group-import-sorter.Group1": [
  "@angular"
],
"custom-group-import-sorter.Group2": [
  "rxjs",
  "@ngrx/store"
],
"custom-group-import-sorter.Group3": [
  "@library/core",
  "@library/data"
]

So the output will be

Screen Shot 2024-01-22 at 4 44 04 p m

[!NOTE] Any library that doesn't exists in the groups will be sorted at the bottom.

[!WARNING] Only select your imports or any other code selected will be removed.

How to Use - Execution

  • Select the desired ones.
  • Using Command Palette Cmd+Shift+P and select Custom Group Import Sorter: Sort.

Or you can create a shortcut for this command in Keyboard Shortcuts in VS Code.

License

MIT © Frxncismor


Code Inspiration

custom-css-sorter

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft