npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vscode-resource-hover-preview

v0.5.36

Published

VSCode 资源管理器悬停浮动预览(图片/视频/字体/音频/3D)

Readme

vscode-resource-hover-preview

npm License Node.js

鼠标悬停 VSCode 资源管理器里的文件,浮动预览弹窗直接弹出来

🖼️ 图片 · 🎬 视频 · 🎵 音频 · 🔤 字体 · 🎲 3D —— 四角缩放 + 智能四象限定位 + 尺寸记忆 + Pin 固定可拖动

简体中文 | English


翻 VSCode 资源管理器里的文件,想看图片/视频/字体/3D 长啥样?装上这个,鼠标悬停文件名直接弹出浮动预览,不打开文件、不占编辑区,移开鼠标自动消失。5 种媒体类型全覆盖。


✨ 功能

① 悬停即预览 鼠标悬停资源管理器文件项(.png/.mp4/.ttf/.glb...),~300ms 后弹出浮动预览弹窗,不打开文件、不占编辑区。

② 四角缩放 弹窗四个角都可拖拽缩放(对角固定),调到合适大小。

③ 智能四象限定位 按悬停文件项在视口的位置,自动选展开方向(左上/左下/右上/右下),避开文件项 + 不超出屏幕。

④ 尺寸记忆 缩放后的尺寸记在 localStorage,下次悬停保持。

⑤ Pin 固定 点 📌 固定弹窗(不随鼠标离开消失),固定后图片/字体浮窗可拖动到任意位置,方便对照参考。

⑥ 滚轮缩放与平移 浮窗内滚轮/双指捏合以光标为中心缩放(最高 1000×),放大后可拖拽平移,双击或工具栏一键复原。

⑦ 一键改名 点击浮窗上方文件名直接重命名(自动选中文件名、保留后缀)。

⑧ 5 类型全覆盖 🖼️ 图片(png/jpg/gif/webp/svg/bmp/ico/avif) · 🎬 视频(mp4/webm/mov/mkv/avi/m4v/flv) · 🎵 音频(mp3/wav/ogg/flac/aac/m4a/opus/aiff) · 🔤 字体(ttf/otf/woff/woff2) · 🎲 3D(glb/gltf/obj/stl/fbx)


🚀 安装使用

前置:Node.js 18+,VSCode(macOS / Windows / Linux)。

npx -y vscode-resource-hover-preview@latest

完全退出 VSCode 再重新打开(Mac: Cmd+Q;Windows/Linux: 托盘或菜单 Quit,仅关窗口可能不够)。

悬停资源管理器里的文件 → 浮动弹窗直接显示。装一次就生效。

⚠️ 必须完全退出再重启(Mac Cmd+Q / Windows 托盘 Quit / Linux 完全退出),不是 Reload Window——Reload 不重读 workbench,patch 不生效。

VSCode 更新后怎么办?

VSCode 更新会覆盖 patch,但 companion 扩展会自动 re-patch(你什么都不用做)。只需再 Cmd+Q 一次让新 patch 生效——companion 会弹通知提示你。


📂 支持类型

| 类型 | 扩展名 | |---|---| | 🖼️ 图片 | png jpg jpeg gif webp svg bmp ico avif | | 🎬 视频 | mp4 webm mov mkv avi m4v flv | | 🎵 音频 | mp3 wav ogg flac aac m4a opus aiff | | 🔤 字体 | ttf otf woff woff2 | | 🎲 3D | glb gltf obj stl fbx |

💡 视频格式:mp4/webm/mov 等原生格式直接播放;AVI/FLV/MKV 等非原生格式需本机安装 ffmpeg(插件自动转码为浏览器可播格式,首次悬停有短暂转码延迟)。

🔊 视频/音频自带播放控件条(播放/进度/静音/音量,悬停弹窗底部胶囊)——不依赖 VSCode 原生媒体控件。若本机 VSCode 缺 AAC 解码器(官方构建默认如此,表现为视频有画无声),视频走【原文件直读】(完整时长、秒拖进度);因官方 VSCode 不带 AAC 解码器(表现为有画面无声),AAC 家族(mp4/mov/m4v)的音轨由插件提取为 MP3 旁路播放,有画面也有声音(提取需本机 ffmpeg,结果落盘缓存;无 ffmpeg 时仅有画面)。


🔄 卸载

npx -y vscode-resource-hover-preview@latest --revert

一键还原,零副作用。


💝 支持作者

如果 vscode-resource-hover-preview 帮到你,欢迎请作者喝杯咖啡 ☕

| 微信 | 支付宝 | | :----------------------------------------------------------------: | :------------------------------------------------------------------: | | | |

或 ⭐ Star、提 Issue / PR —— 都是对作者的支持。


License

MIT