ElecTreeFrying / auto-import-relative-path

Auto Import Relative Path is a time-saving extension that simplifies importing relative paths in your code. With this tool, you can easily import files without the need to type out lengthy and complex paths. It's a great solution for projects of any size and can help streamline your workflow.
https://marketplace.visualstudio.com/items?itemName=ElecTreeFrying.auto-import
MIT License
8 stars 1 forks source link
auto css import javascript vscode-extension

Auto Import Relative Path (vscode extension)

Current version of Auto Import Relative Path Current installs of Auto Import Relative Path Current downloads of Auto Import Relative Path Current ratings of Auto Import Relative Path

Auto Import Relative Path, is an extension for VS Code that makes importing relative paths much easier and less tedious. With this extension, you can say goodbye to long and complicated import statements and file paths. It provides a simple and efficient way to import files without having to manually type out the entire path. Whether you're working on a small project or a large one with many files, this extension can save you a lot of time and effort

Supported file extensions

File extension
Programming Language .js, .jsx, .ts, .tsx
Markup Language .html, .md
Stylesheet .css, .scss

Usage

  1. Press Ctrl+Shift+A on a file in Explorer, then press Ctrl+I in your active text editor to import it. → Click here to see it in action.
  2. Alternatively, press Alt+D to automatically import the file in your active text editor. → Click here to see it in action.

Click here for more usage examples.

auto-import-demo

Active text editor Supported file extensions More examples
.html .js, .css, .gif, .jpeg, .jpg, .png, .webp click here
.md self, .gif, .jpeg, .jpg, .png, .webp click here
.js, .ts self
.jsx self, .js, .json
.css,.sass .scss
.png, .jpg, .gif, .svg, .webp
.woff, .woff2, .ttf, .eot
.md, .yml, .yaml, .html
.tsx self, .ts, .js, .json
.css, .sass .scss
.png, .jpg, .gif, .svg, .webp
.woff, .woff2, .ttf, .eot
.md, .yml, .yaml, .html
.css self, .gif, .jpeg, .jpg, .png, .webp
.scss self, .css, .gif, .jpeg, .jpg, .png, .webp

Commands

Command Key Binding Description See in action
Auto Import: Copy Ctrl+Shift+A Copy the relative path of the selected file in Explorer. click here
Auto Import: Paste Ctrl+I Paste the import statement into your active text editor. click here
Auto Import: Auto Alt+D Auto copy and paste the import statement of a file from Explorer to your active text editor. click here

Configuration Settings

General settings

Import statements

Scripts: Javascript, React Javascript, Typescript, React Typescript

Stylesheets: CSS, SCSS

Markup: HTML, Markdown

Installation

  1. Install VS Code v1.76.0 or higher
  2. Launch Visual Studio Code
  3. Enter command Ctrl+Shift+P (Windows, Linux) or Cmd+Shift+P (OSX)
  4. Select → Extensions: Install Extensions.
  5. Choose Auto Import Relative Path by ElecTreeFrying
  6. Reload Visual Studio Code

Changelog

See CHANGELOG for more information.

Contributing

Related

More extensions of mine

License

MIT