Skip to content
| Marketplace
Sign in
Visual Studio Code>Snippets>Drag > (shift) > Drop > ImportNew to Visual Studio Code? Get it now.
Drag > (shift) > Drop > Import

Drag > (shift) > Drop > Import

NicholasHsiang

|
117 installs
| (0) | Free
drag-and-drop file imports, support relative path and alias path.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Drag > (shift) > Drop > Import

Fork: 🎉 Here ← ElecTreeFrying/drag-import-relative-path 🫰.

Support relative path and alias path.

--

支持相对路径和别名路径导入

Usage / 使用方法

  1. Drag supported files from the tree view.
  2. Hold shift
  3. Drop them into any of your active editors.

--

  1. 在侧边资源管理器中,鼠标左键拖着文件不松开
  2. 按住 shift
  3. 拖到编辑器中导入位置,松开鼠标,完成导入

Example / 示例

Vue

SCSS

Markdown

Supported file extensions / 支持的文件类型

Drop Drag
.vue .vue
.js
.json
.css, .sass, .scss, .less
.gif, .jpeg, .jpg, .png, .svg, .webp
.js, .ts .js, .ts
.json
.css, .sass, .scss, .less
.gif, .jpeg, .jpg, .png, .svg, .webp
.jsx .jsx
.js
.json
.css, .sass, .scss, .less
.gif, .jpeg, .jpg, .png, .svg, .webp
.tsx .tsx
.ts, .js
.json
.css, .sass, .scss, .less
.gif, .jpeg, .jpg, .png, .svg, .webp
.css .css
.gif, .jpeg, .jpg, .png, .svg, .webp
.scss .scss
.css
.gif, .jpeg, .jpg, .png, .svg, .webp
.html .js
.css
.gif, .jpeg, .jpg, .png, .svg, .webp
.md .md
.gif, .jpeg, .jpg, .png, .svg, .webp

Settings / 设置

  • dragDropImport.importStatements.pathMappings, Path mappings configuration/路径映射配置,默认配置适配了 Vue CLI / URL 转换规则
  • dragDropImport.importStatements.pathStyle, Path style configuration/路径风格配置 (支持别名路径、相对路径)

License 📃

MIT License

Donate 🎉

xianghongai@gmail.com

Powered By Cursor 💝

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