Skip to content

Latest commit

 

History

History
157 lines (93 loc) · 7.2 KB

DEMO.md

File metadata and controls

157 lines (93 loc) · 7.2 KB

Auto Import Relative Path (DEMO)

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

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

Contents

Import statement position

Append to cursor

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

extension-settings-preview

Append to the bottom of the import list

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

extension-settings-preview

Append to the top of the import list

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

extension-settings-preview

Keybindings

Auto import from Explorer

  1. Press Ctrl+Shift+A on a file in Explorer, then press Ctrl+I in your active text editor to import it.

auto-import-from-explorer

Single keybinding import

  1. Press Alt+D to automatically import the file in your active text editor.

single-keybinding-import

Auto import across active tabs

  1. Press Ctrl+Shift+A on a file in Explorer, then press Ctrl+I in your active text editor to import it.

auto-import-from-text-editor

HTML Support

Import script and stylesheet

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

import-script-stylesheet-demo

Markdown Support

Import image to markdown

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

markdown-image-import

Import markdown

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

markdown-import

Changelog

See CHANGELOG for more information.

Contributing

Related

More extensions of mine.