Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Sort Imports by LengthNew to Visual Studio Code? Get it now.
Sort Imports by Length

Sort Imports by Length

Zach Silveira

|
1,213 installs
| (1) | Free
Sort ES6 imports by length automatically.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Sort Imports By Length

What?

Turns

import styles from './style.scss';
import React from 'react';
import { Link } from 'react-router-dom';

Into

import React from 'react';
import styles from './style.scss';
import { Link } from 'react-router-dom';

on file save!

Thanks

Huge shout out to peterjuras for his sort imports in vs code plugin. It just doesn't do it by line length, so I used his code to make this.

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