Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>Sort Lengthy ImportsNew to Visual Studio Code? Get it now.
Sort Lengthy Imports

Sort Lengthy Imports

marioiliev

|
738 installs
| (4) | Free
Opinionated import sorting by length and context
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Opinionated sorting for imports by length and context

This extension will work on file save. It will transform this:

import React from "react";
import css from "./styles.css";
import cn from "classnames";
import Text from "./Text";
import { MyFancyComponent } from "../common/MyFancyComponent";
import styled, { createGlobalStyle } from "styled-components";

Into this:

import styled, { createGlobalStyle } from "styled-components";
import cn from "classnames";
import React from "react";

import { MyFancyComponent } from "../common/MyFancyComponent";
import css from "./styles.css";
import Text from "./Text";
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft